diff --git a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/api/AssetConsumerGlossaryInterface.java b/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/api/AssetConsumerGlossaryInterface.java index 0b8dbf95719..dee86a84581 100644 --- a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/api/AssetConsumerGlossaryInterface.java +++ b/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/api/AssetConsumerGlossaryInterface.java @@ -2,7 +2,7 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.assetconsumer.api; -import org.odpi.openmetadata.accessservices.assetconsumer.elements.MeaningElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.MeaningElement; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; diff --git a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/api/AssetConsumerTaggingInterface.java b/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/api/AssetConsumerTaggingInterface.java index bd0893af117..4e3d0ca7df0 100644 --- a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/api/AssetConsumerTaggingInterface.java +++ b/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/api/AssetConsumerTaggingInterface.java @@ -2,10 +2,10 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.assetconsumer.api; -import org.odpi.openmetadata.accessservices.assetconsumer.elements.InformalTagElement; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.InformalTagElement; import java.util.List; diff --git a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/elements/InformalTagElement.java b/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/elements/InformalTagElement.java deleted file mode 100644 index e4a4dc97c56..00000000000 --- a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/elements/InformalTagElement.java +++ /dev/null @@ -1,185 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetconsumer.elements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetconsumer.properties.InformalTagProperties; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * InformalTagElement contains the properties and header for a InformalTag entity retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class InformalTagElement implements MetadataElement -{ - private ElementHeader elementHeader = null; - private InformalTagProperties informalTagProperties = null; - private TaggedElement taggedElement = null; - - - /** - * Default constructor - */ - public InformalTagElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public InformalTagElement(InformalTagElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - informalTagProperties = template.getInformalTagProperties(); - taggedElement = template.getTaggedElement(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - @Override - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the properties of the informal tag. - * - * @return properties bean - */ - public InformalTagProperties getInformalTagProperties() - { - return informalTagProperties; - } - - - /** - * Set up the properties of the informal tag. - * - * @param informalTagProperties properties bean - */ - public void setInformalTagProperties(InformalTagProperties informalTagProperties) - { - this.informalTagProperties = informalTagProperties; - } - - - /** - * Return details of the relationship from the element in the request to the tag. This value is null if the tag was retrieved independently - * of any tagged element. - * - * @return associated relationship - */ - public TaggedElement getTaggedElement() - { - return taggedElement; - } - - - /** - * Set up details of the relationship from the element in the request to the tag. This value is null if the tag was retrieved independently - * of any tagged element. - * - * @param taggedElement associated relationship - */ - public void setTaggedElement(TaggedElement taggedElement) - { - this.taggedElement = taggedElement; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "InformalTagElement{" + - "elementHeader=" + elementHeader + - ", informalTagProperties=" + informalTagProperties + - ", taggedElement=" + taggedElement + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (! (objectToCompare instanceof InformalTagElement)) - { - return false; - } - - InformalTagElement that = (InformalTagElement) objectToCompare; - - if (elementHeader != null ? ! elementHeader.equals(that.elementHeader) : that.elementHeader != null) - { - return false; - } - if (informalTagProperties != null ? ! informalTagProperties.equals(that.informalTagProperties) : that.informalTagProperties != null) - { - return false; - } - return taggedElement != null ? taggedElement.equals(that.taggedElement) : that.taggedElement == null; - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - int result = elementHeader != null ? elementHeader.hashCode() : 0; - result = 31 * result + (informalTagProperties != null ? informalTagProperties.hashCode() : 0); - result = 31 * result + (taggedElement != null ? taggedElement.hashCode() : 0); - return result; - } -} diff --git a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/elements/MetadataElement.java b/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/elements/MetadataElement.java deleted file mode 100644 index 52953b0c337..00000000000 --- a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/elements/MetadataElement.java +++ /dev/null @@ -1,28 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetconsumer.elements; - -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * MetadataElement is the common interface for all metadata elements. It adds the header information that is stored with the properties. - * This includes detains of its unique identifier, type and origin. - */ -public interface MetadataElement -{ - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - ElementHeader getElementHeader(); - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - void setElementHeader(ElementHeader elementHeader); -} diff --git a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/elements/TaggedElement.java b/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/elements/TaggedElement.java deleted file mode 100644 index fb3e5fd1de7..00000000000 --- a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/elements/TaggedElement.java +++ /dev/null @@ -1,181 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetconsumer.elements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * RelatedElement contains the properties and header for a relationship retrieved from the metadata repository along with the stub - * of the related element. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class TaggedElement -{ - private ElementHeader relationshipHeader = null; - private ElementStub relatedElement = null; - private boolean isPublic = false; - - /** - * Default constructor - */ - public TaggedElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public TaggedElement(TaggedElement template) - { - if (template != null) - { - relationshipHeader = template.getRelationshipHeader(); - relatedElement = template.getRelatedElement(); - isPublic = template.getIsPublic(); - } - } - - - - /** - * Return if the link to the tag is private to the creating user. - * - * @return boolean - */ - public boolean getIsPublic() - { - return isPublic; - } - - - /** - * Set up whether the link to the tag is private to the creating user or not. - * - * @param aPublic boolean - */ - public void setIsPublic(boolean aPublic) - { - isPublic = aPublic; - } - - - /** - * Return the element header associated with the relationship. - * - * @return element header object - */ - public ElementHeader getRelationshipHeader() - { - return relationshipHeader; - } - - - /** - * Set up the element header associated with the relationship. - * - * @param relationshipHeader element header object - */ - public void setRelationshipHeader(ElementHeader relationshipHeader) - { - this.relationshipHeader = relationshipHeader; - } - - - /** - * Return the element header associated with end 1 of the relationship. - * - * @return element stub object - */ - public ElementStub getRelatedElement() - { - return relatedElement; - } - - - /** - * Set up the element header associated with end 1 of the relationship. - * - * @param relatedElement element stub object - */ - public void setRelatedElement(ElementStub relatedElement) - { - this.relatedElement = relatedElement; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "TaggedElement{" + - "relationshipHeader=" + relationshipHeader + - ", relatedElement=" + relatedElement + - ", isPublic=" + isPublic + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (! (objectToCompare instanceof TaggedElement)) - { - return false; - } - - TaggedElement that = (TaggedElement) objectToCompare; - - if (isPublic != that.isPublic) - { - return false; - } - if (relationshipHeader != null ? ! relationshipHeader.equals(that.relationshipHeader) : that.relationshipHeader != null) - { - return false; - } - return relatedElement != null ? relatedElement.equals(that.relatedElement) : that.relatedElement == null; - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - int result = relationshipHeader != null ? relationshipHeader.hashCode() : 0; - result = 31 * result + (relatedElement != null ? relatedElement.hashCode() : 0); - result = 31 * result + (isPublic ? 1 : 0); - return result; - } -} diff --git a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/elements/package-info.java b/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/elements/package-info.java deleted file mode 100644 index e4a9405c7db..00000000000 --- a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/elements/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -/** - * The metadata elements describe the way that metadata is returned from the repository. - */ -package org.odpi.openmetadata.accessservices.assetconsumer.elements; diff --git a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/events/AssetConsumerOutTopicEvent.java b/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/events/AssetConsumerOutTopicEvent.java index 230fe8833f3..d1b496a3f3c 100644 --- a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/events/AssetConsumerOutTopicEvent.java +++ b/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/events/AssetConsumerOutTopicEvent.java @@ -8,7 +8,7 @@ import java.util.Map; import java.util.Objects; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; diff --git a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/properties/InformalTagProperties.java b/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/properties/InformalTagProperties.java deleted file mode 100644 index 70d429b4c60..00000000000 --- a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/properties/InformalTagProperties.java +++ /dev/null @@ -1,209 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetconsumer.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * InformalTagProperties stores information about a tag connected to an asset. - * InformalTags provide informal classifications to assets - * and can be added at any time. - * - * InformalTags have the userId of the person who added the tag, the name of the tag and its description. - * - * The content of the tag is a personal judgement (which is why the user's id is in the tag) - * and there is no formal review of the tags. However, they can be used as a basis for crowd-sourcing - * Glossary terms. - * - * Private InformalTags are only returned to the user that created them. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class InformalTagProperties -{ - private boolean isPrivateTag = false; - private String name = null; - private String description = null; - private String user = null; - - - /** - * Default constructor - */ - public InformalTagProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template element to copy - */ - public InformalTagProperties(InformalTagProperties template) - { - if (template != null) - { - isPrivateTag = template.getIsPrivateTag(); - user = template.getUser(); - name = template.getName(); - description = template.getDescription(); - } - } - - - /** - * Return boolean flag to say whether the tag is private or not. A private tag is only seen by the - * person who set it up. Public tags are visible to everyone. - * - * @return boolean is private flag - */ - public boolean getIsPrivateTag() { - return isPrivateTag; - } - - - /** - * Set up boolean flag to say whether the tag is private or not. A private tag is only seen by the - * person who set it up. Public tags are visible to everyone. - * - * @param privateTag indicator of a private tag - */ - public void setIsPrivateTag(boolean privateTag) - { - isPrivateTag = privateTag; - } - - - /** - * Return the user id of the person who created the tag. Null means the user id is not known. - * - * @return String tagging user - */ - public String getUser() { - return user; - } - - - /** - * Set up the user id of the person who created the tag. Null means the user id is not known. - * - * @param user String identifier of the creator of the tag. - */ - public void setUser(String user) - { - this.user = user; - } - - - /** - * Return the name of the tag. It is not valid to have a tag with no name. However, there is a point where - * the tag object is created and the tag name not yet set, so null is a possible response. - * - * @return String tag name - */ - public String getName() { - return name; - } - - - /** - * Set up the name of the tag. It is not valid to have a tag with no name. However, there is a point where - * the tag object is created and the tag name not yet set, so null is a possible response. - * - * @param name String tag name - */ - public void setName(String name) - { - this.name = name; - } - - - /** - * Return the tag description null means no description is available. - * - * @return String tag description - */ - public String getDescription() - { - return description; - } - - - /** - * Set up the tag description null means no description is available. - * - * @param tagDescription tag description - */ - public void setDescription(String tagDescription) { - this.description = tagDescription; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "InformalTagProperties{" + - ", isPrivateTag=" + isPrivateTag + - ", name='" + name + '\'' + - ", description='" + description + '\'' + - ", user='" + user + '\'' + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof InformalTagProperties)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - InformalTagProperties that = (InformalTagProperties) objectToCompare; - return getIsPrivateTag() == that.getIsPrivateTag() && - Objects.equals(getName(), that.getName()) && - Objects.equals(getDescription(), that.getDescription()) && - Objects.equals(getUser(), that.getUser()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(isPrivateTag, name, description, user); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/properties/MeaningProperties.java b/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/properties/MeaningProperties.java deleted file mode 100644 index 740d4a2fa9b..00000000000 --- a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/properties/MeaningProperties.java +++ /dev/null @@ -1,179 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetconsumer.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * MeaningProperties is a cut-down summary of a glossary term to aid the asset consumer in understanding the content - * of an asset. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class MeaningProperties extends ReferenceableProperties -{ - private String name = null; - private String summary = null; - private String description = null; - - - /** - * Default constructor - */ - public MeaningProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template element to copy - */ - public MeaningProperties(MeaningProperties template) - { - super(template); - - if (template != null) - { - name = template.getName(); - summary = template.getSummary(); - description = template.getDescription(); - } - } - - - /** - * Return the glossary term name. - * - * @return String name - */ - public String getName() - { - return name; - } - - - /** - * Set up the glossary term name. - * - * @param name String name - */ - public void setName(String name) - { - this.name = name; - } - - - /** - * Return the short summary of the term. - * - * @return string summary - */ - public String getSummary() - { - return summary; - } - - - /** - * Set up the short summary of the term. - * - * @param summary string summary - */ - public void setSummary(String summary) - { - this.summary = summary; - } - - - /** - * Return the description of the glossary term. - * - * @return String description - */ - public String getDescription() - { - return description; - } - - - /** - * Set up the description of the glossary term. - * - * @param description String description - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "MeaningProperties{" + - "name='" + name + '\'' + - ", summary='" + summary + '\'' + - ", description='" + description + '\'' + - ", typeName='" + getTypeName() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - MeaningProperties that = (MeaningProperties) objectToCompare; - return Objects.equals(name, that.name) && - Objects.equals(summary, that.summary)&& - Objects.equals(description, that.description); - } - - - /** - * Create a hash code for this element type. - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), name, summary, description); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/properties/MetadataElement.java b/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/properties/MetadataElement.java deleted file mode 100644 index 576cbca7a45..00000000000 --- a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/properties/MetadataElement.java +++ /dev/null @@ -1,154 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetconsumer.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementBase; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * Description of an open metadata element (entity instance) retrieved from the open metadata repositories. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class MetadataElement extends ElementHeader -{ - private Map properties = null; - - /** - * Default constructor used by subclasses - */ - public MetadataElement() - { - } - - - /** - * Copy/clone constructor - * - * @param template template to copy - */ - public MetadataElement(MetadataElement template) - { - super(template); - - if (template != null) - { - properties = template.getProperties(); - } - } - - - /** - * Copy/clone constructor - * - * @param template template to copy - */ - public MetadataElement(ElementHeader template) - { - super(template); - } - - - /** - * Set up the properties for the element. - * If no stored properties are present then null is returned. - * - * @param properties properties for the classification - */ - public void setProperties(Map properties) - { - this.properties = properties; - } - - - /** - * Return a collection of the properties for the element. - * If no stored properties are present then null is returned. - * - * @return properties map - */ - public Map getProperties() - { - if (properties == null) - { - return null; - } - else if (properties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(properties); - } - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "MetadataElement{" + - "properties=" + properties + - ", status=" + getStatus() + - ", type=" + getType() + - ", origin=" + getOrigin() + - ", versions=" + getVersions() + - ", headerVersion=" + getHeaderVersion() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - MetadataElement that = (MetadataElement) objectToCompare; - return Objects.equals(properties, that.properties); - } - - - /** - * Create a hash code for this element type. - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), properties); - } -} diff --git a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/properties/ReferenceableProperties.java b/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/properties/ReferenceableProperties.java deleted file mode 100644 index 6549c183c6c..00000000000 --- a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/properties/ReferenceableProperties.java +++ /dev/null @@ -1,231 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetconsumer.properties; - -import com.fasterxml.jackson.annotation.*; -import org.odpi.openmetadata.accessservices.assetconsumer.rest.CommentRequestBody; - -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ReferenceableProperties provides a structure for passing a referenceables' properties over the Java API. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes( - { - @JsonSubTypes.Type(value = CommentRequestBody.class, name = "CommentRequestBody"), - @JsonSubTypes.Type(value = MeaningProperties.class, name = "MeaningProperties"), - }) -public abstract class ReferenceableProperties -{ - private String qualifiedName = null; - private Map additionalProperties = null; - - private String typeName = null; - private Map extendedProperties = null; - - - /** - * Default constructor - */ - public ReferenceableProperties() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ReferenceableProperties(ReferenceableProperties template) - { - if (template != null) - { - this.qualifiedName = template.getQualifiedName(); - this.additionalProperties = template.getAdditionalProperties(); - this.typeName = template.getTypeName(); - this.extendedProperties = template.getExtendedProperties(); - } - } - - - /** - * Return the open metadata type name of this object - this is used to create a subtype of - * the referenceable. Any properties associated with this subtype are passed as extended properties. - * - * @return string type name - */ - public String getTypeName() - { - return typeName; - } - - - /** - * Set up the open metadata type name of this object - this is used to create a subtype of - * the referenceable. Any properties associated with this subtype are passed as extended properties. - * - * @param typeName string type name - */ - public void setTypeName(String typeName) - { - this.typeName = typeName; - } - - - /** - * Returns the stored qualified name property for the metadata entity. - * If no qualified name is available then the empty string is returned. - * - * @return qualifiedName - */ - public String getQualifiedName() - { - return qualifiedName; - } - - - /** - * Set up the fully qualified name. - * - * @param qualifiedName String name - */ - public void setQualifiedName(String qualifiedName) - { - this.qualifiedName = qualifiedName; - } - - - /** - * Return a copy of the additional properties. Null means no additional properties are available. - * - * @return AdditionalProperties - */ - public Map getAdditionalProperties() - { - if (additionalProperties == null) - { - return null; - } - else if (additionalProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(additionalProperties); - } - } - - - /** - * Set up additional properties. - * - * @param additionalProperties Additional properties object - */ - public void setAdditionalProperties(Map additionalProperties) - { - this.additionalProperties = additionalProperties; - } - - - /** - * Return the properties that are defined for a subtype of referenceable but are not explicitly - * supported by the bean. - * - * @return map of properties - */ - public Map getExtendedProperties() - { - if (extendedProperties == null) - { - return null; - } - else if (extendedProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(extendedProperties); - } - } - - - /** - * Set up the properties that are defined for a subtype of referenceable but are not explicitly - * supported by the bean. - * - * @param extendedProperties map of properties - */ - public void setExtendedProperties(Map extendedProperties) - { - this.extendedProperties = extendedProperties; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "ReferenceableProperties{" + - "qualifiedName='" + qualifiedName + '\'' + - ", additionalProperties=" + additionalProperties + - ", typeName='" + typeName + '\'' + - ", extendedProperties=" + extendedProperties + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ReferenceableProperties that = (ReferenceableProperties) objectToCompare; - return Objects.equals(qualifiedName, that.qualifiedName) && - Objects.equals(additionalProperties, that.additionalProperties) && - Objects.equals(typeName, that.typeName) && - Objects.equals(extendedProperties, that.extendedProperties); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(qualifiedName, additionalProperties, extendedProperties, typeName); - } -} diff --git a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/properties/package-info.java b/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/properties/package-info.java deleted file mode 100644 index 5d4da02b900..00000000000 --- a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/properties/package-info.java +++ /dev/null @@ -1,8 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -/** - * These beans describe the core properties that are passed to the server to create and update metadata. - */ -package org.odpi.openmetadata.accessservices.assetconsumer.properties; - diff --git a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/rest/AssetConsumerOMASAPIRequestBody.java b/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/rest/AssetConsumerOMASAPIRequestBody.java deleted file mode 100644 index f89653c9f40..00000000000 --- a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/rest/AssetConsumerOMASAPIRequestBody.java +++ /dev/null @@ -1,54 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetconsumer.rest; - -import com.fasterxml.jackson.annotation.*; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * AssetConsumerOMASAPIRequestBody provides a common header for Asset Consumer OMAS request bodies for its REST API. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes( - { - @JsonSubTypes.Type(value = LogRecordRequestBody.class, name = "LogRecordRequestBody") - }) -public abstract class AssetConsumerOMASAPIRequestBody -{ - /** - * Default constructor - */ - public AssetConsumerOMASAPIRequestBody() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public AssetConsumerOMASAPIRequestBody(AssetConsumerOMASAPIRequestBody template) - { - } - - - /** - * JSON-like toString - * - * @return string containing the class name - */ - @Override - public String toString() - { - return "AssetConsumerOMASAPIRequestBody{}"; - } -} diff --git a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/rest/AssetConsumerOMASAPIResponse.java b/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/rest/AssetConsumerOMASAPIResponse.java deleted file mode 100644 index 8685c9d6489..00000000000 --- a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/rest/AssetConsumerOMASAPIResponse.java +++ /dev/null @@ -1,73 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetconsumer.rest; - -import com.fasterxml.jackson.annotation.*; -import org.odpi.openmetadata.commonservices.ffdc.rest.FFDCResponseBase; - -import java.util.Arrays; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * AssetConsumerOMASAPIResponse provides a common header for Asset Consumer OMAS managed rest to its REST API. - * It manages information about exceptions. If no exception has been raised exceptionClassName is null. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes({ - @JsonSubTypes.Type(value = TagResponse.class, name = "TagResponse"), - @JsonSubTypes.Type(value = PagedResponse.class, name = "PagedResponse"), - @JsonSubTypes.Type(value = AssetGraphResponse.class, name = "AssetGraphResponse"), - @JsonSubTypes.Type(value = AssetSearchMatchesListResponse.class, name = "AssetSearchMatchesListResponse") - }) -public abstract class AssetConsumerOMASAPIResponse extends FFDCResponseBase -{ - /** - * Default constructor - */ - public AssetConsumerOMASAPIResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public AssetConsumerOMASAPIResponse(AssetConsumerOMASAPIResponse template) - { - super(template); - } - - - /** - * JSON-like toString - * - * @return string containing the property names and values - */ - @Override - public String toString() - { - return "AssetConsumerOMASAPIResponse{" + - "exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } -} diff --git a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/rest/AssetGraphResponse.java b/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/rest/AssetGraphResponse.java deleted file mode 100644 index b036037806f..00000000000 --- a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/rest/AssetGraphResponse.java +++ /dev/null @@ -1,150 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetconsumer.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetconsumer.properties.AssetGraph; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * AssetGraphResponse is the response structure used on the Asset Consumer OMAS REST API calls that returns an - * AssetGraph object as a response. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class AssetGraphResponse extends AssetConsumerOMASAPIResponse -{ - private AssetGraph assetGraph = null; - - /** - * Default constructor - */ - public AssetGraphResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public AssetGraphResponse(AssetGraphResponse template) - { - super(template); - - if (template != null) - { - this.assetGraph = template.getAssetGraph(); - } - } - - - /** - * Return the graph object. - * - * @return graph object - */ - public AssetGraph getAssetGraph() - { - if (assetGraph == null) - { - return null; - } - else - { - return assetGraph; - } - } - - - /** - * Set up the graph object. - * - * @param assetGraph - graph object - */ - public void setAssetGraph(AssetGraph assetGraph) - { - this.assetGraph = assetGraph; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "AssetGraphResponse{" + - "graph=" + assetGraph + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof AssetGraphResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - AssetGraphResponse that = (AssetGraphResponse) objectToCompare; - return Objects.equals(getAssetGraph(), that.getAssetGraph()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - if (assetGraph == null) - { - return super.hashCode(); - } - else - { - return assetGraph.hashCode(); - } - } -} diff --git a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/rest/AssetSearchMatchesListResponse.java b/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/rest/AssetSearchMatchesListResponse.java deleted file mode 100644 index e96cb9b32c5..00000000000 --- a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/rest/AssetSearchMatchesListResponse.java +++ /dev/null @@ -1,136 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetconsumer.rest; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetconsumer.properties.AssetSearchMatches; - -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * AssetSearchMatchesListResponse returns the list of results from an asset domain search. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class AssetSearchMatchesListResponse extends AssetConsumerOMASAPIResponse -{ - private List searchMatches = null; - - - /** - * Default constructor - */ - public AssetSearchMatchesListResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public AssetSearchMatchesListResponse(AssetSearchMatchesListResponse template) - { - super(template); - - if (template != null) - { - this.searchMatches = template.getSearchMatches(); - } - } - - - /** - * Return the list of matches in the response. - * - * @return list of glossary terms - */ - public List getSearchMatches() - { - return searchMatches; - } - - - /** - * Set up the list of matches for the response. - * - * @param searchMatches list - */ - public void setSearchMatches(List searchMatches) - { - this.searchMatches = searchMatches; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "AssetSearchMatchesListResponse{" + - "searchMatches=" + searchMatches + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - AssetSearchMatchesListResponse that = (AssetSearchMatchesListResponse) objectToCompare; - return Objects.equals(getSearchMatches(), that.getSearchMatches()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), getSearchMatches()); - } -} diff --git a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/rest/GlossaryTermListResponse.java b/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/rest/GlossaryTermListResponse.java deleted file mode 100644 index 4d10b2f6d07..00000000000 --- a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/rest/GlossaryTermListResponse.java +++ /dev/null @@ -1,157 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetconsumer.rest; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetconsumer.elements.MeaningElement; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * GlossaryTermListResponse returns a list of meanings from the server. The list may be too long to - * retrieve in a single call so there is support for paging of replies. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class GlossaryTermListResponse extends PagedResponse -{ - private List meanings = null; - - - /** - * Default constructor - */ - public GlossaryTermListResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public GlossaryTermListResponse(GlossaryTermListResponse template) - { - super(template); - - if (template != null) - { - this.meanings = template.getMeanings(); - } - } - - - /** - * Return the list of glossary terms in the response. - * - * @return list of glossary terms - */ - public List getMeanings() - { - if (meanings == null) - { - return null; - } - else if (meanings.isEmpty()) - { - return null; - } - else - { - List clonedList = new ArrayList<>(); - - for (MeaningElement existingElement : meanings) - { - clonedList.add(new MeaningElement(existingElement)); - } - - return clonedList; - } - } - - - /** - * Set up the list of glossary terms for the response. - * - * @param meanings list - */ - public void setMeanings(List meanings) - { - this.meanings = meanings; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "GlossaryTermListResponse{" + - "meanings=" + meanings + - ", startingFromElement=" + getStartingFromElement() + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - GlossaryTermListResponse that = (GlossaryTermListResponse) objectToCompare; - return Objects.equals(getMeanings(), that.getMeanings()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), getMeanings()); - } -} diff --git a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/rest/GlossaryTermResponse.java b/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/rest/GlossaryTermResponse.java deleted file mode 100644 index a6a953a10bb..00000000000 --- a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/rest/GlossaryTermResponse.java +++ /dev/null @@ -1,151 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetconsumer.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetconsumer.elements.MeaningElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * GlossaryTermResponse is the response structure used on the Asset Consumer OMAS REST API calls that returns a - * Glossary Term object as a response. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class GlossaryTermResponse extends AssetConsumerOMASAPIResponse -{ - private MeaningElement meaning = null; - - /** - * Default constructor - */ - public GlossaryTermResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public GlossaryTermResponse(GlossaryTermResponse template) - { - super(template); - - if (template != null) - { - this.meaning = template.getMeaning(); - } - } - - - /** - * Return the glossary term object. - * - * @return glossary term object - */ - public MeaningElement getMeaning() - { - if (meaning == null) - { - return null; - } - else - { - return meaning; - } - } - - - /** - * Set up the glossary term object. - * - * @param meaning - glossary term object - */ - public void setMeaning(MeaningElement meaning) - { - this.meaning = meaning; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "GlossaryTermResponse{" + - "glossaryTerm=" + meaning + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof GlossaryTermResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - GlossaryTermResponse that = (GlossaryTermResponse) objectToCompare; - return Objects.equals(getMeaning(), that.getMeaning()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - if (meaning == null) - { - return super.hashCode(); - } - else - { - return meaning.hashCode(); - } - } - -} diff --git a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/rest/PagedResponse.java b/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/rest/PagedResponse.java deleted file mode 100644 index 12f697cf5d6..00000000000 --- a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/rest/PagedResponse.java +++ /dev/null @@ -1,138 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetconsumer.rest; - -import com.fasterxml.jackson.annotation.*; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * PagedResponse is used for responses that can contain paged responses - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes( - { - @JsonSubTypes.Type(value = GlossaryTermListResponse.class, name = "GlossaryTermListResponse"), - @JsonSubTypes.Type(value = TagsResponse.class, name = "TagsResponse") - }) -public class PagedResponse extends AssetConsumerOMASAPIResponse -{ - private int startingFromElement = 0; - - /** - * Default constructor - */ - public PagedResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public PagedResponse(PagedResponse template) - { - super(template); - - if (template != null) - { - this.startingFromElement = template.getStartingFromElement(); - } - } - - - /** - * Return the starting element number from the server side list that this response contains. - * - * @return int - */ - public int getStartingFromElement() - { - return startingFromElement; - } - - - /** - * Set up the starting element number from the server side list that this response contains. - * - * @param startingFromElement int - */ - public void setStartingFromElement(int startingFromElement) - { - this.startingFromElement = startingFromElement; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "PagedResponse{" + - "startingFromElement=" + startingFromElement + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - PagedResponse that = (PagedResponse) objectToCompare; - return getStartingFromElement() == that.getStartingFromElement(); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), getStartingFromElement()); - } -} diff --git a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/rest/TagRequestBody.java b/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/rest/TagRequestBody.java deleted file mode 100644 index c2b061bbf17..00000000000 --- a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/rest/TagRequestBody.java +++ /dev/null @@ -1,189 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetconsumer.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * InformalTagProperties stores information about a tag connected to an asset. - * InformalTags provide informal classifications to assets - * and can be added at any time. - * - * InformalTags have the userId of the person who added the tag, the name of the tag and its description. - * - * The content of the tag is a personal judgement (which is why the user's id is in the tag) - * and there is no formal review of the tags. However, they can be used as a basis for crowd-sourcing - * Glossary terms. - * - * Private InformalTags are only returned to the user that created them. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class TagRequestBody -{ - private boolean isPrivateTag = false; - private String name = null; - private String description = null; - - - /** - * Default constructor - */ - public TagRequestBody() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template element to copy - */ - public TagRequestBody(TagRequestBody template) - { - if (template != null) - { - isPrivateTag = template.getIsPrivateTag(); - name = template.getName(); - description = template.getDescription(); - } - } - - - /** - * Return boolean flag to say whether the tag is private or not. A private tag is only seen by the - * person who set it up. Public tags are visible to everyone. - * - * @return boolean is private flag - */ - public boolean getIsPrivateTag() { - return isPrivateTag; - } - - - /** - * Set up boolean flag to say whether the tag is private or not. A private tag is only seen by the - * person who set it up. Public tags are visible to everyone. - * - * @param privateTag indicator of a private tag - */ - public void setIsPrivateTag(boolean privateTag) - { - isPrivateTag = privateTag; - } - - - /** - * Return the name of the tag. It is not valid to have a tag with no name. However, there is a point where - * the tag object is created and the tag name not yet set, so null is a possible response. - * - * @return String tag name - */ - public String getName() { - return name; - } - - - /** - * Set up the name of the tag. It is not valid to have a tag with no name. However, there is a point where - * the tag object is created and the tag name not yet set, so null is a possible response. - * - * @param name String tag name - */ - public void setName(String name) - { - this.name = name; - } - - - /** - * Return the tag description null means no description is available. - * - * @return String tag description - */ - public String getDescription() - { - return description; - } - - - /** - * Set up the tag description null means no description is available. - * - * @param tagDescription tag description - */ - public void setDescription(String tagDescription) { - this.description = tagDescription; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "TagRequestBody{" + - "isPrivateTag=" + isPrivateTag + - ", name='" + name + '\'' + - ", description='" + description + '\'' + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (! (objectToCompare instanceof TagRequestBody)) - { - return false; - } - - TagRequestBody that = (TagRequestBody) objectToCompare; - - if (isPrivateTag != that.isPrivateTag) - { - return false; - } - if (name != null ? ! name.equals(that.name) : that.name != null) - { - return false; - } - return description != null ? description.equals(that.description) : that.description == null; - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - int result = (isPrivateTag ? 1 : 0); - result = 31 * result + (name != null ? name.hashCode() : 0); - result = 31 * result + (description != null ? description.hashCode() : 0); - return result; - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/rest/TagResponse.java b/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/rest/TagResponse.java deleted file mode 100644 index b9817e18a8a..00000000000 --- a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/rest/TagResponse.java +++ /dev/null @@ -1,143 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetconsumer.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetconsumer.elements.InformalTagElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * TagResponse is the response structure used on the Asset Consumer OMAS REST API calls that returns a - * Tag object as a response. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class TagResponse extends AssetConsumerOMASAPIResponse -{ - private InformalTagElement tag = null; - - /** - * Default constructor - */ - public TagResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public TagResponse(TagResponse template) - { - super(template); - - if (template != null) - { - this.tag = template.getTag(); - } - } - - - /** - * Return the Tag object. - * - * @return tag - */ - public InformalTagElement getTag() - { - if (tag == null) - { - return null; - } - else - { - return new InformalTagElement(tag); - } - } - - - /** - * Set up the Tag object. - * - * @param tag tag object - */ - public void setTag(InformalTagElement tag) - { - this.tag = tag; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "TagResponse{" + - "tag=" + tag + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - TagResponse that = (TagResponse) objectToCompare; - return Objects.equals(getTag(), that.getTag()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), getTag()); - } -} diff --git a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/rest/TagsResponse.java b/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/rest/TagsResponse.java deleted file mode 100644 index d65c02e27db..00000000000 --- a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/rest/TagsResponse.java +++ /dev/null @@ -1,157 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetconsumer.rest; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetconsumer.elements.InformalTagElement; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * TagsResponse returns a list of tags from the server. The list may be too long to - * retrieve in a single call so there is support for paging of replies. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class TagsResponse extends PagedResponse -{ - private List tags = null; - - - /** - * Default constructor - */ - public TagsResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public TagsResponse(TagsResponse template) - { - super(template); - - if (template != null) - { - this.tags = template.getTags(); - } - } - - - /** - * Return the list of informal tags in the response. - * - * @return list of informal tags - */ - public List getTags() - { - if (tags == null) - { - return null; - } - else if (tags.isEmpty()) - { - return null; - } - else - { - List clonedList = new ArrayList<>(); - - for (InformalTagElement existingElement : tags) - { - clonedList.add(new InformalTagElement(existingElement)); - } - - return clonedList; - } - } - - - /** - * Set up the list of informal tags for the response. - * - * @param tags list - */ - public void setTags(List tags) - { - this.tags = tags; - } - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "TagsResponse{" + - "tags=" + tags + - ", startingFromElement=" + getStartingFromElement() + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - TagsResponse that = (TagsResponse) objectToCompare; - return getStartingFromElement() == that.getStartingFromElement() && - Objects.equals(getTags(), that.getTags()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), getTags(), getStartingFromElement()); - } -} diff --git a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/rest/package-info.java b/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/rest/package-info.java deleted file mode 100644 index 7edceb4618f..00000000000 --- a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/rest/package-info.java +++ /dev/null @@ -1,9 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -/** - * This package defines the beans used to build the REST request payloads. - * REST APIs can pass parameters in their URLs (called path variables) as well has having a RequestBody bean - * for additional, more complex, or optional parameters. - */ -package org.odpi.openmetadata.accessservices.assetconsumer.rest; diff --git a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/test/java/org/odpi/openmetadata/accessservices/assetconsumer/rest/LogRecordRequestBodyTest.java b/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/test/java/org/odpi/openmetadata/accessservices/assetconsumer/rest/LogRecordRequestBodyTest.java deleted file mode 100644 index 366f351dbd5..00000000000 --- a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/test/java/org/odpi/openmetadata/accessservices/assetconsumer/rest/LogRecordRequestBodyTest.java +++ /dev/null @@ -1,180 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetconsumer.rest; - -import com.fasterxml.jackson.databind.ObjectMapper; -import org.testng.annotations.Test; - -import static org.testng.Assert.assertFalse; -import static org.testng.Assert.assertTrue; - -/** - * Validate that the LogRecordRequestBody bean can be cloned, compared, serialized, deserialized and printed as a String. - */ -public class LogRecordRequestBodyTest -{ - /** - * Default constructor - */ - public LogRecordRequestBodyTest() - { - - } - - - /** - * Set up an example object to test. - * - * @return filled in object - */ - private LogRecordRequestBody getTestObject() - { - LogRecordRequestBody testObject = new LogRecordRequestBody(); - - testObject.setConnectionName("TestConnectionName"); - testObject.setConnectorInstanceId("TestConnectorInstanceId"); - testObject.setConnectorType("TestConnectorType"); - testObject.setContextId("TestContextId"); - testObject.setMessage("TestMessage"); - - return testObject; - } - - - /** - * Validate that the object that comes out of the test has the same content as the original test object. - * - * @param resultObject object returned by the test - */ - private void validateResultObject(LogRecordRequestBody resultObject) - { - assertTrue(resultObject.getConnectionName().equals("TestConnectionName")); - assertTrue(resultObject.getConnectorInstanceId().equals("TestConnectorInstanceId")); - assertTrue(resultObject.getConnectorType().equals("TestConnectorType")); - assertTrue(resultObject.getContextId().equals("TestContextId")); - assertTrue(resultObject.getMessage().equals("TestMessage")); - } - - - /** - * Validate that the object is initialized properly - */ - @Test public void testNullObject() - { - LogRecordRequestBody nullObject = new LogRecordRequestBody(); - - assertTrue(nullObject.getMessage() == null); - assertTrue(nullObject.getContextId() == null); - assertTrue(nullObject.getConnectorType() == null); - assertTrue(nullObject.getConnectorInstanceId() == null); - assertTrue(nullObject.getConnectionName() == null); - - nullObject = new LogRecordRequestBody(null); - - assertTrue(nullObject.getMessage() == null); - assertTrue(nullObject.getContextId() == null); - assertTrue(nullObject.getConnectorType() == null); - assertTrue(nullObject.getConnectorInstanceId() == null); - assertTrue(nullObject.getConnectionName() == null); - } - - - /** - * Validate that 2 different objects with the same content are evaluated as equal. - * Also that different objects are considered not equal. - */ - @Test public void testEquals() - { - assertFalse(getTestObject().equals("DummyString")); - assertTrue(getTestObject().equals(getTestObject())); - - LogRecordRequestBody sameObject = getTestObject(); - assertTrue(sameObject.equals(sameObject)); - - LogRecordRequestBody differentObject = getTestObject(); - differentObject.setContextId("DifferentContextId"); - assertFalse(getTestObject().equals(differentObject)); - } - - - /** - * Validate that 2 different objects with the same content have the same hash code. - */ - @Test public void testHashCode() - { - assertTrue(getTestObject().hashCode() == getTestObject().hashCode()); - } - - - /** - * Validate that an object cloned from another object has the same content as the original - */ - @Test public void testClone() - { - validateResultObject(new LogRecordRequestBody(getTestObject())); - } - - - /** - * Validate that an object generated from a JSON String has the same content as the object used to - * create the JSON String. - */ - @Test public void testJSON() - { - ObjectMapper objectMapper = new ObjectMapper(); - String jsonString = null; - - /* - * This class - */ - try - { - jsonString = objectMapper.writeValueAsString(getTestObject()); - } - catch (Exception exc) - { - assertTrue(false, "Exception: " + exc.getMessage()); - } - - try - { - validateResultObject(objectMapper.readValue(jsonString, LogRecordRequestBody.class)); - } - catch (Exception exc) - { - assertTrue(false, "Exception: " + exc.getMessage()); - } - - /* - * Through superclass - */ - AssetConsumerOMASAPIRequestBody superObject = getTestObject(); - - try - { - jsonString = objectMapper.writeValueAsString(superObject); - } - catch (Exception exc) - { - assertTrue(false, "Exception: " + exc.getMessage()); - } - - try - { - validateResultObject((LogRecordRequestBody) objectMapper.readValue(jsonString, AssetConsumerOMASAPIRequestBody.class)); - } - catch (Exception exc) - { - assertTrue(false, "Exception: " + exc.getMessage()); - } - } - - - /** - * Test that toString is overridden. - */ - @Test public void testToString() - { - assertTrue(getTestObject().toString().contains("LogRecordRequestBody")); - } -} diff --git a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/test/java/org/odpi/openmetadata/accessservices/assetconsumer/rest/MockAPIRequestBody.java b/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/test/java/org/odpi/openmetadata/accessservices/assetconsumer/rest/MockAPIRequestBody.java deleted file mode 100644 index 395f2e143cb..00000000000 --- a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/test/java/org/odpi/openmetadata/accessservices/assetconsumer/rest/MockAPIRequestBody.java +++ /dev/null @@ -1,27 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetconsumer.rest; - -/** - * MockAPIRequestBody enables the overridden methods of AssetConsumerOMASAPIRequestBody to be tested. - */ -class MockAPIRequestBody extends AssetConsumerOMASAPIRequestBody -{ - /** - * Default constructor - */ - MockAPIRequestBody() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to clone - */ - MockAPIRequestBody(MockAPIRequestBody template) - { - super(template); - } -} diff --git a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/test/java/org/odpi/openmetadata/accessservices/assetconsumer/rest/OMASAPIRequestBodyTest.java b/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/test/java/org/odpi/openmetadata/accessservices/assetconsumer/rest/OMASAPIRequestBodyTest.java deleted file mode 100644 index c63a29e78d3..00000000000 --- a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/test/java/org/odpi/openmetadata/accessservices/assetconsumer/rest/OMASAPIRequestBodyTest.java +++ /dev/null @@ -1,21 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetconsumer.rest; - -import org.testng.annotations.Test; - -import static org.testng.Assert.assertTrue; - -/** - * Test the overridden methods of AssetConsumerOMASAPIRequestBody - */ -public class OMASAPIRequestBodyTest -{ - @Test public void TestToString() - { - MockAPIRequestBody testObject = new MockAPIRequestBody(); - - assertTrue(testObject.toString().contains("AssetConsumerOMASAPIRequestBody")); - assertTrue(new MockAPIRequestBody(testObject).toString().contains("AssetConsumerOMASAPIRequestBody")); - } -} diff --git a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-client/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/client/AssetConsumer.java b/open-metadata-implementation/access-services/asset-consumer/asset-consumer-client/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/client/AssetConsumer.java index 7923db0272b..83847a1d05f 100644 --- a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-client/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/client/AssetConsumer.java +++ b/open-metadata-implementation/access-services/asset-consumer/asset-consumer-client/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/client/AssetConsumer.java @@ -8,15 +8,11 @@ import org.odpi.openmetadata.accessservices.assetconsumer.api.AssetConsumerLoggingInterface; import org.odpi.openmetadata.accessservices.assetconsumer.api.AssetConsumerTaggingInterface; import org.odpi.openmetadata.accessservices.assetconsumer.client.rest.AssetConsumerRESTClient; -import org.odpi.openmetadata.accessservices.assetconsumer.elements.InformalTagElement; -import org.odpi.openmetadata.accessservices.assetconsumer.elements.MeaningElement; -import org.odpi.openmetadata.accessservices.assetconsumer.properties.AssetGraph; -import org.odpi.openmetadata.accessservices.assetconsumer.properties.AssetSearchMatches; -import org.odpi.openmetadata.accessservices.assetconsumer.rest.*; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDListResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.AssetElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.MeaningElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.AssetGraph; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.AssetSearchMatches; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; @@ -25,8 +21,11 @@ import org.odpi.openmetadata.frameworks.connectors.properties.beans.Asset; import org.odpi.openmetadata.frameworks.openmetadata.enums.CommentType; import org.odpi.openmetadata.frameworks.openmetadata.enums.StarRating; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.InformalTagElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.feedback.InformalTagProperties; import org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.client.ConnectedAssetClientBase; import org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.rest.AssetsResponse; +import org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.rest.TagRequestBody; import java.util.ArrayList; import java.util.List; @@ -285,13 +284,13 @@ private List getAssetsByName(String userId, * @throws PropertyServerException there is a problem access in the property server * @throws UserNotAuthorizedException the user does not have access to the properties */ - public List getAssetsByMetadataCollectionId(String userId, - String metadataCollectionId, - String typeName, - int startFrom, - int pageSize) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException + public List getAssetsByMetadataCollectionId(String userId, + String metadataCollectionId, + String typeName, + int startFrom, + int pageSize) throws InvalidParameterException, + PropertyServerException, + UserNotAuthorizedException { final String methodName = "getAssetsByMetadataCollectionId"; final String urlTemplate = serverPlatformURLRoot + "/servers/{0}/open-metadata/access-services/asset-consumer/users/{1}/assets/by-metadata-collection-id/{2}?startFrom={3}&pageSize={4}"; @@ -921,11 +920,11 @@ public MeaningElement getMeaning(String userId, invalidParameterHandler.validateUserId(userId, methodName); invalidParameterHandler.validateGUID(guid, guidParameter, methodName); - GlossaryTermResponse restResult = restClient.callGlossaryTermGetRESTCall(methodName, - urlTemplate, - serverName, - userId, - guid); + MeaningResponse restResult = restClient.callGlossaryTermGetRESTCall(methodName, + urlTemplate, + serverName, + userId, + guid); return restResult.getMeaning(); } @@ -964,15 +963,15 @@ public List getMeaningByName(String userId, requestBody.setName(term); requestBody.setNameParameterName(nameParameter); - GlossaryTermListResponse restResult = restClient.callGlossaryTermListPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - startFrom, - pageSize); + MeaningsResponse restResult = restClient.callGlossaryTermListPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + startFrom, + pageSize); - return restResult.getMeanings(); + return restResult.getElements(); } @@ -1009,15 +1008,15 @@ public List findMeanings(String userId, requestBody.setSearchString(term); requestBody.setSearchStringParameterName(nameParameter); - GlossaryTermListResponse restResult = restClient.callGlossaryTermListPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - startFrom, - pageSize); + MeaningsResponse restResult = restClient.callGlossaryTermListPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + startFrom, + pageSize); - return restResult.getMeanings(); + return restResult.getElements(); } @@ -1153,7 +1152,7 @@ private String createTag(boolean isPublic, invalidParameterHandler.validateUserId(userId, methodName); - TagRequestBody tagRequestBody = new TagRequestBody(); + InformalTagProperties tagRequestBody = new InformalTagProperties(); tagRequestBody.setIsPrivateTag(! isPublic); tagRequestBody.setName(tagName); tagRequestBody.setDescription(tagDescription); @@ -1320,13 +1319,13 @@ public InformalTagElement getTag(String userId, invalidParameterHandler.validateUserId(userId, methodName); invalidParameterHandler.validateGUID(guid, guidParameter, methodName); - TagResponse restResult = restClient.callInformalTagGetRESTCall(methodName, - urlTemplate, - serverName, - userId, - guid); + InformalTagResponse restResult = restClient.callInformalTagGetRESTCall(methodName, + urlTemplate, + serverName, + userId, + guid); - return restResult.getTag(); + return restResult.getElement(); } @@ -1363,15 +1362,15 @@ public List getTagsByName(String userId, requestBody.setName(tag); requestBody.setNameParameterName(nameParameter); - TagsResponse restResult = restClient.callInformalTagListPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - startFrom, - pageSize); + InformalTagsResponse restResult = restClient.callInformalTagListPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + startFrom, + pageSize); - return restResult.getTags(); + return restResult.getElements(); } @@ -1408,15 +1407,15 @@ public List getMyTagsByName(String userId, requestBody.setName(tag); requestBody.setNameParameterName(nameParameter); - TagsResponse restResult = restClient.callInformalTagListPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - startFrom, - pageSize); + InformalTagsResponse restResult = restClient.callInformalTagListPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + startFrom, + pageSize); - return restResult.getTags(); + return restResult.getElements(); } @@ -1453,15 +1452,15 @@ public List findTags(String userId, requestBody.setSearchString(tag); requestBody.setSearchStringParameterName(nameParameter); - TagsResponse restResult = restClient.callInformalTagListPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - startFrom, - pageSize); + InformalTagsResponse restResult = restClient.callInformalTagListPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + startFrom, + pageSize); - return restResult.getTags(); + return restResult.getElements(); } @@ -1498,15 +1497,15 @@ public List findMyTags(String userId, requestBody.setSearchString(tag); requestBody.setSearchStringParameterName(nameParameter); - TagsResponse restResult = restClient.callInformalTagListPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - startFrom, - pageSize); + InformalTagsResponse restResult = restClient.callInformalTagListPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + startFrom, + pageSize); - return restResult.getTags(); + return restResult.getElements(); } diff --git a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-client/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/client/rest/AssetConsumerRESTClient.java b/open-metadata-implementation/access-services/asset-consumer/asset-consumer-client/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/client/rest/AssetConsumerRESTClient.java index fdfbf9b0955..e0af28adf95 100644 --- a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-client/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/client/rest/AssetConsumerRESTClient.java +++ b/open-metadata-implementation/access-services/asset-consumer/asset-consumer-client/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/client/rest/AssetConsumerRESTClient.java @@ -2,7 +2,7 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.assetconsumer.client.rest; -import org.odpi.openmetadata.accessservices.assetconsumer.rest.*; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.client.OCFRESTClient; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; @@ -89,24 +89,24 @@ public AssetConsumerRESTClient(String serverName, /** - * Issue a GET REST call that returns a GlossaryTermResponse object. + * Issue a GET REST call that returns a MeaningResponse object. * * @param methodName name of the method being called. * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. * @param params a list of parameters that are slotted into the url template. * - * @return GlossaryTermResponse + * @return MeaningResponse * @throws InvalidParameterException one of the parameters is invalid. * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException the repository is not available or not working properly. */ - public GlossaryTermResponse callGlossaryTermGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, + public MeaningResponse callGlossaryTermGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - GlossaryTermResponse restResult = this.callGetRESTCall(methodName, GlossaryTermResponse.class, urlTemplate, params); + MeaningResponse restResult = this.callGetRESTCall(methodName, MeaningResponse.class, urlTemplate, params); exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); @@ -115,26 +115,26 @@ public GlossaryTermResponse callGlossaryTermGetRESTCall(String methodName, /** - * Issue a GET REST call that returns a GlossaryTermListResponse object. + * Issue a GET REST call that returns a MeaningsResponse object. * * @param methodName name of the method being called. * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. * @param requestBody request body describing the value to search for * @param params a list of parameters that are slotted into the url template. * - * @return GlossaryTermListResponse + * @return MeaningsResponse * @throws InvalidParameterException one of the parameters is invalid. * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException the repository is not available or not working properly. */ - public GlossaryTermListResponse callGlossaryTermListPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, + public MeaningsResponse callGlossaryTermListPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - GlossaryTermListResponse restResult = this.callPostRESTCall(methodName, GlossaryTermListResponse.class, urlTemplate, requestBody, params); + MeaningsResponse restResult = this.callPostRESTCall(methodName, MeaningsResponse.class, urlTemplate, requestBody, params); exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); @@ -198,24 +198,24 @@ public AssetSearchMatchesListResponse callAssetSearchMatchesListPostRESTCall(Str /** - * Issue a GET REST call that returns a TagResponse object. + * Issue a GET REST call that returns a InformalTagResponse object. * * @param methodName name of the method being called. * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. * @param params a list of parameters that are slotted into the url template. * - * @return TagResponse + * @return InformalTagResponse * @throws InvalidParameterException one of the parameters is invalid. * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException something went wrong with the REST call stack. */ - public TagResponse callInformalTagGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, + public InformalTagResponse callInformalTagGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - TagResponse restResult = this.callGetRESTCall(methodName, TagResponse.class, urlTemplate, params); + InformalTagResponse restResult = this.callGetRESTCall(methodName, InformalTagResponse.class, urlTemplate, params); exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); @@ -224,26 +224,26 @@ public TagResponse callInformalTagGetRESTCall(String methodName, /** - * Issue a GET REST call that returns a TagsResponse object. + * Issue a GET REST call that returns a InformalTagsResponse object. * * @param methodName name of the method being called. * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. * @param requestBody request body for the REST API call * @param params a list of parameters that are slotted into the url template. * - * @return TagsResponse + * @return InformalTagsResponse * @throws InvalidParameterException one of the parameters is invalid. * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException something went wrong with the REST call stack. */ - public TagsResponse callInformalTagListPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, + public InformalTagsResponse callInformalTagListPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - TagsResponse restResult = this.callPostRESTCall(methodName, TagsResponse.class, urlTemplate, requestBody, params); + InformalTagsResponse restResult = this.callPostRESTCall(methodName, InformalTagsResponse.class, urlTemplate, requestBody, params); exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); diff --git a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-server/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/converters/AssetConsumerOMASConverter.java b/open-metadata-implementation/access-services/asset-consumer/asset-consumer-server/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/converters/AssetConsumerOMASConverter.java deleted file mode 100644 index ff18ac6278a..00000000000 --- a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-server/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/converters/AssetConsumerOMASConverter.java +++ /dev/null @@ -1,33 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetconsumer.converters; - -import org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericConverter; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - - - -/** - * AssetConsumerOMASConverter provides the generic methods for the Data Manager beans converters. Generic classes - * have limited knowledge of the classes these are working on and this means creating a new instance of a - * class from within a generic is a little involved. This class provides the generic method for creating - * and initializing a Data Manager bean. - */ -public abstract class AssetConsumerOMASConverter extends OpenMetadataAPIGenericConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName name of this server - */ - public AssetConsumerOMASConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super (repositoryHelper, serviceName, serverName); - } - - -} diff --git a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-server/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/converters/AssetConverter.java b/open-metadata-implementation/access-services/asset-consumer/asset-consumer-server/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/converters/AssetConverter.java deleted file mode 100644 index d4363285caf..00000000000 --- a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-server/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/converters/AssetConverter.java +++ /dev/null @@ -1,117 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetconsumer.converters; - -import org.odpi.openmetadata.commonservices.generichandlers.OCFConverter; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.Asset; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; - - -/** - * AssetConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) - * EntityDetail object into an Asset bean. - */ -public class AssetConverter extends OCFConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public AssetConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - /** - * Using the supplied entity, return a new instance of the bean. This is used for most beans that have - * a one to one correspondence with the repository instances. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param methodName calling method - * @return bean populated with properties from the entity supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof Asset bean) - { - /* - * Check that the entity is of the correct type. - */ - this.setUpElementHeader(bean, entity, OpenMetadataType.ASSET.typeName, methodName); - - /* - * The initial set of values come from the entity properties. The super class properties are removed from a copy of the entities - * properties, leaving any subclass properties to be stored in extended properties. - */ - InstanceProperties instanceProperties = new InstanceProperties(entity.getProperties()); - - bean.setQualifiedName(this.removeQualifiedName(instanceProperties)); - bean.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); - bean.setResourceName(this.removeName(instanceProperties)); - bean.setVersionIdentifier(this.removeVersionIdentifier(instanceProperties)); - bean.setResourceDescription(this.removeDescription(instanceProperties)); - bean.setDeployedImplementationType(this.removeDeployedImplementationType(instanceProperties)); - - /* - * Any remaining properties are returned in the extended properties. They are - * assumed to be defined in a subtype. - */ - bean.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - Relationship relationship, - String methodName) throws PropertyServerException - { - return this.getNewBean(beanClass, entity, methodName); - } -} diff --git a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-server/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/converters/ElementHeaderConverter.java b/open-metadata-implementation/access-services/asset-consumer/asset-consumer-server/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/converters/ElementHeaderConverter.java deleted file mode 100644 index de13881e50d..00000000000 --- a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-server/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/converters/ElementHeaderConverter.java +++ /dev/null @@ -1,100 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetconsumer.converters; - -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; - -/** - * ElementHeaderConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) - * EntityDetail object into a ElementHeader bean. - */ -public class ElementHeaderConverter extends AssetConsumerOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity/relationship objects - * @param serviceName name of this component - * @param serverName local server name - */ - public ElementHeaderConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @SuppressWarnings(value = "unchecked") - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof ElementHeader) - { - if (entity != null) - { - returnBean = (B) this.getMetadataElementHeader(beanClass, entity, methodName); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - Relationship relationship, - String methodName) throws PropertyServerException - { - return getNewBean(beanClass, entity, methodName); - } -} diff --git a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-server/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/converters/InformalTagConverter.java b/open-metadata-implementation/access-services/asset-consumer/asset-consumer-server/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/converters/InformalTagConverter.java deleted file mode 100644 index bddf04c00c4..00000000000 --- a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-server/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/converters/InformalTagConverter.java +++ /dev/null @@ -1,134 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetconsumer.converters; - -import org.odpi.openmetadata.accessservices.assetconsumer.elements.InformalTagElement; -import org.odpi.openmetadata.accessservices.assetconsumer.properties.InformalTagProperties; -import org.odpi.openmetadata.accessservices.assetconsumer.elements.TaggedElement; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; - - -/** - * InformalTagConverter provides common methods for transferring relevant properties from an Open Metadata Repository Services (OMRS) - * EntityDetail object into an InformalTagElement bean. - */ -public class InformalTagConverter extends AssetConsumerOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public InformalTagConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - Relationship relationship, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof InformalTagElement) - { - InformalTagElement bean = (InformalTagElement) returnBean; - InformalTagProperties informalTagProperties = new InformalTagProperties(); - - bean.setElementHeader(super.getMetadataElementHeader(beanClass, entity, methodName)); - - InstanceProperties instanceProperties; - - /* - * The initial set of values come from the entity. - */ - if (entity != null) - { - instanceProperties = new InstanceProperties(entity.getProperties()); - informalTagProperties.setUser(entity.getCreatedBy()); - - informalTagProperties.setName(this.removeTagName(instanceProperties)); - informalTagProperties.setDescription(this.removeTagDescription(instanceProperties)); - informalTagProperties.setIsPrivateTag(! this.removeIsPublic(instanceProperties)); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - - bean.setInformalTagProperties(informalTagProperties); - - if (relationship != null) - { - TaggedElement taggedElement = new TaggedElement(); - - instanceProperties = new InstanceProperties(relationship.getProperties()); - - taggedElement.setRelationshipHeader(super.getMetadataElementHeader(beanClass, relationship, null, methodName)); - taggedElement.setRelatedElement(super.getElementStub(beanClass, relationship.getEntityOneProxy(), methodName)); - taggedElement.setIsPublic(this.getIsPublic(instanceProperties)); - - bean.setTaggedElement(taggedElement); - } - - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - String methodName) throws PropertyServerException - { - return getNewBean(beanClass, entity, null, methodName); - } -} diff --git a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-server/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/converters/package-info.java b/open-metadata-implementation/access-services/asset-consumer/asset-consumer-server/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/converters/package-info.java deleted file mode 100644 index 781dbcba52f..00000000000 --- a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-server/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/converters/package-info.java +++ /dev/null @@ -1,8 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -/** - * Provides the converters that take beans from the repository services (eg entities and relationships) - * and converts them into Asset Consumer OMAS beans to return to the caller. - */ -package org.odpi.openmetadata.accessservices.assetconsumer.converters; diff --git a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-server/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/handlers/LoggingHandler.java b/open-metadata-implementation/access-services/asset-consumer/asset-consumer-server/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/handlers/LoggingHandler.java index e5a112d1d55..da47daddec4 100644 --- a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-server/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/handlers/LoggingHandler.java +++ b/open-metadata-implementation/access-services/asset-consumer/asset-consumer-server/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/handlers/LoggingHandler.java @@ -13,7 +13,7 @@ public class LoggingHandler implements AssetConsumerLoggingInterface { - private AuditLog auditLog; + private final AuditLog auditLog; diff --git a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-server/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/outtopic/AssetConsumerOMRSTopicListener.java b/open-metadata-implementation/access-services/asset-consumer/asset-consumer-server/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/outtopic/AssetConsumerOMRSTopicListener.java index 82f6e80d805..6fe78b900d5 100644 --- a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-server/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/outtopic/AssetConsumerOMRSTopicListener.java +++ b/open-metadata-implementation/access-services/asset-consumer/asset-consumer-server/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/outtopic/AssetConsumerOMRSTopicListener.java @@ -6,6 +6,7 @@ import org.odpi.openmetadata.commonservices.generichandlers.AssetHandler; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.properties.beans.Asset; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.AssetElement; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.repositoryservices.connectors.omrstopic.OMRSTopicListenerBase; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Classification; @@ -30,7 +31,7 @@ public class AssetConsumerOMRSTopicListener extends OMRSTopicListenerBase private static final Logger log = LoggerFactory.getLogger(AssetConsumerOMRSTopicListener.class); private final AssetConsumerOutTopicPublisher eventPublisher; - private final AssetHandler assetHandler; + private final AssetHandler assetHandler; private final String localServerUserId; private final List supportedZones; private final OMRSRepositoryHelper repositoryHelper; @@ -48,7 +49,7 @@ public class AssetConsumerOMRSTopicListener extends OMRSTopicListenerBase public AssetConsumerOMRSTopicListener(String serviceName, String localServerUserId, AssetConsumerOutTopicPublisher eventPublisher, - AssetHandler assetHandler, + AssetHandler assetHandler, List supportedZones, AuditLog auditLog) { diff --git a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-server/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/outtopic/AssetConsumerOutTopicPublisher.java b/open-metadata-implementation/access-services/asset-consumer/asset-consumer-server/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/outtopic/AssetConsumerOutTopicPublisher.java index 0f6ed60068a..29f6adca641 100644 --- a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-server/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/outtopic/AssetConsumerOutTopicPublisher.java +++ b/open-metadata-implementation/access-services/asset-consumer/asset-consumer-server/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/outtopic/AssetConsumerOutTopicPublisher.java @@ -4,12 +4,12 @@ package org.odpi.openmetadata.accessservices.assetconsumer.outtopic; import org.odpi.openmetadata.accessservices.assetconsumer.connectors.outtopic.AssetConsumerOutTopicServerConnector; -import org.odpi.openmetadata.accessservices.assetconsumer.converters.ElementHeaderConverter; import org.odpi.openmetadata.accessservices.assetconsumer.events.AssetConsumerEventType; import org.odpi.openmetadata.accessservices.assetconsumer.events.AssetConsumerOutTopicEvent; import org.odpi.openmetadata.accessservices.assetconsumer.ffdc.AssetConsumerAuditCode; +import org.odpi.openmetadata.commonservices.generichandlers.ElementHeaderConverter; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Classification; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; diff --git a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-server/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/server/AssetConsumerInstanceHandler.java b/open-metadata-implementation/access-services/asset-consumer/asset-consumer-server/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/server/AssetConsumerInstanceHandler.java index dfd35327b67..83dc1adf8f0 100644 --- a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-server/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/server/AssetConsumerInstanceHandler.java +++ b/open-metadata-implementation/access-services/asset-consumer/asset-consumer-server/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/server/AssetConsumerInstanceHandler.java @@ -2,10 +2,8 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.assetconsumer.server; -import org.odpi.openmetadata.accessservices.assetconsumer.elements.*; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; import org.odpi.openmetadata.accessservices.assetconsumer.handlers.LoggingHandler; -import org.odpi.openmetadata.accessservices.assetconsumer.properties.MetadataElement; -import org.odpi.openmetadata.accessservices.assetconsumer.properties.MetadataRelationship; import org.odpi.openmetadata.adminservices.configuration.registration.AccessServiceDescription; import org.odpi.openmetadata.commonservices.generichandlers.*; import org.odpi.openmetadata.commonservices.multitenant.OMASServiceInstanceHandler; @@ -75,11 +73,11 @@ LoggingHandler getLoggingHandler(String userId, * @throws UserNotAuthorizedException user does not have access to the requested server * @throws PropertyServerException error in the requested server */ - AssetHandler getAssetHandler(String userId, - String serverName, - String serviceOperationName) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException + AssetHandler getAssetHandler(String userId, + String serverName, + String serviceOperationName) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException { AssetConsumerServicesInstance instance = (AssetConsumerServicesInstance)super.getServerServiceInstance(userId, @@ -106,9 +104,9 @@ AssetHandler getAssetHandler(String userId, * @throws UserNotAuthorizedException user does not have access to the requested server * @throws PropertyServerException error in the requested server */ - ReferenceableHandler getMetadataElementHandler(String userId, - String serverName, - String serviceOperationName) throws InvalidParameterException, + ReferenceableHandler getMetadataElementHandler(String userId, + String serverName, + String serviceOperationName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { diff --git a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-server/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/server/AssetConsumerRESTServices.java b/open-metadata-implementation/access-services/asset-consumer/asset-consumer-server/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/server/AssetConsumerRESTServices.java index e1771880a5b..8aeb6016f25 100644 --- a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-server/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/server/AssetConsumerRESTServices.java +++ b/open-metadata-implementation/access-services/asset-consumer/asset-consumer-server/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/server/AssetConsumerRESTServices.java @@ -2,23 +2,19 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.assetconsumer.server; -import org.odpi.openmetadata.accessservices.assetconsumer.elements.InformalTagElement; -import org.odpi.openmetadata.accessservices.assetconsumer.elements.MeaningElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; import org.odpi.openmetadata.accessservices.assetconsumer.handlers.LoggingHandler; -import org.odpi.openmetadata.accessservices.assetconsumer.properties.AssetGraph; -import org.odpi.openmetadata.accessservices.assetconsumer.properties.AssetSearchMatches; -import org.odpi.openmetadata.accessservices.assetconsumer.properties.MetadataElement; -import org.odpi.openmetadata.accessservices.assetconsumer.properties.MetadataRelationship; -import org.odpi.openmetadata.accessservices.assetconsumer.rest.*; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.AssetGraph; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.AssetSearchMatches; import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.odpi.openmetadata.commonservices.generichandlers.*; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.Asset; import org.odpi.openmetadata.frameworks.openmetadata.enums.CommentType; import org.odpi.openmetadata.frameworks.openmetadata.enums.StarRating; +import org.odpi.openmetadata.frameworks.openmetadata.properties.feedback.InformalTagProperties; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.rest.AssetsResponse; @@ -68,16 +64,16 @@ public AssetConsumerRESTServices() * UserNotAuthorizedException user not authorized to issue this request or * PropertyServerException problem retrieving the discovery engine definition. */ - public ConnectionResponse getOutTopicConnection(String serverName, - String userId, - String callerId) + public OCFConnectionResponse getOutTopicConnection(String serverName, + String userId, + String callerId) { final String methodName = "getOutTopicConnection"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - ConnectionResponse response = new ConnectionResponse(); - AuditLog auditLog = null; + OCFConnectionResponse response = new OCFConnectionResponse(); + AuditLog auditLog = null; try { @@ -128,7 +124,7 @@ public GUIDResponse getAssetForConnectionName(String serverName, try { - AssetHandler handler = instanceHandler.getAssetHandler(userId, serverName, methodName); + AssetHandler handler = instanceHandler.getAssetHandler(userId, serverName, methodName); auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); @@ -181,17 +177,17 @@ public AssetGraphResponse getAssetGraph(String serverName, try { - AssetHandler assetHandler = instanceHandler.getAssetHandler(userId, serverName, methodName); - ReferenceableHandler metadataElementHandler = instanceHandler.getMetadataElementHandler(userId, serverName, methodName); - ReferenceableHandler metadataRelationshipHandler = instanceHandler.getMetadataRelationshipHandler(userId, serverName, methodName); + AssetHandler assetHandler = instanceHandler.getAssetHandler(userId, serverName, methodName); + ReferenceableHandler metadataElementHandler = instanceHandler.getMetadataElementHandler(userId, serverName, methodName); + ReferenceableHandler metadataRelationshipHandler = instanceHandler.getMetadataRelationshipHandler(userId, serverName, methodName); auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - Asset asset = assetHandler.getBeanFromRepository(userId, - assetGUID, - parameterName, - OpenMetadataType.ASSET.typeName, - methodName); + AssetElement asset = assetHandler.getBeanFromRepository(userId, + assetGUID, + parameterName, + OpenMetadataType.ASSET.typeName, + methodName); if (asset != null) { @@ -200,7 +196,7 @@ public AssetGraphResponse getAssetGraph(String serverName, Map receivedRelationships = new HashMap<>(); List relationships = metadataRelationshipHandler.getAllAttachmentLinks(userId, - asset.getGUID(), + asset.getElementHeader().getGUID(), parameterName, OpenMetadataType.ASSET.typeName, false, @@ -227,7 +223,7 @@ public AssetGraphResponse getAssetGraph(String serverName, PrimitivePropertyValue primitivePropertyValue = new PrimitivePropertyValue(); primitivePropertyValue.setPrimitiveDefCategory(PrimitiveDefCategory.OM_PRIMITIVE_TYPE_STRING); - primitivePropertyValue.setPrimitiveValue(asset.getGUID()); + primitivePropertyValue.setPrimitiveValue(asset.getElementHeader().getGUID()); primitivePropertyValue.setTypeName(PrimitiveDefCategory.OM_PRIMITIVE_TYPE_STRING.getName()); primitivePropertyValue.setTypeGUID(PrimitiveDefCategory.OM_PRIMITIVE_TYPE_STRING.getGUID()); @@ -244,22 +240,22 @@ public AssetGraphResponse getAssetGraph(String serverName, searchClassifications.setMatchCriteria(MatchCriteria.ALL); searchClassifications.setConditions(classificationConditions); - List anchoredElements = metadataElementHandler.findBeans(userId, - null, - null, - null, - null, - searchClassifications, - null, - null, - null, - false, - false, - startFrom, - pageSize, - assetHandler.getSupportedZones(), - new Date(), - methodName); + List anchoredElements = metadataElementHandler.findBeans(userId, + null, + null, + null, + null, + searchClassifications, + null, + null, + null, + false, + false, + startFrom, + pageSize, + assetHandler.getSupportedZones(), + new Date(), + methodName); assetGraph.setAnchoredElements(anchoredElements); @@ -267,7 +263,7 @@ public AssetGraphResponse getAssetGraph(String serverName, { final String anchoredElementParameterName = "anchoredElement.getGUID"; - for (MetadataElement metadataElement : anchoredElements) + for (MetadataElementSummary metadataElement : anchoredElements) { if (metadataElement != null) { @@ -357,8 +353,8 @@ public AssetSearchMatchesListResponse findAssetsInDomain(String try { - AssetHandler assetHandler = instanceHandler.getAssetHandler(userId, serverName, methodName); - ReferenceableHandler metadataElementHandler = instanceHandler.getMetadataElementHandler(userId, serverName, methodName); + AssetHandler assetHandler = instanceHandler.getAssetHandler(userId, serverName, methodName); + ReferenceableHandler metadataElementHandler = instanceHandler.getMetadataElementHandler(userId, serverName, methodName); auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); @@ -503,28 +499,28 @@ public AssetSearchMatchesListResponse findAssetsInDomain(String List assetSearchMatchesList = new ArrayList<>(); - final String parameterName = "assetGUID"; - OpenMetadataAPIGenericConverter converter = metadataElementHandler.getConverter(); + final String parameterName = "assetGUID"; + OpenMetadataAPIGenericConverter converter = metadataElementHandler.getConverter(); for (String assetGUID : organizedEntities.keySet()) { - Asset asset = assetHandler.getBeanFromRepository(userId, - assetGUID, - parameterName, - OpenMetadataType.ASSET.typeName, - methodName); + AssetElement asset = assetHandler.getBeanFromRepository(userId, + assetGUID, + parameterName, + OpenMetadataType.ASSET.typeName, + methodName); if (asset != null) { AssetSearchMatches assetSearchMatches = new AssetSearchMatches(asset); - Map assetEntityMap = organizedEntities.get(assetGUID); - List anchoredElements = new ArrayList<>(); + Map assetEntityMap = organizedEntities.get(assetGUID); + List anchoredElements = new ArrayList<>(); for (EntityDetail anchoredEntity : assetEntityMap.values()) { - MetadataElement metadataElement = converter.getNewBean(MetadataElement.class, - anchoredEntity, - methodName); + MetadataElementSummary metadataElement = converter.getNewBean(MetadataElementSummary.class, + anchoredEntity, + methodName); anchoredElements.add(metadataElement); } @@ -584,7 +580,7 @@ public GUIDListResponse findAssets(String serverName, try { - AssetHandler handler = instanceHandler.getAssetHandler(userId, serverName, methodName); + AssetHandler handler = instanceHandler.getAssetHandler(userId, serverName, methodName); auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); @@ -645,7 +641,7 @@ public GUIDListResponse getAssetsByName(String serverName, try { - AssetHandler handler = instanceHandler.getAssetHandler(userId, serverName, methodName); + AssetHandler handler = instanceHandler.getAssetHandler(userId, serverName, methodName); auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); @@ -710,7 +706,7 @@ public AssetsResponse getAssetsByMetadataCollectionId(String serverName try { - AssetHandler handler = instanceHandler.getAssetHandler(userId, serverName, methodName); + AssetHandler handler = instanceHandler.getAssetHandler(userId, serverName, methodName); auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); @@ -1288,17 +1284,17 @@ public VoidResponse removeCommentFromAsset(String serverName, * PropertyServerException there is a problem retrieving information from the property server(s) or * UserNotAuthorizedException the requesting user is not authorized to issue this request. */ - public GlossaryTermResponse getMeaning(String serverName, - String userId, - String guid) + public MeaningResponse getMeaning(String serverName, + String userId, + String guid) { final String guidParameterName = "guid"; final String methodName = "getMeaning"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - GlossaryTermResponse response = new GlossaryTermResponse(); - AuditLog auditLog = null; + MeaningResponse response = new MeaningResponse(); + AuditLog auditLog = null; try { @@ -1337,18 +1333,18 @@ public GlossaryTermResponse getMeaning(String serverName, * PropertyServerException - there is a problem retrieving information from the property server(s) or * UserNotAuthorizedException - the requesting user is not authorized to issue this request. */ - public GlossaryTermListResponse getMeaningByName(String serverName, - String userId, - NameRequestBody requestBody, - int startFrom, - int pageSize) + public MeaningsResponse getMeaningByName(String serverName, + String userId, + NameRequestBody requestBody, + int startFrom, + int pageSize) { final String methodName = "getMeaningByName"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - GlossaryTermListResponse response = new GlossaryTermListResponse(); - AuditLog auditLog = null; + MeaningsResponse response = new MeaningsResponse(); + AuditLog auditLog = null; try { @@ -1360,7 +1356,7 @@ public GlossaryTermListResponse getMeaningByName(String serverName, { List limitStatuses = new ArrayList<>(); limitStatuses.add(InstanceStatus.ACTIVE); - response.setMeanings(glossaryTermHandler.getTermsByName(userId, + response.setElements(glossaryTermHandler.getTermsByName(userId, null, requestBody.getName(), limitStatuses, @@ -1369,9 +1365,7 @@ public GlossaryTermListResponse getMeaningByName(String serverName, false, false, new Date(), - methodName)); - response.setStartingFromElement(startFrom); - } + methodName));} else { restExceptionHandler.handleNoRequestBody(userId, methodName, serverName); @@ -1401,18 +1395,18 @@ public GlossaryTermListResponse getMeaningByName(String serverName, * PropertyServerException - there is a problem retrieving information from the property server(s) or * UserNotAuthorizedException - the requesting user is not authorized to issue this request. */ - public GlossaryTermListResponse findMeanings(String serverName, - String userId, - SearchStringRequestBody requestBody, - int startFrom, - int pageSize) + public MeaningsResponse findMeanings(String serverName, + String userId, + SearchStringRequestBody requestBody, + int startFrom, + int pageSize) { final String methodName = "findMeanings"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - GlossaryTermListResponse response = new GlossaryTermListResponse(); - AuditLog auditLog = null; + MeaningsResponse response = new MeaningsResponse(); + AuditLog auditLog = null; try { @@ -1424,7 +1418,7 @@ public GlossaryTermListResponse findMeanings(String serverName, { List limitStatuses = new ArrayList<>(); limitStatuses.add(InstanceStatus.ACTIVE); - response.setMeanings(glossaryTermHandler.findTerms(userId, + response.setElements(glossaryTermHandler.findTerms(userId, null, requestBody.getSearchString(), limitStatuses, @@ -1434,7 +1428,6 @@ public GlossaryTermListResponse findMeanings(String serverName, false, new Date(), methodName)); - response.setStartingFromElement(startFrom); } else { @@ -1482,7 +1475,7 @@ public GUIDListResponse getAssetsByMeaning(String serverName, try { - AssetHandler handler = instanceHandler.getAssetHandler(userId, serverName, methodName); + AssetHandler handler = instanceHandler.getAssetHandler(userId, serverName, methodName); auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); @@ -1642,9 +1635,9 @@ public VoidResponse addLogMessageToAsset(String serverName, * PropertyServerException - there is a problem retrieving information from the property server(s) or * UserNotAuthorizedException - the requesting user is not authorized to issue this request. */ - public GUIDResponse createTag(String serverName, - String userId, - TagRequestBody requestBody) + public GUIDResponse createTag(String serverName, + String userId, + InformalTagProperties requestBody) { final String methodName = "createTag"; @@ -1811,30 +1804,30 @@ public VoidResponse deleteTag(String serverName, * PropertyServerException - there is a problem retrieving information from the property server(s) or * UserNotAuthorizedException - the requesting user is not authorized to issue this request. */ - public TagResponse getTag(String serverName, - String userId, - String guid) + public InformalTagResponse getTag(String serverName, + String userId, + String guid) { final String methodName = "getTag"; final String guidParameterName = "guid"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - TagResponse response = new TagResponse(); - AuditLog auditLog = null; + InformalTagResponse response = new InformalTagResponse(); + AuditLog auditLog = null; try { InformalTagHandler handler = instanceHandler.getInformalTagHandler(userId, serverName, methodName); auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - response.setTag(handler.getTag(userId, - guid, - guidParameterName, - false, - false, - new Date(), - methodName)); + response.setElement(handler.getTag(userId, + guid, + guidParameterName, + false, + false, + new Date(), + methodName)); } catch (Exception error) { @@ -1860,19 +1853,19 @@ public TagResponse getTag(String serverName, * PropertyServerException - there is a problem retrieving information from the property server(s) or * UserNotAuthorizedException - the requesting user is not authorized to issue this request. */ - public TagsResponse getTagsByName(String serverName, - String userId, - NameRequestBody requestBody, - int startFrom, - int pageSize) + public InformalTagsResponse getTagsByName(String serverName, + String userId, + NameRequestBody requestBody, + int startFrom, + int pageSize) { final String methodName = "getTagsByName"; final String nameParameterName = "tagName"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - TagsResponse response = new TagsResponse(); - AuditLog auditLog = null; + InformalTagsResponse response = new InformalTagsResponse(); + AuditLog auditLog = null; try { @@ -1882,16 +1875,15 @@ public TagsResponse getTagsByName(String serverName, if (requestBody != null) { - response.setTags(handler.getTagsByName(userId, - requestBody.getName(), - nameParameterName, - startFrom, - pageSize, - false, - false, - new Date(), - methodName)); - response.setStartingFromElement(startFrom); + response.setElements(handler.getTagsByName(userId, + requestBody.getName(), + nameParameterName, + startFrom, + pageSize, + false, + false, + new Date(), + methodName)); } else { @@ -1922,19 +1914,19 @@ public TagsResponse getTagsByName(String serverName, * PropertyServerException - there is a problem retrieving information from the property server(s) or * UserNotAuthorizedException - the requesting user is not authorized to issue this request. */ - public TagsResponse getMyTagsByName(String serverName, - String userId, - NameRequestBody requestBody, - int startFrom, - int pageSize) + public InformalTagsResponse getMyTagsByName(String serverName, + String userId, + NameRequestBody requestBody, + int startFrom, + int pageSize) { final String methodName = "getMyTagsByName"; final String nameParameterName = "tagName"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - TagsResponse response = new TagsResponse(); - AuditLog auditLog = null; + InformalTagsResponse response = new InformalTagsResponse(); + AuditLog auditLog = null; try { @@ -1944,16 +1936,15 @@ public TagsResponse getMyTagsByName(String serverName, if (requestBody != null) { - response.setTags(handler.getMyTagsByName(userId, - requestBody.getName(), - nameParameterName, - startFrom, - pageSize, - false, - false, - new Date(), - methodName)); - response.setStartingFromElement(startFrom); + response.setElements(handler.getMyTagsByName(userId, + requestBody.getName(), + nameParameterName, + startFrom, + pageSize, + false, + false, + new Date(), + methodName)); } else { @@ -1984,19 +1975,19 @@ public TagsResponse getMyTagsByName(String serverName, * PropertyServerException - there is a problem retrieving information from the property server(s) or * UserNotAuthorizedException - the requesting user is not authorized to issue this request. */ - public TagsResponse findTags(String serverName, - String userId, - SearchStringRequestBody requestBody, - int startFrom, - int pageSize) + public InformalTagsResponse findTags(String serverName, + String userId, + SearchStringRequestBody requestBody, + int startFrom, + int pageSize) { final String methodName = "findTags"; final String nameParameterName = "tagName"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - TagsResponse response = new TagsResponse(); - AuditLog auditLog = null; + InformalTagsResponse response = new InformalTagsResponse(); + AuditLog auditLog = null; try { @@ -2006,16 +1997,15 @@ public TagsResponse findTags(String serverName, if (requestBody != null) { - response.setTags(handler.findTags(userId, - requestBody.getSearchString(), - nameParameterName, - startFrom, - pageSize, - false, - false, - new Date(), - methodName)); - response.setStartingFromElement(startFrom); + response.setElements(handler.findTags(userId, + requestBody.getSearchString(), + nameParameterName, + startFrom, + pageSize, + false, + false, + new Date(), + methodName)); } else { @@ -2046,19 +2036,19 @@ public TagsResponse findTags(String serverName, * PropertyServerException - there is a problem retrieving information from the property server(s) or * UserNotAuthorizedException - the requesting user is not authorized to issue this request. */ - public TagsResponse findMyTags(String serverName, - String userId, - SearchStringRequestBody requestBody, - int startFrom, - int pageSize) + public InformalTagsResponse findMyTags(String serverName, + String userId, + SearchStringRequestBody requestBody, + int startFrom, + int pageSize) { final String methodName = "findMyTags"; final String nameParameterName = "tagName"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - TagsResponse response = new TagsResponse(); - AuditLog auditLog = null; + InformalTagsResponse response = new InformalTagsResponse(); + AuditLog auditLog = null; try { @@ -2068,16 +2058,15 @@ public TagsResponse findMyTags(String serverName, if (requestBody != null) { - response.setTags(handler.findMyTags(userId, - requestBody.getSearchString(), - nameParameterName, - startFrom, - pageSize, - false, - false, - new Date(), - methodName)); - response.setStartingFromElement(startFrom); + response.setElements(handler.findMyTags(userId, + requestBody.getSearchString(), + nameParameterName, + startFrom, + pageSize, + false, + false, + new Date(), + methodName)); } else { @@ -2382,7 +2371,7 @@ public GUIDListResponse getAssetsByTag(String serverName, try { - AssetHandler handler = instanceHandler.getAssetHandler(userId, serverName, methodName); + AssetHandler handler = instanceHandler.getAssetHandler(userId, serverName, methodName); auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); response.setGUIDs(handler.getAssetGUIDsByTag(userId, diff --git a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-server/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/server/AssetConsumerServicesInstance.java b/open-metadata-implementation/access-services/asset-consumer/asset-consumer-server/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/server/AssetConsumerServicesInstance.java index 9cc206dd5a2..b9eff19722a 100644 --- a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-server/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/server/AssetConsumerServicesInstance.java +++ b/open-metadata-implementation/access-services/asset-consumer/asset-consumer-server/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/server/AssetConsumerServicesInstance.java @@ -3,19 +3,20 @@ package org.odpi.openmetadata.accessservices.assetconsumer.server; import org.odpi.openmetadata.accessservices.assetconsumer.connectors.outtopic.AssetConsumerOutTopicClientProvider; -import org.odpi.openmetadata.accessservices.assetconsumer.converters.*; -import org.odpi.openmetadata.accessservices.assetconsumer.elements.*; +import org.odpi.openmetadata.commonservices.generichandlers.MeaningConverter; +import org.odpi.openmetadata.commonservices.generichandlers.MetadataElementConverter; +import org.odpi.openmetadata.commonservices.generichandlers.MetadataRelationshipConverter; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; import org.odpi.openmetadata.accessservices.assetconsumer.ffdc.AssetConsumerErrorCode; import org.odpi.openmetadata.accessservices.assetconsumer.handlers.LoggingHandler; -import org.odpi.openmetadata.accessservices.assetconsumer.properties.MetadataElement; -import org.odpi.openmetadata.accessservices.assetconsumer.properties.MetadataRelationship; import org.odpi.openmetadata.adminservices.configuration.registration.AccessServiceDescription; +import org.odpi.openmetadata.commonservices.generichandlers.AssetConverter; +import org.odpi.openmetadata.commonservices.generichandlers.InformalTagConverter; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.commonservices.generichandlers.*; import org.odpi.openmetadata.commonservices.multitenant.OMASServiceInstance; import org.odpi.openmetadata.commonservices.multitenant.ffdc.exceptions.NewInstanceException; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.Asset; import org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryConnector; @@ -29,8 +30,8 @@ public class AssetConsumerServicesInstance extends OMASServiceInstance { private final static AccessServiceDescription myDescription = AccessServiceDescription.ASSET_CONSUMER_OMAS; - private final AssetHandler assetHandler; - private final ReferenceableHandler metadataElementHandler; + private final AssetHandler assetHandler; + private final ReferenceableHandler metadataElementHandler; private final ReferenceableHandler metadataRelationshipHandler; private final CommentHandler commentHandler; private final ConnectionHandler connectionHandler; @@ -85,7 +86,7 @@ public AssetConsumerServicesInstance(OMRSRepositoryConnector repositoryConnector new OpenMetadataAPIDummyBeanConverter<>(repositoryHelper, serviceName, serverName); this.assetHandler = new AssetHandler<>(new AssetConverter<>(repositoryHelper, serviceName, serverName), - Asset.class, + AssetElement.class, serviceName, serverName, invalidParameterHandler, @@ -101,7 +102,7 @@ public AssetConsumerServicesInstance(OMRSRepositoryConnector repositoryConnector this.metadataElementHandler = new ReferenceableHandler<>(new MetadataElementConverter<>(repositoryHelper, serviceName, serverName), - MetadataElement.class, + MetadataElementSummary.class, serviceName, serverName, invalidParameterHandler, @@ -239,7 +240,7 @@ LoggingHandler getLoggingHandler() * @return handler object * @throws PropertyServerException the instance has not been initialized successfully */ - public AssetHandler getAssetHandler() throws PropertyServerException + public AssetHandler getAssetHandler() throws PropertyServerException { final String methodName = "getAssetHandler"; @@ -255,7 +256,7 @@ public AssetHandler getAssetHandler() throws PropertyServerException * @return handler object * @throws PropertyServerException the instance has not been initialized successfully */ - public ReferenceableHandler getMetadataElementHandler() throws PropertyServerException + public ReferenceableHandler getMetadataElementHandler() throws PropertyServerException { final String methodName = "getMetadataElementHandler"; diff --git a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-spring/build.gradle b/open-metadata-implementation/access-services/asset-consumer/asset-consumer-spring/build.gradle index d3e3a769723..4670a209807 100644 --- a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-spring/build.gradle +++ b/open-metadata-implementation/access-services/asset-consumer/asset-consumer-spring/build.gradle @@ -6,6 +6,7 @@ dependencies { implementation project(':open-metadata-implementation:common-services:ffdc-services') + implementation project(':open-metadata-implementation:frameworks:open-metadata-framework') implementation project(':open-metadata-implementation:framework-services:ocf-metadata-management:ocf-metadata-api') implementation project(':open-metadata-implementation:access-services:asset-consumer:asset-consumer-api') implementation project(':open-metadata-implementation:access-services:asset-consumer:asset-consumer-server') diff --git a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-spring/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/server/spring/AssetConsumerResource.java b/open-metadata-implementation/access-services/asset-consumer/asset-consumer-spring/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/server/spring/AssetConsumerResource.java index d1ecc46233c..1abe12b8281 100644 --- a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-spring/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/server/spring/AssetConsumerResource.java +++ b/open-metadata-implementation/access-services/asset-consumer/asset-consumer-spring/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/server/spring/AssetConsumerResource.java @@ -5,11 +5,11 @@ import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.accessservices.assetconsumer.rest.CommentRequestBody; -import org.odpi.openmetadata.accessservices.assetconsumer.rest.RatingRequestBody; -import org.odpi.openmetadata.accessservices.assetconsumer.rest.*; +import org.odpi.openmetadata.commonservices.ffdc.rest.CommentRequestBody; +import org.odpi.openmetadata.commonservices.ffdc.rest.RatingRequestBody; import org.odpi.openmetadata.accessservices.assetconsumer.server.AssetConsumerRESTServices; import org.odpi.openmetadata.commonservices.ffdc.rest.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.feedback.InformalTagProperties; import org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.rest.AssetsResponse; import org.springframework.web.bind.annotation.*; @@ -57,9 +57,9 @@ public AssetConsumerResource() externalDocs=@ExternalDocumentation(description="Out Topics", url="https://egeria-project.org/concepts/out-topic/")) - public ConnectionResponse getOutTopicConnection(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String callerId) + public OCFConnectionResponse getOutTopicConnection(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String callerId) { return restAPI.getOutTopicConnection(serverName, userId, callerId); } @@ -301,9 +301,9 @@ public VoidResponse addTagToElement(@PathVariable String serverName externalDocs=@ExternalDocumentation(description="Informal Tag", url="https://egeria-project.org/concepts/informal-tag/")) - public GUIDResponse createTag(@PathVariable String serverName, - @PathVariable String userId, - @RequestBody TagRequestBody requestBody) + public GUIDResponse createTag(@PathVariable String serverName, + @PathVariable String userId, + @RequestBody InformalTagProperties requestBody) { return restAPI.createTag(serverName, userId, requestBody); } @@ -616,11 +616,11 @@ public GUIDListResponse getAssetsByTag(@PathVariable String serverName, externalDocs=@ExternalDocumentation(description="Glossaries", url="https://egeria-project.org/practices/common-data-definitions/anatomy-of-a-glossary/")) - public GlossaryTermListResponse getMeaningByName(@PathVariable String serverName, - @PathVariable String userId, - @RequestParam int startFrom, - @RequestParam int pageSize, - @RequestBody NameRequestBody requestBody) + public MeaningsResponse getMeaningByName(@PathVariable String serverName, + @PathVariable String userId, + @RequestParam int startFrom, + @RequestParam int pageSize, + @RequestBody NameRequestBody requestBody) { return restAPI.getMeaningByName(serverName, userId, requestBody, startFrom, pageSize); } @@ -646,11 +646,11 @@ public GlossaryTermListResponse getMeaningByName(@PathVariable String s externalDocs=@ExternalDocumentation(description="Glossaries", url="https://egeria-project.org/practices/common-data-definitions/anatomy-of-a-glossary/")) - public GlossaryTermListResponse findMeanings(@PathVariable String serverName, - @PathVariable String userId, - @RequestParam int startFrom, - @RequestParam int pageSize, - @RequestBody SearchStringRequestBody requestBody) + public MeaningsResponse findMeanings(@PathVariable String serverName, + @PathVariable String userId, + @RequestParam int startFrom, + @RequestParam int pageSize, + @RequestBody SearchStringRequestBody requestBody) { return restAPI.findMeanings(serverName, userId, requestBody, startFrom, pageSize); } @@ -675,9 +675,9 @@ public GlossaryTermListResponse findMeanings(@PathVariable String externalDocs=@ExternalDocumentation(description="Glossaries", url="https://egeria-project.org/practices/common-data-definitions/anatomy-of-a-glossary/")) - public GlossaryTermResponse getMeaning(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String termGUID) + public MeaningResponse getMeaning(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String termGUID) { return restAPI.getMeaning(serverName, userId, termGUID); } @@ -702,9 +702,9 @@ public GlossaryTermResponse getMeaning(@PathVariable String serverName, externalDocs=@ExternalDocumentation(description="Informal Tag", url="https://egeria-project.org/concepts/informal-tag/")) - public TagResponse getTag(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String tagGUID) + public InformalTagResponse getTag(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String tagGUID) { return restAPI.getTag(serverName, userId, tagGUID); } @@ -730,11 +730,11 @@ public TagResponse getTag(@PathVariable String serverName, externalDocs=@ExternalDocumentation(description="Informal Tag", url="https://egeria-project.org/concepts/informal-tag/")) - public TagsResponse getTagsByName(@PathVariable String serverName, - @PathVariable String userId, - @RequestParam int startFrom, - @RequestParam int pageSize, - @RequestBody NameRequestBody requestBody) + public InformalTagsResponse getTagsByName(@PathVariable String serverName, + @PathVariable String userId, + @RequestParam int startFrom, + @RequestParam int pageSize, + @RequestBody NameRequestBody requestBody) { return restAPI.getTagsByName(serverName, userId, requestBody, startFrom, pageSize); } @@ -760,11 +760,11 @@ public TagsResponse getTagsByName(@PathVariable String serverName, externalDocs=@ExternalDocumentation(description="Informal Tag", url="https://egeria-project.org/concepts/informal-tag/")) - public TagsResponse getMyTagsByName(@PathVariable String serverName, - @PathVariable String userId, - @RequestParam int startFrom, - @RequestParam int pageSize, - @RequestBody NameRequestBody requestBody) + public InformalTagsResponse getMyTagsByName(@PathVariable String serverName, + @PathVariable String userId, + @RequestParam int startFrom, + @RequestParam int pageSize, + @RequestBody NameRequestBody requestBody) { return restAPI.getMyTagsByName(serverName, userId, requestBody, startFrom, pageSize); } @@ -790,11 +790,11 @@ public TagsResponse getMyTagsByName(@PathVariable String serverName, externalDocs=@ExternalDocumentation(description="Informal Tag", url="https://egeria-project.org/concepts/informal-tag/")) - public TagsResponse findTags(@PathVariable String serverName, - @PathVariable String userId, - @RequestParam int startFrom, - @RequestParam int pageSize, - @RequestBody SearchStringRequestBody requestBody) + public InformalTagsResponse findTags(@PathVariable String serverName, + @PathVariable String userId, + @RequestParam int startFrom, + @RequestParam int pageSize, + @RequestBody SearchStringRequestBody requestBody) { return restAPI.findTags(serverName, userId, requestBody, startFrom, pageSize); } @@ -820,11 +820,11 @@ public TagsResponse findTags(@PathVariable String serverName, externalDocs=@ExternalDocumentation(description="Informal Tag", url="https://egeria-project.org/concepts/informal-tag/")) - public TagsResponse findMyTags(@PathVariable String serverName, - @PathVariable String userId, - @RequestParam int startFrom, - @RequestParam int pageSize, - @RequestBody SearchStringRequestBody requestBody) + public InformalTagsResponse findMyTags(@PathVariable String serverName, + @PathVariable String userId, + @RequestParam int startFrom, + @RequestParam int pageSize, + @RequestBody SearchStringRequestBody requestBody) { return restAPI.findMyTags(serverName, userId, requestBody, startFrom, pageSize); } diff --git a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-topic-connectors/build.gradle b/open-metadata-implementation/access-services/asset-consumer/asset-consumer-topic-connectors/build.gradle index 0cf163f6dd9..1b2c96fd6d0 100644 --- a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-topic-connectors/build.gradle +++ b/open-metadata-implementation/access-services/asset-consumer/asset-consumer-topic-connectors/build.gradle @@ -6,6 +6,7 @@ dependencies { implementation project(':open-metadata-implementation:frameworks:audit-log-framework') + implementation project(':open-metadata-implementation:frameworks:open-metadata-framework') implementation project(':open-metadata-implementation:frameworks:open-connector-framework') implementation project(':open-metadata-implementation:repository-services:repository-services-apis') implementation project(':open-metadata-implementation:access-services:asset-consumer:asset-consumer-api') diff --git a/open-metadata-implementation/access-services/asset-lineage/asset-lineage-server/src/main/java/org/odpi/openmetadata/accessservices/assetlineage/server/AssetLineageRestServices.java b/open-metadata-implementation/access-services/asset-lineage/asset-lineage-server/src/main/java/org/odpi/openmetadata/accessservices/assetlineage/server/AssetLineageRestServices.java index b9fc700d197..064dff756be 100644 --- a/open-metadata-implementation/access-services/asset-lineage/asset-lineage-server/src/main/java/org/odpi/openmetadata/accessservices/assetlineage/server/AssetLineageRestServices.java +++ b/open-metadata-implementation/access-services/asset-lineage/asset-lineage-server/src/main/java/org/odpi/openmetadata/accessservices/assetlineage/server/AssetLineageRestServices.java @@ -16,7 +16,7 @@ import org.odpi.openmetadata.accessservices.assetlineage.model.RelationshipsContext; import org.odpi.openmetadata.accessservices.assetlineage.outtopic.AssetLineagePublisher; import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; -import org.odpi.openmetadata.commonservices.ffdc.rest.ConnectionResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.OCFConnectionResponse; import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDListResponse; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException; @@ -347,13 +347,13 @@ private List getEntityGUIDsFromAssetContext(RelationshipsContext assetCo * UserNotAuthorizedException user not authorized to issue this request or * PropertyServerException problem retrieving the discovery engine definition. */ - public ConnectionResponse getOutTopicConnection(String serverName, - String userId, - String callerId) + public OCFConnectionResponse getOutTopicConnection(String serverName, + String userId, + String callerId) { - final String methodName = "getOutTopicConnection"; - ConnectionResponse response = new ConnectionResponse(); - AuditLog auditLog = null; + final String methodName = "getOutTopicConnection"; + OCFConnectionResponse response = new OCFConnectionResponse(); + AuditLog auditLog = null; try { diff --git a/open-metadata-implementation/access-services/asset-lineage/asset-lineage-spring/src/main/java/org/odpi/openmetadata/accessservices/assetlineage/server/spring/AssetLineageResource.java b/open-metadata-implementation/access-services/asset-lineage/asset-lineage-spring/src/main/java/org/odpi/openmetadata/accessservices/assetlineage/server/spring/AssetLineageResource.java index 41d736b178c..e78357ec0fe 100644 --- a/open-metadata-implementation/access-services/asset-lineage/asset-lineage-spring/src/main/java/org/odpi/openmetadata/accessservices/assetlineage/server/spring/AssetLineageResource.java +++ b/open-metadata-implementation/access-services/asset-lineage/asset-lineage-spring/src/main/java/org/odpi/openmetadata/accessservices/assetlineage/server/spring/AssetLineageResource.java @@ -7,7 +7,7 @@ import io.swagger.v3.oas.annotations.tags.Tag; import org.odpi.openmetadata.accessservices.assetlineage.model.FindEntitiesParameters; import org.odpi.openmetadata.accessservices.assetlineage.server.AssetLineageRestServices; -import org.odpi.openmetadata.commonservices.ffdc.rest.ConnectionResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.OCFConnectionResponse; import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDListResponse; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.SequencingOrder; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceStatus; @@ -140,9 +140,9 @@ public GUIDListResponse publishAssetContext(@PathVariable String serverName, description = "Return the connection object for the Asset Lineage's OMAS's out topic.", externalDocs = @ExternalDocumentation(description = "Asset Lineage - Out Topic Connection", url = "https://egeria-project.org/services/omas/asset-lineage/overview/#out-topic-connection")) - public ConnectionResponse getOutTopicConnection(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String callerId) + public OCFConnectionResponse getOutTopicConnection(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String callerId) { return restAPI.getOutTopicConnection(serverName, userId, callerId); } diff --git a/open-metadata-implementation/access-services/asset-lineage/asset-lineage-topic-connectors/build.gradle b/open-metadata-implementation/access-services/asset-lineage/asset-lineage-topic-connectors/build.gradle index aa401363d33..1558b4d457e 100644 --- a/open-metadata-implementation/access-services/asset-lineage/asset-lineage-topic-connectors/build.gradle +++ b/open-metadata-implementation/access-services/asset-lineage/asset-lineage-topic-connectors/build.gradle @@ -10,6 +10,7 @@ dependencies { implementation project(':open-metadata-implementation:common-services:ffdc-services') implementation project(':open-metadata-implementation:repository-services:repository-services-apis') implementation project(':open-metadata-implementation:frameworks:open-connector-framework') + implementation project(':open-metadata-implementation:frameworks:open-metadata-framework') implementation project(':open-metadata-implementation:frameworks:audit-log-framework') implementation 'org.slf4j:slf4j-api' compileOnly 'com.fasterxml.jackson.core:jackson-annotations' diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/api/ExternalIdentifierManagerInterface.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/api/ExternalIdentifierManagerInterface.java index 07123449b61..0e43b9f34ea 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/api/ExternalIdentifierManagerInterface.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/api/ExternalIdentifierManagerInterface.java @@ -5,7 +5,7 @@ import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; import org.odpi.openmetadata.frameworks.governanceaction.properties.ExternalIdentifierProperties; import java.util.List; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/api/exchange/CollaborationExchangeInterface.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/api/exchange/CollaborationExchangeInterface.java index 18cbfbe20dc..0d724e8bca8 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/api/exchange/CollaborationExchangeInterface.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/api/exchange/CollaborationExchangeInterface.java @@ -6,16 +6,11 @@ import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.InformalTagElement; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.NoteElement; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.NoteLogElement; -import org.odpi.openmetadata.accessservices.assetmanager.properties.CommentProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.FeedbackProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.NoteLogProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.NoteProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.RatingProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.TagProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; import org.odpi.openmetadata.frameworks.governanceaction.properties.ExternalIdentifierProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.feedback.*; import java.util.Date; import java.util.List; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/api/exchange/ConnectionExchangeInterface.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/api/exchange/ConnectionExchangeInterface.java index 0e9ddd136b1..fea88c2db16 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/api/exchange/ConnectionExchangeInterface.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/api/exchange/ConnectionExchangeInterface.java @@ -11,6 +11,11 @@ import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; import org.odpi.openmetadata.frameworks.governanceaction.properties.ExternalIdentifierProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.AssetConnectionProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.ConnectionProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.ConnectorTypeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.EndpointProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.EmbeddedConnectionProperties; import java.util.Date; import java.util.List; @@ -331,7 +336,7 @@ void setupAssetConnection(String userId, boolean assetManagerIsHome, String assetGUID, String connectionGUID, - AssetConnectionProperties properties, + AssetConnectionProperties properties, Date effectiveTime, boolean forLineage, boolean forDuplicateProcessing) throws InvalidParameterException, diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/api/exchange/DataAssetExchangeInterface.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/api/exchange/DataAssetExchangeInterface.java index 3c374089bff..877924976a1 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/api/exchange/DataAssetExchangeInterface.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/api/exchange/DataAssetExchangeInterface.java @@ -4,14 +4,14 @@ import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.DataAssetElement; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.RelationshipElement; -import org.odpi.openmetadata.accessservices.assetmanager.properties.DataAssetProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.RelationshipProperties; import org.odpi.openmetadata.accessservices.assetmanager.properties.TemplateProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; import org.odpi.openmetadata.frameworks.governanceaction.properties.ExternalIdentifierProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.RelationshipElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.*; import java.util.Date; import java.util.List; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/api/exchange/ExternalAssetManagerInterface.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/api/exchange/ExternalAssetManagerInterface.java index ce246bfe331..74ed051371c 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/api/exchange/ExternalAssetManagerInterface.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/api/exchange/ExternalAssetManagerInterface.java @@ -2,7 +2,7 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.assetmanager.api.exchange; -import org.odpi.openmetadata.accessservices.assetmanager.properties.AssetManagerProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities.AssetManagerProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/api/exchange/ExternalReferencesInterface.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/api/exchange/ExternalReferencesInterface.java index e948baf0088..bb701947f51 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/api/exchange/ExternalReferencesInterface.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/api/exchange/ExternalReferencesInterface.java @@ -5,12 +5,12 @@ import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.ExternalReferenceElement; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.ExternalReferenceLinkElement; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ExternalReferenceLinkProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ExternalReferenceProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; import org.odpi.openmetadata.frameworks.governanceaction.properties.ExternalIdentifierProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.externalreferences.ExternalReferenceLinkProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.externalreferences.ExternalReferenceProperties; import java.util.Date; import java.util.List; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/api/exchange/GlossaryExchangeInterface.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/api/exchange/GlossaryExchangeInterface.java index b33edcd964d..a978dfece00 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/api/exchange/GlossaryExchangeInterface.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/api/exchange/GlossaryExchangeInterface.java @@ -4,12 +4,16 @@ import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.*; import org.odpi.openmetadata.accessservices.assetmanager.properties.*; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ActivityDescriptionProperties; +import org.odpi.openmetadata.frameworks.openmetadata.enums.GlossaryTermStatus; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ExternalGlossaryLinkElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ArchiveProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.glossaries.*; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; import org.odpi.openmetadata.frameworks.governanceaction.properties.ExternalIdentifierProperties; import org.odpi.openmetadata.frameworks.openmetadata.enums.GlossaryTermRelationshipStatus; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.DataFieldValuesProperties; import java.util.Date; import java.util.List; @@ -1083,7 +1087,7 @@ String createGlossaryTermFromTemplate(String userId, String templateGUID, ExternalIdentifierProperties externalIdentifierProperties, boolean deepCopy, - GlossaryTermStatus initialStatus, + GlossaryTermStatus initialStatus, TemplateProperties templateProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/api/exchange/GovernanceExchangeInterface.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/api/exchange/GovernanceExchangeInterface.java index 4e03b240b3c..9d17e783543 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/api/exchange/GovernanceExchangeInterface.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/api/exchange/GovernanceExchangeInterface.java @@ -3,11 +3,11 @@ package org.odpi.openmetadata.accessservices.assetmanager.api.exchange; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.GovernanceDefinitionElement; -import org.odpi.openmetadata.accessservices.assetmanager.properties.GovernanceDefinitionProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; import org.odpi.openmetadata.frameworks.governanceaction.properties.ExternalIdentifierProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.GovernanceDefinitionProperties; /** * The GovernanceExchangeInterface enables the exchange of governance definitions between an external asset manager and open metadata. diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/api/exchange/LineageExchangeInterface.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/api/exchange/LineageExchangeInterface.java index eb3bda35a77..a537113eb12 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/api/exchange/LineageExchangeInterface.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/api/exchange/LineageExchangeInterface.java @@ -2,12 +2,17 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.assetmanager.api.exchange; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.*; +import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.PortElement; +import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.ProcessElement; import org.odpi.openmetadata.accessservices.assetmanager.properties.*; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; import org.odpi.openmetadata.frameworks.governanceaction.properties.ExternalIdentifierProperties; +import org.odpi.openmetadata.frameworks.openmetadata.enums.*; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.processes.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.lineage.*; import java.util.Date; import java.util.List; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/api/exchange/SchemaExchangeInterface.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/api/exchange/SchemaExchangeInterface.java index 94d01216dce..ad0ce745a0f 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/api/exchange/SchemaExchangeInterface.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/api/exchange/SchemaExchangeInterface.java @@ -8,9 +8,11 @@ import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; import org.odpi.openmetadata.frameworks.governanceaction.properties.ExternalIdentifierProperties; -import org.odpi.openmetadata.frameworks.openmetadata.enums.KeyPattern; +import org.odpi.openmetadata.frameworks.openmetadata.enums.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.*; import java.util.Date; import java.util.List; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/api/exchange/StewardshipExchangeInterface.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/api/exchange/StewardshipExchangeInterface.java index 3fe8e3e56e7..4f17b764fba 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/api/exchange/StewardshipExchangeInterface.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/api/exchange/StewardshipExchangeInterface.java @@ -5,21 +5,15 @@ import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.AssetElement; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.GlossaryTermElement; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.GovernanceDefinitionElement; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.RelatedElement; -import org.odpi.openmetadata.accessservices.assetmanager.properties.AssetOriginProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.DataFieldQueryProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.DataFieldValuesProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.FindAssetOriginProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.GovernanceClassificationProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.OwnerProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.RetentionClassificationProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.SecurityTagsProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.SemanticAssignmentProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.SubjectAreaMemberProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.RelatedElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.AssetOriginProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.*; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.security.SecurityTagsProperties; import java.util.Date; import java.util.List; @@ -789,17 +783,17 @@ List getAssetsByOrigin(String userId, * @throws UserNotAuthorizedException the user is not authorized to issue this request * @throws PropertyServerException there is a problem reported in the open metadata server(s) */ - void addElementToSubjectArea(String userId, - String assetManagerGUID, - String assetManagerName, - String elementGUID, - String externalIdentifier, - SubjectAreaMemberProperties properties, - Date effectiveTime, - boolean forLineage, - boolean forDuplicateProcessing) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException; + void addElementToSubjectArea(String userId, + String assetManagerGUID, + String assetManagerName, + String elementGUID, + String externalIdentifier, + SubjectAreaClassificationProperties properties, + Date effectiveTime, + boolean forLineage, + boolean forDuplicateProcessing) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException; /** diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/api/exchange/ValidValuesExchangeInterface.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/api/exchange/ValidValuesExchangeInterface.java index 4a95611d5c3..3e49d9fce35 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/api/exchange/ValidValuesExchangeInterface.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/api/exchange/ValidValuesExchangeInterface.java @@ -2,17 +2,14 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.assetmanager.api.exchange; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.ReferenceValueAssignmentDefinitionElement; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.ReferenceValueAssignmentItemElement; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.ValidValueElement; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.ValidValueMember; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ReferenceValueAssignmentProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ValidValueMembershipProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ValidValueProperties; +import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.*; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; import org.odpi.openmetadata.frameworks.governanceaction.properties.ExternalIdentifierProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues.ReferenceValueAssignmentProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues.ValidValueMembershipProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues.ValidValueProperties; import java.util.Date; import java.util.List; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/api/management/CollaborationManagementInterface.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/api/management/CollaborationManagementInterface.java index dc64c343cdb..b2e9df98c65 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/api/management/CollaborationManagementInterface.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/api/management/CollaborationManagementInterface.java @@ -6,15 +6,10 @@ import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.InformalTagElement; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.NoteElement; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.NoteLogElement; -import org.odpi.openmetadata.accessservices.assetmanager.properties.CommentProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.FeedbackProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.NoteLogProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.NoteProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.RatingProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.TagProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.properties.feedback.*; import java.util.Date; import java.util.List; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/api/management/GlossaryManagementInterface.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/api/management/GlossaryManagementInterface.java index c39b6b94f6b..faa62693789 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/api/management/GlossaryManagementInterface.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/api/management/GlossaryManagementInterface.java @@ -2,27 +2,15 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.assetmanager.api.management; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.ExternalGlossaryLinkElement; +import org.odpi.openmetadata.frameworks.openmetadata.enums.GlossaryTermStatus; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ExternalGlossaryLinkElement; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.GlossaryCategoryElement; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.GlossaryElement; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.GlossaryTermElement; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ArchiveProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.CanonicalVocabularyProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.DataFieldValuesProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.EditingGlossaryProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ExternalGlossaryElementLinkProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ExternalGlossaryLinkProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.GlossaryCategoryProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.GlossaryProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.GlossaryTermCategorization; -import org.odpi.openmetadata.accessservices.assetmanager.properties.GlossaryTermContextDefinition; -import org.odpi.openmetadata.accessservices.assetmanager.properties.GlossaryTermProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.GlossaryTermRelationship; -import org.odpi.openmetadata.accessservices.assetmanager.properties.GlossaryTermStatus; -import org.odpi.openmetadata.accessservices.assetmanager.properties.StagingGlossaryProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.TaxonomyProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ArchiveProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.glossaries.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.*; import org.odpi.openmetadata.accessservices.assetmanager.properties.TemplateProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ActivityDescriptionProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/api/management/StewardshipManagementInterface.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/api/management/StewardshipManagementInterface.java index 9d48c1be709..e415f6bf377 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/api/management/StewardshipManagementInterface.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/api/management/StewardshipManagementInterface.java @@ -5,21 +5,17 @@ import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.AssetElement; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.GlossaryTermElement; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.GovernanceDefinitionElement; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.RelatedElement; -import org.odpi.openmetadata.accessservices.assetmanager.properties.AssetOriginProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.DataFieldQueryProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.DataFieldValuesProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.FindAssetOriginProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.GovernanceClassificationProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.OwnerProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.RetentionClassificationProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.SecurityTagsProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.SemanticAssignmentProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.SubjectAreaMemberProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.AssetOriginProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.FindAssetOriginProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.OwnerProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.security.*; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; import java.util.Date; import java.util.List; @@ -658,14 +654,14 @@ List getAssetsByOrigin(String userId, * @throws UserNotAuthorizedException the user is not authorized to issue this request * @throws PropertyServerException there is a problem reported in the open metadata server(s) */ - void addElementToSubjectArea(String userId, - String elementGUID, - SubjectAreaMemberProperties properties, - Date effectiveTime, - boolean forLineage, - boolean forDuplicateProcessing) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException; + void addElementToSubjectArea(String userId, + String elementGUID, + SubjectAreaClassificationProperties properties, + Date effectiveTime, + boolean forLineage, + boolean forDuplicateProcessing) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException; /** diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/events/AssetManagerOutTopicEvent.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/events/AssetManagerOutTopicEvent.java index 249ed43ee86..44b7e28020a 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/events/AssetManagerOutTopicEvent.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/events/AssetManagerOutTopicEvent.java @@ -3,7 +3,7 @@ package org.odpi.openmetadata.accessservices.assetmanager.events; import com.fasterxml.jackson.annotation.*; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; import java.util.Date; import java.util.Map; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/AssetElement.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/AssetElement.java index e66503f3371..d85bef7cc01 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/AssetElement.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/AssetElement.java @@ -6,9 +6,9 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.AssetProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; import org.odpi.openmetadata.frameworks.governanceaction.properties.MetadataCorrelationHeader; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.AssetProperties; import java.util.List; import java.util.Objects; @@ -22,7 +22,7 @@ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) -public class AssetElement implements MetadataElement +public class AssetElement implements CorrelatedMetadataElement { private AssetProperties assetProperties = null; private List correlationHeaders = null; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/AssetManagerElement.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/AssetManagerElement.java index 4139736e23d..1cc9e39143f 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/AssetManagerElement.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/AssetManagerElement.java @@ -6,13 +6,13 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.SoftwareCapabilitiesProperties; import java.util.Objects; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities.SoftwareCapabilityProperties; /** * AssetManagerElement contains the properties and header for a software server capabilities entity retrieved from the metadata @@ -25,8 +25,8 @@ @JsonIgnoreProperties(ignoreUnknown=true) public class AssetManagerElement { - private ElementHeader elementHeader = null; - private SoftwareCapabilitiesProperties softwareCapabilitiesProperties = null; + private ElementHeader elementHeader = null; + private SoftwareCapabilityProperties softwareCapabilityProperties = null; /** @@ -47,8 +47,8 @@ public AssetManagerElement(AssetManagerElement template) { if (template != null) { - elementHeader = template.getElementHeader(); - softwareCapabilitiesProperties = template.getSoftwareCapabilitiesProperties(); + elementHeader = template.getElementHeader(); + softwareCapabilityProperties = template.getSoftwareCapabilityProperties(); } } @@ -80,20 +80,20 @@ public void setElementHeader(ElementHeader elementHeader) * * @return properties bean */ - public SoftwareCapabilitiesProperties getSoftwareCapabilitiesProperties() + public SoftwareCapabilityProperties getSoftwareCapabilityProperties() { - return softwareCapabilitiesProperties; + return softwareCapabilityProperties; } /** * Set up the properties of the software server capability. * - * @param softwareCapabilitiesProperties properties bean + * @param softwareCapabilityProperties properties bean */ - public void setSoftwareCapabilitiesProperties(SoftwareCapabilitiesProperties softwareCapabilitiesProperties) + public void setSoftwareCapabilityProperties(SoftwareCapabilityProperties softwareCapabilityProperties) { - this.softwareCapabilitiesProperties = softwareCapabilitiesProperties; + this.softwareCapabilityProperties = softwareCapabilityProperties; } @@ -107,7 +107,7 @@ public String toString() { return "SoftwareCapabilityElement{" + "elementHeader=" + elementHeader + - ", softwareCapabilitiesProperties=" + softwareCapabilitiesProperties + + ", softwareCapabilitiesProperties=" + softwareCapabilityProperties + '}'; } @@ -135,7 +135,7 @@ public boolean equals(Object objectToCompare) } AssetManagerElement that = (AssetManagerElement) objectToCompare; return Objects.equals(elementHeader, that.elementHeader) && - Objects.equals(softwareCapabilitiesProperties, that.softwareCapabilitiesProperties); + Objects.equals(softwareCapabilityProperties, that.softwareCapabilityProperties); } @@ -147,6 +147,6 @@ public boolean equals(Object objectToCompare) @Override public int hashCode() { - return Objects.hash(super.hashCode(), elementHeader, softwareCapabilitiesProperties); + return Objects.hash(super.hashCode(), elementHeader, softwareCapabilityProperties); } } diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/CommentElement.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/CommentElement.java index dc13a3fd457..14c1816cc87 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/CommentElement.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/CommentElement.java @@ -6,9 +6,11 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.CommentProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; import org.odpi.openmetadata.frameworks.governanceaction.properties.MetadataCorrelationHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.FeedbackTargetElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.RelatedElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.feedback.CommentProperties; import java.util.List; import java.util.Objects; @@ -22,7 +24,7 @@ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) -public class CommentElement implements MetadataElement +public class CommentElement implements CorrelatedMetadataElement { private ElementHeader elementHeader = null; private List correlationHeaders = null; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/ConnectionElement.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/ConnectionElement.java index 610ddbd3263..f3465060ca8 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/ConnectionElement.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/ConnectionElement.java @@ -6,10 +6,11 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ConnectionProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementStub; import org.odpi.openmetadata.frameworks.governanceaction.properties.MetadataCorrelationHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.EmbeddedConnection; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.ConnectionProperties; import java.util.ArrayList; import java.util.List; @@ -24,13 +25,13 @@ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) -public class ConnectionElement implements MetadataElement +public class ConnectionElement implements CorrelatedMetadataElement { private ConnectionProperties connectionProperties = null; private List correlationHeaders = null; - private ElementHeader elementHeader = null; - private ElementStub connectorType = null; - private ElementStub endpoint = null; + private ElementHeader elementHeader = null; + private ElementStub connectorType = null; + private ElementStub endpoint = null; private List embeddedConnections = null; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/ConnectorTypeElement.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/ConnectorTypeElement.java index 260f651071a..71ca74b424f 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/ConnectorTypeElement.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/ConnectorTypeElement.java @@ -6,7 +6,6 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ConnectorTypeProperties; import org.odpi.openmetadata.frameworks.governanceaction.properties.MetadataCorrelationHeader; import java.util.List; @@ -14,7 +13,8 @@ import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.ConnectorTypeProperties; /** * ConnectorTypeElement contains the properties and header for a connector type retrieved from the metadata repository. @@ -22,10 +22,10 @@ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) -public class ConnectorTypeElement implements MetadataElement +public class ConnectorTypeElement implements CorrelatedMetadataElement { private ConnectorTypeProperties connectorTypeProperties = null; - private List correlationHeaders = null; + private List correlationHeaders = null; private ElementHeader elementHeader = null; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/ControlFlowElement.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/ControlFlowElement.java deleted file mode 100644 index ab5eadcba09..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/ControlFlowElement.java +++ /dev/null @@ -1,197 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetmanager.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ControlFlowProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * ControlFlowElement contains the properties and header for a control flow relationship retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ControlFlowElement -{ - private ElementHeader controlFlowHeader = null; - private ControlFlowProperties controlFlowProperties = null; - private ElementHeader currentStep = null; - private ElementHeader nextStep = null; - - /** - * Default constructor - */ - public ControlFlowElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ControlFlowElement(ControlFlowElement template) - { - if (template != null) - { - controlFlowHeader = template.getControlFlowHeader(); - controlFlowProperties = template.getControlFlowProperties(); - currentStep = template.getCurrentStep(); - nextStep = template.getNextStep(); - } - } - - - /** - * Return the element header associated with the relationship. - * - * @return element header object - */ - public ElementHeader getControlFlowHeader() - { - return controlFlowHeader; - } - - - /** - * Set up the element header associated with the relationship. - * - * @param controlFlowHeader element header object - */ - public void setControlFlowHeader(ElementHeader controlFlowHeader) - { - this.controlFlowHeader = controlFlowHeader; - } - - - /** - * Return details of the relationship - * - * @return relationship properties - */ - public ControlFlowProperties getControlFlowProperties() - { - return controlFlowProperties; - } - - - /** - * Set up relationship properties - * - * @param controlFlowProperties relationship properties - */ - public void setControlFlowProperties(ControlFlowProperties controlFlowProperties) - { - this.controlFlowProperties = controlFlowProperties; - } - - - /** - * Return the element header associated with end 1 of the relationship. - * - * @return element header object - */ - public ElementHeader getCurrentStep() - { - return currentStep; - } - - - /** - * Set up the element header associated with end 1 of the relationship. - * - * @param currentStep element header object - */ - public void setCurrentStep(ElementHeader currentStep) - { - this.currentStep = currentStep; - } - - - - /** - * Return the element header associated with end 2 of the relationship. - * - * @return element header object - */ - public ElementHeader getNextStep() - { - return nextStep; - } - - - /** - * Set up the element header associated with end 2 of the relationship. - * - * @param nextStep element header object - */ - public void setNextStep(ElementHeader nextStep) - { - this.nextStep = nextStep; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ControlFlowElement{" + - "controlFlowHeader=" + controlFlowHeader + - ", controlFlowProperties=" + controlFlowProperties + - ", currentStep=" + currentStep + - ", nextStep=" + nextStep + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ControlFlowElement that = (ControlFlowElement) objectToCompare; - return Objects.equals(getControlFlowHeader(), that.getControlFlowHeader()) && - Objects.equals(getControlFlowProperties(), that.getControlFlowProperties()) && - Objects.equals(getCurrentStep(), that.getCurrentStep()) && - Objects.equals(getNextStep(), that.getNextStep()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), controlFlowHeader, controlFlowProperties, currentStep, nextStep); - } -} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/CorrelatedMetadataElement.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/CorrelatedMetadataElement.java new file mode 100644 index 00000000000..60c6696b8b6 --- /dev/null +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/CorrelatedMetadataElement.java @@ -0,0 +1,51 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.accessservices.assetmanager.metadataelements; + +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; +import org.odpi.openmetadata.frameworks.governanceaction.properties.MetadataCorrelationHeader; + +import java.util.List; + +/** + * CorrelatedMetadataElement is the common interface for all metadata elements. It adds the header information that is stored with the properties. + * This includes detains of its unique identifier, type and origin. + */ +public interface CorrelatedMetadataElement +{ + /** + * Return the element header associated with the open metadata element. + * + * @return element header object + */ + ElementHeader getElementHeader(); + + + /** + * Set up the element header associated with the open metadata element. + * + * @param elementHeader element header object + */ + void setElementHeader(ElementHeader elementHeader); + + + /** + * Return the details of the external identifier and other correlation properties about the metadata source. + * There is one entry in the list for each element in the third party technology that maps to the single open source + * element. + * + * @return list of correlation properties objects + */ + List getCorrelationHeaders(); + + + /** + * Set up the details of the external identifier and other correlation properties about the metadata source. + * There is one entry in the list for each element in the third party technology that maps to the single open source + * element. + * + * @param correlationHeaders list of correlation properties objects + */ + void setCorrelationHeaders(List correlationHeaders); +} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/DataAssetElement.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/DataAssetElement.java index b59b95c3d99..b35e80fec85 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/DataAssetElement.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/DataAssetElement.java @@ -6,7 +6,6 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.DataAssetProperties; import org.odpi.openmetadata.frameworks.governanceaction.properties.MetadataCorrelationHeader; import java.util.List; @@ -14,7 +13,8 @@ import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.DataAssetProperties; /** * DataAssetElement contains the properties and header for an asset retrieved from the metadata repository. @@ -22,7 +22,7 @@ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) -public class DataAssetElement implements MetadataElement +public class DataAssetElement implements CorrelatedMetadataElement { private DataAssetProperties dataAssetProperties = null; private List correlationHeaders = null; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/DataFlowElement.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/DataFlowElement.java deleted file mode 100644 index 8cf6e586e29..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/DataFlowElement.java +++ /dev/null @@ -1,197 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetmanager.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.DataFlowProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * DataFlowElement contains the properties and header for a data flow relationship retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class DataFlowElement -{ - private ElementHeader dataFlowHeader = null; - private DataFlowProperties dataFlowProperties = null; - private ElementHeader dataSupplier = null; - private ElementHeader dataConsumer = null; - - /** - * Default constructor - */ - public DataFlowElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public DataFlowElement(DataFlowElement template) - { - if (template != null) - { - dataFlowHeader = template.getDataFlowHeader(); - dataFlowProperties = template.getDataFlowProperties(); - dataSupplier = template.getDataSupplier(); - dataConsumer = template.getDataConsumer(); - } - } - - - /** - * Return the element header associated with the relationship. - * - * @return element header object - */ - public ElementHeader getDataFlowHeader() - { - return dataFlowHeader; - } - - - /** - * Set up the element header associated with the relationship. - * - * @param dataFlowHeader element header object - */ - public void setDataFlowHeader(ElementHeader dataFlowHeader) - { - this.dataFlowHeader = dataFlowHeader; - } - - - /** - * Return details of the relationship - * - * @return relationship properties - */ - public DataFlowProperties getDataFlowProperties() - { - return dataFlowProperties; - } - - - /** - * Set up relationship properties - * - * @param dataFlowProperties relationship properties - */ - public void setDataFlowProperties(DataFlowProperties dataFlowProperties) - { - this.dataFlowProperties = dataFlowProperties; - } - - - /** - * Return the element header associated with end 1 of the relationship. - * - * @return element header object - */ - public ElementHeader getDataSupplier() - { - return dataSupplier; - } - - - /** - * Set up the element header associated with end 1 of the relationship. - * - * @param dataSupplier element header object - */ - public void setDataSupplier(ElementHeader dataSupplier) - { - this.dataSupplier = dataSupplier; - } - - - - /** - * Return the element header associated with end 2 of the relationship. - * - * @return element header object - */ - public ElementHeader getDataConsumer() - { - return dataConsumer; - } - - - /** - * Set up the element header associated with end 2 of the relationship. - * - * @param dataConsumer element header object - */ - public void setDataConsumer(ElementHeader dataConsumer) - { - this.dataConsumer = dataConsumer; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "DataFlowElement{" + - "dataFlowHeader=" + dataFlowHeader + - ", dataFlowProperties=" + dataFlowProperties + - ", dataSupplier=" + dataSupplier + - ", dataConsumer=" + dataConsumer + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - DataFlowElement that = (DataFlowElement) objectToCompare; - return Objects.equals(getDataFlowHeader(), that.getDataFlowHeader()) && - Objects.equals(getDataFlowProperties(), that.getDataFlowProperties()) && - Objects.equals(getDataSupplier(), that.getDataSupplier()) && - Objects.equals(getDataConsumer(), that.getDataConsumer()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), dataFlowHeader, dataFlowProperties, dataSupplier, dataConsumer); - } -} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/EmbeddedConnection.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/EmbeddedConnection.java deleted file mode 100644 index 527adabdbd5..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/EmbeddedConnection.java +++ /dev/null @@ -1,213 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetmanager.metadataelements; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; - -/** - * The EmbeddedConnection is used within a VirtualConnection to link to the embedded connections. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class EmbeddedConnection -{ - /* - * Attributes of an embedded connection - */ - protected int position = 0; - protected String displayName = null; - protected Map arguments = null; - protected ElementStub embeddedConnection = null; - - - /** - * Default constructor - */ - public EmbeddedConnection() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template element to copy - */ - public EmbeddedConnection(EmbeddedConnection template) - { - if (template != null) - { - position = template.getPosition(); - displayName = template.getDisplayName(); - arguments = template.getArguments(); - embeddedConnection = template.getEmbeddedConnection(); - } - } - - - /** - * Return the position that this connector is in the list of embedded connectors. - * - * @return int - */ - public int getPosition() - { - return position; - } - - - /** - * Set up the position that this connector is in the list of embedded connectors. - * - * @param position int - */ - public void setPosition(int position) - { - this.position = position; - } - - - /** - * Return the printable name of the embedded connection. - * - * @return String name - */ - public String getDisplayName() - { - return displayName; - } - - - /** - * Set up the printable name of the embedded connection. - * - * @param displayName String name - */ - public void setDisplayName(String displayName) - { - this.displayName = displayName; - } - - - /** - * Return the arguments for the embedded connection. - * - * @return property map - */ - public Map getArguments() - { - if (arguments == null) - { - return null; - } - else if (arguments.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(arguments); - } - } - - - /** - * Set up the arguments for the embedded connection. - * - * @param arguments property map - */ - public void setArguments(Map arguments) - { - this.arguments = arguments; - } - - - /** - * Return the embedded connection. - * - * @return header of Connection object. - */ - public ElementStub getEmbeddedConnection() - { - return embeddedConnection; - } - - - /** - * Set up the embedded connection - * - * @param embeddedConnection header of Connection object - */ - public void setEmbeddedConnection(ElementStub embeddedConnection) - { - this.embeddedConnection = embeddedConnection; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "EmbeddedConnection{" + - "position=" + position + - ", displayName='" + displayName + '\'' + - ", arguments=" + arguments + - ", embeddedConnection=" + embeddedConnection + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - EmbeddedConnection that = (EmbeddedConnection) objectToCompare; - return position == that.position && - Objects.equals(displayName, that.displayName) && - Objects.equals(arguments, that.arguments) && - Objects.equals(embeddedConnection, that.embeddedConnection); - } - - - /** - * Create a hash code for this element type. - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(position, displayName, arguments, embeddedConnection); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/EndpointElement.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/EndpointElement.java index e7b9116a980..82ac4e06444 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/EndpointElement.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/EndpointElement.java @@ -6,7 +6,6 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.EndpointProperties; import org.odpi.openmetadata.frameworks.governanceaction.properties.MetadataCorrelationHeader; import java.util.List; @@ -14,7 +13,8 @@ import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.EndpointProperties; /** * EndpointElement contains the properties and header for an endpoint retrieved from the metadata repository. @@ -22,7 +22,7 @@ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) -public class EndpointElement implements MetadataElement +public class EndpointElement implements CorrelatedMetadataElement { private EndpointProperties endpointProperties = null; private List correlationHeaders = null; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/ExternalReferenceElement.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/ExternalReferenceElement.java index c0d57d82026..54544c8c9ba 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/ExternalReferenceElement.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/ExternalReferenceElement.java @@ -5,7 +5,6 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ExternalReferenceProperties; import org.odpi.openmetadata.frameworks.governanceaction.properties.MetadataCorrelationHeader; import java.util.List; @@ -13,7 +12,8 @@ import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.properties.externalreferences.ExternalReferenceProperties; /** @@ -22,9 +22,9 @@ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) -public class ExternalReferenceElement implements MetadataElement +public class ExternalReferenceElement implements CorrelatedMetadataElement { - private ElementHeader elementHeader = null; + private ElementHeader elementHeader = null; private List correlationHeaders = null; private ExternalReferenceProperties properties = null; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/ExternalReferenceLinkElement.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/ExternalReferenceLinkElement.java index c248d525a76..71e0d9138d0 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/ExternalReferenceLinkElement.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/ExternalReferenceLinkElement.java @@ -5,8 +5,6 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ExternalReferenceLinkProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ExternalReferenceProperties; import org.odpi.openmetadata.frameworks.governanceaction.properties.MetadataCorrelationHeader; import java.util.List; @@ -14,7 +12,9 @@ import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.properties.externalreferences.ExternalReferenceLinkProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.externalreferences.ExternalReferenceProperties; /** @@ -23,7 +23,7 @@ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) -public class ExternalReferenceLinkElement implements MetadataElement +public class ExternalReferenceLinkElement implements CorrelatedMetadataElement { private ElementHeader elementHeader = null; private List correlationHeaders = null; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/FeedbackTargetElement.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/FeedbackTargetElement.java deleted file mode 100644 index e99fe760c39..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/FeedbackTargetElement.java +++ /dev/null @@ -1,181 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetmanager.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * FeedbackTargetElement contains the properties and header for a relationship retrieved from the metadata repository along with the stub - * of the related element. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class FeedbackTargetElement -{ - private ElementHeader relationshipHeader = null; - private ElementStub relatedElement = null; - private boolean isPublic = false; - - /** - * Default constructor - */ - public FeedbackTargetElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public FeedbackTargetElement(FeedbackTargetElement template) - { - if (template != null) - { - relationshipHeader = template.getRelationshipHeader(); - relatedElement = template.getRelatedElement(); - isPublic = template.getIsPublic(); - } - } - - - - /** - * Return if the link to the tag is private to the creating user. - * - * @return boolean - */ - public boolean getIsPublic() - { - return isPublic; - } - - - /** - * Set up whether the link to the tag is private to the creating user or not. - * - * @param aPublic boolean - */ - public void setIsPublic(boolean aPublic) - { - isPublic = aPublic; - } - - - /** - * Return the element header associated with the relationship. - * - * @return element header object - */ - public ElementHeader getRelationshipHeader() - { - return relationshipHeader; - } - - - /** - * Set up the element header associated with the relationship. - * - * @param relationshipHeader element header object - */ - public void setRelationshipHeader(ElementHeader relationshipHeader) - { - this.relationshipHeader = relationshipHeader; - } - - - /** - * Return the element header associated with end 1 of the relationship. - * - * @return element stub object - */ - public ElementStub getRelatedElement() - { - return relatedElement; - } - - - /** - * Set up the element header associated with end 1 of the relationship. - * - * @param relatedElement element stub object - */ - public void setRelatedElement(ElementStub relatedElement) - { - this.relatedElement = relatedElement; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "FeedbackTargetElement{" + - "relationshipHeader=" + relationshipHeader + - ", relatedElement=" + relatedElement + - ", isPublic=" + isPublic + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (! (objectToCompare instanceof FeedbackTargetElement)) - { - return false; - } - - FeedbackTargetElement that = (FeedbackTargetElement) objectToCompare; - - if (isPublic != that.isPublic) - { - return false; - } - if (relationshipHeader != null ? ! relationshipHeader.equals(that.relationshipHeader) : that.relationshipHeader != null) - { - return false; - } - return relatedElement != null ? relatedElement.equals(that.relatedElement) : that.relatedElement == null; - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - int result = relationshipHeader != null ? relationshipHeader.hashCode() : 0; - result = 31 * result + (relatedElement != null ? relatedElement.hashCode() : 0); - result = 31 * result + (isPublic ? 1 : 0); - return result; - } -} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/GlossaryCategoryElement.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/GlossaryCategoryElement.java index 77e14a6560e..da2f0e07fa1 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/GlossaryCategoryElement.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/GlossaryCategoryElement.java @@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.GlossaryCategoryProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.glossaries.GlossaryCategoryProperties; import org.odpi.openmetadata.frameworks.governanceaction.properties.MetadataCorrelationHeader; import java.util.List; @@ -14,7 +14,7 @@ import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; /** * GlossaryCategoryElement contains the properties and header for a deployed glossary schema asset entity @@ -23,7 +23,7 @@ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) -public class GlossaryCategoryElement implements MetadataElement +public class GlossaryCategoryElement implements CorrelatedMetadataElement { private ElementHeader elementHeader = null; private List correlationHeaders = null; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/GlossaryElement.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/GlossaryElement.java index 8ffa15bc515..50d0045dd92 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/GlossaryElement.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/GlossaryElement.java @@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.GlossaryProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.glossaries.GlossaryProperties; import org.odpi.openmetadata.frameworks.governanceaction.properties.MetadataCorrelationHeader; import java.util.List; @@ -14,7 +14,7 @@ import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; /** * GlossaryElement contains the properties and header for a glossary entity retrieved from the metadata repository. @@ -22,7 +22,7 @@ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) -public class GlossaryElement implements MetadataElement +public class GlossaryElement implements CorrelatedMetadataElement { private ElementHeader elementHeader = null; private List correlationHeaders = null; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/GlossaryTermElement.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/GlossaryTermElement.java index 53ae42e9dfa..3a8d1faaa8d 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/GlossaryTermElement.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/GlossaryTermElement.java @@ -6,7 +6,6 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.GlossaryTermProperties; import org.odpi.openmetadata.frameworks.governanceaction.properties.MetadataCorrelationHeader; import java.util.List; @@ -14,7 +13,9 @@ import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.RelatedElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.glossaries.GlossaryTermProperties; /** * GlossaryTermElement contains the properties and header for a glossary term entity @@ -23,7 +24,7 @@ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) -public class GlossaryTermElement implements MetadataElement +public class GlossaryTermElement implements CorrelatedMetadataElement { private ElementHeader elementHeader = null; private List correlationHeaders = null; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/GovernanceDefinitionElement.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/GovernanceDefinitionElement.java index ab18d335e68..f780721e7ec 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/GovernanceDefinitionElement.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/GovernanceDefinitionElement.java @@ -4,18 +4,19 @@ package org.odpi.openmetadata.accessservices.assetmanager.metadataelements; -import org.odpi.openmetadata.accessservices.assetmanager.properties.GovernanceDefinitionProperties; import org.odpi.openmetadata.frameworks.governanceaction.properties.MetadataCorrelationHeader; import java.util.List; import java.util.Objects; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.RelatedElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.GovernanceDefinitionProperties; /** * GovernanceDefinitionElement is the superclass used to return the common properties of a governance definition stored in the * open metadata repositories. */ -public class GovernanceDefinitionElement implements MetadataElement +public class GovernanceDefinitionElement implements CorrelatedMetadataElement { private ElementHeader elementHeader = null; private List correlationHeaders = null; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/InformalTagElement.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/InformalTagElement.java index bc3cbeb6950..582d5d5f5f3 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/InformalTagElement.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/InformalTagElement.java @@ -6,9 +6,10 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.InformalTagProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; import org.odpi.openmetadata.frameworks.governanceaction.properties.MetadataCorrelationHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.FeedbackTargetElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.feedback.InformalTagProperties; import java.util.List; import java.util.Objects; @@ -22,7 +23,7 @@ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) -public class InformalTagElement implements MetadataElement +public class InformalTagElement implements CorrelatedMetadataElement { private ElementHeader elementHeader = null; private List correlationHeaders = null; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/LikeElement.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/LikeElement.java index 2a20ff7aea2..2cec4ecbfd6 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/LikeElement.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/LikeElement.java @@ -6,9 +6,10 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.LikeProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; import org.odpi.openmetadata.frameworks.governanceaction.properties.MetadataCorrelationHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.FeedbackTargetElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.feedback.LikeProperties; import java.util.List; import java.util.Objects; @@ -22,7 +23,7 @@ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) -public class LikeElement implements MetadataElement +public class LikeElement implements CorrelatedMetadataElement { private ElementHeader elementHeader = null; private List correlationHeaders = null; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/LineageMappingElement.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/LineageMappingElement.java deleted file mode 100644 index 580a09682dd..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/LineageMappingElement.java +++ /dev/null @@ -1,196 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetmanager.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.LineageMappingProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * LineageMappingElement contains the properties and header for a lineage mapping relationship retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class LineageMappingElement -{ - private ElementHeader lineageMappingHeader = null; - private LineageMappingProperties lineageMappingProperties = null; - private ElementHeader sourceElement = null; - private ElementHeader targetElement = null; - - /** - * Default constructor - */ - public LineageMappingElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public LineageMappingElement(LineageMappingElement template) - { - if (template != null) - { - lineageMappingHeader = template.getLineageMappingHeader(); - sourceElement = template.getSourceElement(); - targetElement = template.getTargetElement(); - } - } - - - /** - * Return the element header associated with the relationship. - * - * @return element header object - */ - public ElementHeader getLineageMappingHeader() - { - return lineageMappingHeader; - } - - - /** - * Set up the element header associated with the relationship. - * - * @param lineageMappingHeader element header object - */ - public void setLineageMappingHeader(ElementHeader lineageMappingHeader) - { - this.lineageMappingHeader = lineageMappingHeader; - } - - - /** - * Return the properties associated with the lineage mapping relationship. - * - * @return properties - */ - public LineageMappingProperties getLineageMappingProperties() - { - return lineageMappingProperties; - } - - - /** - * Set up the properties associated with the relationship. - * - * @param lineageMappingProperties properties - */ - public void setLineageMappingProperties(LineageMappingProperties lineageMappingProperties) - { - this.lineageMappingProperties = lineageMappingProperties; - } - - - /** - * Return the element header associated with end 1 of the relationship. - * - * @return element header object - */ - public ElementHeader getSourceElement() - { - return sourceElement; - } - - - /** - * Set up the element header associated with end 1 of the relationship. - * - * @param sourceElement element header object - */ - public void setSourceElement(ElementHeader sourceElement) - { - this.sourceElement = sourceElement; - } - - - - /** - * Return the element header associated with end 2 of the relationship. - * - * @return element header object - */ - public ElementHeader getTargetElement() - { - return targetElement; - } - - - /** - * Set up the element header associated with end 2 of the relationship. - * - * @param targetElement element header object - */ - public void setTargetElement(ElementHeader targetElement) - { - this.targetElement = targetElement; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "LineageMappingElement{" + - "lineageMappingHeader=" + lineageMappingHeader + - ", lineageMappingProperties=" + lineageMappingProperties + - ", sourceElement=" + sourceElement + - ", targetElement=" + targetElement + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - LineageMappingElement that = (LineageMappingElement) objectToCompare; - return Objects.equals(getLineageMappingHeader(), that.getLineageMappingHeader()) && - Objects.equals(getSourceElement(), that.getSourceElement()) && - Objects.equals(getLineageMappingProperties(), that.getLineageMappingProperties()) && - Objects.equals(getTargetElement(), that.getTargetElement()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), lineageMappingHeader, lineageMappingProperties, sourceElement, targetElement); - } -} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/MetadataElement.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/MetadataElement.java deleted file mode 100644 index 5e1b1d88ca8..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/MetadataElement.java +++ /dev/null @@ -1,51 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetmanager.metadataelements; - -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; -import org.odpi.openmetadata.frameworks.governanceaction.properties.MetadataCorrelationHeader; - -import java.util.List; - -/** - * MetadataElement is the common interface for all metadata elements. It adds the header information that is stored with the properties. - * This includes detains of its unique identifier, type and origin. - */ -public interface MetadataElement -{ - /** - * Return the element header associated with the open metadata element. - * - * @return element header object - */ - ElementHeader getElementHeader(); - - - /** - * Set up the element header associated with the open metadata element. - * - * @param elementHeader element header object - */ - void setElementHeader(ElementHeader elementHeader); - - - /** - * Return the details of the external identifier and other correlation properties about the metadata source. - * There is one entry in the list for each element in the third party technology that maps to the single open source - * element. - * - * @return list of correlation properties objects - */ - List getCorrelationHeaders(); - - - /** - * Set up the details of the external identifier and other correlation properties about the metadata source. - * There is one entry in the list for each element in the third party technology that maps to the single open source - * element. - * - * @param correlationHeaders list of correlation properties objects - */ - void setCorrelationHeaders(List correlationHeaders); -} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/NoteElement.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/NoteElement.java index 2d5406a64bd..9d1f6960fa1 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/NoteElement.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/NoteElement.java @@ -6,9 +6,10 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.NoteProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; import org.odpi.openmetadata.frameworks.governanceaction.properties.MetadataCorrelationHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.FeedbackTargetElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.feedback.NoteProperties; import java.util.Date; import java.util.List; @@ -23,7 +24,7 @@ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) -public class NoteElement implements MetadataElement +public class NoteElement implements CorrelatedMetadataElement { private ElementHeader elementHeader = null; private List correlationHeaders = null; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/NoteLogElement.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/NoteLogElement.java index 86c2e7a19a1..419cd6f2ab8 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/NoteLogElement.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/NoteLogElement.java @@ -6,9 +6,10 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.NoteLogProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; import org.odpi.openmetadata.frameworks.governanceaction.properties.MetadataCorrelationHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.FeedbackTargetElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.feedback.NoteLogProperties; import java.util.List; import java.util.Objects; @@ -22,7 +23,7 @@ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) -public class NoteLogElement implements MetadataElement +public class NoteLogElement implements CorrelatedMetadataElement { private ElementHeader elementHeader = null; private List correlationHeaders = null; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/PortElement.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/PortElement.java index 9fbf4a2c372..e95f2b78001 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/PortElement.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/PortElement.java @@ -6,7 +6,6 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.PortProperties; import org.odpi.openmetadata.frameworks.governanceaction.properties.MetadataCorrelationHeader; import java.util.List; @@ -14,7 +13,8 @@ import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.processes.PortProperties; /** * PortElement contains the properties and header for a port entity retrieved from the metadata repository. @@ -22,11 +22,11 @@ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) -public class PortElement implements MetadataElement +public class PortElement implements CorrelatedMetadataElement { private ElementHeader elementHeader = null; private List correlationHeaders = null; - private PortProperties portProperties = null; + private PortProperties portProperties = null; /** * Default constructor diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/ProcessCallElement.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/ProcessCallElement.java deleted file mode 100644 index 50e7d34b13e..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/ProcessCallElement.java +++ /dev/null @@ -1,197 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetmanager.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ProcessCallProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * ProcessCallElement contains the properties and header for a process call relationship retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ProcessCallElement -{ - private ElementHeader processCallHeader = null; - private ProcessCallProperties processCallProperties = null; - private ElementHeader caller = null; - private ElementHeader called = null; - - /** - * Default constructor - */ - public ProcessCallElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ProcessCallElement(ProcessCallElement template) - { - if (template != null) - { - processCallHeader = template.getProcessCallHeader(); - processCallProperties = template.getProcessCallProperties(); - caller = template.getCaller(); - called = template.getCalled(); - } - } - - - /** - * Return the element header associated with the relationship. - * - * @return element header object - */ - public ElementHeader getProcessCallHeader() - { - return processCallHeader; - } - - - /** - * Set up the element header associated with the relationship. - * - * @param processCallHeader element header object - */ - public void setProcessCallHeader(ElementHeader processCallHeader) - { - this.processCallHeader = processCallHeader; - } - - - /** - * Return details of the relationship - * - * @return relationship properties - */ - public ProcessCallProperties getProcessCallProperties() - { - return processCallProperties; - } - - - /** - * Set up relationship properties - * - * @param processCallProperties relationship properties - */ - public void setProcessCallProperties(ProcessCallProperties processCallProperties) - { - this.processCallProperties = processCallProperties; - } - - - /** - * Return the element header associated with end 1 of the relationship. - * - * @return element header object - */ - public ElementHeader getCaller() - { - return caller; - } - - - /** - * Set up the element header associated with end 1 of the relationship. - * - * @param caller element header object - */ - public void setCaller(ElementHeader caller) - { - this.caller = caller; - } - - - - /** - * Return the element header associated with end 2 of the relationship. - * - * @return element header object - */ - public ElementHeader getCalled() - { - return called; - } - - - /** - * Set up the element header associated with end 2 of the relationship. - * - * @param called element header object - */ - public void setCalled(ElementHeader called) - { - this.called = called; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ProcessCallElement{" + - "processCallHeader=" + processCallHeader + - ", processCallProperties=" + processCallProperties + - ", caller=" + caller + - ", called=" + called + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ProcessCallElement that = (ProcessCallElement) objectToCompare; - return Objects.equals(getProcessCallHeader(), that.getProcessCallHeader()) && - Objects.equals(getProcessCallProperties(), that.getProcessCallProperties()) && - Objects.equals(getCaller(), that.getCaller()) && - Objects.equals(getCalled(), that.getCalled()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), processCallHeader, processCallProperties, caller, called); - } -} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/ProcessElement.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/ProcessElement.java index c438c3f07d9..91c5e358e29 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/ProcessElement.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/ProcessElement.java @@ -6,7 +6,6 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ProcessProperties; import org.odpi.openmetadata.frameworks.governanceaction.properties.MetadataCorrelationHeader; import java.util.List; @@ -14,7 +13,8 @@ import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.processes.ProcessProperties; /** * ProcessElement contains the properties and header for a process entity retrieved from the metadata repository. @@ -22,11 +22,11 @@ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) -public class ProcessElement implements MetadataElement +public class ProcessElement implements CorrelatedMetadataElement { private ElementHeader elementHeader = null; private List correlationHeaders = null; - private ProcessProperties processProperties = null; + private ProcessProperties processProperties = null; /** * Default constructor diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/RatingElement.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/RatingElement.java index 11fce40bbd8..d4c6f0f59b7 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/RatingElement.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/RatingElement.java @@ -6,9 +6,10 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.RatingProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; import org.odpi.openmetadata.frameworks.governanceaction.properties.MetadataCorrelationHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.FeedbackTargetElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.feedback.RatingProperties; import java.util.List; import java.util.Objects; @@ -22,7 +23,7 @@ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) -public class RatingElement implements MetadataElement +public class RatingElement implements CorrelatedMetadataElement { private ElementHeader elementHeader = null; private List correlationHeaders = null; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/ReferenceValueAssignmentDefinitionElement.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/ReferenceValueAssignmentDefinitionElement.java index fbbef108902..c661b84826e 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/ReferenceValueAssignmentDefinitionElement.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/ReferenceValueAssignmentDefinitionElement.java @@ -5,8 +5,8 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ReferenceValueAssignmentProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues.ReferenceValueAssignmentProperties; import java.util.Objects; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/ReferenceValueAssignmentItemElement.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/ReferenceValueAssignmentItemElement.java index 166709402d6..53762fe9b28 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/ReferenceValueAssignmentItemElement.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/ReferenceValueAssignmentItemElement.java @@ -5,8 +5,8 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ReferenceValueAssignmentProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues.ReferenceValueAssignmentProperties; import java.util.Objects; @@ -24,7 +24,6 @@ public class ReferenceValueAssignmentItemElement { private ElementHeader relationshipHeader = null; private ReferenceValueAssignmentProperties relationshipProperties = null; - private ReferenceableElement assignedItem = null; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/ReferenceableElement.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/ReferenceableElement.java index 313e591c8ec..c5af4e6cf06 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/ReferenceableElement.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/ReferenceableElement.java @@ -6,9 +6,9 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ReferenceableProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; import org.odpi.openmetadata.frameworks.governanceaction.properties.MetadataCorrelationHeader; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ReferenceableProperties; import java.util.List; @@ -23,10 +23,10 @@ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) -public class ReferenceableElement implements MetadataElement +public class ReferenceableElement implements CorrelatedMetadataElement { private ElementHeader elementHeader = null; - private List correlationHeaders = null; + private List correlationHeaders = null; private ReferenceableProperties referenceableProperties = null; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/RelatedElement.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/RelatedElement.java deleted file mode 100644 index 4352916bbdb..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/RelatedElement.java +++ /dev/null @@ -1,172 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetmanager.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.RelationshipProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * RelatedElement contains the properties and header for a relationship retrieved from the metadata repository along with the stub - * of the related element. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class RelatedElement -{ - private ElementHeader relationshipHeader = null; - private RelationshipProperties relationshipProperties = null; - private ElementStub relatedElement = null; - - /** - * Default constructor - */ - public RelatedElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public RelatedElement(RelatedElement template) - { - if (template != null) - { - relationshipHeader = template.getRelationshipHeader(); - relationshipProperties = template.getRelationshipProperties(); - relatedElement = template.getRelatedElement(); - } - } - - - /** - * Return the element header associated with the relationship. - * - * @return element header object - */ - public ElementHeader getRelationshipHeader() - { - return relationshipHeader; - } - - - /** - * Set up the element header associated with the relationship. - * - * @param relationshipHeader element header object - */ - public void setRelationshipHeader(ElementHeader relationshipHeader) - { - this.relationshipHeader = relationshipHeader; - } - - - /** - * Return details of the relationship - * - * @return relationship properties - */ - public RelationshipProperties getRelationshipProperties() - { - return relationshipProperties; - } - - - /** - * Set up relationship properties - * - * @param relationshipProperties relationship properties - */ - public void setRelationshipProperties(RelationshipProperties relationshipProperties) - { - this.relationshipProperties = relationshipProperties; - } - - - /** - * Return the element header associated with end 1 of the relationship. - * - * @return element stub object - */ - public ElementStub getRelatedElement() - { - return relatedElement; - } - - - /** - * Set up the element header associated with end 1 of the relationship. - * - * @param relatedElement element stub object - */ - public void setRelatedElement(ElementStub relatedElement) - { - this.relatedElement = relatedElement; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "RelatedElement{" + - "relationshipHeader=" + relationshipHeader + - ", relationshipProperties=" + relationshipProperties + - ", relatedElement=" + relatedElement + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - RelatedElement that = (RelatedElement) objectToCompare; - return Objects.equals(getRelationshipHeader(), that.getRelationshipHeader()) && - Objects.equals(getRelationshipProperties(), that.getRelationshipProperties()) && - Objects.equals(getRelatedElement(), that.getRelatedElement()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), relationshipHeader, relationshipProperties, relatedElement); - } -} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/RelationshipElement.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/RelationshipElement.java deleted file mode 100644 index 4342cd2d727..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/RelationshipElement.java +++ /dev/null @@ -1,197 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetmanager.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.RelationshipProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * RelationshipElement contains the properties and header for a relationship retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class RelationshipElement -{ - private ElementHeader relationshipHeader = null; - private RelationshipProperties relationshipProperties = null; - private ElementHeader end1GUID = null; - private ElementHeader end2GUID = null; - - /** - * Default constructor - */ - public RelationshipElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public RelationshipElement(RelationshipElement template) - { - if (template != null) - { - relationshipHeader = template.getRelationshipHeader(); - relationshipProperties = template.getRelationshipProperties(); - end1GUID = template.getEnd1GUID(); - end2GUID = template.getEnd2GUID(); - } - } - - - /** - * Return the element header associated with the relationship. - * - * @return element header object - */ - public ElementHeader getRelationshipHeader() - { - return relationshipHeader; - } - - - /** - * Set up the element header associated with the relationship. - * - * @param relationshipHeader element header object - */ - public void setRelationshipHeader(ElementHeader relationshipHeader) - { - this.relationshipHeader = relationshipHeader; - } - - - /** - * Return details of the relationship - * - * @return relationship properties - */ - public RelationshipProperties getRelationshipProperties() - { - return relationshipProperties; - } - - - /** - * Set up relationship properties - * - * @param relationshipProperties relationship properties - */ - public void setRelationshipProperties(RelationshipProperties relationshipProperties) - { - this.relationshipProperties = relationshipProperties; - } - - - /** - * Return the element header associated with end 1 of the relationship. - * - * @return element header object - */ - public ElementHeader getEnd1GUID() - { - return end1GUID; - } - - - /** - * Set up the element header associated with end 1 of the relationship. - * - * @param end1GUID element header object - */ - public void setEnd1GUID(ElementHeader end1GUID) - { - this.end1GUID = end1GUID; - } - - - - /** - * Return the element header associated with end 2 of the relationship. - * - * @return element header object - */ - public ElementHeader getEnd2GUID() - { - return end2GUID; - } - - - /** - * Set up the element header associated with end 2 of the relationship. - * - * @param end2GUID element header object - */ - public void setEnd2GUID(ElementHeader end2GUID) - { - this.end2GUID = end2GUID; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "RelationshipElement{" + - "relationshipHeader=" + relationshipHeader + - ", relationshipProperties=" + relationshipProperties + - ", end1GUID=" + end1GUID + - ", end2GUID=" + end2GUID + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - RelationshipElement that = (RelationshipElement) objectToCompare; - return Objects.equals(getRelationshipHeader(), that.getRelationshipHeader()) && - Objects.equals(getRelationshipProperties(), that.getRelationshipProperties()) && - Objects.equals(getEnd1GUID(), that.getEnd1GUID()) && - Objects.equals(getEnd2GUID(), that.getEnd2GUID()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), relationshipHeader, relationshipProperties, end1GUID, end2GUID); - } -} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/RequestSourceElement.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/RequestSourceElement.java index 6fcccc594f8..da68cf6b463 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/RequestSourceElement.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/RequestSourceElement.java @@ -10,7 +10,7 @@ import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementStub; /** * RequestSourceElement describes the element that triggered the request to the governance action service. diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/SchemaAttributeElement.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/SchemaAttributeElement.java index ab4291faecf..a9b83061a56 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/SchemaAttributeElement.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/SchemaAttributeElement.java @@ -6,7 +6,6 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.SchemaAttributeProperties; import org.odpi.openmetadata.frameworks.governanceaction.properties.MetadataCorrelationHeader; import java.util.List; @@ -14,7 +13,8 @@ import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.SchemaAttributeProperties; /** * SchemaTypeElement contains the properties and header for a reference data asset retrieved from the metadata repository. @@ -22,7 +22,7 @@ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) -public class SchemaAttributeElement implements MetadataElement +public class SchemaAttributeElement implements CorrelatedMetadataElement { private SchemaAttributeProperties schemaAttributeProperties = null; private List correlationHeaders = null; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/SchemaTypeElement.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/SchemaTypeElement.java index 003152d5e80..3ca9c11d14c 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/SchemaTypeElement.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/SchemaTypeElement.java @@ -6,8 +6,6 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.DerivedSchemaTypeQueryTargetProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.SchemaTypeProperties; import org.odpi.openmetadata.frameworks.governanceaction.properties.MetadataCorrelationHeader; import java.util.List; @@ -15,7 +13,9 @@ import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.DerivedSchemaTypeQueryTargetProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.SchemaTypeProperties; /** * SchemaTypeElement contains the properties and header for a schema type retrieved from the metadata repository. @@ -23,7 +23,7 @@ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) -public class SchemaTypeElement implements MetadataElement +public class SchemaTypeElement implements CorrelatedMetadataElement { private ElementHeader elementHeader = null; private List correlationHeaders = null; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/SoftwareCapabilityElement.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/SoftwareCapabilityElement.java index f91420e7b18..3cf0cd1f628 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/SoftwareCapabilityElement.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/SoftwareCapabilityElement.java @@ -6,7 +6,6 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.SoftwareCapabilitiesProperties; import org.odpi.openmetadata.frameworks.governanceaction.properties.MetadataCorrelationHeader; import java.util.List; @@ -14,7 +13,8 @@ import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities.SoftwareCapabilityProperties; /** * SoftwareCapabilityElement contains the properties and header for a software capability entity retrieved from the metadata @@ -23,11 +23,11 @@ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) -public class SoftwareCapabilityElement implements MetadataElement +public class SoftwareCapabilityElement implements CorrelatedMetadataElement { private ElementHeader elementHeader = null; private List correlationHeaders = null; - private SoftwareCapabilitiesProperties softwareCapabilitiesProperties = null; + private SoftwareCapabilityProperties softwareCapabilitiesProperties = null; /** @@ -89,15 +89,6 @@ public void setElementHeader(ElementHeader elementHeader) @Override public List getCorrelationHeaders() { - if (correlationHeaders == null) - { - return null; - } - else if (correlationHeaders.isEmpty()) - { - return null; - } - return correlationHeaders; } @@ -121,7 +112,7 @@ public void setCorrelationHeaders(List correlationHea * * @return properties bean */ - public SoftwareCapabilitiesProperties getSoftwareCapabilitiesProperties() + public SoftwareCapabilityProperties getSoftwareCapabilitiesProperties() { return softwareCapabilitiesProperties; } @@ -132,7 +123,7 @@ public SoftwareCapabilitiesProperties getSoftwareCapabilitiesProperties() * * @param softwareCapabilitiesProperties properties bean */ - public void setSoftwareCapabilitiesProperties(SoftwareCapabilitiesProperties softwareCapabilitiesProperties) + public void setSoftwareCapabilitiesProperties(SoftwareCapabilityProperties softwareCapabilitiesProperties) { this.softwareCapabilitiesProperties = softwareCapabilitiesProperties; } diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/ValidValueElement.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/ValidValueElement.java index 0823c834fcb..7e4fcd73e91 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/ValidValueElement.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/ValidValueElement.java @@ -6,15 +6,15 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ValidValueProperties; import org.odpi.openmetadata.frameworks.governanceaction.properties.MetadataCorrelationHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues.ValidValueProperties; import java.util.List; import java.util.Objects; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; /** * ValidValueElement contains the properties and header for a valid value entity retrieved from the metadata repository. @@ -22,9 +22,9 @@ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) -public class ValidValueElement implements MetadataElement +public class ValidValueElement implements CorrelatedMetadataElement { - private ElementHeader elementHeader = null; + private ElementHeader elementHeader = null; private List correlationHeaders = null; private ValidValueProperties validValueProperties = null; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/ValidValueMember.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/ValidValueMember.java index 615fbb9fde6..058c2b82892 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/ValidValueMember.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/ValidValueMember.java @@ -5,8 +5,8 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ValidValueMembershipProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues.ValidValueMembershipProperties; import java.util.Objects; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/ArchiveProperties.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/ArchiveProperties.java deleted file mode 100644 index afffff081c4..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/ArchiveProperties.java +++ /dev/null @@ -1,185 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetmanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Date; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ArchiveProperties defined the properties that are stored when a data source is archived or deleted. This - * allows the Asset to remain in the metadata repository after the real-world artifact has gone. This is important - * to prevent lineage graphs from becoming fragmented. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class ArchiveProperties -{ - private Date archiveDate = null; - private String archiveProcess = null; - private Map archiveProperties = null; - - - /** - * Default constructor - */ - public ArchiveProperties() - { - super(); - } - - - /** - * Copy/clone constructor for the template properties. - * - * @param template template object to copy. - */ - public ArchiveProperties(ArchiveProperties template) - { - if (template != null) - { - archiveDate = template.getArchiveDate(); - archiveProcess = template.getArchiveProcess(); - archiveProperties = template.getArchiveProperties(); - } - } - - - /** - * Returns the date when the data source was archived (or discovered missing). Null means "now". - * - * @return date of archive - */ - public Date getArchiveDate() - { - return archiveDate; - } - - - /** - * Set up the date when the data source was archived (or discovered missing). Null means "now". - * - * @param archiveDate date of archive - */ - public void setArchiveDate(Date archiveDate) - { - this.archiveDate = archiveDate; - } - - - /** - * Returns the name of the process that either performed the archive or detected the missing data source. - * - * @return String name - */ - public String getArchiveProcess() - { - return archiveProcess; - } - - - /** - * Set up the name of the process that either performed the archive or detected the missing data source. - * - * @param archiveProcess String name - */ - public void setArchiveProcess(String archiveProcess) - { - this.archiveProcess = archiveProcess; - } - - - /** - * Return the properties that characterize where the data source was archived to. - * - * @return map of name value pairs, all strings - */ - public Map getArchiveProperties() - { - if (archiveProperties == null) - { - return null; - } - else if (archiveProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(archiveProperties); - } - } - - - /** - * Set up the properties that characterize where the data source was archived to. - * - * @param archiveProperties map of name value pairs, all strings - */ - public void setArchiveProperties(Map archiveProperties) - { - this.archiveProperties = archiveProperties; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "ArchiveProperties{" + - "archiveDate=" + archiveDate + - ", archiveProcess='" + archiveProcess + '\'' + - ", archiveProperties='" + archiveProperties + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ArchiveProperties that = (ArchiveProperties) objectToCompare; - return Objects.equals(archiveDate, that.archiveDate) && - Objects.equals(archiveProcess, that.archiveProcess) && - Objects.equals(archiveProperties, that.archiveProperties); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(archiveDate, archiveProcess, archiveProperties); - } -} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/AssetManagerProperties.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/AssetManagerProperties.java deleted file mode 100644 index 9fff331769f..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/AssetManagerProperties.java +++ /dev/null @@ -1,70 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetmanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * AssetManagerProperties describes the properties of an external asset manager. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class AssetManagerProperties extends SoftwareCapabilitiesProperties -{ - /** - * Default constructor - */ - public AssetManagerProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public AssetManagerProperties(AssetManagerProperties template) - { - super(template); - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "AssetManagerProperties{" + - "technicalName='" + getTechnicalName() + '\'' + - ", technicalDescription='" + getTechnicalDescription() + '\'' + - ", typeDescription='" + getDeployedImplementationType() + '\'' + - ", version='" + getVersion() + '\'' + - ", patchLevel='" + getPatchLevel() + '\'' + - ", source='" + getSource() + '\'' + - ", displayName='" + getDisplayName() + '\'' + - ", summary='" + getSummary() + '\'' + - ", description='" + getDescription() + '\'' + - ", abbreviation='" + getAbbreviation() + '\'' + - ", usage='" + getUsage() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } -} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/AssetProperties.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/AssetProperties.java deleted file mode 100644 index 80a515f38ee..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/AssetProperties.java +++ /dev/null @@ -1,194 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetmanager.properties; - -import com.fasterxml.jackson.annotation.*; - -import java.util.*; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * DataAssetProperties is a java bean used to create assets associated with the external asset manager. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes( - { - @JsonSubTypes.Type(value = DataAssetProperties.class, name = "DataAssetProperties"), - @JsonSubTypes.Type(value = ProcessProperties.class, name = "ProcessProperties"), - }) -public class AssetProperties extends SupplementaryProperties -{ - private String technicalName = null; - private String versionIdentifier = null; - private String technicalDescription = null; - - /** - * Default constructor - */ - public AssetProperties() - { - } - - - /** - * Copy/clone constructor. Note, this is a deep copy - * - * @param template object to copy - */ - public AssetProperties(AssetProperties template) - { - super(template); - - if (template != null) - { - technicalName = template.getTechnicalName(); - versionIdentifier = template.getVersionIdentifier(); - technicalDescription = template.getTechnicalDescription(); - } - } - - - /** - * Returns the stored name property for the asset. This is the technical name of the asset rather than the name - * that it is commonly known as. If no technical name is available then null is returned. - * - * @return String name - */ - public String getTechnicalName() - { - return technicalName; - } - - - /** - * Set up the stored name property for the asset. This is the technical name of the asset rather than the name - * that it is commonly known as. - * - * @param technicalName String name - */ - public void setTechnicalName(String technicalName) - { - this.technicalName = technicalName; - } - - - /** - * Set up the version identifier of the resource. - * - * @return string version name - */ - public String getVersionIdentifier() - { - return versionIdentifier; - } - - - /** - * Set up the version identifier of the resource. - * - * @param versionIdentifier string version name - */ - public void setVersionIdentifier(String versionIdentifier) - { - this.versionIdentifier = versionIdentifier; - } - - - /** - * Returns the stored technical description property for the asset. - * If no technical description is provided then null is returned. - * - * @return String text - */ - public String getTechnicalDescription() - { - return technicalDescription; - } - - - /** - * Set up the stored technical description property associated with the asset. - * - * @param description String text - */ - public void setTechnicalDescription(String description) - { - this.technicalDescription = description; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "AssetProperties{" + - "technicalName='" + technicalName + '\'' + - ", versionIdentifier='" + versionIdentifier + '\'' + - ", technicalDescription='" + technicalDescription + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - ", displayName='" + getDisplayName() + '\'' + - ", summary='" + getSummary() + '\'' + - ", description='" + getDescription() + '\'' + - ", abbreviation='" + getAbbreviation() + '\'' + - ", usage='" + getUsage() + '\'' + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (! (objectToCompare instanceof AssetProperties)) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - AssetProperties that = (AssetProperties) objectToCompare; - return Objects.equals(technicalName, that.technicalName) && Objects.equals(versionIdentifier, that.versionIdentifier) && Objects.equals( - technicalDescription, that.technicalDescription); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), technicalName, versionIdentifier, technicalDescription); - } -} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/CapabilityDeploymentProperties.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/CapabilityDeploymentProperties.java deleted file mode 100644 index cc96d39efc1..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/CapabilityDeploymentProperties.java +++ /dev/null @@ -1,284 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetmanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.openmetadata.enums.OperationalStatus; - -import java.util.Date; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * CapabilityDeploymentProperties describes the properties for the SupportedSoftwareCapability relationship between a ITInfrastructure asset - * and a Software Capability. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class CapabilityDeploymentProperties extends RelationshipProperties -{ - private static final String deploymentTimeProperty = "deploymentTime"; - private static final String deployerProperty = "deployer"; - private static final String deployerTypeNameProperty = "deployerTypeName"; - private static final String deployerPropertyNameProperty = "deployerPropertyName"; - private static final String deploymentStatusProperty = "serverCapabilityStatus"; - - - private Date deploymentTime = null; - private String deployer = null; - private String deployerTypeName = null; - private String deployerPropertyName = null; - private OperationalStatus softwareCapabilityStatus = null; - - - /** - * Default constructor - */ - public CapabilityDeploymentProperties() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public CapabilityDeploymentProperties(CapabilityDeploymentProperties template) - { - super(template); - - if (template != null) - { - deploymentTime = template.getDeploymentTime(); - deployer = template.getDeployer(); - deployerTypeName = template.getDeployerTypeName(); - deployerPropertyName = template.getDeployerPropertyName(); - softwareCapabilityStatus = template.getSoftwareCapabilityStatus(); - } - } - - - /** - * Turn the properties into a property map. - * - * @return property map. - */ - public Map cloneToMap() - { - Map propertyMap = new HashMap<>(); - - if (deploymentTime != null) - { - propertyMap.put(deploymentTimeProperty, deploymentTime); - } - - if (deployer != null) - { - propertyMap.put(deployerProperty, deployer); - } - - if (deployerTypeName != null) - { - propertyMap.put(deployerTypeNameProperty, deployerTypeName); - } - - if (deployerPropertyName != null) - { - propertyMap.put(deployerPropertyNameProperty, deployerPropertyName); - } - - if (softwareCapabilityStatus != null) - { - propertyMap.put(deploymentStatusProperty, softwareCapabilityStatus.getOpenTypeOrdinal()); - } - - if (! propertyMap.isEmpty()) - { - propertyMap = null; - } - - return propertyMap; - } - - - - /** - * Return the time that the capability was deployed into the server. - * - * @return date/time - */ - public Date getDeploymentTime() - { - return deploymentTime; - } - - - /** - * Set up the time that the capability was deployed into the server. - * - * @param deploymentTime date/time - */ - public void setDeploymentTime(Date deploymentTime) - { - this.deploymentTime = deploymentTime; - } - - - /** - * Return the userId of the deployer. - * - * @return name - */ - public String getDeployer() - { - return deployer; - } - - - /** - * Set up the userId of the deployer. - * - * @param deployer name - */ - public void setDeployer(String deployer) - { - this.deployer = deployer; - } - - - /** - * Return the type name of the element used to represent the deployer. - * - * @return string name - */ - public String getDeployerTypeName() - { - return deployerTypeName; - } - - - /** - * Set up the type name of the element used to represent the deployer. - * - * @param deployerTypeName string name - */ - public void setDeployerTypeName(String deployerTypeName) - { - this.deployerTypeName = deployerTypeName; - } - - - /** - * Return the property name from the element used to represent the deployer. - * - * @return string name - */ - public String getDeployerPropertyName() - { - return deployerPropertyName; - } - - - /** - * Set up the property name from the element used to represent the deployer. - * - * @param deployerPropertyName string name - */ - public void setDeployerPropertyName(String deployerPropertyName) - { - this.deployerPropertyName = deployerPropertyName; - } - - - /** - * Return whether the capability is ready to use. - * - * @return operational status enum - */ - public OperationalStatus getSoftwareCapabilityStatus() - { - return softwareCapabilityStatus; - } - - - /** - * Set up whether the capability is ready to use. - * - * @param softwareCapabilityStatus operational status enum - */ - public void setSoftwareCapabilityStatus(OperationalStatus softwareCapabilityStatus) - { - this.softwareCapabilityStatus = softwareCapabilityStatus; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "CapabilityDeploymentProperties{" + - "deploymentTime=" + deploymentTime + - ", deployer='" + deployer + '\'' + - ", deployerTypeName='" + deployerTypeName + '\'' + - ", deployerPropertyName='" + deployerPropertyName + '\'' + - ", softwareCapabilityStatus=" + softwareCapabilityStatus + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - CapabilityDeploymentProperties that = (CapabilityDeploymentProperties) objectToCompare; - return Objects.equals(deploymentTime, that.deploymentTime) && - Objects.equals(deployer, that.deployer) && - Objects.equals(deployerTypeName, that.deployerTypeName) && - Objects.equals(deployerPropertyName, that.deployerPropertyName) && - softwareCapabilityStatus == that.softwareCapabilityStatus; - } - - - /** - * Hash code for this object - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), deploymentTime, deployer, deployerTypeName, deployerPropertyName, softwareCapabilityStatus); - } -} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/ClassificationProperties.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/ClassificationProperties.java deleted file mode 100644 index a8a91457089..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/ClassificationProperties.java +++ /dev/null @@ -1,205 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetmanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; - -import java.util.Date; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ClassificationProperties provides the base class for classification items. This provides extended properties with the ability to - * set effectivity dates. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes( - { - @JsonSubTypes.Type(value = ActivityDescriptionProperties.class, name = "ActivityDescriptionProperties"), - @JsonSubTypes.Type(value = AssetOriginProperties.class, name = "AssetOriginProperties"), - @JsonSubTypes.Type(value = CanonicalVocabularyProperties.class, name = "CanonicalVocabularyProperties"), - @JsonSubTypes.Type(value = DataFieldValuesProperties.class, name = "DataFieldValuesProperties"), - @JsonSubTypes.Type(value = EditingGlossaryProperties.class, name = "EditingGlossaryProperties"), - @JsonSubTypes.Type(value = GlossaryTermContextDefinition.class, name = "GlossaryTermContextDefinition"), - @JsonSubTypes.Type(value = GovernanceClassificationBase.class, name = "GovernanceClassificationBase"), - @JsonSubTypes.Type(value = OwnerProperties.class, name = "OwnerProperties"), - @JsonSubTypes.Type(value = SecurityTagsProperties.class, name = "SecurityTagsProperties"), - @JsonSubTypes.Type(value = StagingGlossaryProperties.class, name = "StagingGlossaryProperties"), - @JsonSubTypes.Type(value = SubjectAreaMemberProperties.class, name = "SubjectAreaMemberProperties"), - @JsonSubTypes.Type(value = TaxonomyProperties.class, name = "TaxonomyProperties"), - }) -public class ClassificationProperties -{ - private Date effectiveFrom = null; - private Date effectiveTo = null; - - private Map extendedProperties = null; - - - /** - * Default constructor - */ - public ClassificationProperties() - { - super(); - } - - - /** - * Copy/clone constructor. Retrieve values from the supplied template - * - * @param template element to copy - */ - public ClassificationProperties(ClassificationProperties template) - { - if (template != null) - { - effectiveFrom = template.getEffectiveFrom(); - effectiveTo = template.getEffectiveTo(); - extendedProperties = template.getExtendedProperties(); - } - } - - - /** - * Return the date/time that this element is effective from (null means effective from the epoch). - * - * @return date object - */ - public Date getEffectiveFrom() - { - return effectiveFrom; - } - - - /** - * Set up the date/time that this element is effective from (null means effective from the epoch). - * - * @param effectiveFrom date object - */ - public void setEffectiveFrom(Date effectiveFrom) - { - this.effectiveFrom = effectiveFrom; - } - - - /** - * Return the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @return date object - */ - public Date getEffectiveTo() - { - return effectiveTo; - } - - - /** - * Set the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @param effectiveTo date object - */ - public void setEffectiveTo(Date effectiveTo) - { - this.effectiveTo = effectiveTo; - } - - - /** - * Return the properties that have been defined for a subtype of this object that are not supported explicitly - * by this bean. - * - * @return property map - */ - public Map getExtendedProperties() - { - if (extendedProperties == null) - { - return null; - } - else if (extendedProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(extendedProperties); - } - } - - - /** - * Set up the properties that have been defined for a subtype of this object that are not supported explicitly - * by this bean. - * - * @param extendedProperties property map - */ - public void setExtendedProperties(Map extendedProperties) - { - this.extendedProperties = extendedProperties; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "RelationshipProperties{" + - "effectiveFrom=" + effectiveFrom + - ", effectiveTo=" + effectiveTo + - ", extendedProperties=" + extendedProperties + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ClassificationProperties that = (ClassificationProperties) objectToCompare; - return Objects.equals(effectiveFrom, that.effectiveFrom) && - Objects.equals(effectiveTo, that.effectiveTo); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(effectiveFrom, effectiveTo); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/CommentProperties.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/CommentProperties.java deleted file mode 100644 index ad9319023c2..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/CommentProperties.java +++ /dev/null @@ -1,190 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetmanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.openmetadata.enums.CommentType; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * The CommentProperties bean stores information about a comment connected to an asset. Comments provide informal feedback to assets - * and can be added at any time. - * - * Comments have the userId of the person who added the feedback, along with their comment text. - * - * The content of the comment is a personal statement (which is why the user's id is in the comment) - * and there is no formal review of the content. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class CommentProperties extends ReferenceableProperties -{ - private CommentType commentType = null; - private String commentText = null; - private String user = null; - - /** - * Default constructor - */ - public CommentProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template element to copy - */ - public CommentProperties(CommentProperties template) - { - super(template); - - if (template != null) - { - /* - * Copy the values from the supplied comment. - */ - commentType = template.getCommentType(); - user = template.getUser(); - commentText = template.getCommentText(); - } - } - - - /** - * Return an enum that describes the type of comment. - * - * @return CommentType enum - */ - public CommentType getCommentType() - { - return commentType; - } - - - /** - * Set up the enum that describes the type of comment. - * - * @param commentType CommentType enum - */ - public void setCommentType(CommentType commentType) - { - this.commentType = commentType; - } - - - /** - * Return the comment text. - * - * @return String commentText - */ - public String getCommentText() - { - return commentText; - } - - - /** - * Set up the comment text. - * - * @param commentText String text - */ - public void setCommentText(String commentText) - { - this.commentText = commentText; - } - - - /** - * Return the user id of the person who created the comment. Null means the user id is not known. - * - * @return String commenting user - */ - public String getUser() - { - return user; - } - - - /** - * Set up the user id of the person who created the comment. Null means the user id is not known. - * - * @param user String commenting user - */ - public void setUser(String user) - { - this.user = user; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "CommentProperties{" + - "commentType=" + commentType + - ", commentText='" + commentText + '\'' + - ", user='" + user + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - CommentProperties that = (CommentProperties) objectToCompare; - return commentType == that.commentType && - Objects.equals(commentText, that.commentText) && - Objects.equals(user, that.user); - } - - - /** - * Create a hash code for this element type. - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), commentType, commentText, user); - } -} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/ConnectionProperties.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/ConnectionProperties.java deleted file mode 100644 index 2442b6a9f29..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/ConnectionProperties.java +++ /dev/null @@ -1,375 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetmanager.properties; - -import com.fasterxml.jackson.annotation.*; - -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * The connection is an object that contains the properties needed to create and initialise a connector to access a - * specific data assets. - *

- * The properties for a connection are defined in model 0201. They include the following options for connector name: - *
    - *
  • - * guid - Globally unique identifier for the connection. - *
  • - *
  • - * url - URL of the connection definition in the metadata repository. - * This URL can be stored as a property in another entity to create an explicit link to this connection. - *
  • - *
  • - * qualifiedName - The official (unique) name for the connection. - * This is often defined by the IT systems management organization and should be used (when available) on - * audit logs and error messages. The qualifiedName is defined in the 0010 model as part of Referenceable. - *
  • - *
  • - * displayName - A consumable name for the connection. Often a shortened form of the qualifiedName for use - * on user interfaces and messages. The displayName should be only be used for audit logs and error messages - * if the qualifiedName is not set. - *
  • - *
- * - * Either the guid, qualifiedName or displayName can be used to specify the name for a connection. - *

- * Other properties for the connection include: - *
    - *
  • - * type - information about the TypeDef for Connection - *
  • - *
  • - * description - A full description of the connection covering details of the assets it connects to - * along with usage and version information. - *
  • - *
  • - * additionalProperties - Any additional properties associated with the connection. - *
  • - *
  • - * configurationProperties - properties for configuring the connector. - *
  • - *
  • - * securedProperties - Protected properties for secure log on by connector to back end server. These - * are protected properties that can only be retrieved by privileged connector code. - *
  • - *
  • - * userId - name or URI or connecting user. - *
  • - *
  • - * encryptedPassword - password for the userId - needs decrypting by connector before use. - *
  • - *
  • - * clearPassword - password for userId - ready to use. - *
  • - *
  • - * connectorType - Properties that describe the connector type for the connector. - *
  • - *
  • - * endpoint - Properties that describe the server endpoint where the connector will retrieve the assets. - *
  • - *
  • - * assetSummary - short description of the connected asset (if any). - *
  • - *
- * - * The connection class is simply used to cache the properties for a connection. - * It is used by other classes to exchange this information between a metadata repository and a consumer. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ConnectionProperties extends ReferenceableProperties -{ - private String displayName = null; - private String description = null; - private String userId = null; - private String encryptedPassword = null; - private String clearPassword = null; - private Map configurationProperties = null; - private Map securedProperties = null; - - - /** - * Default constructor sets the Connection properties to null. - */ - public ConnectionProperties() - { - super(); - } - - - /** - * Copy/clone Constructor to return a copy of a connection object. - * - * @param template Connection to copy - */ - public ConnectionProperties(ConnectionProperties template) - { - super(template); - - if (template != null) - { - displayName = template.getDisplayName(); - description = template.getDescription(); - userId = template.getUserId(); - clearPassword = template.getClearPassword(); - encryptedPassword = template.getEncryptedPassword(); - configurationProperties = template.getConfigurationProperties(); - securedProperties = template.getSecuredProperties(); - } - } - - - /** - * Returns the stored display name property for the connection. - * Null means no displayName is available. - * - * @return displayName - */ - public String getDisplayName() { return displayName; } - - - /** - * Set up the display name for UIs and reports. - * - * @param displayName String name - */ - public void setDisplayName(String displayName) - { - this.displayName = displayName; - } - - - /** - * Set up description of the element. - * - * @param description String - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * Returns the stored description property for the connection. - * If no description is provided then null is returned. - * - * @return description - */ - public String getDescription() - { - return description; - } - - - /** - * Return the userId to use on this connection. - * - * @return string - */ - public String getUserId() - { - return userId; - } - - - /** - * Set up the userId to use on this connection. - * - * @param userId string - */ - public void setUserId(String userId) - { - this.userId = userId; - } - - - /** - * Return an encrypted password. The caller is responsible for decrypting it. - * - * @return string - */ - public String getEncryptedPassword() - { - return encryptedPassword; - } - - - /** - * Set up an encrypted password. - * - * @param encryptedPassword string - */ - public void setEncryptedPassword(String encryptedPassword) - { - this.encryptedPassword = encryptedPassword; - } - - - /** - * Return an unencrypted password. - * - * @return string - */ - public String getClearPassword() - { - return clearPassword; - } - - - /** - * Set up an unencrypted password. - * - * @param clearPassword string - */ - public void setClearPassword(String clearPassword) - { - this.clearPassword = clearPassword; - } - - - /** - * Set up the configuration properties for this Connection. - * - * @param configurationProperties properties that contain additional configuration information for the connector. - */ - public void setConfigurationProperties(Map configurationProperties) - { - this.configurationProperties = configurationProperties; - } - - - /** - * Return a copy of the configuration properties. Null means no secured properties are available. - * - * @return secured properties typically user credentials for the connection - */ - public Map getConfigurationProperties() - { - if (configurationProperties == null) - { - return null; - } - else if (configurationProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(configurationProperties); - } - } - - - /** - * Set up the secured properties for this Connection. - * - * @param securedProperties properties that contain secret information such as log on information. - */ - public void setSecuredProperties(Map securedProperties) - { - this.securedProperties = securedProperties; - } - - - /** - * Return a copy of the secured properties. Null means no secured properties are available. - * - * @return secured properties typically user credentials for the connection - */ - public Map getSecuredProperties() - { - if (securedProperties == null) - { - return null; - } - else if (securedProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(securedProperties); - } - } - - - /** - * Standard toString method. Note SecuredProperties and other credential type properties are not displayed. - * This is deliberate because there is no knowing where the string will be printed. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "ConnectionProperties{" + - "displayName='" + displayName + '\'' + - ", description='" + description + '\'' + - ", userId='" + userId + '\'' + - ", encryptedPassword='" + encryptedPassword + '\'' + - ", clearPassword='" + clearPassword + '\'' + - ", configurationProperties=" + configurationProperties + - ", securedProperties=" + securedProperties + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ConnectionProperties that = (ConnectionProperties) objectToCompare; - return Objects.equals(getDisplayName(), that.getDisplayName()) && - Objects.equals(getDescription(), that.getDescription()) && - Objects.equals(getUserId(), that.getUserId()) && - Objects.equals(getEncryptedPassword(), that.getEncryptedPassword()) && - Objects.equals(getClearPassword(), that.getClearPassword()) && - Objects.equals(getConfigurationProperties(), that.getConfigurationProperties()) && - Objects.equals(getSecuredProperties(), that.getSecuredProperties()); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), getDisplayName(), getDescription(), - getUserId(), getEncryptedPassword(), getClearPassword(), getSecuredProperties(), - getConfigurationProperties()); - } -} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/ConnectorTypeProperties.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/ConnectorTypeProperties.java deleted file mode 100644 index 53bba25c6e5..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/ConnectorTypeProperties.java +++ /dev/null @@ -1,610 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetmanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * The ConnectorTypeProperties describe the implementation details of a particular type of connector. - * The properties for a connector type are defined in model 0201. - * They include: - * - *
    - *
  • - * guid - Globally unique identifier for the connector type. - *
  • - *
  • - * qualifiedName - The official (unique) name for the connector type. This is often defined by the IT - * systems management organization and should be used (when available) on audit logs and error messages. - *
  • - *
  • - * displayName - A consumable name for the connector type. Often a shortened form of the qualifiedName for use - * on user interfaces and messages. The displayName should be only be used for audit logs and error messages - * if the qualifiedName is not set. - *
  • - *
  • - * description - A full description of the connector type covering details of the assets it connects to - * along with usage and versioning information. - *
  • - *
  • - * supportedAssetTypeName - the type of asset that the connector implementation supports. - *
  • - *
  • - * expectedDataFormat - the format of the data that the connector supports - null for "any". - *
  • - *
  • - * connectorProviderClassName - The connector provider is the factory for a particular type of connector. - * This property defines the class name for the connector provider that the Connector Broker should use to request - * new connector instances. - *
  • - *
  • - * connectorFrameworkName - name of the connector framework that the connector implements - default Open Connector Framework (OCF). - *
  • - *
  • - * connectorInterfaceLanguage - the language that the connector is implemented in - default Java. - *
  • - *
  • - * connectorInterfaces - list of interfaces that the connector supports. - *
  • - *
  • - * targetTechnologySource - the organization that supplies the target technology that the connector implementation connects to. - *
  • - *
  • - * targetTechnologyName - the name of the target technology that the connector implementation connects to. - *
  • - *
  • - * targetTechnologyInterfaces - the names of the interfaces in the target technology that the connector calls. - *
  • - *
  • - * targetTechnologyVersions - the versions of the target technology that the connector supports. - *
  • - *
  • - * recognizedAdditionalProperties - these are the Connection additional properties recognized by the connector implementation - *
  • - *
  • - * recognizedConfigurationProperties - these are the Connection configuration properties recognized by the connector implementation - *
  • - *
  • - * recognizedSecuredProperties - these are the Connection secured properties recognized by the connector implementation - *
  • - *
  • - * additionalProperties - Any additional properties that the connector provider needs to know in order to - * create connector instances. - *
  • - *
- * - * The connectorTypeProperties class is simply used to cache the properties for a connector type. - * It is used by other classes to exchange this information between a metadata repository and a consumer. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ConnectorTypeProperties extends ReferenceableProperties -{ - private String displayName = null; - private String description = null; - private String supportedAssetTypeName = null; - private String expectedDataFormat = null; - private String connectorProviderClassName = null; - private String connectorFrameworkName = null; - private String connectorInterfaceLanguage = null; - private List connectorInterfaces = null; - private String targetTechnologySource = null; - private String targetTechnologyName = null; - private List targetTechnologyInterfaces = null; - private List targetTechnologyVersions = null; - private List recognizedAdditionalProperties = null; - private List recognizedConfigurationProperties = null; - private List recognizedSecuredProperties = null; - - - - /** - * Default constructor - */ - public ConnectorTypeProperties() - { - super(); - } - - - /** - * Copy/clone constructor for a connectorType that is not connected to an asset (either directly or indirectly). - * - * @param template template object to copy. - */ - public ConnectorTypeProperties(ConnectorTypeProperties template) - { - super(template); - - if (template != null) - { - displayName = template.getDisplayName(); - description = template.getDescription(); - supportedAssetTypeName = template.getSupportedAssetTypeName(); - expectedDataFormat = template.getExpectedDataFormat(); - connectorProviderClassName = template.getConnectorProviderClassName(); - connectorFrameworkName = template.getConnectorFrameworkName(); - connectorInterfaceLanguage = template.getConnectorInterfaceLanguage(); - connectorInterfaces = template.getConnectorInterfaces(); - targetTechnologySource = template.getTargetTechnologySource(); - targetTechnologyName = template.getTargetTechnologyName(); - targetTechnologyInterfaces = template.getTargetTechnologyInterfaces(); - targetTechnologyVersions = template.getTargetTechnologyVersions(); - recognizedAdditionalProperties = template.getRecognizedAdditionalProperties(); - recognizedConfigurationProperties = template.getRecognizedConfigurationProperties(); - recognizedSecuredProperties = template.getRecognizedSecuredProperties(); - } - } - - /** - * Set up the display name for UIs and reports. - * - * @param displayName String name - */ - public void setDisplayName(String displayName) - { - this.displayName = displayName; - } - - - /** - * Returns the stored display name property for the connector type. - * If no display name is available then null is returned. - * - * @return displayName - */ - public String getDisplayName() - { - return displayName; - } - - - /** - * Set up description of the element. - * - * @param description String - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * Returns the stored description property for the connector type. - * If no description is available then null is returned. - * - * @return description - */ - public String getDescription() - { - return description; - } - - - /** - * Return the type of asset that the connector implementation supports. - * - * @return string name - */ - public String getSupportedAssetTypeName() - { - return supportedAssetTypeName; - } - - - /** - * Set up the type of asset that the connector implementation supports. - * - * @param supportedAssetTypeName string name - */ - public void setSupportedAssetTypeName(String supportedAssetTypeName) - { - this.supportedAssetTypeName = supportedAssetTypeName; - } - - - /** - * Return the format of the data that the connector supports - null for "any". - * - * @return string name - */ - public String getExpectedDataFormat() - { - return expectedDataFormat; - } - - - /** - * Set up the format of the data that the connector supports - null for "any". - * - * @param expectedDataFormat string name - */ - public void setExpectedDataFormat(String expectedDataFormat) - { - this.expectedDataFormat = expectedDataFormat; - } - - - /** - * The name of the connector provider class name. - * - * @param connectorProviderClassName String class name - */ - public void setConnectorProviderClassName(String connectorProviderClassName) - { - this.connectorProviderClassName = connectorProviderClassName; - } - - - /** - * Returns the stored connectorProviderClassName property for the connector type. - * If no connectorProviderClassName is available then null is returned. - * - * @return connectorProviderClassName class name (including package name) - */ - public String getConnectorProviderClassName() - { - return connectorProviderClassName; - } - - - /** - * Return name of the connector framework that the connector implements - default Open Connector Framework (OCF). - * - * @return string name - */ - public String getConnectorFrameworkName() - { - return connectorFrameworkName; - } - - - /** - * Set up name of the connector framework that the connector implements - default Open Connector Framework (OCF). - * - * @param connectorFrameworkName string name - */ - public void setConnectorFrameworkName(String connectorFrameworkName) - { - this.connectorFrameworkName = connectorFrameworkName; - } - - - /** - * Return the language that the connector is implemented in - default Java. - * - * @return string name - */ - public String getConnectorInterfaceLanguage() - { - return connectorInterfaceLanguage; - } - - - /** - * Set up the language that the connector is implemented in - default Java. - * - * @param connectorInterfaceLanguage string name - */ - public void setConnectorInterfaceLanguage(String connectorInterfaceLanguage) - { - this.connectorInterfaceLanguage = connectorInterfaceLanguage; - } - - - /** - * Return list of interfaces that the connector supports. - * - * @return list of names - */ - public List getConnectorInterfaces() - { - return connectorInterfaces; - } - - - /** - * Set up list of interfaces that the connector supports. - * - * @param connectorInterfaces list of names - */ - public void setConnectorInterfaces(List connectorInterfaces) - { - this.connectorInterfaces = connectorInterfaces; - } - - - /** - * Return the name of the organization that supplies the target technology that the connector implementation connects to. - * - * @return string name - */ - public String getTargetTechnologySource() - { - return targetTechnologySource; - } - - - /** - * Set up the name of the organization that supplies the target technology that the connector implementation connects to. - * - * @param targetTechnologySource list of names - */ - public void setTargetTechnologySource(String targetTechnologySource) - { - this.targetTechnologySource = targetTechnologySource; - } - - - /** - * Return the name of the target technology that the connector implementation connects to. - * - * @return string name - */ - public String getTargetTechnologyName() - { - return targetTechnologyName; - } - - - /** - * Set up the name of the target technology that the connector implementation connects to. - * - * @param targetTechnologyName string name - */ - public void setTargetTechnologyName(String targetTechnologyName) - { - this.targetTechnologyName = targetTechnologyName; - } - - - /** - * Return the names of the interfaces in the target technology that the connector calls. - * - * @return list of interface names - */ - public List getTargetTechnologyInterfaces() - { - return targetTechnologyInterfaces; - } - - - /** - * Set up the names of the interfaces in the target technology that the connector calls. - * - * @param targetTechnologyInterfaces list of interface names - */ - public void setTargetTechnologyInterfaces(List targetTechnologyInterfaces) - { - this.targetTechnologyInterfaces = targetTechnologyInterfaces; - } - - - /** - * Return the versions of the target technology that the connector supports. - * - * @return list of version identifiers - */ - public List getTargetTechnologyVersions() - { - return targetTechnologyVersions; - } - - - /** - * Set up the versions of the target technology that the connector supports. - * - * @param targetTechnologyVersions list of version identifiers - */ - public void setTargetTechnologyVersions(List targetTechnologyVersions) - { - this.targetTechnologyVersions = targetTechnologyVersions; - } - - - /** - * Set up the list of property names that this connector/connector provider implementation looks for - * in the Connection object's additionalProperties. - * - * @param recognizedAdditionalProperties list of property names - */ - public void setRecognizedAdditionalProperties(List recognizedAdditionalProperties) - { - this.recognizedAdditionalProperties = recognizedAdditionalProperties; - } - - - /** - * Return the list of property names that this connector/connector provider implementation looks for - * in the Connection object's additionalProperties. - * - * @return list of property names - */ - public List getRecognizedAdditionalProperties() - { - if (recognizedAdditionalProperties == null) - { - return null; - } - else if (recognizedAdditionalProperties.isEmpty()) - { - return null; - } - else - { - return recognizedAdditionalProperties; - } - } - - - /** - * Set up the list of property names that this connector/connector provider implementation looks for - * in the Connection object's configurationProperties. - * - * @param recognizedConfigurationProperties list of property names - */ - public void setRecognizedConfigurationProperties(List recognizedConfigurationProperties) - { - - this.recognizedConfigurationProperties = recognizedConfigurationProperties; - } - - - /** - * Return the list of property names that this connector/connector provider implementation looks for - * in the Connection object's configurationProperties. - * - * @return list of property names - */ - public List getRecognizedConfigurationProperties() - { - if (recognizedConfigurationProperties == null) - { - return null; - } - else if (recognizedConfigurationProperties.isEmpty()) - { - return null; - } - else - { - return recognizedConfigurationProperties; - } - } - - - /** - * Set up the list of property names that this connector/connector provider implementation looks for - * in the Connection object's securedProperties. - * - * @param recognizedSecuredProperties list of property names - */ - public void setRecognizedSecuredProperties(List recognizedSecuredProperties) - { - this.recognizedSecuredProperties = recognizedSecuredProperties; - } - - - /** - * Return the list of property names that this connector/connector provider implementation looks for - * in the Connection object's securedProperties. - * - * @return list of property names - */ - public List getRecognizedSecuredProperties() - { - if (recognizedSecuredProperties == null) - { - return null; - } - else if (recognizedSecuredProperties.isEmpty()) - { - return null; - } - else - { - return recognizedSecuredProperties; - } - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "ConnectorTypeProperties{" + - "displayName='" + displayName + '\'' + - ", description='" + description + '\'' + - ", supportedAssetTypeName='" + supportedAssetTypeName + '\'' + - ", expectedDataFormat='" + expectedDataFormat + '\'' + - ", connectorProviderClassName='" + connectorProviderClassName + '\'' + - ", connectorFrameworkName='" + connectorFrameworkName + '\'' + - ", connectorInterfaceLanguage='" + connectorInterfaceLanguage + '\'' + - ", connectorInterfaces=" + connectorInterfaces + - ", targetTechnologySource='" + targetTechnologySource + '\'' + - ", targetTechnologyName='" + targetTechnologyName + '\'' + - ", targetTechnologyInterfaces=" + targetTechnologyInterfaces + - ", targetTechnologyVersions=" + targetTechnologyVersions + - ", recognizedAdditionalProperties=" + recognizedAdditionalProperties + - ", recognizedConfigurationProperties=" + recognizedConfigurationProperties + - ", recognizedSecuredProperties=" + recognizedSecuredProperties + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - ConnectorTypeProperties that = (ConnectorTypeProperties) objectToCompare; - return Objects.equals(displayName, that.displayName) && - Objects.equals(description, that.description) && - Objects.equals(supportedAssetTypeName, that.supportedAssetTypeName) && - Objects.equals(expectedDataFormat, that.expectedDataFormat) && - Objects.equals(connectorProviderClassName, that.connectorProviderClassName) && - Objects.equals(connectorFrameworkName, that.connectorFrameworkName) && - Objects.equals(connectorInterfaceLanguage, that.connectorInterfaceLanguage) && - Objects.equals(connectorInterfaces, that.connectorInterfaces) && - Objects.equals(targetTechnologySource, that.targetTechnologySource) && - Objects.equals(targetTechnologyName, that.targetTechnologyName) && - Objects.equals(targetTechnologyInterfaces, that.targetTechnologyInterfaces) && - Objects.equals(targetTechnologyVersions, that.targetTechnologyVersions) && - Objects.equals(recognizedAdditionalProperties, that.recognizedAdditionalProperties) && - Objects.equals(recognizedConfigurationProperties, that.recognizedConfigurationProperties) && - Objects.equals(recognizedSecuredProperties, that.recognizedSecuredProperties); - } - - - /** - * Hash of properties - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), displayName, description, supportedAssetTypeName, expectedDataFormat, connectorProviderClassName, - connectorFrameworkName, connectorInterfaceLanguage, connectorInterfaces, targetTechnologySource, targetTechnologyName, - targetTechnologyInterfaces, targetTechnologyVersions, recognizedAdditionalProperties, recognizedConfigurationProperties, - recognizedSecuredProperties); - } -} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/ControlFlowProperties.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/ControlFlowProperties.java deleted file mode 100644 index 2df5004cdd0..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/ControlFlowProperties.java +++ /dev/null @@ -1,176 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetmanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ControlFlowProperties describe the properties for a control flow relationship. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ControlFlowProperties extends RelationshipProperties -{ - private String qualifiedName = null; - private String description = null; - private String guard = null; - - - /** - * Default constructor - */ - public ControlFlowProperties() - { - super(); - } - - - /** - * Copy/clone constructor. Retrieve values from the supplied template - * - * @param template element to copy - */ - public ControlFlowProperties(ControlFlowProperties template) - { - super(template); - if (template != null) - { - qualifiedName = template.getQualifiedName(); - description = template.getDescription(); - guard = template.getGuard(); - } - } - - - /** - * Set up the fully qualified name. - * - * @param qualifiedName String name - */ - public void setQualifiedName(String qualifiedName) - { - this.qualifiedName = qualifiedName; - } - - - /** - * Returns the stored qualified name property for the relationship. - * If no qualified name is available then the empty string is returned. - * - * @return qualifiedName - */ - public String getQualifiedName() - { - return qualifiedName; - } - - - /** - * Return the description of the relationship. - * - * @return string text - */ - public String getDescription() - { - return description; - } - - - /** - * Set up the description of the relationship. - * - * @param description string text - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * Return the guard of the relationship. - * - * @return string guard - */ - public String getGuard() - { - return guard; - } - - - /** - * Set up the guard of the relationship. - * - * @param guard string name - */ - public void setGuard(String guard) - { - this.guard = guard; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "ControlFlowProperties{" + - "qualifiedName='" + qualifiedName + '\'' + - ", description='" + description + '\'' + - ", guard='" + guard + '\'' + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - ControlFlowProperties that = (ControlFlowProperties) objectToCompare; - return Objects.equals(qualifiedName, that.qualifiedName) && - Objects.equals(description, that.description) && - Objects.equals(guard, that.guard); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), qualifiedName, description, guard); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/CyberLocation.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/CyberLocation.java deleted file mode 100644 index 80d9cf34d53..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/CyberLocation.java +++ /dev/null @@ -1,117 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetmanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * CyberLocation indicates that a location is a cyber location rather than a physical location. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class CyberLocation -{ - private String address = null; - - - /** - * Default constructor - */ - public CyberLocation() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template template object to copy. - */ - public CyberLocation(CyberLocation template) - { - if (template != null) - { - address = template.getAddress(); - } - } - - - /** - * Set up address of the location. - * - * @param address String - */ - public void setAddress(String address) - { - this.address = address; - } - - - /** - * Return the address for the location. - * - * @return String address - */ - public String getAddress() - { - return address; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "CyberLocation{" + - "address='" + address + '\'' + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - CyberLocation that = (CyberLocation) objectToCompare; - return Objects.equals(address, that.address); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(address); - } -} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/DataAssetProperties.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/DataAssetProperties.java deleted file mode 100644 index 386ee16a5b4..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/DataAssetProperties.java +++ /dev/null @@ -1,169 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetmanager.properties; - -import com.fasterxml.jackson.annotation.*; - -import java.util.*; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * DataAssetProperties is a java bean used to create assets associated with the external asset manager. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes( - { - @JsonSubTypes.Type(value = DataSetProperties.class, name = "DataSetProperties"), - @JsonSubTypes.Type(value = DataStoreProperties.class, name = "DataStoreProperties"), - }) -public class DataAssetProperties extends AssetProperties -{ - private boolean isReferenceAsset = false; - private String deployedImplementationType = null; - - - /** - * Default constructor - */ - public DataAssetProperties() - { - } - - - /** - * Copy/clone constructor. Note, this is a deep copy - * - * @param template object to copy - */ - public DataAssetProperties(DataAssetProperties template) - { - super(template); - - if (template != null) - { - isReferenceAsset = template.getIsReferenceAsset(); - deployedImplementationType = template.getDeployedImplementationType(); - } - } - - - /** - * Return whether this being used as a reference data set. - * - * @return boolean flag - */ - public boolean getIsReferenceAsset() - { - return isReferenceAsset; - } - - - /** - * Set up whether this asset is being used as a reference data set. - * - * @param referenceAsset boolean flag - */ - public void setIsReferenceAsset(boolean referenceAsset) - { - isReferenceAsset = referenceAsset; - } - - - /** - * Retrieve the name of the technology used for this data asset. - * - * @return string name - */ - public String getDeployedImplementationType() - { - return deployedImplementationType; - } - - - /** - * Set up the name of the technology used for this data asset. - * - * @param deployedImplementationType string name - */ - public void setDeployedImplementationType(String deployedImplementationType) - { - this.deployedImplementationType = deployedImplementationType; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "DataAssetProperties{" + - "technicalName='" + getTechnicalName() + '\'' + - ", versionIdentifier='" + getVersionIdentifier() + '\'' + - ", technicalDescription='" + getTechnicalDescription() + '\'' + - ", isReferenceAsset=" + isReferenceAsset + - ", deployedImplementationType=" + deployedImplementationType + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - ", displayName='" + getDisplayName() + '\'' + - ", summary='" + getSummary() + '\'' + - ", description='" + getDescription() + '\'' + - ", abbreviation='" + getAbbreviation() + '\'' + - ", usage='" + getUsage() + '\'' + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - DataAssetProperties that = (DataAssetProperties) objectToCompare; - return isReferenceAsset == that.isReferenceAsset; - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), isReferenceAsset); - } -} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/DataContentForDataSetProperties.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/DataContentForDataSetProperties.java deleted file mode 100644 index bff4efbab5a..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/DataContentForDataSetProperties.java +++ /dev/null @@ -1,145 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetmanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * DataContentForDataSetProperties defines a query on an asset that returns all or part of the values for a dataset. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class DataContentForDataSetProperties extends RelationshipProperties -{ - private String queryId = null; - private String query = null; - - - - /** - * Default constructor - */ - public DataContentForDataSetProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template template to copy. - */ - public DataContentForDataSetProperties(DataContentForDataSetProperties template) - { - super(template); - - if (template != null) - { - queryId = template.getQueryId(); - query = template.getQuery(); - } - } - - - /** - * Return the query id - this is used to identify where the results of this query should be plugged into - * the other queries or the formula for the parent derived schema element. - * - * @return String query identifier - */ - public String getQueryId() { return queryId; } - - - /** - * Set up the query id - this is used to identify where the results of this query should be plugged into - * the other queries or the formula for the parent derived schema element. - * - * @param queryId String query identifier - */ - public void setQueryId(String queryId) - { - this.queryId = queryId; - } - - - /** - * Return the query string for this element. The query string may have placeholders for values returned - * by queries that have a lower queryId than this element. - * - * @return String query - */ - public String getQuery() { return query; } - - - /** - * Set up the query string for this element. The query string may have placeholders for values returned - * by queries that have a lower queryId than this element. - * - * @param query String query - */ - public void setQuery(String query) - { - this.query = query; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "DataContentForDataSetProperties{" + - "queryId='" + queryId + '\'' + - ", query='" + query + '\'' + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof DataContentForDataSetProperties)) - { - return false; - } - DataContentForDataSetProperties that = (DataContentForDataSetProperties) objectToCompare; - return Objects.equals(getQueryId(), that.getQueryId()) && - Objects.equals(getQuery(), that.getQuery()); - } - - - /** - * Create a hash code for this element type. - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(getQueryId(), getQuery()); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/DataFieldQueryProperties.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/DataFieldQueryProperties.java deleted file mode 100644 index c64ed475ee4..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/DataFieldQueryProperties.java +++ /dev/null @@ -1,201 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetmanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * DataFieldQueryProperties is used to provide the properties that can be used to extract an element by the data values classification. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class DataFieldQueryProperties extends FindProperties -{ - private String defaultValue = null; - private List sampleValues = null; - private List dataPattern = null; - private List namePattern = null; - - - /** - * Default constructor - */ - public DataFieldQueryProperties() - { - super(); - } - - - /** - * Copy/clone constructor for an editing glossary classification. - * - * @param template template object to copy. - */ - public DataFieldQueryProperties(DataFieldQueryProperties template) - { - super(template); - - if (template != null) - { - defaultValue = template.getDefaultValue(); - sampleValues = template.getSampleValues(); - dataPattern = template.getDataPattern(); - namePattern = template.getNamePattern(); - } - } - - - /** - * Return the default value typically assigned to these types of data fields. - * - * @return string description - */ - public String getDefaultValue() - { - return defaultValue; - } - - - /** - * Set up the description (typically and overview of the revision) of the glossary. - * - * @param defaultValue string description - */ - public void setDefaultValue(String defaultValue) - { - this.defaultValue = defaultValue; - } - - - /** - * Return a list of sample values for the data field. - * - * @return list of strings - */ - public List getSampleValues() - { - return sampleValues; - } - - - /** - * Set up a list of sample values for the data field. - * - * @param sampleValues list of strings - */ - public void setSampleValues(List sampleValues) - { - this.sampleValues = sampleValues; - } - - - /** - * Return a regular expression that characterizes the data values stored in this data field. - * - * @return string - */ - public List getDataPattern() - { - return dataPattern; - } - - - /** - * Set up a regular expression that characterizes the data values stored in this data field. - * - * @param dataPattern string - */ - public void setDataPattern(List dataPattern) - { - this.dataPattern = dataPattern; - } - - - /** - * Return a regular expression that characterizes the name used for this type of data field. - * - * @return string - */ - public List getNamePattern() - { - return namePattern; - } - - - /** - * Set up a regular expression that characterizes the name used for this type of data field. - * - * @param namePattern string - */ - public void setNamePattern(List namePattern) - { - this.namePattern = namePattern; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "DataFieldQueryProperties{" + - "defaultValue='" + defaultValue + '\'' + - ", sampleValues=" + sampleValues + - ", dataPattern=" + dataPattern + - ", namePattern=" + namePattern + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (! (objectToCompare instanceof DataFieldQueryProperties that)) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - return Objects.equals(defaultValue, that.defaultValue) && - Objects.equals(sampleValues, that.sampleValues) && - Objects.equals(dataPattern, that.dataPattern) && - Objects.equals(namePattern, that.namePattern); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), defaultValue, sampleValues, dataPattern, namePattern); - } -} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/DataFieldValuesProperties.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/DataFieldValuesProperties.java deleted file mode 100644 index ad178a6836e..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/DataFieldValuesProperties.java +++ /dev/null @@ -1,205 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetmanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * DataFieldValuesProperties is used to provide the characterizations of the data values stored in a data field - * described by the attached element. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class DataFieldValuesProperties extends ClassificationProperties -{ - private String defaultValue = null; - private List sampleValues = null; - private List dataPattern = null; - private List namePattern = null; - - - /** - * Default constructor - */ - public DataFieldValuesProperties() - { - super(); - } - - - /** - * Copy/clone constructor for an editing glossary classification. - * - * @param template template object to copy. - */ - public DataFieldValuesProperties(DataFieldValuesProperties template) - { - super(template); - - if (template != null) - { - defaultValue = template.getDefaultValue(); - sampleValues = template.getSampleValues(); - dataPattern = template.getDataPattern(); - namePattern = template.getNamePattern(); - } - } - - - /** - * Return the default value typically assigned to these types of data fields. - * - * @return string description - */ - public String getDefaultValue() - { - return defaultValue; - } - - - /** - * Set up the description (typically and overview of the revision) of the glossary. - * - * @param defaultValue string description - */ - public void setDefaultValue(String defaultValue) - { - this.defaultValue = defaultValue; - } - - - /** - * Return a list of sample values for the data field. - * - * @return list of strings - */ - public List getSampleValues() - { - return sampleValues; - } - - - /** - * Set up a list of sample values for the data field. - * - * @param sampleValues list of strings - */ - public void setSampleValues(List sampleValues) - { - this.sampleValues = sampleValues; - } - - - /** - * Return a regular expression that characterizes the data values stored in this data field. - * - * @return string - */ - public List getDataPattern() - { - return dataPattern; - } - - - /** - * Set up a regular expression that characterizes the data values stored in this data field. - * - * @param dataPattern string - */ - public void setDataPattern(List dataPattern) - { - this.dataPattern = dataPattern; - } - - - /** - * Return a regular expression that characterizes the name used for this type of data field. - * - * @return string - */ - public List getNamePattern() - { - return namePattern; - } - - - /** - * Set up a regular expression that characterizes the name used for this type of data field. - * - * @param namePattern string - */ - public void setNamePattern(List namePattern) - { - this.namePattern = namePattern; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "DataFieldValuesProperties{" + - "defaultValue='" + defaultValue + '\'' + - ", sampleValues=" + sampleValues + - ", dataPattern='" + dataPattern + '\'' + - ", namePattern='" + namePattern + '\'' + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (! (objectToCompare instanceof DataFieldValuesProperties that)) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - return Objects.equals(defaultValue, that.defaultValue) && - Objects.equals(sampleValues, that.sampleValues) && - Objects.equals(dataPattern, that.dataPattern) && - Objects.equals(namePattern, that.namePattern); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), defaultValue, sampleValues, dataPattern, namePattern); - } -} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/DataFlowProperties.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/DataFlowProperties.java deleted file mode 100644 index 46f1855c94a..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/DataFlowProperties.java +++ /dev/null @@ -1,201 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetmanager.properties; - -import com.fasterxml.jackson.annotation.*; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * DataFlowProperties describe the properties for a data flow relationship. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class DataFlowProperties extends RelationshipProperties -{ - private String qualifiedName = null; - private String description = null; - private String formula = null; - private String formulaType = null; - - - /** - * Default constructor - */ - public DataFlowProperties() - { - super(); - } - - - /** - * Copy/clone constructor. Retrieves from the supplied template - * - * @param template element to copy - */ - public DataFlowProperties(DataFlowProperties template) - { - super(template); - - if (template != null) - { - qualifiedName = template.getQualifiedName(); - description = template.getDescription(); - formula = template.getFormula(); - formulaType = template.getFormulaType(); - } - } - - - /** - * Set up the fully qualified name. - * - * @param qualifiedName String name - */ - public void setQualifiedName(String qualifiedName) - { - this.qualifiedName = qualifiedName; - } - - - /** - * Returns the stored qualified name property for the relationship. - * If no qualified name is available then the empty string is returned. - * - * @return qualifiedName - */ - public String getQualifiedName() - { - return qualifiedName; - } - - - /** - * Return the description of the relationship. - * - * @return string text - */ - public String getDescription() - { - return description; - } - - - /** - * Set up the description of the relationship. - * - * @param description string text - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * Return the formula of the relationship. - * - * @return string formula - */ - public String getFormula() - { - return formula; - } - - - /** - * Set up the formula of the relationship. - * - * @param formula string name - */ - public void setFormula(String formula) - { - this.formula = formula; - } - - - /** - * Return the specification language for the formula. - * - * @return string description - */ - public String getFormulaType() - { - return formulaType; - } - - - /** - * Set up the specification language for the formula. - * - * @param formulaType string description - */ - public void setFormulaType(String formulaType) - { - this.formulaType = formulaType; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "DataFlowProperties{" + - "qualifiedName='" + qualifiedName + '\'' + - ", description='" + description + '\'' + - ", formula='" + formula + '\'' + - ", formulaType='" + formulaType + '\'' + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - DataFlowProperties that = (DataFlowProperties) objectToCompare; - return Objects.equals(qualifiedName, that.qualifiedName) && - Objects.equals(description, that.description) && - Objects.equals(formula, that.formula) && - Objects.equals(formulaType, that.formulaType); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), qualifiedName, description, formula, formulaType); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/DataSetProperties.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/DataSetProperties.java deleted file mode 100644 index 979fe305e7a..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/DataSetProperties.java +++ /dev/null @@ -1,165 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetmanager.properties; - -import com.fasterxml.jackson.annotation.*; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * DataSetProperties is a class for representing a generic data set. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class DataSetProperties extends DataAssetProperties -{ - private String formula = null; - private String formulaType = null; - - - /** - * Default constructor - */ - public DataSetProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public DataSetProperties(DataSetProperties template) - { - super(template); - - if (template != null) - { - this.formula = template.getFormula(); - this.formulaType = template.getFormulaType(); - } - } - - - /** - * Return the formula that generates the data set from its source assets. This formula may have references to query ids that are stored in - * the DataContentForDataSet relationship. - * - * @return string encoded formula - */ - public String getFormula() - { - return formula; - } - - - /** - * Set up formula that generates the data set from its source assets. This formula may have references to query ids that are stored in - * the DataContentForDataSet relationship. - * - * @param formula string encoded formula - */ - public void setFormula(String formula) - { - this.formula = formula; - } - - - /** - * Return the format of the expression provided in the formula attribute. - * - * @return string name - */ - public String getFormulaType() - { - return formulaType; - } - - - /** - * Set up the format of the expression provided in the formula attribute. - * - * @param formulaType string name - */ - public void setFormulaType(String formulaType) - { - this.formulaType = formulaType; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "DataSetProperties{" + - "technicalName='" + getTechnicalName() + '\'' + - ", versionIdentifier='" + getVersionIdentifier() + '\'' + - ", technicalDescription='" + getTechnicalDescription() + '\'' + - ", isReferenceAsset=" + getIsReferenceAsset() + - ", deployedImplementationType=" + getDeployedImplementationType() + - ", formula='" + formula + '\'' + - ", formulaType='" + formulaType + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - ", displayName='" + getDisplayName() + '\'' + - ", summary='" + getSummary() + '\'' + - ", description='" + getDescription() + '\'' + - ", abbreviation='" + getAbbreviation() + '\'' + - ", usage='" + getUsage() + '\'' + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - DataSetProperties that = (DataSetProperties) objectToCompare; - return Objects.equals(formula, that.formula) && Objects.equals(formulaType, that.formulaType); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), formula, formulaType); - } -} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/DataStoreProperties.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/DataStoreProperties.java deleted file mode 100644 index 2abf871ef61..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/DataStoreProperties.java +++ /dev/null @@ -1,317 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetmanager.properties; - -import com.fasterxml.jackson.annotation.*; - -import java.util.Date; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * DataStoreProperties is a class for representing a generic data store. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class DataStoreProperties extends DataAssetProperties -{ - private String pathName = null; - private Date createTime = null; - private Date modifiedTime = null; - private String encodingType = null; - private String encodingLanguage = null; - private String encodingDescription = null; - private Map encodingProperties = null; - - - /** - * Default constructor - */ - public DataStoreProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public DataStoreProperties(DataStoreProperties template) - { - super(template); - - if (template != null) - { - pathName = template.getPathName(); - createTime = template.getCreateTime(); - modifiedTime = template.getModifiedTime(); - encodingType = template.getEncodingType(); - encodingLanguage = template.getEncodingLanguage(); - encodingDescription = template.getEncodingDescription(); - encodingProperties = template.getEncodingProperties(); - } - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public DataStoreProperties(DataAssetProperties template) - { - super(template); - } - - - /** - * Return the fully qualified physical location of the data store. This should be suitable for the - * network address of the Endpoint. - * - * @return string name - */ - public String getPathName() - { - return pathName; - } - - - /** - * Set up the fully qualified physical location of the data store. This should be suitable for the - * network address of the Endpoint. - * - * @param pathName string name - */ - public void setPathName(String pathName) - { - this.pathName = pathName; - } - - - /** - * Return the time that the data store was created. - * - * @return date - */ - public Date getCreateTime() - { - return createTime; - } - - - /** - * Set up the time that the data store was created. - * - * @param createTime date - */ - public void setCreateTime(Date createTime) - { - this.createTime = createTime; - } - - - /** - * Return the last known time the data store was modified. - * - * @return date - */ - public Date getModifiedTime() - { - return modifiedTime; - } - - - /** - * Setup the last known time the data store was modified. - * - * @param modifiedTime date - */ - public void setModifiedTime(Date modifiedTime) - { - this.modifiedTime = modifiedTime; - } - - - /** - * Return the name of the encoding style used in the data store. - * - * @return string name - */ - public String getEncodingType() - { - return encodingType; - } - - - /** - * Set up the name of the encoding style used in the data store. - * - * @param encodingType string name - */ - public void setEncodingType(String encodingType) - { - this.encodingType = encodingType; - } - - - /** - * Return the name of the natural language used for text strings within the data store. - * - * @return string language name - */ - public String getEncodingLanguage() - { - return encodingLanguage; - } - - - /** - * Set up the name of the natural language used for text strings within the data store. - * - * @param encodingLanguage string language name - */ - public void setEncodingLanguage(String encodingLanguage) - { - this.encodingLanguage = encodingLanguage; - } - - - /** - * Return the description of the encoding used in the data store. - * - * @return string text - */ - public String getEncodingDescription() - { - return encodingDescription; - } - - - /** - * Set up the description of the encoding used in the data store. - * - * @param encodingDescription string text - */ - public void setEncodingDescription(String encodingDescription) - { - this.encodingDescription = encodingDescription; - } - - - /** - * Return the additional properties associated with the encoding process. - * - * @return map of name-value pairs - */ - public Map getEncodingProperties() - { - if (encodingProperties == null) - { - return null; - } - else if (encodingProperties.isEmpty()) - { - return null; - } - return encodingProperties; - } - - - /** - * Set up the additional properties associated with the encoding process. - * - * @param encodingProperties map of name-value pairs - */ - public void setEncodingProperties(Map encodingProperties) - { - this.encodingProperties = encodingProperties; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "DataStoreProperties{" + - "pathName='" + pathName + '\'' + - ", createTime=" + createTime + - ", modifiedTime=" + modifiedTime + - ", encodingType='" + encodingType + '\'' + - ", encodingLanguage='" + encodingLanguage + '\'' + - ", encodingDescription='" + encodingDescription + '\'' + - ", encodingProperties=" + encodingProperties + - ", isReferenceAsset=" + getIsReferenceAsset() + - ", deployedImplementationType=" + getDeployedImplementationType() + - ", technicalName='" + getTechnicalName() + '\'' + - ", versionIdentifier='" + getVersionIdentifier() + '\'' + - ", technicalDescription='" + getTechnicalDescription() + '\'' + - ", displayName='" + getDisplayName() + '\'' + - ", summary='" + getSummary() + '\'' + - ", description='" + getDescription() + '\'' + - ", abbreviation='" + getAbbreviation() + '\'' + - ", usage='" + getUsage() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - DataStoreProperties that = (DataStoreProperties) objectToCompare; - return Objects.equals(pathName, that.pathName) && - Objects.equals(createTime, that.createTime) && - Objects.equals(modifiedTime, that.modifiedTime) && - Objects.equals(encodingType, that.encodingType) && - Objects.equals(encodingLanguage, that.encodingLanguage) && - Objects.equals(encodingDescription, that.encodingDescription) && - Objects.equals(encodingProperties, that.encodingProperties); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), pathName, createTime, modifiedTime, encodingType, encodingLanguage, encodingDescription, encodingProperties); - } -} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/DeploymentProperties.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/DeploymentProperties.java deleted file mode 100644 index 5f02c2bd5fc..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/DeploymentProperties.java +++ /dev/null @@ -1,318 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetmanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.openmetadata.enums.OperationalStatus; - -import java.util.Date; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * DeploymentProperties describes the properties for the DeployedOn relationship between an IT Infrastructure asset - * and a destination asset. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class DeploymentProperties extends RelationshipProperties -{ - private static final String deploymentTimeProperty = "deploymentTime"; - private static final String deployerProperty = "deployer"; - private static final String deployerTypeNameProperty = "deployerTypeName"; - private static final String deployerPropertyNameProperty = "deployerPropertyName"; - private static final String deploymentStatusProperty = "deploymentStatus"; - - - private Date deploymentTime = null; - private String deployer = null; - private String deployerTypeName = null; - private String deployerPropertyName = null; - private OperationalStatus deploymentStatus = null; - - - /** - * Default constructor - */ - public DeploymentProperties() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public DeploymentProperties(DeploymentProperties template) - { - super(template); - - if (template != null) - { - deploymentTime = template.getDeploymentTime(); - deployer = template.getDeployer(); - deployerTypeName = template.getDeployerTypeName(); - deployerPropertyName = template.getDeployerPropertyName(); - deploymentStatus = template.getDeploymentStatus(); } - } - - - /** - * Copy/clone constructor - * - * @param properties property map - * @param effectiveFrom effective from - * @param effectiveTo effective to - */ - public DeploymentProperties(Map properties, - Date effectiveFrom, - Date effectiveTo) - { - super(); - - super.setEffectiveFrom(effectiveFrom); - super.setEffectiveTo(effectiveTo); - - if (properties != null) - { - deploymentTime = (Date)properties.get(deploymentTimeProperty); - deployer = properties.get(deployerProperty).toString(); - deployerTypeName = properties.get(deployerTypeNameProperty).toString(); - deployerPropertyName = properties.get(deployerPropertyNameProperty).toString(); - - deploymentStatus = OperationalStatus.DISABLED; - int operationalStatus = (Integer)properties.get(deploymentStatusProperty); - - if (operationalStatus == 1) - { - deploymentStatus = OperationalStatus.ENABLED; - } - } - } - - - /** - * Turn the properties into a property map. - * - * @return property map. - */ - public Map cloneToMap() - { - Map propertyMap = new HashMap<>(); - - if (deploymentTime != null) - { - propertyMap.put(deploymentTimeProperty, deploymentTime); - } - - if (deployer != null) - { - propertyMap.put(deployerProperty, deployer); - } - - if (deployerTypeName != null) - { - propertyMap.put(deployerTypeNameProperty, deployerTypeName); - } - - if (deployerPropertyName != null) - { - propertyMap.put(deployerPropertyNameProperty, deployerPropertyName); - } - - if (deploymentStatus != null) - { - propertyMap.put(deploymentStatusProperty, deploymentStatus.getOpenTypeOrdinal()); - } - - if (! propertyMap.isEmpty()) - { - propertyMap = null; - } - - return propertyMap; - } - - - - /** - * Return the time that the capability was deployed into the server. - * - * @return date/time - */ - public Date getDeploymentTime() - { - return deploymentTime; - } - - - /** - * Set up the time that the capability was deployed into the server. - * - * @param deploymentTime date/time - */ - public void setDeploymentTime(Date deploymentTime) - { - this.deploymentTime = deploymentTime; - } - - - /** - * Return the userId of the deployer. - * - * @return name - */ - public String getDeployer() - { - return deployer; - } - - - /** - * Set up the userId of the deployer. - * - * @param deployer name - */ - public void setDeployer(String deployer) - { - this.deployer = deployer; - } - - - /** - * Return the type name of the element used to represent the deployer. - * - * @return string name - */ - public String getDeployerTypeName() - { - return deployerTypeName; - } - - - /** - * Set up the type name of the element used to represent the deployer. - * - * @param deployerTypeName string name - */ - public void setDeployerTypeName(String deployerTypeName) - { - this.deployerTypeName = deployerTypeName; - } - - - /** - * Return the property name from the element used to represent the deployer. - * - * @return string name - */ - public String getDeployerPropertyName() - { - return deployerPropertyName; - } - - - /** - * Set up the property name from the element used to represent the deployer. - * - * @param deployerPropertyName string name - */ - public void setDeployerPropertyName(String deployerPropertyName) - { - this.deployerPropertyName = deployerPropertyName; - } - - - /** - * Return whether the capability is ready to use. - * - * @return operational status enum - */ - public OperationalStatus getDeploymentStatus() - { - return deploymentStatus; - } - - - /** - * Set up whether the capability is ready to use. - * - * @param deploymentStatus operational status enum - */ - public void setDeploymentStatus(OperationalStatus deploymentStatus) - { - this.deploymentStatus = deploymentStatus; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "DeploymentProperties{" + - "deploymentTime=" + deploymentTime + - ", deployer='" + deployer + '\'' + - ", deployerTypeName='" + deployerTypeName + '\'' + - ", deployerPropertyName='" + deployerPropertyName + '\'' + - ", deploymentStatus=" + deploymentStatus + - ", cloneToMap=" + cloneToMap() + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - DeploymentProperties that = (DeploymentProperties) objectToCompare; - return Objects.equals(deploymentTime, that.deploymentTime) && - Objects.equals(deployer, that.deployer) && - Objects.equals(deployerTypeName, that.deployerTypeName) && - Objects.equals(deployerPropertyName, that.deployerPropertyName) && - deploymentStatus == that.deploymentStatus; - } - - - /** - * Hash code for this object - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), deploymentTime, deployer, deployerTypeName, deployerPropertyName, deploymentStatus); - } -} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/DerivedSchemaTypeQueryTargetProperties.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/DerivedSchemaTypeQueryTargetProperties.java deleted file mode 100644 index 98f795cf774..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/DerivedSchemaTypeQueryTargetProperties.java +++ /dev/null @@ -1,194 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetmanager.properties; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * DerivedSchemaTypeQueryTargetProperties defines a query on a schema element that returns all or part of the value for a - * derived schema type. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class DerivedSchemaTypeQueryTargetProperties -{ - private String queryId = null; - private String query = null; - private String queryType = null; - private String queryTargetGUID = null; - - - - /** - * Default constructor - */ - public DerivedSchemaTypeQueryTargetProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template template schema query to copy. - */ - public DerivedSchemaTypeQueryTargetProperties(DerivedSchemaTypeQueryTargetProperties template) - { - super(); - - if (template != null) - { - queryId = template.getQueryId(); - query = template.getQuery(); - queryType = template.getQueryType(); - queryTargetGUID = template.getQueryTargetGUID(); - } - } - - - /** - * Return the query id - this is used to identify where the results of this query should be plugged into - * the other queries or the formula for the parent derived schema element. - * - * @return String query identifier - */ - public String getQueryId() { return queryId; } - - - /** - * Set up the query id - this is used to identify where the results of this query should be plugged into - * the other queries or the formula for the parent derived schema element. - * - * @param queryId String query identifier - */ - public void setQueryId(String queryId) - { - this.queryId = queryId; - } - - - /** - * Return the query string for this element. The query string may have placeholders for values returned - * by queries that have a lower queryId than this element. - * - * @return String query - */ - public String getQuery() { return query; } - - - /** - * Set up the query string for this element. The query string may have placeholders for values returned - * by queries that have a lower queryId than this element. - * - * @param query String query - */ - public void setQuery(String query) - { - this.query = query; - } - - - /** - * Return the name of the query language used in the query. - * - * @return queryType String - */ - public String getQueryType() { return queryType; } - - - /** - * Set up the name of the query language used in the query. - * - * @param queryType String name - */ - public void setQueryType(String queryType) - { - this.queryType = queryType; - } - - - /** - * Return the unique identifier that describes the data source that will be queried to get part of the derived value. - * - * @return string guid - */ - public String getQueryTargetGUID() - { - return queryTargetGUID; - } - - - /** - * Set up the unique identifier that describes the data source that will be queried to get part of the derived value. - * - * @param queryTargetGUID string guid - */ - public void setQueryTargetGUID(String queryTargetGUID) - { - this.queryTargetGUID = queryTargetGUID; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "DerivedSchemaTypeQueryTargetProperties{" + - "queryId=" + queryId + - ", query='" + query + '\'' + - ", queryType='" + queryType + '\'' + - ", queryTargetGUID=" + queryTargetGUID + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof DerivedSchemaTypeQueryTargetProperties)) - { - return false; - } - DerivedSchemaTypeQueryTargetProperties that = (DerivedSchemaTypeQueryTargetProperties) objectToCompare; - return Objects.equals(getQueryId(), that.getQueryId()) && - Objects.equals(getQuery(), that.getQuery()) && - Objects.equals(getQueryType(), that.getQueryType()) && - Objects.equals(getQueryTargetGUID(), that.getQueryTargetGUID()); - } - - - /** - * Create a hash code for this element type. - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(getQueryId(), getQuery(), getQueryType(), getQueryTargetGUID()); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/EndpointProperties.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/EndpointProperties.java deleted file mode 100644 index 8d2733cb36c..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/EndpointProperties.java +++ /dev/null @@ -1,248 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetmanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * EndpointProperties describes the properties of a server endpoint. The endpoint is linked - * to the asset manager's server and describes its network endpoint. It is also linked to connection objects - * that are used by clients to connect to the asset manager. A connection is linked to each asset - * that is hosted on the asset manager. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class EndpointProperties extends SupplementaryProperties -{ - private String technicalName = null; - private String technicalDescription = null; - private String address = null; - private String protocol = null; - private String encryptionMethod = null; - - - /** - * Default constructor - */ - public EndpointProperties() - { - super(); - } - - - /** - * Copy/clone constructor for an Endpoint. - * - * @param template template object to copy. - */ - public EndpointProperties(EndpointProperties template) - { - super(template); - - if (template != null) - { - technicalName = template.getTechnicalName(); - technicalDescription = template.getTechnicalDescription(); - address = template.getAddress(); - protocol = template.getProtocol(); - encryptionMethod = template.getEncryptionMethod(); - } - } - - - /** - * Set up the technical name for the endpoint. - * - * @param technicalName String name - */ - public void setTechnicalName(String technicalName) - { - this.technicalName = technicalName; - } - - - /** - * Returns the stored technical name property for the endpoint. - * If no technical name is available then null is returned. - * - * @return String name - */ - public String getTechnicalName() - { - return technicalName; - } - - - /** - * Set up the technical description of the endpoint. - * - * @param technicalDescription String - */ - public void setTechnicalDescription(String technicalDescription) - { - this.technicalDescription = technicalDescription; - } - - - /** - * Return the technical description for the endpoint. - * - * @return String technicalDescription - */ - public String getTechnicalDescription() - { - return technicalDescription; - } - - - /** - * Set up the network address of the endpoint. - * - * @param address String resource name - */ - public void setAddress(String address) - { - this.address = address; - } - - - /** - * Returns the stored address property for the endpoint. - * If no network address is available then null is returned. - * - * @return address - */ - public String getAddress() - { - return address; - } - - - /** - * Set up the protocol to use for this Endpoint - * - * @param protocol String protocol name - */ - public void setProtocol(String protocol) - { - this.protocol = protocol; - } - - - /** - * Returns the stored protocol property for the endpoint. - * If no protocol is available then null is returned. - * - * @return protocol - */ - public String getProtocol() - { - return protocol; - } - - - /** - * Set up the encryption method used on this Endpoint. - * - * @param encryptionMethod String name - */ - public void setEncryptionMethod(String encryptionMethod) - { - this.encryptionMethod = encryptionMethod; - } - - - /** - * Returns the stored encryptionMethod property for the endpoint. This is an open type allowing the information - * needed to work with a specific encryption mechanism used by the endpoint to be defined. - * If no encryptionMethod property is available (typically because this is an unencrypted endpoint) - * then null is returned. - * - * @return encryption method information - */ - public String getEncryptionMethod() - { - return encryptionMethod; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "EndpointProperties{" + - "technicalName='" + technicalName + '\'' + - ", technicalDescription='" + technicalDescription + '\'' + - ", address='" + address + '\'' + - ", protocol='" + protocol + '\'' + - ", encryptionMethod='" + encryptionMethod + '\'' + - ", displayName='" + getDisplayName() + '\'' + - ", summary='" + getSummary() + '\'' + - ", description='" + getDescription() + '\'' + - ", abbreviation='" + getAbbreviation() + '\'' + - ", usage='" + getUsage() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - EndpointProperties that = (EndpointProperties) objectToCompare; - return Objects.equals(technicalName, that.technicalName) && - Objects.equals(technicalDescription, that.technicalDescription) && - Objects.equals(address, that.address) && - Objects.equals(protocol, that.protocol) && - Objects.equals(encryptionMethod, that.encryptionMethod); - } - - - /** - * Create a hash code for this element type. - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), technicalName, technicalDescription, address, protocol, encryptionMethod); - } -} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/ExternalGlossaryLinkProperties.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/ExternalGlossaryLinkProperties.java deleted file mode 100644 index f15048b5ee0..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/ExternalGlossaryLinkProperties.java +++ /dev/null @@ -1,60 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetmanager.properties; - -import com.fasterxml.jackson.annotation.*; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ExternalGlossaryLinkProperties describes the properties of URL link to a remote glossary. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class ExternalGlossaryLinkProperties extends ExternalReferenceProperties -{ - /** - * Default constructor - */ - public ExternalGlossaryLinkProperties() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template template object to copy. - */ - public ExternalGlossaryLinkProperties(ExternalGlossaryLinkProperties template) - { - super (template); - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "ExternalGlossaryLinkProperties{" + - "displayName='" + getDisplayName() + '\'' + - ", url='" + getUrl() + '\'' + - ", version='" + getVersion() + '\'' + - ", description='" + getDescription() + '\'' + - ", organization='" + getOrganization() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } -} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/ExternalReferenceLinkProperties.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/ExternalReferenceLinkProperties.java deleted file mode 100644 index 9703876b4db..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/ExternalReferenceLinkProperties.java +++ /dev/null @@ -1,147 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetmanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ExternalReferenceLinkProperties provides a structure for the properties that link an external reference to an object. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ExternalReferenceLinkProperties extends RelationshipProperties -{ - private String linkId = null; - private String linkDescription = null; - - - /** - * Default constructor - */ - public ExternalReferenceLinkProperties() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ExternalReferenceLinkProperties(ExternalReferenceLinkProperties template) - { - if (template != null) - { - this.linkId = template.getLinkId(); - this.linkDescription = template.getLinkDescription(); - } - } - - - /** - * Return the identifier that this reference is to be known as with respect to the linked object. - * - * @return String identifier - */ - public String getLinkId() - { - return linkId; - } - - - /** - * Set up the identifier that this reference is to be known as with respect to the linked object. - * - * @param linkId String identifier - */ - public void setLinkId(String linkId) - { - this.linkId = linkId; - } - - - /** - * Return the description of the external reference with respect to the linked object. - * - * @return string - */ - public String getLinkDescription() - { - return linkDescription; - } - - - /** - * Set up the description of the external reference with respect to the linked object. - * - * @param linkDescription string - */ - public void setLinkDescription(String linkDescription) - { - this.linkDescription = linkDescription; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "ExternalReferenceLinkProperties{" + - "linkId='" + linkId + '\'' + - ", linkDescription='" + linkDescription + '\'' + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - ExternalReferenceLinkProperties that = (ExternalReferenceLinkProperties) objectToCompare; - return Objects.equals(linkId, that.linkId) && - Objects.equals(linkDescription, that.linkDescription); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), linkId, linkDescription); - } -} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/ExternalReferenceProperties.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/ExternalReferenceProperties.java deleted file mode 100644 index 8b985da50fc..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/ExternalReferenceProperties.java +++ /dev/null @@ -1,237 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetmanager.properties; - -import com.fasterxml.jackson.annotation.*; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ExternalReferenceProperties describes the properties of URL link to a remote source of information. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes( - { - @JsonSubTypes.Type(value = ExternalGlossaryLinkProperties.class, name = "ExternalGlossaryLinkProperties") - }) -public class ExternalReferenceProperties extends ReferenceableProperties -{ - private String displayName = null; - private String url = null; - private String version = null; - private String description = null; - private String organization = null; - - - /** - * Default constructor - */ - public ExternalReferenceProperties() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template template object to copy. - */ - public ExternalReferenceProperties(ExternalReferenceProperties template) - { - super(template); - - if (template != null) - { - displayName = template.getDisplayName(); - url = template.getUrl(); - version = template.getVersion(); - description = template.getDescription(); - organization = template.getOrganization(); - } - } - - - /** - * Set up name of the external reference. - * - * @param name String - */ - public void setDisplayName(String name) - { - this.displayName = name; - } - - - /** - * Return the name for the external reference. - * - * @return String identifier - */ - public String getDisplayName() - { - return displayName; - } - - - /** - * Return the URL for the external reference. - * - * @return string URL - */ - public String getUrl() - { - return url; - } - - - /** - * Set up the URL for the external reference. - * - * @param url string URL - */ - public void setUrl(String url) - { - this.url = url; - } - - - /** - * Return the version of the reference that this link refers to. - * - * @return string version - */ - public String getVersion() - { - return version; - } - - - /** - * Set up the version of the reference that this link refers to. - * - * @param version string version - */ - public void setVersion(String version) - { - this.version = version; - } - - - /** - * Return the description of the external reference to help the reader know if they want to click on the link. - * - * @return string description - */ - public String getDescription() - { - return description; - } - - - /** - * Set up the description of the external reference to help the reader know if they want to click on the link. - * - * @param description string description - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * Return the name or identifier or url of the organization that owns the external resource. - * - * @return string identifier - */ - public String getOrganization() - { - return organization; - } - - - /** - * Set up the name or identifier or url of the organization that owns the external resource. - * - * @param organization string identifier - */ - public void setOrganization(String organization) - { - this.organization = organization; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "ExternalReferenceProperties{" + - "displayName='" + displayName + '\'' + - ", url='" + url + '\'' + - ", version='" + version + '\'' + - ", description='" + description + '\'' + - ", organization='" + organization + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ExternalReferenceProperties that = (ExternalReferenceProperties) objectToCompare; - return Objects.equals(getDisplayName(), that.getDisplayName()) && - Objects.equals(getUrl(), that.getUrl()) && - Objects.equals(getVersion(), that.getVersion()) && - Objects.equals(getDescription(), that.getDescription()) && - Objects.equals(getOrganization(), that.getOrganization()); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), getDisplayName(), getUrl(), getVersion(), getDescription(), getOrganization()); - } -} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/FeedbackProperties.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/FeedbackProperties.java deleted file mode 100644 index aed00011db6..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/FeedbackProperties.java +++ /dev/null @@ -1,81 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetmanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * FeedbackProperties provides a base class for passing feedback objects as a request body over a REST API. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class FeedbackProperties extends RelationshipProperties -{ - private boolean isPublic = false; - - - /** - * Default constructor - */ - public FeedbackProperties() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public FeedbackProperties(FeedbackProperties template) - { - super(template); - - if (template != null) - { - this.isPublic = template.getIsPublic(); - } - } - - - - - /** - * Return whether the feedback is private or not - * - * @return boolean - */ - public boolean getIsPublic() - { - return isPublic; - } - - - /** - * Set up the privacy flag. - * - * @param aPrivate boolean - */ - public void setIsPublic(boolean aPrivate) - { - isPublic = aPrivate; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "FeedbackProperties{" + '}'; - } -} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/FindAssetOriginProperties.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/FindAssetOriginProperties.java deleted file mode 100644 index 855ba238ab2..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/FindAssetOriginProperties.java +++ /dev/null @@ -1,181 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetmanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * AssetOriginProperties provides a structure for passing information about an asset's origin. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class FindAssetOriginProperties extends FindProperties -{ - private String organizationGUID = null; - private String businessCapabilityGUID = null; - private Map otherOriginValues = null; - - - /** - * Default constructor - */ - public FindAssetOriginProperties() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public FindAssetOriginProperties(FindAssetOriginProperties template) - { - if (template != null) - { - this.organizationGUID = template.getOrganizationGUID(); - this.businessCapabilityGUID = template.getBusinessCapabilityGUID(); - this.otherOriginValues = template.getOtherOriginValues(); - } - } - - - /** - * Return the unique identifier (GUID) of the organization where this asset originated from. - * - * @return unique identifier (GUID) - */ - public String getOrganizationGUID() - { - return organizationGUID; - } - - - /** - * Set up the unique identifier (GUID) of the organization where this asset originated from. - * - * @param organizationGUID unique identifier (GUID) - */ - public void setOrganizationGUID(String organizationGUID) - { - this.organizationGUID = organizationGUID; - } - - - /** - * Return the unique identifier (GUID) of the business capability where this asset originated from. - * - * @return unique identifier (GUID) - */ - public String getBusinessCapabilityGUID() - { - return businessCapabilityGUID; - } - - - /** - * Set up the unique identifier (GUID) of the business capability where this asset originated from. - * - * @param businessCapabilityGUID unique identifier (GUID) - */ - public void setBusinessCapabilityGUID(String businessCapabilityGUID) - { - this.businessCapabilityGUID = businessCapabilityGUID; - } - - - /** - * Return any other descriptive labels describing origin of the asset. - * - * @return map of property values - */ - public Map getOtherOriginValues() - { - if (otherOriginValues == null) - { - return null; - } - else if (otherOriginValues.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(otherOriginValues); - } - } - - - /** - * Set up any descriptive labels describing origin of the asset. - * - * @param otherOriginValues map of property values - */ - public void setOtherOriginValues(Map otherOriginValues) - { - this.otherOriginValues = otherOriginValues; - } - - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "FindAssetOriginProperties{" + - "organizationGUID='" + organizationGUID + '\'' + - ", businessCapabilityGUID='" + businessCapabilityGUID + '\'' + - ", otherOriginValues=" + otherOriginValues + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (! (objectToCompare instanceof FindAssetOriginProperties that)) - { - return false; - } - return Objects.equals(organizationGUID, that.organizationGUID) && - Objects.equals(businessCapabilityGUID, that.businessCapabilityGUID) && - Objects.equals(otherOriginValues, that.otherOriginValues); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), getOrganizationGUID(), getBusinessCapabilityGUID(), getOtherOriginValues()); - } -} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/FindNameProperties.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/FindNameProperties.java deleted file mode 100644 index 39d76c50f7d..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/FindNameProperties.java +++ /dev/null @@ -1,124 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetmanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * FindNameProperties is the request body structure used on OMAG REST API calls that passes a name that is used to retrieve - * an element by name. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class FindNameProperties extends FindProperties -{ - private String name = null; - - - /** - * Default constructor - */ - public FindNameProperties() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public FindNameProperties(FindNameProperties template) - { - super(template); - - if (template != null) - { - name = template.getName(); - } - } - - - /** - * Return the name for the query request. - * - * @return string name - */ - public String getName() - { - return name; - } - - - /** - * Set up the name for the query request. - * - * @param name string - */ - public void setName(String name) - { - this.name = name; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "FindNameProperties{" + - "name='" + name + '\'' + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - FindNameProperties that = (FindNameProperties) objectToCompare; - return Objects.equals(name, that.name); - } - - - /** - * Create a hash code for this element type. - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), name); - } -} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/FindProperties.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/FindProperties.java deleted file mode 100644 index 8c057051263..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/FindProperties.java +++ /dev/null @@ -1,62 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetmanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * FindProperties provides the base class for find by property requests. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes( - { - @JsonSubTypes.Type(value = LevelIdentifierProperties.class, name = "LevelIdentifierProperties"), - @JsonSubTypes.Type(value = DataFieldQueryProperties.class, name = "DataFieldQueryProperties"), - @JsonSubTypes.Type(value = FindNameProperties.class, name = "FindNameProperties"), - @JsonSubTypes.Type(value = FindAssetOriginProperties.class, name = "FindAssetOriginProperties"), - }) -public class FindProperties -{ - /** - * Default constructor - */ - public FindProperties() - { - super(); - } - - - /** - * Copy/clone constructor. Retrieve values from the supplied template - * - * @param template element to copy - */ - public FindProperties(FindProperties template) - { - - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "FindProperties{}"; - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/FixedLocation.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/FixedLocation.java deleted file mode 100644 index a05c5c4f273..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/FixedLocation.java +++ /dev/null @@ -1,193 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetmanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * FixedLocation describes a specific fixed physical location. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class FixedLocation -{ - private String coordinates = null; - private String mapProjection = null; - private String postalAddress = null; - private String timeZone = null; - - - /** - * Default constructor - */ - public FixedLocation() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template template object to copy. - */ - public FixedLocation(FixedLocation template) - { - if (template != null) - { - coordinates = template.getCoordinates(); - mapProjection = template.getMapProjection(); - postalAddress = template.getPostalAddress(); - timeZone = template.getTimeZone(); - } - } - - - /** - * Set up coordinates of the location. - * - * @param coordinates String - */ - public void setCoordinates(String coordinates) - { - this.coordinates = coordinates; - } - - - /** - * Return the coordinates for the location. - * - * @return String coordinates - */ - public String getCoordinates() - { - return coordinates; - } - - - /** - * Return the name of the map projection scheme used to define the coordinates. - * - * @return string name - */ - public String getMapProjection() - { - return mapProjection; - } - - - /** - * Set up the name of the map projection scheme used to define the coordinates. - * - * @param mapProjection string name - */ - public void setMapProjection(String mapProjection) - { - this.mapProjection = mapProjection; - } - - - /** - * Set up postal address of the location. - * - * @param postalAddress String - */ - public void setPostalAddress(String postalAddress) - { - this.postalAddress = postalAddress; - } - - - /** - * Return the postal address for the location. - * - * @return String postalAddress - */ - public String getPostalAddress() - { - return postalAddress; - } - - - /** - * Set up the time zone of the location. - * - * @param timeZone string - */ - public void setTimeZone(String timeZone) - { - this.timeZone = timeZone; - } - - - /** - * Returns the time zone of the location. - * - * @return string - */ - public String getTimeZone() - { - return timeZone; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "FixedLocation{" + - "coordinates='" + coordinates + '\'' + - ", address='" + postalAddress + '\'' + - ", timeZone='" + timeZone + '\'' + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - FixedLocation that = (FixedLocation) objectToCompare; - return Objects.equals(coordinates, that.coordinates) && - Objects.equals(timeZone, that.timeZone) && - Objects.equals(postalAddress, that.postalAddress); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(coordinates, postalAddress, timeZone); - } -} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/GlossaryTermProperties.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/GlossaryTermProperties.java deleted file mode 100644 index d6bf171f2d8..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/GlossaryTermProperties.java +++ /dev/null @@ -1,289 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetmanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * GlossaryTermProperties contains the semantic definition (meaning) of a word or phrase - * (term - collectively called terminology). - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class GlossaryTermProperties extends ReferenceableProperties -{ - private String displayName = null; - private String summary = null; - private String description = null; - private String examples = null; - private String abbreviation = null; - private String usage = null; - private String publishVersionIdentifier = null; - - - /** - * Default constructor - */ - public GlossaryTermProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public GlossaryTermProperties(GlossaryTermProperties template) - { - super(template); - - if (template != null) - { - displayName = template.getDisplayName(); - summary = template.getSummary(); - description = template.getDescription(); - examples = template.getExamples(); - abbreviation = template.getAbbreviation(); - usage = template.getUsage(); - usage = template.getPublishVersionIdentifier(); - } - } - - - /** - * Returns the stored display name property for the term. - * If no display name is available then null is returned. - * - * @return String name - */ - public String getDisplayName() - { - return displayName; - } - - - /** - * Set up the stored display name property for the term. - * - * @param displayName String name - */ - public void setDisplayName(String displayName) - { - this.displayName = displayName; - } - - - /** - * Return the short (1-2 sentence) description of the term. - * - * @return string text - */ - public String getSummary() - { - return summary; - } - - - /** - * Set up the short (1-2 sentence) description of the term. - * - * @param summary string text - */ - public void setSummary(String summary) - { - this.summary = summary; - } - - - /** - * Returns the stored description property for the term. - * If no description is provided then null is returned. - * - * @return String text - */ - public String getDescription() - { - return description; - } - - - /** - * Set up the stored description property for the term. - * - * @param description String text - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * Set up the description of one or more examples. - * - * @return string text - */ - public String getExamples() - { - return examples; - } - - - /** - * Return the description of one or more examples. - * - * @param examples string text - */ - public void setExamples(String examples) - { - this.examples = examples; - } - - - /** - * Return the abbreviation used for this term. - * - * @return string text - */ - public String getAbbreviation() - { - return abbreviation; - } - - - /** - * Set up the abbreviation used for this term. - * - * @param abbreviation string text - */ - public void setAbbreviation(String abbreviation) - { - this.abbreviation = abbreviation; - } - - - /** - * Return details of the expected usage of this term. - * - * @return string text - */ - public String getUsage() - { - return usage; - } - - - /** - * Set up details of the expected usage of this term. - * - * @param usage string text - */ - public void setUsage(String usage) - { - this.usage = usage; - } - - - /** - * Return the author-controlled version identifier. - * - * @return version identifier - */ - public String getPublishVersionIdentifier() - { - return publishVersionIdentifier; - } - - - /** - * Set up the author-controlled version identifier. - * - * @param publishVersionIdentifier version identifier - */ - public void setPublishVersionIdentifier(String publishVersionIdentifier) - { - this.publishVersionIdentifier = publishVersionIdentifier; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "GlossaryTermProperties{" + - "displayName='" + displayName + '\'' + - ", summary='" + summary + '\'' + - ", description='" + description + '\'' + - ", examples='" + examples + '\'' + - ", abbreviation='" + abbreviation + '\'' + - ", usage='" + usage + '\'' + - ", publishVersionNumber='" + publishVersionIdentifier + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - GlossaryTermProperties that = (GlossaryTermProperties) objectToCompare; - return Objects.equals(getDisplayName(), that.getDisplayName()) && - Objects.equals(getSummary(), that.getSummary()) && - Objects.equals(getDescription(), that.getDescription()) && - Objects.equals(getExamples(), that.getExamples()) && - Objects.equals(getAbbreviation(), that.getAbbreviation()) && - Objects.equals(getUsage(), that.getUsage()) && - Objects.equals(getPublishVersionIdentifier(), that.getPublishVersionIdentifier()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), getDisplayName(), getSummary(), getDescription(), getExamples(), getAbbreviation(), getUsage(), getPublishVersionIdentifier()); - } -} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/GlossaryTermStatus.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/GlossaryTermStatus.java deleted file mode 100644 index e335045206d..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/GlossaryTermStatus.java +++ /dev/null @@ -1,155 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetmanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * The GlossaryTermStatus defines the status of a glossary term. It effectively - * defines its visibility to different types of queries. Most queries by default will only return instances in the - * active status. - *
    - *
  • Unknown: Unknown instance status.
  • - *
  • Draft: The content is incomplete.
  • - *
  • Proposed: The content is in review.
  • - *
  • Approved: The content is approved.
  • - *
  • Active: The instance is approved and in use.
  • - *
- */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public enum GlossaryTermStatus -{ - /** - * Draft - The term is incomplete. - */ - DRAFT (1,1, "Draft", "The term is incomplete."), - - /** - * Prepared - The term is ready for review. - */ - PREPARED (2,2, "Prepared", "The term is ready for review."), - - /** - * Proposed - The term is in review. - */ - PROPOSED (3,3, "Proposed", "The term is in review."), - - /** - * Approved - The term is approved and ready to be activated. - */ - APPROVED (4,4, "Approved", "The term is approved and ready to be activated."), - - /** - * Rejected - The term is rejected and should not be used. - */ - REJECTED (5,5, "Rejected", "The term is rejected and should not be used."), - - /** - * Active - The term is approved and in use. - */ - ACTIVE (6,15, "Active", "The term is approved and in use."), - - /** - * Deprecated - The term is out of date and should not be used. - */ - DEPRECATED(7,30, "Deprecated","The term is out of date and should not be used."), - - /** - * Other - The term is in a locally defined state. - */ - OTHER (8,50, "Other", "The term is in a locally defined state."), - ; - - - private final int ordinal; - private final int openTypeOrdinal; - private final String name; - private final String description; - - - /** - * Constructor to set up the instance of this enum. - * - * @param ordinal code number - * @param openTypeOrdinal code number from the equivalent Enum Type - * @param name default name - * @param description default description - */ - GlossaryTermStatus(int ordinal, - int openTypeOrdinal, - String name, - String description) - { - this.ordinal = ordinal; - this.openTypeOrdinal = openTypeOrdinal; - this.name = name; - this.description = description; - } - - /** - * Return the code for this enum instance - * - * @return int key pattern code - */ - public int getOrdinal() - { - return ordinal; - } - - - /** - * Return the code for this enum that comes from the Open Metadata Type that this enum represents. - * - * @return int code number - */ - public int getOpenTypeOrdinal() - { - return openTypeOrdinal; - } - - - - /** - * Return the default name for this enum instance. - * - * @return String default name - */ - public String getName() - { - return name; - } - - - /** - * Return the default description for the key pattern for this enum instance. - * - * @return String default description - */ - public String getDescription() - { - return description; - } - - - /** - * toString() JSON-style - * - * @return string description - */ - @Override - public String toString() - { - return "GlossaryTermStatus{" + - "ordinal=" + ordinal + - ", openTypeOrdinal=" + openTypeOrdinal + - ", name='" + name + '\'' + - ", description='" + description + '\'' + - '}'; - }} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/GovernanceClassificationBase.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/GovernanceClassificationBase.java deleted file mode 100644 index 0988ac6eb2c..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/GovernanceClassificationBase.java +++ /dev/null @@ -1,290 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetmanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * GovernanceClassificationBase defines the common properties for the governance action classifications. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes( - { - @JsonSubTypes.Type(value = GovernanceClassificationProperties.class, name = "GovernanceClassificationProperties"), - @JsonSubTypes.Type(value = RetentionClassificationProperties.class, name = "RetentionClassificationProperties"), - }) -public class GovernanceClassificationBase extends ClassificationProperties -{ - private int status = 0; - private int confidence = 0; - private String steward = null; - private String stewardTypeName = null; - private String stewardPropertyName = null; - private String source = null; - private String notes = null; - - - /** - * Default constructor - */ - public GovernanceClassificationBase() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template element to copy - */ - public GovernanceClassificationBase(GovernanceClassificationBase template) - { - super(template); - - if (template != null) - { - status = template.getStatus(); - confidence = template.getConfidence(); - steward = template.getSteward(); - source = template.getSource(); - notes = template.getNotes(); - } - } - - - /** - * Return the status of this classification. - * - * @return enum - */ - public int getStatus() - { - return status; - } - - - /** - * Set up the status of the classification. - * - * @param status enum - */ - public void setStatus(int status) - { - this.status = status; - } - - - /** - * Return the level of confidence in the classification (0=none to 100=excellent). - * - * @return int - */ - public int getConfidence() - { - return confidence; - } - - - /** - * Set up the level of confidence in the classification (0=none to 100=excellent). - * - * @param confidence int - */ - public void setConfidence(int confidence) - { - this.confidence = confidence; - } - - - /** - * Return the identifier for the person responsible for maintaining this classification. - * - * @return string user identifier - */ - public String getSteward() - { - return steward; - } - - - /** - * Set up the identifier for the person responsible for maintaining this classification. - * - * @param steward string user identifier - */ - public void setSteward(String steward) - { - this.steward = steward; - } - - - /** - * Return the type name of the element used to describe the steward. - * - * @return name - */ - public String getStewardTypeName() - { - return stewardTypeName; - } - - - /** - * Set up the type name of the element used to describe the steward. - * - * @param stewardTypeName name - */ - public void setStewardTypeName(String stewardTypeName) - { - this.stewardTypeName = stewardTypeName; - } - - - /** - * Return the name of the property used to identify the steward. - * - * @return name - */ - public String getStewardPropertyName() - { - return stewardPropertyName; - } - - - /** - * Set up the name of the property used to identify the steward. - * - * @param stewardPropertyName name - */ - public void setStewardPropertyName(String stewardPropertyName) - { - this.stewardPropertyName = stewardPropertyName; - } - - - /** - * Return the source of this classification. - * - * @return string identifier - */ - public String getSource() - { - return source; - } - - - /** - * Set up the source of this classification. - * - * @param source string identifier - */ - public void setSource(String source) - { - this.source = source; - } - - - /** - * Return additional information relating to this classification. - * - * @return text from the steward(s) - */ - public String getNotes() - { - return notes; - } - - - /** - * Set up additional information relating to this classification. - * - * @param notes text from the steward(s) - */ - public void setNotes(String notes) - { - this.notes = notes; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "GovernanceClassificationBase{" + - "status=" + status + - ", confidence=" + confidence + - ", steward='" + steward + '\'' + - ", stewardTypeName='" + stewardTypeName + '\'' + - ", stewardPropertyName='" + stewardPropertyName + '\'' + - ", source='" + source + '\'' + - ", notes='" + notes + '\'' + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - GovernanceClassificationBase that = (GovernanceClassificationBase) objectToCompare; - return confidence == that.confidence && - status == that.status && - Objects.equals(steward, that.steward) && - Objects.equals(stewardTypeName, that.stewardTypeName) && - Objects.equals(stewardPropertyName, that.stewardPropertyName) && - Objects.equals(source, that.source) && - Objects.equals(notes, that.notes); - } - - - /** - * Return code value representing the contents of this object. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), status, confidence, steward, stewardTypeName, stewardPropertyName, source, notes); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/GovernanceClassificationProperties.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/GovernanceClassificationProperties.java deleted file mode 100644 index 38e1a02510d..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/GovernanceClassificationProperties.java +++ /dev/null @@ -1,129 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetmanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * GovernanceClassificationProperties defines the properties for a Confidentiality, Confidence, Criticality - * Governance Action Classifications. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class GovernanceClassificationProperties extends GovernanceClassificationBase -{ - private int levelIdentifier = 0; - - /** - * Default constructor - */ - public GovernanceClassificationProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public GovernanceClassificationProperties(GovernanceClassificationProperties template) - { - super(template); - - if (template != null) - { - levelIdentifier = template.getLevelIdentifier(); - } - } - - - /** - * Return the level assigned to this element for this classification. - * - * @return int - */ - public int getLevelIdentifier() - { - return levelIdentifier; - } - - - /** - * Set up the level assigned to this element for this classification. - * - * @param levelIdentifier int - */ - public void setLevelIdentifier(int levelIdentifier) - { - this.levelIdentifier = levelIdentifier; - } - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "GovernanceClassificationProperties{" + - "levelIdentifier=" + levelIdentifier + - ", status=" + getStatus() + - ", confidence=" + getConfidence() + - ", steward='" + getSteward() + '\'' + - ", stewardTypeName='" + getStewardTypeName() + '\'' + - ", stewardPropertyName='" + getStewardPropertyName() + '\'' + - ", source='" + getSource() + '\'' + - ", notes='" + getNotes() + '\'' + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - GovernanceClassificationProperties that = (GovernanceClassificationProperties) objectToCompare; - return levelIdentifier == that.levelIdentifier; - } - - - /** - * Return code value representing the contents of this object. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), levelIdentifier); - } -} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/GovernanceDefinitionProperties.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/GovernanceDefinitionProperties.java deleted file mode 100644 index 622407d7f76..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/GovernanceDefinitionProperties.java +++ /dev/null @@ -1,536 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetmanager.properties; - -import com.fasterxml.jackson.annotation.*; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * GovernanceDefinitionProperties provides the base class for many of the definitions that define the data strategy - * and governance program. It includes many of the common fields: - * - *
    - *
  • Document Id
  • - *
  • Title
  • - *
  • Summary
  • - *
  • Description
  • - *
  • Scope
  • - *
  • Domain Identifier
  • - *
  • Status
  • - *
  • Priority
  • - *
  • Implications
  • - *
  • Outcomes
  • - *
  • Results
  • - *
  • AdditionalProperties
  • - *
- */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class GovernanceDefinitionProperties -{ - private String documentIdentifier = null; - private Map additionalProperties = null; - - private String title = null; - private String summary = null; - private String description = null; - private String scope = null; - private int domainIdentifier = 0; - private GovernanceDefinitionStatus status = null; - private String priority = null; - private List implications = null; - private List outcomes = null; - private List results = null; - - private String typeName = null; - private Map extendedProperties = null; - - - /** - * Default Constructor - */ - public GovernanceDefinitionProperties() - { - super(); - } - - - /** - * Copy/clone Constructor - * - * @param template object being copied - */ - public GovernanceDefinitionProperties(GovernanceDefinitionProperties template) - { - if (template != null) - { - this.documentIdentifier = template.getDocumentIdentifier(); - this.additionalProperties = template.getAdditionalProperties(); - this.title = template.getTitle(); - this.summary = template.getSummary(); - this.description = template.getDescription(); - this.scope = template.getScope(); - this.domainIdentifier = template.getDomainIdentifier(); - this.status = template.getStatus(); - this.priority = template.getPriority(); - this.implications = template.getImplications(); - this.outcomes = template.getOutcomes(); - this.results = template.getResults(); - this.typeName = template.getTypeName(); - this.extendedProperties = template.getExtendedProperties(); - } - } - - - /** - * Return the open metadata type name of this object - this is used to create a subtype of - * the referenceable. Any properties associated with this subtype are passed as extended properties. - * - * @return string type name - */ - public String getTypeName() - { - return typeName; - } - - - /** - * Set up the open metadata type name of this object - this is used to create a subtype of - * the referenceable. Any properties associated with this subtype are passed as extended properties. - * - * @param typeName string type name - */ - public void setTypeName(String typeName) - { - this.typeName = typeName; - } - - - /** - * Returns the stored qualified name property for the metadata entity. - * If no qualified name is available then the empty string is returned. - * - * @return documentIdentifier - */ - public String getDocumentIdentifier() - { - return documentIdentifier; - } - - - /** - * Set up the fully qualified name. - * - * @param documentIdentifier String name - */ - public void setDocumentIdentifier(String documentIdentifier) - { - this.documentIdentifier = documentIdentifier; - } - - - /** - * Return a copy of the additional properties. Null means no additional properties are available. - * - * @return AdditionalProperties - */ - public Map getAdditionalProperties() - { - if (additionalProperties == null) - { - return null; - } - else if (additionalProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(additionalProperties); - } - } - - - /** - * Set up additional properties. - * - * @param additionalProperties Additional properties object - */ - public void setAdditionalProperties(Map additionalProperties) - { - this.additionalProperties = additionalProperties; - } - - - /** - * Return the properties that are defined for a subtype of referenceable but are not explicitly - * supported by the bean. - * - * @return map of properties - */ - public Map getExtendedProperties() - { - if (extendedProperties == null) - { - return null; - } - else if (extendedProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(extendedProperties); - } - } - - - /** - * Set up the properties that are defined for a subtype of referenceable but are not explicitly - * supported by the bean. - * - * @param extendedProperties map of properties - */ - public void setExtendedProperties(Map extendedProperties) - { - this.extendedProperties = extendedProperties; - } - - - - /** - * Return the title associated with this governance definition. - * - * @return String title - */ - public String getTitle() - { - return title; - } - - - /** - * Set up the title associated with this governance definition. - * - * @param title String title - */ - public void setTitle(String title) - { - this.title = title; - } - - - - /** - * Return the summary for this governance definition. This should cover its essence. Think of it as - * the executive summary. - * - * @return String short description - */ - public String getSummary() - { - return summary; - } - - - /** - * Set up the summary of the governance definition. This should cover its essence. Think of it as - * the executive summary. - * - * @param summary String description - */ - public void setSummary(String summary) - { - this.summary = summary; - } - - - /** - * Return the full description of the governance definition. - * - * @return String description - */ - public String getDescription() - { - return description; - } - - - /** - * Set up the full description of the governance definition. - * - * @param description String description - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * Return the organizational scope that this governance definition applies to. - * - * @return String organization, department or team name - */ - public String getScope() - { - return scope; - } - - - /** - * Set up the organizational scope that this governance definition applies to. - * - * @param scope String organization, department or team name - */ - public void setScope(String scope) - { - this.scope = scope; - } - - - /** - * Return the identifier of the governance domain that this definition belongs to (0=all). - * - * @return int - */ - public int getDomainIdentifier() - { - return domainIdentifier; - } - - - /** - * Set up the identifier of the governance domain that this definition belongs to (0=all). - * - * @param domainIdentifier int - */ - public void setDomainIdentifier(int domainIdentifier) - { - this.domainIdentifier = domainIdentifier; - } - - - /** - * Return the status of this governance definition. The meaning of the different values are defined in the - * GovernanceDefinitionStatus enumeration. - * - * @return GovernanceDefinitionStatus enumeration - */ - public GovernanceDefinitionStatus getStatus() - { - return status; - } - - - /** - * Set up the status of this governance definition. The meaning of the different values are defined in the - * GovernanceDefinitionStatus enumeration. - * - * @param status GovernanceDefinitionStatus enumeration - */ - public void setStatus(GovernanceDefinitionStatus status) - { - this.status = status; - } - - - /** - * Return the priority of the governance definition. This may be something like high, medium or low, - * or maybe a time frame or more detailed explanation. - * - * @return String priority - */ - public String getPriority() - { - return priority; - } - - - /** - * Set up the priority of this governance definition. This may be something like high, medium or low, - * or maybe a time frame or more detailed explanation. - * - * @param priority String priority - */ - public void setPriority(String priority) - { - this.priority = priority; - } - - - /** - * Return the list of implications for the organization that this governance definition brings. - * This is often the first enumeration of the changes that that need to be implemented to bring - * the governance definition into effect. - * - * @return list of descriptions - */ - public List getImplications() - { - return implications; - } - - - /** - * Set up the list of implications for the organization that this governance definition brings. - * This is often the first enumeration of the changes that that need to be implemented to bring - * the governance definition into effect. - * - * @param implications list of descriptions - */ - public void setImplications(List implications) - { - this.implications = implications; - } - - - /** - * Return the list of expected outcomes from implementing this governance definition. - * - * @return list of outcome descriptions - */ - public List getOutcomes() - { - if (outcomes == null) - { - return null; - } - else if (outcomes.isEmpty()) - { - return null; - } - else - { - return outcomes; - } - } - - - /** - * Set up the list of expected outcomes from implementing this governance definition. - * - * @param outcomes list of descriptions of outcomes - */ - public void setOutcomes(List outcomes) - { - this.outcomes = outcomes; - } - - - /** - * Return the list of actual results from implementing this governance definition. - * - * @return list of result descriptions - */ - public List getResults() - { - if (outcomes == null) - { - return null; - } - else if (outcomes.isEmpty()) - { - return null; - } - else - { - return outcomes; - } - } - - - /** - * Set up the list of actual results from implementing this governance definition. - * - * @param results list of description of results - */ - public void setResults(List results) - { - this.results = results; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "GovernanceDefinitionProperties{" + - "documentIdentifier='" + documentIdentifier + '\'' + - ", additionalProperties=" + additionalProperties + - ", title='" + title + '\'' + - ", summary='" + summary + '\'' + - ", description='" + description + '\'' + - ", scope='" + scope + '\'' + - ", domainIdentifier=" + domainIdentifier + - ", status=" + status + - ", priority='" + priority + '\'' + - ", implications=" + implications + - ", outcomes=" + outcomes + - ", results=" + results + - ", typeName='" + typeName + '\'' + - ", extendedProperties=" + extendedProperties + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - GovernanceDefinitionProperties that = (GovernanceDefinitionProperties) objectToCompare; - return domainIdentifier == that.domainIdentifier && - Objects.equals(documentIdentifier, that.documentIdentifier) && - Objects.equals(additionalProperties, that.additionalProperties) && - Objects.equals(title, that.title) && - Objects.equals(summary, that.summary) && - Objects.equals(description, that.description) && - Objects.equals(scope, that.scope) && - status == that.status && - Objects.equals(priority, that.priority) && - Objects.equals(implications, that.implications) && - Objects.equals(outcomes, that.outcomes) && - Objects.equals(results, that.results) && - Objects.equals(typeName, that.typeName) && - Objects.equals(extendedProperties, that.extendedProperties); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(documentIdentifier, additionalProperties, title, summary, description, scope, domainIdentifier, status, priority, - implications, outcomes, results, typeName, extendedProperties); - } -} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/GovernanceDefinitionStatus.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/GovernanceDefinitionStatus.java deleted file mode 100644 index 8d76ce0b8c9..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/GovernanceDefinitionStatus.java +++ /dev/null @@ -1,109 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetmanager.properties; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * GovernanceDefinitionStatus indicates whether the definition is complete and operational or in a state that means - * it is either under development or obsolete. - *
    - *
  • DRAFT - The governance definition is still in development.
  • - *
  • PROPOSED - The governance definition is in review and not yet active.
  • - *
  • ACTIVE - The governance definition is approved and in use.
  • - *
  • DEPRECATED - The governance definition has been superseded.
  • - *
  • OTHER - The governance definition in a locally defined state.
  • - *
- */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public enum GovernanceDefinitionStatus -{ - /** - * Draft - The governance definition is still in development. - */ - DRAFT (0, "Draft", "The governance definition is still in development."), - - /** - * Proposed - The governance definition is in review and not yet active. - */ - PROPOSED (1, "Proposed", "The governance definition is in review and not yet active."), - - /** - * Active - The governance definition is approved and in use. - */ - ACTIVE (2, "Active", "The governance definition is approved and in use."), - - /** - * Deprecated - The governance definition has been superseded. - */ - DEPRECATED (3, "Deprecated", "The governance definition has been superseded."), - - /** - * Other - The governance definition in a locally defined state. - */ - OTHER (99, "Other", "The governance definition in a locally defined state."); - - private final int ordinal; - private final String name; - private final String description; - - - /** - * Default constructor for the enumeration. - * - * @param ordinal numerical representation of the enumeration - * @param name default string name of the instance provenance type - * @param description default string description of the instance provenance type - */ - GovernanceDefinitionStatus(int ordinal, String name, String description) - { - this.ordinal = ordinal; - this.name = name; - this.description = description; - } - - - /** - * Return the numeric representation of the instance provenance type. - * - * @return int ordinal - */ - public int getOrdinal() { return ordinal; } - - - /** - * Return the default name of the instance provenance type. - * - * @return String name - */ - public String getName() { return name; } - - - /** - * Return the default description of the instance provenance type. - * - * @return String description - */ - public String getDescription() { return description; } - - - /** - * toString() JSON-style - * - * @return string description - */ - @Override - public String toString() - { - return "GovernanceDefinitionStatus : " + name; - } -} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/InformalTagProperties.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/InformalTagProperties.java deleted file mode 100644 index 15aaabfd377..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/InformalTagProperties.java +++ /dev/null @@ -1,209 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetmanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * InformalTagProperties stores information about a tag connected to an asset. - * InformalTags provide informal classifications to assets - * and can be added at any time. - *

- * InformalTags have the userId of the person who added the tag, the name of the tag and its description. - *

- * The content of the tag is a personal judgement (which is why the user's id is in the tag) - * and there is no formal review of the tags. However, they can be used as a basis for crowd-sourcing - * Glossary terms. - *

- * Private InformalTags are only returned to the user that created them. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class InformalTagProperties -{ - private boolean isPrivateTag = false; - private String name = null; - private String description = null; - private String user = null; - - - /** - * Default constructor - */ - public InformalTagProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template element to copy - */ - public InformalTagProperties(InformalTagProperties template) - { - if (template != null) - { - isPrivateTag = template.getIsPrivateTag(); - user = template.getUser(); - name = template.getName(); - description = template.getDescription(); - } - } - - - /** - * Return boolean flag to say whether the tag is private or not. A private tag is only seen by the - * person who set it up. Public tags are visible to everyone. - * - * @return boolean is private flag - */ - public boolean getIsPrivateTag() { - return isPrivateTag; - } - - - /** - * Set up boolean flag to say whether the tag is private or not. A private tag is only seen by the - * person who set it up. Public tags are visible to everyone. - * - * @param privateTag indicator of a private tag - */ - public void setIsPrivateTag(boolean privateTag) - { - isPrivateTag = privateTag; - } - - - /** - * Return the user id of the person who created the tag. Null means the user id is not known. - * - * @return String tagging user - */ - public String getUser() { - return user; - } - - - /** - * Set up the user id of the person who created the tag. Null means the user id is not known. - * - * @param user String identifier of the creator of the tag. - */ - public void setUser(String user) - { - this.user = user; - } - - - /** - * Return the name of the tag. It is not valid to have a tag with no name. However, there is a point where - * the tag object is created and the tag name not yet set, so null is a possible response. - * - * @return String tag name - */ - public String getName() { - return name; - } - - - /** - * Set up the name of the tag. It is not valid to have a tag with no name. However, there is a point where - * the tag object is created and the tag name not yet set, so null is a possible response. - * - * @param name String tag name - */ - public void setName(String name) - { - this.name = name; - } - - - /** - * Return the tag description null means no description is available. - * - * @return String tag description - */ - public String getDescription() - { - return description; - } - - - /** - * Set up the tag description null means no description is available. - * - * @param tagDescription tag description - */ - public void setDescription(String tagDescription) { - this.description = tagDescription; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "InformalTagProperties{" + - ", isPrivateTag=" + isPrivateTag + - ", name='" + name + '\'' + - ", description='" + description + '\'' + - ", user='" + user + '\'' + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof InformalTagProperties)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - InformalTagProperties that = (InformalTagProperties) objectToCompare; - return getIsPrivateTag() == that.getIsPrivateTag() && - Objects.equals(getName(), that.getName()) && - Objects.equals(getDescription(), that.getDescription()) && - Objects.equals(getUser(), that.getUser()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(isPrivateTag, name, description, user); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/LevelIdentifierProperties.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/LevelIdentifierProperties.java deleted file mode 100644 index 6ffac1e13a8..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/LevelIdentifierProperties.java +++ /dev/null @@ -1,106 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetmanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * LevelIdentifierProperties describes the properties for searching for a governance action classification by its level. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class LevelIdentifierProperties extends FindProperties -{ - private boolean returnSpecificLevel = false; - private int levelIdentifier = 0; - - - /** - * Default constructor - */ - public LevelIdentifierProperties() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public LevelIdentifierProperties(LevelIdentifierProperties template) - { - super(template); - - if (template != null) - { - this.returnSpecificLevel = template.getReturnSpecificLevel(); - this.levelIdentifier = template.getLevelIdentifier(); - } - } - - - /** - * Return whether the level identifier is in use - * - * @return boolean - */ - public boolean getReturnSpecificLevel() - { - return returnSpecificLevel; - } - - - /** - * Set up whether the level identifier is in use. - * - * @param flag boolean - */ - public void setReturnSpecificLevel(boolean flag) - { - returnSpecificLevel = flag; - } - - - /** - * Return the level to match on. - * - * @return int - */ - public int getLevelIdentifier() - { - return levelIdentifier; - } - - - /** - * Set up the level to match on. - * - * @param levelIdentifier int - */ - public void setLevelIdentifier(int levelIdentifier) - { - this.levelIdentifier = levelIdentifier; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "LevelIdentifierProperties{" + - "returnSpecificLevel=" + returnSpecificLevel + - ", levelIdentifier=" + levelIdentifier + - '}'; - } -} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/LikeProperties.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/LikeProperties.java deleted file mode 100644 index 79d49e2506b..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/LikeProperties.java +++ /dev/null @@ -1,115 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetmanager.properties; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * The LikeProperties object records a single user's "like" of an element. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class LikeProperties -{ - private String user = null; - - - /** - * Default constructor - */ - public LikeProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template element to copy - */ - public LikeProperties(LikeProperties template) - { - if (template != null) - { - user = template.getUser(); - } - } - - - /** - * Return the user id of the person who created the like. Null means the user id is not known. - * - * @return String liking user - */ - public String getUser() { - return user; - } - - - /** - * Set up the user id of the person who created the like. Null means the user id is not known. - * - * @param user String liking user - */ - public void setUser(String user) - { - this.user = user; - } - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "LikeProperties{" + - "user='" + user + '\'' + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - LikeProperties like = (LikeProperties) objectToCompare; - return Objects.equals(getUser(), like.getUser()); - } - - - /** - * Hash of properties - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(user); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/LineageMappingProperties.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/LineageMappingProperties.java deleted file mode 100644 index a196d15cd39..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/LineageMappingProperties.java +++ /dev/null @@ -1,151 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetmanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * LineageMappingProperties describe the properties for a lineage mapping relationship. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class LineageMappingProperties extends RelationshipProperties -{ - private String qualifiedName = null; - private String description = null; - - - /** - * Default constructor - */ - public LineageMappingProperties() - { - super(); - } - - - /** - * Copy/clone constructor. Retrieves values from the supplied template - * - * @param template element to copy - */ - public LineageMappingProperties(LineageMappingProperties template) - { - super(template); - - if (template != null) - { - qualifiedName = template.getQualifiedName(); - description = template.getDescription(); - } - } - - - /** - * Set up the fully qualified name. - * - * @param qualifiedName String name - */ - public void setQualifiedName(String qualifiedName) - { - this.qualifiedName = qualifiedName; - } - - - /** - * Returns the stored qualified name property for the relationship. - * If no qualified name is available then the empty string is returned. - * - * @return qualifiedName - */ - public String getQualifiedName() - { - return qualifiedName; - } - - - /** - * Return the description of the relationship. - * - * @return string text - */ - public String getDescription() - { - return description; - } - - - /** - * Set up the description of the relationship. - * - * @param description string text - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "LineageMappingProperties{" + - "qualifiedName='" + qualifiedName + '\'' + - ", description='" + description + '\'' + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - LineageMappingProperties that = (LineageMappingProperties) objectToCompare; - return Objects.equals(qualifiedName, that.qualifiedName) && - Objects.equals(description, that.description); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), qualifiedName, description); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/LocationProperties.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/LocationProperties.java deleted file mode 100644 index 77e6894787f..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/LocationProperties.java +++ /dev/null @@ -1,154 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetmanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * LocationProperties is a class for representing a physical or digital location. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class LocationProperties extends ReferenceableProperties -{ - private String displayName = null; - private String description = null; - - - /** - * Default constructor - */ - public LocationProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public LocationProperties(LocationProperties template) - { - super(template); - - if (template != null) - { - displayName = template.getDisplayName(); - description = template.getDescription(); - } - } - - - /** - * Return a human memorable name for the location. - * - * @return string name - */ - public String getDisplayName() - { - return displayName; - } - - - /** - * Set up a human memorable name for the location. - * - * @param displayName string name - */ - public void setDisplayName(String displayName) - { - this.displayName = displayName; - } - - - /** - * Return the description of the location. - * - * @return string text - */ - public String getDescription() - { - return description; - } - - - /** - * Set up the description of the location. - * - * @param description string text - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "LocationProperties{" + - "displayName='" + displayName + '\'' + - ", description='" + description + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - LocationProperties that = (LocationProperties) objectToCompare; - return Objects.equals(displayName, that.displayName) && - Objects.equals(description, that.description); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), displayName, description); - } -} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/NoteLogProperties.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/NoteLogProperties.java deleted file mode 100644 index 10393fb9877..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/NoteLogProperties.java +++ /dev/null @@ -1,159 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetmanager.properties; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * NoteLogHeader manages a list of notes for an asset - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class NoteLogProperties extends ReferenceableProperties -{ - - protected String displayName = null; - protected String description = null; - - - /** - * Default constructor - */ - public NoteLogProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template note log to copy - */ - public NoteLogProperties(NoteLogProperties template) - { - super(template); - - if (template != null) - { - displayName = template.getDisplayName(); - description = template.getDescription(); - } - } - - - /** - * Return the stored display name property for the note log. - * If no display name is available then null is returned. - * - * @return String Name - */ - public String getDisplayName() - { - return displayName; - } - - - /** - * Set up the stored display name property for the note log. - * - * @param displayName - String name - */ - public void setDisplayName(String displayName) - { - this.displayName = displayName; - } - - - /** - * Return the stored description property for the note log. - * If no description is provided then null is returned. - * - * @return description - */ - public String getDescription() - { - return description; - } - - - /** - * Set up the stored description property for the note log. - * - * @param description String text - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "NoteLogProperties{" + - "displayName='" + displayName + '\'' + - ", description='" + description + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - NoteLogProperties noteLog = (NoteLogProperties) objectToCompare; - return Objects.equals(getDisplayName(), noteLog.getDisplayName()) && - Objects.equals(getDescription(), noteLog.getDescription()); - } - - - /** - * Hash of properties - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), getDisplayName(), getDescription()); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/NoteProperties.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/NoteProperties.java deleted file mode 100644 index 3299c05fe0e..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/NoteProperties.java +++ /dev/null @@ -1,151 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetmanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * Note defines the properties of a single note in a note log. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class NoteProperties extends ReferenceableProperties -{ - private String title = null; - private String text = null; - - - - /** - * Default constructor - */ - public NoteProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template note to copy - */ - public NoteProperties(NoteProperties template) - { - super(template); - - if (template != null) - { - title = template.getTitle(); - text = template.getText(); - } - } - - - /** - * Return the title. - * - * @return string - */ - public String getTitle() - { - return title; - } - - - /** - * Set up the title. - * - * @param title string - */ - public void setTitle(String title) - { - this.title = title; - } - - - /** - * Return the text of the note. - * - * @return String text - */ - public String getText() { return text; } - - - /** - * Set up the text of the note. - * - * @param text String text - */ - public void setText(String text) - { - this.text = text; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "NoteProperties{" + - "title='" + title + '\'' + - ", text='" + text + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (! (objectToCompare instanceof NoteProperties that)) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - return Objects.equals(title, that.title) && Objects.equals(text, that.text); - } - - - /** - * Hash of properties - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), title, text); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/PortProperties.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/PortProperties.java deleted file mode 100644 index bb45ea59a76..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/PortProperties.java +++ /dev/null @@ -1,156 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetmanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.openmetadata.enums.PortType; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * PortProperties is a class for representing a generic port for a process. The typeName is set to indicate it is either a - * PortAlias (part of a choreographing process) or PortImplementation (part of an implemented process). - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class PortProperties extends ReferenceableProperties -{ - private String displayName = null; - private PortType portType = null; - - - /** - * Default constructor - */ - public PortProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public PortProperties(PortProperties template) - { - super(template); - - if (template != null) - { - displayName = template.getDisplayName(); - portType = template.getPortType(); - } - } - - - /** - * Return a human memorable name for the port. - * - * @return string name - */ - public String getDisplayName() - { - return displayName; - } - - - /** - * Set up a human memorable name for the port. - * - * @param displayName string name - */ - public void setDisplayName(String displayName) - { - this.displayName = displayName; - } - - - /** - * Return the direction of data flow of the port. - * - * @return portType enum - */ - public PortType getPortType() - { - return portType; - } - - - /** - * Set up the direction of data flow of the port. - * - * @param portType portType enum - */ - public void setPortType(PortType portType) - { - this.portType = portType; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "PortProperties{" + - "displayName='" + displayName + '\'' + - ", portType=" + portType + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - PortProperties that = (PortProperties) objectToCompare; - return Objects.equals(getDisplayName(), that.getDisplayName()) && - getPortType() == that.getPortType(); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), displayName, portType); - } -} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/ProcessCallProperties.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/ProcessCallProperties.java deleted file mode 100644 index 63ecfb6f4a0..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/ProcessCallProperties.java +++ /dev/null @@ -1,203 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetmanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ProcessCallProperties describe the properties for a process call relationship. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ProcessCallProperties extends RelationshipProperties -{ - private String qualifiedName = null; - private String description = null; - private String formula = null; - private String formulaType = null; - - - /** - * Default constructor - */ - public ProcessCallProperties() - { - super(); - } - - - /** - * Copy/clone constructor. Retrieves values from the supplied template - * - * @param template element to copy - */ - public ProcessCallProperties(ProcessCallProperties template) - { - super(template); - - if (template != null) - { - qualifiedName = template.getQualifiedName(); - description = template.getDescription(); - formula = template.getFormula(); - formulaType = template.getFormulaType(); - } - } - - - /** - * Set up the fully qualified name. - * - * @param qualifiedName String name - */ - public void setQualifiedName(String qualifiedName) - { - this.qualifiedName = qualifiedName; - } - - - /** - * Returns the stored qualified name property for the relationship. - * If no qualified name is available then the empty string is returned. - * - * @return qualifiedName - */ - public String getQualifiedName() - { - return qualifiedName; - } - - - /** - * Return the description of the relationship. - * - * @return string text - */ - public String getDescription() - { - return description; - } - - - /** - * Set up the description of the relationship. - * - * @param description string text - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * Return the formula of the relationship. - * - * @return string formula - */ - public String getFormula() - { - return formula; - } - - - /** - * Set up the formula of the relationship. - * - * @param formula string name - */ - public void setFormula(String formula) - { - this.formula = formula; - } - - - /** - * Return the specification language for the formula. - * - * @return string description - */ - public String getFormulaType() - { - return formulaType; - } - - - /** - * Set up the specification language for the formula. - * - * @param formulaType string description - */ - public void setFormulaType(String formulaType) - { - this.formulaType = formulaType; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "ProcessCallProperties{" + - "qualifiedName='" + qualifiedName + '\'' + - ", description='" + description + '\'' + - ", formula='" + formula + '\'' + - ", formulaType='" + formulaType + '\'' + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - ProcessCallProperties that = (ProcessCallProperties) objectToCompare; - return Objects.equals(qualifiedName, that.qualifiedName) && - Objects.equals(description, that.description) && - Objects.equals(formula, that.formula) && - Objects.equals(formulaType, that.formulaType); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), qualifiedName, description, formula, formulaType); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/ProcessContainmentType.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/ProcessContainmentType.java deleted file mode 100644 index 2d675e7e20d..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/ProcessContainmentType.java +++ /dev/null @@ -1,147 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetmanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ProcessContainmentType defines the ownership of a process withing a sub process. It is used in a - * ProcessHierarchy relationship. - *
    - *
  • OWNED - The parent process owns the child process in the relationship, such that if the parent is removed the child should also be removed. - * A child can have at most one such parent.
  • - *
  • USED - The child process is simply used by the parent. A child process can have many such relationships to parents.
  • - *
  • OTHER - None of the above.
  • - *
- */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public enum ProcessContainmentType -{ - /** - * Owned - The parent process owns the child process in the relationship, such that if the parent is removed the child should also be removed. A child can have at most one such parent. - */ - OWNED (0, 0, "Owned", "The parent process owns the child process in the relationship, such that if the parent is removed the child should also be removed. A child can have at most one such parent."), - - /** - * Used - The child process is simply used by the parent. A child process can have many such relationships to parents. - */ - USED (1, 1, "Used", "The child process is simply used by the parent. A child process can have many such relationships to parents."), - - /** - * Other - None of the above. - */ - OTHER (99, 99, "Other", "None of the above."); - - - private static final String ENUM_TYPE_GUID = "1bb4b908-7983-4802-a2b5-91b095552ee9"; - private static final String ENUM_TYPE_NAME = "ProcessContainmentType"; - - private final int ordinal; - private final int openTypeOrdinal; - private final String name; - private final String description; - - - /** - * Constructor to set up the instance of this enum. - * - * @param ordinal code number - * @param openTypeOrdinal code number from the equivalent Enum Type - * @param name default name - * @param description default description - */ - ProcessContainmentType(int ordinal, - int openTypeOrdinal, - String name, - String description) - { - this.ordinal = ordinal; - this.openTypeOrdinal = openTypeOrdinal; - this.name = name; - this.description = description; - } - - - /** - * Return the code for this enum used for indexing based on the enum value. - * - * @return int code number - */ - public int getOrdinal() - { - return ordinal; - } - - - /** - * Return the default name for this enum type. - * - * @return String name - */ - public String getName() - { - return name; - } - - - /** - * Return the default description for this enum. - * - * @return String description - */ - public String getDescription() - { - return description; - } - - - /** - * Return the code for this enum that comes from the Open Metadata Type that this enum represents. - * - * @return int code number - */ - public int getOpenTypeOrdinal() - { - return openTypeOrdinal; - } - - - /** - * Return the unique identifier for the open metadata enum type that this enum class represents. - * - * @return string guid - */ - public String getOpenTypeGUID() { return ENUM_TYPE_GUID; } - - - /** - * Return the unique name for the open metadata enum type that this enum class represents. - * - * @return string name - */ - public String getOpenTypeName() { return ENUM_TYPE_NAME; } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "ProcessContainmentType{" + - "codeValue=" + ordinal + - ", codeName='" + name + '\'' + - ", description='" + description + - '}'; - } -} - diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/ProcessProperties.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/ProcessProperties.java deleted file mode 100644 index 8cf796664e3..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/ProcessProperties.java +++ /dev/null @@ -1,206 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetmanager.properties; - -import com.fasterxml.jackson.annotation.*; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * Process properties defines the properties of a process. A process is a series of steps and decisions in operation - * in the organization. It is typically an automated process but may be performed by a person. - * Only set the deployedImplementationType or implementationLanguage if the process is automated - ie inherits from DeployedSoftwareComponent. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ProcessProperties extends AssetProperties -{ - private String formula = null; - private String formulaType = null; - private String deployedImplementationType = null; - private String implementationLanguage = null; - - /** - * Default constructor - */ - public ProcessProperties() - { - super(); - } - - - /** - * Copy/clone Constructor - * - * @param template template object to copy. - */ - public ProcessProperties(ProcessProperties template) - { - super(template); - - if (template != null) - { - formula = template.getFormula(); - formulaType = template.getFormulaType(); - implementationLanguage = template.getImplementationLanguage(); - deployedImplementationType = template.getDeployedImplementationType(); - } - } - - - /** - * Return the description of the processing performed by this process. - * - * @return string description - */ - public String getFormula() { return formula; } - - - /** - * Set up the description of the processing performed by this process. - * - * @param formula string description - */ - public void setFormula(String formula) - { - this.formula = formula; - } - - - /** - * Return the specification language for the formula. - * - * @return string description - */ - public String getFormulaType() - { - return formulaType; - } - - - /** - * Set up the specification language for the formula. - * - * @param formulaType string description - */ - public void setFormulaType(String formulaType) - { - this.formulaType = formulaType; - } - - - /** - * Retrieve the name of the technology used for this process (DeployedComponentType only). - * - * @return string name - */ - public String getDeployedImplementationType() - { - return deployedImplementationType; - } - - - /** - * Set up the name of the technology used for this process (DeployedComponentType only). - * - * @param deployedImplementationType string name - */ - public void setDeployedImplementationType(String deployedImplementationType) - { - this.deployedImplementationType = deployedImplementationType; - } - - - /** - * Return the name of the programming language that this process is implemented in (DeployedComponentType only). - * - * @return string name - */ - public String getImplementationLanguage() - { - return implementationLanguage; - } - - - /** - * Set up the name of the programming language that this process is implemented in (DeployedComponentType only). - * - * @param implementationLanguage string name - */ - public void setImplementationLanguage(String implementationLanguage) - { - this.implementationLanguage = implementationLanguage; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "ProcessProperties{" + - ", formula='" + formula + '\'' + - ", deployedImplementationType='" + deployedImplementationType + '\'' + - ", implementationLanguage='" + implementationLanguage + '\'' + - ", technicalName='" + getTechnicalName() + '\'' + - ", versionIdentifier='" + getVersionIdentifier() + '\'' + - ", technicalDescription='" + getTechnicalDescription() + '\'' + - ", displayName='" + getDisplayName() + '\'' + - ", summary='" + getSummary() + '\'' + - ", description='" + getDescription() + '\'' + - ", abbreviation='" + getAbbreviation() + '\'' + - ", usage='" + getUsage() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - ProcessProperties that = (ProcessProperties) objectToCompare; - return Objects.equals(formula, that.formula) && - Objects.equals(implementationLanguage, that.implementationLanguage); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), getFormula(), getImplementationLanguage()); - } -} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/ProcessStatus.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/ProcessStatus.java deleted file mode 100644 index 12b60e7e5cf..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/ProcessStatus.java +++ /dev/null @@ -1,140 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetmanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * The ProcessStatus defines the status of a process. It effectively - * defines its visibility to different types of queries. Most queries by default will only return instances in the - * active status. - *
    - *
  • Unknown: Unknown process status.
  • - *
  • Draft: The process is incomplete.
  • - *
  • Proposed: The process is in review.
  • - *
  • Approved: The process is approved.
  • - *
  • Active: The process is approved and in use.
  • - *
- */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public enum ProcessStatus -{ - /** - * Unknown - Unknown process status. - */ - UNKNOWN (0,0, "Unknown", "Unknown process status."), - - /** - * Draft - The process is incomplete. - */ - DRAFT (1,1, "Draft", "The process is incomplete."), - - /** - * Proposed - The process is in review. - */ - PROPOSED (2,3, "Proposed", "The process is in review."), - - /** - * Approved - The process is approved. - */ - APPROVED (3,4, "Approved", "The process is approved."), - - /** - * Active - The process is approved and in use. - */ - ACTIVE (4,15, "Active", "The process is approved and in use."); - - - private final int ordinal; - private final int openTypeOrdinal; - private final String name; - private final String description; - - - - /** - * Constructor to set up the instance of this enum. - * - * @param ordinal code number - * @param openTypeOrdinal code number from the equivalent Enum Type - * @param name default name - * @param description default description - */ - ProcessStatus(int ordinal, - int openTypeOrdinal, - String name, - String description) - { - this.ordinal = ordinal; - this.openTypeOrdinal = openTypeOrdinal; - this.name = name; - this.description = description; - } - - /** - * Return the code for this enum instance - * - * @return int key pattern code - */ - public int getOrdinal() - { - return ordinal; - } - - - /** - * Return the code for this enum that comes from the Open Metadata Type that this enum represents. - * - * @return int code number - */ - public int getOpenTypeOrdinal() - { - return openTypeOrdinal; - } - - - - /** - * Return the default name for this enum instance. - * - * @return String default name - */ - public String getName() - { - return name; - } - - - /** - * Return the default description for the key pattern for this enum instance. - * - * @return String default description - */ - public String getDescription() - { - return description; - } - - - /** - * toString() JSON-style - * - * @return string description - */ - @Override - public String toString() - { - return "ProcessStatus{" + - "ordinal=" + ordinal + - ", openTypeOrdinal=" + openTypeOrdinal + - ", name='" + name + '\'' + - ", description='" + description + '\'' + - '}'; - }} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/RatingProperties.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/RatingProperties.java deleted file mode 100644 index e1c364acfbd..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/RatingProperties.java +++ /dev/null @@ -1,173 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetmanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.openmetadata.enums.StarRating; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * RatingProperties stores information about a rating connected to an asset. Ratings provide informal feedback on the quality of assets - * and can be added at any time. - *

- * Ratings have the userId of the person who added it, a star rating and an optional review comment. - *

- * The content of the rating is a personal judgement (which is why the user's id is in the object) - * and there is no formal review of the ratings. However, they can be used as a basis for crowd-sourcing - * feedback to asset owners. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class RatingProperties -{ - private StarRating starRating = null; - private String review = null; - private String user = null; - - /** - * Default constructor - */ - public RatingProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template element to copy - */ - public RatingProperties(RatingProperties template) - { - if (template != null) - { - user = template.getUser(); - starRating = template.getStarRating(); - review = template.getReview(); - } - } - - - /** - * Return the user id of the person who created the rating. Null means the user id is not known. - * - * @return String user - */ - public String getUser() { - return user; - } - - - /** - * Set up the user id of the person who created the rating. Null means the user id is not known. - * - * @param user string - */ - public void setUser(String user) - { - this.user = user; - } - - - /** - * Return the stars for the rating. - * - * @return StarRating enum - */ - public StarRating getStarRating() { - return starRating; - } - - - /** - * Set up the stars for the rating. - * - * @param starRating StarRating enum - */ - public void setStarRating(StarRating starRating) - { - this.starRating = starRating; - } - - - /** - * Return the review comments - null means no review is available. - * - * @return String review comments - */ - public String getReview() - { - return review; - } - - - /** - * Set up the review comments - null means no review is available. - * - * @param review String review comments - */ - public void setReview(String review) - { - this.review = review; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "RatingProperties{" + - "starRating=" + starRating + - ", review='" + review + '\'' + - ", user='" + user + '\'' + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - RatingProperties rating = (RatingProperties) objectToCompare; - return getStarRating() == rating.getStarRating() && - Objects.equals(getReview(), rating.getReview()) && - Objects.equals(getUser(), rating.getUser()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(starRating, review, user); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/ReferenceValueAssignmentProperties.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/ReferenceValueAssignmentProperties.java deleted file mode 100644 index 6a7ae0d14cb..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/ReferenceValueAssignmentProperties.java +++ /dev/null @@ -1,257 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetmanager.properties; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ReferenceValueAssignmentProperties is a java bean used to create a link between a valid value and a referenceable item - * to enable the valid value to be used as a semiformal tag/classifier. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ReferenceValueAssignmentProperties extends RelationshipProperties -{ - private String attributeName = null; - private int confidence = 0; - private String steward = null; - private String stewardTypeName = null; - private String stewardPropertyName = null; - private String notes = null; - - - /** - * Default constructor - */ - public ReferenceValueAssignmentProperties() - { - } - - - /** - * Copy/clone constructor. Note, this is a deep copy - * - * @param template object to copy - */ - public ReferenceValueAssignmentProperties(ReferenceValueAssignmentProperties template) - { - super (template); - - if (template != null) - { - attributeName = template.getAttributeName(); - confidence = template.getConfidence(); - steward = template.getSteward(); - stewardTypeName = template.getStewardTypeName(); - stewardPropertyName = template.getStewardPropertyName(); - notes = template.getNotes(); - } - } - - - /** - * Return the name of the attribute that this reference data value represents. - * - * @return string - */ - public String getAttributeName() - { - return attributeName; - } - - - /** - * Set up the name of the attribute that this reference data value represents. - * - * @param attributeName string - */ - public void setAttributeName(String attributeName) - { - this.attributeName = attributeName; - } - - - /** - * Return the confidence level (0-100) that the mapping is correct. - * - * @return int - */ - public int getConfidence() - { - return confidence; - } - - - /** - * Set up the confidence level (0-100) that the mapping is correct. - * - * @param confidence int - */ - public void setConfidence(int confidence) - { - this.confidence = confidence; - } - - - /** - * Returns the id of the steward responsible for the mapping. - * - * @return String id - */ - public String getSteward() - { - return steward; - } - - - /** - * Set up the id of the steward responsible for the mapping. - * - * @param steward String id - */ - public void setSteward(String steward) - { - this.steward = steward; - } - - - /** - * Return the type of element that describes the steward. - * - * @return type name - */ - public String getStewardTypeName() - { - return stewardTypeName; - } - - - /** - * Set up the type of element that describes the steward. - * - * @param stewardTypeName type name - */ - public void setStewardTypeName(String stewardTypeName) - { - this.stewardTypeName = stewardTypeName; - } - - - /** - * Return the name of the property that holds the steward's identifier. - * - * @return property name - */ - public String getStewardPropertyName() - { - return stewardPropertyName; - } - - - /** - * Set up the name of the property that holds the steward's identifier. - * - * @param stewardPropertyName property name - */ - public void setStewardPropertyName(String stewardPropertyName) - { - this.stewardPropertyName = stewardPropertyName; - } - - - /** - * Return the additional values associated with the symbolic name. - * - * @return string text - */ - public String getNotes() - { - return notes; - } - - - /** - * Set up the additional values associated with the symbolic name. - * - * @param notes string text - */ - public void setNotes(String notes) - { - this.notes = notes; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "ReferenceValueAssignmentProperties{" + - "confidence=" + confidence + - ", attributeName='" + attributeName + '\'' + - ", steward='" + steward + '\'' + - ", stewardTypeName='" + stewardTypeName + '\'' + - ", stewardPropertyName='" + stewardPropertyName + '\'' + - ", notes='" + notes + '\'' + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - ReferenceValueAssignmentProperties that = (ReferenceValueAssignmentProperties) objectToCompare; - return confidence == that.confidence && - Objects.equals(attributeName, that.attributeName) && - Objects.equals(steward, that.steward) && - Objects.equals(stewardTypeName, that.stewardTypeName) && - Objects.equals(stewardPropertyName, that.stewardPropertyName) && - Objects.equals(notes, that.notes); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), confidence, steward, stewardTypeName, stewardPropertyName, notes); - } -} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/ReferenceableProperties.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/ReferenceableProperties.java deleted file mode 100644 index 493972d3267..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/ReferenceableProperties.java +++ /dev/null @@ -1,325 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetmanager.properties; - -import com.fasterxml.jackson.annotation.*; - -import java.util.*; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * Many open metadata entities are referenceable. It means that they have a qualified name and additional - * properties. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes( - { - @JsonSubTypes.Type(value = CommentProperties.class, name = "CommentProperties"), - @JsonSubTypes.Type(value = GlossaryProperties.class, name = "GlossaryProperties"), - @JsonSubTypes.Type(value = GlossaryCategoryProperties.class, name = "GlossaryCategoryProperties"), - @JsonSubTypes.Type(value = GlossaryTermProperties.class, name = "GlossaryTermProperties"), - @JsonSubTypes.Type(value = NoteLogProperties.class, name = "NoteLogProperties"), - @JsonSubTypes.Type(value = NoteProperties.class, name = "NoteProperties"), - @JsonSubTypes.Type(value = PortProperties.class, name = "PortProperties"), - @JsonSubTypes.Type(value = SupplementaryProperties.class, name = "SupplementaryProperties"), - @JsonSubTypes.Type(value = ValidValueProperties.class, name = "ValidValueProperties"), - }) -public class ReferenceableProperties -{ - private String qualifiedName = null; - private Map additionalProperties = null; - - private Date effectiveFrom = null; - private Date effectiveTo = null; - - private Map vendorProperties = null; - - private String typeName = null; - private Map extendedProperties = null; - - /** - * Default constructor - */ - public ReferenceableProperties() - { - super(); - } - - - /** - * Copy/clone constructor. Retrieve values from the supplied template - * - * @param template element to copy - */ - public ReferenceableProperties(ReferenceableProperties template) - { - if (template != null) - { - qualifiedName = template.getQualifiedName(); - additionalProperties = template.getAdditionalProperties(); - - effectiveFrom = template.getEffectiveFrom(); - effectiveTo = template.getEffectiveTo(); - - vendorProperties = template.getVendorProperties(); - - typeName = template.getTypeName(); - extendedProperties = template.getExtendedProperties(); - } - } - - - /** - * Set up the fully qualified name. - * - * @param qualifiedName String name - */ - public void setQualifiedName(String qualifiedName) - { - this.qualifiedName = qualifiedName; - } - - - /** - * Returns the stored qualified name property for the metadata entity. - * If no qualified name is available then the empty string is returned. - * - * @return qualifiedName - */ - public String getQualifiedName() - { - return qualifiedName; - } - - - /** - * Set up additional properties. - * - * @param additionalProperties Additional properties object - */ - public void setAdditionalProperties(Map additionalProperties) - { - this.additionalProperties = additionalProperties; - } - - - /** - * Return a copy of the additional properties. Null means no additional properties are available. - * - * @return AdditionalProperties - */ - public Map getAdditionalProperties() - { - if (additionalProperties == null) - { - return null; - } - else if (additionalProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(additionalProperties); - } - } - - - /** - * Return the date/time that this element is effective from (null means effective from the epoch). - * - * @return date object - */ - public Date getEffectiveFrom() - { - return effectiveFrom; - } - - - /** - * Set up the date/time that this element is effective from (null means effective from the epoch). - * - * @param effectiveFrom date object - */ - public void setEffectiveFrom(Date effectiveFrom) - { - this.effectiveFrom = effectiveFrom; - } - - - /** - * Return the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @return date object - */ - public Date getEffectiveTo() - { - return effectiveTo; - } - - - /** - * Set the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @param effectiveTo date object - */ - public void setEffectiveTo(Date effectiveTo) - { - this.effectiveTo = effectiveTo; - } - - - /** - * Return specific properties for the specific technology vendor. - * - * @return name value pairs - */ - public Map getVendorProperties() - { - if (vendorProperties == null) - { - return null; - } - else if (vendorProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(vendorProperties); - } - } - - - /** - * Set up specific properties for the specific technology vendor. - * - * @param vendorProperties name value pairs - */ - public void setVendorProperties(Map vendorProperties) - { - this.vendorProperties = vendorProperties; - } - - - /** - * Return the name of the open metadata type for this metadata element. - * - * @return string name - */ - public String getTypeName() - { - return typeName; - } - - - /** - * Set up the name of the open metadata type for this element. - * - * @param typeName string name - */ - public void setTypeName(String typeName) - { - this.typeName = typeName; - } - - - /** - * Return the properties that have been defined for a subtype of this object that are not supported explicitly - * by this bean. - * - * @return property map - */ - public Map getExtendedProperties() - { - if (extendedProperties == null) - { - return null; - } - else if (extendedProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(extendedProperties); - } - } - - - /** - * Set up the properties that have been defined for a subtype of this object that are not supported explicitly - * by this bean. - * - * @param extendedProperties property map - */ - public void setExtendedProperties(Map extendedProperties) - { - this.extendedProperties = extendedProperties; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "ReferenceableProperties{" + - "qualifiedName='" + qualifiedName + '\'' + - ", additionalProperties=" + additionalProperties + - ", vendorProperties=" + vendorProperties + - ", typeName='" + typeName + '\'' + - ", extendedProperties=" + extendedProperties + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ReferenceableProperties that = (ReferenceableProperties) objectToCompare; - return Objects.equals(qualifiedName, that.qualifiedName) && - Objects.equals(additionalProperties, that.additionalProperties) && - Objects.equals(effectiveFrom, that.effectiveFrom) && - Objects.equals(effectiveTo, that.effectiveTo) && - Objects.equals(vendorProperties, that.vendorProperties) && - Objects.equals(typeName, that.typeName) && - Objects.equals(extendedProperties, that.extendedProperties); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(qualifiedName, additionalProperties, effectiveFrom, effectiveTo, vendorProperties, typeName, extendedProperties); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/RelationshipProperties.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/RelationshipProperties.java deleted file mode 100644 index 22576b28845..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/RelationshipProperties.java +++ /dev/null @@ -1,211 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetmanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; - -import java.util.Date; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * RelationshipProperties provides the base class for relationships items. This provides extended properties with the ability to - * set effectivity dates. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes( - { - @JsonSubTypes.Type(value = AssetConnectionProperties.class, name = "AssetConnectionProperties"), - @JsonSubTypes.Type(value = CapabilityDeploymentProperties.class, name = "CapabilityDeploymentProperties"), - @JsonSubTypes.Type(value = ControlFlowProperties.class, name = "ControlFlowProperties"), - @JsonSubTypes.Type(value = DataContentForDataSetProperties.class, name = "DataContentForDataSetProperties"), - @JsonSubTypes.Type(value = DataFlowProperties.class, name = "DataFlowProperties"), - @JsonSubTypes.Type(value = DeploymentProperties.class, name = "DeploymentProperties"), - @JsonSubTypes.Type(value = EmbeddedConnectionProperties.class, name = "EmbeddedConnectionProperties"), - @JsonSubTypes.Type(value = ExternalGlossaryElementLinkProperties.class, name = "ExternalGlossaryElementLinkProperties"), - @JsonSubTypes.Type(value = ExternalReferenceLinkProperties.class, name = "ExternalReferenceLinkProperties"), - @JsonSubTypes.Type(value = FeedbackProperties.class, name = "FeedbackProperties"), - @JsonSubTypes.Type(value = ForeignKeyProperties.class, name = "ForeignKeyProperties"), - @JsonSubTypes.Type(value = GlossaryTermCategorization.class, name = "GlossaryTermCategorization"), - @JsonSubTypes.Type(value = GlossaryTermRelationship.class, name = "GlossaryTermRelationship"), - @JsonSubTypes.Type(value = LineageMappingProperties.class, name = "LineageMappingProperties"), - @JsonSubTypes.Type(value = ProcessCallProperties.class, name = "ProcessCallProperties"), - @JsonSubTypes.Type(value = ProcessContainmentProperties.class, name = "ProcessContainmentProperties"), - @JsonSubTypes.Type(value = SemanticAssignmentProperties.class, name = "SemanticAssignmentProperties"), - @JsonSubTypes.Type(value = ServerAssetUseProperties.class, name = "ServerAssetUseProperties"), - }) -public class RelationshipProperties -{ - private Date effectiveFrom = null; - private Date effectiveTo = null; - - private Map extendedProperties = null; - - - /** - * Default constructor - */ - public RelationshipProperties() - { - super(); - } - - - /** - * Copy/clone constructor. Retrieve values from the supplied template - * - * @param template element to copy - */ - public RelationshipProperties(RelationshipProperties template) - { - if (template != null) - { - effectiveFrom = template.getEffectiveFrom(); - effectiveTo = template.getEffectiveTo(); - extendedProperties = template.getExtendedProperties(); - } - } - - - /** - * Return the date/time that this element is effective from (null means effective from the epoch). - * - * @return date object - */ - public Date getEffectiveFrom() - { - return effectiveFrom; - } - - - /** - * Set up the date/time that this element is effective from (null means effective from the epoch). - * - * @param effectiveFrom date object - */ - public void setEffectiveFrom(Date effectiveFrom) - { - this.effectiveFrom = effectiveFrom; - } - - - /** - * Return the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @return date object - */ - public Date getEffectiveTo() - { - return effectiveTo; - } - - - /** - * Set the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @param effectiveTo date object - */ - public void setEffectiveTo(Date effectiveTo) - { - this.effectiveTo = effectiveTo; - } - - - /** - * Return the properties that have been defined for a subtype of this object that are not supported explicitly - * by this bean. - * - * @return property map - */ - public Map getExtendedProperties() - { - if (extendedProperties == null) - { - return null; - } - else if (extendedProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(extendedProperties); - } - } - - - /** - * Set up the properties that have been defined for a subtype of this object that are not supported explicitly - * by this bean. - * - * @param extendedProperties property map - */ - public void setExtendedProperties(Map extendedProperties) - { - this.extendedProperties = extendedProperties; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "RelationshipProperties{" + - "effectiveFrom=" + effectiveFrom + - ", effectiveTo=" + effectiveTo + - ", extendedProperties=" + extendedProperties + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - RelationshipProperties that = (RelationshipProperties) objectToCompare; - return Objects.equals(effectiveFrom, that.effectiveFrom) && - Objects.equals(effectiveTo, that.effectiveTo); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(effectiveFrom, effectiveTo); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/RetentionClassificationProperties.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/RetentionClassificationProperties.java deleted file mode 100644 index 562fe5312b4..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/RetentionClassificationProperties.java +++ /dev/null @@ -1,211 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetmanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Date; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * RetentionClassificationProperties defines the retention requirements for related data items. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class RetentionClassificationProperties extends GovernanceClassificationBase -{ - private int retentionBasis = 0; - private String associatedGUID = null; - private Date archiveAfter = null; - private Date deleteAfter = null; - - - /** - * Default constructor - */ - public RetentionClassificationProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public RetentionClassificationProperties(RetentionClassificationProperties template) - { - super(template); - - if (template != null) - { - retentionBasis = template.getRetentionBasis(); - associatedGUID = template.getAssociatedGUID(); - archiveAfter = template.getArchiveAfter(); - deleteAfter = template.getDeleteAfter(); - } - } - - - /** - * Return a description of the factor used to set the archiveAfter and deleteAfter dates. - * - * @return int - */ - public int getRetentionBasis() - { - return retentionBasis; - } - - - /** - * Set up a description of the factor used to set the archiveAfter and deleteAfter dates. - * - * @param retentionBasis int - */ - public void setRetentionBasis(int retentionBasis) - { - this.retentionBasis = retentionBasis; - } - - - /** - * Return the unique identifier of the element used in deciding the archiveAfter and deleteAfter dates. - * For example if the retention basis is determined by the project lifetime, this identifier is the - * identifier of the associated project. - * - * @return string guid - */ - public String getAssociatedGUID() - { - return associatedGUID; - } - - - /** - * Set up the unique identifier of the element used in deciding the archiveAfter and deleteAfter dates. - * For example if the retention basis is determined by the project lifetime, this identifier is the - * identifier of the associated project. - * - * @param associatedGUID string guid - */ - public void setAssociatedGUID(String associatedGUID) - { - this.associatedGUID = associatedGUID; - } - - - /** - * Return the date that this asset will be archived. - * - * @return date/timestamp - */ - public Date getArchiveAfter() - { - return archiveAfter; - } - - - /** - * Set up the date that this asset will be archived. - * - * @param archiveAfter date/timestamp - */ - public void setArchiveAfter(Date archiveAfter) - { - this.archiveAfter = archiveAfter; - } - - - /** - * Return the date that this asset will be permanently deleted. - * - * @return date/timestamp - */ - public Date getDeleteAfter() - { - return deleteAfter; - } - - - /** - * Set up the date that this asset will be permanently deleted. - * - * @param deleteAfter date/timestamp - */ - public void setDeleteAfter(Date deleteAfter) - { - this.deleteAfter = deleteAfter; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "RetentionClassificationProperties{" + - "retentionBasis=" + retentionBasis + - ", associatedGUID='" + associatedGUID + '\'' + - ", archiveAfter=" + archiveAfter + - ", deleteAfter=" + deleteAfter + - ", status=" + getStatus() + - ", confidence=" + getConfidence() + - ", steward='" + getSteward() + '\'' + - ", source='" + getSource() + '\'' + - ", notes='" + getNotes() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - RetentionClassificationProperties that = (RetentionClassificationProperties) objectToCompare; - return retentionBasis == that.retentionBasis && - Objects.equals(associatedGUID, that.associatedGUID) && - Objects.equals(archiveAfter, that.archiveAfter) && - Objects.equals(deleteAfter, that.deleteAfter); - } - - - /** - * Return code value representing the contents of this object. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), retentionBasis, associatedGUID, archiveAfter, deleteAfter); - } -} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/SchemaAttributeProperties.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/SchemaAttributeProperties.java deleted file mode 100644 index f77a190f933..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/SchemaAttributeProperties.java +++ /dev/null @@ -1,505 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetmanager.properties; - -import com.fasterxml.jackson.annotation.*; -import org.odpi.openmetadata.frameworks.openmetadata.enums.DataItemSortOrder; - -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * SchemaAttributeProperties represents an attribute that is part of a complex schema type. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class SchemaAttributeProperties extends SchemaProperties -{ - private int elementPosition = 0; - private int minCardinality = 0; - private int maxCardinality = 0; - private boolean allowsDuplicateValues = false; - private boolean orderedValues = false; - private String defaultValueOverride = null; - private DataItemSortOrder sortOrder = null; - private int minimumLength = 0; - private int length = 0; - private int precision = 0; - private int significantDigits = 0; - private boolean isNullable = true; - private String nativeJavaClass = null; - private List aliases = null; - - private SchemaTypeProperties schemaType = null; - - /** - * Default constructor - */ - public SchemaAttributeProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template template schema attribute to copy. - */ - public SchemaAttributeProperties(SchemaAttributeProperties template) - { - super(template); - - if (template != null) - { - elementPosition = template.getElementPosition(); - minCardinality = template.getMinCardinality(); - maxCardinality = template.getMaxCardinality(); - allowsDuplicateValues = template.getAllowsDuplicateValues(); - orderedValues = template.getOrderedValues(); - sortOrder = template.getSortOrder(); - minimumLength = template.getMinimumLength(); - length = template.getLength(); - precision = template.getPrecision(); - significantDigits = template.getSignificantDigits(); - isNullable = template.getIsNullable(); - defaultValueOverride = template.getDefaultValueOverride(); - nativeJavaClass = template.getNativeJavaClass(); - aliases = template.getAliases(); - schemaType = template.getSchemaType(); - } - } - - - /** - * Return the position of this schema attribute in its parent schema. - * - * @return int position in schema - 0 means first - */ - public int getElementPosition() { return elementPosition; } - - - /** - * Set up the position of this schema attribute in its parent schema. - * - * @param elementPosition int position in schema - 0 means first - */ - public void setElementPosition(int elementPosition) - { - this.elementPosition = elementPosition; - } - - - /** - * Return this minimum number of instances allowed for this attribute. - * - * @return int - */ - public int getMinCardinality() - { - return minCardinality; - } - - - /** - * Set up the minimum number of instances allowed for this attribute. - * - * @param minCardinality int - */ - public void setMinCardinality(int minCardinality) - { - this.minCardinality = minCardinality; - } - - - /** - * Return the maximum number of instances allowed for this attribute. - * - * @return int (-1 means infinite) - */ - public int getMaxCardinality() - { - return maxCardinality; - } - - - /** - * Set up the maximum number of instances allowed for this attribute. - * - * @param maxCardinality int (-1 means infinite) - */ - public void setMaxCardinality(int maxCardinality) - { - this.maxCardinality = maxCardinality; - } - - - /** - * Return whether the same value can be used by more than one instance of this attribute. - * - * @return boolean flag - */ - public boolean getAllowsDuplicateValues() - { - return allowsDuplicateValues; - } - - - /** - * Set up whether the same value can be used by more than one instance of this attribute. - * - * @param allowsDuplicateValues boolean flag - */ - public void setAllowsDuplicateValues(boolean allowsDuplicateValues) - { - this.allowsDuplicateValues = allowsDuplicateValues; - } - - - /** - * Return whether the attribute instances are arranged in an order. - * - * @return boolean flag - */ - public boolean getOrderedValues() - { - return orderedValues; - } - - - /** - * Set up whether the attribute instances are arranged in an order. - * - * @param orderedValues boolean flag - */ - public void setOrderedValues(boolean orderedValues) - { - this.orderedValues = orderedValues; - } - - - /** - * Return the order that the attribute instances are arranged in - if any. - * - * @return DataItemSortOrder enum - */ - public DataItemSortOrder getSortOrder() - { - return sortOrder; - } - - - /** - * Set up the order that the attribute instances are arranged in - if any. - * - * @param sortOrder DataItemSortOrder enum - */ - public void setSortOrder(DataItemSortOrder sortOrder) - { - this.sortOrder = sortOrder; - } - - - /** - * Return the minimum length of the data. - * - * @return int - */ - public int getMinimumLength() - { - return minimumLength; - } - - - /** - * Set up the minimum length of the data. - * - * @param minimumLength int - */ - public void setMinimumLength(int minimumLength) - { - this.minimumLength = minimumLength; - } - - - /** - * Return the length of the data field. - * - * @return int - */ - public int getLength() - { - return length; - } - - - /** - * Set up the length of the data field. - * - * @param length int - */ - public void setLength(int length) - { - this.length = length; - } - - - /** - * Return the number of significant digits to the right of decimal point. - * - * @return int - */ - public int getPrecision() - { - return precision; - } - - - /** - * Set up the number of significant digits to the right of decimal point. - * - * @param precision int - */ - public void setPrecision(int precision) - { - this.precision = precision; - } - - - /** - * Return the number of significant digits before the decimal point (zero means it is an integer). - * - * @return int - */ - public int getSignificantDigits() - { - return significantDigits; - } - - - /** - * Set up the number of significant digits before the decimal point (zero means it is an integer). - * - * @param significantDigits int - */ - public void setSignificantDigits(int significantDigits) - { - this.significantDigits = significantDigits; - } - - - /** - * Return whether the field is nullable or not. - * - * @return boolean - */ - public boolean getIsNullable() - { - return isNullable; - } - - - /** - * Set up whether the field is nullable or not. - * - * @param nullable boolean - */ - public void setIsNullable(boolean nullable) - { - isNullable = nullable; - } - - - /** - * Return any default value for this attribute that would override the default defined in the - * schema element for this attribute's type (note only used is type is primitive). - * - * @return String default value override - */ - public String getDefaultValueOverride() { return defaultValueOverride; } - - - /** - * Set up any default value for this attribute that would override the default defined in the - * schema element for this attribute's type (note only used is type is primitive). - * - * @param defaultValueOverride String default value override - */ - public void setDefaultValueOverride(String defaultValueOverride) - { - this.defaultValueOverride = defaultValueOverride; - } - - - /** - * Return the name of the Java class to use to represent this type. - * - * @return fully qualified Java class name - */ - public String getNativeJavaClass() - { - return nativeJavaClass; - } - - - /** - * Set up the name of the Java class to use to represent this type. - * - * @param nativeJavaClass fully qualified Java class name - */ - public void setNativeJavaClass(String nativeJavaClass) - { - this.nativeJavaClass = nativeJavaClass; - } - - - /** - * Return a list of alternative names for the attribute. - * - * @return list of names - */ - public List getAliases() - { - if (aliases == null) - { - return null; - } - else if (aliases.isEmpty()) - { - return null; - } - - return new ArrayList<>(aliases); - } - - - /** - * Set up a list of alternative names for the attribute. - * - * @param aliases list of names - */ - public void setAliases(List aliases) - { - this.aliases = aliases; - } - - - /** - * Set up SchemaType for this schema attribute. Use a bean that is a subclass of SchemaTypeProperties that matches the type you wish to - * represent. When it is sent to server, it will use the type of the SchemaTypeProperties to set up the correct schema type information. - * - * @return schema type properties - */ - public SchemaTypeProperties getSchemaType() - { - return schemaType; - } - - - /** - * Set up SchemaType for this schema attribute. - * - * @param schemaType schema type properties - */ - public void setSchemaType(SchemaTypeProperties schemaType) - { - this.schemaType = schemaType; - } - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "SchemaAttributeProperties{" + - "qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - ", elementPosition=" + elementPosition + - ", minCardinality=" + minCardinality + - ", maxCardinality=" + maxCardinality + - ", allowsDuplicateValues=" + allowsDuplicateValues + - ", orderedValues=" + orderedValues + - ", defaultValueOverride='" + defaultValueOverride + '\'' + - ", sortOrder=" + sortOrder + - ", minimumLength=" + minimumLength + - ", length=" + length + - ", precision=" + precision + - ", significantDigits=" + significantDigits + - ", isNullable=" + isNullable + - ", nativeJavaClass='" + nativeJavaClass + '\'' + - ", aliases=" + aliases + - ", schemaType=" + schemaType + - ", isDeprecated=" + getIsDeprecated() + - ", displayName='" + getDisplayName() + '\'' + - ", description='" + getDescription() + '\'' + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - SchemaAttributeProperties that = (SchemaAttributeProperties) objectToCompare; - return elementPosition == that.elementPosition && - minCardinality == that.minCardinality && - maxCardinality == that.maxCardinality && - allowsDuplicateValues == that.allowsDuplicateValues && - orderedValues == that.orderedValues && - minimumLength == that.minimumLength && - length == that.length && - precision == that.precision && - significantDigits == that.significantDigits && - isNullable == that.isNullable && - Objects.equals(defaultValueOverride, that.defaultValueOverride) && - sortOrder == that.sortOrder && - Objects.equals(nativeJavaClass, that.nativeJavaClass) && - Objects.equals(aliases, that.aliases) && - Objects.equals(schemaType, that.schemaType); - } - - - /** - * Return a number that represents the contents of this object. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementPosition, minCardinality, maxCardinality, allowsDuplicateValues, orderedValues, - defaultValueOverride, sortOrder, minimumLength, length, precision, significantDigits, isNullable, nativeJavaClass, - aliases, schemaType); - } -} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/SchemaProperties.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/SchemaProperties.java deleted file mode 100644 index 15997b2f310..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/SchemaProperties.java +++ /dev/null @@ -1,182 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetmanager.properties; - -import com.fasterxml.jackson.annotation.*; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * SchemaProperties is a bean containing the common attributes for schema types and schema attributes. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes( - { - @JsonSubTypes.Type(value = SchemaAttributeProperties.class, name = "SchemaAttributeProperties"), - @JsonSubTypes.Type(value = SchemaTypeProperties.class, name = "SchemaTypeProperties"), - }) -public class SchemaProperties extends ReferenceableProperties -{ - private boolean isDeprecated = false; - private String displayName = null; - private String description = null; - - /** - * Default constructor - */ - public SchemaProperties() - { - super(); - } - - - /** - * Copy/clone Constructor. - * - * @param template template object to copy. - */ - public SchemaProperties(SchemaProperties template) - { - super(template); - - if (template != null) - { - isDeprecated = template.getIsDeprecated(); - displayName = template.getDisplayName(); - description = template.getDescription(); - } - } - - - /** - * Is the schema element deprecated? - * - * @return boolean flag - */ - public boolean getIsDeprecated() - { - return isDeprecated; - } - - - /** - * Set whether the schema element deprecated or not. Default is false. - * - * @param deprecated boolean flag - */ - public void setIsDeprecated(boolean deprecated) - { - isDeprecated = deprecated; - } - - - /** - * Return the simple name of the schema element. - * - * @return string name - */ - public String getDisplayName() { return displayName; } - - - /** - * Set up the simple name of the schema element. - * - * @param name String display name - */ - public void setDisplayName(String name) - { - this.displayName = name; - } - - - /** - * Returns the stored technicalDescription property for the schema element. - * - * @return string technicalDescription - */ - public String getDescription() - { - return description; - } - - - /** - * Set up the stored technicalDescription property for the schema element. - * - * @param description string technicalDescription - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "SchemaProperties{" + - "isDeprecated=" + isDeprecated + - ", displayName='" + displayName + '\'' + - ", description='" + description + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - SchemaProperties that = (SchemaProperties) objectToCompare; - return isDeprecated == that.isDeprecated && - Objects.equals(displayName, that.displayName) && - Objects.equals(description, that.description); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), isDeprecated, displayName, description); - } -} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/SchemaTypeProperties.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/SchemaTypeProperties.java deleted file mode 100644 index d17a07f295a..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/SchemaTypeProperties.java +++ /dev/null @@ -1,321 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetmanager.properties; - -import com.fasterxml.jackson.annotation.*; - -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * SchemaTypeProperties carries the common parameters for creating or updating schema types. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class SchemaTypeProperties extends SchemaProperties -{ - private String versionNumber = null; - private String author = null; - private String encodingStandard = null; - private String namespace = null; - private String usage = null; - - /* - * Values for when the schemaType is derived from other values rather than stored - */ - private String formula = null; - private String formulaType = null; - private List queries = null; - - /** - * Default constructor - */ - public SchemaTypeProperties() - { - super(); - } - - - /** - * Copy/clone Constructor. - * - * @param template template object to copy. - */ - public SchemaTypeProperties(SchemaTypeProperties template) - { - super(template); - - if (template != null) - { - versionNumber = template.getVersionNumber(); - author = template.getAuthor(); - usage = template.getUsage(); - encodingStandard = template.getEncodingStandard(); - namespace = template.getNamespace(); - formula = template.getFormula(); - formulaType = template.getFormulaType(); - queries = template.getQueries(); - } - } - - - /** - * Return the version number of the schema element - null means no version number. - * - * @return String version number - */ - public String getVersionNumber() { return versionNumber; } - - - /** - * Set up the version number of the schema element - null means no version number. - * - * @param versionNumber String version number - */ - public void setVersionNumber(String versionNumber) - { - this.versionNumber = versionNumber; - } - - - /** - * Return the name of the author of the schema element. Null means the author is unknown. - * - * @return String author name - */ - public String getAuthor() { return author; } - - - /** - * Set up the name of the author of the schema element. Null means the author is unknown. - * - * @param author String author name - */ - public void setAuthor(String author) - { - this.author = author; - } - - - /** - * Return details of the expected usage of this technical element. - * - * @return string text - */ - public String getUsage() - { - return usage; - } - - - /** - * Set up details of the expected usage of this technical element. - * - * @param usage string text - */ - public void setUsage(String usage) - { - this.usage = usage; - } - - - /** - * Return the format (encoding standard) used for this schema. It may be XML, JSON, SQL DDL or something else. - * Null means the encoding standard is unknown or there are many choices. - * - * @return String encoding standard - */ - public String getEncodingStandard() { return encodingStandard; } - - - /** - * Set up the format (encoding standard) used for this schema. It may be XML, JSON, SQL DDL or something else. - * Null means the encoding standard is unknown or there are many choices. - * - * @param encodingStandard String encoding standard - */ - public void setEncodingStandard(String encodingStandard) - { - this.encodingStandard = encodingStandard; - } - - - /** - * Return the name of the namespace that this type belongs to. - * - * @return string name - */ - public String getNamespace() - { - return namespace; - } - - - /** - * Set up the name of the namespace that this type belongs to. - * - * @param namespace string name - */ - public void setNamespace(String namespace) - { - this.namespace = namespace; - } - - - /** - * Return the formula used to combine the values of the queries. Each query is numbers 0, 1, ... and the - * formula has placeholders in it to show how the query results are combined. - * - * @return String formula - */ - public String getFormula() { return formula; } - - - /** - * Set up the formula used to combine the values of the queries. Each query is numbers 0, 1, ... and the - * formula has placeholders in it to show how the query results are combined. - * - * @param formula String formula - */ - public void setFormula(String formula) - { - this.formula = formula; - } - - - /** - * Return the specification language for the formula. - * - * @return string description - */ - public String getFormulaType() - { - return formulaType; - } - - - /** - * Set up the specification language for the formula. - * - * @param formulaType string description - */ - public void setFormulaType(String formulaType) - { - this.formulaType = formulaType; - } - - - /** - * Return the list of queries that are used to create the derived schema element. - * - * @return list of queries - */ - public List getQueries() - { - if (queries == null) - { - return null; - } - else if (queries.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(queries); - } - } - - - /** - * Set up the list of queries that are used to create the derived schema element. - * - * @param queries list of queries - */ - public void setQueries(List queries) - { - this.queries = queries; - } - - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "SchemaTypeProperties{" + - "qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - ", isDeprecated=" + getIsDeprecated() + - ", displayName='" + getDisplayName() + '\'' + - ", description='" + getDescription() + '\'' + - ", versionNumber='" + versionNumber + '\'' + - ", author='" + author + '\'' + - ", usage='" + usage + '\'' + - ", encodingStandard='" + encodingStandard + '\'' + - ", namespace='" + namespace + '\'' + - ", formula='" + formula + '\'' + - ", formulaType='" + formulaType + '\'' + - ", queries=" + queries + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - SchemaTypeProperties that = (SchemaTypeProperties) objectToCompare; - return Objects.equals(versionNumber, that.versionNumber) && - Objects.equals(author, that.author) && - Objects.equals(usage, that.usage) && - Objects.equals(encodingStandard, that.encodingStandard) && - Objects.equals(namespace, that.namespace) && - Objects.equals(formula, that.formula) && - Objects.equals(formulaType, that.formulaType) && - Objects.equals(queries, that.queries); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), versionNumber, author, usage, encodingStandard, namespace, formula, formulaType, queries); - } -} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/SecureLocation.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/SecureLocation.java deleted file mode 100644 index 456af3711e3..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/SecureLocation.java +++ /dev/null @@ -1,143 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetmanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * SecureLocation defines that a location is secure. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class SecureLocation -{ - private String description = null; - private String level = null; - - - /** - * Default constructor - */ - public SecureLocation() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template template object to copy. - */ - public SecureLocation(SecureLocation template) - { - if (template != null) - { - description = template.getDescription(); - level = template.getLevel(); - } - } - - - /** - * Set up description of the security at the location. - * - * @param description String - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * Return the description fof the security at the location. - * - * @return String description - */ - public String getDescription() - { - return description; - } - - - /** - * Set up the level of security for the location. - * - * @param level string - */ - public void setLevel(String level) - { - this.level = level; - } - - - /** - * Returns the name of the level of security for the location. - * - * @return string - */ - public String getLevel() - { - return level; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "SecureLocation{" + - "description='" + description + '\'' + - ", level='" + level + '\'' + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - SecureLocation that = (SecureLocation) objectToCompare; - return Objects.equals(description, that.description) && - Objects.equals(level, that.level); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(description, level); - } -} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/SecurityTagsProperties.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/SecurityTagsProperties.java deleted file mode 100644 index 57f2f3ceee6..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/SecurityTagsProperties.java +++ /dev/null @@ -1,211 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetmanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * SecurityTagsProperties provides a structure for passing information about the security tags that should be - * attached to an asset or one of its fields. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class SecurityTagsProperties extends ClassificationProperties -{ - private List securityLabels = null; - private Map securityProperties = null; - private Map> accessGroups = null; - - - /** - * Default constructor - */ - public SecurityTagsProperties() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public SecurityTagsProperties(SecurityTagsProperties template) - { - super(template); - - if (template != null) - { - this.securityLabels = template.getSecurityLabels(); - this.securityProperties = template.getSecurityProperties(); - this.accessGroups = template.getAccessGroups(); - } - } - - /** - * Return the list of security labels that should be attached to this element. - * - * @return list of strings - */ - public List getSecurityLabels() - { - if (securityLabels == null) - { - return null; - } - else if (securityLabels.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(securityLabels); - } - } - - - /** - * Set up the list of security labels that should be attached to this element. - * - * @param securityLabels list of strings - */ - public void setSecurityLabels(List securityLabels) - { - this.securityLabels = securityLabels; - } - - - /** - * Return the security properties that should be attached to this element. - * - * @return map of property values - */ - public Map getSecurityProperties() - { - if (securityProperties == null) - { - return null; - } - else if (securityProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(securityProperties); - } - } - - - /** - * Set up the security properties that should be attached to this element. - * - * @param securityProperties map of property values - */ - public void setSecurityProperties(Map securityProperties) - { - this.securityProperties = securityProperties; - } - - - /** - * Return the map from operation to list of security groups. - * - * @return map - */ - public Map> getAccessGroups() - { - if (accessGroups == null) - { - return null; - } - if (accessGroups.isEmpty()) - { - return null; - } - return accessGroups; - } - - - /** - * Set up the map from operation to list of security groups. - * - * @param accessGroups map - */ - public void setAccessGroups(Map> accessGroups) - { - this.accessGroups = accessGroups; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "SecurityTagsProperties{" + - "securityLabels=" + securityLabels + - ", securityProperties=" + securityProperties + - ", accessGroups=" + accessGroups + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (! (objectToCompare instanceof SecurityTagsProperties that)) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - return Objects.equals(securityLabels, that.securityLabels) && - Objects.equals(securityProperties, that.securityProperties) && - Objects.equals(accessGroups, that.accessGroups); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), securityLabels, securityProperties, accessGroups); - } -} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/SemanticAssignmentProperties.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/SemanticAssignmentProperties.java deleted file mode 100644 index 052e982a48f..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/SemanticAssignmentProperties.java +++ /dev/null @@ -1,282 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetmanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.openmetadata.enums.GlossaryTermAssignmentStatus; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * SemanticAssignmentProperties links an element to a glossary term to indicate that the glossary term describes its meaning. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class SemanticAssignmentProperties extends RelationshipProperties -{ - private String expression = null; - private String description = null; - private GlossaryTermAssignmentStatus status = null; - private int confidence = 0; - private String createdBy = null; - private String steward = null; - private String source = null; - - - /** - * Default constructor - */ - public SemanticAssignmentProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template template object to copy. - */ - public SemanticAssignmentProperties(SemanticAssignmentProperties template) - { - super(template); - - if (template != null) - { - expression = template.getExpression(); - description = template.getDescription(); - status = template.getStatus(); - steward = template.getSteward(); - source = template.getSource(); - } - } - - - /** - * Set up the expression that describes the relationship. - * - * @param expression String name - */ - public void setExpression(String expression) - { - this.expression = expression; - } - - - /** - * Returns the expression that describes the relationship. - * - * @return String name - */ - public String getExpression() - { - return expression; - } - - - /** - * Set up description of the relationship. - * - * @param description String - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * Return the description for the relationship. - * - * @return String description - */ - public String getDescription() - { - return description; - } - - - /** - * Set up whether this relationship should be used. - * - * @param status status enum - */ - public void setStatus(GlossaryTermAssignmentStatus status) - { - this.status = status; - } - - - /** - * Returns whether this relationship should be used. - * - * @return status enum - */ - public GlossaryTermAssignmentStatus getStatus() - { - return status; - } - - - /** - * Return the level of confidence that the relationship is correct. 0 means unassigned. Typical assigned values are usually between 1-100 - * as a percentage scale. - * - * @return int - */ - public int getConfidence() - { - return confidence; - } - - - /** - * Set up the level of confidence that the relationship is correct. 0 means unassigned. Typical assigned values are usually between 1-100 - * as a percentage scale. - * - * @param confidence int - */ - public void setConfidence(int confidence) - { - this.confidence = confidence; - } - - - /** - * Return the name/description of the creator of the relationship. The relationship includes the userId of the creator, so this field is for - * a more business friendly name. - * - * @return string name - */ - public String getCreatedBy() - { - return createdBy; - } - - - /** - * Set up the name/description of the creator of the relationship. The relationship includes the userId of the creator, so this field is for - * a more business friendly name. - * - * @param createdBy string name - */ - public void setCreatedBy(String createdBy) - { - this.createdBy = createdBy; - } - - - /** - * Set up the id of the steward who assigned the relationship (or approved the discovered value). - * - * @param steward user id or name of steward - */ - public void setSteward(String steward) - { - this.steward = steward; - } - - - /** - * Returns the id of the steward who assigned the relationship (or approved the discovered value). - * - * @return user id or name of steward - */ - public String getSteward() - { - return steward; - } - - - /** - * Set up the id of the source of the knowledge of the relationship. - * - * @param source String id - */ - public void setSource(String source) - { - this.source = source; - } - - - /** - * Returns the id of the source of the knowledge of the relationship. - * - * @return String id - */ - public String getSource() - { - return source; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "GlossaryTermRelationship{" + - "expression='" + expression + '\'' + - ", description='" + description + '\'' + - ", status=" + status + - ", steward='" + steward + '\'' + - ", source='" + source + '\'' + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (! (objectToCompare instanceof SemanticAssignmentProperties that)) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - return confidence == that.confidence && - Objects.equals(expression, that.expression) && - Objects.equals(description, that.description) && - status == that.status && - Objects.equals(createdBy, that.createdBy) && - Objects.equals(steward, that.steward) && - Objects.equals(source, that.source); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), expression, description, status, confidence, createdBy, steward, source); - } -} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/ServerAssetUseProperties.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/ServerAssetUseProperties.java deleted file mode 100644 index 8cee5aa25a7..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/ServerAssetUseProperties.java +++ /dev/null @@ -1,255 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetmanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ServerAssetUseProperties describes the properties for the ServerAssetUse relationship between a software - * server capability and an asset. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ServerAssetUseProperties extends RelationshipProperties -{ - private ServerAssetUseType useType = null; - private String description = null; - private boolean minimumInstancesSet = false; - private int minimumInstances = 0; - private boolean maximumInstancesSet = false; - private int maximumInstances = 0; - - - /** - * Default constructor - */ - public ServerAssetUseProperties() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ServerAssetUseProperties(ServerAssetUseProperties template) - { - super(template); - - if (template != null) - { - this.useType = template.getUseType(); - this.description = template.getDescription(); - this.minimumInstancesSet = template.getMinimumInstancesSet(); - this.minimumInstances = template.getMinimumInstances(); - this.maximumInstancesSet = template.getMaximumInstancesSet(); - this.maximumInstances = template.getMaximumInstances(); - } - } - - - /** - * Return the types of interactions that the software server capability may have with the asset. - * - * @return ServerAssetUseType enum - */ - public ServerAssetUseType getUseType() - { - return useType; - } - - - /** - * Set up the types of interactions that the software server capability may have with the asset. - * - * @param useType ServerAssetUseType enum - */ - public void setUseType(ServerAssetUseType useType) - { - this.useType = useType; - } - - - /** - * Return the description of the relationship between the software server capability and the asset. - * - * @return text - */ - public String getDescription() - { - return description; - } - - - /** - * Set up the description of the relationship between the software server capability and the asset. - * - * @param description text - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * Return whether the minimum instances value is set up or just default. - * - * @return flag - */ - public boolean getMinimumInstancesSet() - { - return minimumInstancesSet; - } - - - /** - * Set up whether the minimum instances value is set up or just default. - * - * @param minimumInstancesSet flag - */ - public void setMinimumInstancesSet(boolean minimumInstancesSet) - { - this.minimumInstancesSet = minimumInstancesSet; - } - - - /** - * Return the minimum number of running asset instances controlled by the software server capability. - * - * @return integer - */ - public int getMinimumInstances() - { - return minimumInstances; - } - - - /** - * Set up the minimum number of running asset instances controlled by the software server capability. - * - * @param minimumInstances integer - */ - public void setMinimumInstances(int minimumInstances) - { - this.minimumInstances = minimumInstances; - } - - - /** - * Return whether the maximum instances value is set up or just default. - * - * @return flag - */ - public boolean getMaximumInstancesSet() - { - return maximumInstancesSet; - } - - - /** - * Set up whether the maximum instances value is set up or just default. - * - * @param maximumInstancesSet flag - */ - public void setMaximumInstancesSet(boolean maximumInstancesSet) - { - this.maximumInstancesSet = maximumInstancesSet; - } - - - /** - * Return the maximum number of running asset instances controlled by the software server capability. - * - * @return integer - */ - public int getMaximumInstances() - { - return maximumInstances; - } - - - /** - * Set up the maximum number of running asset instances controlled by the software server capability. - * - * @param maximumInstances integer - */ - public void setMaximumInstances(int maximumInstances) - { - this.maximumInstances = maximumInstances; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "ServerAssetUseProperties{" + - "useType=" + useType + - ", description='" + description + '\'' + - ", minimumInstancesSet=" + minimumInstancesSet + - ", minimumInstances=" + minimumInstances + - ", maximumInstancesSet=" + maximumInstancesSet + - ", maximumInstances=" + maximumInstances + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - ServerAssetUseProperties that = (ServerAssetUseProperties) objectToCompare; - return minimumInstancesSet == that.minimumInstancesSet && - minimumInstances == that.minimumInstances && - maximumInstancesSet == that.maximumInstancesSet && - maximumInstances == that.maximumInstances && - useType == that.useType && - Objects.equals(description, that.description); - } - - - /** - * Hash code for this object - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), useType, description, minimumInstancesSet, minimumInstances, maximumInstancesSet, maximumInstances); - } -} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/ServerAssetUseType.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/ServerAssetUseType.java deleted file mode 100644 index 95048140a2f..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/ServerAssetUseType.java +++ /dev/null @@ -1,156 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetmanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ProcessContainmentType defines the ownership of a process withing a sub process. It is used in a - * ProcessHierarchy relationship. - *
    - *
  • OWNED - The parent process owns the child process in the relationship, such that if the parent is removed the child should also be removed. - * A child can have at most one such parent.
  • - *
  • USED - The child process is simply used by the parent. A child process can have many such relationships to parents.
  • - *
  • OTHER - None of the above.
  • - *
- */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public enum ServerAssetUseType -{ - /** - * Owns - The asset is managed and updated via this relationship. - */ - OWNS (0, 0, "Owns", "The asset is managed and updated via this relationship."), - - /** - * Governs - The asset is governed through this relationship. - */ - GOVERNS (1, 1, "Governs", "The asset is governed through this relationship."), - - /** - * Maintains - The asset is maintained through this relationship. - */ - MAINTAINS (2, 2, "Maintains","The asset is maintained through this relationship."), - - /** - * Uses - The asset is used through this relationship. - */ - USES (3, 3, "Uses", "The asset is used through this relationship."), - - /** - * Other - None of the above. - */ - OTHER (99, 99, "Other", "None of the above."); - - private static final String ENUM_TYPE_GUID = "09439481-9489-467c-9ae5-178a6e0b6b5a"; - private static final String ENUM_TYPE_NAME = "ServerAssetUseType"; - - private final int ordinal; - private final int openTypeOrdinal; - private final String name; - private final String description; - - - /** - * Constructor to set up the instance of this enum. - * - * @param ordinal code number - * @param openTypeOrdinal code number from the equivalent Enum Type - * @param name default name - * @param description default description - */ - ServerAssetUseType(int ordinal, - int openTypeOrdinal, - String name, - String description) - { - this.ordinal = ordinal; - this.openTypeOrdinal = openTypeOrdinal; - this.name = name; - this.description = description; - } - - - /** - * Return the code for this enum used for indexing based on the enum value. - * - * @return int code number - */ - public int getOrdinal() - { - return ordinal; - } - - - /** - * Return the default name for this enum type. - * - * @return String name - */ - public String getName() - { - return name; - } - - - /** - * Return the default description for this enum. - * - * @return String description - */ - public String getDescription() - { - return description; - } - - - /** - * Return the code for this enum that comes from the Open Metadata Type that this enum represents. - * - * @return int code number - */ - public int getOpenTypeOrdinal() - { - return openTypeOrdinal; - } - - - /** - * Return the unique identifier for the open metadata enum type that this enum class represents. - * - * @return string guid - */ - public String getOpenTypeGUID() { return ENUM_TYPE_GUID; } - - - /** - * Return the unique name for the open metadata enum type that this enum class represents. - * - * @return string name - */ - public String getOpenTypeName() { return ENUM_TYPE_NAME; } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "ServerAssetUseType{" + - "codeValue=" + ordinal + - ", codeName='" + name + '\'' + - ", description='" + description + - '}'; - } -} - diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/SoftwareCapabilitiesProperties.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/SoftwareCapabilitiesProperties.java deleted file mode 100644 index a07bef57d4d..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/SoftwareCapabilitiesProperties.java +++ /dev/null @@ -1,271 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetmanager.properties; - -import com.fasterxml.jackson.annotation.*; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * SoftwareCapabilitiesProperties describes a functional capability of a - * software server. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes( - { - @JsonSubTypes.Type(value = AssetManagerProperties.class, name = "AssetManagerProperties") - }) -public class SoftwareCapabilitiesProperties extends SupplementaryProperties -{ - private String technicalName = null; - private String technicalDescription = null; - private String deployedImplementationType = null; - private String version = null; - private String patchLevel = null; - private String source = null; - - - /** - * Default constructor. - */ - public SoftwareCapabilitiesProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public SoftwareCapabilitiesProperties(SoftwareCapabilitiesProperties template) - { - super(template); - - if (template != null) - { - technicalName = template.getTechnicalName(); - technicalDescription = template.getTechnicalDescription(); - deployedImplementationType = template.getDeployedImplementationType(); - version = template.getVersion(); - patchLevel = template.getPatchLevel(); - source = template.getSource(); - } - } - - - /** - * Return the technical name for the capability. - * - * @return string name - */ - public String getTechnicalName() - { - return technicalName; - } - - - /** - * Set up the technical name for the capability. - * - * @param technicalName string name - */ - public void setTechnicalName(String technicalName) - { - this.technicalName = technicalName; - } - - - /** - * Return the technical description of the capability. - * - * @return string description - */ - public String getTechnicalDescription() - { - return technicalDescription; - } - - - /** - * Set up the technical description of the capability. - * - * @param description string - */ - public void setTechnicalDescription(String description) - { - this.technicalDescription = description; - } - - - /** - * Return the description of the type of capability this is. - * - * @return string description - */ - public String getDeployedImplementationType() - { - return deployedImplementationType; - } - - - /** - * Set up the description of the type of capability this is. - * - * @param deployedImplementationType string - */ - public void setDeployedImplementationType(String deployedImplementationType) - { - this.deployedImplementationType = deployedImplementationType; - } - - - /** - * Return the version of the discovery engine. - * - * @return version string - */ - public String getVersion() - { - return version; - } - - - /** - * Set up the version string of the discovery engine. - * - * @param version string - */ - public void setVersion(String version) - { - this.version = version; - } - - - /** - * Return the patch level of the discovery engine. - * - * @return patch level string - */ - public String getPatchLevel() - { - return patchLevel; - } - - - /** - * Set up the patch level of the discovery engine. - * - * @param patchLevel string - */ - public void setPatchLevel(String patchLevel) - { - this.patchLevel = patchLevel; - } - - - /** - * Return the source of the discovery engine implementation. - * - * @return string url - */ - public String getSource() - { - return source; - } - - - /** - * Set up the source of the discovery engine implementation. - * - * @param source string url - */ - public void setSource(String source) - { - this.source = source; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "SoftwareCapabilitiesProperties{" + - "technicalName='" + technicalName + '\'' + - ", technicalDescription='" + technicalDescription + '\'' + - ", typeDescription='" + deployedImplementationType + '\'' + - ", version='" + version + '\'' + - ", patchLevel='" + patchLevel + '\'' + - ", source='" + source + '\'' + - ", technicalDescription='" + getTechnicalDescription() + '\'' + - ", displayName='" + getDisplayName() + '\'' + - ", summary='" + getSummary() + '\'' + - ", description='" + getDescription() + '\'' + - ", abbreviation='" + getAbbreviation() + '\'' + - ", usage='" + getUsage() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - SoftwareCapabilitiesProperties that = (SoftwareCapabilitiesProperties) objectToCompare; - return Objects.equals(getTechnicalName(), that.getTechnicalName()) && - Objects.equals(getTechnicalDescription(), that.getTechnicalDescription()) && - Objects.equals(getDeployedImplementationType(), that.getDeployedImplementationType()) && - Objects.equals(getVersion(), that.getVersion()) && - Objects.equals(getPatchLevel(), that.getPatchLevel()) && - Objects.equals(getSource(), that.getSource()); - } - - - /** - * Create a hash code for this element type. - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), getTechnicalName(), getTechnicalDescription(), getDeployedImplementationType(), getVersion(), - getPatchLevel(), getSource()); - } -} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/SubjectAreaMemberProperties.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/SubjectAreaMemberProperties.java deleted file mode 100644 index 89767497c27..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/SubjectAreaMemberProperties.java +++ /dev/null @@ -1,117 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetmanager.properties; - -import java.util.Objects; - -/** - * A subject area defines a group of definitions for governing assets related to a specific topic. The subject area definition defines - * how the assets related to the topic should be managed. This classification associates an element as one of the materials used to - * implement the subject area. - */ -public class SubjectAreaMemberProperties extends ClassificationProperties -{ - private String subjectAreaName = null; - - - /** - * Default constructor - */ - public SubjectAreaMemberProperties() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public SubjectAreaMemberProperties(SubjectAreaMemberProperties template) - { - super(template); - - if (template != null) - { - this.subjectAreaName = template.getSubjectAreaName(); - } - } - - - /** - * Return the name of the subject area - this is added to the SubjectArea classification. - * - * @return string name - */ - public String getSubjectAreaName() - { - return subjectAreaName; - } - - - /** - * Set up the name of the subject area - this is added to the SubjectArea classification. - * - * @param subjectAreaName string name - */ - public void setSubjectAreaName(String subjectAreaName) - { - this.subjectAreaName = subjectAreaName; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "SubjectAreaMemberProperties{" + - "effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", extendedProperties=" + getExtendedProperties() + - ", subjectAreaName='" + subjectAreaName + '\'' + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (! (objectToCompare instanceof SubjectAreaMemberProperties)) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - SubjectAreaMemberProperties that = (SubjectAreaMemberProperties) objectToCompare; - return Objects.equals(subjectAreaName, that.subjectAreaName); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), getSubjectAreaName()); - } -} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/SupplementaryProperties.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/SupplementaryProperties.java deleted file mode 100644 index 32bd49881ab..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/SupplementaryProperties.java +++ /dev/null @@ -1,242 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetmanager.properties; - -import com.fasterxml.jackson.annotation.*; - -import java.util.*; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * SupplementaryProperties describe additional information about a technical element (typically assets and schemas) - * that has been added as part of a governance process. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes( - { - @JsonSubTypes.Type(value = AssetProperties.class, name = "AssetProperties"), - @JsonSubTypes.Type(value = EndpointProperties.class, name = "EndpointProperties"), - @JsonSubTypes.Type(value = SoftwareCapabilitiesProperties.class, name = "SoftwareCapabilitiesProperties"), - }) -public class SupplementaryProperties extends ReferenceableProperties -{ - private String displayName = null; - private String summary = null; - private String description = null; - private String abbreviation = null; - private String usage = null; - - - /** - * Default constructor - */ - public SupplementaryProperties() - { - } - - - /** - * Copy/clone constructor. Note, this is a deep copy - * - * @param template object to copy - */ - public SupplementaryProperties(SupplementaryProperties template) - { - super(template); - - if (template != null) - { - displayName = template.getDisplayName(); - summary = template.getSummary(); - description = template.getDescription(); - abbreviation = template.getAbbreviation(); - usage = template.getUsage(); - } - } - - - /** - * Returns the stored display name property for the technical element. - * If no display name is available then null is returned. - * - * @return String name - */ - public String getDisplayName() - { - return displayName; - } - - - /** - * Set up the stored display name property for the technical element. - * - * @param displayName String name - */ - public void setDisplayName(String displayName) - { - this.displayName = displayName; - } - - - /** - * Return the short (1-2 sentence) description of the technical element. - * - * @return string text - */ - public String getSummary() - { - return summary; - } - - - /** - * Set up the short (1-2 sentence) description of the technical element. - * - * @param summary string text - */ - public void setSummary(String summary) - { - this.summary = summary; - } - - - /** - * Returns the stored description property for the technical element. - * If no description is provided then null is returned. - * - * @return String text - */ - public String getDescription() - { - return description; - } - - - /** - * Set up the stored description property for the technical element. - * - * @param description String text - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * Return the abbreviation used for this technical element. - * - * @return string text - */ - public String getAbbreviation() - { - return abbreviation; - } - - - /** - * Set up the abbreviation used for this technical element. - * - * @param abbreviation string text - */ - public void setAbbreviation(String abbreviation) - { - this.abbreviation = abbreviation; - } - - - /** - * Return details of the expected usage of this technical element. - * - * @return string text - */ - public String getUsage() - { - return usage; - } - - - /** - * Set up details of the expected usage of this technical element. - * - * @param usage string text - */ - public void setUsage(String usage) - { - this.usage = usage; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "SupplementaryProperties{" + - "displayName='" + displayName + '\'' + - ", summary='" + summary + '\'' + - ", description='" + description + '\'' + - ", abbreviation='" + abbreviation + '\'' + - ", usage='" + usage + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - SupplementaryProperties that = (SupplementaryProperties) objectToCompare; - return Objects.equals(getDisplayName(), that.getDisplayName()) && - Objects.equals(getSummary(), that.getSummary()) && - Objects.equals(getDescription(), that.getDescription()) && - Objects.equals(getAbbreviation(), that.getAbbreviation()) && - Objects.equals(getUsage(), that.getUsage()); - } - - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), getDisplayName(), getSummary(), getDescription(), getAbbreviation(), getUsage()); - } -} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/TagProperties.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/TagProperties.java deleted file mode 100644 index e142061262d..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/TagProperties.java +++ /dev/null @@ -1,189 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetmanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * InformalTagProperties stores information about a tag connected to an asset. - * InformalTags provide informal classifications to assets - * and can be added at any time. - *

- * InformalTags have the userId of the person who added the tag, the name of the tag and its description. - *

- * The content of the tag is a personal judgement (which is why the user's id is in the tag) - * and there is no formal review of the tags. However, they can be used as a basis for crowd-sourcing - * Glossary terms. - *

- * Private InformalTags are only returned to the user that created them. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class TagProperties -{ - private boolean isPrivateTag = false; - private String name = null; - private String description = null; - - - /** - * Default constructor - */ - public TagProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template element to copy - */ - public TagProperties(TagProperties template) - { - if (template != null) - { - isPrivateTag = template.getIsPrivateTag(); - name = template.getName(); - description = template.getDescription(); - } - } - - - /** - * Return boolean flag to say whether the tag is private or not. A private tag is only seen by the - * person who set it up. Public tags are visible to everyone. - * - * @return boolean is private flag - */ - public boolean getIsPrivateTag() { - return isPrivateTag; - } - - - /** - * Set up boolean flag to say whether the tag is private or not. A private tag is only seen by the - * person who set it up. Public tags are visible to everyone. - * - * @param privateTag indicator of a private tag - */ - public void setIsPrivateTag(boolean privateTag) - { - isPrivateTag = privateTag; - } - - - /** - * Return the name of the tag. It is not valid to have a tag with no name. However, there is a point where - * the tag object is created and the tag name not yet set, so null is a possible response. - * - * @return String tag name - */ - public String getName() { - return name; - } - - - /** - * Set up the name of the tag. It is not valid to have a tag with no name. However, there is a point where - * the tag object is created and the tag name not yet set, so null is a possible response. - * - * @param name String tag name - */ - public void setName(String name) - { - this.name = name; - } - - - /** - * Return the tag description null means no description is available. - * - * @return String tag description - */ - public String getDescription() - { - return description; - } - - - /** - * Set up the tag description null means no description is available. - * - * @param tagDescription tag description - */ - public void setDescription(String tagDescription) { - this.description = tagDescription; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "TagProperties{" + - "isPrivateTag=" + isPrivateTag + - ", name='" + name + '\'' + - ", description='" + description + '\'' + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (! (objectToCompare instanceof TagProperties)) - { - return false; - } - - TagProperties that = (TagProperties) objectToCompare; - - if (isPrivateTag != that.isPrivateTag) - { - return false; - } - if (name != null ? ! name.equals(that.name) : that.name != null) - { - return false; - } - return description != null ? description.equals(that.description) : that.description == null; - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - int result = (isPrivateTag ? 1 : 0); - result = 31 * result + (name != null ? name.hashCode() : 0); - result = 31 * result + (description != null ? description.hashCode() : 0); - return result; - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/ValidValueMembershipProperties.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/ValidValueMembershipProperties.java deleted file mode 100644 index 71fb2d3bf1e..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/ValidValueMembershipProperties.java +++ /dev/null @@ -1,126 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetmanager.properties; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ValidValueMembershipProperties provides a flag to indicate if this value is the default value for the set. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ValidValueMembershipProperties extends RelationshipProperties -{ - boolean isDefaultValue = false; - - /** - * Default constructor - */ - public ValidValueMembershipProperties() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ValidValueMembershipProperties(ValidValueMembershipProperties template) - { - super(template); - - if (template != null) - { - this.isDefaultValue = template.getDefaultValue(); - } - } - - - /** - * Return whether it is a default value. - * - * @return flag - */ - public boolean getDefaultValue() - { - return isDefaultValue; - } - - - /** - * Set up whether it is a default value. - * - * @param defaultValue flag - */ - public void setDefaultValue(boolean defaultValue) - { - this.isDefaultValue = defaultValue; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ValidValueMembershipProperties{" + - "effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", extendedProperties=" + getExtendedProperties() + - ", isDefaultValue=" + isDefaultValue + - ", defaultValue=" + getDefaultValue() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - ValidValueMembershipProperties that = (ValidValueMembershipProperties) objectToCompare; - return isDefaultValue == that.isDefaultValue; - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), isDefaultValue); - } -} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/ValidValueProperties.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/ValidValueProperties.java deleted file mode 100644 index 1b4750d0522..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/ValidValueProperties.java +++ /dev/null @@ -1,335 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetmanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ValidValueProperties provides the common super class for ValidValueSet and ValidValueDefinition. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ValidValueProperties extends ReferenceableProperties -{ - private String displayName = null; - private String description = null; - private String usage = null; - private String scope = null; - private String category = null; - private String preferredValue = null; - private String dataType = null; - private boolean isDeprecated = false; - private boolean isCaseSensitive = false; - - - /** - * Constructor - */ - public ValidValueProperties() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ValidValueProperties(ValidValueProperties template) - { - super(template); - - if (template != null) - { - displayName = template.getDisplayName(); - description = template.getDescription(); - usage = template.getUsage(); - scope = template.getScope(); - category = template.getCategory(); - preferredValue = template.getPreferredValue(); - dataType = template.getDataType(); - isDeprecated = template.getIsDeprecated(); - isCaseSensitive = template.getIsCaseSensitive(); - } - } - - - /** - * Returns the stored display name property for the valid value. - * If no display name is available then null is returned. - * - * @return String name - */ - public String getDisplayName() - { - return displayName; - } - - - /** - * Set up the stored display name property for the valid value. - * - * @param displayName String name - */ - public void setDisplayName(String displayName) - { - this.displayName = displayName; - } - - - /** - * Returns the stored description property for the valid value. - * If no description is provided then null is returned. - * - * @return description String text - */ - public String getDescription() - { - return description; - } - - - /** - * Set up the stored description property associated with the valid value. - * - * @param description String text - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * Return the description of how this valid value should be used. - * - * @return String text - */ - public String getUsage() - { - return usage; - } - - - /** - * Set up the description of how this valid value should be used. - * - * @param usage String text - */ - public void setUsage(String usage) - { - this.usage = usage; - } - - - /** - * Return the scope of values that this valid value covers (normally used with sets) - * - * @return String text - */ - public String getScope() - { - return scope; - } - - - /** - * Set up the scope of values that this valid value covers (normally used with sets) - * - * @param scope String text - */ - public void setScope(String scope) - { - this.scope = scope; - } - - - /** - * Return the category of reference data. - * - * @return string name - */ - public String getCategory() - { - return category; - } - - - /** - * Set up the category of reference data. - * - * @param category string name - */ - public void setCategory(String category) - { - this.category = category; - } - - - /** - * Return the preferred values to use in implementations (normally used with definitions) - * - * @return String value - */ - public String getPreferredValue() - { - return preferredValue; - } - - - /** - * Set up the preferred values to use in implementations (normally used with definitions) - * - * @param preferredValue String value - */ - public void setPreferredValue(String preferredValue) - { - this.preferredValue = preferredValue; - } - - - /** - * Returns the data type of the preferred value. - * - * @return string - */ - public String getDataType() - { - return dataType; - } - - - /** - * Set up the data type of the preferred value. - * - * @param dataType string - */ - public void setDataType(String dataType) - { - this.dataType = dataType; - } - - - /** - * Is the valid value deprecated? - * - * @return boolean flag - */ - public boolean getIsDeprecated() - { - return isDeprecated; - } - - - /** - * Set whether the valid value is deprecated or not. Default is false. - * - * @param deprecated boolean flag - */ - public void setIsDeprecated(boolean deprecated) - { - isDeprecated = deprecated; - } - - - /** - * Return whether this valid value is case-sensitive, or will match irrespective of case. - * - * @return boolean flag - */ - public boolean getIsCaseSensitive() - { - return isCaseSensitive; - } - - - /** - * Set up whether this valid value is case-sensitive, or will match irrespective of case. - * - * @param caseSensitive boolean flag - */ - public void setIsCaseSensitive(boolean caseSensitive) - { - isCaseSensitive = caseSensitive; - } - - - /** - * Generate a string containing the properties. - * - * @return string value - */ - @Override - public String toString() - { - return "ValidValueProperties{" + - "displayName='" + displayName + '\'' + - ", description='" + description + '\'' + - ", usage='" + usage + '\'' + - ", scope='" + scope + '\'' + - ", category='" + category + '\'' + - ", preferredValue='" + preferredValue + '\'' + - ", dataType='" + dataType + '\'' + - ", isDeprecated=" + isDeprecated + - ", isCaseSensitive=" + isCaseSensitive + - ", typeName='" + getTypeName() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ValidValueProperties that = (ValidValueProperties) objectToCompare; - return Objects.equals(displayName, that.displayName) && - Objects.equals(description, that.description) && - Objects.equals(usage, that.usage) && - Objects.equals(scope, that.scope) && - Objects.equals(category, that.category) && - Objects.equals(isDeprecated, that.isDeprecated) && - Objects.equals(isCaseSensitive, that.isCaseSensitive) && - Objects.equals(preferredValue, that.preferredValue)&& - Objects.equals(dataType, that.dataType); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), displayName, description, usage, scope, category, dataType, preferredValue, isDeprecated, isCaseSensitive); - } -} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ArchiveRequestBody.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ArchiveRequestBody.java index e17d4164332..3828f3e0df3 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ArchiveRequestBody.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ArchiveRequestBody.java @@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ArchiveProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ArchiveProperties; import java.util.Objects; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/AssetManagerOMASAPIResponse.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/AssetManagerOMASAPIResponse.java index cc3f2d0e52a..23318a41b05 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/AssetManagerOMASAPIResponse.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/AssetManagerOMASAPIResponse.java @@ -58,17 +58,6 @@ public AssetManagerOMASAPIResponse(AssetManagerOMASAPIResponse template) @Override public String toString() { - return "AssetManagerOMASAPIResponse{" + - "exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; + return "AssetManagerOMASAPIResponse{} " + super.toString(); } } diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ClassificationRequestBody.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ClassificationRequestBody.java index 12404c301d2..877cd123d88 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ClassificationRequestBody.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ClassificationRequestBody.java @@ -6,8 +6,8 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ClassificationProperties; import org.odpi.openmetadata.frameworks.governanceaction.properties.MetadataCorrelationProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ClassificationProperties; import java.util.Date; import java.util.Objects; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/CommentTypeListResponse.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/CommentTypeListResponse.java deleted file mode 100644 index 54b07c8f633..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/CommentTypeListResponse.java +++ /dev/null @@ -1,147 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetmanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.openmetadata.enums.CommentType; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * CommentTypeListResponse is a response object for passing back a list of enum values or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class CommentTypeListResponse extends AssetManagerOMASAPIResponse -{ - private List types = null; - - - /** - * Default constructor - */ - public CommentTypeListResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public CommentTypeListResponse(CommentTypeListResponse template) - { - super(template); - - if (template != null) - { - types = template.getTypes(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getTypes() - { - if (types == null) - { - return null; - } - else if (types.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(types); - } - } - - - /** - * Set up the metadata element to return. - * - * @param types result object - */ - public void setTypes(List types) - { - this.types = types; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "CommentTypeListResponse{" + - "statuses=" + types + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - CommentTypeListResponse that = (CommentTypeListResponse) objectToCompare; - return Objects.equals(types, that.types); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), types); - } -} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ConnectionRequestBody.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ConnectionRequestBody.java index acdfe8a134b..783953d7ed9 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ConnectionRequestBody.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ConnectionRequestBody.java @@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ConnectionProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.ConnectionProperties; import java.util.Objects; @@ -15,7 +15,7 @@ /** - * ConnectionRequestBody describes the request body used to create/update connection properties. + * OCFConnectionRequestBody describes the request body used to create/update connection properties. */ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @@ -80,7 +80,7 @@ public void setElementProperties(ConnectionProperties elementProperties) @Override public String toString() { - return "ConnectionRequestBody{" + + return "OCFConnectionRequestBody{" + "elementProperties=" + elementProperties + ", metadataCorrelationProperties=" + getMetadataCorrelationProperties() + ", effectiveTime=" + getEffectiveTime() + diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ConnectorTypeRequestBody.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ConnectorTypeRequestBody.java index 795631d8209..08cd9deb8cc 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ConnectorTypeRequestBody.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ConnectorTypeRequestBody.java @@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ConnectorTypeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.ConnectorTypeProperties; import java.util.Objects; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ControlFlowElementResponse.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ControlFlowElementResponse.java deleted file mode 100644 index cd124b2db41..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ControlFlowElementResponse.java +++ /dev/null @@ -1,137 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetmanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.ControlFlowElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * ControlFlowElementResponse is the response structure used on the OMAS REST API calls that return the properties - * for a element. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ControlFlowElementResponse extends AssetManagerOMASAPIResponse -{ - private ControlFlowElement element = null; - - - /** - * Default constructor - */ - public ControlFlowElementResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ControlFlowElementResponse(ControlFlowElementResponse template) - { - super(template); - - if (template != null) - { - this.element = template.getElement(); - } - } - - - /** - * Return the element result. - * - * @return bean - */ - public ControlFlowElement getElement() - { - return element; - } - - - /** - * Set up the element result. - * - * @param element bean - */ - public void setElement(ControlFlowElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ControlFlowElementResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof ControlFlowElementResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ControlFlowElementResponse that = (ControlFlowElementResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(element); - } -} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ControlFlowElementsResponse.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ControlFlowElementsResponse.java deleted file mode 100644 index 49668189dff..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ControlFlowElementsResponse.java +++ /dev/null @@ -1,147 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetmanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.ControlFlowElement; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ControlFlowElementsResponse is a response object for passing back a list of control flow relationships - * or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ControlFlowElementsResponse extends AssetManagerOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public ControlFlowElementsResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ControlFlowElementsResponse(ControlFlowElementsResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elementList); - } - } - - - /** - * Set up the metadata element to return. - * - * @param elementList result object - */ - public void setElementList(List elementList) - { - this.elementList = elementList; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ControlFlowElementsResponse{" + - "elementList=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ControlFlowElementsResponse that = (ControlFlowElementsResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ControlFlowRequestBody.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ControlFlowRequestBody.java deleted file mode 100644 index 76a3aa4db75..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ControlFlowRequestBody.java +++ /dev/null @@ -1,127 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetmanager.rest; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ControlFlowProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * ControlFlowRequestBody describes the request body used when linking elements within processes. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ControlFlowRequestBody extends AssetManagerIdentifiersRequestBody -{ - private ControlFlowProperties properties = null; - - - /** - * Default constructor - */ - public ControlFlowRequestBody() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public ControlFlowRequestBody(ControlFlowRequestBody template) - { - super(template); - - if (template != null) - { - properties = template.getProperties(); - } - } - - - /** - * Return the properties for the relationship. - * - * @return properties object - */ - public ControlFlowProperties getProperties() - { - return properties; - } - - - /** - * Set up the properties for the relationship. - * - * @param properties properties object - */ - public void setProperties(ControlFlowProperties properties) - { - this.properties = properties; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ControlFlowRequestBody{" + - "properties=" + properties + - ", assetManagerGUID='" + getAssetManagerGUID() + '\'' + - ", assetManagerName='" + getAssetManagerName() + '\'' + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ControlFlowRequestBody that = (ControlFlowRequestBody) objectToCompare; - return Objects.equals(getProperties(), that.getProperties()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), properties); - } -} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ControlledGlossaryTermRequestBody.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ControlledGlossaryTermRequestBody.java index 10cc72c230d..442fe9a7503 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ControlledGlossaryTermRequestBody.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ControlledGlossaryTermRequestBody.java @@ -6,9 +6,9 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.GlossaryTermProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.GlossaryTermStatus; import org.odpi.openmetadata.frameworks.governanceaction.properties.MetadataCorrelationProperties; +import org.odpi.openmetadata.frameworks.openmetadata.enums.GlossaryTermStatus; +import org.odpi.openmetadata.frameworks.openmetadata.properties.glossaries.GlossaryTermProperties; import java.util.Date; import java.util.Objects; @@ -26,10 +26,10 @@ public class ControlledGlossaryTermRequestBody { private MetadataCorrelationProperties metadataCorrelationProperties = null; - private GlossaryTermProperties elementProperties = null; - private GlossaryTermStatus initialStatus = null; - private Date effectiveTime = null; - private String updateDescription = null; + private GlossaryTermProperties elementProperties = null; + private GlossaryTermStatus initialStatus = null; + private Date effectiveTime = null; + private String updateDescription = null; /** * Default constructor diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/DataAssetRequestBody.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/DataAssetRequestBody.java index d33c70609db..277f00f64b0 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/DataAssetRequestBody.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/DataAssetRequestBody.java @@ -5,7 +5,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.DataAssetProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.DataAssetProperties; import java.util.Objects; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/DataFlowElementResponse.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/DataFlowElementResponse.java deleted file mode 100644 index 23c4b198da5..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/DataFlowElementResponse.java +++ /dev/null @@ -1,137 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetmanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.DataFlowElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * DataFlowElementResponse is the response structure used on the OMAS REST API calls that return the properties - * for a relationship. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class DataFlowElementResponse extends AssetManagerOMASAPIResponse -{ - private DataFlowElement element = null; - - - /** - * Default constructor - */ - public DataFlowElementResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public DataFlowElementResponse(DataFlowElementResponse template) - { - super(template); - - if (template != null) - { - this.element = template.getElement(); - } - } - - - /** - * Return the element result. - * - * @return bean - */ - public DataFlowElement getElement() - { - return element; - } - - - /** - * Set up the element result. - * - * @param element bean - */ - public void setElement(DataFlowElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "DataFlowElementResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof DataFlowElementResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - DataFlowElementResponse that = (DataFlowElementResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(element); - } -} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/DataFlowElementsResponse.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/DataFlowElementsResponse.java deleted file mode 100644 index 3266b1df263..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/DataFlowElementsResponse.java +++ /dev/null @@ -1,147 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetmanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.DataFlowElement; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * DataFlowElementsResponse is a response object for passing back a list of relationships - * or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class DataFlowElementsResponse extends AssetManagerOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public DataFlowElementsResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public DataFlowElementsResponse(DataFlowElementsResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elementList); - } - } - - - /** - * Set up the metadata element to return. - * - * @param elementList result object - */ - public void setElementList(List elementList) - { - this.elementList = elementList; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "DataFlowElementsResponse{" + - "elementList=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - DataFlowElementsResponse that = (DataFlowElementsResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/DataFlowRequestBody.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/DataFlowRequestBody.java deleted file mode 100644 index 37feda04d7f..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/DataFlowRequestBody.java +++ /dev/null @@ -1,127 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetmanager.rest; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.DataFlowProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * DataFlowRequestBody describes the request body used when linking elements within processes. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class DataFlowRequestBody extends AssetManagerIdentifiersRequestBody -{ - private DataFlowProperties properties = null; - - - /** - * Default constructor - */ - public DataFlowRequestBody() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public DataFlowRequestBody(DataFlowRequestBody template) - { - super(template); - - if (template != null) - { - properties = template.getProperties(); - } - } - - - /** - * Return the properties for the relationship. - * - * @return properties object - */ - public DataFlowProperties getProperties() - { - return properties; - } - - - /** - * Set up the properties for the relationship. - * - * @param properties properties object - */ - public void setProperties(DataFlowProperties properties) - { - this.properties = properties; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "DataFlowRequestBody{" + - "properties=" + properties + - ", assetManagerGUID='" + getAssetManagerGUID() + '\'' + - ", assetManagerName='" + getAssetManagerName() + '\'' + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - DataFlowRequestBody that = (DataFlowRequestBody) objectToCompare; - return Objects.equals(getProperties(), that.getProperties()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), properties); - } -} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ElementHeaderResponse.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ElementHeaderResponse.java deleted file mode 100644 index 6bdfad91a8e..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ElementHeaderResponse.java +++ /dev/null @@ -1,137 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetmanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * ElementHeaderResponse is the response structure used on the OMAS REST API calls that return the header - * for a element. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ElementHeaderResponse extends AssetManagerOMASAPIResponse -{ - private ElementHeader element = null; - - - /** - * Default constructor - */ - public ElementHeaderResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ElementHeaderResponse(ElementHeaderResponse template) - { - super(template); - - if (template != null) - { - this.element = template.getElement(); - } - } - - - /** - * Return the element result. - * - * @return bean - */ - public ElementHeader getElement() - { - return element; - } - - - /** - * Set up the element result. - * - * @param element bean - */ - public void setElement(ElementHeader element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ElementHeaderResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof ElementHeaderResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ElementHeaderResponse that = (ElementHeaderResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(element); - } -} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ElementHeadersResponse.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ElementHeadersResponse.java deleted file mode 100644 index 68b7b6ee1f0..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ElementHeadersResponse.java +++ /dev/null @@ -1,148 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetmanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ElementHeadersResponse is a response object for passing back a list of element headers - * or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ElementHeadersResponse extends AssetManagerOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public ElementHeadersResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ElementHeadersResponse(ElementHeadersResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elementList); - } - } - - - /** - * Set up the metadata element to return. - * - * @param elementList result object - */ - public void setElementList(List elementList) - { - this.elementList = elementList; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ElementHeadersResponse{" + - "elementList=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ElementHeadersResponse that = (ElementHeadersResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ElementStubsResponse.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ElementStubsResponse.java deleted file mode 100644 index 9749d1ca885..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ElementStubsResponse.java +++ /dev/null @@ -1,148 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetmanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ElementStubsResponse is a response object for passing back a list of element stubs - * or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ElementStubsResponse extends AssetManagerOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public ElementStubsResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ElementStubsResponse(ElementStubsResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elementList); - } - } - - - /** - * Set up the metadata element to return. - * - * @param elementList result object - */ - public void setElementList(List elementList) - { - this.elementList = elementList; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ElementStubsResponse{" + - "elementList=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ElementStubsResponse that = (ElementStubsResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/EndpointRequestBody.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/EndpointRequestBody.java index 2414f2e29c6..819f29c9685 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/EndpointRequestBody.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/EndpointRequestBody.java @@ -5,7 +5,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.EndpointProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.EndpointProperties; import java.util.Objects; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ExternalGlossaryElementLinkRequestBody.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ExternalGlossaryElementLinkRequestBody.java index 920629ec8a1..71cce34b67e 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ExternalGlossaryElementLinkRequestBody.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ExternalGlossaryElementLinkRequestBody.java @@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ExternalGlossaryElementLinkProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.glossaries.ExternalGlossaryElementLinkProperties; import java.util.Objects; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ExternalGlossaryLinkElementsResponse.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ExternalGlossaryLinkElementsResponse.java index 8918455e0df..25f3c29ea2d 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ExternalGlossaryLinkElementsResponse.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ExternalGlossaryLinkElementsResponse.java @@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.ExternalGlossaryLinkElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ExternalGlossaryLinkElement; import java.util.ArrayList; import java.util.Arrays; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ExternalGlossaryLinkRequestBody.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ExternalGlossaryLinkRequestBody.java index b6b5ed018b9..34cc0384b56 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ExternalGlossaryLinkRequestBody.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ExternalGlossaryLinkRequestBody.java @@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ExternalGlossaryLinkProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.glossaries.ExternalGlossaryLinkProperties; import java.util.Objects; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ExternalReferenceLinkRequestBody.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ExternalReferenceLinkRequestBody.java index 0b3126bc7d9..678c1816ebf 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ExternalReferenceLinkRequestBody.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ExternalReferenceLinkRequestBody.java @@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ExternalReferenceLinkProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.externalreferences.ExternalReferenceLinkProperties; import java.util.Objects; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ExternalReferenceRequestBody.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ExternalReferenceRequestBody.java index 6c345b76107..49dc0c9d78f 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ExternalReferenceRequestBody.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ExternalReferenceRequestBody.java @@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ExternalReferenceProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.externalreferences.ExternalReferenceProperties; import java.util.Objects; @@ -22,8 +22,8 @@ @JsonIgnoreProperties(ignoreUnknown=true) public class ExternalReferenceRequestBody extends UpdateRequestBody { - private ExternalReferenceProperties elementProperties = null; - private String anchorGUID = null; + private ExternalReferenceProperties elementProperties = null; + private String anchorGUID = null; /** diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/FindByPropertiesRequestBody.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/FindByPropertiesRequestBody.java index 4c52661c3de..09c384afd53 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/FindByPropertiesRequestBody.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/FindByPropertiesRequestBody.java @@ -5,7 +5,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.FindProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.FindProperties; import java.util.Objects; @@ -22,7 +22,7 @@ @JsonIgnoreProperties(ignoreUnknown=true) public class FindByPropertiesRequestBody extends EffectiveTimeQueryRequestBody { - private FindProperties properties = null; + private FindProperties properties = null; /** diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ForeignKeyRequestBody.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ForeignKeyRequestBody.java index 18a951e7bf1..554c4c5977b 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ForeignKeyRequestBody.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ForeignKeyRequestBody.java @@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ForeignKeyProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.ForeignKeyProperties; import java.util.Objects; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/GlossaryNameRequestBody.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/GlossaryNameRequestBody.java index ae41b3f7472..45f7444b38a 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/GlossaryNameRequestBody.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/GlossaryNameRequestBody.java @@ -5,7 +5,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.GlossaryTermStatus; +import org.odpi.openmetadata.frameworks.openmetadata.enums.GlossaryTermStatus; import java.util.List; import java.util.Objects; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/GlossarySearchStringRequestBody.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/GlossarySearchStringRequestBody.java index f12b678c46a..4f9f62b6bad 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/GlossarySearchStringRequestBody.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/GlossarySearchStringRequestBody.java @@ -5,7 +5,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.GlossaryTermStatus; +import org.odpi.openmetadata.frameworks.openmetadata.enums.GlossaryTermStatus; import java.util.List; import java.util.Objects; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/GlossaryTemplateRequestBody.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/GlossaryTemplateRequestBody.java index 708fe240797..c2e3d94a50a 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/GlossaryTemplateRequestBody.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/GlossaryTemplateRequestBody.java @@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.GlossaryTermStatus; +import org.odpi.openmetadata.frameworks.openmetadata.enums.GlossaryTermStatus; import java.util.Objects; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/GlossaryTermStatusRequestBody.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/GlossaryTermStatusRequestBody.java index 3ae051f6e6d..0d8075d6b01 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/GlossaryTermStatusRequestBody.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/GlossaryTermStatusRequestBody.java @@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.GlossaryTermStatus; +import org.odpi.openmetadata.frameworks.openmetadata.enums.GlossaryTermStatus; import java.util.Objects; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/LineageMappingElementResponse.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/LineageMappingElementResponse.java deleted file mode 100644 index 435ccd3cb2a..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/LineageMappingElementResponse.java +++ /dev/null @@ -1,137 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetmanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.LineageMappingElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * DataFlowElementResponse is the response structure used on the OMAS REST API calls that return the properties - * for a relationship. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class LineageMappingElementResponse extends AssetManagerOMASAPIResponse -{ - private LineageMappingElement element = null; - - - /** - * Default constructor - */ - public LineageMappingElementResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public LineageMappingElementResponse(LineageMappingElementResponse template) - { - super(template); - - if (template != null) - { - this.element = template.getElement(); - } - } - - - /** - * Return the element result. - * - * @return bean - */ - public LineageMappingElement getElement() - { - return element; - } - - - /** - * Set up the element result. - * - * @param element bean - */ - public void setElement(LineageMappingElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "LineageMappingElementResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof LineageMappingElementResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - LineageMappingElementResponse that = (LineageMappingElementResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(element); - } -} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/LineageMappingElementsResponse.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/LineageMappingElementsResponse.java deleted file mode 100644 index aeabdb6e221..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/LineageMappingElementsResponse.java +++ /dev/null @@ -1,147 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetmanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.LineageMappingElement; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * LineageMappingElementsResponse is a response object for passing back a a list of lineage mapping relationships - * or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class LineageMappingElementsResponse extends AssetManagerOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public LineageMappingElementsResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public LineageMappingElementsResponse(LineageMappingElementsResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elementList); - } - } - - - /** - * Set up the metadata element to return. - * - * @param elementList result object - */ - public void setElementList(List elementList) - { - this.elementList = elementList; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "LineageMappingElementsResponse{" + - "elementList=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - LineageMappingElementsResponse that = (LineageMappingElementsResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/PortRequestBody.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/PortRequestBody.java index 224db95e7bb..cef2d6489db 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/PortRequestBody.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/PortRequestBody.java @@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.PortProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.processes.PortProperties; import java.util.Objects; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ProcessCallElementResponse.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ProcessCallElementResponse.java deleted file mode 100644 index 05b40b3a81c..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ProcessCallElementResponse.java +++ /dev/null @@ -1,137 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetmanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.ProcessCallElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * ProcessCallElementResponse is the response structure used on the OMAS REST API calls that return the properties - * for a element. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ProcessCallElementResponse extends AssetManagerOMASAPIResponse -{ - private ProcessCallElement element = null; - - - /** - * Default constructor - */ - public ProcessCallElementResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ProcessCallElementResponse(ProcessCallElementResponse template) - { - super(template); - - if (template != null) - { - this.element = template.getElement(); - } - } - - - /** - * Return the element result. - * - * @return bean - */ - public ProcessCallElement getElement() - { - return element; - } - - - /** - * Set up the element result. - * - * @param element bean - */ - public void setElement(ProcessCallElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ProcessCallElementResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof ProcessCallElementResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ProcessCallElementResponse that = (ProcessCallElementResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(element); - } -} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ProcessCallElementsResponse.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ProcessCallElementsResponse.java deleted file mode 100644 index c00ca951446..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ProcessCallElementsResponse.java +++ /dev/null @@ -1,147 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetmanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.ProcessCallElement; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ProcessCallElementsResponse is a response object for passing back a a list of process call relationships - * or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ProcessCallElementsResponse extends AssetManagerOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public ProcessCallElementsResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ProcessCallElementsResponse(ProcessCallElementsResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elementList); - } - } - - - /** - * Set up the metadata element to return. - * - * @param elementList result object - */ - public void setElementList(List elementList) - { - this.elementList = elementList; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ProcessCallElementsResponse{" + - "elementList=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ProcessCallElementsResponse that = (ProcessCallElementsResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ProcessCallRequestBody.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ProcessCallRequestBody.java deleted file mode 100644 index 4f7f14d4f26..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ProcessCallRequestBody.java +++ /dev/null @@ -1,127 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetmanager.rest; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ProcessCallProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * ProcessCallRequestBody describes the request body used when linking elements within processes. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ProcessCallRequestBody extends AssetManagerIdentifiersRequestBody -{ - private ProcessCallProperties properties = null; - - - /** - * Default constructor - */ - public ProcessCallRequestBody() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public ProcessCallRequestBody(ProcessCallRequestBody template) - { - super(template); - - if (template != null) - { - properties = template.getProperties(); - } - } - - - /** - * Return the properties for the relationship. - * - * @return properties object - */ - public ProcessCallProperties getProperties() - { - return properties; - } - - - /** - * Set up the properties for the relationship. - * - * @param properties properties object - */ - public void setProperties(ProcessCallProperties properties) - { - this.properties = properties; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ProcessCallRequestBody{" + - "properties=" + properties + - ", assetManagerGUID='" + getAssetManagerGUID() + '\'' + - ", assetManagerName='" + getAssetManagerName() + '\'' + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ProcessCallRequestBody that = (ProcessCallRequestBody) objectToCompare; - return Objects.equals(getProperties(), that.getProperties()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), properties); - } -} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ProcessRequestBody.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ProcessRequestBody.java index 017f9f833d9..082b24570cd 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ProcessRequestBody.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ProcessRequestBody.java @@ -6,8 +6,8 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ProcessProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ProcessStatus; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ProcessStatus; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.processes.ProcessProperties; import java.util.Objects; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ProcessStatusRequestBody.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ProcessStatusRequestBody.java index 96ccb1a32e5..5bff69c26c5 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ProcessStatusRequestBody.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ProcessStatusRequestBody.java @@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ProcessStatus; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ProcessStatus; import java.util.Objects; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ReferenceableRequestBody.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ReferenceableRequestBody.java index 95d754b6c95..548de48e5ac 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ReferenceableRequestBody.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/ReferenceableRequestBody.java @@ -6,8 +6,8 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ReferenceableProperties; import org.odpi.openmetadata.frameworks.governanceaction.properties.MetadataCorrelationProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ReferenceableProperties; import java.util.Objects; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/RelatedElementsResponse.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/RelatedElementsResponse.java deleted file mode 100644 index e772f17791a..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/RelatedElementsResponse.java +++ /dev/null @@ -1,147 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetmanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.RelatedElement; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * RelatedElementElementsResponse is a response object for passing back a list of relationships - * or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class RelatedElementsResponse extends AssetManagerOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public RelatedElementsResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public RelatedElementsResponse(RelatedElementsResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elementList); - } - } - - - /** - * Set up the metadata element to return. - * - * @param elementList result object - */ - public void setElementList(List elementList) - { - this.elementList = elementList; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "RelatedElementElementsResponse{" + - "elementList=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - RelatedElementsResponse that = (RelatedElementsResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/RelationshipElementResponse.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/RelationshipElementResponse.java deleted file mode 100644 index 6641dfcb5a9..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/RelationshipElementResponse.java +++ /dev/null @@ -1,137 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetmanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.RelationshipElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * RelationshipElementResponse is the response structure used on the OMAS REST API calls that return the properties - * for a relationship. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class RelationshipElementResponse extends AssetManagerOMASAPIResponse -{ - private RelationshipElement element = null; - - - /** - * Default constructor - */ - public RelationshipElementResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public RelationshipElementResponse(RelationshipElementResponse template) - { - super(template); - - if (template != null) - { - this.element = template.getElement(); - } - } - - - /** - * Return the element result. - * - * @return bean - */ - public RelationshipElement getElement() - { - return element; - } - - - /** - * Set up the element result. - * - * @param element bean - */ - public void setElement(RelationshipElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "RelationshipElementResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof RelationshipElementResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - RelationshipElementResponse that = (RelationshipElementResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(element); - } -} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/RelationshipElementsResponse.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/RelationshipElementsResponse.java deleted file mode 100644 index d863e379e9a..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/RelationshipElementsResponse.java +++ /dev/null @@ -1,148 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetmanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.RelationshipElement; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * RelationshipElementsResponse is a response object for passing back a list of relationships - * or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class RelationshipElementsResponse extends AssetManagerOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public RelationshipElementsResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public RelationshipElementsResponse(RelationshipElementsResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elementList); - } - } - - - /** - * Set up the metadata element to return. - * - * @param elementList result object - */ - public void setElementList(List elementList) - { - this.elementList = elementList; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "RelationshipElementsResponse{" + - "elementList=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - RelationshipElementsResponse that = (RelationshipElementsResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/RelationshipRequestBody.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/RelationshipRequestBody.java deleted file mode 100644 index a6654503fb2..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/RelationshipRequestBody.java +++ /dev/null @@ -1,128 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetmanager.rest; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.RelationshipProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * RelationshipRequestBody describes the request body used when linking elements together. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class RelationshipRequestBody extends EffectiveTimeQueryRequestBody -{ - private RelationshipProperties properties = null; - - - /** - * Default constructor - */ - public RelationshipRequestBody() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public RelationshipRequestBody(RelationshipRequestBody template) - { - super(template); - - if (template != null) - { - properties = template.getProperties(); - } - } - - - /** - * Return the properties for the relationship. - * - * @return properties object - */ - public RelationshipProperties getProperties() - { - return properties; - } - - - /** - * Set up the properties for the relationship. - * - * @param properties properties object - */ - public void setProperties(RelationshipProperties properties) - { - this.properties = properties; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "RelationshipRequestBody{" + - "assetManagerGUID='" + getAssetManagerGUID() + '\'' + - ", assetManagerName='" + getAssetManagerName() + '\'' + - ", effectiveTime=" + getEffectiveTime() + - ", properties=" + properties + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - RelationshipRequestBody that = (RelationshipRequestBody) objectToCompare; - return Objects.equals(getProperties(), that.getProperties()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), properties); - } -} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/SchemaAttributeRequestBody.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/SchemaAttributeRequestBody.java index 6db182d1268..55f0c0397e8 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/SchemaAttributeRequestBody.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/SchemaAttributeRequestBody.java @@ -5,7 +5,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.SchemaAttributeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.SchemaAttributeProperties; import java.util.Objects; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/SchemaTypeRequestBody.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/SchemaTypeRequestBody.java index ed5c865f0e9..d85be39b5e7 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/SchemaTypeRequestBody.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/SchemaTypeRequestBody.java @@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.SchemaTypeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.SchemaTypeProperties; import java.util.Objects; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/SearchStringRequestBody.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/SearchStringRequestBody.java index 2bf022d4187..303c7125afe 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/SearchStringRequestBody.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/SearchStringRequestBody.java @@ -104,12 +104,9 @@ public void setSearchStringParameterName(String searchStringParameterName) public String toString() { return "SearchStringRequestBody{" + - "searchString='" + searchString + '\'' + - ", searchStringParameterName='" + searchStringParameterName + '\'' + - ", effectiveTime=" + getEffectiveTime() + - ", assetManagerGUID='" + getAssetManagerGUID() + '\'' + - ", assetManagerName='" + getAssetManagerName() + '\'' + - '}'; + "searchString='" + searchString + '\'' + + ", searchStringParameterName='" + searchStringParameterName + '\'' + + "} " + super.toString(); } diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/TermAssignmentStatusListResponse.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/TermAssignmentStatusListResponse.java deleted file mode 100644 index b4ff06884bc..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/TermAssignmentStatusListResponse.java +++ /dev/null @@ -1,147 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetmanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.openmetadata.enums.GlossaryTermAssignmentStatus; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * TermAssignmentStatusListResponse is a response object for passing back a list of enum values or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class TermAssignmentStatusListResponse extends AssetManagerOMASAPIResponse -{ - private List statuses = null; - - - /** - * Default constructor - */ - public TermAssignmentStatusListResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public TermAssignmentStatusListResponse(TermAssignmentStatusListResponse template) - { - super(template); - - if (template != null) - { - statuses = template.getStatuses(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getStatuses() - { - if (statuses == null) - { - return null; - } - else if (statuses.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(statuses); - } - } - - - /** - * Set up the metadata element to return. - * - * @param statuses result object - */ - public void setStatuses(List statuses) - { - this.statuses = statuses; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "TermAssignmentStatusListResponse{" + - "statuses=" + statuses + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - TermAssignmentStatusListResponse that = (TermAssignmentStatusListResponse) objectToCompare; - return Objects.equals(statuses, that.statuses); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), statuses); - } -} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/TermRelationshipRequestBody.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/TermRelationshipRequestBody.java index bb496d1e580..b27f6daecc7 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/TermRelationshipRequestBody.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/TermRelationshipRequestBody.java @@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.GlossaryTermRelationship; +import org.odpi.openmetadata.frameworks.openmetadata.properties.glossaries.GlossaryTermRelationship; import java.util.Objects; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/AssetManagerBaseClient.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/AssetManagerBaseClient.java index dd2334bb26b..f4edd3af308 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/AssetManagerBaseClient.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/AssetManagerBaseClient.java @@ -5,43 +5,38 @@ import org.odpi.openmetadata.accessservices.assetmanager.api.ExternalIdentifierManagerInterface; import org.odpi.openmetadata.accessservices.assetmanager.client.rest.AssetManagerRESTClient; import org.odpi.openmetadata.accessservices.assetmanager.ffdc.AssetManagerErrorCode; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.odpi.openmetadata.frameworks.governanceaction.properties.MetadataCorrelationHeader; import org.odpi.openmetadata.frameworks.governanceaction.properties.MetadataCorrelationProperties; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.RelatedElement; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ClassificationProperties; import org.odpi.openmetadata.frameworks.governanceaction.properties.ExternalIdentifierProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.FindProperties; import org.odpi.openmetadata.frameworks.openmetadata.enums.GlossaryTermRelationshipStatus; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ReferenceableProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.RelationshipProperties; import org.odpi.openmetadata.accessservices.assetmanager.properties.TemplateProperties; import org.odpi.openmetadata.accessservices.assetmanager.rest.AssetManagerIdentifiersRequestBody; import org.odpi.openmetadata.accessservices.assetmanager.rest.ClassificationRequestBody; import org.odpi.openmetadata.accessservices.assetmanager.rest.EffectiveTimeQueryRequestBody; -import org.odpi.openmetadata.accessservices.assetmanager.rest.ElementHeadersResponse; -import org.odpi.openmetadata.accessservices.assetmanager.rest.ElementStubsResponse; import org.odpi.openmetadata.accessservices.assetmanager.rest.FindByPropertiesRequestBody; import org.odpi.openmetadata.accessservices.assetmanager.rest.GlossaryTermRelationshipRequestBody; import org.odpi.openmetadata.accessservices.assetmanager.rest.MetadataCorrelationHeadersResponse; import org.odpi.openmetadata.accessservices.assetmanager.rest.NameRequestBody; import org.odpi.openmetadata.accessservices.assetmanager.rest.ReferenceableRequestBody; import org.odpi.openmetadata.accessservices.assetmanager.rest.ReferenceableUpdateRequestBody; -import org.odpi.openmetadata.accessservices.assetmanager.rest.RelatedElementsResponse; -import org.odpi.openmetadata.accessservices.assetmanager.rest.RelationshipRequestBody; import org.odpi.openmetadata.accessservices.assetmanager.rest.SearchStringRequestBody; import org.odpi.openmetadata.accessservices.assetmanager.rest.TemplateRequestBody; import org.odpi.openmetadata.accessservices.assetmanager.rest.UpdateRequestBody; import org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NullRequestBody; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementStub; import org.odpi.openmetadata.frameworks.openmetadata.enums.KeyPattern; import org.odpi.openmetadata.frameworks.governanceaction.search.PropertyHelper; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.RelatedElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ClassificationProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.FindProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ReferenceableProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; import java.util.Date; import java.util.List; @@ -490,8 +485,8 @@ protected RelationshipRequestBody getRelationshipRequestBody(String if (assetManagerGUID != null) { - requestBody.setAssetManagerGUID(assetManagerGUID); - requestBody.setAssetManagerName(assetManagerName); + requestBody.setExternalSourceGUID(assetManagerGUID); + requestBody.setExternalSourceName(assetManagerName); } requestBody.setEffectiveTime(effectiveTime); @@ -885,7 +880,7 @@ public List getElementsForExternalIdentifier(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElementHeaders(); } @@ -921,13 +916,13 @@ protected List getMetadataCorrelationHeaders(String u final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/asset-managers/elements/{2}/{3}/correlation-headers"; - MetadataCorrelationHeadersResponse restResult = restClient.callCorrelationHeadersPostRESTCall(methodName, - urlTemplate, - getEffectiveTimeQueryRequestBody(assetManagerGUID, assetManagerName, null), - serverName, - userId, - openMetadataElementTypeName, - openMetadataElementGUID); + MetadataCorrelationHeadersResponse restResult = restClient.callMyCorrelationHeadersPostRESTCall(methodName, + urlTemplate, + getEffectiveTimeQueryRequestBody(assetManagerGUID, assetManagerName, null), + serverName, + userId, + openMetadataElementTypeName, + openMetadataElementGUID); return restResult.getElementList(); } @@ -1794,8 +1789,8 @@ protected void setupRelationship(String userId, RelationshipRequestBody requestBody = new RelationshipRequestBody(); - requestBody.setAssetManagerGUID(assetManagerGUID); - requestBody.setAssetManagerName(assetManagerName); + requestBody.setExternalSourceGUID(assetManagerGUID); + requestBody.setExternalSourceName(assetManagerName); requestBody.setProperties(properties); requestBody.setEffectiveTime(effectiveTime); @@ -1861,8 +1856,8 @@ protected void setupRelationship(String userId, RelationshipRequestBody requestBody = new RelationshipRequestBody(); - requestBody.setAssetManagerGUID(assetManagerGUID); - requestBody.setAssetManagerName(assetManagerName); + requestBody.setExternalSourceGUID(assetManagerGUID); + requestBody.setExternalSourceName(assetManagerName); requestBody.setProperties(properties); requestBody.setEffectiveTime(effectiveTime); @@ -2046,7 +2041,7 @@ protected List getRelatedElements(String userId, forLineage, forDuplicateProcessing); - return restResult.getElementList(); + return restResult.getElements(); } @@ -2106,7 +2101,7 @@ protected List getClassifiedElements(String userId, forLineage, forDuplicateProcessing); - return restResult.getElementList(); + return restResult.getElements(); } diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/converters/AssetManagerConverterBase.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/converters/AssetManagerConverterBase.java index 467d8d62922..767ffff67ba 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/converters/AssetManagerConverterBase.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/converters/AssetManagerConverterBase.java @@ -2,15 +2,7 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.assetmanager.client.converters; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.RelatedElement; -import org.odpi.openmetadata.accessservices.assetmanager.properties.RelationshipProperties; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; import org.odpi.openmetadata.frameworks.governanceaction.converters.OpenMetadataConverterBase; -import org.odpi.openmetadata.frameworks.governanceaction.properties.OpenMetadataElement; -import org.odpi.openmetadata.frameworks.governanceaction.properties.OpenMetadataRelationship; -import org.odpi.openmetadata.frameworks.governanceaction.properties.RelatedMetadataElement; -import org.odpi.openmetadata.frameworks.governanceaction.search.ElementProperties; import org.odpi.openmetadata.frameworks.governanceaction.search.PropertyHelper; /** @@ -32,95 +24,4 @@ public AssetManagerConverterBase(PropertyHelper propertyHelper, { super(propertyHelper, serviceName, serverName); } - - - /** - * Using the supplied instances, return a new instance of a relatedElement bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param element entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - public RelatedElement getRelatedElement(Class beanClass, - OpenMetadataElement element, - OpenMetadataRelationship relationship, - String methodName) throws PropertyServerException - { - RelatedElement relatedElement = new RelatedElement(); - - relatedElement.setRelationshipHeader(this.getMetadataElementHeader(beanClass, relationship, relationship.getRelationshipGUID(), null, methodName)); - - if (relationship != null) - { - ElementProperties instanceProperties = new ElementProperties(relationship.getRelationshipProperties()); - - RelationshipProperties relationshipProperties = new RelationshipProperties(); - - relationshipProperties.setEffectiveFrom(relationship.getEffectiveFromTime()); - relationshipProperties.setEffectiveTo(relationship.getEffectiveToTime()); - relationshipProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - - relatedElement.setRelationshipProperties(relationshipProperties); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), OpenMetadataRelationship.class.getName(), methodName); - } - - if (element != null) - { - ElementStub elementStub = this.getElementStub(beanClass, element, methodName); - - relatedElement.setRelatedElement(elementStub); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), OpenMetadataElement.class.getName(), methodName); - } - - return relatedElement; - } - - - /** - * Using the supplied instances, return a new instance of a relatedElement bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param relatedMetadataElement results containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - public RelatedElement getRelatedElement(Class beanClass, - RelatedMetadataElement relatedMetadataElement, - String methodName) throws PropertyServerException - { - RelatedElement relatedElement = new RelatedElement(); - - relatedElement.setRelationshipHeader(this.getMetadataElementHeader(beanClass, relatedMetadataElement, relatedMetadataElement.getRelationshipGUID(), null, methodName)); - - if (relatedMetadataElement != null) - { - ElementProperties instanceProperties = new ElementProperties(relatedMetadataElement.getRelationshipProperties()); - - RelationshipProperties relationshipProperties = new RelationshipProperties(); - - relationshipProperties.setEffectiveFrom(relatedMetadataElement.getEffectiveFromTime()); - relationshipProperties.setEffectiveTo(relatedMetadataElement.getEffectiveToTime()); - relationshipProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - - relatedElement.setRelationshipProperties(relationshipProperties); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), OpenMetadataRelationship.class.getName(), methodName); - } - - return relatedElement; - } } diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/converters/ReferenceValueAssignmentDefinitionConverter.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/converters/ReferenceValueAssignmentDefinitionConverter.java index b6bf9aecaea..30ce59f13ed 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/converters/ReferenceValueAssignmentDefinitionConverter.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/converters/ReferenceValueAssignmentDefinitionConverter.java @@ -2,17 +2,14 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.assetmanager.client.converters; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.ReferenceValueAssignmentDefinitionElement; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.ReferenceableElement; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.ValidValueElement; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ReferenceValueAssignmentProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ReferenceableProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ValidValueProperties; +import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.*; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.governanceaction.properties.OpenMetadataElement; import org.odpi.openmetadata.frameworks.governanceaction.properties.RelatedMetadataElement; import org.odpi.openmetadata.frameworks.governanceaction.search.ElementProperties; import org.odpi.openmetadata.frameworks.governanceaction.search.PropertyHelper; +import org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues.ReferenceValueAssignmentProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues.ValidValueProperties; import java.lang.reflect.InvocationTargetException; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/converters/ReferenceValueAssignmentItemConverter.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/converters/ReferenceValueAssignmentItemConverter.java index cc6708abdd3..733a7e1b979 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/converters/ReferenceValueAssignmentItemConverter.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/converters/ReferenceValueAssignmentItemConverter.java @@ -2,15 +2,14 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.assetmanager.client.converters; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.ReferenceValueAssignmentItemElement; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.ReferenceableElement; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ReferenceValueAssignmentProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ReferenceableProperties; +import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.*; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.governanceaction.properties.OpenMetadataElement; import org.odpi.openmetadata.frameworks.governanceaction.properties.RelatedMetadataElement; import org.odpi.openmetadata.frameworks.governanceaction.search.ElementProperties; import org.odpi.openmetadata.frameworks.governanceaction.search.PropertyHelper; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ReferenceableProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues.ReferenceValueAssignmentProperties; import java.lang.reflect.InvocationTargetException; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/converters/ValidValueConverter.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/converters/ValidValueConverter.java index f993b64acb8..cdaac62391a 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/converters/ValidValueConverter.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/converters/ValidValueConverter.java @@ -3,11 +3,11 @@ package org.odpi.openmetadata.accessservices.assetmanager.client.converters; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.ValidValueElement; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ValidValueProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.governanceaction.properties.OpenMetadataElement; import org.odpi.openmetadata.frameworks.governanceaction.search.ElementProperties; import org.odpi.openmetadata.frameworks.governanceaction.search.PropertyHelper; +import org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues.ValidValueProperties; import java.lang.reflect.InvocationTargetException; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/converters/ValidValueMemberConverter.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/converters/ValidValueMemberConverter.java index c697d9340d5..659890198d7 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/converters/ValidValueMemberConverter.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/converters/ValidValueMemberConverter.java @@ -4,13 +4,13 @@ import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.ValidValueElement; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.ValidValueMember; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ValidValueMembershipProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ValidValueProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.governanceaction.properties.OpenMetadataElement; import org.odpi.openmetadata.frameworks.governanceaction.properties.RelatedMetadataElement; import org.odpi.openmetadata.frameworks.governanceaction.search.ElementProperties; import org.odpi.openmetadata.frameworks.governanceaction.search.PropertyHelper; +import org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues.ValidValueMembershipProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues.ValidValueProperties; import java.lang.reflect.InvocationTargetException; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/exchange/CollaborationExchangeClient.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/exchange/CollaborationExchangeClient.java index 2a744b7057d..04dff9ca38b 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/exchange/CollaborationExchangeClient.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/exchange/CollaborationExchangeClient.java @@ -10,18 +10,12 @@ import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.InformalTagElement; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.NoteElement; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.NoteLogElement; -import org.odpi.openmetadata.accessservices.assetmanager.properties.CommentProperties; import org.odpi.openmetadata.frameworks.governanceaction.properties.ExternalIdentifierProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.FeedbackProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.NoteLogProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.NoteProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.RatingProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.TagProperties; import org.odpi.openmetadata.accessservices.assetmanager.rest.CommentElementResponse; import org.odpi.openmetadata.accessservices.assetmanager.rest.CommentElementsResponse; import org.odpi.openmetadata.accessservices.assetmanager.rest.EffectiveTimeQueryRequestBody; import org.odpi.openmetadata.accessservices.assetmanager.rest.InformalTagResponse; -import org.odpi.openmetadata.accessservices.assetmanager.rest.InformalTagUpdateRequestBody; +import org.odpi.openmetadata.commonservices.ffdc.rest.InformalTagUpdateRequestBody; import org.odpi.openmetadata.accessservices.assetmanager.rest.InformalTagsResponse; import org.odpi.openmetadata.accessservices.assetmanager.rest.NameRequestBody; import org.odpi.openmetadata.accessservices.assetmanager.rest.NoteElementResponse; @@ -35,6 +29,7 @@ import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.properties.feedback.*; import java.util.Date; import java.util.List; @@ -794,8 +789,8 @@ public List findComments(String userId, @Override public String createInformalTag(String userId, TagProperties properties) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException + PropertyServerException, + UserNotAuthorizedException { final String methodName = "createInformalTag"; final String propertiesParameterName = "properties"; @@ -915,7 +910,7 @@ public InformalTagElement getTag(String userId, invalidParameterHandler.validateUserId(userId, methodName); invalidParameterHandler.validateGUID(tagGUID, guidParameter, methodName); - InformalTagResponse restResult = restClient.callInformalTagGetRESTCall(methodName, + InformalTagResponse restResult = restClient.callMyInformalTagGetRESTCall(methodName, urlTemplate, serverName, userId, @@ -958,13 +953,13 @@ public List getTagsByName(String userId, requestBody.setName(tag); requestBody.setNameParameterName(nameParameter); - InformalTagsResponse restResult = restClient.callInformalTagListPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - startFrom, - pageSize); + InformalTagsResponse restResult = restClient.callMyInformalTagListPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + startFrom, + pageSize); return restResult.getTags(); } @@ -1003,13 +998,13 @@ public List getMyTagsByName(String userId, requestBody.setName(tag); requestBody.setNameParameterName(nameParameter); - InformalTagsResponse restResult = restClient.callInformalTagListPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - startFrom, - pageSize); + InformalTagsResponse restResult = restClient.callMyInformalTagListPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + startFrom, + pageSize); return restResult.getTags(); } @@ -1048,13 +1043,13 @@ public List findTags(String userId, requestBody.setSearchString(tag); requestBody.setSearchStringParameterName(nameParameter); - InformalTagsResponse restResult = restClient.callInformalTagListPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - startFrom, - pageSize); + InformalTagsResponse restResult = restClient.callMyInformalTagListPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + startFrom, + pageSize); return restResult.getTags(); } @@ -1093,13 +1088,13 @@ public List findMyTags(String userId, requestBody.setSearchString(tag); requestBody.setSearchStringParameterName(nameParameter); - InformalTagsResponse restResult = restClient.callInformalTagListPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - startFrom, - pageSize); + InformalTagsResponse restResult = restClient.callMyInformalTagListPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + startFrom, + pageSize); return restResult.getTags(); } @@ -1451,15 +1446,15 @@ public List findNoteLogs(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/note-logs/by-search-string?startFrom={2}&pageSize={3}&forLineage={4}&forDuplicateProcessing={5}"; - NoteLogElementsResponse restResult = restClient.callNoteLogElementsPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - startFrom, - validatedPageSize, - forLineage, - forDuplicateProcessing); + NoteLogElementsResponse restResult = restClient.callMyNoteLogElementsPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + startFrom, + validatedPageSize, + forLineage, + forDuplicateProcessing); return restResult.getElementList(); } @@ -1514,15 +1509,15 @@ public List getNoteLogsByName(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/note-logs/by-name?startFrom={2}&pageSize={3}&forLineage={4}&forDuplicateProcessing={5}"; - NoteLogElementsResponse restResult = restClient.callNoteLogElementsPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - startFrom, - validatedPageSize, - forLineage, - forDuplicateProcessing); + NoteLogElementsResponse restResult = restClient.callMyNoteLogElementsPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + startFrom, + validatedPageSize, + forLineage, + forDuplicateProcessing); return restResult.getElementList(); } @@ -1574,16 +1569,16 @@ public List getNoteLogsForElement(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/elements/{2}/note-logs/retrieve?startFrom={3}&pageSize={4}&forLineage={5}&forDuplicateProcessing={6}"; - NoteLogElementsResponse restResult = restClient.callNoteLogElementsPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - elementGUID, - startFrom, - validatedPageSize, - forLineage, - forDuplicateProcessing); + NoteLogElementsResponse restResult = restClient.callMyNoteLogElementsPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + elementGUID, + startFrom, + validatedPageSize, + forLineage, + forDuplicateProcessing); return restResult.getElementList(); } @@ -1625,16 +1620,16 @@ public NoteLogElement getNoteLogByGUID(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/note-logs/{2}/retrieve?forLineage={3}&forDuplicateProcessing={4}"; - NoteLogElementResponse restResult = restClient.callNoteLogElementPostRESTCall(methodName, - urlTemplate, - getEffectiveTimeQueryRequestBody(assetManagerGUID, + NoteLogElementResponse restResult = restClient.callMyNoteLogElementPostRESTCall(methodName, + urlTemplate, + getEffectiveTimeQueryRequestBody(assetManagerGUID, assetManagerName, effectiveTime), - serverName, - userId, - noteLogGUID, - forLineage, - forDuplicateProcessing); + serverName, + userId, + noteLogGUID, + forLineage, + forDuplicateProcessing); return restResult.getElement(); } @@ -1852,15 +1847,15 @@ public List findNotes(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/note-logs/notes/by-search-string?startFrom={2}&pageSize={3}&forLineage={4}&forDuplicateProcessing={5}"; - NoteElementsResponse restResult = restClient.callNoteElementsPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - startFrom, - validatedPageSize, - forLineage, - forDuplicateProcessing); + NoteElementsResponse restResult = restClient.callMyNoteElementsPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + startFrom, + validatedPageSize, + forLineage, + forDuplicateProcessing); return restResult.getElementList(); } @@ -1907,16 +1902,16 @@ public List getNotesForNoteLog(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/note-logs/{2}/notes/retrieve?startFrom={3}&pageSize={4}&forLineage={5}&forDuplicateProcessing={6}"; - NoteElementsResponse restResult = restClient.callNoteElementsPostRESTCall(methodName, - urlTemplate, - getEffectiveTimeQueryRequestBody(assetManagerGUID, assetManagerName, effectiveTime), - serverName, - userId, - noteLogGUID, - startFrom, - validatedPageSize, - forLineage, - forDuplicateProcessing); + NoteElementsResponse restResult = restClient.callMyNoteElementsPostRESTCall(methodName, + urlTemplate, + getEffectiveTimeQueryRequestBody(assetManagerGUID, assetManagerName, effectiveTime), + serverName, + userId, + noteLogGUID, + startFrom, + validatedPageSize, + forLineage, + forDuplicateProcessing); return restResult.getElementList(); } @@ -1958,16 +1953,16 @@ public NoteElement getNoteByGUID(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/note-logs/notes/{2}/retrieve?forLineage={3}&forDuplicateProcessing={4}"; - NoteElementResponse restResult = restClient.callNoteElementPostRESTCall(methodName, - urlTemplate, - getEffectiveTimeQueryRequestBody(assetManagerGUID, + NoteElementResponse restResult = restClient.callMyNoteElementPostRESTCall(methodName, + urlTemplate, + getEffectiveTimeQueryRequestBody(assetManagerGUID, assetManagerName, effectiveTime), - serverName, - userId, - noteGUID, - forLineage, - forDuplicateProcessing); + serverName, + userId, + noteGUID, + forLineage, + forDuplicateProcessing); return restResult.getElement(); } diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/exchange/ConnectionExchangeClient.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/exchange/ConnectionExchangeClient.java index 9ecde766ba8..602a3b60fcf 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/exchange/ConnectionExchangeClient.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/exchange/ConnectionExchangeClient.java @@ -16,6 +16,12 @@ import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; import org.odpi.openmetadata.frameworks.governanceaction.properties.ExternalIdentifierProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.AssetConnectionProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.ConnectionProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.ConnectorTypeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.EmbeddedConnectionProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.EndpointProperties; import java.util.Date; import java.util.List; @@ -838,15 +844,15 @@ public List findConnections(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/connections/by-search-string?startFrom={2}&pageSize={3}&forLineage={4}&forDuplicateProcessing={5}"; - ConnectionsResponse restResult = restClient.callConnectionsPostRESTCall(methodName, - urlTemplate, - getSearchStringRequestBody(assetManagerGUID, assetManagerName, searchString, effectiveTime, methodName), - serverName, - userId, - startFrom, - validatedPageSize, - forLineage, - forDuplicateProcessing); + ConnectionsResponse restResult = restClient.callMyConnectionsPostRESTCall(methodName, + urlTemplate, + getSearchStringRequestBody(assetManagerGUID, assetManagerName, searchString, effectiveTime, methodName), + serverName, + userId, + startFrom, + validatedPageSize, + forLineage, + forDuplicateProcessing); return restResult.getElementList(); } @@ -894,15 +900,15 @@ public List getConnectionsByName(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/connections/by-name?startFrom={2}&pageSize={3}&forLineage={4}&forDuplicateProcessing={5}"; - ConnectionsResponse restResult = restClient.callConnectionsPostRESTCall(methodName, - urlTemplate, - getNameRequestBody(assetManagerGUID, assetManagerName, name, effectiveTime, methodName), - serverName, - userId, - startFrom, - validatedPageSize, - forLineage, - forDuplicateProcessing); + ConnectionsResponse restResult = restClient.callMyConnectionsPostRESTCall(methodName, + urlTemplate, + getNameRequestBody(assetManagerGUID, assetManagerName, name, effectiveTime, methodName), + serverName, + userId, + startFrom, + validatedPageSize, + forLineage, + forDuplicateProcessing); return restResult.getElementList(); } @@ -947,15 +953,15 @@ public List getConnectionsForAssetManager(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/connections/by-asset-manager?startFrom={2}&pageSize={3}&forLineage={4}&forDuplicateProcessing={5}"; - ConnectionsResponse restResult = restClient.callConnectionsPostRESTCall(methodName, - urlTemplate, - getEffectiveTimeQueryRequestBody(assetManagerGUID, assetManagerName, effectiveTime), - serverName, - userId, - startFrom, - validatedPageSize, - forLineage, - forDuplicateProcessing); + ConnectionsResponse restResult = restClient.callMyConnectionsPostRESTCall(methodName, + urlTemplate, + getEffectiveTimeQueryRequestBody(assetManagerGUID, assetManagerName, effectiveTime), + serverName, + userId, + startFrom, + validatedPageSize, + forLineage, + forDuplicateProcessing); return restResult.getElementList(); } @@ -997,14 +1003,14 @@ public ConnectionElement getConnectionByGUID(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/connections/{2}/retrieve?forLineage={3}&forDuplicateProcessing={4}"; - ConnectionResponse restResult = restClient.callConnectionPostRESTCall(methodName, - urlTemplate, - getEffectiveTimeQueryRequestBody(assetManagerGUID, assetManagerName, effectiveTime), - serverName, - userId, - connectionGUID, - forLineage, - forDuplicateProcessing); + ConnectionResponse restResult = restClient.callMyConnectionPostRESTCall(methodName, + urlTemplate, + getEffectiveTimeQueryRequestBody(assetManagerGUID, assetManagerName, effectiveTime), + serverName, + userId, + connectionGUID, + forLineage, + forDuplicateProcessing); return restResult.getElement(); } @@ -1279,15 +1285,15 @@ public List findEndpoints(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/endpoints/by-search-string?startFrom={2}&pageSize={3}&forLineage={4}&forDuplicateProcessing={5}"; - EndpointsResponse restResult = restClient.callEndpointsPostRESTCall(methodName, - urlTemplate, - getSearchStringRequestBody(assetManagerGUID, assetManagerName, searchString, effectiveTime, methodName), - serverName, - userId, - startFrom, - validatedPageSize, - forLineage, - forDuplicateProcessing); + EndpointsResponse restResult = restClient.callMyEndpointsPostRESTCall(methodName, + urlTemplate, + getSearchStringRequestBody(assetManagerGUID, assetManagerName, searchString, effectiveTime, methodName), + serverName, + userId, + startFrom, + validatedPageSize, + forLineage, + forDuplicateProcessing); return restResult.getElementList(); } @@ -1334,15 +1340,15 @@ public List getEndpointsByName(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/endpoints/by-name?startFrom={2}&pageSize={3}&forLineage={4}&forDuplicateProcessing={5}"; - EndpointsResponse restResult = restClient.callEndpointsPostRESTCall(methodName, - urlTemplate, - getNameRequestBody(assetManagerGUID, assetManagerName, name, effectiveTime, methodName), - serverName, - userId, - startFrom, - validatedPageSize, - forLineage, - forDuplicateProcessing); + EndpointsResponse restResult = restClient.callMyEndpointsPostRESTCall(methodName, + urlTemplate, + getNameRequestBody(assetManagerGUID, assetManagerName, name, effectiveTime, methodName), + serverName, + userId, + startFrom, + validatedPageSize, + forLineage, + forDuplicateProcessing); return restResult.getElementList(); } @@ -1387,15 +1393,15 @@ public List getEndpointsForAssetManager(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/endpoints/by-asset-manager?startFrom={2}&pageSize={3}&forLineage={4}&forDuplicateProcessing={5}"; - EndpointsResponse restResult = restClient.callEndpointsPostRESTCall(methodName, - urlTemplate, - getEffectiveTimeQueryRequestBody(assetManagerGUID, assetManagerName, effectiveTime), - serverName, - userId, - startFrom, - validatedPageSize, - forLineage, - forDuplicateProcessing); + EndpointsResponse restResult = restClient.callMyEndpointsPostRESTCall(methodName, + urlTemplate, + getEffectiveTimeQueryRequestBody(assetManagerGUID, assetManagerName, effectiveTime), + serverName, + userId, + startFrom, + validatedPageSize, + forLineage, + forDuplicateProcessing); return restResult.getElementList(); } @@ -1437,14 +1443,14 @@ public EndpointElement getEndpointByGUID(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/endpoints/{2}/retrieve?forLineage={3}&forDuplicateProcessing={4}"; - EndpointResponse restResult = restClient.callEndpointPostRESTCall(methodName, - urlTemplate, - getEffectiveTimeQueryRequestBody(assetManagerGUID, assetManagerName, effectiveTime), - serverName, - userId, - endpointGUID, - forLineage, - forDuplicateProcessing); + EndpointResponse restResult = restClient.callMyEndpointPostRESTCall(methodName, + urlTemplate, + getEffectiveTimeQueryRequestBody(assetManagerGUID, assetManagerName, effectiveTime), + serverName, + userId, + endpointGUID, + forLineage, + forDuplicateProcessing); return restResult.getElement(); } @@ -1719,15 +1725,15 @@ public List findConnectorTypes(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/connector-types/by-search-string?startFrom={2}&pageSize={3}&forLineage={4}&forDuplicateProcessing={5}"; - ConnectorTypesResponse restResult = restClient.callConnectorTypesPostRESTCall(methodName, - urlTemplate, - getSearchStringRequestBody(assetManagerGUID, assetManagerName, searchString, effectiveTime, methodName), - serverName, - userId, - startFrom, - validatedPageSize, - forLineage, - forDuplicateProcessing); + ConnectorTypesResponse restResult = restClient.callMyConnectorTypesPostRESTCall(methodName, + urlTemplate, + getSearchStringRequestBody(assetManagerGUID, assetManagerName, searchString, effectiveTime, methodName), + serverName, + userId, + startFrom, + validatedPageSize, + forLineage, + forDuplicateProcessing); return restResult.getElementList(); } @@ -1774,15 +1780,15 @@ public List getConnectorTypesByName(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/connector-types/by-name?startFrom={2}&pageSize={3}&forLineage={4}&forDuplicateProcessing={5}"; - ConnectorTypesResponse restResult = restClient.callConnectorTypesPostRESTCall(methodName, - urlTemplate, - getNameRequestBody(assetManagerGUID, assetManagerName, name, effectiveTime, methodName), - serverName, - userId, - startFrom, - validatedPageSize, - forLineage, - forDuplicateProcessing); + ConnectorTypesResponse restResult = restClient.callMyConnectorTypesPostRESTCall(methodName, + urlTemplate, + getNameRequestBody(assetManagerGUID, assetManagerName, name, effectiveTime, methodName), + serverName, + userId, + startFrom, + validatedPageSize, + forLineage, + forDuplicateProcessing); return restResult.getElementList(); } @@ -1827,15 +1833,15 @@ public List getConnectorTypesForAssetManager(String userI final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/connector-types/by-asset-manager?startFrom={2}&pageSize={3}&forLineage={4}&forDuplicateProcessing={5}"; - ConnectorTypesResponse restResult = restClient.callConnectorTypesPostRESTCall(methodName, - urlTemplate, - getEffectiveTimeQueryRequestBody(assetManagerGUID, assetManagerName, effectiveTime), - serverName, - userId, - startFrom, - validatedPageSize, - forLineage, - forDuplicateProcessing); + ConnectorTypesResponse restResult = restClient.callMyConnectorTypesPostRESTCall(methodName, + urlTemplate, + getEffectiveTimeQueryRequestBody(assetManagerGUID, assetManagerName, effectiveTime), + serverName, + userId, + startFrom, + validatedPageSize, + forLineage, + forDuplicateProcessing); return restResult.getElementList(); } @@ -1877,14 +1883,14 @@ public ConnectorTypeElement getConnectorTypeByGUID(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/connector-types/{2}/retrieve?forLineage={3}&forDuplicateProcessing={4}"; - ConnectorTypeResponse restResult = restClient.callConnectorTypePostRESTCall(methodName, - urlTemplate, - getEffectiveTimeQueryRequestBody(assetManagerGUID, assetManagerName, effectiveTime), - serverName, - userId, - openMetadataGUID, - forLineage, - forDuplicateProcessing); + ConnectorTypeResponse restResult = restClient.callMyConnectorTypePostRESTCall(methodName, + urlTemplate, + getEffectiveTimeQueryRequestBody(assetManagerGUID, assetManagerName, effectiveTime), + serverName, + userId, + openMetadataGUID, + forLineage, + forDuplicateProcessing); return restResult.getElement(); } diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/exchange/DataAssetExchangeClient.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/exchange/DataAssetExchangeClient.java index bfed16c7e32..be2c9ba8b74 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/exchange/DataAssetExchangeClient.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/exchange/DataAssetExchangeClient.java @@ -6,17 +6,23 @@ import org.odpi.openmetadata.accessservices.assetmanager.api.exchange.DataAssetExchangeInterface; import org.odpi.openmetadata.accessservices.assetmanager.client.rest.AssetManagerRESTClient; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.DataAssetElement; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.RelationshipElement; -import org.odpi.openmetadata.accessservices.assetmanager.properties.DataAssetProperties; -import org.odpi.openmetadata.frameworks.governanceaction.properties.ExternalIdentifierProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.RelationshipProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.TemplateProperties; +import org.odpi.openmetadata.accessservices.assetmanager.rest.NameRequestBody; +import org.odpi.openmetadata.accessservices.assetmanager.rest.SearchStringRequestBody; +import org.odpi.openmetadata.accessservices.assetmanager.rest.TemplateRequestBody; import org.odpi.openmetadata.accessservices.assetmanager.rest.*; import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.RelationshipElementResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.RelationshipElementsResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.RelationshipRequestBody; +import org.odpi.openmetadata.frameworks.governanceaction.properties.ExternalIdentifierProperties; +import org.odpi.openmetadata.accessservices.assetmanager.properties.TemplateProperties; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.RelationshipElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.*; import java.util.Date; import java.util.List; @@ -601,8 +607,8 @@ public String setupRelatedDataAsset(String userId, RelationshipRequestBody requestBody = new RelationshipRequestBody(); - requestBody.setAssetManagerGUID(assetManagerGUID); - requestBody.setAssetManagerName(assetManagerName); + requestBody.setExternalSourceGUID(assetManagerGUID); + requestBody.setExternalSourceName(assetManagerName); requestBody.setProperties(relationshipProperties); requestBody.setEffectiveTime(effectiveTime); @@ -724,8 +730,8 @@ public void updateAssetRelationship(String userId, invalidParameterHandler.validateName(relationshipTypeName, typeNameParameterName, methodName); RelationshipRequestBody requestBody = new RelationshipRequestBody(); - requestBody.setAssetManagerGUID(assetManagerGUID); - requestBody.setAssetManagerName(assetManagerName); + requestBody.setExternalSourceGUID(assetManagerGUID); + requestBody.setExternalSourceName(assetManagerName); requestBody.setProperties(relationshipProperties); final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/data-assets/relationships/{2}/{3}/update?isMergeUpdate={4}&forLineage={5}&forDuplicateProcessing={6}"; @@ -850,7 +856,7 @@ public List getRelatedAssetsAtEnd2(String userId, forLineage, forDuplicateProcessing); - return restResult.getElementList(); + return restResult.getElements(); } @@ -910,7 +916,7 @@ public List getRelatedAssetsAtEnd1(String userId, forLineage, forDuplicateProcessing); - return restResult.getElementList(); + return restResult.getElements(); } @@ -963,15 +969,15 @@ public List findDataAssets(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/data-assets/by-search-string?startFrom={2}&pageSize={3}&forLineage={4}&forDuplicateProcessing={5}"; - DataAssetElementsResponse restResult = restClient.callDataAssetsPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - startFrom, - validatedPageSize, - forLineage, - forDuplicateProcessing); + DataAssetElementsResponse restResult = restClient.callMyDataAssetsPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + startFrom, + validatedPageSize, + forLineage, + forDuplicateProcessing); return restResult.getElementList(); } @@ -1014,15 +1020,15 @@ public List scanDataAssets(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/data-assets/scan?startFrom={2}&pageSize={3}&forLineage={4}&forDuplicateProcessing={5}"; - DataAssetElementsResponse restResult = restClient.callDataAssetsPostRESTCall(methodName, - urlTemplate, - getEffectiveTimeQueryRequestBody(assetManagerGUID, assetManagerName, effectiveTime), - serverName, - userId, - startFrom, - validatedPageSize, - forLineage, - forDuplicateProcessing); + DataAssetElementsResponse restResult = restClient.callMyDataAssetsPostRESTCall(methodName, + urlTemplate, + getEffectiveTimeQueryRequestBody(assetManagerGUID, assetManagerName, effectiveTime), + serverName, + userId, + startFrom, + validatedPageSize, + forLineage, + forDuplicateProcessing); return restResult.getElementList(); } @@ -1078,15 +1084,15 @@ public List getDataAssetsByName(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/data-assets/by-name?startFrom={2}&pageSize={3}&forLineage={4}&forDuplicateProcessing={5}"; - DataAssetElementsResponse restResult = restClient.callDataAssetsPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - startFrom, - validatedPageSize, - forLineage, - forDuplicateProcessing); + DataAssetElementsResponse restResult = restClient.callMyDataAssetsPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + startFrom, + validatedPageSize, + forLineage, + forDuplicateProcessing); return restResult.getElementList(); } @@ -1131,15 +1137,15 @@ public List getDataAssetsForAssetManager(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/data-assets/by-asset-manager?startFrom={2}&pageSize={3}&forLineage={4}&forDuplicateProcessing={5}"; - DataAssetElementsResponse restResult = restClient.callDataAssetsPostRESTCall(methodName, - urlTemplate, - getEffectiveTimeQueryRequestBody(assetManagerGUID, assetManagerName, effectiveTime), - serverName, - userId, - startFrom, - validatedPageSize, - forLineage, - forDuplicateProcessing); + DataAssetElementsResponse restResult = restClient.callMyDataAssetsPostRESTCall(methodName, + urlTemplate, + getEffectiveTimeQueryRequestBody(assetManagerGUID, assetManagerName, effectiveTime), + serverName, + userId, + startFrom, + validatedPageSize, + forLineage, + forDuplicateProcessing); return restResult.getElementList(); } @@ -1181,14 +1187,14 @@ public DataAssetElement getDataAssetByGUID(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/data-assets/{2}/retrieve?forLineage={3}&forDuplicateProcessing={4}"; - DataAssetElementResponse restResult = restClient.callDataAssetPostRESTCall(methodName, - urlTemplate, - getEffectiveTimeQueryRequestBody(assetManagerGUID, assetManagerName, effectiveTime), - serverName, - userId, - openMetadataGUID, - forLineage, - forDuplicateProcessing); + DataAssetElementResponse restResult = restClient.callMyDataAssetPostRESTCall(methodName, + urlTemplate, + getEffectiveTimeQueryRequestBody(assetManagerGUID, assetManagerName, effectiveTime), + serverName, + userId, + openMetadataGUID, + forLineage, + forDuplicateProcessing); return restResult.getElement(); } diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/exchange/ExternalAssetManagerClient.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/exchange/ExternalAssetManagerClient.java index 3991ba90341..a8f5a96b577 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/exchange/ExternalAssetManagerClient.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/exchange/ExternalAssetManagerClient.java @@ -5,7 +5,7 @@ import org.odpi.openmetadata.accessservices.assetmanager.api.exchange.ExternalAssetManagerInterface; import org.odpi.openmetadata.accessservices.assetmanager.client.rest.AssetManagerRESTClient; -import org.odpi.openmetadata.accessservices.assetmanager.properties.AssetManagerProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities.AssetManagerProperties; import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/exchange/ExternalReferenceExchangeClient.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/exchange/ExternalReferenceExchangeClient.java index 16985afc1ae..ebae2359451 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/exchange/ExternalReferenceExchangeClient.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/exchange/ExternalReferenceExchangeClient.java @@ -8,8 +8,6 @@ import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.ExternalReferenceElement; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.ExternalReferenceLinkElement; import org.odpi.openmetadata.frameworks.governanceaction.properties.ExternalIdentifierProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ExternalReferenceLinkProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ExternalReferenceProperties; import org.odpi.openmetadata.accessservices.assetmanager.rest.ExternalReferenceElementResponse; import org.odpi.openmetadata.accessservices.assetmanager.rest.ExternalReferenceElementsResponse; import org.odpi.openmetadata.accessservices.assetmanager.rest.ExternalReferenceLinkElementsResponse; @@ -22,6 +20,8 @@ import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.properties.externalreferences.ExternalReferenceLinkProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.externalreferences.ExternalReferenceProperties; import java.util.Date; import java.util.List; @@ -498,7 +498,7 @@ public List getExternalReferences(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/external-references/by-type?startFrom={2}&pageSize={3}"; - ExternalReferenceElementsResponse restResult = restClient.callExternalReferencesPostRESTCall(methodName, + ExternalReferenceElementsResponse restResult = restClient.callMyExternalReferencesPostRESTCall(methodName, urlTemplate, getEffectiveTimeQueryRequestBody(assetManagerGUID, assetManagerName, @@ -561,7 +561,7 @@ public List getExternalReferencesById(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/external-references/by-resource-id?startFrom={2}&pageSize={3}"; - ExternalReferenceElementsResponse restResult = restClient.callExternalReferencesPostRESTCall(methodName, + ExternalReferenceElementsResponse restResult = restClient.callMyExternalReferencesPostRESTCall(methodName, urlTemplate, requestBody, serverName, @@ -622,7 +622,7 @@ public List getExternalReferencesByURL(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/external-references/by-url?startFrom={2}&pageSize={3}"; - ExternalReferenceElementsResponse restResult = restClient.callExternalReferencesPostRESTCall(methodName, + ExternalReferenceElementsResponse restResult = restClient.callMyExternalReferencesPostRESTCall(methodName, urlTemplate, requestBody, serverName, @@ -683,7 +683,7 @@ public List getExternalReferencesByName(String userId final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/external-references/by-name?startFrom={2}&pageSize={3}"; - ExternalReferenceElementsResponse restResult = restClient.callExternalReferencesPostRESTCall(methodName, + ExternalReferenceElementsResponse restResult = restClient.callMyExternalReferencesPostRESTCall(methodName, urlTemplate, requestBody, serverName, @@ -732,7 +732,7 @@ public List getExternalReferencesForAssetManager(Strin final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/external-references/by-asset-manager?startFrom={2}&pageSize={3}"; - ExternalReferenceElementsResponse restResult = restClient.callExternalReferencesPostRESTCall(methodName, + ExternalReferenceElementsResponse restResult = restClient.callMyExternalReferencesPostRESTCall(methodName, urlTemplate, getEffectiveTimeQueryRequestBody(assetManagerGUID, assetManagerName, @@ -794,7 +794,7 @@ public List findExternalReferences(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/external-references/by-search-string?startFrom={2}&pageSize={3}"; - ExternalReferenceElementsResponse restResult = restClient.callExternalReferencesPostRESTCall(methodName, + ExternalReferenceElementsResponse restResult = restClient.callMyExternalReferencesPostRESTCall(methodName, urlTemplate, requestBody, serverName, @@ -847,7 +847,7 @@ public List retrieveAttachedExternalReferences(Str final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/external-references/attached-to/{2}?startFrom={3}&pageSize={4}"; - ExternalReferenceLinkElementsResponse restResult = restClient.callExternalReferenceLinksPostRESTCall(methodName, + ExternalReferenceLinkElementsResponse restResult = restClient.callMyExternalReferenceLinksPostRESTCall(methodName, urlTemplate, getEffectiveTimeQueryRequestBody(assetManagerGUID, assetManagerName, diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/exchange/GlossaryExchangeClient.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/exchange/GlossaryExchangeClient.java index c24e9258173..5254f3c722b 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/exchange/GlossaryExchangeClient.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/exchange/GlossaryExchangeClient.java @@ -16,8 +16,11 @@ import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; import org.odpi.openmetadata.frameworks.governanceaction.properties.ExternalIdentifierProperties; -import org.odpi.openmetadata.frameworks.openmetadata.enums.GlossaryTermRelationshipStatus; -import org.odpi.openmetadata.accessservices.assetmanager.properties.GlossaryTermStatus; +import org.odpi.openmetadata.frameworks.openmetadata.enums.*; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ExternalGlossaryLinkElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ArchiveProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.glossaries.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.DataFieldValuesProperties; import java.util.Date; import java.util.List; @@ -779,15 +782,15 @@ public List findGlossaries(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/glossaries/by-search-string?startFrom={2}&pageSize={3}&forLineage={4}&forDuplicateProcessing={5}"; - GlossaryElementsResponse restResult = restClient.callGlossariesPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - startFrom, - validatedPageSize, - forLineage, - forDuplicateProcessing); + GlossaryElementsResponse restResult = restClient.callMyGlossariesPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + startFrom, + validatedPageSize, + forLineage, + forDuplicateProcessing); return restResult.getElementList(); } @@ -842,15 +845,15 @@ public List getGlossariesByName(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/glossaries/by-name?startFrom={2}&pageSize={3}&forLineage={4}&forDuplicateProcessing={5}"; - GlossaryElementsResponse restResult = restClient.callGlossariesPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - startFrom, - validatedPageSize, - forLineage, - forDuplicateProcessing); + GlossaryElementsResponse restResult = restClient.callMyGlossariesPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + startFrom, + validatedPageSize, + forLineage, + forDuplicateProcessing); return restResult.getElementList(); } @@ -893,15 +896,15 @@ public List getGlossariesForAssetManager(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/glossaries/by-asset-manager?startFrom={2}&pageSize={3}&forLineage={4}&forDuplicateProcessing={5}"; - GlossaryElementsResponse restResult = restClient.callGlossariesPostRESTCall(methodName, - urlTemplate, - getEffectiveTimeQueryRequestBody(assetManagerGUID, assetManagerName, effectiveTime), - serverName, - userId, - startFrom, - validatedPageSize, - forLineage, - forDuplicateProcessing); + GlossaryElementsResponse restResult = restClient.callMyGlossariesPostRESTCall(methodName, + urlTemplate, + getEffectiveTimeQueryRequestBody(assetManagerGUID, assetManagerName, effectiveTime), + serverName, + userId, + startFrom, + validatedPageSize, + forLineage, + forDuplicateProcessing); return restResult.getElementList(); } @@ -943,14 +946,14 @@ public GlossaryElement getGlossaryByGUID(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/glossaries/{2}/retrieve?forLineage={3}&forDuplicateProcessing={4}"; - GlossaryElementResponse restResult = restClient.callGlossaryPostRESTCall(methodName, - urlTemplate, - getAssetManagerIdentifiersRequestBody(assetManagerGUID, assetManagerName), - serverName, - userId, - guid, - forLineage, - forDuplicateProcessing); + GlossaryElementResponse restResult = restClient.callMyGlossaryPostRESTCall(methodName, + urlTemplate, + getAssetManagerIdentifiersRequestBody(assetManagerGUID, assetManagerName), + serverName, + userId, + guid, + forLineage, + forDuplicateProcessing); return restResult.getElement(); } @@ -992,14 +995,14 @@ public GlossaryElement getGlossaryForCategory(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/glossaries/for-category/{2}/retrieve?forLineage={3}&forDuplicateProcessing={4}"; - GlossaryElementResponse restResult = restClient.callGlossaryPostRESTCall(methodName, - urlTemplate, - getAssetManagerIdentifiersRequestBody(assetManagerGUID, assetManagerName), - serverName, - userId, - glossaryCategoryGUID, - forLineage, - forDuplicateProcessing); + GlossaryElementResponse restResult = restClient.callMyGlossaryPostRESTCall(methodName, + urlTemplate, + getAssetManagerIdentifiersRequestBody(assetManagerGUID, assetManagerName), + serverName, + userId, + glossaryCategoryGUID, + forLineage, + forDuplicateProcessing); return restResult.getElement(); } @@ -1041,14 +1044,14 @@ public GlossaryElement getGlossaryForTerm(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/glossaries/for-term/{2}/retrieve?forLineage={3}&forDuplicateProcessing={4}"; - GlossaryElementResponse restResult = restClient.callGlossaryPostRESTCall(methodName, - urlTemplate, - getAssetManagerIdentifiersRequestBody(assetManagerGUID, assetManagerName), - serverName, - userId, - glossaryTermGUID, - forLineage, - forDuplicateProcessing); + GlossaryElementResponse restResult = restClient.callMyGlossaryPostRESTCall(methodName, + urlTemplate, + getAssetManagerIdentifiersRequestBody(assetManagerGUID, assetManagerName), + serverName, + userId, + glossaryTermGUID, + forLineage, + forDuplicateProcessing); return restResult.getElement(); } @@ -1438,15 +1441,15 @@ public List findGlossaryCategories(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/glossaries/categories/by-search-string?startFrom={2}&pageSize={3}&forLineage={4}&forDuplicateProcessing={5}"; - GlossaryCategoryElementsResponse restResult = restClient.callGlossaryCategoriesPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - startFrom, - validatedPageSize, - forLineage, - forDuplicateProcessing); + GlossaryCategoryElementsResponse restResult = restClient.callMyGlossaryCategoriesPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + startFrom, + validatedPageSize, + forLineage, + forDuplicateProcessing); return restResult.getElementList(); } @@ -1493,16 +1496,16 @@ public List getCategoriesForGlossary(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/glossaries/{2}/categories/retrieve?startFrom={3}&pageSize={4}&forLineage={5}&forDuplicateProcessing={6}"; - GlossaryCategoryElementsResponse restResult = restClient.callGlossaryCategoriesPostRESTCall(methodName, - urlTemplate, - getEffectiveTimeQueryRequestBody(assetManagerGUID, assetManagerName, effectiveTime), - serverName, - userId, - glossaryGUID, - startFrom, - validatedPageSize, - forLineage, - forDuplicateProcessing); + GlossaryCategoryElementsResponse restResult = restClient.callMyGlossaryCategoriesPostRESTCall(methodName, + urlTemplate, + getEffectiveTimeQueryRequestBody(assetManagerGUID, assetManagerName, effectiveTime), + serverName, + userId, + glossaryGUID, + startFrom, + validatedPageSize, + forLineage, + forDuplicateProcessing); return restResult.getElementList(); } @@ -1549,16 +1552,16 @@ public List getCategoriesForTerm(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/glossaries/terms/{2}/categories/retrieve?startFrom={3}&pageSize={4}&forLineage={5}&forDuplicateProcessing={6}"; - GlossaryCategoryElementsResponse restResult = restClient.callGlossaryCategoriesPostRESTCall(methodName, - urlTemplate, - getEffectiveTimeQueryRequestBody(assetManagerGUID, assetManagerName, effectiveTime), - serverName, - userId, - glossaryTermGUID, - startFrom, - validatedPageSize, - forLineage, - forDuplicateProcessing); + GlossaryCategoryElementsResponse restResult = restClient.callMyGlossaryCategoriesPostRESTCall(methodName, + urlTemplate, + getEffectiveTimeQueryRequestBody(assetManagerGUID, assetManagerName, effectiveTime), + serverName, + userId, + glossaryTermGUID, + startFrom, + validatedPageSize, + forLineage, + forDuplicateProcessing); return restResult.getElementList(); } @@ -1616,15 +1619,15 @@ public List getGlossaryCategoriesByName(String userI final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/glossaries/categories/by-name?startFrom={2}&pageSize={3}&forLineage={4}&forDuplicateProcessing={5}"; - GlossaryCategoryElementsResponse restResult = restClient.callGlossaryCategoriesPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - startFrom, - validatedPageSize, - forLineage, - forDuplicateProcessing); + GlossaryCategoryElementsResponse restResult = restClient.callMyGlossaryCategoriesPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + startFrom, + validatedPageSize, + forLineage, + forDuplicateProcessing); return restResult.getElementList(); } @@ -1666,14 +1669,14 @@ public GlossaryCategoryElement getGlossaryCategoryByGUID(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/glossaries/categories/{2}/retrieve?forLineage={3}&forDuplicateProcessing={4}"; - GlossaryCategoryElementResponse restResult = restClient.callGlossaryCategoryPostRESTCall(methodName, - urlTemplate, - getEffectiveTimeQueryRequestBody(assetManagerGUID, assetManagerName, effectiveTime), - serverName, - userId, - glossaryCategoryGUID, - forLineage, - forDuplicateProcessing); + GlossaryCategoryElementResponse restResult = restClient.callMyGlossaryCategoryPostRESTCall(methodName, + urlTemplate, + getEffectiveTimeQueryRequestBody(assetManagerGUID, assetManagerName, effectiveTime), + serverName, + userId, + glossaryCategoryGUID, + forLineage, + forDuplicateProcessing); return restResult.getElement(); } @@ -1715,14 +1718,14 @@ public GlossaryCategoryElement getGlossaryCategoryParent(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/glossaries/categories/{2}/parent/retrieve?forLineage={3}&forDuplicateProcessing={4}"; - GlossaryCategoryElementResponse restResult = restClient.callGlossaryCategoryPostRESTCall(methodName, - urlTemplate, - getEffectiveTimeQueryRequestBody(assetManagerGUID, assetManagerName, effectiveTime), - serverName, - userId, - glossaryCategoryGUID, - forLineage, - forDuplicateProcessing); + GlossaryCategoryElementResponse restResult = restClient.callMyGlossaryCategoryPostRESTCall(methodName, + urlTemplate, + getEffectiveTimeQueryRequestBody(assetManagerGUID, assetManagerName, effectiveTime), + serverName, + userId, + glossaryCategoryGUID, + forLineage, + forDuplicateProcessing); return restResult.getElement(); } @@ -1769,16 +1772,16 @@ public List getGlossarySubCategories(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/glossaries/categories/{2}/subcategories/retrieve?startFrom={3}&pageSize={4}&forLineage={5}&forDuplicateProcessing={6}"; - GlossaryCategoryElementsResponse restResult = restClient.callGlossaryCategoriesPostRESTCall(methodName, - urlTemplate, - getEffectiveTimeQueryRequestBody(assetManagerGUID, assetManagerName, effectiveTime), - serverName, - userId, - glossaryCategoryGUID, - startFrom, - validatedPageSize, - forLineage, - forDuplicateProcessing); + GlossaryCategoryElementsResponse restResult = restClient.callMyGlossaryCategoriesPostRESTCall(methodName, + urlTemplate, + getEffectiveTimeQueryRequestBody(assetManagerGUID, assetManagerName, effectiveTime), + serverName, + userId, + glossaryCategoryGUID, + startFrom, + validatedPageSize, + forLineage, + forDuplicateProcessing); return restResult.getElementList(); } @@ -1970,6 +1973,7 @@ public String createGlossaryTermFromTemplate(String userId methodName)); requestBody.setParentGUID(glossaryGUID); requestBody.setElementProperties(templateProperties); + requestBody.setGlossaryTermStatus(initialStatus); GUIDResponse restResult = restClient.callGUIDPostRESTCall(methodName, urlTemplate + requestParamsURLTemplate, @@ -3323,14 +3327,14 @@ public GlossaryTermElement undoGlossaryTermUpdate(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/glossaries/terms/{2}/undo&forLineage={3}&forDuplicateProcessing={4}"; - GlossaryTermElementResponse response = restClient.callGlossaryTermPostRESTCall(methodName, - urlTemplate, - getUpdateRequestBody(assetManagerGUID, assetManagerName, glossaryTermExternalIdentifier, effectiveTime, methodName), - serverName, - userId, - glossaryTermGUID, - forLineage, - forDuplicateProcessing); + GlossaryTermElementResponse response = restClient.callMyGlossaryTermPostRESTCall(methodName, + urlTemplate, + getUpdateRequestBody(assetManagerGUID, assetManagerName, glossaryTermExternalIdentifier, effectiveTime, methodName), + serverName, + userId, + glossaryTermGUID, + forLineage, + forDuplicateProcessing); return response.getElement(); } @@ -3493,15 +3497,15 @@ public List findGlossaryTerms(String us final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/glossaries/terms/by-search-string?startFrom={2}&pageSize={3}&forLineage={4}&forDuplicateProcessing={5}"; - GlossaryTermElementsResponse restResult = restClient.callGlossaryTermsPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - startFrom, - validatedPageSize, - forLineage, - forDuplicateProcessing); + GlossaryTermElementsResponse restResult = restClient.callMyGlossaryTermsPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + startFrom, + validatedPageSize, + forLineage, + forDuplicateProcessing); return restResult.getElementList(); } @@ -3548,16 +3552,16 @@ public List getTermsForGlossary(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/glossaries/{2}/terms/retrieve?startFrom={3}&pageSize={4}&forLineage={5}&forDuplicateProcessing={6}"; - GlossaryTermElementsResponse restResult = restClient.callGlossaryTermsPostRESTCall(methodName, - urlTemplate, - getEffectiveTimeQueryRequestBody(assetManagerGUID, assetManagerName, effectiveTime), - serverName, - userId, - glossaryGUID, - startFrom, - validatedPageSize, - forLineage, - forDuplicateProcessing); + GlossaryTermElementsResponse restResult = restClient.callMyGlossaryTermsPostRESTCall(methodName, + urlTemplate, + getEffectiveTimeQueryRequestBody(assetManagerGUID, assetManagerName, effectiveTime), + serverName, + userId, + glossaryGUID, + startFrom, + validatedPageSize, + forLineage, + forDuplicateProcessing); return restResult.getElementList(); } @@ -3609,16 +3613,16 @@ public List getRelatedTerms(String final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/glossaries/terms/{2}/related-terms?startFrom={3}&pageSize={4}&forLineage={5}&forDuplicateProcessing={6}"; - GlossaryTermElementsResponse restResult = restClient.callGlossaryTermsPostRESTCall(methodName, - urlTemplate, - getGlossaryTermRelationshipRequestBody(assetManagerGUID, assetManagerName, relationshipTypeName, limitResultsByStatus, effectiveTime), - serverName, - userId, - glossaryTermGUID, - startFrom, - validatedPageSize, - forLineage, - forDuplicateProcessing); + GlossaryTermElementsResponse restResult = restClient.callMyGlossaryTermsPostRESTCall(methodName, + urlTemplate, + getGlossaryTermRelationshipRequestBody(assetManagerGUID, assetManagerName, relationshipTypeName, limitResultsByStatus, effectiveTime), + serverName, + userId, + glossaryTermGUID, + startFrom, + validatedPageSize, + forLineage, + forDuplicateProcessing); return restResult.getElementList(); } @@ -3668,16 +3672,16 @@ public List getTermsForGlossaryCategory(String final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/glossaries/categories/{2}/terms/retrieve?startFrom={3}&pageSize={4}&forLineage={5}&forDuplicateProcessing={6}"; - GlossaryTermElementsResponse restResult = restClient.callGlossaryTermsPostRESTCall(methodName, - urlTemplate, - getGlossaryTermRelationshipRequestBody(assetManagerGUID, assetManagerName, null, limitResultsByStatus, effectiveTime), - serverName, - userId, - glossaryCategoryGUID, - startFrom, - validatedPageSize, - forLineage, - forDuplicateProcessing); + GlossaryTermElementsResponse restResult = restClient.callMyGlossaryTermsPostRESTCall(methodName, + urlTemplate, + getGlossaryTermRelationshipRequestBody(assetManagerGUID, assetManagerName, null, limitResultsByStatus, effectiveTime), + serverName, + userId, + glossaryCategoryGUID, + startFrom, + validatedPageSize, + forLineage, + forDuplicateProcessing); return restResult.getElementList(); } @@ -3739,15 +3743,15 @@ public List getGlossaryTermsByName(String final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/glossaries/terms/by-name?startFrom={2}&pageSize={3}&forLineage={4}&forDuplicateProcessing={5}"; - GlossaryTermElementsResponse restResult = restClient.callGlossaryTermsPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - startFrom, - validatedPageSize, - forLineage, - forDuplicateProcessing); + GlossaryTermElementsResponse restResult = restClient.callMyGlossaryTermsPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + startFrom, + validatedPageSize, + forLineage, + forDuplicateProcessing); return restResult.getElementList(); } @@ -3789,16 +3793,16 @@ public GlossaryTermElement getGlossaryTermByGUID(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/glossaries/terms/{2}/retrieve?forLineage={3}&forDuplicateProcessing={4}"; - GlossaryTermElementResponse restResult = restClient.callGlossaryTermPostRESTCall(methodName, - urlTemplate, - getEffectiveTimeQueryRequestBody(assetManagerGUID, + GlossaryTermElementResponse restResult = restClient.callMyGlossaryTermPostRESTCall(methodName, + urlTemplate, + getEffectiveTimeQueryRequestBody(assetManagerGUID, assetManagerName, effectiveTime), - serverName, - userId, - glossaryTermGUID, - forLineage, - forDuplicateProcessing); + serverName, + userId, + glossaryTermGUID, + forLineage, + forDuplicateProcessing); return restResult.getElement(); } @@ -3860,17 +3864,17 @@ public List getGlossaryTermHistory(String u final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/glossaries/terms/{2}/history?startFrom={3}&pageSize={4}&oldestFirst={5}&forLineage={6}&forDuplicateProcessing={7}"; - GlossaryTermElementsResponse restResult = restClient.callGlossaryTermsPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - glossaryTermGUID, - startFrom, - validatedPageSize, - oldestFirst, - forLineage, - forDuplicateProcessing); + GlossaryTermElementsResponse restResult = restClient.callMyGlossaryTermsPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + glossaryTermGUID, + startFrom, + validatedPageSize, + oldestFirst, + forLineage, + forDuplicateProcessing); return restResult.getElementList(); } @@ -4174,16 +4178,16 @@ public List getExternalLinksForGlossary(String use final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/glossaries/{2}/external-links/retrieve?startFrom={3}&pageSize={4}&forLineage={5}&forDuplicateProcessing={6}"; - ExternalGlossaryLinkElementsResponse restResult = restClient.callExternalGlossaryLinksPostRESTCall(methodName, - urlTemplate, - getEffectiveTimeQueryRequestBody(assetManagerGUID, assetManagerName, effectiveTime), - serverName, - userId, - glossaryGUID, - startFrom, - validatedPageSize, - forLineage, - forDuplicateProcessing); + ExternalGlossaryLinkElementsResponse restResult = restClient.callMyExternalGlossaryLinksPostRESTCall(methodName, + urlTemplate, + getEffectiveTimeQueryRequestBody(assetManagerGUID, assetManagerName, effectiveTime), + serverName, + userId, + glossaryGUID, + startFrom, + validatedPageSize, + forLineage, + forDuplicateProcessing); return restResult.getElementList(); } @@ -4230,16 +4234,16 @@ public List getGlossariesForExternalLink(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/glossaries/by-external-links/{2}/retrieve?startFrom={3}&pageSize={4}&forLineage={5}&forDuplicateProcessing={6}"; - GlossaryElementsResponse restResult = restClient.callGlossariesPostRESTCall(methodName, - urlTemplate, - getEffectiveTimeQueryRequestBody(assetManagerGUID, assetManagerName, effectiveTime), - serverName, - userId, - externalLinkGUID, - startFrom, - validatedPageSize, - forLineage, - forDuplicateProcessing); + GlossaryElementsResponse restResult = restClient.callMyGlossariesPostRESTCall(methodName, + urlTemplate, + getEffectiveTimeQueryRequestBody(assetManagerGUID, assetManagerName, effectiveTime), + serverName, + userId, + externalLinkGUID, + startFrom, + validatedPageSize, + forLineage, + forDuplicateProcessing); return restResult.getElementList(); } diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/exchange/GovernanceExchangeClient.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/exchange/GovernanceExchangeClient.java index 5a3fca0e623..2d397ed2441 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/exchange/GovernanceExchangeClient.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/exchange/GovernanceExchangeClient.java @@ -7,11 +7,11 @@ import org.odpi.openmetadata.accessservices.assetmanager.client.rest.AssetManagerRESTClient; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.GovernanceDefinitionElement; import org.odpi.openmetadata.frameworks.governanceaction.properties.ExternalIdentifierProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.GovernanceDefinitionProperties; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.GovernanceDefinitionProperties; /** diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/exchange/LineageExchangeClient.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/exchange/LineageExchangeClient.java index a7477b459a0..1a6e17e6595 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/exchange/LineageExchangeClient.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/exchange/LineageExchangeClient.java @@ -5,15 +5,28 @@ import org.odpi.openmetadata.accessservices.assetmanager.api.exchange.LineageExchangeInterface; import org.odpi.openmetadata.accessservices.assetmanager.client.rest.AssetManagerRESTClient; +import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.PortElement; +import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.ProcessElement; import org.odpi.openmetadata.accessservices.assetmanager.properties.*; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.*; -import org.odpi.openmetadata.accessservices.assetmanager.rest.*; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; +import org.odpi.openmetadata.accessservices.assetmanager.rest.PortElementResponse; +import org.odpi.openmetadata.accessservices.assetmanager.rest.PortElementsResponse; +import org.odpi.openmetadata.accessservices.assetmanager.rest.PortRequestBody; +import org.odpi.openmetadata.accessservices.assetmanager.rest.ProcessElementResponse; +import org.odpi.openmetadata.accessservices.assetmanager.rest.ProcessElementsResponse; +import org.odpi.openmetadata.accessservices.assetmanager.rest.ProcessRequestBody; +import org.odpi.openmetadata.accessservices.assetmanager.rest.ProcessStatusRequestBody; +import org.odpi.openmetadata.accessservices.assetmanager.rest.TemplateRequestBody; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; import org.odpi.openmetadata.frameworks.governanceaction.properties.ExternalIdentifierProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.processes.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.lineage.*; +import org.odpi.openmetadata.frameworks.openmetadata.enums.*; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; + import java.util.Date; import java.util.List; @@ -666,15 +679,15 @@ public List findProcesses(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/processes/by-search-string?startFrom={2}&pageSize={3}&forLineage={4}&forDuplicateProcessing={5}"; - ProcessElementsResponse restResult = restClient.callProcessesPostRESTCall(methodName, - urlTemplate, - getSearchStringRequestBody(assetManagerGUID, assetManagerName, searchString, effectiveTime, methodName), - serverName, - userId, - startFrom, - validatedPageSize, - forLineage, - forDuplicateProcessing); + ProcessElementsResponse restResult = restClient.callMyProcessesPostRESTCall(methodName, + urlTemplate, + getSearchStringRequestBody(assetManagerGUID, assetManagerName, searchString, effectiveTime, methodName), + serverName, + userId, + startFrom, + validatedPageSize, + forLineage, + forDuplicateProcessing); return restResult.getElementList(); } @@ -717,15 +730,15 @@ public List getProcessesForAssetManager(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/processes/by-asset-manager?startFrom={2}&pageSize={3}&forLineage={4}&forDuplicateProcessing={5}"; - ProcessElementsResponse restResult = restClient.callProcessesPostRESTCall(methodName, - urlTemplate, - getEffectiveTimeQueryRequestBody(assetManagerGUID, assetManagerName, effectiveTime), - serverName, - userId, - startFrom, - validatedPageSize, - forLineage, - forDuplicateProcessing); + ProcessElementsResponse restResult = restClient.callMyProcessesPostRESTCall(methodName, + urlTemplate, + getEffectiveTimeQueryRequestBody(assetManagerGUID, assetManagerName, effectiveTime), + serverName, + userId, + startFrom, + validatedPageSize, + forLineage, + forDuplicateProcessing); return restResult.getElementList(); } @@ -772,15 +785,15 @@ public List getProcessesByName(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/processes/by-name?startFrom={2}&pageSize={3}&forLineage={4}&forDuplicateProcessing={5}"; - ProcessElementsResponse restResult = restClient.callProcessesPostRESTCall(methodName, - urlTemplate, - getNameRequestBody(assetManagerGUID, assetManagerName, name, effectiveTime, methodName), - serverName, - userId, - startFrom, - validatedPageSize, - forLineage, - forDuplicateProcessing); + ProcessElementsResponse restResult = restClient.callMyProcessesPostRESTCall(methodName, + urlTemplate, + getNameRequestBody(assetManagerGUID, assetManagerName, name, effectiveTime, methodName), + serverName, + userId, + startFrom, + validatedPageSize, + forLineage, + forDuplicateProcessing); return restResult.getElementList(); } @@ -822,14 +835,14 @@ public ProcessElement getProcessByGUID(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/processes/{2}/retrieve?forLineage={3}&forDuplicateProcessing={4}"; - ProcessElementResponse restResult = restClient.callProcessPostRESTCall(methodName, - urlTemplate, - getEffectiveTimeQueryRequestBody(assetManagerGUID, assetManagerName, effectiveTime), - serverName, - userId, - processGUID, - forLineage, - forDuplicateProcessing); + ProcessElementResponse restResult = restClient.callMyProcessPostRESTCall(methodName, + urlTemplate, + getEffectiveTimeQueryRequestBody(assetManagerGUID, assetManagerName, effectiveTime), + serverName, + userId, + processGUID, + forLineage, + forDuplicateProcessing); return restResult.getElement(); } @@ -871,14 +884,14 @@ public ProcessElement getProcessParent(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/processes/{2}/parent/retrieve?forLineage={3}&forDuplicateProcessing={4}"; - ProcessElementResponse restResult = restClient.callProcessPostRESTCall(methodName, - urlTemplate, - getEffectiveTimeQueryRequestBody(assetManagerGUID, assetManagerName, effectiveTime), - serverName, - userId, - processGUID, - forLineage, - forDuplicateProcessing); + ProcessElementResponse restResult = restClient.callMyProcessPostRESTCall(methodName, + urlTemplate, + getEffectiveTimeQueryRequestBody(assetManagerGUID, assetManagerName, effectiveTime), + serverName, + userId, + processGUID, + forLineage, + forDuplicateProcessing); return restResult.getElement(); } @@ -926,15 +939,15 @@ public List getSubProcesses(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/processes/children?startFrom={2}&pageSize={3}&forLineage={4}&forDuplicateProcessing={5}"; - ProcessElementsResponse restResult = restClient.callProcessesPostRESTCall(methodName, - urlTemplate, - getEffectiveTimeQueryRequestBody(assetManagerGUID, assetManagerName, effectiveTime), - serverName, - userId, - startFrom, - validatedPageSize, - forLineage, - forDuplicateProcessing); + ProcessElementsResponse restResult = restClient.callMyProcessesPostRESTCall(methodName, + urlTemplate, + getEffectiveTimeQueryRequestBody(assetManagerGUID, assetManagerName, effectiveTime), + serverName, + userId, + startFrom, + validatedPageSize, + forLineage, + forDuplicateProcessing); return restResult.getElementList(); } @@ -1471,15 +1484,15 @@ public List findPorts(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/ports/by-search-string?startFrom={2}&pageSize={3}&forLineage={4}&forDuplicateProcessing={5}"; - PortElementsResponse restResult = restClient.callPortsPostRESTCall(methodName, - urlTemplate, - getSearchStringRequestBody(assetManagerGUID, assetManagerName, searchString, effectiveTime, methodName), - serverName, - userId, - startFrom, - validatedPageSize, - forLineage, - forDuplicateProcessing); + PortElementsResponse restResult = restClient.callMyPortsPostRESTCall(methodName, + urlTemplate, + getSearchStringRequestBody(assetManagerGUID, assetManagerName, searchString, effectiveTime, methodName), + serverName, + userId, + startFrom, + validatedPageSize, + forLineage, + forDuplicateProcessing); return restResult.getElementList(); } @@ -1526,16 +1539,16 @@ public List getPortsForProcess(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/processes/{2}/ports/retrieve?startFrom={3}&pageSize={4}&forLineage={5}&forDuplicateProcessing={6}"; - PortElementsResponse restResult = restClient.callPortsPostRESTCall(methodName, - urlTemplate, - getEffectiveTimeQueryRequestBody(assetManagerGUID, assetManagerName, effectiveTime), - serverName, - userId, - processGUID, - startFrom, - validatedPageSize, - forLineage, - forDuplicateProcessing); + PortElementsResponse restResult = restClient.callMyPortsPostRESTCall(methodName, + urlTemplate, + getEffectiveTimeQueryRequestBody(assetManagerGUID, assetManagerName, effectiveTime), + serverName, + userId, + processGUID, + startFrom, + validatedPageSize, + forLineage, + forDuplicateProcessing); return restResult.getElementList(); } @@ -1582,16 +1595,16 @@ public List getPortUse(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/ports/{2}/used-by/retrieve?startFrom={3}&pageSize={4}&forLineage={5}&forDuplicateProcessing={6}"; - PortElementsResponse restResult = restClient.callPortsPostRESTCall(methodName, - urlTemplate, - getEffectiveTimeQueryRequestBody(assetManagerGUID, assetManagerName, effectiveTime), - serverName, - userId, - portGUID, - startFrom, - validatedPageSize, - forLineage, - forDuplicateProcessing); + PortElementsResponse restResult = restClient.callMyPortsPostRESTCall(methodName, + urlTemplate, + getEffectiveTimeQueryRequestBody(assetManagerGUID, assetManagerName, effectiveTime), + serverName, + userId, + portGUID, + startFrom, + validatedPageSize, + forLineage, + forDuplicateProcessing); return restResult.getElementList(); } @@ -1633,14 +1646,14 @@ public PortElement getPortDelegation(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/ports/{2}/port-delegations/retrieve?forLineage={3}&forDuplicateProcessing={4}"; - PortElementResponse restResult = restClient.callPortPostRESTCall(methodName, - urlTemplate, - getEffectiveTimeQueryRequestBody(assetManagerGUID, assetManagerName, effectiveTime), - serverName, - userId, - portGUID, - forLineage, - forDuplicateProcessing); + PortElementResponse restResult = restClient.callMyPortPostRESTCall(methodName, + urlTemplate, + getEffectiveTimeQueryRequestBody(assetManagerGUID, assetManagerName, effectiveTime), + serverName, + userId, + portGUID, + forLineage, + forDuplicateProcessing); return restResult.getElement(); } @@ -1686,15 +1699,15 @@ public List getPortsByName(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/ports/by-name?startFrom={2}&pageSize={3}&forLineage={4}&forDuplicateProcessing={5}"; - PortElementsResponse restResult = restClient.callPortsPostRESTCall(methodName, - urlTemplate, - getNameRequestBody(assetManagerGUID, assetManagerName, name, effectiveTime, methodName), - serverName, - userId, - startFrom, - validatedPageSize, - forLineage, - forDuplicateProcessing); + PortElementsResponse restResult = restClient.callMyPortsPostRESTCall(methodName, + urlTemplate, + getNameRequestBody(assetManagerGUID, assetManagerName, name, effectiveTime, methodName), + serverName, + userId, + startFrom, + validatedPageSize, + forLineage, + forDuplicateProcessing); return restResult.getElementList(); } @@ -1736,14 +1749,14 @@ public PortElement getPortByGUID(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/ports/{2}/retrieve?forLineage={3}&forDuplicateProcessing={3}"; - PortElementResponse restResult = restClient.callPortPostRESTCall(methodName, - urlTemplate, - getEffectiveTimeQueryRequestBody(assetManagerGUID, assetManagerName, effectiveTime), - serverName, - userId, - portGUID, - forLineage, - forDuplicateProcessing); + PortElementResponse restResult = restClient.callMyPortPostRESTCall(methodName, + urlTemplate, + getEffectiveTimeQueryRequestBody(assetManagerGUID, assetManagerName, effectiveTime), + serverName, + userId, + portGUID, + forLineage, + forDuplicateProcessing); return restResult.getElement(); } @@ -2110,7 +2123,7 @@ public List getDataFlowConsumers(String userId, forLineage, forDuplicateProcessing); - return restResult.getElementList(); + return restResult.getElements(); } @@ -2167,7 +2180,7 @@ public List getDataFlowSuppliers(String userId, forLineage, forDuplicateProcessing); - return restResult.getElementList(); + return restResult.getElements(); } @@ -2433,7 +2446,7 @@ public List getControlFlowNextSteps(String userId, forLineage, forDuplicateProcessing); - return restResult.getElementList(); + return restResult.getElements(); } @@ -2490,7 +2503,7 @@ public List getControlFlowPreviousSteps(String userId, forLineage, forDuplicateProcessing); - return restResult.getElementList(); + return restResult.getElements(); } @@ -2757,7 +2770,7 @@ public List getProcessCalled(String userId, forLineage, forDuplicateProcessing); - return restResult.getElementList(); + return restResult.getElements(); } @@ -2814,7 +2827,7 @@ public List getProcessCallers(String userId, forLineage, forDuplicateProcessing); - return restResult.getElementList(); + return restResult.getElements(); } @@ -3079,7 +3092,7 @@ public List getDestinationLineageMappings(String userId, forLineage, forDuplicateProcessing); - return results.getElementList(); + return results.getElements(); } @@ -3135,7 +3148,7 @@ public List getSourceLineageMappings(String userId, forLineage, forDuplicateProcessing); - return results.getElementList(); + return results.getElements(); } diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/exchange/SchemaExchangeClientBase.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/exchange/SchemaExchangeClientBase.java index b86bdf1c659..2864dca0ed2 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/exchange/SchemaExchangeClientBase.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/exchange/SchemaExchangeClientBase.java @@ -9,14 +9,18 @@ import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.SchemaTypeElement; import org.odpi.openmetadata.accessservices.assetmanager.properties.*; import org.odpi.openmetadata.accessservices.assetmanager.rest.*; +import org.odpi.openmetadata.commonservices.ffdc.rest.ElementHeaderResponse; import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.PrimaryKeyClassificationRequestBody; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; import org.odpi.openmetadata.frameworks.governanceaction.properties.ExternalIdentifierProperties; -import org.odpi.openmetadata.frameworks.openmetadata.enums.KeyPattern; +import org.odpi.openmetadata.frameworks.openmetadata.enums.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.*; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; import java.util.Date; import java.util.List; @@ -743,7 +747,7 @@ public List findSchemaType(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/schema-types/by-search-string?startFrom={2}&pageSize={3}&forLineage={4}&forDuplicateProcessing={5}"; - SchemaTypeElementsResponse restResult = restClient.callSchemaTypesPostRESTCall(methodName, + SchemaTypeElementsResponse restResult = restClient.callMySchemaTypesPostRESTCall(methodName, urlTemplate, requestBody, serverName, @@ -795,7 +799,7 @@ public SchemaTypeElement getSchemaTypeForElement(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/parents/{2}/{3}/schema-types/retrieve?forLineage={4}&forDuplicateProcessing={5}"; - SchemaTypeElementResponse restResult = restClient.callSchemaTypePostRESTCall(methodName, + SchemaTypeElementResponse restResult = restClient.callMySchemaTypePostRESTCall(methodName, urlTemplate, getEffectiveTimeQueryRequestBody(assetManagerGUID, assetManagerName, effectiveTime), serverName, @@ -859,7 +863,7 @@ public List getSchemaTypeByName(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/schema-types/by-name?startFrom={2}&pageSize={3}&forLineage={4}&forDuplicateProcessing={5}"; - SchemaTypeElementsResponse restResult = restClient.callSchemaTypesPostRESTCall(methodName, + SchemaTypeElementsResponse restResult = restClient.callMySchemaTypesPostRESTCall(methodName, urlTemplate, requestBody, serverName, @@ -909,7 +913,7 @@ public SchemaTypeElement getSchemaTypeByGUID(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/schema-types/{2}/retrieve?forLineage={3}&forDuplicateProcessing={4}"; - SchemaTypeElementResponse restResult = restClient.callSchemaTypePostRESTCall(methodName, + SchemaTypeElementResponse restResult = restClient.callMySchemaTypePostRESTCall(methodName, urlTemplate, getEffectiveTimeQueryRequestBody(assetManagerGUID, assetManagerName, effectiveTime), serverName, @@ -1336,8 +1340,8 @@ public void setupColumnAsPrimaryKey(String userId, primaryKeyProperties.setKeyPattern(primaryKeyPattern); requestBody.setPrimaryKeyProperties(primaryKeyProperties); - requestBody.setAssetManagerGUID(assetManagerGUID); - requestBody.setAssetManagerName(assetManagerName); + requestBody.setExternalSourceGUID(assetManagerGUID); + requestBody.setExternalSourceName(assetManagerName); requestBody.setEffectiveTime(effectiveTime); final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/schema-attributes/{2}/is-primary-key?assetManagerIsHome={3}&forLineage={4}&forDuplicateProcessing={5}"; @@ -1664,7 +1668,7 @@ public List findSchemaAttributes(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/schema-attributes/by-search-string?startFrom={2}&pageSize={3}&forLineage={4}&forDuplicateProcessing={5}"; - SchemaAttributeElementsResponse restResult = restClient.callSchemaAttributesPostRESTCall(methodName, + SchemaAttributeElementsResponse restResult = restClient.callMySchemaAttributesPostRESTCall(methodName, urlTemplate, requestBody, serverName, @@ -1719,7 +1723,7 @@ public List getNestedSchemaAttributes(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/schema-elements/{2}/schema-attributes/retrieve?startFrom={3}&pageSize={4}&forLineage={5}&forDuplicateProcessing={6}"; - SchemaAttributeElementsResponse restResult = restClient.callSchemaAttributesPostRESTCall(methodName, + SchemaAttributeElementsResponse restResult = restClient.callMySchemaAttributesPostRESTCall(methodName, urlTemplate, getEffectiveTimeQueryRequestBody(assetManagerGUID, assetManagerName, effectiveTime), serverName, @@ -1784,7 +1788,7 @@ public List getSchemaAttributesByName(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/schema-attributes/by-name?startFrom={2}&pageSize={3}&forLineage={4}&forDuplicateProcessing={5}"; - SchemaAttributeElementsResponse restResult = restClient.callSchemaAttributesPostRESTCall(methodName, + SchemaAttributeElementsResponse restResult = restClient.callMySchemaAttributesPostRESTCall(methodName, urlTemplate, requestBody, serverName, @@ -1834,7 +1838,7 @@ public SchemaAttributeElement getSchemaAttributeByGUID(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/schema-attributes/{2}/retrieve?forLineage={3}&forDuplicateProcessing={4}"; - SchemaAttributeElementResponse restResult = restClient.callSchemaAttributePostRESTCall(methodName, + SchemaAttributeElementResponse restResult = restClient.callMySchemaAttributePostRESTCall(methodName, urlTemplate, getEffectiveTimeQueryRequestBody(assetManagerGUID, assetManagerName, effectiveTime), serverName, diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/exchange/StewardshipExchangeClient.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/exchange/StewardshipExchangeClient.java index 5a03306df60..714ebd9415d 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/exchange/StewardshipExchangeClient.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/exchange/StewardshipExchangeClient.java @@ -8,19 +8,10 @@ import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.AssetElement; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.GlossaryTermElement; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.GovernanceDefinitionElement; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.RelatedElement; -import org.odpi.openmetadata.accessservices.assetmanager.properties.AssetOriginProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.DataFieldQueryProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.DataFieldValuesProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.FindAssetOriginProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.FindNameProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.GovernanceClassificationProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.LevelIdentifierProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.OwnerProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.RetentionClassificationProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.SecurityTagsProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.SemanticAssignmentProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.SubjectAreaMemberProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.RelatedElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.FindNameProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.AssetOriginProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.OwnerProperties; import org.odpi.openmetadata.accessservices.assetmanager.rest.AssetElementsResponse; import org.odpi.openmetadata.accessservices.assetmanager.rest.FindByPropertiesRequestBody; import org.odpi.openmetadata.accessservices.assetmanager.rest.GlossaryTermElementsResponse; @@ -29,7 +20,10 @@ import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.security.SecurityTagsProperties; import java.util.Date; import java.util.List; @@ -1357,15 +1351,15 @@ public List getAssetsByOrigin(String userId, requestBody.setEffectiveTime(effectiveTime); requestBody.setProperties(properties); - AssetElementsResponse restResult = restClient.callAssetsPostRESTCall(methodName, - urlTemplate + requestParamsURLTemplate, - requestBody, - serverName, - userId, - startFrom, - validatedPageSize, - forLineage, - forDuplicateProcessing); + AssetElementsResponse restResult = restClient.callMyAssetsPostRESTCall(methodName, + urlTemplate + requestParamsURLTemplate, + requestBody, + serverName, + userId, + startFrom, + validatedPageSize, + forLineage, + forDuplicateProcessing); return restResult.getElementList(); } @@ -1389,17 +1383,17 @@ public List getAssetsByOrigin(String userId, * @throws PropertyServerException there is a problem reported in the open metadata server(s) */ @Override - public void addElementToSubjectArea(String userId, - String assetManagerGUID, - String assetManagerName, - String elementGUID, - String externalIdentifier, - SubjectAreaMemberProperties properties, - Date effectiveTime, - boolean forLineage, - boolean forDuplicateProcessing) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException + public void addElementToSubjectArea(String userId, + String assetManagerGUID, + String assetManagerName, + String elementGUID, + String externalIdentifier, + SubjectAreaClassificationProperties properties, + Date effectiveTime, + boolean forLineage, + boolean forDuplicateProcessing) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException { final String methodName = "addElementToSubjectArea"; final String elementGUIDParameter = "elementGUID"; @@ -1663,16 +1657,16 @@ public List getMeanings(String userId, invalidParameterHandler.validateGUID(elementGUID, elementGUIDParameterName, methodName); int validatedPageSize = invalidParameterHandler.validatePaging(startFrom, pageSize, methodName); - GlossaryTermElementsResponse restResult = restClient.callGlossaryTermsPostRESTCall(methodName, - urlTemplate, - getEffectiveTimeQueryRequestBody(assetManagerGUID, assetManagerName, effectiveTime), - serverName, - userId, - elementGUID, - startFrom, - validatedPageSize, - forLineage, - forDuplicateProcessing); + GlossaryTermElementsResponse restResult = restClient.callMyGlossaryTermsPostRESTCall(methodName, + urlTemplate, + getEffectiveTimeQueryRequestBody(assetManagerGUID, assetManagerName, effectiveTime), + serverName, + userId, + elementGUID, + startFrom, + validatedPageSize, + forLineage, + forDuplicateProcessing); return restResult.getElementList(); } @@ -1871,18 +1865,18 @@ public List getGovernedByDefinitions(String userId invalidParameterHandler.validateGUID(elementGUID, elementGUIDParameterName, methodName); int validatedPageSize = invalidParameterHandler.validatePaging(startFrom, pageSize, methodName); - GovernanceDefinitionsResponse restResult = restClient.callGovernanceDefinitionsPostRESTCall(methodName, - urlTemplate + requestParamsURLTemplate, - getEffectiveTimeQueryRequestBody(assetManagerGUID, + GovernanceDefinitionsResponse restResult = restClient.callMyGovernanceDefinitionsPostRESTCall(methodName, + urlTemplate + requestParamsURLTemplate, + getEffectiveTimeQueryRequestBody(assetManagerGUID, assetManagerName, effectiveTime), - serverName, - userId, - elementGUID, - startFrom, - validatedPageSize, - forLineage, - forDuplicateProcessing); + serverName, + userId, + elementGUID, + startFrom, + validatedPageSize, + forLineage, + forDuplicateProcessing); return restResult.getElements(); } diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/exchange/ValidValuesExchangeClient.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/exchange/ValidValuesExchangeClient.java index 576cba4e692..cef26ed99e2 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/exchange/ValidValuesExchangeClient.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/exchange/ValidValuesExchangeClient.java @@ -9,20 +9,15 @@ import org.odpi.openmetadata.accessservices.assetmanager.client.converters.ValidValueConverter; import org.odpi.openmetadata.accessservices.assetmanager.client.converters.ValidValueMemberConverter; import org.odpi.openmetadata.accessservices.assetmanager.client.rest.AssetManagerRESTClient; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.ReferenceValueAssignmentDefinitionElement; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.ReferenceValueAssignmentItemElement; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.ValidValueElement; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.ValidValueMember; +import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.*; import org.odpi.openmetadata.frameworks.governanceaction.properties.ExternalIdentifierProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ReferenceValueAssignmentProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ValidValueMembershipProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ValidValueProperties; import org.odpi.openmetadata.adminservices.configuration.registration.AccessServiceDescription; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStatus; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ElementStatus; +import org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues.*; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.frameworks.governanceaction.properties.OpenMetadataElement; @@ -45,12 +40,12 @@ */ public class ValidValuesExchangeClient extends ExchangeClientBase implements ValidValuesExchangeInterface { - final private ValidValueConverter validValueConverter; - final private Class validValueBeanClass = ValidValueElement.class; - final private ValidValueMemberConverter validValueMemberConverter; - final private Class validValueMemberClass = ValidValueMember.class; - final private ReferenceValueAssignmentItemConverter referenceValueAssignmentItemConverter; - final private Class referenceValueAssignmentItemBeanClass = ReferenceValueAssignmentItemElement.class; + final private ValidValueConverter validValueConverter; + final private Class validValueBeanClass = ValidValueElement.class; + final private ValidValueMemberConverter validValueMemberConverter; + final private Class validValueMemberClass = ValidValueMember.class; + final private ReferenceValueAssignmentItemConverter referenceValueAssignmentItemConverter; + final private Class referenceValueAssignmentItemBeanClass = ReferenceValueAssignmentItemElement.class; final private ReferenceValueAssignmentDefinitionConverter referenceValueAssignmentDefinitionConverter; final private Class referenceValueAssignmentDefinitionBeanClass = ReferenceValueAssignmentDefinitionElement.class; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/management/CollaborationManagementClient.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/management/CollaborationManagementClient.java index 6a3c351a413..72e9f3eb42a 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/management/CollaborationManagementClient.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/management/CollaborationManagementClient.java @@ -10,16 +10,11 @@ import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.InformalTagElement; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.NoteElement; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.NoteLogElement; -import org.odpi.openmetadata.accessservices.assetmanager.properties.CommentProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.FeedbackProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.NoteLogProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.NoteProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.RatingProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.TagProperties; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.properties.feedback.*; import java.util.Date; import java.util.List; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/management/GlossaryManagementClient.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/management/GlossaryManagementClient.java index 1a574b4c8fd..673b1017fe8 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/management/GlossaryManagementClient.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/management/GlossaryManagementClient.java @@ -6,28 +6,16 @@ import org.odpi.openmetadata.accessservices.assetmanager.api.management.GlossaryManagementInterface; import org.odpi.openmetadata.accessservices.assetmanager.client.exchange.GlossaryExchangeClient; import org.odpi.openmetadata.accessservices.assetmanager.client.rest.AssetManagerRESTClient; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.ExternalGlossaryLinkElement; +import org.odpi.openmetadata.frameworks.openmetadata.enums.*; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ExternalGlossaryLinkElement; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.GlossaryCategoryElement; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.GlossaryElement; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.GlossaryTermElement; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ArchiveProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.CanonicalVocabularyProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.DataFieldValuesProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.EditingGlossaryProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ExternalGlossaryElementLinkProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ExternalGlossaryLinkProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.GlossaryCategoryProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.GlossaryProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.GlossaryTermCategorization; -import org.odpi.openmetadata.accessservices.assetmanager.properties.GlossaryTermContextDefinition; -import org.odpi.openmetadata.accessservices.assetmanager.properties.GlossaryTermProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.GlossaryTermRelationship; +import org.odpi.openmetadata.frameworks.openmetadata.properties.glossaries.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.*; import org.odpi.openmetadata.frameworks.openmetadata.enums.GlossaryTermRelationshipStatus; -import org.odpi.openmetadata.accessservices.assetmanager.properties.GlossaryTermStatus; -import org.odpi.openmetadata.accessservices.assetmanager.properties.StagingGlossaryProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.TaxonomyProperties; import org.odpi.openmetadata.accessservices.assetmanager.properties.TemplateProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ActivityDescriptionProperties; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/management/StewardshipManagementClient.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/management/StewardshipManagementClient.java index 42a940f1015..c90f824ce2a 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/management/StewardshipManagementClient.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/management/StewardshipManagementClient.java @@ -9,23 +9,16 @@ import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.AssetElement; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.GlossaryTermElement; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.GovernanceDefinitionElement; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.RelatedElement; -import org.odpi.openmetadata.accessservices.assetmanager.properties.AssetOriginProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.DataFieldQueryProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.DataFieldValuesProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.FindAssetOriginProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.GovernanceClassificationProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.OwnerProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.RetentionClassificationProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.SecurityTagsProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.SemanticAssignmentProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.SubjectAreaMemberProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.RelatedElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.AssetOriginProperties; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; - +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.security.SecurityTagsProperties; import java.util.Date; import java.util.List; @@ -952,14 +945,14 @@ public List getAssetsByOrigin(String userId, * @throws PropertyServerException there is a problem reported in the open metadata server(s) */ @Override - public void addElementToSubjectArea(String userId, - String elementGUID, - SubjectAreaMemberProperties properties, - Date effectiveTime, - boolean forLineage, - boolean forDuplicateProcessing) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException + public void addElementToSubjectArea(String userId, + String elementGUID, + SubjectAreaClassificationProperties properties, + Date effectiveTime, + boolean forLineage, + boolean forDuplicateProcessing) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException { client.addElementToSubjectArea(userId, null, null, elementGUID, null, properties, effectiveTime, forLineage, forDuplicateProcessing); } diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/rest/AssetManagerRESTClient.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/rest/AssetManagerRESTClient.java index 59b022cccb6..b80fc5405ff 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/rest/AssetManagerRESTClient.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-client/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/client/rest/AssetManagerRESTClient.java @@ -90,62 +90,6 @@ public AssetManagerRESTClient(String serverName, - /** - * Issue a POST REST call that returns a ElementStubsResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param requestBody object that passes additional parameters - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public ElementStubsResponse callElementStubsPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ElementStubsResponse restResult = this.callPostRESTCall(methodName, ElementStubsResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a POST REST call that returns a RelatedElementsResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param requestBody object that passes additional parameters - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public RelatedElementsResponse callRelatedElementsPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - RelatedElementsResponse restResult = this.callPostRESTCall(methodName, RelatedElementsResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - /** * Issue a POST REST call that returns a GovernanceDefinitionsResponse object. * @@ -159,408 +103,22 @@ public RelatedElementsResponse callRelatedElementsPostRESTCall(String methodN * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException the repository is not available or not working properly. */ - public GovernanceDefinitionsResponse callGovernanceDefinitionsPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - GovernanceDefinitionsResponse restResult = this.callPostRESTCall(methodName, GovernanceDefinitionsResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a POST REST call that returns a ExternalReferenceElementResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param requestBody object that passes additional parameters - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public ExternalReferenceElementResponse callExternalReferencePostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ExternalReferenceElementResponse restResult = this.callPostRESTCall(methodName, ExternalReferenceElementResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a POST REST call that returns a ExternalReferenceElementsResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param requestBody object that passes additional parameters - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public ExternalReferenceElementsResponse callExternalReferencesPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ExternalReferenceElementsResponse restResult = this.callPostRESTCall(methodName, ExternalReferenceElementsResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a POST REST call that returns a ExternalReferenceLinkElementsResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param requestBody object that passes additional parameters - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public ExternalReferenceLinkElementsResponse callExternalReferenceLinksPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ExternalReferenceLinkElementsResponse restResult = this.callPostRESTCall(methodName, ExternalReferenceLinkElementsResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a POST REST call that returns a InformalTagsResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param requestBody object that passes additional parameters - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public InformalTagsResponse callInformalTagListPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - InformalTagsResponse restResult = this.callPostRESTCall(methodName, InformalTagsResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a InformalTagsResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public InformalTagResponse callInformalTagGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - InformalTagResponse restResult = this.callGetRESTCall(methodName, InformalTagResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a POST REST call that returns a LikeElementsResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param requestBody object that passes additional parameters - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public LikeElementsResponse callLikeElementsPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - LikeElementsResponse restResult = this.callPostRESTCall(methodName, LikeElementsResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a LikeElementResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public LikeElementResponse callLikeElementGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - LikeElementResponse restResult = this.callGetRESTCall(methodName, LikeElementResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a POST REST call that returns a RatingElementsResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param requestBody object that passes additional parameters - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public RatingElementsResponse callRatingElementsPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - RatingElementsResponse restResult = this.callPostRESTCall(methodName, RatingElementsResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a RatingElementResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public RatingElementResponse callRatingElementGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - RatingElementResponse restResult = this.callGetRESTCall(methodName, RatingElementResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a POST REST call that returns a CommentElementsResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param requestBody object that passes additional parameters - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public CommentElementsResponse callCommentElementsPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - CommentElementsResponse restResult = this.callPostRESTCall(methodName, CommentElementsResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a CommentElementResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param requestBody object that passes additional parameters - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public CommentElementResponse callCommentElementPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - CommentElementResponse restResult = this.callPostRESTCall(methodName, CommentElementResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a CommentElementsResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public CommentElementsResponse callCommentElementsGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - CommentElementsResponse restResult = this.callGetRESTCall(methodName, CommentElementsResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a POST REST call that returns a NoteLogElementsResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param requestBody object that passes additional parameters - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public NoteLogElementsResponse callNoteLogElementsPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - NoteLogElementsResponse restResult = this.callPostRESTCall(methodName, NoteLogElementsResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a POST REST call that returns a NoteLogElementResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param requestBody object that passes additional parameters - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public NoteLogElementResponse callNoteLogElementPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException + public GovernanceDefinitionsResponse callMyGovernanceDefinitionsPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException { - NoteLogElementResponse restResult = this.callPostRESTCall(methodName, NoteLogElementResponse.class, urlTemplate, requestBody, params); + GovernanceDefinitionsResponse restResult = this.callPostRESTCall(methodName, GovernanceDefinitionsResponse.class, urlTemplate, requestBody, params); exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); return restResult; } - - /** - * Issue a POST REST call that returns a NoteElementsResponse object. + * Issue a POST REST call that returns a ConnectionsResponse object. * * @param methodName name of the method being called. * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. @@ -572,14 +130,14 @@ public NoteLogElementResponse callNoteLogElementPostRESTCall(String methodNam * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException the repository is not available or not working properly. */ - public NoteElementsResponse callNoteElementsPostRESTCall(String methodName, + public ConnectionsResponse callMyConnectionsPostRESTCall(String methodName, String urlTemplate, Object requestBody, Object... params) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - NoteElementsResponse restResult = this.callPostRESTCall(methodName, NoteElementsResponse.class, urlTemplate, requestBody, params); + ConnectionsResponse restResult = this.callPostRESTCall(methodName, ConnectionsResponse.class, urlTemplate, requestBody, params); exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); @@ -588,7 +146,7 @@ public NoteElementsResponse callNoteElementsPostRESTCall(String methodName, /** - * Issue a POST REST call that returns a NoteLogElementResponse object. + * Issue a POST REST call that returns a ConnectionsResponse object. * * @param methodName name of the method being called. * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. @@ -600,14 +158,14 @@ public NoteElementsResponse callNoteElementsPostRESTCall(String methodName, * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException the repository is not available or not working properly. */ - public NoteElementResponse callNoteElementPostRESTCall(String methodName, + public ConnectionResponse callMyConnectionPostRESTCall(String methodName, String urlTemplate, Object requestBody, Object... params) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - NoteElementResponse restResult = this.callPostRESTCall(methodName, NoteElementResponse.class, urlTemplate, requestBody, params); + ConnectionResponse restResult = this.callPostRESTCall(methodName, ConnectionResponse.class, urlTemplate, requestBody, params); exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); @@ -615,8 +173,9 @@ public NoteElementResponse callNoteElementPostRESTCall(String methodName, } + /** - * Issue a POST REST call that returns a GlossaryElementResponse object. + * Issue a POST REST call that returns a ConnectorTypeResponse object. * * @param methodName name of the method being called. * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. @@ -628,14 +187,14 @@ public NoteElementResponse callNoteElementPostRESTCall(String methodName, * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException the repository is not available or not working properly. */ - public GlossaryElementResponse callGlossaryPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException + public ConnectorTypeResponse callMyConnectorTypePostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException { - GlossaryElementResponse restResult = this.callPostRESTCall(methodName, GlossaryElementResponse.class, urlTemplate, requestBody, params); + ConnectorTypeResponse restResult = this.callPostRESTCall(methodName, ConnectorTypeResponse.class, urlTemplate, requestBody, params); exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); @@ -643,8 +202,9 @@ public GlossaryElementResponse callGlossaryPostRESTCall(String methodName, } + /** - * Issue a POST REST call that returns a GlossaryElementsResponse object. + * Issue a POST REST call that returns a ConnectorTypesResponse object. * * @param methodName name of the method being called. * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. @@ -656,14 +216,14 @@ public GlossaryElementResponse callGlossaryPostRESTCall(String methodName, * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException the repository is not available or not working properly. */ - public GlossaryElementsResponse callGlossariesPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException + public ConnectorTypesResponse callMyConnectorTypesPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException { - GlossaryElementsResponse restResult = this.callPostRESTCall(methodName, GlossaryElementsResponse.class, urlTemplate, requestBody, params); + ConnectorTypesResponse restResult = this.callPostRESTCall(methodName, ConnectorTypesResponse.class, urlTemplate, requestBody, params); exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); @@ -672,26 +232,26 @@ public GlossaryElementsResponse callGlossariesPostRESTCall(String methodName, /** - * Issue a POST REST call that returns a GlossaryCategoryElementResponse object. + * Issue a POST REST call that returns a EndpointsResponse object. * - * @param methodName name of the method being called - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. * @param requestBody object that passes additional parameters - * @param params a list of parameters that are slotted into the url template + * @param params a list of parameters that are slotted into the url template. * * @return response object * @throws InvalidParameterException one of the parameters is invalid. * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException the repository is not available or not working properly. */ - public GlossaryCategoryElementResponse callGlossaryCategoryPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException + public EndpointsResponse callMyEndpointsPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException { - GlossaryCategoryElementResponse restResult = this.callPostRESTCall(methodName, GlossaryCategoryElementResponse.class, urlTemplate, requestBody, params); + EndpointsResponse restResult = this.callPostRESTCall(methodName, EndpointsResponse.class, urlTemplate, requestBody, params); exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); @@ -699,8 +259,10 @@ public GlossaryCategoryElementResponse callGlossaryCategoryPostRESTCall(String } + + /** - * Issue a POST REST call that returns a GlossaryCategoryElementsResponse object. + * Issue a POST REST call that returns a EndpointResponse object. * * @param methodName name of the method being called. * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. @@ -712,14 +274,14 @@ public GlossaryCategoryElementResponse callGlossaryCategoryPostRESTCall(String * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException the repository is not available or not working properly. */ - public GlossaryCategoryElementsResponse callGlossaryCategoriesPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException + public EndpointResponse callMyEndpointPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException { - GlossaryCategoryElementsResponse restResult = this.callPostRESTCall(methodName, GlossaryCategoryElementsResponse.class, urlTemplate, requestBody, params); + EndpointResponse restResult = this.callPostRESTCall(methodName, EndpointResponse.class, urlTemplate, requestBody, params); exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); @@ -727,8 +289,10 @@ public GlossaryCategoryElementsResponse callGlossaryCategoriesPostRESTCall(Strin } + + /** - * Issue a POST REST call that returns a GlossaryTermElementResponse object. + * Issue a POST REST call that returns a ExternalReferenceElementResponse object. * * @param methodName name of the method being called. * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. @@ -740,14 +304,14 @@ public GlossaryCategoryElementsResponse callGlossaryCategoriesPostRESTCall(Strin * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException the repository is not available or not working properly. */ - public GlossaryTermElementResponse callGlossaryTermPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException + public ExternalReferenceElementResponse callExternalReferencePostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException { - GlossaryTermElementResponse restResult = this.callPostRESTCall(methodName, GlossaryTermElementResponse.class, urlTemplate, requestBody, params); + ExternalReferenceElementResponse restResult = this.callPostRESTCall(methodName, ExternalReferenceElementResponse.class, urlTemplate, requestBody, params); exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); @@ -756,7 +320,7 @@ public GlossaryTermElementResponse callGlossaryTermPostRESTCall(String method /** - * Issue a POST REST call that returns a GlossaryTermElementsResponse object. + * Issue a POST REST call that returns a ExternalReferenceElementsResponse object. * * @param methodName name of the method being called. * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. @@ -768,14 +332,14 @@ public GlossaryTermElementResponse callGlossaryTermPostRESTCall(String method * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException the repository is not available or not working properly. */ - public GlossaryTermElementsResponse callGlossaryTermsPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException + public ExternalReferenceElementsResponse callMyExternalReferencesPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException { - GlossaryTermElementsResponse restResult = this.callPostRESTCall(methodName, GlossaryTermElementsResponse.class, urlTemplate, requestBody, params); + ExternalReferenceElementsResponse restResult = this.callPostRESTCall(methodName, ExternalReferenceElementsResponse.class, urlTemplate, requestBody, params); exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); @@ -784,7 +348,7 @@ public GlossaryTermElementsResponse callGlossaryTermsPostRESTCall(String meth /** - * Issue a POST REST call that returns a ExternalGlossaryLinkElementsResponse object. + * Issue a POST REST call that returns a ExternalReferenceLinkElementsResponse object. * * @param methodName name of the method being called. * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. @@ -796,18 +360,14 @@ public GlossaryTermElementsResponse callGlossaryTermsPostRESTCall(String meth * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException the repository is not available or not working properly. */ - public ExternalGlossaryLinkElementsResponse callExternalGlossaryLinksPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException + public ExternalReferenceLinkElementsResponse callMyExternalReferenceLinksPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException { - ExternalGlossaryLinkElementsResponse restResult = this.callPostRESTCall(methodName, - ExternalGlossaryLinkElementsResponse.class, - urlTemplate, - requestBody, - params); + ExternalReferenceLinkElementsResponse restResult = this.callPostRESTCall(methodName, ExternalReferenceLinkElementsResponse.class, urlTemplate, requestBody, params); exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); @@ -816,7 +376,7 @@ public ExternalGlossaryLinkElementsResponse callExternalGlossaryLinksPostRESTCal /** - * Issue a POST REST call that returns a ElementHeaderResponse object. + * Issue a POST REST call that returns a SchemaTypeElementResponse object. * * @param methodName name of the method being called. * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. @@ -828,18 +388,14 @@ public ExternalGlossaryLinkElementsResponse callExternalGlossaryLinksPostRESTCal * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException the repository is not available or not working properly. */ - public ElementHeaderResponse callElementHeaderPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException + public SchemaTypeElementResponse callMySchemaTypePostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException { - ElementHeaderResponse restResult = this.callPostRESTCall(methodName, - ElementHeaderResponse.class, - urlTemplate, - requestBody, - params); + SchemaTypeElementResponse restResult = this.callPostRESTCall(methodName, SchemaTypeElementResponse.class, urlTemplate, requestBody, params); exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); @@ -847,8 +403,9 @@ public ElementHeaderResponse callElementHeaderPostRESTCall(String methodName, } + /** - * Issue a POST REST call that returns a ElementHeadersResponse object. + * Issue a POST REST call that returns a SchemaTypeElementsResponse object. * * @param methodName name of the method being called. * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. @@ -860,18 +417,14 @@ public ElementHeaderResponse callElementHeaderPostRESTCall(String methodName, * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException the repository is not available or not working properly. */ - public ElementHeadersResponse callElementHeadersPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException + public SchemaTypeElementsResponse callMySchemaTypesPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException { - ElementHeadersResponse restResult = this.callPostRESTCall(methodName, - ElementHeadersResponse.class, - urlTemplate, - requestBody, - params); + SchemaTypeElementsResponse restResult = this.callPostRESTCall(methodName, SchemaTypeElementsResponse.class, urlTemplate, requestBody, params); exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); @@ -880,25 +433,28 @@ public ElementHeadersResponse callElementHeadersPostRESTCall(String methodNam + /** - * Issue a GET REST call that returns a ConnectionResponse object. + * Issue a POST REST call that returns a SchemaAttributeElementResponse object. * * @param methodName name of the method being called. * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. + * @param requestBody object that passes additional parameters * @param params a list of parameters that are slotted into the url template. * - * @return ConnectionResponse + * @return response object * @throws InvalidParameterException one of the parameters is invalid. * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException the repository is not available or not working properly. */ - public ConnectionResponse callConnectionGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException + public SchemaAttributeElementResponse callMySchemaAttributePostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException { - ConnectionResponse restResult = this.callGetRESTCall(methodName, ConnectionResponse.class, urlTemplate, params); + SchemaAttributeElementResponse restResult = this.callPostRESTCall(methodName, SchemaAttributeElementResponse.class, urlTemplate, requestBody, params); exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); @@ -906,25 +462,28 @@ public ConnectionResponse callConnectionGetRESTCall(String methodName, } + /** - * Issue a POST REST call that returns a ConnectionsResponse object. + * Issue a POST REST call that returns a SchemaAttributeElementsResponse object. * * @param methodName name of the method being called. * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. + * @param requestBody object that passes additional parameters * @param params a list of parameters that are slotted into the url template. * - * @return ConnectionsResponse + * @return response object * @throws InvalidParameterException one of the parameters is invalid. * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException the repository is not available or not working properly. */ - public ConnectionsResponse callConnectionsGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException + public SchemaAttributeElementsResponse callMySchemaAttributesPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException { - ConnectionsResponse restResult = this.callGetRESTCall(methodName, ConnectionsResponse.class, urlTemplate, params); + SchemaAttributeElementsResponse restResult = this.callPostRESTCall(methodName, SchemaAttributeElementsResponse.class, urlTemplate, requestBody, params); exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); @@ -934,26 +493,26 @@ public ConnectionsResponse callConnectionsGetRESTCall(String methodName, /** - * Issue a POST REST call that returns a ConnectionResponse object. + * Issue a POST REST call that returns a InformalTagsResponse object. * * @param methodName name of the method being called. * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param requestBody properties describing the valid value definition/set + * @param requestBody object that passes additional parameters * @param params a list of parameters that are slotted into the url template. * - * @return ConnectionResponse + * @return response object * @throws InvalidParameterException one of the parameters is invalid. * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException the repository is not available or not working properly. */ - public ConnectionResponse callConnectionPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException + public InformalTagsResponse callMyInformalTagListPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException { - ConnectionResponse restResult = this.callPostRESTCall(methodName, ConnectionResponse.class, urlTemplate, requestBody, params); + InformalTagsResponse restResult = this.callPostRESTCall(methodName, InformalTagsResponse.class, urlTemplate, requestBody, params); exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); @@ -961,28 +520,25 @@ public ConnectionResponse callConnectionPostRESTCall(String methodName, } - /** - * Issue a POST REST call that returns a ConnectionsResponse object. + * Issue a GET REST call that returns a InformalTagsResponse object. * * @param methodName name of the method being called. * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param requestBody properties describing the valid value definition/set * @param params a list of parameters that are slotted into the url template. * - * @return ConnectionsResponse + * @return response object * @throws InvalidParameterException one of the parameters is invalid. * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException the repository is not available or not working properly. */ - public ConnectionsResponse callConnectionsPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException + public InformalTagResponse callMyInformalTagGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException { - ConnectionsResponse restResult = this.callPostRESTCall(methodName, ConnectionsResponse.class, urlTemplate, requestBody, params); + InformalTagResponse restResult = this.callGetRESTCall(methodName, InformalTagResponse.class, urlTemplate, params); exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); @@ -991,26 +547,26 @@ public ConnectionsResponse callConnectionsPostRESTCall(String methodName, /** - * Issue a POST REST call that returns a ConnectorReportResponse object. + * Issue a POST REST call that returns a LikeElementsResponse object. * * @param methodName name of the method being called. * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param requestBody properties describing the valid value definition/set + * @param requestBody object that passes additional parameters * @param params a list of parameters that are slotted into the url template. * - * @return ConnectorReportResponse + * @return response object * @throws InvalidParameterException one of the parameters is invalid. * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException the repository is not available or not working properly. */ - public ConnectorTypeResponse callConnectorTypePostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException + public LikeElementsResponse callLikeElementsPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException { - ConnectorTypeResponse restResult = this.callPostRESTCall(methodName, ConnectorTypeResponse.class, urlTemplate, requestBody, params); + LikeElementsResponse restResult = this.callPostRESTCall(methodName, LikeElementsResponse.class, urlTemplate, requestBody, params); exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); @@ -1019,26 +575,24 @@ public ConnectorTypeResponse callConnectorTypePostRESTCall(String methodName, /** - * Issue a POST REST call that returns a ConnectorTypesResponse object. + * Issue a GET REST call that returns a LikeElementResponse object. * * @param methodName name of the method being called. * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param requestBody properties describing the valid value definition/set * @param params a list of parameters that are slotted into the url template. * - * @return ConnectorTypesResponse + * @return response object * @throws InvalidParameterException one of the parameters is invalid. * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException the repository is not available or not working properly. */ - public ConnectorTypesResponse callConnectorTypesPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException + public LikeElementResponse callLikeElementGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException { - ConnectorTypesResponse restResult = this.callPostRESTCall(methodName, ConnectorTypesResponse.class, urlTemplate, requestBody, params); + LikeElementResponse restResult = this.callGetRESTCall(methodName, LikeElementResponse.class, urlTemplate, params); exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); @@ -1047,26 +601,26 @@ public ConnectorTypesResponse callConnectorTypesPostRESTCall(String methodNam /** - * Issue a GET REST call that returns a EndpointResponse object. + * Issue a POST REST call that returns a RatingElementsResponse object. * * @param methodName name of the method being called. * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param requestBody properties describing the valid value definition/set + * @param requestBody object that passes additional parameters * @param params a list of parameters that are slotted into the url template. * - * @return EndpointResponse + * @return response object * @throws InvalidParameterException one of the parameters is invalid. * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException the repository is not available or not working properly. */ - public EndpointResponse callEndpointPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException + public RatingElementsResponse callRatingElementsPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException { - EndpointResponse restResult = this.callPostRESTCall(methodName, EndpointResponse.class, urlTemplate, requestBody, params); + RatingElementsResponse restResult = this.callPostRESTCall(methodName, RatingElementsResponse.class, urlTemplate, requestBody, params); exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); @@ -1075,26 +629,24 @@ public EndpointResponse callEndpointPostRESTCall(String methodName, /** - * Issue a POST REST call that returns a EndpointsResponse object. + * Issue a GET REST call that returns a RatingElementResponse object. * * @param methodName name of the method being called. * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param requestBody properties describing the valid value definition/set * @param params a list of parameters that are slotted into the url template. * - * @return EndpointsResponse + * @return response object * @throws InvalidParameterException one of the parameters is invalid. * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException the repository is not available or not working properly. */ - public EndpointsResponse callEndpointsPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException + public RatingElementResponse callRatingElementGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException { - EndpointsResponse restResult = this.callPostRESTCall(methodName, EndpointsResponse.class, urlTemplate, requestBody, params); + RatingElementResponse restResult = this.callGetRESTCall(methodName, RatingElementResponse.class, urlTemplate, params); exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); @@ -1103,7 +655,7 @@ public EndpointsResponse callEndpointsPostRESTCall(String methodName, /** - * Issue a POST REST call that returns a MetadataCorrelationHeadersResponse object. + * Issue a POST REST call that returns a CommentElementsResponse object. * * @param methodName name of the method being called. * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. @@ -1115,14 +667,14 @@ public EndpointsResponse callEndpointsPostRESTCall(String methodName, * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException the repository is not available or not working properly. */ - public MetadataCorrelationHeadersResponse callCorrelationHeadersPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException + public CommentElementsResponse callCommentElementsPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException { - MetadataCorrelationHeadersResponse restResult = this.callPostRESTCall(methodName, MetadataCorrelationHeadersResponse.class, urlTemplate, requestBody, params); + CommentElementsResponse restResult = this.callPostRESTCall(methodName, CommentElementsResponse.class, urlTemplate, requestBody, params); exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); @@ -1131,7 +683,7 @@ public MetadataCorrelationHeadersResponse callCorrelationHeadersPostRESTCall(Str /** - * Issue a POST REST call that returns a DataAssetElementResponse object. + * Issue a GET REST call that returns a CommentElementResponse object. * * @param methodName name of the method being called. * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. @@ -1143,14 +695,14 @@ public MetadataCorrelationHeadersResponse callCorrelationHeadersPostRESTCall(Str * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException the repository is not available or not working properly. */ - public DataAssetElementResponse callDataAssetPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException + public CommentElementResponse callCommentElementPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException { - DataAssetElementResponse restResult = this.callPostRESTCall(methodName, DataAssetElementResponse.class, urlTemplate, requestBody, params); + CommentElementResponse restResult = this.callPostRESTCall(methodName, CommentElementResponse.class, urlTemplate, requestBody, params); exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); @@ -1159,11 +711,10 @@ public DataAssetElementResponse callDataAssetPostRESTCall(String methodName, /** - * Issue a POST REST call that returns a DataAssetElementsResponse object. + * Issue a GET REST call that returns a CommentElementsResponse object. * * @param methodName name of the method being called. * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param requestBody object that passes additional parameters * @param params a list of parameters that are slotted into the url template. * * @return response object @@ -1171,14 +722,13 @@ public DataAssetElementResponse callDataAssetPostRESTCall(String methodName, * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException the repository is not available or not working properly. */ - public DataAssetElementsResponse callDataAssetsPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException + public CommentElementsResponse callCommentElementsGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException { - DataAssetElementsResponse restResult = this.callPostRESTCall(methodName, DataAssetElementsResponse.class, urlTemplate, requestBody, params); + CommentElementsResponse restResult = this.callGetRESTCall(methodName, CommentElementsResponse.class, urlTemplate, params); exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); @@ -1187,7 +737,7 @@ public DataAssetElementsResponse callDataAssetsPostRESTCall(String methodName /** - * Issue a POST REST call that returns a AssetsResponse object. + * Issue a POST REST call that returns a NoteLogElementsResponse object. * * @param methodName name of the method being called. * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. @@ -1199,14 +749,14 @@ public DataAssetElementsResponse callDataAssetsPostRESTCall(String methodName * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException the repository is not available or not working properly. */ - public AssetElementsResponse callAssetsPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException + public NoteLogElementsResponse callMyNoteLogElementsPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException { - AssetElementsResponse restResult = this.callPostRESTCall(methodName, AssetElementsResponse.class, urlTemplate, requestBody, params); + NoteLogElementsResponse restResult = this.callPostRESTCall(methodName, NoteLogElementsResponse.class, urlTemplate, requestBody, params); exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); @@ -1214,9 +764,8 @@ public AssetElementsResponse callAssetsPostRESTCall(String methodName, } - /** - * Issue a POST REST call that returns a PortElementResponse object. + * Issue a POST REST call that returns a NoteLogElementResponse object. * * @param methodName name of the method being called. * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. @@ -1228,14 +777,14 @@ public AssetElementsResponse callAssetsPostRESTCall(String methodName, * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException the repository is not available or not working properly. */ - public PortElementResponse callPortPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException + public NoteLogElementResponse callMyNoteLogElementPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException { - PortElementResponse restResult = this.callPostRESTCall(methodName, PortElementResponse.class, urlTemplate, requestBody, params); + NoteLogElementResponse restResult = this.callPostRESTCall(methodName, NoteLogElementResponse.class, urlTemplate, requestBody, params); exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); @@ -1243,8 +792,9 @@ public PortElementResponse callPortPostRESTCall(String methodName, } + /** - * Issue a POST REST call that returns a PortElementsResponse object. + * Issue a POST REST call that returns a NoteElementsResponse object. * * @param methodName name of the method being called. * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. @@ -1256,14 +806,14 @@ public PortElementResponse callPortPostRESTCall(String methodName, * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException the repository is not available or not working properly. */ - public PortElementsResponse callPortsPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException + public NoteElementsResponse callMyNoteElementsPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException { - PortElementsResponse restResult = this.callPostRESTCall(methodName, PortElementsResponse.class, urlTemplate, requestBody, params); + NoteElementsResponse restResult = this.callPostRESTCall(methodName, NoteElementsResponse.class, urlTemplate, requestBody, params); exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); @@ -1272,7 +822,7 @@ public PortElementsResponse callPortsPostRESTCall(String methodName, /** - * Issue a POST REST call that returns a ProcessElementResponse object. + * Issue a POST REST call that returns a NoteLogElementResponse object. * * @param methodName name of the method being called. * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. @@ -1284,14 +834,14 @@ public PortElementsResponse callPortsPostRESTCall(String methodName, * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException the repository is not available or not working properly. */ - public ProcessElementResponse callProcessPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException + public NoteElementResponse callMyNoteElementPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException { - ProcessElementResponse restResult = this.callPostRESTCall(methodName, ProcessElementResponse.class, urlTemplate, requestBody, params); + NoteElementResponse restResult = this.callPostRESTCall(methodName, NoteElementResponse.class, urlTemplate, requestBody, params); exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); @@ -1300,7 +850,7 @@ public ProcessElementResponse callProcessPostRESTCall(String methodName, /** - * Issue a POST REST call that returns a ProcessElementsResponse object. + * Issue a POST REST call that returns a GlossaryElementResponse object. * * @param methodName name of the method being called. * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. @@ -1312,14 +862,14 @@ public ProcessElementResponse callProcessPostRESTCall(String methodName, * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException the repository is not available or not working properly. */ - public ProcessElementsResponse callProcessesPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException + public GlossaryElementResponse callMyGlossaryPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException { - ProcessElementsResponse restResult = this.callPostRESTCall(methodName, ProcessElementsResponse.class, urlTemplate, requestBody, params); + GlossaryElementResponse restResult = this.callPostRESTCall(methodName, GlossaryElementResponse.class, urlTemplate, requestBody, params); exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); @@ -1328,7 +878,7 @@ public ProcessElementsResponse callProcessesPostRESTCall(String methodName, /** - * Issue a POST REST call that returns a SchemaAttributeElementResponse object. + * Issue a POST REST call that returns a GlossaryElementsResponse object. * * @param methodName name of the method being called. * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. @@ -1340,14 +890,14 @@ public ProcessElementsResponse callProcessesPostRESTCall(String methodName, * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException the repository is not available or not working properly. */ - public SchemaAttributeElementResponse callSchemaAttributePostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException + public GlossaryElementsResponse callMyGlossariesPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException { - SchemaAttributeElementResponse restResult = this.callPostRESTCall(methodName, SchemaAttributeElementResponse.class, urlTemplate, requestBody, params); + GlossaryElementsResponse restResult = this.callPostRESTCall(methodName, GlossaryElementsResponse.class, urlTemplate, requestBody, params); exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); @@ -1356,26 +906,26 @@ public SchemaAttributeElementResponse callSchemaAttributePostRESTCall(String /** - * Issue a POST REST call that returns a SchemaAttributeElementsResponse object. + * Issue a POST REST call that returns a GlossaryCategoryElementResponse object. * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. + * @param methodName name of the method being called + * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters * @param requestBody object that passes additional parameters - * @param params a list of parameters that are slotted into the url template. + * @param params a list of parameters that are slotted into the url template * * @return response object * @throws InvalidParameterException one of the parameters is invalid. * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException the repository is not available or not working properly. */ - public SchemaAttributeElementsResponse callSchemaAttributesPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException + public GlossaryCategoryElementResponse callMyGlossaryCategoryPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException { - SchemaAttributeElementsResponse restResult = this.callPostRESTCall(methodName, SchemaAttributeElementsResponse.class, urlTemplate, requestBody, params); + GlossaryCategoryElementResponse restResult = this.callPostRESTCall(methodName, GlossaryCategoryElementResponse.class, urlTemplate, requestBody, params); exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); @@ -1384,7 +934,7 @@ public SchemaAttributeElementsResponse callSchemaAttributesPostRESTCall(String /** - * Issue a POST REST call that returns a SchemaTypeElementResponse object. + * Issue a POST REST call that returns a GlossaryCategoryElementsResponse object. * * @param methodName name of the method being called. * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. @@ -1396,14 +946,14 @@ public SchemaAttributeElementsResponse callSchemaAttributesPostRESTCall(String * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException the repository is not available or not working properly. */ - public SchemaTypeElementResponse callSchemaTypePostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException + public GlossaryCategoryElementsResponse callMyGlossaryCategoriesPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException { - SchemaTypeElementResponse restResult = this.callPostRESTCall(methodName, SchemaTypeElementResponse.class, urlTemplate, requestBody, params); + GlossaryCategoryElementsResponse restResult = this.callPostRESTCall(methodName, GlossaryCategoryElementsResponse.class, urlTemplate, requestBody, params); exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); @@ -1412,7 +962,7 @@ public SchemaTypeElementResponse callSchemaTypePostRESTCall(String methodName /** - * Issue a POST REST call that returns a SchemaTypeElementsResponse object. + * Issue a POST REST call that returns a GlossaryTermElementResponse object. * * @param methodName name of the method being called. * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. @@ -1424,14 +974,14 @@ public SchemaTypeElementResponse callSchemaTypePostRESTCall(String methodName * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException the repository is not available or not working properly. */ - public SchemaTypeElementsResponse callSchemaTypesPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException + public GlossaryTermElementResponse callMyGlossaryTermPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException { - SchemaTypeElementsResponse restResult = this.callPostRESTCall(methodName, SchemaTypeElementsResponse.class, urlTemplate, requestBody, params); + GlossaryTermElementResponse restResult = this.callPostRESTCall(methodName, GlossaryTermElementResponse.class, urlTemplate, requestBody, params); exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); @@ -1440,7 +990,7 @@ public SchemaTypeElementsResponse callSchemaTypesPostRESTCall(String methodNa /** - * Issue a POST REST call that returns a RelationshipElementResponse object. + * Issue a POST REST call that returns a GlossaryTermElementsResponse object. * * @param methodName name of the method being called. * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. @@ -1452,14 +1002,14 @@ public SchemaTypeElementsResponse callSchemaTypesPostRESTCall(String methodNa * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException the repository is not available or not working properly. */ - public RelationshipElementResponse callRelationshipPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException + public GlossaryTermElementsResponse callMyGlossaryTermsPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException { - RelationshipElementResponse restResult = this.callPostRESTCall(methodName, RelationshipElementResponse.class, urlTemplate, requestBody, params); + GlossaryTermElementsResponse restResult = this.callPostRESTCall(methodName, GlossaryTermElementsResponse.class, urlTemplate, requestBody, params); exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); @@ -1468,7 +1018,7 @@ public RelationshipElementResponse callRelationshipPostRESTCall(String method /** - * Issue a POST REST call that returns a RelationshipElementsResponse object. + * Issue a POST REST call that returns a ExternalGlossaryLinkElementsResponse object. * * @param methodName name of the method being called. * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. @@ -1480,14 +1030,18 @@ public RelationshipElementResponse callRelationshipPostRESTCall(String method * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException the repository is not available or not working properly. */ - public RelationshipElementsResponse callRelationshipsPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException + public ExternalGlossaryLinkElementsResponse callMyExternalGlossaryLinksPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException { - RelationshipElementsResponse restResult = this.callPostRESTCall(methodName, RelationshipElementsResponse.class, urlTemplate, requestBody, params); + ExternalGlossaryLinkElementsResponse restResult = this.callPostRESTCall(methodName, + ExternalGlossaryLinkElementsResponse.class, + urlTemplate, + requestBody, + params); exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); @@ -1495,9 +1049,8 @@ public RelationshipElementsResponse callRelationshipsPostRESTCall(String meth } - /** - * Issue a POST REST call that returns a DataFlowElementResponse object. + * Issue a POST REST call that returns a MetadataCorrelationHeadersResponse object. * * @param methodName name of the method being called. * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. @@ -1509,14 +1062,14 @@ public RelationshipElementsResponse callRelationshipsPostRESTCall(String meth * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException the repository is not available or not working properly. */ - public DataFlowElementResponse callDataFlowPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException + public MetadataCorrelationHeadersResponse callMyCorrelationHeadersPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException { - DataFlowElementResponse restResult = this.callPostRESTCall(methodName, DataFlowElementResponse.class, urlTemplate, requestBody, params); + MetadataCorrelationHeadersResponse restResult = this.callPostRESTCall(methodName, MetadataCorrelationHeadersResponse.class, urlTemplate, requestBody, params); exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); @@ -1525,7 +1078,7 @@ public DataFlowElementResponse callDataFlowPostRESTCall(String methodName, /** - * Issue a POST REST call that returns a DataFlowElementsResponse object. + * Issue a POST REST call that returns a DataAssetElementResponse object. * * @param methodName name of the method being called. * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. @@ -1537,14 +1090,14 @@ public DataFlowElementResponse callDataFlowPostRESTCall(String methodName, * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException the repository is not available or not working properly. */ - public DataFlowElementsResponse callDataFlowsPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException + public DataAssetElementResponse callMyDataAssetPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException { - DataFlowElementsResponse restResult = this.callPostRESTCall(methodName, DataFlowElementsResponse.class, urlTemplate, requestBody, params); + DataAssetElementResponse restResult = this.callPostRESTCall(methodName, DataAssetElementResponse.class, urlTemplate, requestBody, params); exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); @@ -1553,7 +1106,7 @@ public DataFlowElementsResponse callDataFlowsPostRESTCall(String methodName, /** - * Issue a POST REST call that returns a ControlFlowElementResponse object. + * Issue a POST REST call that returns a DataAssetElementsResponse object. * * @param methodName name of the method being called. * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. @@ -1565,14 +1118,14 @@ public DataFlowElementsResponse callDataFlowsPostRESTCall(String methodName, * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException the repository is not available or not working properly. */ - public ControlFlowElementResponse callControlFlowPostRESTCall(String methodName, + public DataAssetElementsResponse callMyDataAssetsPostRESTCall(String methodName, String urlTemplate, Object requestBody, Object... params) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - ControlFlowElementResponse restResult = this.callPostRESTCall(methodName, ControlFlowElementResponse.class, urlTemplate, requestBody, params); + DataAssetElementsResponse restResult = this.callPostRESTCall(methodName, DataAssetElementsResponse.class, urlTemplate, requestBody, params); exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); @@ -1581,7 +1134,7 @@ public ControlFlowElementResponse callControlFlowPostRESTCall(String methodNa /** - * Issue a POST REST call that returns a ControlFlowElementsResponse object. + * Issue a POST REST call that returns a AssetsResponse object. * * @param methodName name of the method being called. * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. @@ -1593,14 +1146,14 @@ public ControlFlowElementResponse callControlFlowPostRESTCall(String methodNa * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException the repository is not available or not working properly. */ - public ControlFlowElementsResponse callControlFlowsPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException + public AssetElementsResponse callMyAssetsPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException { - ControlFlowElementsResponse restResult = this.callPostRESTCall(methodName, ControlFlowElementsResponse.class, urlTemplate, requestBody, params); + AssetElementsResponse restResult = this.callPostRESTCall(methodName, AssetElementsResponse.class, urlTemplate, requestBody, params); exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); @@ -1608,8 +1161,9 @@ public ControlFlowElementsResponse callControlFlowsPostRESTCall(String method } + /** - * Issue a POST REST call that returns a ProcessCallElementResponse object. + * Issue a POST REST call that returns a PortElementResponse object. * * @param methodName name of the method being called. * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. @@ -1621,14 +1175,14 @@ public ControlFlowElementsResponse callControlFlowsPostRESTCall(String method * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException the repository is not available or not working properly. */ - public ProcessCallElementResponse callProcessCallPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException + public PortElementResponse callMyPortPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException { - ProcessCallElementResponse restResult = this.callPostRESTCall(methodName, ProcessCallElementResponse.class, urlTemplate, requestBody, params); + PortElementResponse restResult = this.callPostRESTCall(methodName, PortElementResponse.class, urlTemplate, requestBody, params); exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); @@ -1637,7 +1191,7 @@ public ProcessCallElementResponse callProcessCallPostRESTCall(String methodNa /** - * Issue a POST REST call that returns a ProcessCallElementsResponse object. + * Issue a POST REST call that returns a PortElementsResponse object. * * @param methodName name of the method being called. * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. @@ -1649,14 +1203,14 @@ public ProcessCallElementResponse callProcessCallPostRESTCall(String methodNa * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException the repository is not available or not working properly. */ - public ProcessCallElementsResponse callProcessCallsPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException + public PortElementsResponse callMyPortsPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException { - ProcessCallElementsResponse restResult = this.callPostRESTCall(methodName, ProcessCallElementsResponse.class, urlTemplate, requestBody, params); + PortElementsResponse restResult = this.callPostRESTCall(methodName, PortElementsResponse.class, urlTemplate, requestBody, params); exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); @@ -1665,7 +1219,7 @@ public ProcessCallElementsResponse callProcessCallsPostRESTCall(String method /** - * Issue a POST REST call that returns a LineageMappingElementResponse object. + * Issue a POST REST call that returns a ProcessElementResponse object. * * @param methodName name of the method being called. * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. @@ -1677,14 +1231,14 @@ public ProcessCallElementsResponse callProcessCallsPostRESTCall(String method * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException the repository is not available or not working properly. */ - public LineageMappingElementResponse callLineageMappingPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException + public ProcessElementResponse callMyProcessPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException { - LineageMappingElementResponse restResult = this.callPostRESTCall(methodName, LineageMappingElementResponse.class, urlTemplate, requestBody, params); + ProcessElementResponse restResult = this.callPostRESTCall(methodName, ProcessElementResponse.class, urlTemplate, requestBody, params); exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); @@ -1693,7 +1247,7 @@ public LineageMappingElementResponse callLineageMappingPostRESTCall(String me /** - * Issue a POST REST call that returns a LineageMappingElementsResponse object. + * Issue a POST REST call that returns a ProcessElementsResponse object. * * @param methodName name of the method being called. * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. @@ -1705,14 +1259,14 @@ public LineageMappingElementResponse callLineageMappingPostRESTCall(String me * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException the repository is not available or not working properly. */ - public LineageMappingElementsResponse callLineageMappingsPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException + public ProcessElementsResponse callMyProcessesPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException { - LineageMappingElementsResponse restResult = this.callPostRESTCall(methodName, LineageMappingElementsResponse.class, urlTemplate, requestBody, params); + ProcessElementsResponse restResult = this.callPostRESTCall(methodName, ProcessElementsResponse.class, urlTemplate, requestBody, params); exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/AssetConverter.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/AssetConverter.java index 6b2214bba6c..4b907b8fb35 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/AssetConverter.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/AssetConverter.java @@ -3,8 +3,8 @@ package org.odpi.openmetadata.accessservices.assetmanager.converters; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.DataAssetElement; -import org.odpi.openmetadata.accessservices.assetmanager.properties.DataAssetProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.DataAssetProperties; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; @@ -58,9 +58,8 @@ public B getNewBean(Class beanClass, */ B returnBean = beanClass.getDeclaredConstructor().newInstance(); - if (returnBean instanceof DataAssetElement) + if (returnBean instanceof DataAssetElement bean) { - DataAssetElement bean = (DataAssetElement) returnBean; DataAssetProperties assetProperties = new DataAssetProperties(); if (entity != null) @@ -74,9 +73,10 @@ public B getNewBean(Class beanClass, assetProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); assetProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); - assetProperties.setTechnicalName(this.removeName(instanceProperties)); + assetProperties.setName(this.removeName(instanceProperties)); + assetProperties.setResourceName(this.removeResourceName(instanceProperties)); assetProperties.setVersionIdentifier(this.removeVersionIdentifier(instanceProperties)); - assetProperties.setTechnicalDescription(this.removeDescription(instanceProperties)); + assetProperties.setResourceDescription(this.removeDescription(instanceProperties)); /* * Any remaining properties are returned in the extended properties. They are diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/AssetManagerConverter.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/AssetManagerConverter.java index d43f497769d..8ba75c5aebf 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/AssetManagerConverter.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/AssetManagerConverter.java @@ -3,7 +3,7 @@ package org.odpi.openmetadata.accessservices.assetmanager.converters; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.SoftwareCapabilityElement; -import org.odpi.openmetadata.accessservices.assetmanager.properties.AssetManagerProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities.AssetManagerProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; @@ -68,8 +68,8 @@ public B getNewBean(Class beanClass, assetManagerProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); assetManagerProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); - assetManagerProperties.setTechnicalName(this.removeName(instanceProperties)); - assetManagerProperties.setTechnicalDescription(this.removeDescription(instanceProperties)); + assetManagerProperties.setResourceName(this.removeName(instanceProperties)); + assetManagerProperties.setResourceDescription(this.removeDescription(instanceProperties)); assetManagerProperties.setDeployedImplementationType(this.removeCapabilityType(instanceProperties)); assetManagerProperties.setVersion(this.removeCapabilityVersion(instanceProperties)); assetManagerProperties.setPatchLevel(this.removePatchLevel(instanceProperties)); diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/AssetManagerOMASConverter.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/AssetManagerOMASConverter.java index cbbad0d8957..5c0a70371d9 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/AssetManagerOMASConverter.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/AssetManagerOMASConverter.java @@ -2,19 +2,7 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.assetmanager.converters; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.RelatedElement; -import org.odpi.openmetadata.accessservices.assetmanager.properties.*; -import org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericConverter; -import org.odpi.openmetadata.frameworks.openmetadata.enums.DataItemSortOrder; -import org.odpi.openmetadata.frameworks.openmetadata.enums.KeyPattern; -import org.odpi.openmetadata.frameworks.openmetadata.enums.PermittedSynchronization; -import org.odpi.openmetadata.frameworks.openmetadata.enums.PortType; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.*; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; +import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; @@ -24,7 +12,7 @@ * class from within a generic is a little involved. This class provides the generic method for creating * and initializing an Asset Manager bean. */ -public abstract class AssetManagerOMASConverter extends OpenMetadataAPIGenericConverter +public abstract class AssetManagerOMASConverter extends OMFConverter { /** * Constructor @@ -41,180 +29,4 @@ public AssetManagerOMASConverter(OMRSRepositoryHelper repositoryHelper, } - /*=============================== - * Methods to fill out headers and enums - */ - - /** - * Using the supplied instances, return a new instance of a relatedElement bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - public RelatedElement getRelatedElement(Class beanClass, - EntityDetail entity, - Relationship relationship, - String methodName) throws PropertyServerException - { - RelatedElement relatedElement = new RelatedElement(); - - relatedElement.setRelationshipHeader(this.getMetadataElementHeader(beanClass, relationship, null, methodName)); - - if (relationship != null) - { - InstanceProperties instanceProperties = new InstanceProperties(relationship.getProperties()); - - RelationshipProperties relationshipProperties = new RelationshipProperties(); - - relationshipProperties.setEffectiveFrom(instanceProperties.getEffectiveFromTime()); - relationshipProperties.setEffectiveTo(instanceProperties.getEffectiveToTime()); - relationshipProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - - relatedElement.setRelationshipProperties(relationshipProperties); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.RELATIONSHIP_DEF, methodName); - } - - - if (entity != null) - { - ElementStub elementStub = this.getElementStub(beanClass, entity, methodName); - - relatedElement.setRelatedElement(elementStub); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - - return relatedElement; - } - - - - /** - * Extract and delete the sortOrder property from the supplied instance properties. - * - * @param instanceProperties properties from entity - * @return DataItemSortOrder enum - */ - DataItemSortOrder removeSortOrder(InstanceProperties instanceProperties) - { - final String methodName = "removeSortOrder"; - - if (instanceProperties != null) - { - int ordinal = repositoryHelper.removeEnumPropertyOrdinal(serviceName, - OpenMetadataProperty.SORT_ORDER.name, - instanceProperties, - methodName); - - for (DataItemSortOrder dataItemSortOrder : DataItemSortOrder.values()) - { - if (dataItemSortOrder.getOrdinal() == ordinal) - { - return dataItemSortOrder; - } - } - } - - return DataItemSortOrder.UNSORTED; - } - - - /** - * Extract and delete the keyPattern property from the supplied instance properties. - * - * @param instanceProperties properties from entity - * @return KeyPattern enum - */ - KeyPattern removeKeyPattern(InstanceProperties instanceProperties) - { - final String methodName = "removeKeyPattern"; - - if (instanceProperties != null) - { - int ordinal = repositoryHelper.removeEnumPropertyOrdinal(serviceName, - OpenMetadataProperty.KEY_PATTERN.name, - instanceProperties, - methodName); - - for (KeyPattern keyPattern : KeyPattern.values()) - { - if (keyPattern.getOrdinal() == ordinal) - { - return keyPattern; - } - } - } - - return KeyPattern.LOCAL_KEY; - } - - - /** - * Extract and delete the permittedSynchronization property from the supplied instance properties. - * - * @param instanceProperties properties from entity - * @return PermittedSynchronization enum - */ - PermittedSynchronization removePermittedSynchronization(InstanceProperties instanceProperties) - { - final String methodName = "removePermittedSynchronization"; - - if (instanceProperties != null) - { - int ordinal = repositoryHelper.removeEnumPropertyOrdinal(serviceName, - OpenMetadataProperty.PERMITTED_SYNCHRONIZATION.name, - instanceProperties, - methodName); - - for (PermittedSynchronization permittedSynchronization : PermittedSynchronization.values()) - { - if (permittedSynchronization.getOrdinal() == ordinal) - { - return permittedSynchronization; - } - } - } - - return PermittedSynchronization.BOTH_DIRECTIONS; - } - - - /** - * Extract and delete the portType property from the supplied instance properties. - * - * @param instanceProperties properties from entity - * @return PortType enum - */ - PortType removePortType(InstanceProperties instanceProperties) - { - final String methodName = "removePortType"; - - if (instanceProperties != null) - { - int ordinal = repositoryHelper.removeEnumPropertyOrdinal(serviceName, - OpenMetadataType.PORT_TYPE_PROPERTY_NAME, - instanceProperties, - methodName); - - for (PortType portType : PortType.values()) - { - if (portType.getOpenTypeOrdinal() == ordinal) - { - return portType; - } - } - } - - return PortType.OTHER; - } } diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/CommentConverter.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/CommentConverter.java deleted file mode 100644 index 9d10094a1c4..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/CommentConverter.java +++ /dev/null @@ -1,211 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetmanager.converters; - -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.FeedbackTargetElement; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.CommentElement; -import org.odpi.openmetadata.accessservices.assetmanager.properties.CommentProperties; -import org.odpi.openmetadata.frameworks.openmetadata.enums.CommentType; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EnumPropertyValue; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstancePropertyValue; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; -import java.util.Map; - - -/** - * CommentConverter provides common methods for transferring relevant properties from an Open Metadata Repository Services (OMRS) - * EntityDetail object into an CommentElement bean. - */ -public class CommentConverter extends AssetManagerOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public CommentConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - Relationship relationship, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof CommentElement) - { - CommentElement bean = (CommentElement) returnBean; - CommentProperties properties = new CommentProperties(); - - bean.setElementHeader(super.getMetadataElementHeader(beanClass, entity, methodName)); - - InstanceProperties instanceProperties; - - /* - * The initial set of values come from the entity. - */ - if (entity != null) - { - instanceProperties = new InstanceProperties(entity.getProperties()); - properties.setUser(entity.getCreatedBy()); - - properties.setQualifiedName(this.removeQualifiedName(instanceProperties)); - properties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); - properties.setCommentText(this.removeCommentText(instanceProperties)); - properties.setCommentType(this.removeCommentTypeFromProperties(instanceProperties)); - - /* - * Any remaining properties are returned in the extended properties. They are - * assumed to be defined in a subtype. - */ - properties.setTypeName(bean.getElementHeader().getType().getTypeName()); - properties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - - bean.setProperties(properties); - - if (relationship != null) - { - FeedbackTargetElement feedbackTargetElement = new FeedbackTargetElement(); - - instanceProperties = new InstanceProperties(relationship.getProperties()); - - feedbackTargetElement.setRelationshipHeader(super.getMetadataElementHeader(beanClass, relationship, null, methodName)); - feedbackTargetElement.setRelatedElement(super.getElementStub(beanClass, relationship.getEntityOneProxy(), methodName)); - feedbackTargetElement.setIsPublic(this.getIsPublic(instanceProperties)); - - bean.setFeedbackTargetElement(feedbackTargetElement); - } - - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - String methodName) throws PropertyServerException - { - return getNewBean(beanClass, entity, null, methodName); - } - - - /** - * Retrieve and delete the CommentType enum property from the instance properties of an entity - * - * @param properties entity properties - * @return CommentType enum value - */ - private CommentType removeCommentTypeFromProperties(InstanceProperties properties) - { - CommentType commentType = this.getCommentTypeFromProperties(properties); - - if (properties != null) - { - Map instancePropertiesMap = properties.getInstanceProperties(); - - if (instancePropertiesMap != null) - { - instancePropertiesMap.remove(OpenMetadataProperty.COMMENT_TYPE.name); - } - - properties.setInstanceProperties(instancePropertiesMap); - } - - return commentType; - } - - - /** - * Retrieve the CommentType enum property from the instance properties of an entity - * - * @param properties entity properties - * @return CommentType enum value - */ - private CommentType getCommentTypeFromProperties(InstanceProperties properties) - { - CommentType commentType = CommentType.STANDARD_COMMENT; - - if (properties != null) - { - Map instancePropertiesMap = properties.getInstanceProperties(); - - if (instancePropertiesMap != null) - { - InstancePropertyValue instancePropertyValue = instancePropertiesMap.get(OpenMetadataProperty.COMMENT_TYPE.name); - - if (instancePropertyValue instanceof EnumPropertyValue enumPropertyValue) - { - commentType = switch (enumPropertyValue.getOrdinal()) - { - case 0 -> CommentType.STANDARD_COMMENT; - case 1 -> CommentType.QUESTION; - case 2 -> CommentType.ANSWER; - case 3 -> CommentType.SUGGESTION; - case 4 -> CommentType.USAGE_EXPERIENCE; - case 99 -> CommentType.OTHER; - default -> commentType; - }; - } - } - } - - return commentType; - } -} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/ConnectionConverter.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/ConnectionConverter.java index 0c7746c6fad..ab75bf730e2 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/ConnectionConverter.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/ConnectionConverter.java @@ -3,8 +3,8 @@ package org.odpi.openmetadata.accessservices.assetmanager.converters; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.ConnectionElement; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.EmbeddedConnection; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ConnectionProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.EmbeddedConnection; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.ConnectionProperties; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; @@ -18,7 +18,7 @@ import java.util.List; /** - * ConnectionConverter transfers the relevant properties from some Open Metadata Repository Services (OMRS) + * OCFConnectionConverter transfers the relevant properties from some Open Metadata Repository Services (OMRS) * EntityDetail and Relationship objects into a Connection bean (or a VirtualConnection bean). */ public class ConnectionConverter extends AssetManagerOMASConverter @@ -66,9 +66,8 @@ public B getNewComplexBean(Class beanClass, */ B returnBean = beanClass.getDeclaredConstructor().newInstance(); - if (returnBean instanceof ConnectionElement) + if (returnBean instanceof ConnectionElement bean) { - ConnectionElement bean = (ConnectionElement) returnBean; ConnectionProperties connectionProperties = new ConnectionProperties(); if (primaryEntity != null) diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/ConnectorTypeConverter.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/ConnectorTypeConverter.java index b0f35307308..7cd24397d0b 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/ConnectorTypeConverter.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/ConnectorTypeConverter.java @@ -3,8 +3,8 @@ package org.odpi.openmetadata.accessservices.assetmanager.converters; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.ConnectorTypeElement; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ConnectorTypeProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.ConnectorTypeProperties; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/ControlFlowConverter.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/ControlFlowConverter.java index 8c8ddf2349c..95dcc0b2569 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/ControlFlowConverter.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/ControlFlowConverter.java @@ -2,9 +2,9 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.assetmanager.converters; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.ControlFlowElement; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ControlFlowProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ControlFlowElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.lineage.ControlFlowProperties; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityProxy; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; @@ -57,9 +57,8 @@ public B getNewRelationshipBean(Class beanClass, */ B returnBean = beanClass.getDeclaredConstructor().newInstance(); - if (returnBean instanceof ControlFlowElement) + if (returnBean instanceof ControlFlowElement bean) { - ControlFlowElement bean = (ControlFlowElement) returnBean; ControlFlowProperties controlFlowProperties = new ControlFlowProperties(); if (relationship != null) diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/DataFlowConverter.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/DataFlowConverter.java index 22c04eb1655..21c4fb5178d 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/DataFlowConverter.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/DataFlowConverter.java @@ -2,9 +2,9 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.assetmanager.converters; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.DataFlowElement; -import org.odpi.openmetadata.accessservices.assetmanager.properties.DataFlowProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.DataFlowElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.lineage.DataFlowProperties; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityProxy; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; @@ -57,9 +57,8 @@ public B getNewRelationshipBean(Class beanClass, */ B returnBean = beanClass.getDeclaredConstructor().newInstance(); - if (returnBean instanceof DataFlowElement) + if (returnBean instanceof DataFlowElement bean) { - DataFlowElement bean = (DataFlowElement) returnBean; DataFlowProperties dataFlowProperties = new DataFlowProperties(); if (relationship != null) diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/ElementHeaderConverter.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/ElementHeaderConverter.java index dfaa1fbc763..e70fc61fc66 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/ElementHeaderConverter.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/ElementHeaderConverter.java @@ -3,7 +3,7 @@ package org.odpi.openmetadata.accessservices.assetmanager.converters; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityProxy; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/ElementStubConverter.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/ElementStubConverter.java index afdf7ff2569..36024f2fad0 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/ElementStubConverter.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/ElementStubConverter.java @@ -4,7 +4,7 @@ import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementStub; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityProxy; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/EndpointConverter.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/EndpointConverter.java index fad6eec0457..aacbe678c2b 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/EndpointConverter.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/EndpointConverter.java @@ -3,8 +3,8 @@ package org.odpi.openmetadata.accessservices.assetmanager.converters; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.EndpointElement; -import org.odpi.openmetadata.accessservices.assetmanager.properties.EndpointProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.EndpointProperties; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; @@ -56,9 +56,8 @@ public B getNewBean(Class beanClass, */ B returnBean = beanClass.getDeclaredConstructor().newInstance(); - if (returnBean instanceof EndpointElement) + if (returnBean instanceof EndpointElement bean) { - EndpointElement bean = (EndpointElement) returnBean; EndpointProperties endpointProperties = new EndpointProperties(); if (entity != null) @@ -72,8 +71,8 @@ public B getNewBean(Class beanClass, endpointProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); endpointProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); - endpointProperties.setTechnicalName(this.removeName(instanceProperties)); - endpointProperties.setTechnicalDescription(this.removeDescription(instanceProperties)); + endpointProperties.setName(this.removeName(instanceProperties)); + endpointProperties.setResourceDescription(this.removeDescription(instanceProperties)); endpointProperties.setAddress(this.removeNetworkAddress(instanceProperties)); endpointProperties.setProtocol(this.removeProtocol(instanceProperties)); endpointProperties.setEncryptionMethod(this.removeEncryptionMethod(instanceProperties)); diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/ExternalReferenceConverter.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/ExternalReferenceConverter.java index 1a660977507..d55b0293354 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/ExternalReferenceConverter.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/ExternalReferenceConverter.java @@ -3,10 +3,8 @@ package org.odpi.openmetadata.accessservices.assetmanager.converters; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.ExternalReferenceElement; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.ExternalReferenceLinkElement; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ExternalReferenceProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ExternalReferenceLinkProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; +import org.odpi.openmetadata.frameworks.openmetadata.properties.externalreferences.ExternalReferenceProperties; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; @@ -58,9 +56,8 @@ public B getNewBean(Class beanClass, */ B returnBean = beanClass.getDeclaredConstructor().newInstance(); - if (returnBean instanceof ExternalReferenceElement) + if (returnBean instanceof ExternalReferenceElement bean) { - ExternalReferenceElement bean = (ExternalReferenceElement) returnBean; ExternalReferenceProperties externalReferenceProperties = new ExternalReferenceProperties(); if (entity != null) @@ -75,8 +72,8 @@ public B getNewBean(Class beanClass, externalReferenceProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); externalReferenceProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); externalReferenceProperties.setDisplayName(this.removeDisplayName(instanceProperties)); - externalReferenceProperties.setDescription(this.removeDescription(instanceProperties)); - externalReferenceProperties.setUrl(this.removeURL(instanceProperties)); + externalReferenceProperties.setResourceDescription(this.removeDescription(instanceProperties)); + externalReferenceProperties.setURI(this.removeURL(instanceProperties)); externalReferenceProperties.setVersion(this.removeReferenceVersion(instanceProperties)); externalReferenceProperties.setOrganization(this.removeOwningOrganization(instanceProperties)); diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/ExternalReferenceLinkConverter.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/ExternalReferenceLinkConverter.java index 141d1455d9f..406cb07ad3b 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/ExternalReferenceLinkConverter.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/ExternalReferenceLinkConverter.java @@ -3,9 +3,9 @@ package org.odpi.openmetadata.accessservices.assetmanager.converters; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.ExternalReferenceLinkElement; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ExternalReferenceLinkProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ExternalReferenceProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; +import org.odpi.openmetadata.frameworks.openmetadata.properties.externalreferences.ExternalReferenceLinkProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.externalreferences.ExternalReferenceProperties; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; @@ -78,9 +78,8 @@ public B getNewBean(Class beanClass, */ B returnBean = beanClass.getDeclaredConstructor().newInstance(); - if (returnBean instanceof ExternalReferenceLinkElement) + if (returnBean instanceof ExternalReferenceLinkElement bean) { - ExternalReferenceLinkElement bean = (ExternalReferenceLinkElement) returnBean; ExternalReferenceProperties externalReferenceProperties = new ExternalReferenceProperties(); ExternalReferenceLinkProperties linkProperties = new ExternalReferenceLinkProperties(); @@ -96,8 +95,8 @@ public B getNewBean(Class beanClass, externalReferenceProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); externalReferenceProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); externalReferenceProperties.setDisplayName(this.removeDisplayName(instanceProperties)); - externalReferenceProperties.setDescription(this.removeDescription(instanceProperties)); - externalReferenceProperties.setUrl(this.removeURL(instanceProperties)); + externalReferenceProperties.setResourceDescription(this.removeDescription(instanceProperties)); + externalReferenceProperties.setResourceDescription(this.removeURL(instanceProperties)); externalReferenceProperties.setVersion(this.removeReferenceVersion(instanceProperties)); externalReferenceProperties.setOrganization(this.removeOwningOrganization(instanceProperties)); diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/GlossaryCategoryConverter.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/GlossaryCategoryConverter.java index 6832acf6591..c179105df70 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/GlossaryCategoryConverter.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/GlossaryCategoryConverter.java @@ -4,7 +4,7 @@ import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.GlossaryCategoryElement; -import org.odpi.openmetadata.accessservices.assetmanager.properties.GlossaryCategoryProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.glossaries.GlossaryCategoryProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/GlossaryConverter.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/GlossaryConverter.java index 160afb489ce..a71a05c4b97 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/GlossaryConverter.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/GlossaryConverter.java @@ -3,7 +3,7 @@ package org.odpi.openmetadata.accessservices.assetmanager.converters; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.GlossaryElement; -import org.odpi.openmetadata.accessservices.assetmanager.properties.GlossaryProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.glossaries.GlossaryProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.*; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/GlossaryTermConverter.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/GlossaryTermConverter.java index e1574c4ed00..63584ddafed 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/GlossaryTermConverter.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/GlossaryTermConverter.java @@ -2,12 +2,11 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.assetmanager.converters; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.FeedbackTargetElement; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.GlossaryTermElement; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.RelatedElement; -import org.odpi.openmetadata.accessservices.assetmanager.properties.GlossaryTermProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.RelationshipProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.RelatedElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.glossaries.GlossaryTermProperties; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; @@ -80,9 +79,8 @@ public B getNewBean(Class beanClass, */ B returnBean = beanClass.getDeclaredConstructor().newInstance(); - if (returnBean instanceof GlossaryTermElement) + if (returnBean instanceof GlossaryTermElement bean) { - GlossaryTermElement bean = (GlossaryTermElement) returnBean; if (entity != null) { diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/GovernanceDefinitionConverter.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/GovernanceDefinitionConverter.java index 3c3b316436c..5c14b51154f 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/GovernanceDefinitionConverter.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/GovernanceDefinitionConverter.java @@ -4,8 +4,8 @@ import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.GovernanceDefinitionElement; -import org.odpi.openmetadata.accessservices.assetmanager.properties.GovernanceDefinitionProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.GovernanceDefinitionProperties; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; @@ -75,7 +75,7 @@ public B getNewBean(Class beanClass, */ InstanceProperties instanceProperties = new InstanceProperties(primaryEntity.getProperties()); - String typeName = primaryEntity.getType().getTypeDefName(); + String typeName = primaryEntity.getType().getTypeDefName(); GovernanceDefinitionProperties governanceDefinitionProperties = new GovernanceDefinitionProperties(); governanceDefinitionProperties.setDocumentIdentifier(this.removeQualifiedName(instanceProperties)); diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/InformalTagConverter.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/InformalTagConverter.java deleted file mode 100644 index 88b13d2ea4c..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/InformalTagConverter.java +++ /dev/null @@ -1,134 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetmanager.converters; - -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.FeedbackTargetElement; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.InformalTagElement; -import org.odpi.openmetadata.accessservices.assetmanager.properties.InformalTagProperties; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; - - -/** - * InformalTagConverter provides common methods for transferring relevant properties from an Open Metadata Repository Services (OMRS) - * EntityDetail object into an InformalTagElement bean. - */ -public class InformalTagConverter extends AssetManagerOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public InformalTagConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - Relationship relationship, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof InformalTagElement) - { - InformalTagElement bean = (InformalTagElement) returnBean; - InformalTagProperties properties = new InformalTagProperties(); - - bean.setElementHeader(super.getMetadataElementHeader(beanClass, entity, methodName)); - - InstanceProperties instanceProperties; - - /* - * The initial set of values come from the entity. - */ - if (entity != null) - { - instanceProperties = new InstanceProperties(entity.getProperties()); - properties.setUser(entity.getCreatedBy()); - - properties.setName(this.removeTagName(instanceProperties)); - properties.setDescription(this.removeTagDescription(instanceProperties)); - properties.setIsPrivateTag(! this.removeIsPublic(instanceProperties)); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - - bean.setProperties(properties); - - if (relationship != null) - { - FeedbackTargetElement feedbackTargetElement = new FeedbackTargetElement(); - - instanceProperties = new InstanceProperties(relationship.getProperties()); - - feedbackTargetElement.setRelationshipHeader(super.getMetadataElementHeader(beanClass, relationship, null, methodName)); - feedbackTargetElement.setRelatedElement(super.getElementStub(beanClass, relationship.getEntityOneProxy(), methodName)); - feedbackTargetElement.setIsPublic(this.getIsPublic(instanceProperties)); - - bean.setFeedbackTargetElement(feedbackTargetElement); - } - - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - String methodName) throws PropertyServerException - { - return getNewBean(beanClass, entity, null, methodName); - } -} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/LikeConverter.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/LikeConverter.java deleted file mode 100644 index 8ddfc574708..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/LikeConverter.java +++ /dev/null @@ -1,130 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetmanager.converters; - -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.FeedbackTargetElement; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.LikeElement; -import org.odpi.openmetadata.accessservices.assetmanager.properties.LikeProperties; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; - - -/** - * LikeConverter provides common methods for transferring relevant properties from an Open Metadata Repository Services (OMRS) - * EntityDetail object into an LikeElement bean. - */ -public class LikeConverter extends AssetManagerOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public LikeConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - Relationship relationship, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof LikeElement) - { - LikeElement bean = (LikeElement) returnBean; - LikeProperties properties = new LikeProperties(); - - bean.setElementHeader(super.getMetadataElementHeader(beanClass, entity, methodName)); - - InstanceProperties instanceProperties; - - /* - * The initial set of values come from the entity. - */ - if (entity != null) - { - instanceProperties = new InstanceProperties(entity.getProperties()); - properties.setUser(entity.getCreatedBy()); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - - bean.setProperties(properties); - - if (relationship != null) - { - FeedbackTargetElement feedbackTargetElement = new FeedbackTargetElement(); - - instanceProperties = new InstanceProperties(relationship.getProperties()); - - feedbackTargetElement.setRelationshipHeader(super.getMetadataElementHeader(beanClass, relationship, null, methodName)); - feedbackTargetElement.setRelatedElement(super.getElementStub(beanClass, relationship.getEntityOneProxy(), methodName)); - feedbackTargetElement.setIsPublic(this.getIsPublic(instanceProperties)); - - bean.setFeedbackTargetElement(feedbackTargetElement); - } - - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - String methodName) throws PropertyServerException - { - return getNewBean(beanClass, entity, null, methodName); - } -} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/LineageMappingConverter.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/LineageMappingConverter.java index 7e22e70406f..edebf1cfe30 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/LineageMappingConverter.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/LineageMappingConverter.java @@ -2,11 +2,9 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.assetmanager.converters; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.LineageMappingElement; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.ProcessCallElement; -import org.odpi.openmetadata.accessservices.assetmanager.properties.LineageMappingProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ProcessCallProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.LineageMappingElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.lineage.LineageMappingProperties; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityProxy; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; @@ -59,9 +57,8 @@ public B getNewRelationshipBean(Class beanClass, */ B returnBean = beanClass.getDeclaredConstructor().newInstance(); - if (returnBean instanceof LineageMappingElement) + if (returnBean instanceof LineageMappingElement bean) { - LineageMappingElement bean = (LineageMappingElement) returnBean; LineageMappingProperties lineageMappingProperties = new LineageMappingProperties(); if (relationship != null) diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/NoteConverter.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/NoteConverter.java index 743f13b0d39..99e8fe55edd 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/NoteConverter.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/NoteConverter.java @@ -2,10 +2,10 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.assetmanager.converters; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.FeedbackTargetElement; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.NoteElement; -import org.odpi.openmetadata.accessservices.assetmanager.properties.NoteProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.FeedbackTargetElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.feedback.NoteProperties; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; @@ -60,9 +60,8 @@ public B getNewBean(Class beanClass, */ B returnBean = beanClass.getDeclaredConstructor().newInstance(); - if (returnBean instanceof NoteElement) + if (returnBean instanceof NoteElement bean) { - NoteElement bean = (NoteElement) returnBean; NoteProperties properties = new NoteProperties(); bean.setElementHeader(super.getMetadataElementHeader(beanClass, entity, methodName)); diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/NoteLogConverter.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/NoteLogConverter.java index f1be12d1d3f..05b244e64fc 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/NoteLogConverter.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/NoteLogConverter.java @@ -2,10 +2,10 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.assetmanager.converters; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.FeedbackTargetElement; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.NoteLogElement; -import org.odpi.openmetadata.accessservices.assetmanager.properties.NoteLogProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.FeedbackTargetElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.feedback.NoteLogProperties; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; @@ -60,9 +60,8 @@ public B getNewBean(Class beanClass, */ B returnBean = beanClass.getDeclaredConstructor().newInstance(); - if (returnBean instanceof NoteLogElement) + if (returnBean instanceof NoteLogElement bean) { - NoteLogElement bean = (NoteLogElement) returnBean; NoteLogProperties properties = new NoteLogProperties(); bean.setElementHeader(super.getMetadataElementHeader(beanClass, entity, methodName)); diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/PortConverter.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/PortConverter.java index e5f851a7f93..c1d42700e75 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/PortConverter.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/PortConverter.java @@ -3,8 +3,8 @@ package org.odpi.openmetadata.accessservices.assetmanager.converters; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.PortElement; -import org.odpi.openmetadata.accessservices.assetmanager.properties.PortProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.processes.PortProperties; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/ProcessCallConverter.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/ProcessCallConverter.java index 92c0a474e8c..b0fa5a5e14b 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/ProcessCallConverter.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/ProcessCallConverter.java @@ -2,9 +2,9 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.assetmanager.converters; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.ProcessCallElement; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ProcessCallProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ProcessCallElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.lineage.ProcessCallProperties; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityProxy; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; @@ -57,9 +57,8 @@ public B getNewRelationshipBean(Class beanClass, */ B returnBean = beanClass.getDeclaredConstructor().newInstance(); - if (returnBean instanceof ProcessCallElement) + if (returnBean instanceof ProcessCallElement bean) { - ProcessCallElement bean = (ProcessCallElement) returnBean; ProcessCallProperties processCallProperties = new ProcessCallProperties(); if (relationship != null) diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/ProcessConverter.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/ProcessConverter.java index 95f812cf552..9ba29fa7e5d 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/ProcessConverter.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/ProcessConverter.java @@ -3,8 +3,8 @@ package org.odpi.openmetadata.accessservices.assetmanager.converters; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.ProcessElement; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ProcessProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.processes.ProcessProperties; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; @@ -72,9 +72,10 @@ public B getNewBean(Class beanClass, processProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); processProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); - processProperties.setTechnicalName(this.removeName(instanceProperties)); + processProperties.setName(this.removeName(instanceProperties)); + processProperties.setResourceName(this.removeResourceName(instanceProperties)); processProperties.setVersionIdentifier(this.removeVersionIdentifier(instanceProperties)); - processProperties.setTechnicalDescription(this.removeDescription(instanceProperties)); + processProperties.setResourceDescription(this.removeDescription(instanceProperties)); processProperties.setFormula(this.removeFormula(instanceProperties)); processProperties.setFormulaType(this.removeFormulaType(instanceProperties)); diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/RatingConverter.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/RatingConverter.java deleted file mode 100644 index f79fb0c3e86..00000000000 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/RatingConverter.java +++ /dev/null @@ -1,220 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetmanager.converters; - -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.FeedbackTargetElement; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.RatingElement; -import org.odpi.openmetadata.accessservices.assetmanager.properties.RatingProperties; -import org.odpi.openmetadata.frameworks.openmetadata.enums.StarRating; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EnumPropertyValue; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstancePropertyValue; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; -import java.util.Map; - - -/** - * RatingConverter provides common methods for transferring relevant properties from an Open Metadata Repository Services (OMRS) - * EntityDetail object into an RatingElement bean. - */ -public class RatingConverter extends AssetManagerOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public RatingConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - Relationship relationship, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof RatingElement) - { - RatingElement bean = (RatingElement) returnBean; - RatingProperties properties = new RatingProperties(); - - bean.setElementHeader(super.getMetadataElementHeader(beanClass, entity, methodName)); - - InstanceProperties instanceProperties; - - /* - * The initial set of values come from the entity. - */ - if (entity != null) - { - instanceProperties = new InstanceProperties(entity.getProperties()); - properties.setUser(entity.getCreatedBy()); - - properties.setReview(this.removeReview(instanceProperties)); - properties.setStarRating(this.removeStarRatingFromProperties(instanceProperties)); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - - bean.setProperties(properties); - - if (relationship != null) - { - FeedbackTargetElement feedbackTargetElement = new FeedbackTargetElement(); - - instanceProperties = new InstanceProperties(relationship.getProperties()); - - feedbackTargetElement.setRelationshipHeader(super.getMetadataElementHeader(beanClass, relationship, null, methodName)); - feedbackTargetElement.setRelatedElement(super.getElementStub(beanClass, relationship.getEntityOneProxy(), methodName)); - feedbackTargetElement.setIsPublic(this.getIsPublic(instanceProperties)); - - bean.setFeedbackTargetElement(feedbackTargetElement); - } - - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - String methodName) throws PropertyServerException - { - return getNewBean(beanClass, entity, null, methodName); - } - - - /** - * Retrieve and delete the StarRating enum property from the instance properties of an entity - * - * @param properties entity properties - * @return StarRating enum value - */ - private StarRating removeStarRatingFromProperties(InstanceProperties properties) - { - StarRating starRating = this.getStarRatingFromProperties(properties); - - if (properties != null) - { - Map instancePropertiesMap = properties.getInstanceProperties(); - - if (instancePropertiesMap != null) - { - instancePropertiesMap.remove(OpenMetadataType.STARS_PROPERTY_NAME); - } - - properties.setInstanceProperties(instancePropertiesMap); - } - - return starRating; - } - - - /** - * Retrieve the StarRating enum property from the instance properties of an entity - * - * @param properties entity properties - * @return StarRating enum value - */ - private StarRating getStarRatingFromProperties(InstanceProperties properties) - { - StarRating starRating = StarRating.NOT_RECOMMENDED; - - if (properties != null) - { - Map instancePropertiesMap = properties.getInstanceProperties(); - - if (instancePropertiesMap != null) - { - InstancePropertyValue instancePropertyValue = instancePropertiesMap.get(OpenMetadataType.STARS_PROPERTY_NAME); - - if (instancePropertyValue instanceof EnumPropertyValue) - { - EnumPropertyValue enumPropertyValue = (EnumPropertyValue) instancePropertyValue; - - switch (enumPropertyValue.getOrdinal()) - { - case 0: - starRating = StarRating.NOT_RECOMMENDED; - break; - - case 1: - starRating = StarRating.ONE_STAR; - break; - - case 2: - starRating = StarRating.TWO_STARS; - break; - - case 3: - starRating = StarRating.THREE_STARS; - break; - - case 4: - starRating = StarRating.FOUR_STARS; - break; - - case 99: - starRating = StarRating.FIVE_STARS; - break; - } - } - } - } - - return starRating; - } -} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/SchemaAttributeConverter.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/SchemaAttributeConverter.java index b319babc0dc..a4978e897da 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/SchemaAttributeConverter.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/SchemaAttributeConverter.java @@ -4,8 +4,8 @@ import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.SchemaAttributeElement; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.SchemaTypeElement; -import org.odpi.openmetadata.accessservices.assetmanager.properties.SchemaAttributeProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.SchemaAttributeProperties; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; @@ -65,9 +65,8 @@ public B getNewSchemaAttributeBean(Class beanClass, */ B returnBean = beanClass.getDeclaredConstructor().newInstance(); - if (returnBean instanceof SchemaAttributeElement) + if (returnBean instanceof SchemaAttributeElement bean) { - SchemaAttributeElement bean = (SchemaAttributeElement) returnBean; SchemaAttributeProperties schemaAttributeProperties = new SchemaAttributeProperties(); if (schemaAttributeEntity != null) diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/SchemaTypeConverter.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/SchemaTypeConverter.java index 8334b6a7b3c..508a1c3e2bb 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/SchemaTypeConverter.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/SchemaTypeConverter.java @@ -3,8 +3,8 @@ package org.odpi.openmetadata.accessservices.assetmanager.converters; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.SchemaTypeElement; -import org.odpi.openmetadata.accessservices.assetmanager.properties.DerivedSchemaTypeQueryTargetProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.SchemaTypeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.DerivedSchemaTypeQueryTargetProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.SchemaTypeProperties; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Classification; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/SoftwareCapabilityConverter.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/SoftwareCapabilityConverter.java index 6af5b49c217..70da9557658 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/SoftwareCapabilityConverter.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/converters/SoftwareCapabilityConverter.java @@ -3,8 +3,8 @@ package org.odpi.openmetadata.accessservices.assetmanager.converters; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.SoftwareCapabilityElement; -import org.odpi.openmetadata.accessservices.assetmanager.properties.SoftwareCapabilitiesProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; +import org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities.SoftwareCapabilityProperties; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; @@ -58,7 +58,7 @@ public B getNewBean(Class beanClass, if (returnBean instanceof SoftwareCapabilityElement bean) { - SoftwareCapabilitiesProperties softwareCapabilitiesProperties = new SoftwareCapabilitiesProperties(); + SoftwareCapabilityProperties softwareCapabilitiesProperties = new SoftwareCapabilityProperties(); if (entity != null) { @@ -68,8 +68,8 @@ public B getNewBean(Class beanClass, softwareCapabilitiesProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); softwareCapabilitiesProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); - softwareCapabilitiesProperties.setTechnicalName(this.removeName(instanceProperties)); - softwareCapabilitiesProperties.setTechnicalDescription(this.removeDescription(instanceProperties)); + softwareCapabilitiesProperties.setResourceName(this.removeName(instanceProperties)); + softwareCapabilitiesProperties.setResourceDescription(this.removeDescription(instanceProperties)); softwareCapabilitiesProperties.setDeployedImplementationType(this.removeCapabilityType(instanceProperties)); softwareCapabilitiesProperties.setVersion(this.removeCapabilityVersion(instanceProperties)); softwareCapabilitiesProperties.setPatchLevel(this.removePatchLevel(instanceProperties)); @@ -86,7 +86,7 @@ public B getNewBean(Class beanClass, } else { - handleMissingMetadataInstance(SoftwareCapabilitiesProperties.class.getName(), + handleMissingMetadataInstance(SoftwareCapabilityProperties.class.getName(), TypeDefCategory.ENTITY_DEF, methodName); } diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/handlers/CommentExchangeHandler.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/handlers/CommentExchangeHandler.java index c0654f78d15..e23ef4feaf3 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/handlers/CommentExchangeHandler.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/handlers/CommentExchangeHandler.java @@ -2,14 +2,14 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.assetmanager.handlers; -import org.odpi.openmetadata.accessservices.assetmanager.converters.CommentConverter; +import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.CorrelatedMetadataElement; +import org.odpi.openmetadata.commonservices.generichandlers.CommentConverter; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.CommentElement; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.MetadataElement; -import org.odpi.openmetadata.accessservices.assetmanager.properties.CommentProperties; import org.odpi.openmetadata.frameworks.governanceaction.properties.MetadataCorrelationProperties; import org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler; import org.odpi.openmetadata.commonservices.generichandlers.CommentHandler; import org.odpi.openmetadata.frameworks.openmetadata.enums.CommentType; +import org.odpi.openmetadata.frameworks.openmetadata.properties.feedback.CommentProperties; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.commonservices.repositoryhandler.RepositoryHandler; @@ -117,7 +117,7 @@ private void addCorrelationPropertiesToComments(String userId, { if (results != null) { - for (MetadataElement comment : results) + for (CorrelatedMetadataElement comment : results) { if ((comment != null) && (comment.getElementHeader() != null) && (comment.getElementHeader().getGUID() != null)) { diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/handlers/ConnectionExchangeHandler.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/handlers/ConnectionExchangeHandler.java index 3fa24b01a15..914396773ea 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/handlers/ConnectionExchangeHandler.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/handlers/ConnectionExchangeHandler.java @@ -8,19 +8,19 @@ import org.odpi.openmetadata.accessservices.assetmanager.converters.EndpointConverter; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.ConnectionElement; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.ConnectorTypeElement; +import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.CorrelatedMetadataElement; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.EndpointElement; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.MetadataElement; -import org.odpi.openmetadata.accessservices.assetmanager.properties.AssetConnectionProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ConnectionProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ConnectorTypeProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.EmbeddedConnectionProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.EndpointProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.RelationshipProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.AssetConnectionProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.ConnectionProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.ConnectorTypeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.EmbeddedConnectionProperties; import org.odpi.openmetadata.accessservices.assetmanager.properties.TemplateProperties; import org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler; import org.odpi.openmetadata.commonservices.generichandlers.ConnectionHandler; import org.odpi.openmetadata.commonservices.generichandlers.ConnectorTypeHandler; import org.odpi.openmetadata.commonservices.generichandlers.EndpointHandler; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.EndpointProperties; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.commonservices.repositoryhandler.RepositoryHandler; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; @@ -174,7 +174,7 @@ private void addCorrelationPropertiesToConnections(String userI { if (results != null) { - for (MetadataElement element : results) + for (CorrelatedMetadataElement element : results) { if ((element != null) && (element.getElementHeader() != null) && (element.getElementHeader().getGUID() != null)) { @@ -223,7 +223,7 @@ private void addCorrelationPropertiesToConnectorTypes(String { if ((results != null) && (assetManagerGUID != null)) { - for (MetadataElement element : results) + for (CorrelatedMetadataElement element : results) { if ((element != null) && (element.getElementHeader() != null) && (element.getElementHeader().getGUID() != null)) { @@ -1388,8 +1388,8 @@ public String createEndpoint(String userId, this.getExternalSourceName(correlationProperties, assetManagerIsHome), null, endpointProperties.getQualifiedName(), - endpointProperties.getTechnicalName(), - endpointProperties.getTechnicalDescription(), + endpointProperties.getName(), + endpointProperties.getResourceDescription(), endpointProperties.getAddress(), endpointProperties.getProtocol(), endpointProperties.getEncryptionMethod(), @@ -1539,8 +1539,8 @@ public void updateEndpoint(String userId, endpointGUID, endpointGUIDParameterName, endpointProperties.getQualifiedName(), - endpointProperties.getTechnicalName(), - endpointProperties.getTechnicalDescription(), + endpointProperties.getName(), + endpointProperties.getResourceDescription(), endpointProperties.getAddress(), endpointProperties.getProtocol(), endpointProperties.getEncryptionMethod(), diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/handlers/DataAssetExchangeHandler.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/handlers/DataAssetExchangeHandler.java index f705337a09e..f6c98208932 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/handlers/DataAssetExchangeHandler.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/handlers/DataAssetExchangeHandler.java @@ -12,6 +12,9 @@ import org.odpi.openmetadata.commonservices.generichandlers.AssetHandler; import org.odpi.openmetadata.commonservices.generichandlers.FilesAndFoldersHandler; import org.odpi.openmetadata.frameworks.governanceaction.properties.MetadataCorrelationProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.RelationshipElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.*; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.commonservices.repositoryhandler.RepositoryHandler; @@ -19,7 +22,7 @@ import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; import org.odpi.openmetadata.metadatasecurity.server.OpenMetadataServerSecurityVerifier; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; @@ -254,9 +257,10 @@ public String createDataAsset(String userId, this.getExternalSourceGUID(correlationProperties, assetManagerIsHome), this.getExternalSourceName(correlationProperties, assetManagerIsHome), assetProperties.getQualifiedName(), - assetProperties.getTechnicalName(), + assetProperties.getName(), + assetProperties.getResourceName(), assetProperties.getVersionIdentifier(), - assetProperties.getTechnicalDescription(), + assetProperties.getResourceDescription(), assetProperties.getDeployedImplementationType(), assetProperties.getAdditionalProperties(), typeName, @@ -496,9 +500,10 @@ public void updateDataAsset(String userId, assetGUID, assetGUIDParameterName, assetProperties.getQualifiedName(), - assetProperties.getTechnicalName(), + assetProperties.getName(), + assetProperties.getResourceName(), assetProperties.getVersionIdentifier(), - assetProperties.getTechnicalDescription(), + assetProperties.getResourceDescription(), assetProperties.getDeployedImplementationType(), assetProperties.getAdditionalProperties(), OpenMetadataType.ASSET.typeGUID, diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/handlers/ExchangeHandlerBase.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/handlers/ExchangeHandlerBase.java index ad789d429c7..3da120903a8 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/handlers/ExchangeHandlerBase.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/handlers/ExchangeHandlerBase.java @@ -7,7 +7,6 @@ import org.odpi.openmetadata.accessservices.assetmanager.converters.NoteConverter; import org.odpi.openmetadata.accessservices.assetmanager.converters.NoteLogConverter; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.*; -import org.odpi.openmetadata.accessservices.assetmanager.properties.*; import org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler; import org.odpi.openmetadata.commonservices.generichandlers.*; import org.odpi.openmetadata.commonservices.repositoryhandler.RepositoryHandler; @@ -15,10 +14,12 @@ import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; import org.odpi.openmetadata.frameworks.governanceaction.properties.MetadataCorrelationProperties; import org.odpi.openmetadata.frameworks.openmetadata.enums.KeyPattern; import org.odpi.openmetadata.frameworks.openmetadata.enums.PermittedSynchronization; +import org.odpi.openmetadata.frameworks.openmetadata.properties.SupplementaryProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.DataFieldValuesProperties; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.frameworks.governanceaction.properties.MetadataCorrelationHeader; @@ -528,8 +529,8 @@ void maintainSupplementaryProperties(String userId, elementDomainName, elementQualifiedName, supplementaryProperties.getDisplayName(), - supplementaryProperties.getSummary(), - supplementaryProperties.getDescription(), + supplementaryProperties.getDisplaySummary(), + supplementaryProperties.getDisplayDescription(), supplementaryProperties.getAbbreviation(), supplementaryProperties.getUsage(), isMergeUpdate, @@ -600,14 +601,14 @@ void getSupplementaryProperties(String elementGUID, glossaryEntity.getProperties(), methodName)); - supplementaryProperties.setSummary(repositoryHelper.getStringProperty(serviceName, - OpenMetadataProperty.SUMMARY.name, - glossaryEntity.getProperties(), - methodName)); - supplementaryProperties.setDescription(repositoryHelper.getStringProperty(serviceName, - OpenMetadataProperty.DESCRIPTION.name, - glossaryEntity.getProperties(), - methodName)); + supplementaryProperties.setDisplaySummary(repositoryHelper.getStringProperty(serviceName, + OpenMetadataProperty.SUMMARY.name, + glossaryEntity.getProperties(), + methodName)); + supplementaryProperties.setDisplayDescription(repositoryHelper.getStringProperty(serviceName, + OpenMetadataProperty.DESCRIPTION.name, + glossaryEntity.getProperties(), + methodName)); supplementaryProperties.setAbbreviation(repositoryHelper.getStringProperty(serviceName, OpenMetadataProperty.ABBREVIATION.name, glossaryEntity.getProperties(), diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/handlers/ExternalReferenceExchangeHandler.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/handlers/ExternalReferenceExchangeHandler.java index 92f61543853..6ce2ac37bc9 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/handlers/ExternalReferenceExchangeHandler.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/handlers/ExternalReferenceExchangeHandler.java @@ -5,15 +5,15 @@ import org.odpi.openmetadata.accessservices.assetmanager.converters.ExternalReferenceConverter; import org.odpi.openmetadata.accessservices.assetmanager.converters.ExternalReferenceLinkConverter; +import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.CorrelatedMetadataElement; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.ExternalReferenceElement; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.ExternalReferenceLinkElement; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.MetadataElement; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ExternalReferenceLinkProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ExternalReferenceProperties; import org.odpi.openmetadata.frameworks.governanceaction.properties.MetadataCorrelationProperties; import org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler; import org.odpi.openmetadata.commonservices.generichandlers.ExternalReferenceHandler; import org.odpi.openmetadata.commonservices.generichandlers.ExternalReferenceLinkHandler; +import org.odpi.openmetadata.frameworks.openmetadata.properties.externalreferences.ExternalReferenceLinkProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.externalreferences.ExternalReferenceProperties; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.commonservices.repositoryhandler.RepositoryHandler; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; @@ -195,7 +195,7 @@ private void addCorrelationPropertiesToExternalReferenceLinks(String { if (results != null) { - for (MetadataElement externalReference : results) + for (CorrelatedMetadataElement externalReference : results) { if ((externalReference != null) && (externalReference.getElementHeader() != null) && (externalReference.getElementHeader().getGUID() != null)) { @@ -262,8 +262,8 @@ public String createExternalReference(String userId, anchorGUID, externalReferenceProperties.getQualifiedName(), externalReferenceProperties.getDisplayName(), - externalReferenceProperties.getDescription(), - externalReferenceProperties.getUrl(), + externalReferenceProperties.getResourceDescription(), + externalReferenceProperties.getURI(), externalReferenceProperties.getVersion(), externalReferenceProperties.getOrganization(), externalReferenceProperties.getAdditionalProperties(), @@ -349,8 +349,8 @@ public void updateExternalReference(String userId, externalReferenceGUIDParameterName, externalReferenceProperties.getQualifiedName(), externalReferenceProperties.getDisplayName(), - externalReferenceProperties.getDescription(), - externalReferenceProperties.getUrl(), + externalReferenceProperties.getResourceDescription(), + externalReferenceProperties.getURI(), externalReferenceProperties.getVersion(), externalReferenceProperties.getOrganization(), externalReferenceProperties.getAdditionalProperties(), diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/handlers/GlossaryExchangeHandler.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/handlers/GlossaryExchangeHandler.java index 64502233102..5623156c785 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/handlers/GlossaryExchangeHandler.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/handlers/GlossaryExchangeHandler.java @@ -5,34 +5,23 @@ import org.odpi.openmetadata.accessservices.assetmanager.converters.GlossaryCategoryConverter; import org.odpi.openmetadata.accessservices.assetmanager.converters.GlossaryConverter; import org.odpi.openmetadata.accessservices.assetmanager.converters.GlossaryTermConverter; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.ExternalGlossaryLinkElement; +import org.odpi.openmetadata.frameworks.openmetadata.enums.GlossaryTermStatus; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ExternalGlossaryLinkElement; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.GlossaryCategoryElement; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.GlossaryElement; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.GlossaryTermElement; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.MetadataElement; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ArchiveProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.CanonicalVocabularyProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.DataFieldValuesProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.EditingGlossaryProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ExternalGlossaryElementLinkProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ExternalGlossaryLinkProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.GlossaryCategoryProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.GlossaryProperties; +import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.CorrelatedMetadataElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ArchiveProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.glossaries.*; import org.odpi.openmetadata.frameworks.openmetadata.enums.GlossaryTermActivityType; -import org.odpi.openmetadata.accessservices.assetmanager.properties.GlossaryTermCategorization; -import org.odpi.openmetadata.accessservices.assetmanager.properties.GlossaryTermContextDefinition; -import org.odpi.openmetadata.accessservices.assetmanager.properties.GlossaryTermProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.GlossaryTermRelationship; import org.odpi.openmetadata.frameworks.openmetadata.enums.GlossaryTermRelationshipStatus; -import org.odpi.openmetadata.accessservices.assetmanager.properties.GlossaryTermStatus; import org.odpi.openmetadata.frameworks.governanceaction.properties.MetadataCorrelationProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.StagingGlossaryProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.TaxonomyProperties; import org.odpi.openmetadata.accessservices.assetmanager.properties.TemplateProperties; import org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler; import org.odpi.openmetadata.commonservices.generichandlers.GlossaryCategoryHandler; import org.odpi.openmetadata.commonservices.generichandlers.GlossaryHandler; import org.odpi.openmetadata.commonservices.generichandlers.GlossaryTermHandler; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.DataFieldValuesProperties; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.commonservices.repositoryhandler.RepositoryHandler; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; @@ -175,7 +164,7 @@ private void addCorrelationPropertiesToGlossaries(String userId, { if (results != null) { - for (MetadataElement glossary : results) + for (CorrelatedMetadataElement glossary : results) { if ((glossary != null) && (glossary.getElementHeader() != null) && (glossary.getElementHeader().getGUID() != null)) { @@ -224,7 +213,7 @@ private void addCorrelationPropertiesToGlossaryCategories(String { if (results != null) { - for (MetadataElement glossaryCategory : results) + for (CorrelatedMetadataElement glossaryCategory : results) { if ((glossaryCategory != null) && (glossaryCategory.getElementHeader() != null) && (glossaryCategory.getElementHeader().getGUID() != null)) { @@ -275,7 +264,7 @@ private void addCorrelationPropertiesToGlossaryTerms(String u { if (results != null) { - for (MetadataElement glossaryTerm : results) + for (CorrelatedMetadataElement glossaryTerm : results) { if ((glossaryTerm != null) && (glossaryTerm.getElementHeader() != null) && (glossaryTerm.getElementHeader().getGUID() != null)) { @@ -2323,33 +2312,17 @@ private InstanceStatus getInstanceStatus(GlossaryTermStatus status) { if (status != null) { - switch (status) + return switch (status) { - case DRAFT: - return InstanceStatus.DRAFT; - - case PREPARED: - return InstanceStatus.PREPARED; - - case PROPOSED: - return InstanceStatus.PROPOSED; - - case APPROVED: - return InstanceStatus.APPROVED; - - case REJECTED: - return InstanceStatus.REJECTED; - - case ACTIVE: - return InstanceStatus.ACTIVE; - - case DEPRECATED: - return InstanceStatus.DEPRECATED; - - case OTHER: - return InstanceStatus.OTHER; - - } + case DRAFT -> InstanceStatus.DRAFT; + case PREPARED -> InstanceStatus.PREPARED; + case PROPOSED -> InstanceStatus.PROPOSED; + case APPROVED -> InstanceStatus.APPROVED; + case REJECTED -> InstanceStatus.REJECTED; + case ACTIVE -> InstanceStatus.ACTIVE; + case DEPRECATED -> InstanceStatus.DEPRECATED; + case OTHER -> InstanceStatus.OTHER; + }; } return null; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/handlers/NoteLogExchangeHandler.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/handlers/NoteLogExchangeHandler.java index 52b136c99c4..262d607fd26 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/handlers/NoteLogExchangeHandler.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/handlers/NoteLogExchangeHandler.java @@ -4,15 +4,15 @@ import org.odpi.openmetadata.accessservices.assetmanager.converters.NoteConverter; import org.odpi.openmetadata.accessservices.assetmanager.converters.NoteLogConverter; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.MetadataElement; +import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.CorrelatedMetadataElement; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.NoteElement; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.NoteLogElement; import org.odpi.openmetadata.frameworks.governanceaction.properties.MetadataCorrelationProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.NoteLogProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.NoteProperties; import org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler; import org.odpi.openmetadata.commonservices.generichandlers.NoteHandler; import org.odpi.openmetadata.commonservices.generichandlers.NoteLogHandler; +import org.odpi.openmetadata.frameworks.openmetadata.properties.feedback.NoteLogProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.feedback.NoteProperties; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.commonservices.repositoryhandler.RepositoryHandler; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; @@ -142,7 +142,7 @@ private void addCorrelationPropertiesToNoteLogs(String us { if (results != null) { - for (MetadataElement noteLog : results) + for (CorrelatedMetadataElement noteLog : results) { if ((noteLog != null) && (noteLog.getElementHeader() != null) && (noteLog.getElementHeader().getGUID() != null)) { @@ -193,7 +193,7 @@ private void addCorrelationPropertiesToNotes(String userId, { if (results != null) { - for (MetadataElement note : results) + for (CorrelatedMetadataElement note : results) { if ((note != null) && (note.getElementHeader() != null) && (note.getElementHeader().getGUID() != null)) { diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/handlers/ProcessExchangeHandler.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/handlers/ProcessExchangeHandler.java index 81f85547497..a2f2925f6a4 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/handlers/ProcessExchangeHandler.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/handlers/ProcessExchangeHandler.java @@ -5,10 +5,15 @@ import org.odpi.openmetadata.accessservices.assetmanager.converters.*; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.*; +import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.PortElement; +import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.ProcessElement; import org.odpi.openmetadata.accessservices.assetmanager.properties.*; import org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler; import org.odpi.openmetadata.frameworks.governanceaction.properties.MetadataCorrelationProperties; -import org.odpi.openmetadata.frameworks.openmetadata.enums.PortType; +import org.odpi.openmetadata.frameworks.openmetadata.enums.*; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.processes.PortProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.processes.ProcessProperties; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.commonservices.generichandlers.ProcessHandler; import org.odpi.openmetadata.commonservices.repositoryhandler.RepositoryHandler; @@ -200,7 +205,7 @@ private void addCorrelationPropertiesToPorts(String userId, { if ((results != null) && (assetManagerGUID != null)) { - for (MetadataElement element : results) + for (CorrelatedMetadataElement element : results) { if ((element != null) && (element.getElementHeader() != null) && (element.getElementHeader().getGUID() != null)) { @@ -300,9 +305,10 @@ public String createProcess(String userId, this.getExternalSourceGUID(correlationProperties, assetManagerIsHome), this.getExternalSourceName(correlationProperties, assetManagerIsHome), processProperties.getQualifiedName(), - processProperties.getTechnicalName(), + processProperties.getName(), + processProperties.getResourceName(), processProperties.getVersionIdentifier(), - processProperties.getTechnicalDescription(), + processProperties.getResourceDescription(), processProperties.getDeployedImplementationType(), processProperties.getFormula(), processProperties.getFormulaType(), @@ -479,9 +485,10 @@ public void updateProcess(String userId, processGUIDParameterName, isMergeUpdate, processProperties.getQualifiedName(), - processProperties.getTechnicalName(), + processProperties.getName(), + processProperties.getResourceName(), processProperties.getVersionIdentifier(), - processProperties.getTechnicalDescription(), + processProperties.getResourceDescription(), processProperties.getDeployedImplementationType(), processProperties.getFormula(), processProperties.getImplementationLanguage(), diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/handlers/SchemaExchangeHandler.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/handlers/SchemaExchangeHandler.java index 16c054f9cf8..efdeda5a810 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/handlers/SchemaExchangeHandler.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/handlers/SchemaExchangeHandler.java @@ -16,9 +16,13 @@ import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; import org.odpi.openmetadata.frameworks.governanceaction.properties.MetadataCorrelationProperties; import org.odpi.openmetadata.frameworks.openmetadata.enums.KeyPattern; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.ForeignKeyProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.SchemaAttributeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.SchemaTypeProperties; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.metadatasecurity.server.OpenMetadataServerSecurityVerifier; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/outtopic/AssetManagerOutTopicPublisher.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/outtopic/AssetManagerOutTopicPublisher.java index 08473f1b894..435e7d86051 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/outtopic/AssetManagerOutTopicPublisher.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/outtopic/AssetManagerOutTopicPublisher.java @@ -9,7 +9,7 @@ import org.odpi.openmetadata.accessservices.assetmanager.events.AssetManagerOutTopicEvent; import org.odpi.openmetadata.accessservices.assetmanager.ffdc.AssetManagerAuditCode; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Classification; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/server/AssetManagerInstanceHandler.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/server/AssetManagerInstanceHandler.java index 0fc63099f3d..37b1c3c364c 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/server/AssetManagerInstanceHandler.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/server/AssetManagerInstanceHandler.java @@ -18,8 +18,9 @@ import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.RelatedElement; class AssetManagerInstanceHandler extends OMASServiceInstanceHandler { diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/server/AssetManagerRESTServices.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/server/AssetManagerRESTServices.java index 2bba1f8408c..bec25a87532 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/server/AssetManagerRESTServices.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/server/AssetManagerRESTServices.java @@ -2,14 +2,15 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.assetmanager.server; +import org.odpi.openmetadata.commonservices.ffdc.rest.OCFConnectionResponse; import org.odpi.openmetadata.frameworks.governanceaction.properties.MetadataCorrelationHeader; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.SoftwareCapabilityElement; -import org.odpi.openmetadata.accessservices.assetmanager.properties.AssetManagerProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities.AssetManagerProperties; import org.odpi.openmetadata.frameworks.governanceaction.properties.MetadataCorrelationProperties; import org.odpi.openmetadata.frameworks.openmetadata.enums.KeyPattern; import org.odpi.openmetadata.frameworks.openmetadata.enums.PermittedSynchronization; import org.odpi.openmetadata.accessservices.assetmanager.rest.EffectiveTimeQueryRequestBody; -import org.odpi.openmetadata.accessservices.assetmanager.rest.ElementHeadersResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.ElementHeadersResponse; import org.odpi.openmetadata.accessservices.assetmanager.rest.MetadataCorrelationHeadersResponse; import org.odpi.openmetadata.accessservices.assetmanager.rest.UpdateRequestBody; import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; @@ -17,7 +18,6 @@ import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; import org.odpi.openmetadata.commonservices.ffdc.rest.BooleanResponse; import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.ConnectionResponse; import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; import org.odpi.openmetadata.commonservices.generichandlers.ExternalIdentifierHandler; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; @@ -27,7 +27,7 @@ import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; import org.slf4j.LoggerFactory; import java.util.Date; @@ -64,16 +64,16 @@ public AssetManagerRESTServices() * UserNotAuthorizedException user not authorized to issue this request or * PropertyServerException problem retrieving the discovery engine definition. */ - public ConnectionResponse getOutTopicConnection(String serverName, - String userId, - String callerId) + public OCFConnectionResponse getOutTopicConnection(String serverName, + String userId, + String callerId) { final String methodName = "getOutTopicConnection"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - ConnectionResponse response = new ConnectionResponse(); - AuditLog auditLog = null; + OCFConnectionResponse response = new OCFConnectionResponse(); + AuditLog auditLog = null; try { @@ -146,8 +146,8 @@ public GUIDResponse createExternalAssetManager(String serverName OpenMetadataType.CATALOG.typeName, OpenMetadataType.ASSET_MANAGER_TYPE_NAME, assetManagerProperties.getQualifiedName(), - assetManagerProperties.getTechnicalName(), - assetManagerProperties.getTechnicalDescription(), + assetManagerProperties.getResourceName(), + assetManagerProperties.getResourceDescription(), assetManagerProperties.getDeployedImplementationType(), assetManagerProperties.getVersion(), assetManagerProperties.getPatchLevel(), @@ -170,9 +170,9 @@ public GUIDResponse createExternalAssetManager(String serverName OpenMetadataType.CATALOG.typeName, OpenMetadataType.SOFTWARE_CAPABILITY.typeName, assetManagerProperties.getQualifiedName(), - assetManagerProperties.getDisplayName(), - assetManagerProperties.getSummary(), - assetManagerProperties.getDescription(), + assetManagerProperties.getResourceName(), + assetManagerProperties.getDisplaySummary(), + assetManagerProperties.getResourceDescription(), assetManagerProperties.getAbbreviation(), assetManagerProperties.getUsage(), false, @@ -915,19 +915,19 @@ public ElementHeadersResponse getElementsForExternalIdentifier(String serverName, methodName); - response.setElementList(handler.getElementsForExternalIdentifier(userId, - requestBody.getMetadataCorrelationProperties().getExternalScopeGUID(), - assetManagerGUIDParameterName, - OpenMetadataType.ASSET_MANAGER_TYPE_NAME, - requestBody.getMetadataCorrelationProperties().getExternalScopeName(), - requestBody.getMetadataCorrelationProperties().getExternalIdentifier(), - instanceHandler.getSupportedZones(userId, serverName, methodName), - startFrom, - pageSize, - forLineage, - forDuplicateProcessing, - requestBody.getEffectiveTime(), - methodName)); + response.setElementHeaders(handler.getElementsForExternalIdentifier(userId, + requestBody.getMetadataCorrelationProperties().getExternalScopeGUID(), + assetManagerGUIDParameterName, + OpenMetadataType.ASSET_MANAGER_TYPE_NAME, + requestBody.getMetadataCorrelationProperties().getExternalScopeName(), + requestBody.getMetadataCorrelationProperties().getExternalIdentifier(), + instanceHandler.getSupportedZones(userId, serverName, methodName), + startFrom, + pageSize, + forLineage, + forDuplicateProcessing, + requestBody.getEffectiveTime(), + methodName)); } else { diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/server/AssetManagerServicesInstance.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/server/AssetManagerServicesInstance.java index 3f8a58e6e70..73e804dfd20 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/server/AssetManagerServicesInstance.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/server/AssetManagerServicesInstance.java @@ -4,6 +4,11 @@ import org.odpi.openmetadata.accessservices.assetmanager.connectors.outtopic.AssetManagerOutTopicClientProvider; import org.odpi.openmetadata.accessservices.assetmanager.converters.*; +import org.odpi.openmetadata.accessservices.assetmanager.converters.AssetConverter; +import org.odpi.openmetadata.accessservices.assetmanager.converters.ElementHeaderConverter; +import org.odpi.openmetadata.accessservices.assetmanager.converters.ElementStubConverter; +import org.odpi.openmetadata.accessservices.assetmanager.converters.GovernanceDefinitionConverter; +import org.odpi.openmetadata.accessservices.assetmanager.converters.RelatedElementConverter; import org.odpi.openmetadata.accessservices.assetmanager.ffdc.AssetManagerErrorCode; import org.odpi.openmetadata.accessservices.assetmanager.handlers.CommentExchangeHandler; import org.odpi.openmetadata.accessservices.assetmanager.handlers.ConnectionExchangeHandler; @@ -22,8 +27,9 @@ import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.RelatedElement; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryConnector; import java.util.List; @@ -36,9 +42,9 @@ public class AssetManagerServicesInstance extends OMASServiceInstance { private static final AccessServiceDescription myDescription = AccessServiceDescription.ASSET_MANAGER_OMAS; - private final ReferenceableHandler elementStubHandler; - private final ReferenceableHandler relatedElementHandler; - private final AssetHandler assetHandler; + private final ReferenceableHandler elementStubHandler; + private final ReferenceableHandler relatedElementHandler; + private final AssetHandler assetHandler; private final SoftwareCapabilityHandler assetManagerHandler; private final ExternalIdentifierHandler externalIdentifierHandler; private final ConnectionExchangeHandler connectionExchangeHandler; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/server/CollaborationExchangeRESTServices.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/server/CollaborationExchangeRESTServices.java index 84c8b122f79..355210a7ad5 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/server/CollaborationExchangeRESTServices.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/server/CollaborationExchangeRESTServices.java @@ -7,17 +7,11 @@ import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.InformalTagElement; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.LikeElement; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.RatingElement; -import org.odpi.openmetadata.accessservices.assetmanager.properties.CommentProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.FeedbackProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.NoteLogProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.NoteProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.RatingProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.TagProperties; import org.odpi.openmetadata.accessservices.assetmanager.rest.CommentElementResponse; import org.odpi.openmetadata.accessservices.assetmanager.rest.CommentElementsResponse; import org.odpi.openmetadata.accessservices.assetmanager.rest.EffectiveTimeQueryRequestBody; import org.odpi.openmetadata.accessservices.assetmanager.rest.InformalTagResponse; -import org.odpi.openmetadata.accessservices.assetmanager.rest.InformalTagUpdateRequestBody; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.odpi.openmetadata.accessservices.assetmanager.rest.InformalTagsResponse; import org.odpi.openmetadata.accessservices.assetmanager.rest.NameRequestBody; import org.odpi.openmetadata.accessservices.assetmanager.rest.NoteElementResponse; @@ -25,18 +19,14 @@ import org.odpi.openmetadata.accessservices.assetmanager.rest.NoteLogElementResponse; import org.odpi.openmetadata.accessservices.assetmanager.rest.NoteLogElementsResponse; import org.odpi.openmetadata.accessservices.assetmanager.rest.ReferenceableUpdateRequestBody; -import org.odpi.openmetadata.accessservices.assetmanager.rest.RelationshipRequestBody; import org.odpi.openmetadata.accessservices.assetmanager.rest.SearchStringRequestBody; import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDListResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NullRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; import org.odpi.openmetadata.commonservices.generichandlers.InformalTagHandler; import org.odpi.openmetadata.commonservices.generichandlers.LikeHandler; import org.odpi.openmetadata.frameworks.openmetadata.enums.StarRating; +import org.odpi.openmetadata.frameworks.openmetadata.properties.feedback.*; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.commonservices.generichandlers.RatingHandler; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; @@ -570,8 +560,8 @@ public VoidResponse setupAcceptedAnswer(String serverName, if (requestBody.getProperties() instanceof FeedbackProperties feedbackProperties) { handler.setupAcceptedAnswer(userId, - requestBody.getAssetManagerGUID(), - requestBody.getAssetManagerName(), + requestBody.getExternalSourceGUID(), + requestBody.getExternalSourceName(), questionCommentGUID, answerCommentGUID, feedbackProperties.getIsPublic(), diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/server/ConnectionExchangeRESTServices.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/server/ConnectionExchangeRESTServices.java index da6458f2859..ea265f4d537 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/server/ConnectionExchangeRESTServices.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/server/ConnectionExchangeRESTServices.java @@ -5,23 +5,10 @@ import org.odpi.openmetadata.accessservices.assetmanager.handlers.ConnectionExchangeHandler; -import org.odpi.openmetadata.accessservices.assetmanager.properties.AssetConnectionProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.EmbeddedConnectionProperties; -import org.odpi.openmetadata.accessservices.assetmanager.rest.ConnectionRequestBody; -import org.odpi.openmetadata.accessservices.assetmanager.rest.ConnectionResponse; -import org.odpi.openmetadata.accessservices.assetmanager.rest.ConnectionsResponse; -import org.odpi.openmetadata.accessservices.assetmanager.rest.ConnectorTypeRequestBody; -import org.odpi.openmetadata.accessservices.assetmanager.rest.ConnectorTypeResponse; -import org.odpi.openmetadata.accessservices.assetmanager.rest.ConnectorTypesResponse; -import org.odpi.openmetadata.accessservices.assetmanager.rest.EffectiveTimeQueryRequestBody; -import org.odpi.openmetadata.accessservices.assetmanager.rest.EndpointRequestBody; -import org.odpi.openmetadata.accessservices.assetmanager.rest.EndpointResponse; -import org.odpi.openmetadata.accessservices.assetmanager.rest.EndpointsResponse; -import org.odpi.openmetadata.accessservices.assetmanager.rest.NameRequestBody; -import org.odpi.openmetadata.accessservices.assetmanager.rest.RelationshipRequestBody; -import org.odpi.openmetadata.accessservices.assetmanager.rest.SearchStringRequestBody; -import org.odpi.openmetadata.accessservices.assetmanager.rest.TemplateRequestBody; -import org.odpi.openmetadata.accessservices.assetmanager.rest.UpdateRequestBody; +import org.odpi.openmetadata.accessservices.assetmanager.rest.*; +import org.odpi.openmetadata.commonservices.ffdc.rest.RelationshipRequestBody; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.AssetConnectionProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.EmbeddedConnectionProperties; import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; @@ -274,8 +261,8 @@ public VoidResponse setupConnectorType(String serverName, ConnectionExchangeHandler handler = instanceHandler.getConnectionExchangeHandler(userId, serverName, methodName); handler.setupConnectorType(userId, - requestBody.getAssetManagerGUID(), - requestBody.getAssetManagerName(), + requestBody.getExternalSourceGUID(), + requestBody.getExternalSourceName(), assetManagerIsHome, connectionGUID, connectorTypeGUID, @@ -407,8 +394,8 @@ public VoidResponse setupEndpoint(String serverName, ConnectionExchangeHandler handler = instanceHandler.getConnectionExchangeHandler(userId, serverName, methodName); handler.setupEndpoint(userId, - requestBody.getAssetManagerGUID(), - requestBody.getAssetManagerName(), + requestBody.getExternalSourceGUID(), + requestBody.getExternalSourceName(), assetManagerIsHome, connectionGUID, endpointGUID, @@ -541,8 +528,8 @@ public VoidResponse setupEmbeddedConnection(String serverName, if (requestBody.getProperties() instanceof EmbeddedConnectionProperties) { handler.setupEmbeddedConnection(userId, - requestBody.getAssetManagerGUID(), - requestBody.getAssetManagerName(), + requestBody.getExternalSourceGUID(), + requestBody.getExternalSourceName(), assetManagerIsHome, connectionGUID, embeddedConnectionGUID, @@ -555,8 +542,8 @@ public VoidResponse setupEmbeddedConnection(String serverName, else { handler.setupEmbeddedConnection(userId, - requestBody.getAssetManagerGUID(), - requestBody.getAssetManagerName(), + requestBody.getExternalSourceGUID(), + requestBody.getExternalSourceName(), assetManagerIsHome, connectionGUID, embeddedConnectionGUID, @@ -690,8 +677,8 @@ public VoidResponse setupAssetConnection(String serverName, if (requestBody.getProperties() instanceof AssetConnectionProperties) { handler.setupAssetConnection(userId, - requestBody.getAssetManagerGUID(), - requestBody.getAssetManagerName(), + requestBody.getExternalSourceGUID(), + requestBody.getExternalSourceName(), assetManagerIsHome, assetGUID, connectionGUID, @@ -704,8 +691,8 @@ public VoidResponse setupAssetConnection(String serverName, else { handler.setupAssetConnection(userId, - requestBody.getAssetManagerGUID(), - requestBody.getAssetManagerName(), + requestBody.getExternalSourceGUID(), + requestBody.getExternalSourceName(), assetManagerIsHome, assetGUID, connectionGUID, diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/server/DataAssetExchangeRESTServices.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/server/DataAssetExchangeRESTServices.java index 52a3285ecbc..5a0dffaab86 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/server/DataAssetExchangeRESTServices.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/server/DataAssetExchangeRESTServices.java @@ -6,11 +6,15 @@ import org.odpi.openmetadata.accessservices.assetmanager.handlers.DataAssetExchangeHandler; import org.odpi.openmetadata.accessservices.assetmanager.rest.*; +import org.odpi.openmetadata.accessservices.assetmanager.rest.EffectiveTimeQueryRequestBody; +import org.odpi.openmetadata.accessservices.assetmanager.rest.NameRequestBody; +import org.odpi.openmetadata.accessservices.assetmanager.rest.SearchStringRequestBody; +import org.odpi.openmetadata.accessservices.assetmanager.rest.TemplateRequestBody; +import org.odpi.openmetadata.accessservices.assetmanager.rest.UpdateRequestBody; import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.slf4j.LoggerFactory; @@ -563,8 +567,8 @@ public GUIDResponse setupRelatedDataAsset(String serverName, DataAssetExchangeHandler handler = instanceHandler.getDataAssetExchangeHandler(userId, serverName, methodName); response.setGUID(handler.setupRelatedDataAsset(userId, - requestBody.getAssetManagerGUID(), - requestBody.getAssetManagerName(), + requestBody.getExternalSourceGUID(), + requestBody.getExternalSourceName(), assetManagerIsHome, relationshipTypeName, fromAssetGUID, @@ -701,8 +705,8 @@ public VoidResponse updateAssetRelationship(String serverName, DataAssetExchangeHandler handler = instanceHandler.getDataAssetExchangeHandler(userId, serverName, methodName); handler.updateAssetRelationship(userId, - requestBody.getAssetManagerGUID(), - requestBody.getAssetManagerName(), + requestBody.getExternalSourceGUID(), + requestBody.getExternalSourceName(), relationshipTypeName, relationshipGUID, isMergeUpdate, @@ -836,17 +840,17 @@ public RelationshipElementsResponse getRelatedAssetsAtEnd2(String { DataAssetExchangeHandler handler = instanceHandler.getDataAssetExchangeHandler(userId, serverName, methodName); - response.setElementList(handler.getRelatedAssetsAtEnd2(userId, - requestBody.getAssetManagerGUID(), - requestBody.getAssetManagerName(), - relationshipTypeName, - fromAssetGUID, - startFrom, - pageSize, - forLineage, - forDuplicateProcessing, - requestBody.getEffectiveTime(), - methodName)); + response.setElements(handler.getRelatedAssetsAtEnd2(userId, + requestBody.getAssetManagerGUID(), + requestBody.getAssetManagerName(), + relationshipTypeName, + fromAssetGUID, + startFrom, + pageSize, + forLineage, + forDuplicateProcessing, + requestBody.getEffectiveTime(), + methodName)); } else { @@ -907,17 +911,17 @@ public RelationshipElementsResponse getRelatedAssetsAtEnd1(String { DataAssetExchangeHandler handler = instanceHandler.getDataAssetExchangeHandler(userId, serverName, methodName); - response.setElementList(handler.getRelatedAssetsAtEnd1(userId, - requestBody.getAssetManagerGUID(), - requestBody.getAssetManagerName(), - relationshipTypeName, - toAssetGUID, - startFrom, - pageSize, - forLineage, - forDuplicateProcessing, - requestBody.getEffectiveTime(), - methodName)); + response.setElements(handler.getRelatedAssetsAtEnd1(userId, + requestBody.getAssetManagerGUID(), + requestBody.getAssetManagerName(), + relationshipTypeName, + toAssetGUID, + startFrom, + pageSize, + forLineage, + forDuplicateProcessing, + requestBody.getEffectiveTime(), + methodName)); } else { diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/server/GlossaryExchangeRESTServices.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/server/GlossaryExchangeRESTServices.java index abb4f10086b..2d68683b4ce 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/server/GlossaryExchangeRESTServices.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/server/GlossaryExchangeRESTServices.java @@ -4,18 +4,8 @@ package org.odpi.openmetadata.accessservices.assetmanager.server; import org.odpi.openmetadata.accessservices.assetmanager.handlers.GlossaryExchangeHandler; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ActivityDescriptionProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.CanonicalVocabularyProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.DataFieldValuesProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.EditingGlossaryProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.GlossaryCategoryProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.GlossaryProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.GlossaryTermCategorization; -import org.odpi.openmetadata.accessservices.assetmanager.properties.GlossaryTermContextDefinition; -import org.odpi.openmetadata.accessservices.assetmanager.properties.GlossaryTermProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.GlossaryTermRelationship; -import org.odpi.openmetadata.accessservices.assetmanager.properties.StagingGlossaryProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.TaxonomyProperties; +import org.odpi.openmetadata.commonservices.ffdc.rest.RelationshipRequestBody; +import org.odpi.openmetadata.frameworks.openmetadata.properties.glossaries.*; import org.odpi.openmetadata.accessservices.assetmanager.rest.*; import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; @@ -24,6 +14,7 @@ import org.odpi.openmetadata.commonservices.ffdc.rest.NameListResponse; import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.DataFieldValuesProperties; import org.slf4j.LoggerFactory; import java.util.Date; @@ -1579,8 +1570,8 @@ public VoidResponse setupCategoryParent(String serverName, if (requestBody.getProperties() != null) { handler.setupCategoryParent(userId, - requestBody.getAssetManagerGUID(), - requestBody.getAssetManagerName(), + requestBody.getExternalSourceGUID(), + requestBody.getExternalSourceName(), glossaryParentCategoryGUID, glossaryChildCategoryGUID, requestBody.getProperties().getEffectiveFrom(), @@ -1593,8 +1584,8 @@ public VoidResponse setupCategoryParent(String serverName, else { handler.setupCategoryParent(userId, - requestBody.getAssetManagerGUID(), - requestBody.getAssetManagerName(), + requestBody.getExternalSourceGUID(), + requestBody.getExternalSourceName(), glossaryParentCategoryGUID, glossaryChildCategoryGUID, null, @@ -2797,8 +2788,8 @@ public VoidResponse setupTermCategory(String serverName, if (requestBody.getProperties() instanceof GlossaryTermCategorization properties) { handler.setupTermCategory(userId, - requestBody.getAssetManagerGUID(), - requestBody.getAssetManagerName(), + requestBody.getExternalSourceGUID(), + requestBody.getExternalSourceName(), glossaryCategoryGUID, glossaryTermGUID, properties, @@ -2810,8 +2801,8 @@ public VoidResponse setupTermCategory(String serverName, else { handler.setupTermCategory(userId, - requestBody.getAssetManagerGUID(), - requestBody.getAssetManagerName(), + requestBody.getExternalSourceGUID(), + requestBody.getExternalSourceName(), glossaryCategoryGUID, glossaryTermGUID, null, @@ -2999,8 +2990,8 @@ public VoidResponse setupTermRelationship(String serverName, if (requestBody.getProperties() instanceof GlossaryTermRelationship properties) { handler.setupTermRelationship(userId, - requestBody.getAssetManagerGUID(), - requestBody.getAssetManagerName(), + requestBody.getExternalSourceGUID(), + requestBody.getExternalSourceName(), glossaryTermOneGUID, relationshipTypeName, glossaryTermTwoGUID, @@ -3013,8 +3004,8 @@ public VoidResponse setupTermRelationship(String serverName, else { handler.setupTermRelationship(userId, - requestBody.getAssetManagerGUID(), - requestBody.getAssetManagerName(), + requestBody.getExternalSourceGUID(), + requestBody.getExternalSourceName(), glossaryTermOneGUID, relationshipTypeName, glossaryTermTwoGUID, @@ -3095,8 +3086,8 @@ public VoidResponse updateTermRelationship(String serverName, GlossaryExchangeHandler handler = instanceHandler.getGlossaryExchangeHandler(userId, serverName, methodName); handler.updateTermRelationship(userId, - requestBody.getAssetManagerGUID(), - requestBody.getAssetManagerName(), + requestBody.getExternalSourceGUID(), + requestBody.getExternalSourceName(), glossaryTermOneGUID, relationshipTypeName, glossaryTermTwoGUID, diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/server/LineageExchangeRESTServices.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/server/LineageExchangeRESTServices.java index cf2e3591de8..39cd0421f85 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/server/LineageExchangeRESTServices.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/server/LineageExchangeRESTServices.java @@ -4,11 +4,16 @@ package org.odpi.openmetadata.accessservices.assetmanager.server; import org.odpi.openmetadata.accessservices.assetmanager.handlers.ProcessExchangeHandler; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ControlFlowProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.DataFlowProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.LineageMappingProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ProcessCallProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ProcessContainmentProperties; +import org.odpi.openmetadata.commonservices.ffdc.rest.DataFlowElementResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.DataFlowElementsResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.ControlFlowElementResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.ControlFlowElementsResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.ProcessCallElementResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.ProcessCallElementsResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.LineageMappingElementResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.LineageMappingElementsResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.RelationshipRequestBody; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.processes.ProcessContainmentProperties; import org.odpi.openmetadata.accessservices.assetmanager.rest.*; import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; @@ -16,6 +21,10 @@ import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; +import org.odpi.openmetadata.frameworks.openmetadata.properties.lineage.ControlFlowProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.lineage.DataFlowProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.lineage.LineageMappingProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.lineage.ProcessCallProperties; import org.slf4j.LoggerFactory; import java.util.Date; @@ -323,7 +332,7 @@ public VoidResponse setupProcessParent(String serverName, try { auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - + ProcessExchangeHandler handler = instanceHandler.getProcessExchangeHandler(userId, serverName, methodName); if (requestBody != null) @@ -331,8 +340,8 @@ public VoidResponse setupProcessParent(String serverName, if (requestBody.getProperties() instanceof ProcessContainmentProperties properties) { handler.setupProcessParent(userId, - requestBody.getAssetManagerGUID(), - requestBody.getAssetManagerName(), + requestBody.getExternalSourceGUID(), + requestBody.getExternalSourceName(), assetManagerIsHome, parentProcessGUID, childProcessGUID, @@ -488,7 +497,7 @@ public VoidResponse publishProcess(String serverName, EffectiveTimeQueryRequestBody requestBody) { final String methodName = "publishProcess"; - + RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); VoidResponse response = new VoidResponse(); @@ -1241,8 +1250,8 @@ public VoidResponse setupProcessPort(String serverName, if (requestBody.getProperties() != null) { handler.setupProcessPort(userId, - requestBody.getAssetManagerGUID(), - requestBody.getAssetManagerName(), + requestBody.getExternalSourceGUID(), + requestBody.getExternalSourceName(), assetManagerIsHome, processGUID, portGUID, @@ -1414,8 +1423,8 @@ public VoidResponse setupPortDelegation(String serverName, if (requestBody.getProperties() != null) { handler.setupPortDelegation(userId, - requestBody.getAssetManagerGUID(), - requestBody.getAssetManagerName(), + requestBody.getExternalSourceGUID(), + requestBody.getExternalSourceName(), assetManagerIsHome, portOneGUID, portTwoGUID, @@ -1429,8 +1438,8 @@ public VoidResponse setupPortDelegation(String serverName, else { handler.setupPortDelegation(userId, - requestBody.getAssetManagerGUID(), - requestBody.getAssetManagerName(), + requestBody.getExternalSourceGUID(), + requestBody.getExternalSourceName(), assetManagerIsHome, portOneGUID, portTwoGUID, @@ -1586,8 +1595,8 @@ public VoidResponse setupPortSchemaType(String serverName, if (requestBody.getProperties() != null) { handler.setupPortSchemaType(userId, - requestBody.getAssetManagerGUID(), - requestBody.getAssetManagerName(), + requestBody.getExternalSourceGUID(), + requestBody.getExternalSourceName(), assetManagerIsHome, portGUID, schemaTypeGUID, @@ -2380,8 +2389,8 @@ public GUIDResponse setupDataFlow(String serverName, if ((requestBody != null) && (requestBody.getProperties() instanceof DataFlowProperties dataFlowProperties)) { response.setGUID(handler.setupDataFlow(userId, - requestBody.getAssetManagerGUID(), - requestBody.getAssetManagerName(), + requestBody.getExternalSourceGUID(), + requestBody.getExternalSourceName(), assetManagerIsHome, dataSupplierGUID, dataConsumerGUID, @@ -2536,8 +2545,8 @@ public VoidResponse updateDataFlow(String serverName, ProcessExchangeHandler handler = instanceHandler.getProcessExchangeHandler(userId, serverName, methodName); handler.updateDataFlow(userId, - requestBody.getAssetManagerGUID(), - requestBody.getAssetManagerName(), + requestBody.getExternalSourceGUID(), + requestBody.getExternalSourceName(), dataFlowGUID, properties.getQualifiedName(), properties.getDescription(), @@ -2675,25 +2684,25 @@ public DataFlowElementsResponse getDataFlowConsumers(String if (requestBody != null) { - response.setElementList(handler.getDataFlowConsumers(userId, - dataSupplierGUID, - startFrom, - pageSize, - forLineage, - forDuplicateProcessing, - requestBody.getEffectiveTime(), - methodName)); + response.setElements(handler.getDataFlowConsumers(userId, + dataSupplierGUID, + startFrom, + pageSize, + forLineage, + forDuplicateProcessing, + requestBody.getEffectiveTime(), + methodName)); } else { - response.setElementList(handler.getDataFlowConsumers(userId, - dataSupplierGUID, - startFrom, - pageSize, - forLineage, - forDuplicateProcessing, - new Date(), - methodName)); + response.setElements(handler.getDataFlowConsumers(userId, + dataSupplierGUID, + startFrom, + pageSize, + forLineage, + forDuplicateProcessing, + new Date(), + methodName)); } } catch (Exception error) @@ -2748,25 +2757,25 @@ public DataFlowElementsResponse getDataFlowSuppliers(String if (requestBody != null) { - response.setElementList(handler.getDataFlowSuppliers(userId, - dataConsumerGUID, - startFrom, - pageSize, - forLineage, - forDuplicateProcessing, - requestBody.getEffectiveTime(), - methodName)); + response.setElements(handler.getDataFlowSuppliers(userId, + dataConsumerGUID, + startFrom, + pageSize, + forLineage, + forDuplicateProcessing, + requestBody.getEffectiveTime(), + methodName)); } else { - response.setElementList(handler.getDataFlowSuppliers(userId, - dataConsumerGUID, - startFrom, - pageSize, - forLineage, - forDuplicateProcessing, - new Date(), - methodName)); + response.setElements(handler.getDataFlowSuppliers(userId, + dataConsumerGUID, + startFrom, + pageSize, + forLineage, + forDuplicateProcessing, + new Date(), + methodName)); } } catch (Exception error) @@ -2822,8 +2831,8 @@ public GUIDResponse setupControlFlow(String serverName, if ((requestBody != null) && (requestBody.getProperties() instanceof ControlFlowProperties properties)) { response.setGUID(handler.setupControlFlow(userId, - requestBody.getAssetManagerGUID(), - requestBody.getAssetManagerName(), + requestBody.getExternalSourceGUID(), + requestBody.getExternalSourceName(), assetManagerIsHome, currentStepGUID, nextStepGUID, @@ -2978,8 +2987,8 @@ public VoidResponse updateControlFlow(String serverName, if ((requestBody != null) && (requestBody.getProperties() instanceof ControlFlowProperties properties)) { handler.updateControlFlow(userId, - requestBody.getAssetManagerGUID(), - requestBody.getAssetManagerName(), + requestBody.getExternalSourceGUID(), + requestBody.getExternalSourceName(), controlFlowGUID, properties.getQualifiedName(), properties.getDescription(), @@ -3117,25 +3126,25 @@ public ControlFlowElementsResponse getControlFlowNextSteps(String if (requestBody != null) { - response.setElementList(handler.getControlFlowNextSteps(userId, - currentStepGUID, - startFrom, - pageSize, - forLineage, - forDuplicateProcessing, - requestBody.getEffectiveTime(), - methodName)); + response.setElements(handler.getControlFlowNextSteps(userId, + currentStepGUID, + startFrom, + pageSize, + forLineage, + forDuplicateProcessing, + requestBody.getEffectiveTime(), + methodName)); } else { - response.setElementList(handler.getControlFlowNextSteps(userId, - currentStepGUID, - startFrom, - pageSize, - forLineage, - forDuplicateProcessing, - new Date(), - methodName)); + response.setElements(handler.getControlFlowNextSteps(userId, + currentStepGUID, + startFrom, + pageSize, + forLineage, + forDuplicateProcessing, + new Date(), + methodName)); } } catch (Exception error) @@ -3190,25 +3199,25 @@ public ControlFlowElementsResponse getControlFlowPreviousSteps(String if (requestBody != null) { - response.setElementList(handler.getControlFlowPreviousSteps(userId, - currentStepGUID, - startFrom, - pageSize, - forLineage, - forDuplicateProcessing, - requestBody.getEffectiveTime(), - methodName)); + response.setElements(handler.getControlFlowPreviousSteps(userId, + currentStepGUID, + startFrom, + pageSize, + forLineage, + forDuplicateProcessing, + requestBody.getEffectiveTime(), + methodName)); } else { - response.setElementList(handler.getControlFlowPreviousSteps(userId, - currentStepGUID, - startFrom, - pageSize, - forLineage, - forDuplicateProcessing, - new Date(), - methodName)); + response.setElements(handler.getControlFlowPreviousSteps(userId, + currentStepGUID, + startFrom, + pageSize, + forLineage, + forDuplicateProcessing, + new Date(), + methodName)); } } catch (Exception error) @@ -3264,8 +3273,8 @@ public GUIDResponse setupProcessCall(String serverName, if ((requestBody != null) && (requestBody.getProperties() instanceof ProcessCallProperties properties)) { response.setGUID(handler.setupProcessCall(userId, - requestBody.getAssetManagerGUID(), - requestBody.getAssetManagerName(), + requestBody.getExternalSourceGUID(), + requestBody.getExternalSourceName(), assetManagerIsHome, callerGUID, calledGUID, @@ -3420,8 +3429,8 @@ public VoidResponse updateProcessCall(String serverName, if ((requestBody != null) && (requestBody.getProperties() instanceof ProcessCallProperties properties)) { handler.updateProcessCall(userId, - requestBody.getAssetManagerGUID(), - requestBody.getAssetManagerName(), + requestBody.getExternalSourceGUID(), + requestBody.getExternalSourceName(), processCallGUID, properties.getQualifiedName(), properties.getDescription(), @@ -3559,25 +3568,25 @@ public ProcessCallElementsResponse getProcessCalled(String if (requestBody != null) { - response.setElementList(handler.getProcessCalled(userId, - callerGUID, - startFrom, - pageSize, - forLineage, - forDuplicateProcessing, - requestBody.getEffectiveTime(), - methodName)); + response.setElements(handler.getProcessCalled(userId, + callerGUID, + startFrom, + pageSize, + forLineage, + forDuplicateProcessing, + requestBody.getEffectiveTime(), + methodName)); } else { - response.setElementList(handler.getProcessCalled(userId, - callerGUID, - startFrom, - pageSize, - forLineage, - forDuplicateProcessing, - new Date(), - methodName)); + response.setElements(handler.getProcessCalled(userId, + callerGUID, + startFrom, + pageSize, + forLineage, + forDuplicateProcessing, + new Date(), + methodName)); } } catch (Exception error) @@ -3632,25 +3641,25 @@ public ProcessCallElementsResponse getProcessCallers(String if (requestBody != null) { - response.setElementList(handler.getProcessCallers(userId, - calledGUID, - startFrom, - pageSize, - forLineage, - forDuplicateProcessing, - requestBody.getEffectiveTime(), - methodName)); + response.setElements(handler.getProcessCallers(userId, + calledGUID, + startFrom, + pageSize, + forLineage, + forDuplicateProcessing, + requestBody.getEffectiveTime(), + methodName)); } else { - response.setElementList(handler.getProcessCallers(userId, - calledGUID, - startFrom, - pageSize, - forLineage, - forDuplicateProcessing, - new Date(), - methodName)); + response.setElements(handler.getProcessCallers(userId, + calledGUID, + startFrom, + pageSize, + forLineage, + forDuplicateProcessing, + new Date(), + methodName)); } } catch (Exception error) @@ -3709,8 +3718,8 @@ public GUIDResponse setupLineageMapping(String serverName, if (requestBody.getProperties() instanceof DataFlowProperties properties) { guid = handler.setupLineageMapping(userId, - requestBody.getAssetManagerGUID(), - requestBody.getAssetManagerName(), + requestBody.getExternalSourceGUID(), + requestBody.getExternalSourceName(), sourceElementGUID, destinationElementGUID, properties.getQualifiedName(), @@ -3811,13 +3820,13 @@ public LineageMappingElementResponse getLineageMapping(String serverNam if (requestBody != null) { response.setElement(handler.getLineageMapping(userId, - sourceElementGUID, - destinationElementGUID, - requestBody.getName(), - forLineage, - forDuplicateProcessing, - requestBody.getEffectiveTime(), - methodName)); + sourceElementGUID, + destinationElementGUID, + requestBody.getName(), + forLineage, + forDuplicateProcessing, + requestBody.getEffectiveTime(), + methodName)); } else { @@ -3880,17 +3889,17 @@ public VoidResponse updateLineageMapping(String serverName, if ((requestBody != null) && (requestBody.getProperties() instanceof LineageMappingProperties properties)) { handler.updateLineageMapping(userId, - requestBody.getAssetManagerGUID(), - requestBody.getAssetManagerName(), - lineageMappingGUID, - properties.getQualifiedName(), - properties.getDescription(), - properties.getEffectiveFrom(), - properties.getEffectiveTo(), - forLineage, - forDuplicateProcessing, - requestBody.getEffectiveTime(), - methodName); + requestBody.getExternalSourceGUID(), + requestBody.getExternalSourceName(), + lineageMappingGUID, + properties.getQualifiedName(), + properties.getDescription(), + properties.getEffectiveFrom(), + properties.getEffectiveTo(), + forLineage, + forDuplicateProcessing, + requestBody.getEffectiveTime(), + methodName); } else { @@ -4018,25 +4027,25 @@ public LineageMappingElementsResponse getDestinationLineageMappings(String if (requestBody != null) { - response.setElementList(handler.getDestinationLineageMappings(userId, - sourceElementGUID, - startFrom, - pageSize, - forLineage, - forDuplicateProcessing, - requestBody.getEffectiveTime(), - methodName)); + response.setElements(handler.getDestinationLineageMappings(userId, + sourceElementGUID, + startFrom, + pageSize, + forLineage, + forDuplicateProcessing, + requestBody.getEffectiveTime(), + methodName)); } else { - response.setElementList(handler.getDestinationLineageMappings(userId, - sourceElementGUID, - startFrom, - pageSize, - forLineage, - forDuplicateProcessing, - new Date(), - methodName)); + response.setElements(handler.getDestinationLineageMappings(userId, + sourceElementGUID, + startFrom, + pageSize, + forLineage, + forDuplicateProcessing, + new Date(), + methodName)); } } catch (Exception error) @@ -4091,25 +4100,25 @@ public LineageMappingElementsResponse getSourceLineageMappings(String if (requestBody != null) { - response.setElementList(handler.getSourceLineageMappings(userId, - destinationElementGUID, - startFrom, - pageSize, - forLineage, - forDuplicateProcessing, - requestBody.getEffectiveTime(), - methodName)); + response.setElements(handler.getSourceLineageMappings(userId, + destinationElementGUID, + startFrom, + pageSize, + forLineage, + forDuplicateProcessing, + requestBody.getEffectiveTime(), + methodName)); } else { - response.setElementList(handler.getSourceLineageMappings(userId, - destinationElementGUID, - startFrom, - pageSize, - forLineage, - forDuplicateProcessing, - new Date(), - methodName)); + response.setElements(handler.getSourceLineageMappings(userId, + destinationElementGUID, + startFrom, + pageSize, + forLineage, + forDuplicateProcessing, + new Date(), + methodName)); } } catch (Exception error) diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/server/SchemaExchangeRESTServices.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/server/SchemaExchangeRESTServices.java index bb23c0df0a1..1cfd54254c2 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/server/SchemaExchangeRESTServices.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/server/SchemaExchangeRESTServices.java @@ -5,11 +5,22 @@ import org.odpi.openmetadata.accessservices.assetmanager.handlers.SchemaExchangeHandler; import org.odpi.openmetadata.accessservices.assetmanager.rest.*; +import org.odpi.openmetadata.accessservices.assetmanager.rest.CalculatedValueClassificationRequestBody; +import org.odpi.openmetadata.accessservices.assetmanager.rest.EffectiveTimeQueryRequestBody; +import org.odpi.openmetadata.accessservices.assetmanager.rest.NameRequestBody; +import org.odpi.openmetadata.accessservices.assetmanager.rest.SchemaAttributeElementResponse; +import org.odpi.openmetadata.accessservices.assetmanager.rest.SchemaAttributeElementsResponse; +import org.odpi.openmetadata.accessservices.assetmanager.rest.SchemaAttributeRequestBody; +import org.odpi.openmetadata.accessservices.assetmanager.rest.SchemaTypeElementResponse; +import org.odpi.openmetadata.accessservices.assetmanager.rest.SchemaTypeElementsResponse; +import org.odpi.openmetadata.accessservices.assetmanager.rest.SchemaTypeRequestBody; +import org.odpi.openmetadata.accessservices.assetmanager.rest.SearchStringRequestBody; +import org.odpi.openmetadata.accessservices.assetmanager.rest.TemplateRequestBody; +import org.odpi.openmetadata.accessservices.assetmanager.rest.UpdateRequestBody; import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.slf4j.LoggerFactory; @@ -254,7 +265,7 @@ public VoidResponse setupSchemaTypeParent(String serverNa boolean assetManagerIsHome, boolean forLineage, boolean forDuplicateProcessing, - RelationshipRequestBody requestBody) + RelationshipRequestBody requestBody) { final String methodName = "setupSchemaTypeParent"; @@ -274,8 +285,8 @@ public VoidResponse setupSchemaTypeParent(String serverNa if (requestBody.getProperties() != null) { handler.setupSchemaTypeParent(userId, - requestBody.getAssetManagerGUID(), - requestBody.getAssetManagerName(), + requestBody.getExternalSourceGUID(), + requestBody.getExternalSourceName(), assetManagerIsHome, schemaTypeGUID, parentElementGUID, @@ -290,8 +301,8 @@ public VoidResponse setupSchemaTypeParent(String serverNa else { handler.setupSchemaTypeParent(userId, - requestBody.getAssetManagerGUID(), - requestBody.getAssetManagerName(), + requestBody.getExternalSourceGUID(), + requestBody.getExternalSourceName(), assetManagerIsHome, schemaTypeGUID, parentElementGUID, @@ -435,8 +446,8 @@ public VoidResponse setupSchemaElementRelationship(String serve if (requestBody.getProperties() != null) { handler.setupSchemaElementRelationship(userId, - requestBody.getAssetManagerGUID(), - requestBody.getAssetManagerName(), + requestBody.getExternalSourceGUID(), + requestBody.getExternalSourceName(), assetManagerIsHome, endOneGUID, endTwoGUID, @@ -452,8 +463,8 @@ public VoidResponse setupSchemaElementRelationship(String serve else { handler.setupSchemaElementRelationship(userId, - requestBody.getAssetManagerGUID(), - requestBody.getAssetManagerName(), + requestBody.getExternalSourceGUID(), + requestBody.getExternalSourceName(), assetManagerIsHome, endOneGUID, endTwoGUID, @@ -1299,8 +1310,8 @@ public VoidResponse setupColumnAsPrimaryKey(String SchemaExchangeHandler handler = instanceHandler.getSchemaExchangeHandler(userId, serverName, methodName); handler.setupColumnAsPrimaryKey(userId, - requestBody.getAssetManagerGUID(), - requestBody.getAssetManagerName(), + requestBody.getExternalSourceGUID(), + requestBody.getExternalSourceName(), assetManagerIsHome, schemaAttributeGUID, requestBody.getPrimaryKeyProperties().getName(), diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/server/StewardshipExchangeRESTServices.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/server/StewardshipExchangeRESTServices.java index ece368371f4..bd46b26e9b5 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/server/StewardshipExchangeRESTServices.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-server/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/server/StewardshipExchangeRESTServices.java @@ -7,39 +7,33 @@ import org.odpi.openmetadata.accessservices.assetmanager.handlers.GlossaryExchangeHandler; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.AssetElement; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.GovernanceDefinitionElement; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.RelatedElement; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.SoftwareCapabilityElement; -import org.odpi.openmetadata.accessservices.assetmanager.properties.AssetOriginProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.DataFieldValuesProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.FindAssetOriginProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.FindNameProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.GovernanceClassificationProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.LevelIdentifierProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.OwnerProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.RetentionClassificationProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.SecurityTagsProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.SemanticAssignmentProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.SubjectAreaMemberProperties; +import org.odpi.openmetadata.commonservices.ffdc.rest.ElementStubsResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.RelatedElementsResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.RelationshipRequestBody; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.RelatedElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.FindNameProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.AssetOriginProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.*; import org.odpi.openmetadata.accessservices.assetmanager.rest.AssetElementsResponse; import org.odpi.openmetadata.accessservices.assetmanager.rest.ClassificationRequestBody; import org.odpi.openmetadata.accessservices.assetmanager.rest.EffectiveTimeQueryRequestBody; -import org.odpi.openmetadata.accessservices.assetmanager.rest.ElementStubsResponse; import org.odpi.openmetadata.accessservices.assetmanager.rest.FindByPropertiesRequestBody; import org.odpi.openmetadata.accessservices.assetmanager.rest.GlossaryTermElementsResponse; import org.odpi.openmetadata.accessservices.assetmanager.rest.GovernanceDefinitionsResponse; -import org.odpi.openmetadata.accessservices.assetmanager.rest.RelatedElementsResponse; -import org.odpi.openmetadata.accessservices.assetmanager.rest.RelationshipRequestBody; import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; import org.odpi.openmetadata.commonservices.generichandlers.AssetHandler; import org.odpi.openmetadata.commonservices.generichandlers.GovernanceDefinitionHandler; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.DataFieldValuesProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.security.SecurityTagsProperties; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.commonservices.generichandlers.ReferenceableHandler; import org.odpi.openmetadata.commonservices.generichandlers.SoftwareCapabilityHandler; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementStub; import org.slf4j.LoggerFactory; @@ -249,12 +243,12 @@ public VoidResponse clearDataFieldClassification(String serve * UserNotAuthorizedException security access problem */ public ElementStubsResponse getDataFieldClassifiedElements(String serverName, - String userId, - int startFrom, - int pageSize, - boolean forLineage, - boolean forDuplicateProcessing, - FindByPropertiesRequestBody requestBody) + String userId, + int startFrom, + int pageSize, + boolean forLineage, + boolean forDuplicateProcessing, + FindByPropertiesRequestBody requestBody) { final String methodName = "getConfidenceClassifiedElements"; @@ -272,29 +266,29 @@ public ElementStubsResponse getDataFieldClassifiedElements(String { if (requestBody.getProperties() instanceof LevelIdentifierProperties properties) { - response.setElementList(handler.getGovernanceActionClassifiedElements(userId, - OpenMetadataType.CONFIDENCE_CLASSIFICATION.typeName, - properties.getReturnSpecificLevel(), - properties.getLevelIdentifier(), - startFrom, - pageSize, - forLineage, - forDuplicateProcessing, - requestBody.getEffectiveTime(), - methodName)); + response.setElements(handler.getGovernanceActionClassifiedElements(userId, + OpenMetadataType.CONFIDENCE_CLASSIFICATION.typeName, + properties.getReturnSpecificLevel(), + properties.getLevelIdentifier(), + startFrom, + pageSize, + forLineage, + forDuplicateProcessing, + requestBody.getEffectiveTime(), + methodName)); } else if (requestBody.getProperties() == null) { - response.setElementList(handler.getGovernanceActionClassifiedElements(userId, - OpenMetadataType.CONFIDENCE_CLASSIFICATION.typeName, - false, - 0, - startFrom, - pageSize, - forLineage, - forDuplicateProcessing, - requestBody.getEffectiveTime(), - methodName)); + response.setElements(handler.getGovernanceActionClassifiedElements(userId, + OpenMetadataType.CONFIDENCE_CLASSIFICATION.typeName, + false, + 0, + startFrom, + pageSize, + forLineage, + forDuplicateProcessing, + requestBody.getEffectiveTime(), + methodName)); } else { @@ -303,16 +297,16 @@ else if (requestBody.getProperties() == null) } else { - response.setElementList(handler.getGovernanceActionClassifiedElements(userId, - OpenMetadataType.CONFIDENCE_CLASSIFICATION.typeName, - false, - 0, - startFrom, - pageSize, - forLineage, - forDuplicateProcessing, - null, - methodName)); + response.setElements(handler.getGovernanceActionClassifiedElements(userId, + OpenMetadataType.CONFIDENCE_CLASSIFICATION.typeName, + false, + 0, + startFrom, + pageSize, + forLineage, + forDuplicateProcessing, + null, + methodName)); } } catch (Exception error) @@ -574,29 +568,29 @@ public ElementStubsResponse getConfidenceClassifiedElements(String { if (requestBody.getProperties() instanceof LevelIdentifierProperties properties) { - response.setElementList(handler.getGovernanceActionClassifiedElements(userId, - OpenMetadataType.CONFIDENCE_CLASSIFICATION.typeName, - properties.getReturnSpecificLevel(), - properties.getLevelIdentifier(), - startFrom, - pageSize, - forLineage, - forDuplicateProcessing, - requestBody.getEffectiveTime(), - methodName)); + response.setElements(handler.getGovernanceActionClassifiedElements(userId, + OpenMetadataType.CONFIDENCE_CLASSIFICATION.typeName, + properties.getReturnSpecificLevel(), + properties.getLevelIdentifier(), + startFrom, + pageSize, + forLineage, + forDuplicateProcessing, + requestBody.getEffectiveTime(), + methodName)); } else if (requestBody.getProperties() == null) { - response.setElementList(handler.getGovernanceActionClassifiedElements(userId, - OpenMetadataType.CONFIDENCE_CLASSIFICATION.typeName, - false, - 0, - startFrom, - pageSize, - forLineage, - forDuplicateProcessing, - requestBody.getEffectiveTime(), - methodName)); + response.setElements(handler.getGovernanceActionClassifiedElements(userId, + OpenMetadataType.CONFIDENCE_CLASSIFICATION.typeName, + false, + 0, + startFrom, + pageSize, + forLineage, + forDuplicateProcessing, + requestBody.getEffectiveTime(), + methodName)); } else { @@ -605,16 +599,16 @@ else if (requestBody.getProperties() == null) } else { - response.setElementList(handler.getGovernanceActionClassifiedElements(userId, - OpenMetadataType.CONFIDENCE_CLASSIFICATION.typeName, - false, - 0, - startFrom, - pageSize, - forLineage, - forDuplicateProcessing, - null, - methodName)); + response.setElements(handler.getGovernanceActionClassifiedElements(userId, + OpenMetadataType.CONFIDENCE_CLASSIFICATION.typeName, + false, + 0, + startFrom, + pageSize, + forLineage, + forDuplicateProcessing, + null, + methodName)); } } catch (Exception error) @@ -875,29 +869,29 @@ public ElementStubsResponse getCriticalityClassifiedElements(String { if (requestBody.getProperties() instanceof LevelIdentifierProperties properties) { - response.setElementList(handler.getGovernanceActionClassifiedElements(userId, - OpenMetadataType.CRITICALITY_CLASSIFICATION.typeName, - properties.getReturnSpecificLevel(), - properties.getLevelIdentifier(), - startFrom, - pageSize, - forLineage, - forDuplicateProcessing, - requestBody.getEffectiveTime(), - methodName)); + response.setElements(handler.getGovernanceActionClassifiedElements(userId, + OpenMetadataType.CRITICALITY_CLASSIFICATION.typeName, + properties.getReturnSpecificLevel(), + properties.getLevelIdentifier(), + startFrom, + pageSize, + forLineage, + forDuplicateProcessing, + requestBody.getEffectiveTime(), + methodName)); } else if (requestBody.getProperties() == null) { - response.setElementList(handler.getGovernanceActionClassifiedElements(userId, - OpenMetadataType.CRITICALITY_CLASSIFICATION.typeName, - false, - 0, - startFrom, - pageSize, - forLineage, - forDuplicateProcessing, - requestBody.getEffectiveTime(), - methodName)); + response.setElements(handler.getGovernanceActionClassifiedElements(userId, + OpenMetadataType.CRITICALITY_CLASSIFICATION.typeName, + false, + 0, + startFrom, + pageSize, + forLineage, + forDuplicateProcessing, + requestBody.getEffectiveTime(), + methodName)); } else { @@ -906,16 +900,16 @@ else if (requestBody.getProperties() == null) } else { - response.setElementList(handler.getGovernanceActionClassifiedElements(userId, - OpenMetadataType.CRITICALITY_CLASSIFICATION.typeName, - false, - 0, - startFrom, - pageSize, - forLineage, - forDuplicateProcessing, - null, - methodName)); + response.setElements(handler.getGovernanceActionClassifiedElements(userId, + OpenMetadataType.CRITICALITY_CLASSIFICATION.typeName, + false, + 0, + startFrom, + pageSize, + forLineage, + forDuplicateProcessing, + null, + methodName)); } } catch (Exception error) @@ -1178,29 +1172,29 @@ public ElementStubsResponse getConfidentialityClassifiedElements(String { if (requestBody.getProperties() instanceof LevelIdentifierProperties properties) { - response.setElementList(handler.getGovernanceActionClassifiedElements(userId, - OpenMetadataType.CONFIDENTIALITY_CLASSIFICATION.typeName, - properties.getReturnSpecificLevel(), - properties.getLevelIdentifier(), - startFrom, - pageSize, - forLineage, - forDuplicateProcessing, - requestBody.getEffectiveTime(), - methodName)); + response.setElements(handler.getGovernanceActionClassifiedElements(userId, + OpenMetadataType.CONFIDENTIALITY_CLASSIFICATION.typeName, + properties.getReturnSpecificLevel(), + properties.getLevelIdentifier(), + startFrom, + pageSize, + forLineage, + forDuplicateProcessing, + requestBody.getEffectiveTime(), + methodName)); } else if (requestBody.getProperties() == null) { - response.setElementList(handler.getGovernanceActionClassifiedElements(userId, - OpenMetadataType.CONFIDENTIALITY_CLASSIFICATION.typeName, - false, - 0, - startFrom, - pageSize, - forLineage, - forDuplicateProcessing, - requestBody.getEffectiveTime(), - methodName)); + response.setElements(handler.getGovernanceActionClassifiedElements(userId, + OpenMetadataType.CONFIDENTIALITY_CLASSIFICATION.typeName, + false, + 0, + startFrom, + pageSize, + forLineage, + forDuplicateProcessing, + requestBody.getEffectiveTime(), + methodName)); } else { @@ -1209,16 +1203,16 @@ else if (requestBody.getProperties() == null) } else { - response.setElementList(handler.getGovernanceActionClassifiedElements(userId, - OpenMetadataType.CONFIDENTIALITY_CLASSIFICATION.typeName, - false, - 0, - startFrom, - pageSize, - forLineage, - forDuplicateProcessing, - null, - methodName)); + response.setElements(handler.getGovernanceActionClassifiedElements(userId, + OpenMetadataType.CONFIDENTIALITY_CLASSIFICATION.typeName, + false, + 0, + startFrom, + pageSize, + forLineage, + forDuplicateProcessing, + null, + methodName)); } } catch (Exception error) @@ -1476,27 +1470,27 @@ public ElementStubsResponse getRetentionClassifiedElements(String { if (requestBody.getProperties() instanceof LevelIdentifierProperties properties) { - response.setElementList(handler.getRetentionClassifiedElements(userId, - properties.getReturnSpecificLevel(), - properties.getLevelIdentifier(), - startFrom, - pageSize, - forLineage, - forDuplicateProcessing, - requestBody.getEffectiveTime(), - methodName)); + response.setElements(handler.getRetentionClassifiedElements(userId, + properties.getReturnSpecificLevel(), + properties.getLevelIdentifier(), + startFrom, + pageSize, + forLineage, + forDuplicateProcessing, + requestBody.getEffectiveTime(), + methodName)); } else if (requestBody.getProperties() == null) { - response.setElementList(handler.getRetentionClassifiedElements(userId, - false, - 0, - startFrom, - pageSize, - forLineage, - forDuplicateProcessing, - requestBody.getEffectiveTime(), - methodName)); + response.setElements(handler.getRetentionClassifiedElements(userId, + false, + 0, + startFrom, + pageSize, + forLineage, + forDuplicateProcessing, + requestBody.getEffectiveTime(), + methodName)); } else { @@ -1505,15 +1499,15 @@ else if (requestBody.getProperties() == null) } else { - response.setElementList(handler.getRetentionClassifiedElements(userId, - false, - 0, - startFrom, - pageSize, - forLineage, - forDuplicateProcessing, - null, - methodName)); + response.setElements(handler.getRetentionClassifiedElements(userId, + false, + 0, + startFrom, + pageSize, + forLineage, + forDuplicateProcessing, + null, + methodName)); } } catch (Exception error) @@ -1705,23 +1699,23 @@ public ElementStubsResponse getSecurityTaggedElements(String if (requestBody != null) { - response.setElementList(handler.getSecurityTagsClassifiedElements(userId, - startFrom, - pageSize, - forLineage, - forDuplicateProcessing, - requestBody.getEffectiveTime(), - methodName)); + response.setElements(handler.getSecurityTagsClassifiedElements(userId, + startFrom, + pageSize, + forLineage, + forDuplicateProcessing, + requestBody.getEffectiveTime(), + methodName)); } else { - response.setElementList(handler.getSecurityTagsClassifiedElements(userId, - startFrom, - pageSize, - forLineage, - forDuplicateProcessing, - null, - methodName)); + response.setElements(handler.getSecurityTagsClassifiedElements(userId, + startFrom, + pageSize, + forLineage, + forDuplicateProcessing, + null, + methodName)); } } catch (Exception error) @@ -1914,25 +1908,25 @@ public ElementStubsResponse getOwnersElements(String server { if (requestBody.getProperties() instanceof FindNameProperties properties) { - response.setElementList(handler.getOwnersElements(userId, - properties.getName(), - startFrom, - pageSize, - forLineage, - forDuplicateProcessing, - requestBody.getEffectiveTime(), - methodName)); + response.setElements(handler.getOwnersElements(userId, + properties.getName(), + startFrom, + pageSize, + forLineage, + forDuplicateProcessing, + requestBody.getEffectiveTime(), + methodName)); } else if (requestBody.getProperties() == null) { - response.setElementList(handler.getOwnersElements(userId, - null, - startFrom, - pageSize, - forLineage, - forDuplicateProcessing, - requestBody.getEffectiveTime(), - methodName)); + response.setElements(handler.getOwnersElements(userId, + null, + startFrom, + pageSize, + forLineage, + forDuplicateProcessing, + requestBody.getEffectiveTime(), + methodName)); } else { @@ -1941,14 +1935,14 @@ else if (requestBody.getProperties() == null) } else { - response.setElementList(handler.getOwnersElements(userId, - null, - startFrom, - pageSize, - forLineage, - forDuplicateProcessing, - null, - methodName)); + response.setElements(handler.getOwnersElements(userId, + null, + startFrom, + pageSize, + forLineage, + forDuplicateProcessing, + null, + methodName)); } } catch (Exception error) @@ -2234,7 +2228,7 @@ public VoidResponse addElementToSubjectArea(String serverName if (requestBody != null) { - if (requestBody.getProperties() instanceof SubjectAreaMemberProperties properties) + if (requestBody.getProperties() instanceof SubjectAreaClassificationProperties properties) { SoftwareCapabilityHandler handler = instanceHandler.getAssetManagerHandler(userId, serverName, methodName); @@ -2273,7 +2267,7 @@ public VoidResponse addElementToSubjectArea(String serverName } else { - restExceptionHandler.handleInvalidPropertiesObject(SubjectAreaMemberProperties.class.getName(), methodName); + restExceptionHandler.handleInvalidPropertiesObject(SubjectAreaClassificationProperties.class.getName(), methodName); } } else @@ -2416,25 +2410,25 @@ public ElementStubsResponse getMembersOfSubjectArea(String { if (requestBody.getProperties() instanceof FindNameProperties properties) { - response.setElementList(handler.getSubjectAreaMembers(userId, - properties.getName(), - startFrom, - pageSize, - forLineage, - forDuplicateProcessing, - requestBody.getEffectiveTime(), - methodName)); + response.setElements(handler.getSubjectAreaMembers(userId, + properties.getName(), + startFrom, + pageSize, + forLineage, + forDuplicateProcessing, + requestBody.getEffectiveTime(), + methodName)); } else if (requestBody.getProperties() == null) { - response.setElementList(handler.getSubjectAreaMembers(userId, - null, - startFrom, - pageSize, - forLineage, - forDuplicateProcessing, - requestBody.getEffectiveTime(), - methodName)); + response.setElements(handler.getSubjectAreaMembers(userId, + null, + startFrom, + pageSize, + forLineage, + forDuplicateProcessing, + requestBody.getEffectiveTime(), + methodName)); } else { @@ -2443,14 +2437,14 @@ else if (requestBody.getProperties() == null) } else { - response.setElementList(handler.getSubjectAreaMembers(userId, - null, - startFrom, - pageSize, - forLineage, - forDuplicateProcessing, - null, - methodName)); + response.setElements(handler.getSubjectAreaMembers(userId, + null, + startFrom, + pageSize, + forLineage, + forDuplicateProcessing, + null, + methodName)); } } catch (Exception error) @@ -2515,8 +2509,8 @@ public VoidResponse setupSemanticAssignment(String serverName, } handler.saveSemanticAssignment(userId, - requestBody.getAssetManagerGUID(), - requestBody.getAssetManagerName(), + requestBody.getExternalSourceGUID(), + requestBody.getExternalSourceName(), elementGUID, elementGUIDParameterName, glossaryTermGUID, @@ -2749,29 +2743,29 @@ public RelatedElementsResponse getSemanticAssignees(String if (requestBody == null) { - response.setElementList(handler.getSemanticAssignments(userId, - glossaryTermGUID, - elementGUIDParameterName, - OpenMetadataType.REFERENCEABLE.typeName, - startFrom, - pageSize, - forLineage, - forDuplicateProcessing, - null, - methodName)); + response.setElements(handler.getSemanticAssignments(userId, + glossaryTermGUID, + elementGUIDParameterName, + OpenMetadataType.REFERENCEABLE.typeName, + startFrom, + pageSize, + forLineage, + forDuplicateProcessing, + null, + methodName)); } else { - response.setElementList(handler.getSemanticAssignments(userId, - glossaryTermGUID, - elementGUIDParameterName, - OpenMetadataType.REFERENCEABLE.typeName, - startFrom, - pageSize, - forLineage, - forDuplicateProcessing, - requestBody.getEffectiveTime(), - methodName)); + response.setElements(handler.getSemanticAssignments(userId, + glossaryTermGUID, + elementGUIDParameterName, + OpenMetadataType.REFERENCEABLE.typeName, + startFrom, + pageSize, + forLineage, + forDuplicateProcessing, + requestBody.getEffectiveTime(), + methodName)); } } catch (Exception error) @@ -2829,8 +2823,8 @@ public VoidResponse addGovernanceDefinitionToElement(String ser { handler.addGovernedBy(userId, - requestBody.getAssetManagerGUID(), - requestBody.getAssetManagerName(), + requestBody.getExternalSourceGUID(), + requestBody.getExternalSourceName(), definitionGUID, definitionGUIDParameterName, elementGUID, @@ -2845,8 +2839,8 @@ public VoidResponse addGovernanceDefinitionToElement(String ser else { handler.addGovernedBy(userId, - requestBody.getAssetManagerGUID(), - requestBody.getAssetManagerName(), + requestBody.getExternalSourceGUID(), + requestBody.getExternalSourceName(), definitionGUID, definitionGUIDParameterName, elementGUID, @@ -3005,29 +2999,29 @@ public RelatedElementsResponse getGovernedElements(String if (requestBody == null) { - response.setElementList(handler.getGovernedElements(userId, - governanceDefinitionGUID, - elementGUIDParameterName, - OpenMetadataType.REFERENCEABLE.typeName, - startFrom, - pageSize, - forLineage, - forDuplicateProcessing, - null, - methodName)); + response.setElements(handler.getGovernedElements(userId, + governanceDefinitionGUID, + elementGUIDParameterName, + OpenMetadataType.REFERENCEABLE.typeName, + startFrom, + pageSize, + forLineage, + forDuplicateProcessing, + null, + methodName)); } else { - response.setElementList(handler.getGovernedElements(userId, - governanceDefinitionGUID, - elementGUIDParameterName, - OpenMetadataType.REFERENCEABLE.typeName, - startFrom, - pageSize, - forLineage, - forDuplicateProcessing, - requestBody.getEffectiveTime(), - methodName)); + response.setElements(handler.getGovernedElements(userId, + governanceDefinitionGUID, + elementGUIDParameterName, + OpenMetadataType.REFERENCEABLE.typeName, + startFrom, + pageSize, + forLineage, + forDuplicateProcessing, + requestBody.getEffectiveTime(), + methodName)); } } catch (Exception error) @@ -3160,31 +3154,31 @@ public RelatedElementsResponse getSourceElements(String s if (requestBody == null) { - response.setElementList(handler.getSourceElements(userId, - elementGUID, - elementGUIDParameterName, - OpenMetadataType.REFERENCEABLE.typeName, - OpenMetadataType.REFERENCEABLE.typeName, - startFrom, - pageSize, - forLineage, - forDuplicateProcessing, - null, - methodName)); + response.setElements(handler.getSourceElements(userId, + elementGUID, + elementGUIDParameterName, + OpenMetadataType.REFERENCEABLE.typeName, + OpenMetadataType.REFERENCEABLE.typeName, + startFrom, + pageSize, + forLineage, + forDuplicateProcessing, + null, + methodName)); } else { - response.setElementList(handler.getSourceElements(userId, - elementGUID, - elementGUIDParameterName, - OpenMetadataType.REFERENCEABLE.typeName, - OpenMetadataType.REFERENCEABLE.typeName, - startFrom, - pageSize, - forLineage, - forDuplicateProcessing, - requestBody.getEffectiveTime(), - methodName)); + response.setElements(handler.getSourceElements(userId, + elementGUID, + elementGUIDParameterName, + OpenMetadataType.REFERENCEABLE.typeName, + OpenMetadataType.REFERENCEABLE.typeName, + startFrom, + pageSize, + forLineage, + forDuplicateProcessing, + requestBody.getEffectiveTime(), + methodName)); } } catch (Exception error) @@ -3239,31 +3233,31 @@ public RelatedElementsResponse getElementsSourceFrom(String if (requestBody == null) { - response.setElementList(handler.getElementsSourceFrom(userId, - elementGUID, - elementGUIDParameterName, - OpenMetadataType.REFERENCEABLE.typeName, - OpenMetadataType.REFERENCEABLE.typeName, - startFrom, - pageSize, - forLineage, - forDuplicateProcessing, - null, - methodName)); + response.setElements(handler.getElementsSourceFrom(userId, + elementGUID, + elementGUIDParameterName, + OpenMetadataType.REFERENCEABLE.typeName, + OpenMetadataType.REFERENCEABLE.typeName, + startFrom, + pageSize, + forLineage, + forDuplicateProcessing, + null, + methodName)); } else { - response.setElementList(handler.getElementsSourceFrom(userId, - elementGUID, - elementGUIDParameterName, - OpenMetadataType.REFERENCEABLE.typeName, - OpenMetadataType.REFERENCEABLE.typeName, - startFrom, - pageSize, - forLineage, - forDuplicateProcessing, - requestBody.getEffectiveTime(), - methodName)); + response.setElements(handler.getElementsSourceFrom(userId, + elementGUID, + elementGUIDParameterName, + OpenMetadataType.REFERENCEABLE.typeName, + OpenMetadataType.REFERENCEABLE.typeName, + startFrom, + pageSize, + forLineage, + forDuplicateProcessing, + requestBody.getEffectiveTime(), + methodName)); } } catch (Exception error) diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-spring/build.gradle b/open-metadata-implementation/access-services/asset-manager/asset-manager-spring/build.gradle index 8e75ab1e792..f350eef2101 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-spring/build.gradle +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-spring/build.gradle @@ -7,6 +7,7 @@ dependencies { implementation project(':open-metadata-implementation:access-services:asset-manager:asset-manager-server') implementation project(':open-metadata-implementation:access-services:asset-manager:asset-manager-api') + implementation project(':open-metadata-implementation:frameworks:open-metadata-framework') implementation project(':open-metadata-implementation:frameworks:governance-action-framework') implementation project(':open-metadata-implementation:common-services:ffdc-services') implementation 'org.springframework:spring-web' diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-spring/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/server/spring/AssetManagerOMASResource.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-spring/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/server/spring/AssetManagerOMASResource.java index 0f58788ed0e..e6f1049c064 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-spring/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/server/spring/AssetManagerOMASResource.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-spring/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/server/spring/AssetManagerOMASResource.java @@ -4,16 +4,16 @@ import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.accessservices.assetmanager.properties.AssetManagerProperties; import org.odpi.openmetadata.accessservices.assetmanager.rest.EffectiveTimeQueryRequestBody; -import org.odpi.openmetadata.accessservices.assetmanager.rest.ElementHeadersResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.ElementHeadersResponse; import org.odpi.openmetadata.accessservices.assetmanager.rest.MetadataCorrelationHeadersResponse; import org.odpi.openmetadata.accessservices.assetmanager.rest.UpdateRequestBody; import org.odpi.openmetadata.accessservices.assetmanager.server.AssetManagerRESTServices; -import org.odpi.openmetadata.commonservices.ffdc.rest.ConnectionResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.OCFConnectionResponse; import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; import org.odpi.openmetadata.frameworks.governanceaction.properties.MetadataCorrelationProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities.AssetManagerProperties; import org.springframework.web.bind.annotation.*; /** @@ -54,9 +54,9 @@ public AssetManagerOMASResource() */ @GetMapping(path = "/topics/out-topic-connection/{callerId}") - public ConnectionResponse getOutTopicConnection(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String callerId) + public OCFConnectionResponse getOutTopicConnection(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String callerId) { return restAPI.getOutTopicConnection(serverName, userId, callerId); } @@ -80,7 +80,7 @@ public ConnectionResponse getOutTopicConnection(@PathVariable String serverName, public GUIDResponse createExternalAssetManager(@PathVariable String serverName, @PathVariable String userId, - @RequestBody AssetManagerProperties assetManagerProperties) + @RequestBody AssetManagerProperties assetManagerProperties) { return restAPI.createExternalAssetManager(serverName, userId, assetManagerProperties); } diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-spring/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/server/spring/CollaborationExchangeResource.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-spring/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/server/spring/CollaborationExchangeResource.java index 4b7c3cead3a..538ab542778 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-spring/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/server/spring/CollaborationExchangeResource.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-spring/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/server/spring/CollaborationExchangeResource.java @@ -5,15 +5,11 @@ import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.accessservices.assetmanager.properties.FeedbackProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.LikeProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.RatingProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.TagProperties; import org.odpi.openmetadata.accessservices.assetmanager.rest.CommentElementResponse; import org.odpi.openmetadata.accessservices.assetmanager.rest.CommentElementsResponse; import org.odpi.openmetadata.accessservices.assetmanager.rest.EffectiveTimeQueryRequestBody; import org.odpi.openmetadata.accessservices.assetmanager.rest.InformalTagResponse; -import org.odpi.openmetadata.accessservices.assetmanager.rest.InformalTagUpdateRequestBody; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.odpi.openmetadata.accessservices.assetmanager.rest.InformalTagsResponse; import org.odpi.openmetadata.accessservices.assetmanager.rest.NameRequestBody; import org.odpi.openmetadata.accessservices.assetmanager.rest.NoteElementResponse; @@ -21,13 +17,11 @@ import org.odpi.openmetadata.accessservices.assetmanager.rest.NoteLogElementResponse; import org.odpi.openmetadata.accessservices.assetmanager.rest.NoteLogElementsResponse; import org.odpi.openmetadata.accessservices.assetmanager.rest.ReferenceableUpdateRequestBody; -import org.odpi.openmetadata.accessservices.assetmanager.rest.RelationshipRequestBody; import org.odpi.openmetadata.accessservices.assetmanager.rest.SearchStringRequestBody; import org.odpi.openmetadata.accessservices.assetmanager.server.CollaborationExchangeRESTServices; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDListResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NullRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; +import org.odpi.openmetadata.frameworks.openmetadata.properties.feedback.FeedbackProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.feedback.RatingProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.feedback.TagProperties; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-spring/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/server/spring/ConnectionExchangeResource.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-spring/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/server/spring/ConnectionExchangeResource.java index fe9b4cb6993..e584bb9e9f1 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-spring/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/server/spring/ConnectionExchangeResource.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-spring/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/server/spring/ConnectionExchangeResource.java @@ -7,6 +7,7 @@ import org.odpi.openmetadata.accessservices.assetmanager.rest.*; import org.odpi.openmetadata.accessservices.assetmanager.server.ConnectionExchangeRESTServices; import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.RelationshipRequestBody; import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-spring/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/server/spring/DataAssetExchangeResource.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-spring/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/server/spring/DataAssetExchangeResource.java index 0b0d2aeb170..bbc73c153a7 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-spring/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/server/spring/DataAssetExchangeResource.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-spring/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/server/spring/DataAssetExchangeResource.java @@ -5,9 +5,13 @@ import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.tags.Tag; import org.odpi.openmetadata.accessservices.assetmanager.rest.*; +import org.odpi.openmetadata.accessservices.assetmanager.rest.EffectiveTimeQueryRequestBody; +import org.odpi.openmetadata.accessservices.assetmanager.rest.NameRequestBody; +import org.odpi.openmetadata.accessservices.assetmanager.rest.SearchStringRequestBody; +import org.odpi.openmetadata.accessservices.assetmanager.rest.TemplateRequestBody; +import org.odpi.openmetadata.accessservices.assetmanager.rest.UpdateRequestBody; import org.odpi.openmetadata.accessservices.assetmanager.server.DataAssetExchangeRESTServices; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.springframework.web.bind.annotation.*; /** @@ -313,7 +317,7 @@ public GUIDResponse setupRelatedDataAsset(@PathVariable String boolean forLineage, @RequestParam (required = false, defaultValue = "false") boolean forDuplicateProcessing, - @RequestBody RelationshipRequestBody requestBody) + @RequestBody RelationshipRequestBody requestBody) { return restAPI.setupRelatedDataAsset(serverName, userId, assetManagerIsHome, relationshipTypeName, fromAssetGUID, toAssetGUID, forLineage, forDuplicateProcessing, requestBody); } diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-spring/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/server/spring/GlossaryExchangeResource.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-spring/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/server/spring/GlossaryExchangeResource.java index 2a397ba9716..913c2406c44 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-spring/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/server/spring/GlossaryExchangeResource.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-spring/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/server/spring/GlossaryExchangeResource.java @@ -9,6 +9,7 @@ import org.odpi.openmetadata.accessservices.assetmanager.server.GlossaryExchangeRESTServices; import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; import org.odpi.openmetadata.commonservices.ffdc.rest.NameListResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.RelationshipRequestBody; import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; @@ -752,7 +753,7 @@ public VoidResponse setupCategoryParent(@PathVariable String @RequestParam (required = false, defaultValue = "false") boolean forDuplicateProcessing, @RequestBody(required = false) - RelationshipRequestBody requestBody) + RelationshipRequestBody requestBody) { return restAPI.setupCategoryParent(serverName, userId, glossaryParentCategoryGUID, glossaryChildCategoryGUID, forLineage, forDuplicateProcessing, requestBody); } diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-spring/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/server/spring/LineageExchangeResource.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-spring/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/server/spring/LineageExchangeResource.java index 3b1ba868d96..74917821201 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-spring/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/server/spring/LineageExchangeResource.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-spring/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/server/spring/LineageExchangeResource.java @@ -4,10 +4,20 @@ import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.accessservices.assetmanager.rest.*; +import org.odpi.openmetadata.accessservices.assetmanager.rest.EffectiveTimeQueryRequestBody; +import org.odpi.openmetadata.accessservices.assetmanager.rest.NameRequestBody; +import org.odpi.openmetadata.accessservices.assetmanager.rest.PortElementResponse; +import org.odpi.openmetadata.accessservices.assetmanager.rest.PortElementsResponse; +import org.odpi.openmetadata.accessservices.assetmanager.rest.PortRequestBody; +import org.odpi.openmetadata.accessservices.assetmanager.rest.ProcessElementResponse; +import org.odpi.openmetadata.accessservices.assetmanager.rest.ProcessElementsResponse; +import org.odpi.openmetadata.accessservices.assetmanager.rest.ProcessRequestBody; +import org.odpi.openmetadata.accessservices.assetmanager.rest.ProcessStatusRequestBody; +import org.odpi.openmetadata.accessservices.assetmanager.rest.SearchStringRequestBody; +import org.odpi.openmetadata.accessservices.assetmanager.rest.TemplateRequestBody; +import org.odpi.openmetadata.accessservices.assetmanager.rest.UpdateRequestBody; import org.odpi.openmetadata.accessservices.assetmanager.server.LineageExchangeRESTServices; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.springframework.web.bind.annotation.*; /** @@ -36,7 +46,7 @@ public LineageExchangeResource() /* ===================================================================================================================== - * A process describes a well defined series of steps that gets something done. + * A process describes a well-defined series of steps that gets something done. */ /** @@ -179,7 +189,7 @@ public VoidResponse setupProcessParent(@PathVariable String boolean forLineage, @RequestParam (required = false, defaultValue = "false") boolean forDuplicateProcessing, - @RequestBody RelationshipRequestBody requestBody) + @RequestBody RelationshipRequestBody requestBody) { return restAPI.setupProcessParent(serverName, userId, parentProcessGUID, childProcessGUID, assetManagerIsHome, forLineage, forDuplicateProcessing, requestBody); } diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-spring/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/server/spring/SchemaExchangeResource.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-spring/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/server/spring/SchemaExchangeResource.java index 15c75431242..f9450332362 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-spring/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/server/spring/SchemaExchangeResource.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-spring/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/server/spring/SchemaExchangeResource.java @@ -5,9 +5,20 @@ import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.tags.Tag; import org.odpi.openmetadata.accessservices.assetmanager.rest.*; +import org.odpi.openmetadata.accessservices.assetmanager.rest.CalculatedValueClassificationRequestBody; +import org.odpi.openmetadata.accessservices.assetmanager.rest.EffectiveTimeQueryRequestBody; +import org.odpi.openmetadata.accessservices.assetmanager.rest.NameRequestBody; +import org.odpi.openmetadata.accessservices.assetmanager.rest.SchemaAttributeElementResponse; +import org.odpi.openmetadata.accessservices.assetmanager.rest.SchemaAttributeElementsResponse; +import org.odpi.openmetadata.accessservices.assetmanager.rest.SchemaAttributeRequestBody; +import org.odpi.openmetadata.accessservices.assetmanager.rest.SchemaTypeElementResponse; +import org.odpi.openmetadata.accessservices.assetmanager.rest.SchemaTypeElementsResponse; +import org.odpi.openmetadata.accessservices.assetmanager.rest.SchemaTypeRequestBody; +import org.odpi.openmetadata.accessservices.assetmanager.rest.SearchStringRequestBody; +import org.odpi.openmetadata.accessservices.assetmanager.rest.TemplateRequestBody; +import org.odpi.openmetadata.accessservices.assetmanager.rest.UpdateRequestBody; import org.odpi.openmetadata.accessservices.assetmanager.server.SchemaExchangeRESTServices; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.springframework.web.bind.annotation.*; /** @@ -161,7 +172,7 @@ public VoidResponse setupSchemaTypeParent(@PathVariable String boolean forLineage, @RequestParam (required = false, defaultValue = "false") boolean forDuplicateProcessing, - @RequestBody RelationshipRequestBody requestBody) + @RequestBody RelationshipRequestBody requestBody) { return restAPI.setupSchemaTypeParent(serverName, userId, parentElementGUID, parentElementTypeName, schemaTypeGUID, assetManagerIsHome, forLineage, forDuplicateProcessing, requestBody); } @@ -652,7 +663,7 @@ public VoidResponse setupColumnAsPrimaryKey(@PathVariable String boolean forLineage, @RequestParam (required = false, defaultValue = "false") boolean forDuplicateProcessing, - @RequestBody PrimaryKeyClassificationRequestBody requestBody) + @RequestBody PrimaryKeyClassificationRequestBody requestBody) { return restAPI.setupColumnAsPrimaryKey(serverName, userId, schemaAttributeGUID, assetManagerIsHome, forLineage, forDuplicateProcessing, requestBody); } diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-spring/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/server/spring/StewardshipExchangeResource.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-spring/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/server/spring/StewardshipExchangeResource.java index b9339037bde..4b307744588 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-spring/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/server/spring/StewardshipExchangeResource.java +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-spring/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/server/spring/StewardshipExchangeResource.java @@ -7,13 +7,13 @@ import org.odpi.openmetadata.accessservices.assetmanager.rest.AssetElementsResponse; import org.odpi.openmetadata.accessservices.assetmanager.rest.ClassificationRequestBody; import org.odpi.openmetadata.accessservices.assetmanager.rest.EffectiveTimeQueryRequestBody; -import org.odpi.openmetadata.accessservices.assetmanager.rest.ElementStubsResponse; import org.odpi.openmetadata.accessservices.assetmanager.rest.FindByPropertiesRequestBody; import org.odpi.openmetadata.accessservices.assetmanager.rest.GlossaryTermElementsResponse; import org.odpi.openmetadata.accessservices.assetmanager.rest.GovernanceDefinitionsResponse; -import org.odpi.openmetadata.accessservices.assetmanager.rest.RelatedElementsResponse; -import org.odpi.openmetadata.accessservices.assetmanager.rest.RelationshipRequestBody; import org.odpi.openmetadata.accessservices.assetmanager.server.StewardshipExchangeRESTServices; +import org.odpi.openmetadata.commonservices.ffdc.rest.ElementStubsResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.RelatedElementsResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.RelationshipRequestBody; import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; @@ -138,7 +138,7 @@ public ElementStubsResponse getDataFieldClassifiedElements(@PathVariable String boolean forLineage, @RequestParam(required = false, defaultValue = "false") boolean forDuplicateProcessing, - @RequestBody(required = false) + @RequestBody(required = false) FindByPropertiesRequestBody requestBody) { return restAPI.getDataFieldClassifiedElements(serverName, userId, startFrom, pageSize, forLineage, forDuplicateProcessing, requestBody); diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-topic-connectors/build.gradle b/open-metadata-implementation/access-services/asset-manager/asset-manager-topic-connectors/build.gradle index f86a6ea6e0b..b4736435916 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-topic-connectors/build.gradle +++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-topic-connectors/build.gradle @@ -6,6 +6,7 @@ dependencies { implementation project(':open-metadata-implementation:frameworks:audit-log-framework') + implementation project(':open-metadata-implementation:frameworks:open-metadata-framework') implementation project(':open-metadata-implementation:frameworks:open-connector-framework') implementation project(':open-metadata-implementation:repository-services:repository-services-apis') implementation project(':open-metadata-implementation:access-services:asset-manager:asset-manager-api') diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/api/AssetCertificationInterface.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/api/AssetCertificationInterface.java index 88b8147709a..addf9719c84 100644 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/api/AssetCertificationInterface.java +++ b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/api/AssetCertificationInterface.java @@ -2,12 +2,12 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.assetowner.api; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.CertificationTypeElement; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.RelatedElement; -import org.odpi.openmetadata.accessservices.assetowner.properties.CertificationProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.CertificationTypeElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.RelatedElement; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.CertificationProperties; import java.util.List; diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/api/AssetClassificationInterface.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/api/AssetClassificationInterface.java index ddaa412e86a..a16fcb4637b 100644 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/api/AssetClassificationInterface.java +++ b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/api/AssetClassificationInterface.java @@ -4,14 +4,13 @@ package org.odpi.openmetadata.accessservices.assetowner.api; -import org.odpi.openmetadata.accessservices.assetowner.properties.DataFieldValuesProperties; -import org.odpi.openmetadata.accessservices.assetowner.properties.GovernanceClassificationProperties; -import org.odpi.openmetadata.accessservices.assetowner.properties.RetentionClassificationProperties; -import org.odpi.openmetadata.accessservices.assetowner.properties.SemanticAssignmentProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.DataFieldValuesProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.GovernanceClassificationProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.RetentionClassificationProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.SemanticAssignmentProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.openmetadata.enums.AssetOwnerType; import java.util.List; import java.util.Map; diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/api/AssetCollaborationInterface.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/api/AssetCollaborationInterface.java index 976a3118070..4b3e68baf70 100644 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/api/AssetCollaborationInterface.java +++ b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/api/AssetCollaborationInterface.java @@ -3,13 +3,13 @@ package org.odpi.openmetadata.accessservices.assetowner.api; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.CommentElement; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.NoteElement; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.NoteLogElement; -import org.odpi.openmetadata.accessservices.assetowner.properties.CommentProperties; -import org.odpi.openmetadata.accessservices.assetowner.properties.FeedbackProperties; -import org.odpi.openmetadata.accessservices.assetowner.properties.NoteLogProperties; -import org.odpi.openmetadata.accessservices.assetowner.properties.NoteProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.CommentElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.NoteElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.NoteLogElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.feedback.CommentProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.feedback.FeedbackProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.feedback.NoteLogProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.feedback.NoteProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/api/AssetCollectionInterface.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/api/AssetCollectionInterface.java index f8dc41192a8..f635e68da1e 100644 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/api/AssetCollectionInterface.java +++ b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/api/AssetCollectionInterface.java @@ -3,11 +3,11 @@ package org.odpi.openmetadata.accessservices.assetowner.api; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.CollectionElement; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.CollectionMember; -import org.odpi.openmetadata.accessservices.assetowner.properties.CollectionFolderProperties; -import org.odpi.openmetadata.accessservices.assetowner.properties.CollectionMembershipProperties; -import org.odpi.openmetadata.accessservices.assetowner.properties.CollectionProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.CollectionElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.CollectionMember; +import org.odpi.openmetadata.frameworks.openmetadata.properties.collections.CollectionFolderProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.collections.CollectionMembershipProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.collections.CollectionProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/api/AssetConnectionManagementInterface.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/api/AssetConnectionManagementInterface.java index 8d817c78123..c52fee54bc9 100644 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/api/AssetConnectionManagementInterface.java +++ b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/api/AssetConnectionManagementInterface.java @@ -4,11 +4,11 @@ -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.ConnectionElement; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.ConnectorTypeElement; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.EndpointElement; -import org.odpi.openmetadata.accessservices.assetowner.properties.ConnectionProperties; -import org.odpi.openmetadata.accessservices.assetowner.properties.EndpointProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ConnectionElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ConnectorTypeElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.EndpointElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.ConnectionProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.EndpointProperties; import org.odpi.openmetadata.accessservices.assetowner.properties.TemplateProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/api/AssetLicenseInterface.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/api/AssetLicenseInterface.java index 9f86d1bd3a3..d2559da9378 100644 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/api/AssetLicenseInterface.java +++ b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/api/AssetLicenseInterface.java @@ -2,13 +2,13 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.assetowner.api; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.LicenseElement; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.LicenseTypeElement; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.RelatedElement; -import org.odpi.openmetadata.accessservices.assetowner.properties.LicenseProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.LicenseElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.LicenseTypeElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.RelatedElement; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.LicenseProperties; import java.util.List; diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/api/AssetOnboardingFileSystem.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/api/AssetOnboardingFileSystem.java index f71fdccd617..26660f2b7a3 100644 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/api/AssetOnboardingFileSystem.java +++ b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/api/AssetOnboardingFileSystem.java @@ -2,8 +2,8 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.assetowner.api; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.FileSystemElement; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.FolderElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.FileSystemElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.FolderElement; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/api/AssetOnboardingInterface.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/api/AssetOnboardingInterface.java index 1e91a354326..36efeb01cf1 100644 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/api/AssetOnboardingInterface.java +++ b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/api/AssetOnboardingInterface.java @@ -3,18 +3,18 @@ package org.odpi.openmetadata.accessservices.assetowner.api; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.SchemaAttributeElement; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.SchemaTypeElement; -import org.odpi.openmetadata.accessservices.assetowner.properties.AssetProperties; -import org.odpi.openmetadata.accessservices.assetowner.properties.RelationshipProperties; -import org.odpi.openmetadata.accessservices.assetowner.properties.SchemaAttributeProperties; -import org.odpi.openmetadata.accessservices.assetowner.properties.SchemaTypeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.SchemaAttributeElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.SchemaTypeElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.AssetProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.SchemaAttributeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.SchemaTypeProperties; import org.odpi.openmetadata.accessservices.assetowner.properties.TemplateProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; import org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; import java.util.List; import java.util.Map; diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/api/AssetOnboardingValidValues.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/api/AssetOnboardingValidValues.java index 8e80c097913..69f5109b6b4 100644 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/api/AssetOnboardingValidValues.java +++ b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/api/AssetOnboardingValidValues.java @@ -2,7 +2,7 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.assetowner.api; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.ValidValueElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ValidValueElement; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/api/AssetReviewInterface.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/api/AssetReviewInterface.java index 34559fa0017..3292fbd4eb4 100644 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/api/AssetReviewInterface.java +++ b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/api/AssetReviewInterface.java @@ -3,19 +3,19 @@ package org.odpi.openmetadata.accessservices.assetowner.api; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.AssetElement; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.GlossaryTermElement; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.GovernanceDefinitionElement; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.RelatedElement; -import org.odpi.openmetadata.accessservices.assetowner.properties.DataFieldQueryProperties; -import org.odpi.openmetadata.accessservices.assetowner.properties.FindAssetOriginProperties; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.RelationshipElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.AssetElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.GlossaryTermElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.GovernanceDefinitionElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.RelatedElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.DataFieldQueryProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.FindAssetOriginProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.RelationshipElement; import org.odpi.openmetadata.frameworks.connectors.Connector; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; import org.odpi.openmetadata.frameworks.connectors.properties.AssetUniverse; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementStub; import org.odpi.openmetadata.frameworks.surveyaction.properties.Annotation; import org.odpi.openmetadata.frameworks.surveyaction.properties.AnnotationStatus; import org.odpi.openmetadata.frameworks.surveyaction.properties.SurveyReport; diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/api/ExternalReferencesInterface.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/api/ExternalReferencesInterface.java index 371b4fd992b..f989b7a90c3 100644 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/api/ExternalReferencesInterface.java +++ b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/api/ExternalReferencesInterface.java @@ -3,13 +3,13 @@ package org.odpi.openmetadata.accessservices.assetowner.api; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.ExternalReferenceElement; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.RelatedElement; -import org.odpi.openmetadata.accessservices.assetowner.properties.ExternalReferenceLinkProperties; -import org.odpi.openmetadata.accessservices.assetowner.properties.ExternalReferenceProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ExternalReferenceElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.RelatedElement; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.properties.externalreferences.ExternalReferenceLinkProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.externalreferences.ExternalReferenceProperties; import java.util.List; diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/api/RelatedElementsManagementInterface.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/api/RelatedElementsManagementInterface.java index b419b47508f..9115def1d74 100644 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/api/RelatedElementsManagementInterface.java +++ b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/api/RelatedElementsManagementInterface.java @@ -2,10 +2,10 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.assetowner.api; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.RelatedElement; -import org.odpi.openmetadata.accessservices.assetowner.properties.RelationshipProperties; -import org.odpi.openmetadata.accessservices.assetowner.properties.ResourceListProperties; -import org.odpi.openmetadata.accessservices.assetowner.properties.StakeholderProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.RelatedElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.resources.ResourceListProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.StakeholderProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/events/AssetOwnerOutTopicEvent.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/events/AssetOwnerOutTopicEvent.java index de9799a6dd6..5fcaeb633c9 100644 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/events/AssetOwnerOutTopicEvent.java +++ b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/events/AssetOwnerOutTopicEvent.java @@ -5,7 +5,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; import java.util.Date; import java.util.Map; diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/AssetElement.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/AssetElement.java deleted file mode 100644 index f211c684d9d..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/AssetElement.java +++ /dev/null @@ -1,146 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetowner.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetowner.properties.AssetProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * AssetElement contains the properties and header for an asset retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class AssetElement implements MetadataElement -{ - private ElementHeader elementHeader = null; - private AssetProperties assetProperties = null; - - /** - * Default constructor - */ - public AssetElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public AssetElement(AssetElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - assetProperties = template.getAssetProperties(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - @Override - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Retrieve details of the asset itself. - * - * @return properties bean - */ - public AssetProperties getAssetProperties() - { - return assetProperties; - } - - - /** - * Save details of the asset itself - * - * @param assetProperties properties bean - */ - public void setAssetProperties(AssetProperties assetProperties) - { - this.assetProperties = assetProperties; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "AssetElement{" + - "elementHeader=" + elementHeader + - ", assetProperties=" + assetProperties + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - AssetElement that = (AssetElement) objectToCompare; - return Objects.equals(elementHeader, that.elementHeader) && - Objects.equals(assetProperties, that.assetProperties); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(elementHeader, assetProperties); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/CertificationElement.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/CertificationElement.java deleted file mode 100644 index ff64d055d0b..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/CertificationElement.java +++ /dev/null @@ -1,198 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetowner.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetowner.properties.CertificationProperties; -import org.odpi.openmetadata.accessservices.assetowner.properties.RelationshipProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * CertificationElement contains the properties and header for a certification for an element. - * It includes the details of the specific element's certification and details of the certification type. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class CertificationElement -{ - private ElementHeader certificationHeader = null; - private RelationshipProperties certificationProperties = null; - private ElementHeader certificationTypeHeader = null; - private CertificationProperties certificationTypeProperties = null; - - /** - * Default constructor - */ - public CertificationElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public CertificationElement(CertificationElement template) - { - if (template != null) - { - certificationHeader = template.getCertificationHeader(); - certificationProperties = template.getCertificationProperties(); - certificationTypeHeader = template.getCertificationTypeHeader(); - certificationTypeProperties = template.getCertificationTypeProperties(); - } - } - - - /** - * Return the element header associated with the relationship. - * - * @return element header object - */ - public ElementHeader getCertificationHeader() - { - return certificationHeader; - } - - - /** - * Set up the element header associated with the relationship. - * - * @param certificationHeader element header object - */ - public void setCertificationHeader(ElementHeader certificationHeader) - { - this.certificationHeader = certificationHeader; - } - - - /** - * Return details of the relationship - * - * @return relationship properties - */ - public RelationshipProperties getCertificationProperties() - { - return certificationProperties; - } - - - /** - * Set up relationship properties - * - * @param certificationProperties relationship properties - */ - public void setCertificationProperties(RelationshipProperties certificationProperties) - { - this.certificationProperties = certificationProperties; - } - - - /** - * Return the element header associated with end 2 of the relationship (certification type). - * - * @return element stub object - */ - public ElementHeader getCertificationTypeHeader() - { - return certificationTypeHeader; - } - - - /** - * Set up the element header associated with end 2 of the relationship (certification type). - * - * @param certificationTypeHeader element stub object - */ - public void setCertificationTypeHeader(ElementHeader certificationTypeHeader) - { - this.certificationTypeHeader = certificationTypeHeader; - } - - - /** - * Return the properties of the certification type. - * - * @return properties - */ - public CertificationProperties getCertificationTypeProperties() - { - return certificationTypeProperties; - } - - - /** - * Set up the properties of the certification type. - * - * @param certificationTypeProperties properties - */ - public void setCertificationTypeProperties(CertificationProperties certificationTypeProperties) - { - this.certificationTypeProperties = certificationTypeProperties; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "CertificationElement{" + - "certificationHeader=" + certificationHeader + - ", relationshipProperties=" + certificationProperties + - ", certificationTypeHeader=" + certificationTypeHeader + - ", certificationTypeProperties=" + certificationTypeProperties + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (! (objectToCompare instanceof CertificationElement)) - { - return false; - } - CertificationElement that = (CertificationElement) objectToCompare; - return Objects.equals(certificationHeader, that.certificationHeader) && - Objects.equals(certificationProperties, that.certificationProperties) && - Objects.equals(certificationTypeHeader, that.certificationTypeHeader) && - Objects.equals(certificationTypeProperties, that.certificationTypeProperties); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), certificationHeader, certificationProperties, certificationTypeHeader, certificationTypeProperties); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/CertificationTypeElement.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/CertificationTypeElement.java deleted file mode 100644 index da171b04d3a..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/CertificationTypeElement.java +++ /dev/null @@ -1,175 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetowner.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetowner.properties.CertificationTypeProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * CertificationTypeElement contains the properties and header for a certification type retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class CertificationTypeElement implements MetadataElement -{ - private ElementHeader elementHeader = null; - private CertificationTypeProperties properties = null; - private RelatedElement relatedElement = null; - - - /** - * Default constructor - */ - public CertificationTypeElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public CertificationTypeElement(CertificationTypeElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - properties = template.getProperties(); - relatedElement = template.getRelatedElement(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - @Override - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the properties of the certification type. - * - * @return properties - */ - public CertificationTypeProperties getProperties() - { - return properties; - } - - - /** - * Set up the certification type properties. - * - * @param properties properties - */ - public void setProperties(CertificationTypeProperties properties) - { - this.properties = properties; - } - - - /** - * Return details of the relationship used to retrieve this element. - * Will be null if the element was retrieved directly rather than via a relationship. - * - * @return list of element stubs - */ - public RelatedElement getRelatedElement() - { - return relatedElement; - } - - - /** - * Set up details of the relationship used to retrieve this element. - * Will be null if the element was retrieved directly rather than via a relationship. - * - * @param relatedElement relationship details - */ - public void setRelatedElement(RelatedElement relatedElement) - { - this.relatedElement = relatedElement; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "CertificationTypeElement{" + - "elementHeader=" + elementHeader + - ", properties=" + properties + - ", relatedElement=" + relatedElement + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - CertificationTypeElement that = (CertificationTypeElement) objectToCompare; - return Objects.equals(elementHeader, that.elementHeader) && - Objects.equals(properties, that.properties) && - Objects.equals(relatedElement, that.relatedElement); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementHeader, properties, relatedElement); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/CollectionElement.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/CollectionElement.java deleted file mode 100644 index 3643c8471ae..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/CollectionElement.java +++ /dev/null @@ -1,175 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetowner.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetowner.properties.CollectionProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * CollectionElement contains the properties and header for a collection retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class CollectionElement implements MetadataElement -{ - private ElementHeader elementHeader = null; - private CollectionProperties properties = null; - private RelatedElement relatedElement = null; - - - /** - * Default constructor - */ - public CollectionElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public CollectionElement(CollectionElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - properties = template.getProperties(); - relatedElement = template.getRelatedElement(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - @Override - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the properties of the collection. - * - * @return properties - */ - public CollectionProperties getProperties() - { - return properties; - } - - - /** - * Set up the collection properties. - * - * @param properties properties - */ - public void setProperties(CollectionProperties properties) - { - this.properties = properties; - } - - - /** - * Return details of the relationship used to retrieve this element. - * Will be null if the element was retrieved directly rather than via a relationship. - * - * @return list of element stubs - */ - public RelatedElement getRelatedElement() - { - return relatedElement; - } - - - /** - * Set up details of the relationship used to retrieve this element. - * Will be null if the element was retrieved directly rather than via a relationship. - * - * @param relatedElement relationship details - */ - public void setRelatedElement(RelatedElement relatedElement) - { - this.relatedElement = relatedElement; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "CollectionElement{" + - "elementHeader=" + elementHeader + - ", properties=" + properties + - ", relatedElement=" + relatedElement + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - CollectionElement that = (CollectionElement) objectToCompare; - return Objects.equals(elementHeader, that.elementHeader) && - Objects.equals(properties, that.properties) && - Objects.equals(relatedElement, that.relatedElement); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementHeader, properties, relatedElement); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/CollectionMember.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/CollectionMember.java deleted file mode 100644 index afd2fec7c6d..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/CollectionMember.java +++ /dev/null @@ -1,201 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetowner.properties.CollectionMembershipProperties; -import org.odpi.openmetadata.accessservices.assetowner.properties.ReferenceableProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * CollectionMember describes a member of a collection. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class CollectionMember implements MetadataElement -{ - private ElementHeader relationshipHeader = null; - private CollectionMembershipProperties relationshipProperties = null; - - private ElementHeader elementHeader = null; - - private ReferenceableProperties properties = null; - - - /** - * Default constructor - */ - public CollectionMember() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public CollectionMember(CollectionMember template) - { - - if (template != null) - { - relationshipHeader = template.getRelationshipHeader(); - relationshipProperties = template.getRelationshipProperties(); - elementHeader = template.getElementHeader(); - properties = template.getProperties(); - } - } - - /** - * Return the element header associated with the relationship. - * - * @return element header object - */ - public ElementHeader getRelationshipHeader() - { - return relationshipHeader; - } - - - /** - * Set up the element header associated with the relationship. - * - * @param relationshipHeader element header object - */ - public void setRelationshipHeader(ElementHeader relationshipHeader) - { - this.relationshipHeader = relationshipHeader; - } - - - /** - * Return details of the relationship - * - * @return relationship properties - */ - public CollectionMembershipProperties getRelationshipProperties() - { - return relationshipProperties; - } - - - /** - * Set up relationship properties - * - * @param relationshipProperties relationship properties - */ - public void setRelationshipProperties(CollectionMembershipProperties relationshipProperties) - { - this.relationshipProperties = relationshipProperties; - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - @Override - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the properties of the element. - * - * @return properties - */ - public ReferenceableProperties getProperties() - { - return properties; - } - - - /** - * Set up the properties of the element. - * - * @param properties properties - */ - public void setProperties(ReferenceableProperties properties) - { - this.properties = properties; - } - - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "CollectionMember{" + - "relationshipHeader=" + relationshipHeader + - ", relationshipProperties=" + relationshipProperties + - ", elementHeader=" + elementHeader + - ", properties=" + properties + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - CollectionMember that = (CollectionMember) objectToCompare; - return Objects.equals(relationshipHeader, that.relationshipHeader) && - Objects.equals(relationshipProperties, that.relationshipProperties) && - Objects.equals(elementHeader, that.elementHeader) && - Objects.equals(properties, that.properties); - } - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(relationshipHeader, relationshipProperties, elementHeader, properties); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/CommentElement.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/CommentElement.java deleted file mode 100644 index aa0679a6a59..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/CommentElement.java +++ /dev/null @@ -1,221 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetowner.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetowner.properties.CommentProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * CommentElement contains the properties and header for a Comment entity retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class CommentElement implements MetadataElement -{ - private ElementHeader elementHeader = null; - private CommentProperties properties = null; - private FeedbackTargetElement feedbackTargetElement = null; - private List acceptedAnswers = null; - private List questionsAnswered = null; - - - /** - * Default constructor - */ - public CommentElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public CommentElement(CommentElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - properties = template.getProperties(); - feedbackTargetElement = template.getFeedbackTargetElement(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - @Override - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the properties of the comment. - * - * @return properties bean - */ - public CommentProperties getProperties() - { - return properties; - } - - - /** - * Set up the properties of the comment. - * - * @param properties properties bean - */ - public void setProperties(CommentProperties properties) - { - this.properties = properties; - } - - - /** - * Return details of the relationship from the element in the request to the comment. This value is null if the comment was retrieved independently - * of any commented element. - * - * @return associated relationship - */ - public FeedbackTargetElement getFeedbackTargetElement() - { - return feedbackTargetElement; - } - - - /** - * Set up details of the relationship from the element in the request to the comment. This value is null if the comment was retrieved independently - * of any commented element. - * - * @param feedbackTargetElement associated relationship - */ - public void setFeedbackTargetElement(FeedbackTargetElement feedbackTargetElement) - { - this.feedbackTargetElement = feedbackTargetElement; - } - - - /** - * Return details of any comment that provides an accepted answer to the question posed in this comment. - * - * @return list of comment headers - */ - public List getAcceptedAnswers() - { - return acceptedAnswers; - } - - - /** - * Set up details of any comment that provides an accepted answer to the question posed in this comment. - * - * @param acceptedAnswers list of comment headers - */ - public void setAcceptedAnswers(List acceptedAnswers) - { - this.acceptedAnswers = acceptedAnswers; - } - - - /** - * Return details of any comment that poses a question that this comment answers. - * - * @return list of comment headers - */ - public List getQuestionsAnswered() - { - return questionsAnswered; - } - - - /** - * Set up details of any comment that poses a question that this comment answers. - * - * @param questionsAnswered list of comment headers - */ - public void setQuestionsAnswered(List questionsAnswered) - { - this.questionsAnswered = questionsAnswered; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "CommentElement{" + - "elementHeader=" + elementHeader + - ", properties=" + properties + - ", feedbackTargetElement=" + feedbackTargetElement + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (! (objectToCompare instanceof CommentElement that)) - { - return false; - } - return Objects.equals(elementHeader, that.elementHeader) && - Objects.equals(properties, that.properties) && - Objects.equals(feedbackTargetElement, that.feedbackTargetElement); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(elementHeader, properties, feedbackTargetElement); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/ConnectionElement.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/ConnectionElement.java deleted file mode 100644 index 4f698de0fb6..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/ConnectionElement.java +++ /dev/null @@ -1,238 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetowner.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetowner.properties.ConnectionProperties; - -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; - -/** - * ConnectionElement contains the properties and header for a connection retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ConnectionElement implements MetadataElement -{ - private ConnectionProperties connectionProperties = null; - private ElementHeader elementHeader = null; - private ElementStub connectorType = null; - private ElementStub endpoint = null; - private List embeddedConnections = null; - - - /** - * Default constructor - */ - public ConnectionElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ConnectionElement(ConnectionElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - connectionProperties = template.getConnectionProperties(); - connectorType = template.getConnectorType(); - endpoint = template.getEndpoint(); - embeddedConnections = template.getEmbeddedConnections(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - @Override - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the properties for the connection. - * - * @return asset properties (using appropriate subclass) - */ - public ConnectionProperties getConnectionProperties() - { - return connectionProperties; - } - - - /** - * Set up the properties for the connection. - * - * @param connectionProperties asset properties - */ - public void setConnectionProperties(ConnectionProperties connectionProperties) - { - this.connectionProperties = connectionProperties; - } - - - /** - * Set up the connector type properties for this Connection. - * - * @param connectorType ConnectorType properties object - */ - public void setConnectorType(ElementStub connectorType) - { - this.connectorType = connectorType; - } - - - /** - * Returns a copy of the properties for this connection's connector type. - * A null means there is no connection type. - * - * @return connector type for the connection - */ - public ElementStub getConnectorType() - { - return connectorType; - } - - - /** - * Set up the endpoint properties for this Connection. - * - * @param endpoint Endpoint properties object - */ - public void setEndpoint(ElementStub endpoint) - { - this.endpoint = endpoint; - } - - - /** - * Returns a copy of the properties for this connection's endpoint. - * Null means no endpoint information available. - * - * @return endpoint for the connection - */ - public ElementStub getEndpoint() - { - return endpoint; - } - - - /** - * Return the list of embedded connections for this virtual connection. - * - * @return list of EmbeddedConnection objects - */ - public List getEmbeddedConnections() - { - if (embeddedConnections == null) - { - return null; - } - else if (embeddedConnections.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(embeddedConnections); - } - } - - - /** - * Set up the list of embedded connections for this virtual connection. - * - * @param embeddedConnections list of EmbeddedConnection objects - */ - public void setEmbeddedConnections(List embeddedConnections) - { - this.embeddedConnections = embeddedConnections; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ConnectionElement{" + - "connectionProperties=" + connectionProperties + - ", elementHeader=" + elementHeader + - ", connectorType=" + connectorType + - ", endpoint=" + endpoint + - ", embeddedConnections=" + embeddedConnections + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ConnectionElement that = (ConnectionElement) objectToCompare; - return Objects.equals(getConnectionProperties(), that.getConnectionProperties()) && - Objects.equals(getElementHeader(), that.getElementHeader()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementHeader, connectionProperties); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/ConnectorTypeElement.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/ConnectorTypeElement.java deleted file mode 100644 index 6ee5ae50a48..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/ConnectorTypeElement.java +++ /dev/null @@ -1,148 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetowner.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetowner.properties.ConnectorTypeProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * ConnectorTypeElement contains the properties and header for a connector type retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ConnectorTypeElement implements MetadataElement -{ - private ConnectorTypeProperties connectorTypeProperties = null; - private ElementHeader elementHeader = null; - - - /** - * Default constructor - */ - public ConnectorTypeElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ConnectorTypeElement(ConnectorTypeElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - connectorTypeProperties = template.getConnectorTypeProperties(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - @Override - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - - /** - * Return the properties for the connector type. - * - * @return asset properties (using appropriate subclass) - */ - public ConnectorTypeProperties getConnectorTypeProperties() - { - return connectorTypeProperties; - } - - - /** - * Set up the properties for the connector type. - * - * @param connectorTypeProperties asset properties - */ - public void setConnectorTypeProperties(ConnectorTypeProperties connectorTypeProperties) - { - this.connectorTypeProperties = connectorTypeProperties; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ConnectorTypeElement{" + - "connectorTypeProperties=" + connectorTypeProperties + - ", elementHeader=" + elementHeader + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ConnectorTypeElement that = (ConnectorTypeElement) objectToCompare; - return Objects.equals(getConnectorTypeProperties(), that.getConnectorTypeProperties()) && - Objects.equals(getElementHeader(), that.getElementHeader()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementHeader, connectorTypeProperties); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/EmbeddedConnection.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/EmbeddedConnection.java deleted file mode 100644 index c3183c50a34..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/EmbeddedConnection.java +++ /dev/null @@ -1,209 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.metadataelements; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; - -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * The EmbeddedConnection is used within a VirtualConnection to link to the embedded connections. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class EmbeddedConnection -{ - protected int position = 0; - protected String displayName = null; - protected Map arguments = null; - protected ElementStub embeddedConnection = null; - - - /** - * Default constructor - */ - public EmbeddedConnection() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template element to copy - */ - public EmbeddedConnection(EmbeddedConnection template) - { - if (template != null) - { - position = template.getPosition(); - displayName = template.getDisplayName(); - arguments = template.getArguments(); - embeddedConnection = template.getEmbeddedConnection(); - } - } - - - /** - * Return the position that this connector is in the list of embedded connectors. - * - * @return int - */ - public int getPosition() - { - return position; - } - - - /** - * Set up the position that this connector is in the list of embedded connectors. - * - * @param position int - */ - public void setPosition(int position) - { - this.position = position; - } - - - /** - * Return the printable name of the embedded connection. - * - * @return String name - */ - public String getDisplayName() - { - return displayName; - } - - - /** - * Set up the printable name of the embedded connection. - * - * @param displayName String name - */ - public void setDisplayName(String displayName) - { - this.displayName = displayName; - } - - - /** - * Return the arguments for the embedded connection. - * - * @return property map - */ - public Map getArguments() - { - if (arguments == null) - { - return null; - } - else if (arguments.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(arguments); - } - } - - - /** - * Set up the arguments for the embedded connection. - * - * @param arguments property map - */ - public void setArguments(Map arguments) - { - this.arguments = arguments; - } - - - /** - * Return the embedded connection. - * - * @return header of Connection object. - */ - public ElementStub getEmbeddedConnection() - { - return embeddedConnection; - } - - - /** - * Set up the embedded connection - * - * @param embeddedConnection header of Connection object - */ - public void setEmbeddedConnection(ElementStub embeddedConnection) - { - this.embeddedConnection = embeddedConnection; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "EmbeddedConnection{" + - "position=" + position + - ", displayName='" + displayName + '\'' + - ", arguments=" + arguments + - ", embeddedConnection=" + embeddedConnection + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - EmbeddedConnection that = (EmbeddedConnection) objectToCompare; - return position == that.position && - Objects.equals(displayName, that.displayName) && - Objects.equals(arguments, that.arguments) && - Objects.equals(embeddedConnection, that.embeddedConnection); - } - - - /** - * Create a hash code for this element type. - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(position, displayName, arguments, embeddedConnection); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/EndpointElement.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/EndpointElement.java deleted file mode 100644 index 668a6d889ce..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/EndpointElement.java +++ /dev/null @@ -1,147 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetowner.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetowner.properties.EndpointProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * EndpointElement contains the properties and header for an endpoint retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class EndpointElement implements MetadataElement -{ - private EndpointProperties endpointProperties = null; - private ElementHeader elementHeader = null; - - - /** - * Default constructor - */ - public EndpointElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public EndpointElement(EndpointElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - endpointProperties = template.getEndpointProperties(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - @Override - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the properties for the endpoint. - * - * @return asset properties (using appropriate subclass) - */ - public EndpointProperties getEndpointProperties() - { - return endpointProperties; - } - - - /** - * Set up the properties for the endpoint. - * - * @param endpointProperties asset properties - */ - public void setEndpointProperties(EndpointProperties endpointProperties) - { - this.endpointProperties = endpointProperties; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "EndpointElement{" + - "endpointProperties=" + endpointProperties + - ", elementHeader=" + elementHeader + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - EndpointElement that = (EndpointElement) objectToCompare; - return Objects.equals(getEndpointProperties(), that.getEndpointProperties()) && - Objects.equals(getElementHeader(), that.getElementHeader()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementHeader, endpointProperties); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/ExternalReferenceElement.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/ExternalReferenceElement.java deleted file mode 100644 index f0a6a633a39..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/ExternalReferenceElement.java +++ /dev/null @@ -1,143 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetowner.properties.ExternalReferenceProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * ExternalReferenceElement stores information about a link to an external resource that is relevant to this element. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ExternalReferenceElement implements MetadataElement -{ - private ElementHeader elementHeader = null; - private ExternalReferenceProperties properties = null; - - /** - * Default Constructor - */ - public ExternalReferenceElement() - { - } - - - /** - * Copy/clone Constructor - the resulting object. - * - * @param template object being copied - */ - public ExternalReferenceElement(ExternalReferenceElement template) - { - if (template != null) - { - this.elementHeader = template.getElementHeader(); - this.properties = template.getProperties(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the link to external documentation that are relevant to this element. - * - * @return list of external references - */ - public ExternalReferenceProperties getProperties() - { - return properties; - } - - - /** - * Set up the list of links to external documentation that are relevant to this element. - * - * @param properties of external references - */ - public void setProperties(ExternalReferenceProperties properties) - { - this.properties = properties; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "ExternalReferenceElement{" + - "elementHeader=" + elementHeader + - ", properties=" + properties + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ExternalReferenceElement that = (ExternalReferenceElement) objectToCompare; - return Objects.equals(elementHeader, that.elementHeader) && - Objects.equals(properties, that.properties); - } - - - /** - * Hash of properties - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), properties, elementHeader); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/FeedbackTargetElement.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/FeedbackTargetElement.java deleted file mode 100644 index 111076a4a62..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/FeedbackTargetElement.java +++ /dev/null @@ -1,181 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetowner.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * FeedbackTargetElement contains the properties and header for a relationship retrieved from the metadata repository along with the stub - * of the related element. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class FeedbackTargetElement -{ - private ElementHeader relationshipHeader = null; - private ElementStub relatedElement = null; - private boolean isPublic = false; - - /** - * Default constructor - */ - public FeedbackTargetElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public FeedbackTargetElement(FeedbackTargetElement template) - { - if (template != null) - { - relationshipHeader = template.getRelationshipHeader(); - relatedElement = template.getRelatedElement(); - isPublic = template.getIsPublic(); - } - } - - - - /** - * Return if the link to the tag is private to the creating user. - * - * @return boolean - */ - public boolean getIsPublic() - { - return isPublic; - } - - - /** - * Set up whether the link to the tag is private to the creating user or not. - * - * @param aPublic boolean - */ - public void setIsPublic(boolean aPublic) - { - isPublic = aPublic; - } - - - /** - * Return the element header associated with the relationship. - * - * @return element header object - */ - public ElementHeader getRelationshipHeader() - { - return relationshipHeader; - } - - - /** - * Set up the element header associated with the relationship. - * - * @param relationshipHeader element header object - */ - public void setRelationshipHeader(ElementHeader relationshipHeader) - { - this.relationshipHeader = relationshipHeader; - } - - - /** - * Return the element header associated with end 1 of the relationship. - * - * @return element stub object - */ - public ElementStub getRelatedElement() - { - return relatedElement; - } - - - /** - * Set up the element header associated with end 1 of the relationship. - * - * @param relatedElement element stub object - */ - public void setRelatedElement(ElementStub relatedElement) - { - this.relatedElement = relatedElement; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "FeedbackTargetElement{" + - "relationshipHeader=" + relationshipHeader + - ", relatedElement=" + relatedElement + - ", isPublic=" + isPublic + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (! (objectToCompare instanceof FeedbackTargetElement)) - { - return false; - } - - FeedbackTargetElement that = (FeedbackTargetElement) objectToCompare; - - if (isPublic != that.isPublic) - { - return false; - } - if (relationshipHeader != null ? ! relationshipHeader.equals(that.relationshipHeader) : that.relationshipHeader != null) - { - return false; - } - return relatedElement != null ? relatedElement.equals(that.relatedElement) : that.relatedElement == null; - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - int result = relationshipHeader != null ? relationshipHeader.hashCode() : 0; - result = 31 * result + (relatedElement != null ? relatedElement.hashCode() : 0); - result = 31 * result + (isPublic ? 1 : 0); - return result; - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/FileSystemElement.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/FileSystemElement.java deleted file mode 100644 index 2321b2da139..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/FileSystemElement.java +++ /dev/null @@ -1,151 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetowner.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetowner.properties.FileSystemProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * FileSystemElement contains the properties and header for a file system retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class FileSystemElement implements MetadataElement -{ - private ElementHeader elementHeader = null; - private FileSystemProperties fileSystemProperties = null; - - - /** - * Default constructor - */ - public FileSystemElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public FileSystemElement(FileSystemElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - fileSystemProperties = template.getFileSystemProperties(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - @Override - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the file system properties. - * - * @return properties bean - */ - public FileSystemProperties getFileSystemProperties() - { - return fileSystemProperties; - } - - - /** - * Set up the file system properties. - * - * @param fileSystemProperties properties bean - */ - public void setFileSystemProperties(FileSystemProperties fileSystemProperties) - { - this.fileSystemProperties = fileSystemProperties; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "FileSystemElement{" + - "elementHeader=" + elementHeader + - ", fileSystemProperties=" + fileSystemProperties + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - FileSystemElement that = (FileSystemElement) objectToCompare; - return Objects.equals(elementHeader, that.elementHeader) && - Objects.equals(fileSystemProperties, that.fileSystemProperties); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementHeader, fileSystemProperties); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/GovernanceDefinitionElement.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/GovernanceDefinitionElement.java deleted file mode 100644 index 4714540ef82..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/GovernanceDefinitionElement.java +++ /dev/null @@ -1,169 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetowner.metadataelements; - - -import org.odpi.openmetadata.accessservices.assetowner.properties.GovernanceDefinitionProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -import java.util.List; -import java.util.Objects; - -/** - * GovernanceDefinitionElement is the superclass used to return the common properties of a governance definition stored in the - * open metadata repositories. - */ -public class GovernanceDefinitionElement implements MetadataElement -{ - private ElementHeader elementHeader = null; - private GovernanceDefinitionProperties properties = null; - private RelatedElement relatedElement = null; - - - - /** - * Default constructor - */ - public GovernanceDefinitionElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public GovernanceDefinitionElement(GovernanceDefinitionElement template) - { - if (template != null) - { - this.elementHeader = template.getElementHeader(); - this.properties = template.getProperties(); - this.relatedElement = template.getRelatedElement(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - @Override - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the requested governance definition. - * - * @return properties bean - */ - public GovernanceDefinitionProperties getProperties() - { - return properties; - } - - - /** - * Set up the requested governance definition. - * - * @param properties properties bean - */ - public void setProperties(GovernanceDefinitionProperties properties) - { - this.properties = properties; - } - - - /** - * Return details of the relationship used to retrieve this element. - * Will be null if the element was retrieved directly rather than via a relationship. - * - * @return list of element stubs - */ - public RelatedElement getRelatedElement() - { - return relatedElement; - } - - - /** - * Set up details of the relationship used to retrieve this element. - * Will be null if the element was retrieved directly rather than via a relationship. - * - * @param relatedElement relationship details - */ - public void setRelatedElement(RelatedElement relatedElement) - { - this.relatedElement = relatedElement; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "GovernanceDefinitionElement{" + - "elementHeader=" + elementHeader + - ", properties=" + properties + - ", relatedElement=" + relatedElement + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (! (objectToCompare instanceof GovernanceDefinitionElement that)) - { - return false; - } - return Objects.equals(elementHeader, that.elementHeader) && - Objects.equals(properties, that.properties) && - Objects.equals(relatedElement, that.relatedElement); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementHeader, properties, relatedElement); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/LicenseElement.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/LicenseElement.java deleted file mode 100644 index cbff34a696c..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/LicenseElement.java +++ /dev/null @@ -1,198 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetowner.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetowner.properties.LicenseProperties; -import org.odpi.openmetadata.accessservices.assetowner.properties.RelationshipProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * LicenseElement contains the properties and header for a license for an element. - * It includes the details of the specific element's license and details of the license type. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class LicenseElement -{ - private ElementHeader licenseHeader = null; - private RelationshipProperties licenseProperties = null; - private ElementHeader licenseTypeHeader = null; - private LicenseProperties licenseTypeProperties = null; - - /** - * Default constructor - */ - public LicenseElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public LicenseElement(LicenseElement template) - { - if (template != null) - { - licenseHeader = template.getLicenseHeader(); - licenseProperties = template.getLicenseProperties(); - licenseTypeHeader = template.getLicenseTypeHeader(); - licenseTypeProperties = template.getLicenseTypeProperties(); - } - } - - - /** - * Return the element header associated with the relationship. - * - * @return element header object - */ - public ElementHeader getLicenseHeader() - { - return licenseHeader; - } - - - /** - * Set up the element header associated with the relationship. - * - * @param licenseHeader element header object - */ - public void setLicenseHeader(ElementHeader licenseHeader) - { - this.licenseHeader = licenseHeader; - } - - - /** - * Return details of the relationship - * - * @return relationship properties - */ - public RelationshipProperties getLicenseProperties() - { - return licenseProperties; - } - - - /** - * Set up relationship properties - * - * @param licenseProperties relationship properties - */ - public void setLicenseProperties(RelationshipProperties licenseProperties) - { - this.licenseProperties = licenseProperties; - } - - - /** - * Return the element header associated with end 2 of the relationship (license type). - * - * @return element stub object - */ - public ElementHeader getLicenseTypeHeader() - { - return licenseTypeHeader; - } - - - /** - * Set up the element header associated with end 2 of the relationship (license type). - * - * @param licenseTypeHeader element stub object - */ - public void setLicenseTypeHeader(ElementHeader licenseTypeHeader) - { - this.licenseTypeHeader = licenseTypeHeader; - } - - - /** - * Return the properties of the license type. - * - * @return properties - */ - public LicenseProperties getLicenseTypeProperties() - { - return licenseTypeProperties; - } - - - /** - * Set up the properties of the license type. - * - * @param licenseTypeProperties properties - */ - public void setLicenseTypeProperties(LicenseProperties licenseTypeProperties) - { - this.licenseTypeProperties = licenseTypeProperties; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "LicenseElement{" + - "licenseHeader=" + licenseHeader + - ", relationshipProperties=" + licenseProperties + - ", licenseTypeHeader=" + licenseTypeHeader + - ", licenseTypeProperties=" + licenseTypeProperties + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (! (objectToCompare instanceof LicenseElement)) - { - return false; - } - LicenseElement that = (LicenseElement) objectToCompare; - return Objects.equals(licenseHeader, that.licenseHeader) && - Objects.equals(licenseProperties, that.licenseProperties) && - Objects.equals(licenseTypeHeader, that.licenseTypeHeader) && - Objects.equals(licenseTypeProperties, that.licenseTypeProperties); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), licenseHeader, licenseProperties, licenseTypeHeader, licenseTypeProperties); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/LicenseTypeElement.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/LicenseTypeElement.java deleted file mode 100644 index e56a42232b8..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/LicenseTypeElement.java +++ /dev/null @@ -1,175 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetowner.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetowner.properties.LicenseTypeProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * LicenseTypeElement contains the properties and header for a licence type retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class LicenseTypeElement implements MetadataElement -{ - private ElementHeader elementHeader = null; - private LicenseTypeProperties properties = null; - private RelatedElement relatedElement = null; - - - /** - * Default constructor - */ - public LicenseTypeElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public LicenseTypeElement(LicenseTypeElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - properties = template.getProperties(); - relatedElement = template.getRelatedElement(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - @Override - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the properties of the license type. - * - * @return properties - */ - public LicenseTypeProperties getProperties() - { - return properties; - } - - - /** - * Set up the license type properties. - * - * @param properties properties - */ - public void setProperties(LicenseTypeProperties properties) - { - this.properties = properties; - } - - - /** - * Return details of the relationship used to retrieve this element. - * Will be null if the element was retrieved directly rather than via a relationship. - * - * @return list of element stubs - */ - public RelatedElement getRelatedElement() - { - return relatedElement; - } - - - /** - * Set up details of the relationship used to retrieve this element. - * Will be null if the element was retrieved directly rather than via a relationship. - * - * @param relatedElement relationship details - */ - public void setRelatedElement(RelatedElement relatedElement) - { - this.relatedElement = relatedElement; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "LicenseTypeElement{" + - "elementHeader=" + elementHeader + - ", properties=" + properties + - ", relatedElement=" + relatedElement + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - LicenseTypeElement that = (LicenseTypeElement) objectToCompare; - return Objects.equals(elementHeader, that.elementHeader) && - Objects.equals(properties, that.properties) && - Objects.equals(relatedElement, that.relatedElement); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementHeader, properties, relatedElement); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/MetadataElement.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/MetadataElement.java deleted file mode 100644 index 077588bdef7..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/MetadataElement.java +++ /dev/null @@ -1,28 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetowner.metadataelements; - -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * MetadataElement is the common interface for all metadata elements. It adds the header information that is stored with the properties. - * This includes detains of its unique identifier, type and origin. - */ -public interface MetadataElement -{ - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - ElementHeader getElementHeader(); - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - void setElementHeader(ElementHeader elementHeader); -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/ReferenceableElement.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/ReferenceableElement.java deleted file mode 100644 index 00c27c8f67c..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/ReferenceableElement.java +++ /dev/null @@ -1,151 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetowner.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetowner.properties.ReferenceableProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * ReferenceableElement contains the properties and header for a referenceable entity retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ReferenceableElement implements MetadataElement -{ - private ElementHeader elementHeader = null; - private ReferenceableProperties referenceableProperties = null; - - - /** - * Default constructor - */ - public ReferenceableElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ReferenceableElement(ReferenceableElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - referenceableProperties = template.getReferenceableProperties(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - @Override - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the properties of a referenceable. - * - * @return properties bean - */ - public ReferenceableProperties getReferenceableProperties() - { - return referenceableProperties; - } - - - /** - * Set up the properties for a referenceable. - * - * @param referenceableProperties properties bean - */ - public void setReferenceableProperties(ReferenceableProperties referenceableProperties) - { - this.referenceableProperties = referenceableProperties; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ReferenceableElement{" + - "elementHeader=" + elementHeader + - ", referenceableProperties=" + referenceableProperties + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ReferenceableElement that = (ReferenceableElement) objectToCompare; - return Objects.equals(elementHeader, that.elementHeader) && - Objects.equals(referenceableProperties, that.referenceableProperties); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementHeader, referenceableProperties); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/RelatedElement.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/RelatedElement.java deleted file mode 100644 index dfaba78c2c3..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/RelatedElement.java +++ /dev/null @@ -1,172 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetowner.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetowner.properties.RelationshipProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * RelatedElement contains the properties and header for a relationship retrieved from the metadata repository along with the stub - * of the related element. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class RelatedElement -{ - private ElementHeader relationshipHeader = null; - private RelationshipProperties relationshipProperties = null; - private ElementStub relatedElement = null; - - /** - * Default constructor - */ - public RelatedElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public RelatedElement(RelatedElement template) - { - if (template != null) - { - relationshipHeader = template.getRelationshipHeader(); - relationshipProperties = template.getRelationshipProperties(); - relatedElement = template.getRelatedElement(); - } - } - - - /** - * Return the element header associated with the relationship. - * - * @return element header object - */ - public ElementHeader getRelationshipHeader() - { - return relationshipHeader; - } - - - /** - * Set up the element header associated with the relationship. - * - * @param relationshipHeader element header object - */ - public void setRelationshipHeader(ElementHeader relationshipHeader) - { - this.relationshipHeader = relationshipHeader; - } - - - /** - * Return details of the relationship - * - * @return relationship properties - */ - public RelationshipProperties getRelationshipProperties() - { - return relationshipProperties; - } - - - /** - * Set up relationship properties - * - * @param relationshipProperties relationship properties - */ - public void setRelationshipProperties(RelationshipProperties relationshipProperties) - { - this.relationshipProperties = relationshipProperties; - } - - - /** - * Return the element header associated with end 1 of the relationship. - * - * @return element stub object - */ - public ElementStub getRelatedElement() - { - return relatedElement; - } - - - /** - * Set up the element header associated with end 1 of the relationship. - * - * @param relatedElement element stub object - */ - public void setRelatedElement(ElementStub relatedElement) - { - this.relatedElement = relatedElement; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "RelatedElement{" + - "relationshipHeader=" + relationshipHeader + - ", relationshipProperties=" + relationshipProperties + - ", relatedElement=" + relatedElement + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - RelatedElement that = (RelatedElement) objectToCompare; - return Objects.equals(getRelationshipHeader(), that.getRelationshipHeader()) && - Objects.equals(getRelationshipProperties(), that.getRelationshipProperties()) && - Objects.equals(getRelatedElement(), that.getRelatedElement()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), relationshipHeader, relationshipProperties, relatedElement); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/RelationshipElement.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/RelationshipElement.java deleted file mode 100644 index 06da1a28004..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/RelationshipElement.java +++ /dev/null @@ -1,197 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetowner.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetowner.properties.RelationshipProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * RelationshipElement contains the properties and header for a relationship retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class RelationshipElement -{ - private ElementHeader relationshipHeader = null; - private RelationshipProperties relationshipProperties = null; - private ElementHeader end1GUID = null; - private ElementHeader end2GUID = null; - - /** - * Default constructor - */ - public RelationshipElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public RelationshipElement(RelationshipElement template) - { - if (template != null) - { - relationshipHeader = template.getRelationshipHeader(); - relationshipProperties = template.getRelationshipProperties(); - end1GUID = template.getEnd1GUID(); - end2GUID = template.getEnd2GUID(); - } - } - - - /** - * Return the element header associated with the relationship. - * - * @return element header object - */ - public ElementHeader getRelationshipHeader() - { - return relationshipHeader; - } - - - /** - * Set up the element header associated with the relationship. - * - * @param relationshipHeader element header object - */ - public void setRelationshipHeader(ElementHeader relationshipHeader) - { - this.relationshipHeader = relationshipHeader; - } - - - /** - * Return details of the relationship - * - * @return relationship properties - */ - public RelationshipProperties getRelationshipProperties() - { - return relationshipProperties; - } - - - /** - * Set up relationship properties - * - * @param relationshipProperties relationship properties - */ - public void setRelationshipProperties(RelationshipProperties relationshipProperties) - { - this.relationshipProperties = relationshipProperties; - } - - - /** - * Return the element header associated with end 1 of the relationship. - * - * @return element header object - */ - public ElementHeader getEnd1GUID() - { - return end1GUID; - } - - - /** - * Set up the element header associated with end 1 of the relationship. - * - * @param end1GUID element header object - */ - public void setEnd1GUID(ElementHeader end1GUID) - { - this.end1GUID = end1GUID; - } - - - - /** - * Return the element header associated with end 2 of the relationship. - * - * @return element header object - */ - public ElementHeader getEnd2GUID() - { - return end2GUID; - } - - - /** - * Set up the element header associated with end 2 of the relationship. - * - * @param end2GUID element header object - */ - public void setEnd2GUID(ElementHeader end2GUID) - { - this.end2GUID = end2GUID; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "RelationshipElement{" + - "relationshipHeader=" + relationshipHeader + - ", relationshipProperties=" + relationshipProperties + - ", end1GUID=" + end1GUID + - ", end2GUID=" + end2GUID + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - RelationshipElement that = (RelationshipElement) objectToCompare; - return Objects.equals(getRelationshipHeader(), that.getRelationshipHeader()) && - Objects.equals(getRelationshipProperties(), that.getRelationshipProperties()) && - Objects.equals(getEnd1GUID(), that.getEnd1GUID()) && - Objects.equals(getEnd2GUID(), that.getEnd2GUID()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), relationshipHeader, relationshipProperties, end1GUID, end2GUID); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/SchemaAttributeElement.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/SchemaAttributeElement.java deleted file mode 100644 index ab1dae0db7e..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/SchemaAttributeElement.java +++ /dev/null @@ -1,151 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetowner.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetowner.properties.SchemaAttributeProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * SchemaAttributeElement contains the properties and header for a schema attribute retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class SchemaAttributeElement implements MetadataElement -{ - private ElementHeader elementHeader = null; - private SchemaAttributeProperties schemaAttributeProperties = null; - - - /** - * Default constructor - */ - public SchemaAttributeElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public SchemaAttributeElement(SchemaAttributeElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - schemaAttributeProperties = template.getSchemaAttributeProperties(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - @Override - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the properties for a schema attribute. - * - * @return properties bean - */ - public SchemaAttributeProperties getSchemaAttributeProperties() - { - return schemaAttributeProperties; - } - - - /** - * Set up the properties for a schema attribute. - * - * @param schemaAttributeProperties properties bean - */ - public void setSchemaAttributeProperties(SchemaAttributeProperties schemaAttributeProperties) - { - this.schemaAttributeProperties = schemaAttributeProperties; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "SchemaAttributeElement{" + - "elementHeader=" + elementHeader + - ", schemaAttributeProperties=" + schemaAttributeProperties + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - SchemaAttributeElement that = (SchemaAttributeElement) objectToCompare; - return Objects.equals(elementHeader, that.elementHeader) && - Objects.equals(schemaAttributeProperties, that.schemaAttributeProperties); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementHeader, schemaAttributeProperties); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/SchemaTypeElement.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/SchemaTypeElement.java deleted file mode 100644 index 77488766db6..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/SchemaTypeElement.java +++ /dev/null @@ -1,392 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetowner.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetowner.properties.DerivedSchemaTypeQueryTargetProperties; -import org.odpi.openmetadata.accessservices.assetowner.properties.SchemaTypeProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * SchemaTypeElement contains the properties and header for a reference data asset retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class SchemaTypeElement implements MetadataElement -{ - - private SchemaTypeProperties schemaTypeProperties = null; - private ElementHeader elementHeader = null; - - /* - * For complex schema types such as StructSchemaType - */ - private int attributeCount = 0; - - /* - * For Map Schema Types - */ - private SchemaTypeElement mapFromElement = null; - private SchemaTypeElement mapToElement = null; - - /* - * For External Schema Types - */ - private SchemaTypeElement externalSchemaType = null; - - /* - * Schema options for SchemaTypeChoice - */ - private List schemaOptions = null; - - /* - * Used when a value, or set of values associated with the schema are derived rather than stored. - */ - private String formula = null; - private String formulaType = null; - private List queries = null; - - /** - * Default constructor - */ - public SchemaTypeElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public SchemaTypeElement(SchemaTypeElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - schemaTypeProperties = template.getSchemaTypeProperties(); - - attributeCount = template.getAttributeCount(); - - mapFromElement = template.getMapFromElement(); - mapToElement = template.getMapToElement(); - - externalSchemaType = template.getExternalSchemaType(); - - schemaOptions = template.getSchemaOptions(); - - formula = template.getFormula(); - formulaType = template.getFormulaType(); - queries = template.getQueries(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - @Override - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the properties for the schema. - * - * @return schema properties (using appropriate subclass) - */ - public SchemaTypeProperties getSchemaTypeProperties() - { - return schemaTypeProperties; - } - - - /** - * Set up the properties for the schema. - * - * @param schemaTypeProperties schema properties - */ - public void setSchemaTypeProperties(SchemaTypeProperties schemaTypeProperties) - { - this.schemaTypeProperties = schemaTypeProperties; - } - - - - /** - * Return the count of attributes in this schema type. - * - * @return String data type name - */ - public int getAttributeCount() { return attributeCount; } - - - /** - * Set up the count of attributes in this schema type - * - * @param attributeCount data type name - */ - public void setAttributeCount(int attributeCount) - { - this.attributeCount = attributeCount; - } - - - - /** - * Return the type of schema element that represents the key or property name for the map. - * This is also called the domain of the map. - * - * @return SchemaElement - */ - public SchemaTypeElement getMapFromElement() - { - return mapFromElement; - } - - - /** - * Set up the type of schema element that represents the key or property name for the map. - * This is also called the domain of the map. - * - * @param mapFromElement SchemaElement - */ - public void setMapFromElement(SchemaTypeElement mapFromElement) - { - this.mapFromElement = mapFromElement; - } - - - /** - * Return the type of schema element that represents the property value for the map. - * This is also called the range of the map. - * - * @return SchemaElement - */ - public SchemaTypeElement getMapToElement() - { - return mapToElement; - } - - - /** - * Set up the type of schema element that represents the property value for the map. - * This is also called the range of the map. - * - * @param mapToElement SchemaType - */ - public void setMapToElement(SchemaTypeElement mapToElement) - { - this.mapToElement = mapToElement; - } - - - /** - * Return the schema type that is reusable amongst assets. - * - * @return bean describing external schema - */ - public SchemaTypeElement getExternalSchemaType() - { - return externalSchemaType; - } - - - /** - * Set up the schema type that is reusable amongst assets. - * - * @param externalSchemaType bean describing external schema - */ - public void setExternalSchemaType(SchemaTypeElement externalSchemaType) - { - this.externalSchemaType = externalSchemaType; - } - - - /** - * Return the list of alternative schema types that this attribute or asset may use. - * - * @return list of schema types - */ - public List getSchemaOptions() - { - if (schemaOptions == null) - { - return null; - } - else if (schemaOptions.isEmpty()) - { - return null; - } - - return schemaOptions; - } - - - /** - * Set up the list of alternative schema types that this attribute or asset may use. - * - * @param schemaOptions list of schema types - */ - public void setSchemaOptions(List schemaOptions) - { - this.schemaOptions = schemaOptions; - } - - - /** - * Return the formula used to combine the values of the queries. Each query is has a identifier and the - * formula has placeholders for these identifiers in it to show how the query results are combined. - * - * @return String formula - */ - public String getFormula() { return formula; } - - - /** - * Set up the formula used to combine the values of the queries. Each query is has a identifier and the - * formula has placeholders for these identifiers in it to show how the query results are combined. - * - * @param formula String formula - */ - public void setFormula(String formula) - { - this.formula = formula; - } - - - /** - * Return the specification language for the formula. - * - * @return string description - */ - public String getFormulaType() - { - return formulaType; - } - - - /** - * Set up the specification language for the formula. - * - * @param formulaType string description - */ - public void setFormulaType(String formulaType) - { - this.formulaType = formulaType; - } - - - /** - * Return the list of individual query targets for a derived column. - * - * @return list of queries and their target element - */ - public List getQueries() - { - return queries; - } - - - /** - * Set up the list of individual query targets for a derived column. - * - * @param queries list of queries and their target element - */ - public void setQueries(List queries) - { - this.queries = queries; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "SchemaTypeElement{" + - "schemaTypeProperties=" + schemaTypeProperties + - ", elementHeader=" + elementHeader + - ", attributeCount=" + attributeCount + - ", mapFromElement=" + mapFromElement + - ", mapToElement=" + mapToElement + - ", formula='" + formula + '\'' + - ", formulaType='" + formulaType + '\'' + - ", queries=" + queries + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - SchemaTypeElement that = (SchemaTypeElement) objectToCompare; - return attributeCount == that.attributeCount && - Objects.equals(schemaTypeProperties, that.schemaTypeProperties) && - Objects.equals(elementHeader, that.elementHeader) && - Objects.equals(mapFromElement, that.mapFromElement) && - Objects.equals(mapToElement, that.mapToElement) && - Objects.equals(externalSchemaType, that.externalSchemaType) && - Objects.equals(schemaOptions, that.schemaOptions) && - Objects.equals(formula, that.formula) && - Objects.equals(formulaType, that.formulaType) && - Objects.equals(queries, that.queries); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(schemaTypeProperties, elementHeader, attributeCount, mapFromElement, mapToElement, externalSchemaType, schemaOptions, - formula, formulaType, queries); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/ValidValueElement.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/ValidValueElement.java deleted file mode 100644 index c06c533b6ce..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/ValidValueElement.java +++ /dev/null @@ -1,196 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetowner.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetowner.properties.ValidValueProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * ValidValueElement contains the properties and header for a valid value definition or set entity retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ValidValueElement implements MetadataElement -{ - private ElementHeader elementHeader = null; - private ValidValueProperties validValueProperties = null; - private String setGUID = null; - private boolean isDefaultValue = false; - - - /** - * Default constructor - */ - public ValidValueElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ValidValueElement(ValidValueElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - validValueProperties = template.getValidValueProperties(); - setGUID = template.setGUID; - isDefaultValue = getIsDefaultValue(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - @Override - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the properties for the valid value definition or set. - * - * @return properties bean - */ - public ValidValueProperties getValidValueProperties() - { - return validValueProperties; - } - - - /** - * Set up the properties for the valid value definition or set. - * - * @param validValueProperties properties bean - */ - public void setValidValueProperties(ValidValueProperties validValueProperties) - { - this.validValueProperties = validValueProperties; - } - - - /** - * Return the set unique identifier if the valid value is retrieved via a set. - * - * @return string identifier - */ - public String getSetGUID() - { - return setGUID; - } - - - /** - * Set up the set unique identifier if the valid value is retrieved via a set. - * - * @param setGUID string identifier - */ - public void setSetGUID(String setGUID) - { - this.setGUID = setGUID; - } - - - /** - * Return whether this valid value is the default of the setGUID (if supplied) - * @return flag - */ - public boolean getIsDefaultValue() - { - return isDefaultValue; - } - - - /** - * Set up whether this valid value is the default of the setGUID (if supplied). - * - * @param defaultValue flag - */ - public void setIsDefaultValue(boolean defaultValue) - { - isDefaultValue = defaultValue; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ValidValueElement{" + - "elementHeader=" + elementHeader + - ", validValueProperties=" + validValueProperties + - ", setGUID='" + setGUID + '\'' + - ", isDefaultValue=" + isDefaultValue + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ValidValueElement that = (ValidValueElement) objectToCompare; - return isDefaultValue == that.isDefaultValue && Objects.equals(elementHeader, that.elementHeader) && Objects.equals( - validValueProperties, that.validValueProperties) && Objects.equals(setGUID, that.setGUID); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementHeader, validValueProperties, setGUID, isDefaultValue); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/package-info.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/package-info.java deleted file mode 100644 index 1555401eb20..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -/** - * The metadata elements describe the way that metadata is returned from the repository. - */ -package org.odpi.openmetadata.accessservices.assetowner.metadataelements; diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/AssetProperties.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/AssetProperties.java deleted file mode 100644 index afa6d349d56..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/AssetProperties.java +++ /dev/null @@ -1,215 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.properties; - -import com.fasterxml.jackson.annotation.*; - -import java.util.*; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * AssetProperties holds asset properties that are used for displaying details of - * an asset in summary lists or hover text. It includes the following properties: - *
    - *
  • type - metadata type information for the asset
  • - *
  • guid - globally unique identifier for the asset
  • - *
  • url - external link for the asset
  • - *
  • qualifiedName - The official (unique) name for the asset. This is often defined by the IT systems - * management organization and should be used (when available) on audit logs and error messages. - * (qualifiedName from Referenceable - model 0010)
  • - *
  • displayName - A consumable name for the asset. Often a shortened form of the assetQualifiedName - * for use on user interfaces and messages. The assetDisplayName should only be used for audit logs and error - * messages if the assetQualifiedName is not set. (Sourced from attribute name within Asset - model 0010)
  • - *
  • shortDescription - short description about the asset. - * (Sourced from assetSummary within ConnectionsToAsset - model 0205)
  • - *
  • description - full description of the asset. - * (Sourced from attribute description within Asset - model 0010)
  • - *
  • classifications - list of all classifications assigned to the asset
  • - *
  • extendedProperties - list of properties assigned to the asset from the Asset subclasses
  • - *
  • additionalProperties - list of properties assigned to the asset as additional properties
  • - *
- */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes({ - @JsonSubTypes.Type(value = DataStoreProperties.class, name = "DataStoreProperties"), -}) -public class AssetProperties extends SupplementaryProperties -{ - private String name = null; - private String versionIdentifier = null; - private String description = null; - private String deployedImplementationType = null; - - - /** - * Default constructor - */ - public AssetProperties() - { - } - - - /** - * Copy/clone constructor. Note, this is a deep copy - * - * @param template object to copy - */ - public AssetProperties(AssetProperties template) - { - super(template); - - if (template != null) - { - name = template.getName(); - versionIdentifier = template.getVersionIdentifier(); - description = template.getDescription(); - deployedImplementationType = template.getDeployedImplementationType(); - } - } - - - /** - * Return the name of the resource that this asset represents. - * - * @return string resource name - */ - public String getName() - { - return name; - } - - - /** - * Set up the name of the resource that this asset represents. - * - * @param name string resource name - */ - public void setName(String name) - { - this.name = name; - } - - - /** - * Set up the version identifier of the resource. - * - * @return string version name - */ - public String getVersionIdentifier() - { - return versionIdentifier; - } - - - /** - * Set up the version identifier of the resource. - * - * @param versionIdentifier string version name - */ - public void setVersionIdentifier(String versionIdentifier) - { - this.versionIdentifier = versionIdentifier; - } - - - /** - * Returns the stored description property for the asset. - * If no description is provided then null is returned. - * - * @return description String text - */ - public String getDescription() - { - return description; - } - - - /** - * Set up the stored description property associated with the asset. - * - * @param description String text - */ - public void setDescription(String description) - { - this.description = description; - } - - - - /** - * Retrieve the name of the technology used for this data asset. - * - * @return string name - */ - public String getDeployedImplementationType() - { - return deployedImplementationType; - } - - - /** - * Set up the name of the technology used for this data asset. - * - * @param deployedImplementationType string name - */ - public void setDeployedImplementationType(String deployedImplementationType) - { - this.deployedImplementationType = deployedImplementationType; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "AssetProperties{" + - "name='" + name + '\'' + - ", versionIdentifier='" + versionIdentifier + '\'' + - ", description='" + description + '\'' + - ", deployedImplementationType='" + deployedImplementationType + '\'' + - "} " + super.toString(); - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) return true; - if (objectToCompare == null || getClass() != objectToCompare.getClass()) return false; - if (!super.equals(objectToCompare)) return false; - AssetProperties that = (AssetProperties) objectToCompare; - return Objects.equals(name, that.name) && - Objects.equals(versionIdentifier, that.versionIdentifier) && - Objects.equals(description, that.deployedImplementationType) && - Objects.equals(description, that.description); - } - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), name, versionIdentifier, description, deployedImplementationType); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/CertificationProperties.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/CertificationProperties.java deleted file mode 100644 index 05f85c3e2d2..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/CertificationProperties.java +++ /dev/null @@ -1,463 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Date; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * CertificationProperties describe the details of a certificate that shows that an element is certified with a particular certification type. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class CertificationProperties extends RelationshipProperties -{ - private String certificateId = null; - private Date startDate = null; - private Date endDate = null; - private String conditions = null; - private String certifiedBy = null; - private String certifiedByTypeName = null; - private String certifiedByPropertyName = null; - private String custodian = null; - private String custodianTypeName = null; - private String custodianPropertyName = null; - private String recipient = null; - private String recipientTypeName = null; - private String recipientPropertyName = null; - private String notes = null; - - - /** - * Default Constructor - */ - public CertificationProperties() - { - } - - - /** - * Copy/clone Constructor - the resulting object. - * - * @param template object being copied - */ - public CertificationProperties(CertificationProperties template) - { - super(template); - - if (template != null) - { - this.certificateId = template.getCertificateId(); - this.startDate = template.getStartDate(); - this.endDate = template.getEndDate(); - this.conditions = template.getConditions(); - this.certifiedBy = template.getCertifiedBy(); - this.certifiedByTypeName = template.getCertifiedByTypeName(); - this.certifiedByPropertyName = template.getCertifiedByPropertyName(); - this.custodian = template.getCustodian(); - this.custodianTypeName = template.getCustodianTypeName(); - this.custodianPropertyName = template.getCustodianPropertyName(); - this.recipient = template.getRecipient(); - this.recipientTypeName = template.getRecipientTypeName(); - this.recipientPropertyName = template.getRecipientPropertyName(); - this.notes = template.getNotes(); - } - } - - - /** - * Return the unique identifier of the certificate. This value comes from the certificate authority. - * - * @return string - */ - public String getCertificateId() - { - return certificateId; - } - - - /** - * Set up the unique identifier of the certificate. This value comes from the certificate authority. - * - * @param certificateId string - */ - public void setCertificateId(String certificateId) - { - this.certificateId = certificateId; - } - - - /** - * Return the date/time that this certificate is valid from. - * - * @return date/time - */ - public Date getStartDate() - { - return startDate; - } - - - /** - * Set up the date/time that this certificate is valid from. - * - * @param startDate date/time - */ - public void setStartDate(Date startDate) - { - this.startDate = startDate; - } - - - /** - * Return the date/time that this certificate is no longer valid. - * - * @return date/time - */ - public Date getEndDate() - { - return endDate; - } - - - /** - * Set up the date/time that this certificate is no longer valid. - * - * @param endDate date/time - */ - public void setEndDate(Date endDate) - { - this.endDate = endDate; - } - - - /** - * Return any conditions or endorsements to this certificate. - * - * @return string text - */ - public String getConditions() - { - return conditions; - } - - - /** - * Set up any conditions or endorsements to this certificate. - * - * @param conditions string text - */ - public void setConditions(String conditions) - { - this.conditions = conditions; - } - - - /** - * Return the name of the person in the certification authority that granted this certificate. - * - * @return string name/id - */ - public String getCertifiedBy() - { - return certifiedBy; - } - - - /** - * Set up the name of the person in the certification authority that granted this certificate. - * - * @param certifiedBy string name/id - */ - public void setCertifiedBy(String certifiedBy) - { - this.certifiedBy = certifiedBy; - } - - - /** - * Return the name of the type of the element supplying the certifiedBy property. - * - * @return string type name - */ - public String getCertifiedByTypeName() - { - return certifiedByTypeName; - } - - - /** - * Set up the name of the type of the element supplying the certifiedBy property. - * - * @param certifiedByTypeName string type name - */ - public void setCertifiedByTypeName(String certifiedByTypeName) - { - this.certifiedByTypeName = certifiedByTypeName; - } - - - /** - * Return the name of the property from the element supplying the certifiedBy property. - * - * @return string property name - */ - public String getCertifiedByPropertyName() - { - return certifiedByPropertyName; - } - - - /** - * Set up the name of the property from the element supplying the certifiedBy property. - * - * @param certifiedByPropertyName string property name - */ - public void setCertifiedByPropertyName(String certifiedByPropertyName) - { - this.certifiedByPropertyName = certifiedByPropertyName; - } - - - - /** - * Return the person/team responsible for ensuring that the certificate conditions are adhered to. - * - * @return string name/id - */ - public String getCustodian() - { - return custodian; - } - - - /** - * Set up the person/team responsible for ensuring that the certificate conditions are adhered to. - * - * @param custodian string name/id - */ - public void setCustodian(String custodian) - { - this.custodian = custodian; - } - - - /** - * Return the name of the type of the element supplying the custodian property. - * - * @return string type name - */ - public String getCustodianTypeName() - { - return custodianTypeName; - } - - - /** - * Set up the name of the type of the element supplying the custodian property. - * - * @param custodianTypeName string type name - */ - public void setCustodianTypeName(String custodianTypeName) - { - this.custodianTypeName = custodianTypeName; - } - - - /** - * Return the name of the property from the element supplying the custodian property. - * - * @return string property name - */ - public String getCustodianPropertyName() - { - return custodianPropertyName; - } - - - /** - * Set up the name of the property from the element supplying the custodian property. - * - * @param custodianPropertyName string property name - */ - public void setCustodianPropertyName(String custodianPropertyName) - { - this.custodianPropertyName = custodianPropertyName; - } - - - /** - * Return the person/team that received the certification. - * - * @return string name/id - */ - public String getRecipient() - { - return recipient; - } - - - /** - * Set up the person/team that received the certification. - * - * @param recipient string name/id - */ - public void setRecipient(String recipient) - { - this.recipient = recipient; - } - - - /** - * Return the name of the type of the element supplying the recipient property. - * - * @return string type name - */ - public String getRecipientTypeName() - { - return recipientTypeName; - } - - - /** - * Set up the name of the type of the element supplying the recipient property. - * - * @param recipientTypeName string type name - */ - public void setRecipientTypeName(String recipientTypeName) - { - this.recipientTypeName = recipientTypeName; - } - - - /** - * Return the name of the property from the element supplying the recipient property. - * - * @return string property name - */ - public String getRecipientPropertyName() - { - return recipientPropertyName; - } - - - /** - * Set up the name of the property from the element supplying the recipient property. - * - * @param recipientPropertyName string property name - */ - public void setRecipientPropertyName(String recipientPropertyName) - { - this.recipientPropertyName = recipientPropertyName; - } - - - /** - * Return any notes associated with the certificate. - * - * @return string text - */ - public String getNotes() - { - return notes; - } - - - /** - * Set up any notes associated with the certificate. - * - * @param notes string text - */ - public void setNotes(String notes) - { - this.notes = notes; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "CertificationProperties{" + - "certificateId='" + certificateId + '\'' + - ", startDate=" + startDate + - ", endDate=" + endDate + - ", conditions='" + conditions + '\'' + - ", certifiedBy='" + certifiedBy + '\'' + - ", certifiedByTypeName='" + certifiedByTypeName + '\'' + - ", certifiedByPropertyName='" + certifiedByPropertyName + '\'' + - ", custodian='" + custodian + '\'' + - ", custodianTypeName='" + custodianTypeName + '\'' + - ", custodianPropertyName='" + custodianPropertyName + '\'' + - ", recipient='" + recipient + '\'' + - ", recipientTypeName='" + recipientTypeName + '\'' + - ", recipientPropertyName='" + recipientPropertyName + '\'' + - ", notes='" + notes + '\'' + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (! (objectToCompare instanceof CertificationProperties)) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - CertificationProperties that = (CertificationProperties) objectToCompare; - return Objects.equals(certificateId, that.certificateId) && Objects.equals(startDate, - that.startDate) && Objects.equals( - endDate, that.endDate) && Objects.equals(conditions, that.conditions) && Objects.equals(certifiedBy, - that.certifiedBy) && Objects.equals( - certifiedByTypeName, that.certifiedByTypeName) && Objects.equals(certifiedByPropertyName, - that.certifiedByPropertyName) && Objects.equals( - custodian, that.custodian) && Objects.equals(custodianTypeName, that.custodianTypeName) && Objects.equals( - custodianPropertyName, that.custodianPropertyName) && Objects.equals(recipient, that.recipient) && Objects.equals( - recipientTypeName, that.recipientTypeName) && Objects.equals(recipientPropertyName, - that.recipientPropertyName) && Objects.equals(notes, - that.notes); - } - - - /** - * Just use the GUID for the hash code as it should be unique. - * - * @return int code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), certificateId, startDate, endDate, conditions, certifiedBy, certifiedByTypeName, - certifiedByPropertyName, - custodian, custodianTypeName, custodianPropertyName, recipient, recipientTypeName, recipientPropertyName, notes); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/CertificationTypeProperties.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/CertificationTypeProperties.java deleted file mode 100644 index acc14cc4812..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/CertificationTypeProperties.java +++ /dev/null @@ -1,137 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * Many regulations and industry bodies define certifications that can confirm a level of support, capability - * or competence in an aspect of a digital organization's operation. Having certifications may be - * necessary to operating legally or may be a business advantage. The certifications awarded can be captured - * in the metadata repository to enable both use and management of the certification process. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class CertificationTypeProperties extends GovernanceDefinitionProperties -{ - private String details = null; - - - /** - * Default Constructor - */ - public CertificationTypeProperties() - { - } - - - /** - * Copy/Clone Constructor - * - * @param template object to copy - */ - public CertificationTypeProperties(CertificationTypeProperties template) - { - super(template); - - if (template != null) - { - this.details = template.getDetails(); - } - } - - - /** - * Return the specific details of the certification. - * - * @return string description - */ - public String getDetails() - { - return details; - } - - - /** - * Set up the specific details of the certification. - * - * @param details string description - */ - public void setDetails(String details) - { - this.details = details; - } - - - /** - * JSON-style toString - * - * @return string containing the properties and their values - */ - @Override - public String toString() - { - return "CertificationTypeProperties{" + - "details='" + details + '\'' + - ", typeName='" + getTypeName() + '\'' + - ", documentIdentifier='" + getDocumentIdentifier() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", extendedProperties=" + getExtendedProperties() + - ", title='" + getTitle() + '\'' + - ", summary='" + getSummary() + '\'' + - ", description='" + getDescription() + '\'' + - ", scope='" + getScope() + '\'' + - ", domainIdentifier=" + getDomainIdentifier() + - ", priority='" + getPriority() + '\'' + - ", implications=" + getImplications() + - ", outcomes=" + getOutcomes() + - ", results=" + getResults() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - CertificationTypeProperties that = (CertificationTypeProperties) objectToCompare; - return Objects.equals(details, that.details); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), details); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/ClassificationProperties.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/ClassificationProperties.java deleted file mode 100644 index a9ddfcc7327..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/ClassificationProperties.java +++ /dev/null @@ -1,185 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Date; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ClassificationProperties provides the base class for classifications items. This provides extended properties with the ability to - * set effectivity dates. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ClassificationProperties -{ - private Date effectiveFrom = null; - private Date effectiveTo = null; - private Map extendedProperties = null; - - - /** - * Default constructor - */ - public ClassificationProperties() - { - super(); - } - - - /** - * Copy/clone constructor. Retrieve values from the supplied template - * - * @param template element to copy - */ - public ClassificationProperties(ClassificationProperties template) - { - if (template != null) - { - effectiveFrom = template.getEffectiveFrom(); - effectiveTo = template.getEffectiveTo(); - extendedProperties = template.getExtendedProperties(); - } - } - - - /** - * Return the date/time that this element is effective from (null means effective from the epoch). - * - * @return date object - */ - public Date getEffectiveFrom() - { - return effectiveFrom; - } - - - /** - * Set up the date/time that this element is effective from (null means effective from the epoch). - * - * @param effectiveFrom date object - */ - public void setEffectiveFrom(Date effectiveFrom) - { - this.effectiveFrom = effectiveFrom; - } - - - /** - * Return the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @return date object - */ - public Date getEffectiveTo() - { - return effectiveTo; - } - - - /** - * Set the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @param effectiveTo date object - */ - public void setEffectiveTo(Date effectiveTo) - { - this.effectiveTo = effectiveTo; - } - - - /** - * Return the properties that have been defined for a subtype of this object that are not supported explicitly - * by this bean. - * - * @return property map - */ - public Map getExtendedProperties() - { - if (extendedProperties == null) - { - return null; - } - else if (extendedProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(extendedProperties); - } - } - - - /** - * Set up the properties that have been defined for a subtype of this object that are not supported explicitly - * by this bean. - * - * @param extendedProperties property map - */ - public void setExtendedProperties(Map extendedProperties) - { - this.extendedProperties = extendedProperties; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "ClassificationProperties{" + - "effectiveFrom=" + effectiveFrom + - ", effectiveTo=" + effectiveTo + - ", extendedProperties=" + extendedProperties + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ClassificationProperties that = (ClassificationProperties) objectToCompare; - return Objects.equals(effectiveFrom, that.effectiveFrom) && - Objects.equals(effectiveTo, that.effectiveTo) && - Objects.equals(extendedProperties, that.extendedProperties); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(effectiveFrom, effectiveTo, extendedProperties); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/CollectionFolderProperties.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/CollectionFolderProperties.java deleted file mode 100644 index a8433a47ae8..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/CollectionFolderProperties.java +++ /dev/null @@ -1,153 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.openmetadata.enums.OrderBy; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * CollectionFolderProperties defines the properties used to create a Folder classification for a collection. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class CollectionFolderProperties extends CollectionProperties -{ - private String collectionOrderingProperty = null; - private OrderBy collectionOrdering = null; - - /** - * Default Constructor - */ - public CollectionFolderProperties() - { - super(); - } - - - /** - * Copy/clone Constructor - the resulting object. - * - * @param template object being copied - */ - public CollectionFolderProperties(CollectionFolderProperties template) - { - super(template); - - if (template != null) - { - this.collectionOrderingProperty = template.getCollectionOrderingProperty(); - this.collectionOrdering = template.getCollectionOrdering(); - } - } - - - /** - * Return the property to use to determine the order that member are returned. - * - * @return AssetCollectionOrder enum - */ - public OrderBy getCollectionOrdering() - { - return collectionOrdering; - } - - - /** - * Set up the property to use to determine the order that assets are returned. - * - * @param collectionOrdering AssetCollectionOrder enum - */ - public void setCollectionOrdering(OrderBy collectionOrdering) - { - this.collectionOrdering = collectionOrdering; - } - - - /** - * Return the name of the property to use if collectionOrdering is OTHER. - * - * @return property name - */ - public String getCollectionOrderingProperty() - { - return collectionOrderingProperty; - } - - - /** - * Set up the name of the property to use if collectionOrdering is OTHER. - * - * @param collectionOrderingProperty test - */ - public void setCollectionOrderingProperty(String collectionOrderingProperty) - { - this.collectionOrderingProperty = collectionOrderingProperty; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "CollectionFolderProperties{" + - "collectionOrderingProperty='" + collectionOrderingProperty + '\'' + - ", collectionOrdering=" + collectionOrdering + - ", name='" + getName() + '\'' + - ", description='" + getDescription() + '\'' + - ", collectionType='" + getCollectionType() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - CollectionFolderProperties that = (CollectionFolderProperties) objectToCompare; - return Objects.equals(collectionOrderingProperty, that.collectionOrderingProperty) && collectionOrdering == that.collectionOrdering; - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), collectionOrderingProperty, collectionOrdering); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/CollectionMembershipProperties.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/CollectionMembershipProperties.java deleted file mode 100644 index 24981c28d64..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/CollectionMembershipProperties.java +++ /dev/null @@ -1,383 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.openmetadata.enums.CollectionMemberStatus; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * CollectionMember describes a member of a collection. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class CollectionMembershipProperties -{ - private String membershipRationale = null; - private String createdBy = null; - private String expression = null; - private int confidence = 0; - private CollectionMemberStatus status = null; - private String userDefinedStatus = null; - private String steward = null; - private String stewardTypeName = null; - private String stewardPropertyName = null; - private String source = null; - private String notes = null; - - - - /** - * Default constructor - */ - public CollectionMembershipProperties() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public CollectionMembershipProperties(CollectionMembershipProperties template) - { - if (template != null) - { - membershipRationale = template.getMembershipRationale(); - createdBy = template.getCreatedBy(); - confidence = template.getConfidence(); - expression = template.getExpression(); - status = template.getStatus(); - userDefinedStatus = template.getUserDefinedStatus(); - source = template.getSource(); - steward = template.getSteward(); - stewardTypeName = template.getStewardTypeName(); - stewardPropertyName = template.getStewardPropertyName(); - notes = template.getNotes(); - } - } - - - /** - * Return the rationale or role of the asset in this collection. - * - * @return text - */ - public String getMembershipRationale() - { - return membershipRationale; - } - - - /** - * Set up the rationale or role of the asset in this collection. - * - * @param membershipRationale text - */ - public void setMembershipRationale(String membershipRationale) - { - this.membershipRationale = membershipRationale; - } - - - /** - * Return the identifier of the person/process that created this membership. The userId of the creator - * is automatically captured. This field can be used to add additional information about the creator. - * For example, this could be the identifier of a process instance that created the membership relationship. - * - * @return string - */ - public String getCreatedBy() - { - return createdBy; - } - - - /** - * Set up the identifier of the person/process that created this membership. The userId of the creator - * is automatically captured. This field can be used to add additional information about the creator. - * For example, this could be the identifier of a process instance that created the membership relationship. - * - * @param createdBy string - */ - public void setCreatedBy(String createdBy) - { - this.createdBy = createdBy; - } - - - /** - * Return the expression used to determine the membership. This is used by automated processes that are determining - * membership through one or more matching algorithms. This string helps the steward understand the type of match made. - * - * @return string - */ - public String getExpression() - { - return expression; - } - - /** - * Set up the expression used to determine the membership. This is used by automated processes that are determining - * membership through one or more matching algorithms. This string helps the steward understand the type of match made. - * - * @param expression string - */ - public void setExpression(String expression) - { - this.expression = expression; - } - - - /** - * Return the confidence level (0-100) that the matching is correct. - * - * @return int - */ - public int getConfidence() - { - return confidence; - } - - - /** - * Set up the confidence level (0-100) that the matching is correct. - * - * @param confidence int - */ - public void setConfidence(int confidence) - { - this.confidence = confidence; - } - - - /** - * Return the status of the membership in the collection. - * - * @return enum - */ - public CollectionMemberStatus getStatus() - { - return status; - } - - - /** - * Set up the status of the membership in the collection. - * - * @param status enum - */ - public void setStatus(CollectionMemberStatus status) - { - this.status = status; - } - - - /** - * Return the status of the membership in the collection. This status is controlled by the local deployment. - * - * @return string - */ - public String getUserDefinedStatus() - { - return userDefinedStatus; - } - - - /** - * Set up the status of the membership in the collection. This status is controlled by the local deployment. - * - * @param userDefinedStatus string - */ - public void setUserDefinedStatus(String userDefinedStatus) - { - this.userDefinedStatus = userDefinedStatus; - } - - - /** - * Return the source of information that determined the membership. - * - * @return string - */ - public String getSource() - { - return source; - } - - - /** - * Set up the source of information that determined the membership. - * - * @param source string - */ - public void setSource(String source) - { - this.source = source; - } - - - /** - * Returns the id of the steward responsible for the mapping. - * - * @return String id - */ - public String getSteward() - { - return steward; - } - - - /** - * Set up the id of the steward responsible for the mapping. - * - * @param steward String id - */ - public void setSteward(String steward) - { - this.steward = steward; - } - - - /** - * Return the type of element that describes the steward. - * - * @return type name - */ - public String getStewardTypeName() - { - return stewardTypeName; - } - - - /** - * Set up the type of element that describes the steward. - * - * @param stewardTypeName type name - */ - public void setStewardTypeName(String stewardTypeName) - { - this.stewardTypeName = stewardTypeName; - } - - - /** - * Return the name of the property that holds the steward's identifier. - * - * @return property name - */ - public String getStewardPropertyName() - { - return stewardPropertyName; - } - - - /** - * Set up the name of the property that holds the steward's identifier. - * - * @param stewardPropertyName property name - */ - public void setStewardPropertyName(String stewardPropertyName) - { - this.stewardPropertyName = stewardPropertyName; - } - - - /** - * Return the additional values associated with the symbolic name. - * - * @return string text - */ - public String getNotes() - { - return notes; - } - - - /** - * Set up the additional values associated with the symbolic name. - * - * @param notes string text - */ - public void setNotes(String notes) - { - this.notes = notes; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "CollectionMembershipProperties{" + - "membershipRationale='" + membershipRationale + '\'' + - ", createdBy='" + createdBy + '\'' + - ", expression='" + expression + '\'' + - ", confidence=" + confidence + - ", status=" + status + - ", userDefinedStatus='" + userDefinedStatus + '\'' + - ", steward='" + steward + '\'' + - ", stewardTypeName='" + stewardTypeName + '\'' + - ", stewardPropertyName='" + stewardPropertyName + '\'' + - ", source='" + source + '\'' + - ", notes='" + notes + '\'' + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - CollectionMembershipProperties that = (CollectionMembershipProperties) objectToCompare; - return confidence == that.confidence && - Objects.equals(membershipRationale, that.membershipRationale) && - Objects.equals(createdBy, that.createdBy) && - Objects.equals(expression, that.expression) && - status == that.status && - Objects.equals(userDefinedStatus, that.userDefinedStatus) && - Objects.equals(steward, that.steward) && - Objects.equals(stewardTypeName, that.stewardTypeName) && - Objects.equals(stewardPropertyName, that.stewardPropertyName) && - Objects.equals(source, that.source) && - Objects.equals(notes, that.notes); - } - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(membershipRationale, createdBy, expression, confidence, status, userDefinedStatus, steward, stewardTypeName, - stewardPropertyName, source, notes); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/CollectionProperties.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/CollectionProperties.java deleted file mode 100644 index 949288b1cd4..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/CollectionProperties.java +++ /dev/null @@ -1,182 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.properties; - -import com.fasterxml.jackson.annotation.*; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * CollectionProperties describes the core properties of a collection. The collection is a managed list of elements. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes( - { - @JsonSubTypes.Type(value = FolderProperties.class, name = "FolderProperties"), - }) -public class CollectionProperties extends ReferenceableProperties -{ - private String name = null; - private String description = null; - private String collectionType = null; - - - /** - * Default constructor - */ - public CollectionProperties() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public CollectionProperties(CollectionProperties template) - { - super(template); - - if (template != null) - { - this.name = template.getName(); - this.description = template.getDescription(); - this.collectionType = template.getCollectionType(); - } - } - - - /** - * Return the name of the collection. - * - * @return string name - */ - public String getName() - { - return name; - } - - - /** - * Set up the name of the collection. - * - * @param name string name - */ - public void setName(String name) - { - this.name = name; - } - - - /** - * Return the description of the collection. - * - * @return text - */ - public String getDescription() - { - return description; - } - - - /** - * Set up the description of the collection. - * - * @param description text - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * Return a descriptive name for the collection's type. - * - * @return string name - */ - public String getCollectionType() - { - return collectionType; - } - - - /** - * Set up a descriptive name for the collection's type. - * - * @param collectionType string name - */ - public void setCollectionType(String collectionType) - { - this.collectionType = collectionType; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "CollectionProperties{" + - "name='" + name + '\'' + - ", description='" + description + '\'' + - ", collectionType='" + collectionType + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - CollectionProperties that = (CollectionProperties) objectToCompare; - return Objects.equals(getName(), that.getName()) && Objects.equals(getCollectionType(), that.getCollectionType()) && - Objects.equals(getDescription(), that.getDescription()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), getName(), getDescription(), getCollectionType()); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/CommentProperties.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/CommentProperties.java deleted file mode 100644 index 02ac23e77e0..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/CommentProperties.java +++ /dev/null @@ -1,187 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.openmetadata.enums.CommentType; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * The CommentProperties bean stores information about a comment connected to an asset. Comments provide informal feedback to assets - * and can be added at any time. - * - * Comments have the userId of the person who added the feedback, along with their comment text. - * - * The content of the comment is a personal statement (which is why the user's id is in the comment) - * and there is no formal review of the content. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class CommentProperties extends ReferenceableProperties -{ - private CommentType commentType = null; - private String commentText = null; - private String user = null; - - /** - * Default constructor - */ - public CommentProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template element to copy - */ - public CommentProperties(CommentProperties template) - { - super(template); - - if (template != null) - { - /* - * Copy the values from the supplied comment. - */ - commentType = template.getCommentType(); - user = template.getUser(); - commentText = template.getCommentText(); - } - } - - - /** - * Return an enum that describes the type of comment. - * - * @return CommentType enum - */ - public CommentType getCommentType() - { - return commentType; - } - - - /** - * Set up the enum that describes the type of comment. - * - * @param commentType CommentType enum - */ - public void setCommentType(CommentType commentType) - { - this.commentType = commentType; - } - - - /** - * Return the comment text. - * - * @return String commentText - */ - public String getCommentText() - { - return commentText; - } - - - /** - * Set up the comment text. - * - * @param commentText String text - */ - public void setCommentText(String commentText) - { - this.commentText = commentText; - } - - - /** - * Return the user id of the person who created the comment. Null means the user id is not known. - * - * @return String commenting user - */ - public String getUser() - { - return user; - } - - - /** - * Set up the user id of the person who created the comment. Null means the user id is not known. - * - * @param user String commenting user - */ - public void setUser(String user) - { - this.user = user; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "CommentProperties{" + - "commentType=" + commentType + - ", commentText='" + commentText + '\'' + - ", user='" + user + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - CommentProperties that = (CommentProperties) objectToCompare; - return commentType == that.commentType && - Objects.equals(commentText, that.commentText) && - Objects.equals(user, that.user); - } - - - /** - * Create a hash code for this element type. - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), commentType, commentText, user); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/ConnectionProperties.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/ConnectionProperties.java deleted file mode 100644 index bc2f74d162f..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/ConnectionProperties.java +++ /dev/null @@ -1,374 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * The connection is an object that contains the properties needed to create and initialise a connector to access a - * specific data assets. - * - * The properties for a connection are defined in model 0201. They include the following options for connector name: - *
    - *
  • - * guid - Globally unique identifier for the connection. - *
  • - *
  • - * url - URL of the connection definition in the metadata repository. - * This URL can be stored as a property in another entity to create an explicit link to this connection. - *
  • - *
  • - * qualifiedName - The official (unique) name for the connection. - * This is often defined by the IT systems management organization and should be used (when available) on - * audit logs and error messages. The qualifiedName is defined in the 0010 model as part of Referenceable. - *
  • - *
  • - * displayName - A consumable name for the connection. Often a shortened form of the qualifiedName for use - * on user interfaces and messages. The displayName should be only be used for audit logs and error messages - * if the qualifiedName is not set. - *
  • - *
- * - * Either the guid, qualifiedName or displayName can be used to specify the name for a connection. - * - * Other properties for the connection include: - *
    - *
  • - * type - information about the TypeDef for Connection - *
  • - *
  • - * description - A full description of the connection covering details of the assets it connects to - * along with usage and version information. - *
  • - *
  • - * additionalProperties - Any additional properties associated with the connection. - *
  • - *
  • - * configurationProperties - properties for configuring the connector. - *
  • - *
  • - * securedProperties - Protected properties for secure log on by connector to back end server. These - * are protected properties that can only be retrieved by privileged connector code. - *
  • - *
  • - * userId - name or URI or connecting user. - *
  • - *
  • - * encryptedPassword - password for the userId - needs decrypting by connector before use. - *
  • - *
  • - * clearPassword - password for userId - ready to use. - *
  • - *
  • - * connectorType - Properties that describe the connector type for the connector. - *
  • - *
  • - * endpoint - Properties that describe the server endpoint where the connector will retrieve the assets. - *
  • - *
  • - * assetSummary - short description of the connected asset (if any). - *
  • - *
- * - * The connection class is simply used to cache the properties for an connection. - * It is used by other classes to exchange this information between a metadata repository and a owner. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ConnectionProperties extends ReferenceableProperties -{ - private String displayName = null; - private String description = null; - private String userId = null; - private String encryptedPassword = null; - private String clearPassword = null; - private Map configurationProperties = null; - private Map securedProperties = null; - - - /** - * Default constructor sets the Connection properties to null. - */ - public ConnectionProperties() - { - super(); - } - - - /** - * Copy/clone Constructor to return a copy of a connection object. - * - * @param template Connection to copy - */ - public ConnectionProperties(ConnectionProperties template) - { - super(template); - - if (template != null) - { - displayName = template.getDisplayName(); - description = template.getDescription(); - userId = template.getUserId(); - clearPassword = template.getClearPassword(); - encryptedPassword = template.getEncryptedPassword(); - configurationProperties = template.getConfigurationProperties(); - securedProperties = template.getSecuredProperties(); - } - } - - - /** - * Returns the stored display name property for the connection. - * Null means no displayName is available. - * - * @return displayName - */ - public String getDisplayName() { return displayName; } - - - /** - * Set up the display name for UIs and reports. - * - * @param displayName String name - */ - public void setDisplayName(String displayName) - { - this.displayName = displayName; - } - - - /** - * Set up description of the element. - * - * @param description String - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * Returns the stored description property for the connection. - * If no description is provided then null is returned. - * - * @return description - */ - public String getDescription() - { - return description; - } - - - /** - * Return the userId to use on this connection. - * - * @return string - */ - public String getUserId() - { - return userId; - } - - - /** - * Set up the userId to use on this connection. - * - * @param userId string - */ - public void setUserId(String userId) - { - this.userId = userId; - } - - - /** - * Return an encrypted password. The caller is responsible for decrypting it. - * - * @return string - */ - public String getEncryptedPassword() - { - return encryptedPassword; - } - - - /** - * Set up an encrypted password. - * - * @param encryptedPassword string - */ - public void setEncryptedPassword(String encryptedPassword) - { - this.encryptedPassword = encryptedPassword; - } - - - /** - * Return an unencrypted password. - * - * @return string - */ - public String getClearPassword() - { - return clearPassword; - } - - - /** - * Set up an unencrypted password. - * - * @param clearPassword string - */ - public void setClearPassword(String clearPassword) - { - this.clearPassword = clearPassword; - } - - - /** - * Set up the configuration properties for this Connection. - * - * @param configurationProperties properties that contain additional configuration information for the connector. - */ - public void setConfigurationProperties(Map configurationProperties) - { - this.configurationProperties = configurationProperties; - } - - - /** - * Return a copy of the configuration properties. Null means no secured properties are available. - * - * @return secured properties typically user credentials for the connection - */ - public Map getConfigurationProperties() - { - if (configurationProperties == null) - { - return null; - } - else if (configurationProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(configurationProperties); - } - } - - - /** - * Set up the secured properties for this Connection. - * - * @param securedProperties properties that contain secret information such as log on information. - */ - public void setSecuredProperties(Map securedProperties) - { - this.securedProperties = securedProperties; - } - - - /** - * Return a copy of the secured properties. Null means no secured properties are available. - * - * @return secured properties typically user credentials for the connection - */ - public Map getSecuredProperties() - { - if (securedProperties == null) - { - return null; - } - else if (securedProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(securedProperties); - } - } - - - /** - * Standard toString method. Note SecuredProperties and other credential type properties are not displayed. - * This is deliberate because there is no knowing where the string will be printed. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "ConnectionProperties{" + - "displayName='" + displayName + '\'' + - ", description='" + description + '\'' + - ", userId='" + userId + '\'' + - ", encryptedPassword='" + encryptedPassword + '\'' + - ", clearPassword='" + clearPassword + '\'' + - ", configurationProperties=" + configurationProperties + - ", securedProperties=" + securedProperties + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ConnectionProperties that = (ConnectionProperties) objectToCompare; - return Objects.equals(getDisplayName(), that.getDisplayName()) && - Objects.equals(getDescription(), that.getDescription()) && - Objects.equals(getUserId(), that.getUserId()) && - Objects.equals(getEncryptedPassword(), that.getEncryptedPassword()) && - Objects.equals(getClearPassword(), that.getClearPassword()) && - Objects.equals(getConfigurationProperties(), that.getConfigurationProperties()) && - Objects.equals(getSecuredProperties(), that.getSecuredProperties()); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), getDisplayName(), getDescription(), - getUserId(), getEncryptedPassword(), getClearPassword(), getSecuredProperties(), - getConfigurationProperties()); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/ConnectorTypeProperties.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/ConnectorTypeProperties.java deleted file mode 100644 index 71c687ee192..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/ConnectorTypeProperties.java +++ /dev/null @@ -1,606 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * The ConnectorTypeProperties describe the implementation details of a particular type of connector. - * The properties for a connector type are defined in model 0201. - * They include: - * - *
    - *
  • - * guid - Globally unique identifier for the connector type. - *
  • - *
  • - * qualifiedName - The official (unique) name for the connector type. This is often defined by the IT - * systems management organization and should be used (when available) on audit logs and error messages. - *
  • - *
  • - * displayName - A consumable name for the connector type. Often a shortened form of the qualifiedName for use - * on user interfaces and messages. The displayName should be only be used for audit logs and error messages - * if the qualifiedName is not set. - *
  • - *
  • - * description - A full description of the connector type covering details of the assets it connects to - * along with usage and versioning information. - *
  • - *
  • - * supportedAssetTypeName - the type of asset that the connector implementation supports. - *
  • - *
  • - * expectedDataFormat - the format of the data that the connector supports - null for "any". - *
  • - *
  • - * connectorProviderClassName - The connector provider is the factory for a particular type of connector. - * This property defines the class name for the connector provider that the Connector Broker should use to request - * new connector instances. - *
  • - *
  • - * connectorFrameworkName - name of the connector framework that the connector implements - default Open Connector Framework (OCF). - *
  • - *
  • - * connectorInterfaceLanguage - the language that the connector is implemented in - default Java. - *
  • - *
  • - * connectorInterfaces - list of interfaces that the connector supports. - *
  • - *
  • - * targetTechnologySource - the organization that supplies the target technology that the connector implementation connects to. - *
  • - *
  • - * targetTechnologyName - the name of the target technology that the connector implementation connects to. - *
  • - *
  • - * targetTechnologyInterfaces - the names of the interfaces in the target technology that the connector calls. - *
  • - *
  • - * targetTechnologyVersions - the versions of the target technology that the connector supports. - *
  • - *
  • - * recognizedAdditionalProperties - these are the Connection additional properties recognized by the connector implementation - *
  • - *
  • - * recognizedConfigurationProperties - these are the Connection configuration properties recognized by the connector implementation - *
  • - *
  • - * recognizedSecuredProperties - these are the Connection secured properties recognized by the connector implementation - *
  • - *
  • - * additionalProperties - Any additional properties that the connector provider needs to know in order to - * create connector instances. - *
  • - *
- * - * The connectorTypeProperties class is simply used to cache the properties for an connector type. - * It is used by other classes to exchange this information between a metadata repository and a owner. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ConnectorTypeProperties extends ReferenceableProperties -{ - private String displayName = null; - private String description = null; - private String supportedAssetTypeName = null; - private String expectedDataFormat = null; - private String connectorProviderClassName = null; - private String connectorFrameworkName = null; - private String connectorInterfaceLanguage = null; - private List connectorInterfaces = null; - private String targetTechnologySource = null; - private String targetTechnologyName = null; - private List targetTechnologyInterfaces = null; - private List targetTechnologyVersions = null; - private List recognizedAdditionalProperties = null; - private List recognizedConfigurationProperties = null; - private List recognizedSecuredProperties = null; - - - - /** - * Default constructor - */ - public ConnectorTypeProperties() - { - super(); - } - - - /** - * Copy/clone constructor for a connectorType that is not connected to an asset (either directly or indirectly). - * - * @param template template object to copy. - */ - public ConnectorTypeProperties(ConnectorTypeProperties template) - { - super(template); - - if (template != null) - { - displayName = template.getDisplayName(); - description = template.getDescription(); - supportedAssetTypeName = template.getSupportedAssetTypeName(); - expectedDataFormat = template.getExpectedDataFormat(); - connectorProviderClassName = template.getConnectorProviderClassName(); - connectorFrameworkName = template.getConnectorFrameworkName(); - connectorInterfaceLanguage = template.getConnectorInterfaceLanguage(); - connectorInterfaces = template.getConnectorInterfaces(); - targetTechnologySource = template.getTargetTechnologySource(); - targetTechnologyName = template.getTargetTechnologyName(); - targetTechnologyInterfaces = template.getTargetTechnologyInterfaces(); - targetTechnologyVersions = template.getTargetTechnologyVersions(); - recognizedAdditionalProperties = template.getRecognizedAdditionalProperties(); - recognizedConfigurationProperties = template.getRecognizedConfigurationProperties(); - recognizedSecuredProperties = template.getRecognizedSecuredProperties(); - } - } - - /** - * Set up the display name for UIs and reports. - * - * @param displayName String name - */ - public void setDisplayName(String displayName) - { - this.displayName = displayName; - } - - - /** - * Returns the stored display name property for the connector type. - * If no display name is available then null is returned. - * - * @return displayName - */ - public String getDisplayName() - { - return displayName; - } - - - /** - * Set up description of the element. - * - * @param description String - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * Returns the stored description property for the connector type. - * If no description is available then null is returned. - * - * @return description - */ - public String getDescription() - { - return description; - } - - - /** - * Return the type of asset that the connector implementation supports. - * - * @return string name - */ - public String getSupportedAssetTypeName() - { - return supportedAssetTypeName; - } - - - /** - * Set up the type of asset that the connector implementation supports. - * - * @param supportedAssetTypeName string name - */ - public void setSupportedAssetTypeName(String supportedAssetTypeName) - { - this.supportedAssetTypeName = supportedAssetTypeName; - } - - - /** - * Return the format of the data that the connector supports - null for "any". - * - * @return string name - */ - public String getExpectedDataFormat() - { - return expectedDataFormat; - } - - - /** - * Set up the format of the data that the connector supports - null for "any". - * - * @param expectedDataFormat string name - */ - public void setExpectedDataFormat(String expectedDataFormat) - { - this.expectedDataFormat = expectedDataFormat; - } - - - /** - * The name of the connector provider class name. - * - * @param connectorProviderClassName String class name - */ - public void setConnectorProviderClassName(String connectorProviderClassName) - { - this.connectorProviderClassName = connectorProviderClassName; - } - - - /** - * Returns the stored connectorProviderClassName property for the connector type. - * If no connectorProviderClassName is available then null is returned. - * - * @return connectorProviderClassName class name (including package name) - */ - public String getConnectorProviderClassName() - { - return connectorProviderClassName; - } - - - /** - * Return name of the connector framework that the connector implements - default Open Connector Framework (OCF). - * - * @return string name - */ - public String getConnectorFrameworkName() - { - return connectorFrameworkName; - } - - - /** - * Set up name of the connector framework that the connector implements - default Open Connector Framework (OCF). - * - * @param connectorFrameworkName string name - */ - public void setConnectorFrameworkName(String connectorFrameworkName) - { - this.connectorFrameworkName = connectorFrameworkName; - } - - - /** - * Return the language that the connector is implemented in - default Java. - * - * @return string name - */ - public String getConnectorInterfaceLanguage() - { - return connectorInterfaceLanguage; - } - - - /** - * Set up the language that the connector is implemented in - default Java. - * - * @param connectorInterfaceLanguage string name - */ - public void setConnectorInterfaceLanguage(String connectorInterfaceLanguage) - { - this.connectorInterfaceLanguage = connectorInterfaceLanguage; - } - - - /** - * Return list of interfaces that the connector supports. - * - * @return list of names - */ - public List getConnectorInterfaces() - { - return connectorInterfaces; - } - - - /** - * Set up list of interfaces that the connector supports. - * - * @param connectorInterfaces list of names - */ - public void setConnectorInterfaces(List connectorInterfaces) - { - this.connectorInterfaces = connectorInterfaces; - } - - - /** - * Return the name of the organization that supplies the target technology that the connector implementation connects to. - * - * @return string name - */ - public String getTargetTechnologySource() - { - return targetTechnologySource; - } - - - /** - * Set up the name of the organization that supplies the target technology that the connector implementation connects to. - * - * @param targetTechnologySource list of names - */ - public void setTargetTechnologySource(String targetTechnologySource) - { - this.targetTechnologySource = targetTechnologySource; - } - - - /** - * Return the name of the target technology that the connector implementation connects to. - * - * @return string name - */ - public String getTargetTechnologyName() - { - return targetTechnologyName; - } - - - /** - * Set up the name of the target technology that the connector implementation connects to. - * - * @param targetTechnologyName string name - */ - public void setTargetTechnologyName(String targetTechnologyName) - { - this.targetTechnologyName = targetTechnologyName; - } - - - /** - * Return the names of the interfaces in the target technology that the connector calls. - * - * @return list of interface names - */ - public List getTargetTechnologyInterfaces() - { - return targetTechnologyInterfaces; - } - - - /** - * Set up the names of the interfaces in the target technology that the connector calls. - * - * @param targetTechnologyInterfaces list of interface names - */ - public void setTargetTechnologyInterfaces(List targetTechnologyInterfaces) - { - this.targetTechnologyInterfaces = targetTechnologyInterfaces; - } - - - /** - * Return the versions of the target technology that the connector supports. - * - * @return list of version identifiers - */ - public List getTargetTechnologyVersions() - { - return targetTechnologyVersions; - } - - - /** - * Set up the versions of the target technology that the connector supports. - * - * @param targetTechnologyVersions list of version identifiers - */ - public void setTargetTechnologyVersions(List targetTechnologyVersions) - { - this.targetTechnologyVersions = targetTechnologyVersions; - } - - - /** - * Set up the list of property names that this connector/connector provider implementation looks for - * in the Connection object's additionalProperties. - * - * @param recognizedAdditionalProperties list of property names - */ - public void setRecognizedAdditionalProperties(List recognizedAdditionalProperties) - { - this.recognizedAdditionalProperties = recognizedAdditionalProperties; - } - - - /** - * Return the list of property names that this connector/connector provider implementation looks for - * in the Connection object's additionalProperties. - * - * @return list of property names - */ - public List getRecognizedAdditionalProperties() - { - if (recognizedAdditionalProperties == null) - { - return null; - } - else if (recognizedAdditionalProperties.isEmpty()) - { - return null; - } - else - { - return recognizedAdditionalProperties; - } - } - - - /** - * Set up the list of property names that this connector/connector provider implementation looks for - * in the Connection object's configurationProperties. - * - * @param recognizedConfigurationProperties list of property names - */ - public void setRecognizedConfigurationProperties(List recognizedConfigurationProperties) - { - - this.recognizedConfigurationProperties = recognizedConfigurationProperties; - } - - - /** - * Return the list of property names that this connector/connector provider implementation looks for - * in the Connection object's configurationProperties. - * - * @return list of property names - */ - public List getRecognizedConfigurationProperties() - { - if (recognizedConfigurationProperties == null) - { - return null; - } - else if (recognizedConfigurationProperties.isEmpty()) - { - return null; - } - else - { - return recognizedConfigurationProperties; - } - } - - - /** - * Set up the list of property names that this connector/connector provider implementation looks for - * in the Connection object's securedProperties. - * - * @param recognizedSecuredProperties list of property names - */ - public void setRecognizedSecuredProperties(List recognizedSecuredProperties) - { - this.recognizedSecuredProperties = recognizedSecuredProperties; - } - - - /** - * Return the list of property names that this connector/connector provider implementation looks for - * in the Connection object's securedProperties. - * - * @return list of property names - */ - public List getRecognizedSecuredProperties() - { - if (recognizedSecuredProperties == null) - { - return null; - } - else if (recognizedSecuredProperties.isEmpty()) - { - return null; - } - else - { - return recognizedSecuredProperties; - } - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "ConnectorTypeProperties{" + - "displayName='" + displayName + '\'' + - ", description='" + description + '\'' + - ", supportedAssetTypeName='" + supportedAssetTypeName + '\'' + - ", expectedDataFormat='" + expectedDataFormat + '\'' + - ", connectorProviderClassName='" + connectorProviderClassName + '\'' + - ", connectorFrameworkName='" + connectorFrameworkName + '\'' + - ", connectorInterfaceLanguage='" + connectorInterfaceLanguage + '\'' + - ", connectorInterfaces=" + connectorInterfaces + - ", targetTechnologySource='" + targetTechnologySource + '\'' + - ", targetTechnologyName='" + targetTechnologyName + '\'' + - ", targetTechnologyInterfaces=" + targetTechnologyInterfaces + - ", targetTechnologyVersions=" + targetTechnologyVersions + - ", recognizedAdditionalProperties=" + recognizedAdditionalProperties + - ", recognizedConfigurationProperties=" + recognizedConfigurationProperties + - ", recognizedSecuredProperties=" + recognizedSecuredProperties + - ", typeName='" + getTypeName() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - ConnectorTypeProperties that = (ConnectorTypeProperties) objectToCompare; - return Objects.equals(displayName, that.displayName) && - Objects.equals(description, that.description) && - Objects.equals(supportedAssetTypeName, that.supportedAssetTypeName) && - Objects.equals(expectedDataFormat, that.expectedDataFormat) && - Objects.equals(connectorProviderClassName, that.connectorProviderClassName) && - Objects.equals(connectorFrameworkName, that.connectorFrameworkName) && - Objects.equals(connectorInterfaceLanguage, that.connectorInterfaceLanguage) && - Objects.equals(connectorInterfaces, that.connectorInterfaces) && - Objects.equals(targetTechnologySource, that.targetTechnologySource) && - Objects.equals(targetTechnologyName, that.targetTechnologyName) && - Objects.equals(targetTechnologyInterfaces, that.targetTechnologyInterfaces) && - Objects.equals(targetTechnologyVersions, that.targetTechnologyVersions) && - Objects.equals(recognizedAdditionalProperties, that.recognizedAdditionalProperties) && - Objects.equals(recognizedConfigurationProperties, that.recognizedConfigurationProperties) && - Objects.equals(recognizedSecuredProperties, that.recognizedSecuredProperties); - } - - - /** - * Hash of properties - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), displayName, description, supportedAssetTypeName, expectedDataFormat, connectorProviderClassName, - connectorFrameworkName, connectorInterfaceLanguage, connectorInterfaces, targetTechnologySource, targetTechnologyName, - targetTechnologyInterfaces, targetTechnologyVersions, recognizedAdditionalProperties, recognizedConfigurationProperties, - recognizedSecuredProperties); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/DataContentForDataSetProperties.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/DataContentForDataSetProperties.java deleted file mode 100644 index 2ed405e4b29..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/DataContentForDataSetProperties.java +++ /dev/null @@ -1,145 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * DataContentForDataSetProperties defines a query on an asset that returns all or part of the values for a dataset. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class DataContentForDataSetProperties extends RelationshipProperties -{ - private String queryId = null; - private String query = null; - - - - /** - * Default constructor - */ - public DataContentForDataSetProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template template to copy. - */ - public DataContentForDataSetProperties(DataContentForDataSetProperties template) - { - super(template); - - if (template != null) - { - queryId = template.getQueryId(); - query = template.getQuery(); - } - } - - - /** - * Return the query id - this is used to identify where the results of this query should be plugged into - * the other queries or the formula for the parent derived schema element. - * - * @return String query identifier - */ - public String getQueryId() { return queryId; } - - - /** - * Set up the query id - this is used to identify where the results of this query should be plugged into - * the other queries or the formula for the parent derived schema element. - * - * @param queryId String query identifier - */ - public void setQueryId(String queryId) - { - this.queryId = queryId; - } - - - /** - * Return the query string for this element. The query string may have placeholders for values returned - * by queries that have a lower queryId than this element. - * - * @return String query - */ - public String getQuery() { return query; } - - - /** - * Set up the query string for this element. The query string may have placeholders for values returned - * by queries that have a lower queryId than this element. - * - * @param query String query - */ - public void setQuery(String query) - { - this.query = query; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "DataContentForDataSetProperties{" + - "queryId='" + queryId + '\'' + - ", query='" + query + '\'' + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof DataContentForDataSetProperties)) - { - return false; - } - DataContentForDataSetProperties that = (DataContentForDataSetProperties) objectToCompare; - return Objects.equals(getQueryId(), that.getQueryId()) && - Objects.equals(getQuery(), that.getQuery()); - } - - - /** - * Create a hash code for this element type. - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(getQueryId(), getQuery()); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/DataFieldQueryProperties.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/DataFieldQueryProperties.java deleted file mode 100644 index 5807e3589b9..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/DataFieldQueryProperties.java +++ /dev/null @@ -1,201 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetowner.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * DataFieldQueryProperties is used to provide the properties that can be used to extract an element by the data values classification. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class DataFieldQueryProperties extends FindProperties -{ - private String defaultValue = null; - private List sampleValues = null; - private List dataPattern = null; - private List namePattern = null; - - - /** - * Default constructor - */ - public DataFieldQueryProperties() - { - super(); - } - - - /** - * Copy/clone constructor for an editing glossary classification. - * - * @param template template object to copy. - */ - public DataFieldQueryProperties(DataFieldQueryProperties template) - { - super(template); - - if (template != null) - { - defaultValue = template.getDefaultValue(); - sampleValues = template.getSampleValues(); - dataPattern = template.getDataPattern(); - namePattern = template.getNamePattern(); - } - } - - - /** - * Return the default value typically assigned to these types of data fields. - * - * @return string description - */ - public String getDefaultValue() - { - return defaultValue; - } - - - /** - * Set up the description (typically and overview of the revision) of the glossary. - * - * @param defaultValue string description - */ - public void setDefaultValue(String defaultValue) - { - this.defaultValue = defaultValue; - } - - - /** - * Return a list of sample values for the data field. - * - * @return list of strings - */ - public List getSampleValues() - { - return sampleValues; - } - - - /** - * Set up a list of sample values for the data field. - * - * @param sampleValues list of strings - */ - public void setSampleValues(List sampleValues) - { - this.sampleValues = sampleValues; - } - - - /** - * Return a regular expression that characterizes the data values stored in this data field. - * - * @return string - */ - public List getDataPattern() - { - return dataPattern; - } - - - /** - * Set up a regular expression that characterizes the data values stored in this data field. - * - * @param dataPattern string - */ - public void setDataPattern(List dataPattern) - { - this.dataPattern = dataPattern; - } - - - /** - * Return a regular expression that characterizes the name used for this type of data field. - * - * @return string - */ - public List getNamePattern() - { - return namePattern; - } - - - /** - * Set up a regular expression that characterizes the name used for this type of data field. - * - * @param namePattern string - */ - public void setNamePattern(List namePattern) - { - this.namePattern = namePattern; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "DataFieldQueryProperties{" + - "defaultValue='" + defaultValue + '\'' + - ", sampleValues=" + sampleValues + - ", dataPattern=" + dataPattern + - ", namePattern=" + namePattern + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (! (objectToCompare instanceof DataFieldQueryProperties that)) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - return Objects.equals(defaultValue, that.defaultValue) && - Objects.equals(sampleValues, that.sampleValues) && - Objects.equals(dataPattern, that.dataPattern) && - Objects.equals(namePattern, that.namePattern); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), defaultValue, sampleValues, dataPattern, namePattern); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/DataFieldValuesProperties.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/DataFieldValuesProperties.java deleted file mode 100644 index 024c021af0e..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/DataFieldValuesProperties.java +++ /dev/null @@ -1,205 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetowner.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * DataFieldValuesProperties is used to provide the characterizations of the data values stored in a data field - * described by the attached element. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class DataFieldValuesProperties extends ClassificationProperties -{ - private String defaultValue = null; - private List sampleValues = null; - private List dataPattern = null; - private List namePattern = null; - - - /** - * Default constructor - */ - public DataFieldValuesProperties() - { - super(); - } - - - /** - * Copy/clone constructor for an editing glossary classification. - * - * @param template template object to copy. - */ - public DataFieldValuesProperties(DataFieldValuesProperties template) - { - super(template); - - if (template != null) - { - defaultValue = template.getDefaultValue(); - sampleValues = template.getSampleValues(); - dataPattern = template.getDataPattern(); - namePattern = template.getNamePattern(); - } - } - - - /** - * Return the default value typically assigned to these types of data fields. - * - * @return string description - */ - public String getDefaultValue() - { - return defaultValue; - } - - - /** - * Set up the description (typically and overview of the revision) of the glossary. - * - * @param defaultValue string description - */ - public void setDefaultValue(String defaultValue) - { - this.defaultValue = defaultValue; - } - - - /** - * Return a list of sample values for the data field. - * - * @return list of strings - */ - public List getSampleValues() - { - return sampleValues; - } - - - /** - * Set up a list of sample values for the data field. - * - * @param sampleValues list of strings - */ - public void setSampleValues(List sampleValues) - { - this.sampleValues = sampleValues; - } - - - /** - * Return a regular expression that characterizes the data values stored in this data field. - * - * @return string - */ - public List getDataPattern() - { - return dataPattern; - } - - - /** - * Set up a regular expression that characterizes the data values stored in this data field. - * - * @param dataPattern string - */ - public void setDataPattern(List dataPattern) - { - this.dataPattern = dataPattern; - } - - - /** - * Return a regular expression that characterizes the name used for this type of data field. - * - * @return string - */ - public List getNamePattern() - { - return namePattern; - } - - - /** - * Set up a regular expression that characterizes the name used for this type of data field. - * - * @param namePattern string - */ - public void setNamePattern(List namePattern) - { - this.namePattern = namePattern; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "DataFieldValuesProperties{" + - "defaultValue='" + defaultValue + '\'' + - ", sampleValues=" + sampleValues + - ", dataPattern='" + dataPattern + '\'' + - ", namePattern='" + namePattern + '\'' + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (! (objectToCompare instanceof DataFieldValuesProperties that)) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - return Objects.equals(defaultValue, that.defaultValue) && - Objects.equals(sampleValues, that.sampleValues) && - Objects.equals(dataPattern, that.dataPattern) && - Objects.equals(namePattern, that.namePattern); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), defaultValue, sampleValues, dataPattern, namePattern); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/DataStoreProperties.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/DataStoreProperties.java deleted file mode 100644 index 368bf652a51..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/DataStoreProperties.java +++ /dev/null @@ -1,345 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.properties; - -import com.fasterxml.jackson.annotation.*; - -import java.util.Date; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * DataStoreProperties provides the JavaBean for describing a data store. This is a physical store of data. - * It is saved in the catalog as an asset. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes({ - @JsonSubTypes.Type(value = FileProperties.class, name = "FileProperties"), - @JsonSubTypes.Type(value = FolderProperties.class, name = "FolderProperties") - - }) -public class DataStoreProperties extends AssetProperties -{ - private String deployedImplementationType = null; - private String pathName = null; - private Date createTime = null; - private Date modifiedTime = null; - private String encodingType = null; - private String encodingLanguage = null; - private String encodingDescription = null; - private Map encodingProperties = null; - - - /** - * Default constructor - */ - public DataStoreProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public DataStoreProperties(DataStoreProperties template) - { - super(template); - - if (template != null) - { - pathName = template.getPathName(); - createTime = template.getCreateTime(); - modifiedTime = template.getModifiedTime(); - encodingType = template.getEncodingType(); - encodingLanguage = template.getEncodingLanguage(); - encodingDescription = template.getEncodingDescription(); - encodingProperties = template.getEncodingProperties(); - deployedImplementationType = template.getDeployedImplementationType(); - } - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public DataStoreProperties(AssetProperties template) - { - super(template); - } - - - /** - * Return the fully qualified physical location of the data store. This should be suitable for the - * network address of the Endpoint. - * - * @return string name - */ - public String getPathName() - { - return pathName; - } - - - /** - * Set up the fully qualified physical location of the data store. This should be suitable for the - * network address of the Endpoint. - * - * @param pathName string name - */ - public void setPathName(String pathName) - { - this.pathName = pathName; - } - - - /** - * Return the time that the data store was created. - * - * @return date - */ - public Date getCreateTime() - { - return createTime; - } - - - /** - * Set up the time that the data store was created. - * - * @param createTime date - */ - public void setCreateTime(Date createTime) - { - this.createTime = createTime; - } - - - /** - * Return the last known time the data store was modified. - * - * @return date - */ - public Date getModifiedTime() - { - return modifiedTime; - } - - - /** - * Setup the last known time the data store was modified. - * - * @param modifiedTime date - */ - public void setModifiedTime(Date modifiedTime) - { - this.modifiedTime = modifiedTime; - } - - - /** - * Return the name of the encoding style used in the data store. - * - * @return string name - */ - public String getEncodingType() - { - return encodingType; - } - - - /** - * Set up the name of the encoding style used in the data store. - * - * @param encodingType string name - */ - public void setEncodingType(String encodingType) - { - this.encodingType = encodingType; - } - - - /** - * Return the name of the natural language used for text strings within the data store. - * - * @return string language name - */ - public String getEncodingLanguage() - { - return encodingLanguage; - } - - - /** - * Set up the name of the natural language used for text strings within the data store. - * - * @param encodingLanguage string language name - */ - public void setEncodingLanguage(String encodingLanguage) - { - this.encodingLanguage = encodingLanguage; - } - - - /** - * Return the description of the encoding used in the data store. - * - * @return string text - */ - public String getEncodingDescription() - { - return encodingDescription; - } - - - /** - * Set up the description of the encoding used in the data store. - * - * @param encodingDescription string text - */ - public void setEncodingDescription(String encodingDescription) - { - this.encodingDescription = encodingDescription; - } - - - /** - * Return the additional properties associated with the encoding process. - * - * @return map of name-value pairs - */ - public Map getEncodingProperties() - { - if (encodingProperties == null) - { - return null; - } - else if (encodingProperties.isEmpty()) - { - return null; - } - return encodingProperties; - } - - - /** - * Set up the additional properties associated with the encoding process. - * - * @param encodingProperties map of name-value pairs - */ - public void setEncodingProperties(Map encodingProperties) - { - this.encodingProperties = encodingProperties; - } - - - /** - * Retrieve the name of the technology used for this data asset. - * - * @return string name - */ - public String getDeployedImplementationType() - { - return deployedImplementationType; - } - - - /** - * Set up the name of the technology used for this data asset. - * - * @param deployedImplementationType string name - */ - public void setDeployedImplementationType(String deployedImplementationType) - { - this.deployedImplementationType = deployedImplementationType; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @SuppressWarnings(value = "deprecation") - @Override - public String toString() - { - return "DataStoreProperties{" + - "name='" + getName() + '\'' + - ", versionIdentifier='" + getVersionIdentifier() + '\'' + - ", displayName='" + getDisplayName() + '\'' + - ", description='" + getDescription() + '\'' + - ", pathName='" + pathName + '\'' + - ", createTime=" + createTime + - ", modifiedTime=" + modifiedTime + - ", encodingType='" + encodingType + '\'' + - ", encodingLanguage='" + encodingLanguage + '\'' + - ", encodingDescription='" + encodingDescription + '\'' + - ", encodingProperties=" + encodingProperties + - ", deployedImplementationType='" + deployedImplementationType + '\'' + - ", typeName='" + getTypeName() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - DataStoreProperties that = (DataStoreProperties) objectToCompare; - return Objects.equals(pathName, that.pathName) && - Objects.equals(createTime, that.createTime) && - Objects.equals(modifiedTime, that.modifiedTime) && - Objects.equals(deployedImplementationType, that.deployedImplementationType) && - Objects.equals(encodingType, that.encodingType) && - Objects.equals(encodingLanguage, that.encodingLanguage) && - Objects.equals(encodingDescription, that.encodingDescription) && - Objects.equals(encodingProperties, that.encodingProperties); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), pathName, createTime, modifiedTime, deployedImplementationType, encodingType, - encodingLanguage, encodingDescription, encodingProperties); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/DerivedSchemaTypeQueryTargetProperties.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/DerivedSchemaTypeQueryTargetProperties.java deleted file mode 100644 index afe5b2a0546..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/DerivedSchemaTypeQueryTargetProperties.java +++ /dev/null @@ -1,193 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.properties; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * DerivedSchemaTypeQueryTargetProperties defines a query on a schema element that returns all or part of the value for a - * derived schema type. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class DerivedSchemaTypeQueryTargetProperties -{ - private String queryId = null; - private String query = null; - private String queryType = null; - private String queryTargetGUID = null; - - - /** - * Default constructor - */ - public DerivedSchemaTypeQueryTargetProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template template schema query to copy. - */ - public DerivedSchemaTypeQueryTargetProperties(DerivedSchemaTypeQueryTargetProperties template) - { - super(); - - if (template != null) - { - queryId = template.getQueryId(); - query = template.getQuery(); - queryType = template.getQueryType(); - queryTargetGUID = template.getQueryTargetGUID(); - } - } - - - /** - * Return the query id - this is used to identify where the results of this query should be plugged into - * the other queries or the formula for the parent derived schema element. - * - * @return String query identifier - */ - public String getQueryId() { return queryId; } - - - /** - * Set up the query id - this is used to identify where the results of this query should be plugged into - * the other queries or the formula for the parent derived schema element. - * - * @param queryId String query identifier - */ - public void setQueryId(String queryId) - { - this.queryId = queryId; - } - - - /** - * Return the query string for this element. The query string may have placeholders for values returned - * by queries that have a lower queryId than this element. - * - * @return String query - */ - public String getQuery() { return query; } - - - /** - * Set up the query string for this element. The query string may have placeholders for values returned - * by queries that have a lower queryId than this element. - * - * @param query String query - */ - public void setQuery(String query) - { - this.query = query; - } - - - /** - * Return the name of the query language used in the query. - * - * @return queryType String - */ - public String getQueryType() { return queryType; } - - - /** - * Set up the name of the query language used in the query. - * - * @param queryType String name - */ - public void setQueryType(String queryType) - { - this.queryType = queryType; - } - - - /** - * Return the unique identifier that describes the data source that will be queried to get part of the derived value. - * - * @return string guid - */ - public String getQueryTargetGUID() - { - return queryTargetGUID; - } - - - /** - * Set up the unique identifier that describes the data source that will be queried to get part of the derived value. - * - * @param queryTargetGUID string guid - */ - public void setQueryTargetGUID(String queryTargetGUID) - { - this.queryTargetGUID = queryTargetGUID; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "DerivedSchemaTypeQueryTargetProperties{" + - "queryId=" + queryId + - ", query='" + query + '\'' + - ", queryType='" + queryType + '\'' + - ", queryTargetGUID=" + queryTargetGUID + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof DerivedSchemaTypeQueryTargetProperties)) - { - return false; - } - DerivedSchemaTypeQueryTargetProperties that = (DerivedSchemaTypeQueryTargetProperties) objectToCompare; - return Objects.equals(getQueryId(), that.getQueryId()) && - Objects.equals(getQuery(), that.getQuery()) && - Objects.equals(getQueryType(), that.getQueryType()) && - Objects.equals(getQueryTargetGUID(), that.getQueryTargetGUID()); - } - - - /** - * Create a hash code for this element type. - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(getQueryId(), getQuery(), getQueryType(), getQueryTargetGUID()); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/DuplicateProperties.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/DuplicateProperties.java deleted file mode 100644 index 7cf3858f99b..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/DuplicateProperties.java +++ /dev/null @@ -1,273 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetowner.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetowner.rest.AssetOwnerOMASAPIRequestBody; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * DuplicatesRequestBody provides a structure for passing the properties associated with duplicates. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class DuplicateProperties extends AssetOwnerOMASAPIRequestBody -{ - private String duplicateGUID = null; - private int statusIdentifier = 0; - private String steward = null; - private String stewardTypeName = null; - private String stewardPropertyName = null; - private String source = null; - private String notes = null; - - - /** - * Default constructor - */ - public DuplicateProperties() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public DuplicateProperties(DuplicateProperties template) - { - super(template); - - if (template != null) - { - statusIdentifier = template.getStatusIdentifier(); - steward = template.getSteward(); - stewardTypeName = template.getStewardPropertyName(); - stewardPropertyName = template.getStewardPropertyName(); - source = template.getSource(); - notes = template.getNotes(); - } - } - - - /** - * Return the unique identifier of the duplicate. - * - * @return identifier - */ - public String getDuplicateGUID() - { - return duplicateGUID; - } - - - /** - * Set up the unique identifier of the duplicate. - * - * @param duplicateGUID identifier - */ - public void setDuplicateGUID(String duplicateGUID) - { - this.duplicateGUID = duplicateGUID; - } - - - /** - * Return the status of this duplicate - usable if greater than 0, 0=proposed, negative means invalid - * - * @return int - */ - public int getStatusIdentifier() - { - return statusIdentifier; - } - - - /** - * Set up the status of this duplicate - usable if greater than 0, 0=proposed, negative means invalid - * - * @param statusIdentifier int - */ - public void setStatusIdentifier(int statusIdentifier) - { - this.statusIdentifier = statusIdentifier; - } - - - /** - * Return the identifier of the steward that added this duplicate. - * - * @return identifier - */ - public String getSteward() - { - return steward; - } - - - /** - * Set up the identifier of the steward that added this duplicate. - * - * @param steward identifier - */ - public void setSteward(String steward) - { - this.steward = steward; - } - - - /** - * Return the type name of the element used to identify the steward. - * - * @return type name - */ - public String getStewardTypeName() - { - return stewardTypeName; - } - - - /** - * Set up the type name of the element used to identify the steward. - * - * @param stewardTypeName type name - */ - public void setStewardTypeName(String stewardTypeName) - { - this.stewardTypeName = stewardTypeName; - } - - - /** - * Return the name of the property used to identify the steward. - * - * @return property name - */ - public String getStewardPropertyName() - { - return stewardPropertyName; - } - - - /** - * Return the name of the property used to identify the steward. - * - * @param stewardPropertyName property name - */ - public void setStewardPropertyName(String stewardPropertyName) - { - this.stewardPropertyName = stewardPropertyName; - } - - - /** - * Return the details of the source that detected the duplicate. - * - * @return name - */ - public String getSource() - { - return source; - } - - - /** - * Set up the details of the source that detected the duplicate. - * - * @param source name - */ - public void setSource(String source) - { - this.source = source; - } - - - /** - * Return any notes for the steward. - * - * @return text - */ - public String getNotes() - { - return notes; - } - - - /** - * Set up any notes for the steward. - * - * @param notes text - */ - public void setNotes(String notes) - { - this.notes = notes; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "DuplicatesRequestBody{" + - "statusIdentifier=" + statusIdentifier + - ", steward='" + steward + '\'' + - ", stewardTypeName='" + stewardTypeName + '\'' + - ", stewardPropertyName='" + stewardPropertyName + '\'' + - ", source='" + source + '\'' + - ", notes='" + notes + '\'' + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - DuplicateProperties that = (DuplicateProperties) objectToCompare; - return statusIdentifier == that.statusIdentifier && - Objects.equals(steward, that.steward) && - Objects.equals(stewardTypeName, that.stewardTypeName) && - Objects.equals(stewardPropertyName, that.stewardPropertyName) && - Objects.equals(source, that.source) && - Objects.equals(notes, that.notes); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(statusIdentifier, steward, stewardTypeName, stewardPropertyName, source, notes); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/EndpointProperties.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/EndpointProperties.java deleted file mode 100644 index 65b35ecacf7..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/EndpointProperties.java +++ /dev/null @@ -1,240 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetowner.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * EndpointProperties describes the properties of a server endpoint. The endpoint is linked - * to the asset manager's server and describes its network endpoint. It is also linked to connection objects - * that are used by clients to connect to the asset manager. A connection is linked to each asset - * that is hosted on the asset manager. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class EndpointProperties extends ReferenceableProperties -{ - private String name = null; - private String description = null; - private String address = null; - private String protocol = null; - private String encryptionMethod = null; - - - /** - * Default constructor - */ - public EndpointProperties() - { - super(); - } - - - /** - * Copy/clone constructor for an Endpoint. - * - * @param template template object to copy. - */ - public EndpointProperties(EndpointProperties template) - { - super(template); - - if (template != null) - { - name = template.getName(); - description = template.getDescription(); - address = template.getAddress(); - protocol = template.getProtocol(); - encryptionMethod = template.getEncryptionMethod(); - } - } - - - /** - * Set up the technical name for the endpoint. - * - * @param name String name - */ - public void setName(String name) - { - this.name = name; - } - - - /** - * Returns the stored technical name property for the endpoint. - * If no technical name is available then null is returned. - * - * @return String name - */ - public String getName() - { - return name; - } - - - /** - * Set up the technical description of the endpoint. - * - * @param description String - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * Return the technical description for the endpoint. - * - * @return String technicalDescription - */ - public String getDescription() - { - return description; - } - - - /** - * Set up the network address of the endpoint. - * - * @param address String resource name - */ - public void setAddress(String address) - { - this.address = address; - } - - - /** - * Returns the stored address property for the endpoint. - * If no network address is available then null is returned. - * - * @return address - */ - public String getAddress() - { - return address; - } - - - /** - * Set up the protocol to use for this Endpoint - * - * @param protocol String protocol name - */ - public void setProtocol(String protocol) - { - this.protocol = protocol; - } - - - /** - * Returns the stored protocol property for the endpoint. - * If no protocol is available then null is returned. - * - * @return protocol - */ - public String getProtocol() - { - return protocol; - } - - - /** - * Set up the encryption method used on this Endpoint. - * - * @param encryptionMethod String name - */ - public void setEncryptionMethod(String encryptionMethod) - { - this.encryptionMethod = encryptionMethod; - } - - - /** - * Returns the stored encryptionMethod property for the endpoint. This is an open type allowing the information - * needed to work with a specific encryption mechanism used by the endpoint to be defined. - * If no encryptionMethod property is available (typically because this is an unencrypted endpoint) - * then null is returned. - * - * @return encryption method information - */ - public String getEncryptionMethod() - { - return encryptionMethod; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "EndpointProperties{" + - "name='" + name + '\'' + - ", description='" + description + '\'' + - ", address='" + address + '\'' + - ", protocol='" + protocol + '\'' + - ", encryptionMethod='" + encryptionMethod + '\'' + - ", typeName='" + getTypeName() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - EndpointProperties that = (EndpointProperties) objectToCompare; - return Objects.equals(name, that.name) && - Objects.equals(description, that.description) && - Objects.equals(address, that.address) && - Objects.equals(protocol, that.protocol) && - Objects.equals(encryptionMethod, that.encryptionMethod); - } - - - /** - * Create a hash code for this element type. - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), name, description, address, protocol, encryptionMethod); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/ExternalReferenceLinkProperties.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/ExternalReferenceLinkProperties.java deleted file mode 100644 index d2d81ad073e..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/ExternalReferenceLinkProperties.java +++ /dev/null @@ -1,175 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ExternalReferenceLinkProperties provides a structure for the properties that link an external reference to an object. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ExternalReferenceLinkProperties extends RelationshipProperties -{ - private String linkId = null; - private String linkDescription = null; - private String pages = null; - - - /** - * Default constructor - */ - public ExternalReferenceLinkProperties() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ExternalReferenceLinkProperties(ExternalReferenceLinkProperties template) - { - super (template); - - if (template != null) - { - this.linkId = template.getLinkId(); - this.linkDescription = template.getLinkDescription(); - this.pages = template.getPages(); - } - } - - - /** - * Return the identifier that this reference is to be known as with respect to the linked object. - * - * @return String identifier - */ - public String getLinkId() - { - return linkId; - } - - - /** - * Set up the identifier that this reference is to be known as with respect to the linked object. - * - * @param linkId String identifier - */ - public void setLinkId(String linkId) - { - this.linkId = linkId; - } - - - /** - * Return the description of the external reference with respect to the linked object. - * - * @return string - */ - public String getLinkDescription() - { - return linkDescription; - } - - - /** - * Set up the description of the external reference with respect to the linked object. - * - * @param linkDescription string - */ - public void setLinkDescription(String linkDescription) - { - this.linkDescription = linkDescription; - } - - - /** - * Return the page range for the reference. - * - * @return string - */ - public String getPages() - { - return pages; - } - - - /** - * Set up the page range for the reference. - * - * @param pages string - */ - public void setPages(String pages) - { - this.pages = pages; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "ExternalReferenceLinkProperties{" + - "linkId='" + linkId + '\'' + - ", linkDescription='" + linkDescription + '\'' + - ", pages='" + pages + '\'' + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (! (objectToCompare instanceof ExternalReferenceLinkProperties)) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - ExternalReferenceLinkProperties that = (ExternalReferenceLinkProperties) objectToCompare; - return Objects.equals(linkId, that.linkId) && Objects.equals(linkDescription, that.linkDescription) - && Objects.equals(pages, that.pages); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), linkId, linkDescription, pages); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/ExternalReferenceProperties.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/ExternalReferenceProperties.java deleted file mode 100644 index 58c3fbfbecb..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/ExternalReferenceProperties.java +++ /dev/null @@ -1,269 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ExternalReferenceProperties stores information about an link to an external resource that is relevant to this element. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ExternalReferenceProperties extends ReferenceableProperties -{ - private String localReferenceId = null; - private String displayName = null; - private String linkDescription = null; - private String resourceDescription = null; - private String uri = null; - private String version = null; - private String organization = null; - - - /** - * Default constructor - */ - public ExternalReferenceProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template element to copy - */ - public ExternalReferenceProperties(ExternalReferenceProperties template) - { - super(template); - - if (template != null) - { - /* - * Copy the values from the supplied template. - */ - localReferenceId = template.getLocalReferenceId(); - linkDescription = template.getLinkDescription(); - displayName = template.getDisplayName(); - uri = template.getURI(); - resourceDescription = template.getResourceDescription(); - version = template.getVersion(); - organization = template.getOrganization(); - } - } - - - /** - * Return the identifier given to this reference (with respect to this governance definition). - * - * @return localReferenceId - */ - public String getLocalReferenceId() - { - return localReferenceId; - } - - - /** - * Set up the identifier given to this reference (with respect to this governance definition). - * - * @param localReferenceId String name - */ - public void setLocalReferenceId(String localReferenceId) - { - this.localReferenceId = localReferenceId; - } - - - /** - * Return the display name of this external reference. - * - * @return String display name. - */ - public String getDisplayName() { return displayName; } - - - /** - * Set up the display name of this external reference. - * - * @param displayName - string name - */ - public void setDisplayName(String displayName) - { - this.displayName = displayName; - } - - - /** - * Return the description of the reference (with respect to this governance definition). - * - * @return String link description. - */ - public String getLinkDescription() { return linkDescription; } - - - /** - * Set up the description of the reference (with respect to the governance definition this reference is linked to). - * - * @param linkDescription String description - */ - public void setLinkDescription(String linkDescription) - { - this.linkDescription = linkDescription; - } - - - /** - * Return the description of the resource that this external reference represents. - * - * @return String description - */ - public String getResourceDescription() { return resourceDescription; } - - - /** - * Set up the description of the resource that this external reference represents. - * - * @param resourceDescription String description - */ - public void setResourceDescription(String resourceDescription) - { - this.resourceDescription = resourceDescription; - } - - - /** - * Return the URI used to retrieve the resource that this external reference represents. - * - * @return String URI - */ - public String getURI() { return uri; } - - - /** - * Set up the URI used to retrieve the resource that this external reference represents. - * - * @param uri String URI - */ - public void setURI(String uri) - { - this.uri = uri; - } - - - - /** - * Return the version of the resource that this external reference represents. - * - * @return String version identifier - */ - public String getVersion() { return version; } - - - /** - * Set up the version of the resource that this external reference represents. - * - * @param version String identifier - */ - public void setVersion(String version) - { - this.version = version; - } - - - /** - * Return the name of the organization that owns the resource that this external reference represents. - * - * @return String organization name - */ - public String getOrganization() { return organization; } - - - /** - * Set up the name of the organization that owns the resource that this external reference represents. - * - * @param organization String name - */ - public void setOrganization(String organization) - { - this.organization = organization; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "ExternalReferenceProperties{" + - "localReferenceId='" + localReferenceId + '\'' + - ", displayName='" + displayName + '\'' + - ", linkDescription='" + linkDescription + '\'' + - ", resourceDescription='" + resourceDescription + '\'' + - ", uri='" + uri + '\'' + - ", version='" + version + '\'' + - ", organization='" + organization + '\'' + - ", URI='" + getURI() + '\'' + - ", typeName='" + getTypeName() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ExternalReferenceProperties that = (ExternalReferenceProperties) objectToCompare; - return Objects.equals(localReferenceId, that.localReferenceId) && - Objects.equals(displayName, that.displayName) && - Objects.equals(linkDescription, that.linkDescription) && - Objects.equals(resourceDescription, that.resourceDescription) && - Objects.equals(uri, that.uri) && - Objects.equals(version, that.version) && - Objects.equals(organization, that.organization); - } - - - /** - * Uses the guid to create a hashcode. - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(localReferenceId, displayName, linkDescription, resourceDescription, uri, version, organization); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/FeedbackProperties.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/FeedbackProperties.java deleted file mode 100644 index ff87b0ddf0f..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/FeedbackProperties.java +++ /dev/null @@ -1,81 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * FeedbackProperties provides a base class for passing feedback objects as a request body over a REST API. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class FeedbackProperties extends RelationshipProperties -{ - private boolean isPublic = false; - - - /** - * Default constructor - */ - public FeedbackProperties() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public FeedbackProperties(FeedbackProperties template) - { - super(template); - - if (template != null) - { - this.isPublic = template.getIsPublic(); - } - } - - - - - /** - * Return whether the feedback is private or not - * - * @return boolean - */ - public boolean getIsPublic() - { - return isPublic; - } - - - /** - * Set up the privacy flag. - * - * @param aPrivate boolean - */ - public void setIsPublic(boolean aPrivate) - { - isPublic = aPrivate; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "FeedbackProperties{" + '}'; - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/FileSystemProperties.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/FileSystemProperties.java deleted file mode 100644 index fa15f8451fe..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/FileSystemProperties.java +++ /dev/null @@ -1,157 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.properties; - - -import com.fasterxml.jackson.annotation.*; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * FileSystemProperties describes the root node of a file system. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) - -public class FileSystemProperties extends SoftwareCapabilityProperties -{ - private String format = null; - private String encryption = null; - - - /** - * Default constructor - */ - public FileSystemProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public FileSystemProperties(FileSystemProperties template) - { - super(template); - - if (template != null) - { - format = template.getFormat(); - encryption = template.getEncryption(); - } - } - - - /** - * Return the format of the file system. - * - * @return string name - */ - public String getFormat() - { - return format; - } - - - /** - * Set up the format of the file system. - * - * @param format string name - */ - public void setFormat(String format) - { - this.format = format; - } - - - /** - * Return the type of encryption used on the file system (or null is unencrypted). - * - * @return encryption type - */ - public String getEncryption() - { - return encryption; - } - - - /** - * Set up the type of encryption used on the file system (or null is unencrypted). - * - * @param encryption encryption type - */ - public void setEncryption(String encryption) - { - this.encryption = encryption; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "FileSystemProperties{" + - "format='" + format + '\'' + - ", encryption='" + encryption + '\'' + - ", typeName='" + getTypeName() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", extendedProperties=" + getExtendedProperties() + - ", displayName='" + getDisplayName() + '\'' + - ", description='" + getDescription() + '\'' + - ", typeDescription='" + getTypeDescription() + '\'' + - ", version='" + getVersion() + '\'' + - ", patchLevel='" + getPatchLevel() + '\'' + - ", source='" + getSource() + '\'' + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - FileSystemProperties that = (FileSystemProperties) objectToCompare; - return Objects.equals(format, that.format) && Objects.equals(encryption, that.encryption); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), getFormat(), getEncryption()); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/FindAssetOriginProperties.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/FindAssetOriginProperties.java deleted file mode 100644 index 0d2df550366..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/FindAssetOriginProperties.java +++ /dev/null @@ -1,181 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetowner.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * AssetOriginProperties provides a structure for passing information about an asset's origin. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class FindAssetOriginProperties extends FindProperties -{ - private String organizationGUID = null; - private String businessCapabilityGUID = null; - private Map otherOriginValues = null; - - - /** - * Default constructor - */ - public FindAssetOriginProperties() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public FindAssetOriginProperties(FindAssetOriginProperties template) - { - if (template != null) - { - this.organizationGUID = template.getOrganizationGUID(); - this.businessCapabilityGUID = template.getBusinessCapabilityGUID(); - this.otherOriginValues = template.getOtherOriginValues(); - } - } - - - /** - * Return the unique identifier (GUID) of the organization where this asset originated from. - * - * @return unique identifier (GUID) - */ - public String getOrganizationGUID() - { - return organizationGUID; - } - - - /** - * Set up the unique identifier (GUID) of the organization where this asset originated from. - * - * @param organizationGUID unique identifier (GUID) - */ - public void setOrganizationGUID(String organizationGUID) - { - this.organizationGUID = organizationGUID; - } - - - /** - * Return the unique identifier (GUID) of the business capability where this asset originated from. - * - * @return unique identifier (GUID) - */ - public String getBusinessCapabilityGUID() - { - return businessCapabilityGUID; - } - - - /** - * Set up the unique identifier (GUID) of the business capability where this asset originated from. - * - * @param businessCapabilityGUID unique identifier (GUID) - */ - public void setBusinessCapabilityGUID(String businessCapabilityGUID) - { - this.businessCapabilityGUID = businessCapabilityGUID; - } - - - /** - * Return any other descriptive labels describing origin of the asset. - * - * @return map of property values - */ - public Map getOtherOriginValues() - { - if (otherOriginValues == null) - { - return null; - } - else if (otherOriginValues.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(otherOriginValues); - } - } - - - /** - * Set up any descriptive labels describing origin of the asset. - * - * @param otherOriginValues map of property values - */ - public void setOtherOriginValues(Map otherOriginValues) - { - this.otherOriginValues = otherOriginValues; - } - - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "FindAssetOriginProperties{" + - "organizationGUID='" + organizationGUID + '\'' + - ", businessCapabilityGUID='" + businessCapabilityGUID + '\'' + - ", otherOriginValues=" + otherOriginValues + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (! (objectToCompare instanceof FindAssetOriginProperties that)) - { - return false; - } - return Objects.equals(organizationGUID, that.organizationGUID) && - Objects.equals(businessCapabilityGUID, that.businessCapabilityGUID) && - Objects.equals(otherOriginValues, that.otherOriginValues); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), getOrganizationGUID(), getBusinessCapabilityGUID(), getOtherOriginValues()); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/FindNameProperties.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/FindNameProperties.java deleted file mode 100644 index 0de77a0011c..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/FindNameProperties.java +++ /dev/null @@ -1,124 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * FindNameProperties is the request body structure used on OMAG REST API calls that passes a name that is used to retrieve - * an element by name. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class FindNameProperties extends FindProperties -{ - private String name = null; - - - /** - * Default constructor - */ - public FindNameProperties() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public FindNameProperties(FindNameProperties template) - { - super(template); - - if (template != null) - { - name = template.getName(); - } - } - - - /** - * Return the name for the query request. - * - * @return string name - */ - public String getName() - { - return name; - } - - - /** - * Set up the name for the query request. - * - * @param name string - */ - public void setName(String name) - { - this.name = name; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "FindNameProperties{" + - "name='" + name + '\'' + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - FindNameProperties that = (FindNameProperties) objectToCompare; - return Objects.equals(name, that.name); - } - - - /** - * Create a hash code for this element type. - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), name); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/FindProperties.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/FindProperties.java deleted file mode 100644 index 1f26d9636b7..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/FindProperties.java +++ /dev/null @@ -1,58 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.properties; - -import com.fasterxml.jackson.annotation.*; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * FindProperties provides the base class for find by property requests. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes( - { - @JsonSubTypes.Type(value = LevelIdentifierProperties.class, name = "LevelIdentifierProperties"), - @JsonSubTypes.Type(value = DataFieldQueryProperties.class, name = "DataFieldQueryProperties"), - @JsonSubTypes.Type(value = FindNameProperties.class, name = "FindNameProperties"), - @JsonSubTypes.Type(value = FindAssetOriginProperties.class, name = "FindAssetOriginProperties"), - }) -public class FindProperties -{ - /** - * Default constructor - */ - public FindProperties() - { - super(); - } - - - /** - * Copy/clone constructor. Retrieve values from the supplied template - * - * @param template element to copy - */ - public FindProperties(FindProperties template) - { - - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "FindProperties{}"; - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/GlossaryTermProperties.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/GlossaryTermProperties.java deleted file mode 100644 index d2d0304e59e..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/GlossaryTermProperties.java +++ /dev/null @@ -1,286 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * GlossaryTermProperties contains the semantic definition (meaning) of a word or phrase - * (term - collectively called terminology). - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class GlossaryTermProperties extends ReferenceableProperties -{ - private String displayName = null; - private String summary = null; - private String description = null; - private String examples = null; - private String abbreviation = null; - private String usage = null; - private String publishVersionIdentifier = null; - - - /** - * Default constructor - */ - public GlossaryTermProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public GlossaryTermProperties(GlossaryTermProperties template) - { - super(template); - - if (template != null) - { - displayName = template.getDisplayName(); - summary = template.getSummary(); - description = template.getDescription(); - examples = template.getExamples(); - abbreviation = template.getAbbreviation(); - usage = template.getUsage(); - usage = template.getPublishVersionIdentifier(); - } - } - - - /** - * Returns the stored display name property for the term. - * If no display name is available then null is returned. - * - * @return String name - */ - public String getDisplayName() - { - return displayName; - } - - - /** - * Set up the stored display name property for the term. - * - * @param displayName String name - */ - public void setDisplayName(String displayName) - { - this.displayName = displayName; - } - - - /** - * Return the short (1-2 sentence) description of the term. - * - * @return string text - */ - public String getSummary() - { - return summary; - } - - - /** - * Set up the short (1-2 sentence) description of the term. - * - * @param summary string text - */ - public void setSummary(String summary) - { - this.summary = summary; - } - - - /** - * Returns the stored description property for the term. - * If no description is provided then null is returned. - * - * @return String text - */ - public String getDescription() - { - return description; - } - - - /** - * Set up the stored description property for the term. - * - * @param description String text - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * Set up the description of one or more examples. - * - * @return string text - */ - public String getExamples() - { - return examples; - } - - - /** - * Return the description of one or more examples. - * - * @param examples string text - */ - public void setExamples(String examples) - { - this.examples = examples; - } - - - /** - * Return the abbreviation used for this term. - * - * @return string text - */ - public String getAbbreviation() - { - return abbreviation; - } - - - /** - * Set up the abbreviation used for this term. - * - * @param abbreviation string text - */ - public void setAbbreviation(String abbreviation) - { - this.abbreviation = abbreviation; - } - - - /** - * Return details of the expected usage of this term. - * - * @return string text - */ - public String getUsage() - { - return usage; - } - - - /** - * Set up details of the expected usage of this term. - * - * @param usage string text - */ - public void setUsage(String usage) - { - this.usage = usage; - } - - - /** - * Return the author-controlled version identifier. - * - * @return version identifier - */ - public String getPublishVersionIdentifier() - { - return publishVersionIdentifier; - } - - - /** - * Set up the author-controlled version identifier. - * - * @param publishVersionIdentifier version identifier - */ - public void setPublishVersionIdentifier(String publishVersionIdentifier) - { - this.publishVersionIdentifier = publishVersionIdentifier; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "GlossaryTermProperties{" + - "displayName='" + displayName + '\'' + - ", summary='" + summary + '\'' + - ", description='" + description + '\'' + - ", examples='" + examples + '\'' + - ", abbreviation='" + abbreviation + '\'' + - ", usage='" + usage + '\'' + - ", publishVersionNumber='" + publishVersionIdentifier + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - GlossaryTermProperties that = (GlossaryTermProperties) objectToCompare; - return Objects.equals(getDisplayName(), that.getDisplayName()) && - Objects.equals(getSummary(), that.getSummary()) && - Objects.equals(getDescription(), that.getDescription()) && - Objects.equals(getExamples(), that.getExamples()) && - Objects.equals(getAbbreviation(), that.getAbbreviation()) && - Objects.equals(getUsage(), that.getUsage()) && - Objects.equals(getPublishVersionIdentifier(), that.getPublishVersionIdentifier()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), getDisplayName(), getSummary(), getDescription(), getExamples(), getAbbreviation(), getUsage(), getPublishVersionIdentifier()); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/GlossaryTermStatus.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/GlossaryTermStatus.java deleted file mode 100644 index bb2b14f5e87..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/GlossaryTermStatus.java +++ /dev/null @@ -1,155 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * The GlossaryTermStatus defines the status of a glossary term. It effectively - * defines its visibility to different types of queries. Most queries by default will only return instances in the - * active status. - *
    - *
  • Unknown: Unknown instance status.
  • - *
  • Draft: The content is incomplete.
  • - *
  • Proposed: The content is in review.
  • - *
  • Approved: The content is approved.
  • - *
  • Active: The instance is approved and in use.
  • - *
- */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public enum GlossaryTermStatus -{ - /** - * Draft - The term is incomplete. - */ - DRAFT (1,1, "Draft", "The term is incomplete."), - - /** - * Prepared - The term is ready for review. - */ - PREPARED (2,2, "Prepared", "The term is ready for review."), - - /** - * Proposed - The term is in review. - */ - PROPOSED (3,3, "Proposed", "The term is in review."), - - /** - * Approved - The term is approved and ready to be activated. - */ - APPROVED (4,4, "Approved", "The term is approved and ready to be activated."), - - /** - * Rejected - The term is rejected and should not be used. - */ - REJECTED (5,5, "Rejected", "The term is rejected and should not be used."), - - /** - * Active - The term is approved and in use. - */ - ACTIVE (6,15, "Active", "The term is approved and in use."), - - /** - * Deprecated - The term is out of date and should not be used. - */ - DEPRECATED(7,30, "Deprecated","The term is out of date and should not be used."), - - /** - * Other - The term is in a locally defined state. - */ - OTHER (8,50, "Other", "The term is in a locally defined state."), - ; - - - private final int ordinal; - private final int openTypeOrdinal; - private final String name; - private final String description; - - - /** - * Constructor to set up the instance of this enum. - * - * @param ordinal code number - * @param openTypeOrdinal code number from the equivalent Enum Type - * @param name default name - * @param description default description - */ - GlossaryTermStatus(int ordinal, - int openTypeOrdinal, - String name, - String description) - { - this.ordinal = ordinal; - this.openTypeOrdinal = openTypeOrdinal; - this.name = name; - this.description = description; - } - - /** - * Return the code for this enum instance - * - * @return int key pattern code - */ - public int getOrdinal() - { - return ordinal; - } - - - /** - * Return the code for this enum that comes from the Open Metadata Type that this enum represents. - * - * @return int code number - */ - public int getOpenTypeOrdinal() - { - return openTypeOrdinal; - } - - - - /** - * Return the default name for this enum instance. - * - * @return String default name - */ - public String getName() - { - return name; - } - - - /** - * Return the default description for the key pattern for this enum instance. - * - * @return String default description - */ - public String getDescription() - { - return description; - } - - - /** - * toString() JSON-style - * - * @return string description - */ - @Override - public String toString() - { - return "GlossaryTermStatus{" + - "ordinal=" + ordinal + - ", openTypeOrdinal=" + openTypeOrdinal + - ", name='" + name + '\'' + - ", description='" + description + '\'' + - '}'; - }} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/GovernanceClassificationBase.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/GovernanceClassificationBase.java deleted file mode 100644 index 2961684156a..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/GovernanceClassificationBase.java +++ /dev/null @@ -1,286 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.properties; - -import com.fasterxml.jackson.annotation.*; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * GovernanceClassificationBase defines the common properties for the governance action classifications. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes( - { - @JsonSubTypes.Type(value = GovernanceClassificationProperties.class, name = "GovernanceClassificationProperties"), - @JsonSubTypes.Type(value = RetentionClassificationProperties.class, name = "RetentionClassificationProperties"), - }) -public class GovernanceClassificationBase extends ClassificationProperties -{ - private int status = 0; - private int confidence = 0; - private String steward = null; - private String stewardTypeName = null; - private String stewardPropertyName = null; - private String source = null; - private String notes = null; - - - /** - * Default constructor - */ - public GovernanceClassificationBase() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template element to copy - */ - public GovernanceClassificationBase(GovernanceClassificationBase template) - { - super(template); - - if (template != null) - { - status = template.getStatus(); - confidence = template.getConfidence(); - steward = template.getSteward(); - source = template.getSource(); - notes = template.getNotes(); - } - } - - - /** - * Return the status of this classification. - * - * @return enum - */ - public int getStatus() - { - return status; - } - - - /** - * Set up the status of the classification. - * - * @param status enum - */ - public void setStatus(int status) - { - this.status = status; - } - - - /** - * Return the level of confidence in the classification (0=none to 100=excellent). - * - * @return int - */ - public int getConfidence() - { - return confidence; - } - - - /** - * Set up the level of confidence in the classification (0=none to 100=excellent). - * - * @param confidence int - */ - public void setConfidence(int confidence) - { - this.confidence = confidence; - } - - - /** - * Return the identifier for the person responsible for maintaining this classification. - * - * @return string user identifier - */ - public String getSteward() - { - return steward; - } - - - /** - * Set up the identifier for the person responsible for maintaining this classification. - * - * @param steward string user identifier - */ - public void setSteward(String steward) - { - this.steward = steward; - } - - - /** - * Return the type name of the element used to describe the steward. - * - * @return name - */ - public String getStewardTypeName() - { - return stewardTypeName; - } - - - /** - * Set up the type name of the element used to describe the steward. - * - * @param stewardTypeName name - */ - public void setStewardTypeName(String stewardTypeName) - { - this.stewardTypeName = stewardTypeName; - } - - - /** - * Return the name of the property used to identify the steward. - * - * @return name - */ - public String getStewardPropertyName() - { - return stewardPropertyName; - } - - - /** - * Set up the name of the property used to identify the steward. - * - * @param stewardPropertyName name - */ - public void setStewardPropertyName(String stewardPropertyName) - { - this.stewardPropertyName = stewardPropertyName; - } - - - /** - * Return the source of this classification. - * - * @return string identifier - */ - public String getSource() - { - return source; - } - - - /** - * Set up the source of this classification. - * - * @param source string identifier - */ - public void setSource(String source) - { - this.source = source; - } - - - /** - * Return additional information relating to this classification. - * - * @return text from the steward(s) - */ - public String getNotes() - { - return notes; - } - - - /** - * Set up additional information relating to this classification. - * - * @param notes text from the steward(s) - */ - public void setNotes(String notes) - { - this.notes = notes; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "GovernanceClassificationBase{" + - "status=" + status + - ", confidence=" + confidence + - ", steward='" + steward + '\'' + - ", stewardTypeName='" + stewardTypeName + '\'' + - ", stewardPropertyName='" + stewardPropertyName + '\'' + - ", source='" + source + '\'' + - ", notes='" + notes + '\'' + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - GovernanceClassificationBase that = (GovernanceClassificationBase) objectToCompare; - return confidence == that.confidence && - status == that.status && - Objects.equals(steward, that.steward) && - Objects.equals(stewardTypeName, that.stewardTypeName) && - Objects.equals(stewardPropertyName, that.stewardPropertyName) && - Objects.equals(source, that.source) && - Objects.equals(notes, that.notes); - } - - - /** - * Return code value representing the contents of this object. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), status, confidence, steward, stewardTypeName, stewardPropertyName, source, notes); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/GovernanceClassificationProperties.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/GovernanceClassificationProperties.java deleted file mode 100644 index 022b2fc3fbe..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/GovernanceClassificationProperties.java +++ /dev/null @@ -1,129 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetowner.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * GovernanceClassificationProperties defines the properties for a Confidentiality, Confidence, Criticality - * Governance Action Classifications. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class GovernanceClassificationProperties extends GovernanceClassificationBase -{ - private int levelIdentifier = 0; - - /** - * Default constructor - */ - public GovernanceClassificationProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public GovernanceClassificationProperties(GovernanceClassificationProperties template) - { - super(template); - - if (template != null) - { - levelIdentifier = template.getLevelIdentifier(); - } - } - - - /** - * Return the level assigned to this element for this classification. - * - * @return int - */ - public int getLevelIdentifier() - { - return levelIdentifier; - } - - - /** - * Set up the level assigned to this element for this classification. - * - * @param levelIdentifier int - */ - public void setLevelIdentifier(int levelIdentifier) - { - this.levelIdentifier = levelIdentifier; - } - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "GovernanceClassificationProperties{" + - "levelIdentifier=" + levelIdentifier + - ", status=" + getStatus() + - ", confidence=" + getConfidence() + - ", steward='" + getSteward() + '\'' + - ", stewardTypeName='" + getStewardTypeName() + '\'' + - ", stewardPropertyName='" + getStewardPropertyName() + '\'' + - ", source='" + getSource() + '\'' + - ", notes='" + getNotes() + '\'' + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - GovernanceClassificationProperties that = (GovernanceClassificationProperties) objectToCompare; - return levelIdentifier == that.levelIdentifier; - } - - - /** - * Return code value representing the contents of this object. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), levelIdentifier); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/GovernanceDefinitionProperties.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/GovernanceDefinitionProperties.java deleted file mode 100644 index 71603c15548..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/GovernanceDefinitionProperties.java +++ /dev/null @@ -1,520 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * GovernanceDefinitionProperties provides the base class for many of the definitions that define the data strategy - * and governance program. It includes many of the common fields: - * - *
    - *
  • Document id
  • - *
  • Title
  • - *
  • Summary
  • - *
  • Description
  • - *
  • Scope
  • - *
  • Domain identifier
  • - *
  • Status
  • - *
  • Priority
  • - *
  • Implications
  • - *
  • Outcomes
  • - *
  • Results
  • - *
  • AdditionalProperties
  • - *
- */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes( - { - @JsonSubTypes.Type(value = LicenseTypeProperties.class, name = "LicenseTypeProperties"), - @JsonSubTypes.Type(value = CertificationTypeProperties.class, name = "CertificationTypeProperties"), - }) -public class GovernanceDefinitionProperties -{ - private String documentIdentifier = null; - private Map additionalProperties = null; - - private String title = null; - private String summary = null; - private String description = null; - private String scope = null; - private int domainIdentifier = 0; - private String priority = null; - private List implications = null; - private List outcomes = null; - private List results = null; - - private String typeName = null; - private Map extendedProperties = null; - - - /** - * Default Constructor - */ - public GovernanceDefinitionProperties() - { - super(); - } - - - /** - * Copy/clone Constructor - * - * @param template object being copied - */ - public GovernanceDefinitionProperties(GovernanceDefinitionProperties template) - { - if (template != null) - { - this.documentIdentifier = template.getDocumentIdentifier(); - this.additionalProperties = template.getAdditionalProperties(); - this.title = template.getTitle(); - this.summary = template.getSummary(); - this.description = template.getDescription(); - this.scope = template.getScope(); - this.domainIdentifier = template.getDomainIdentifier(); - this.priority = template.getPriority(); - this.implications = template.getImplications(); - this.outcomes = template.getOutcomes(); - this.results = template.getResults(); - this.typeName = template.getTypeName(); - this.extendedProperties = template.getExtendedProperties(); - } - } - - - /** - * Return the open metadata type name of this object - this is used to create a subtype of - * the referenceable. Any properties associated with this subtype are passed as extended properties. - * - * @return string type name - */ - public String getTypeName() - { - return typeName; - } - - - /** - * Set up the open metadata type name of this object - this is used to create a subtype of - * the referenceable. Any properties associated with this subtype are passed as extended properties. - * - * @param typeName string type name - */ - public void setTypeName(String typeName) - { - this.typeName = typeName; - } - - - /** - * Returns the stored qualified name property for the metadata entity. - * If no qualified name is available then the empty string is returned. - * - * @return documentIdentifier - */ - public String getDocumentIdentifier() - { - return documentIdentifier; - } - - - /** - * Set up the fully qualified name. - * - * @param documentIdentifier String name - */ - public void setDocumentIdentifier(String documentIdentifier) - { - this.documentIdentifier = documentIdentifier; - } - - - /** - * Return a copy of the additional properties. Null means no additional properties are available. - * - * @return AdditionalProperties - */ - public Map getAdditionalProperties() - { - if (additionalProperties == null) - { - return null; - } - else if (additionalProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(additionalProperties); - } - } - - - /** - * Set up additional properties. - * - * @param additionalProperties Additional properties object - */ - public void setAdditionalProperties(Map additionalProperties) - { - this.additionalProperties = additionalProperties; - } - - - /** - * Return the properties that are defined for a subtype of referenceable but are not explicitly - * supported by the bean. - * - * @return map of properties - */ - public Map getExtendedProperties() - { - if (extendedProperties == null) - { - return null; - } - else if (extendedProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(extendedProperties); - } - } - - - /** - * Set up the properties that are defined for a subtype of referenceable but are not explicitly - * supported by the bean. - * - * @param extendedProperties map of properties - */ - public void setExtendedProperties(Map extendedProperties) - { - this.extendedProperties = extendedProperties; - } - - - - /** - * Return the title associated with this governance definition. - * - * @return String title - */ - public String getTitle() - { - return title; - } - - - /** - * Set up the title associated with this governance definition. - * - * @param title String title - */ - public void setTitle(String title) - { - this.title = title; - } - - - - /** - * Return the summary for this governance definition. This should cover its essence. Think of it as - * the executive summary. - * - * @return String short description - */ - public String getSummary() - { - return summary; - } - - - /** - * Set up the summary of the governance definition. This should cover its essence. Think of it as - * the executive summary. - * - * @param summary String description - */ - public void setSummary(String summary) - { - this.summary = summary; - } - - - /** - * Return the full description of the governance definition. - * - * @return String description - */ - public String getDescription() - { - return description; - } - - - /** - * Set up the full description of the governance definition. - * - * @param description String description - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * Return the organizational scope that this governance definition applies to. - * - * @return String organization, department or team name - */ - public String getScope() - { - return scope; - } - - - /** - * Set up the organizational scope that this governance definition applies to. - * - * @param scope String organization, department or team name - */ - public void setScope(String scope) - { - this.scope = scope; - } - - - /** - * Return the identifier of the governance domain that this definition belongs to (0=all). - * - * @return int - */ - public int getDomainIdentifier() - { - return domainIdentifier; - } - - - /** - * Set up the identifier of the governance domain that this definition belongs to (0=all). - * - * @param domainIdentifier int - */ - public void setDomainIdentifier(int domainIdentifier) - { - this.domainIdentifier = domainIdentifier; - } - - - /** - * Return the priority of the governance definition. This may be something like high, medium or low, - * or maybe a time frame or more detailed explanation. - * - * @return String priority - */ - public String getPriority() - { - return priority; - } - - - /** - * Set up the priority of this governance definition. This may be something like high, medium or low, - * or maybe a time frame or more detailed explanation. - * - * @param priority String priority - */ - public void setPriority(String priority) - { - this.priority = priority; - } - - - /** - * Return the list of implications for the organization that this governance definition brings. - * This is often the first enumeration of the changes that that need to be implemented to bring - * the governance definition into effect. - * - * @return list of descriptions - */ - public List getImplications() - { - return implications; - } - - - /** - * Set up the list of implications for the organization that this governance definition brings. - * This is often the first enumeration of the changes that that need to be implemented to bring - * the governance definition into effect. - * - * @param implications list of descriptions - */ - public void setImplications(List implications) - { - this.implications = implications; - } - - - /** - * Return the list of expected outcomes from implementing this governance definition. - * - * @return list of outcome descriptions - */ - public List getOutcomes() - { - if (outcomes == null) - { - return null; - } - else if (outcomes.isEmpty()) - { - return null; - } - else - { - return outcomes; - } - } - - - /** - * Set up the list of expected outcomes from implementing this governance definition. - * - * @param outcomes list of descriptions of outcomes - */ - public void setOutcomes(List outcomes) - { - this.outcomes = outcomes; - } - - - /** - * Return the list of actual results from implementing this governance definition. - * - * @return list of result descriptions - */ - public List getResults() - { - if (outcomes == null) - { - return null; - } - else if (outcomes.isEmpty()) - { - return null; - } - else - { - return outcomes; - } - } - - - /** - * Set up the list of actual results from implementing this governance definition. - * - * @param results list of description of results - */ - public void setResults(List results) - { - this.results = results; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "GovernanceDefinitionProperties{" + - "documentIdentifier='" + documentIdentifier + '\'' + - ", additionalProperties=" + additionalProperties + - ", title='" + title + '\'' + - ", summary='" + summary + '\'' + - ", description='" + description + '\'' + - ", scope='" + scope + '\'' + - ", domainIdentifier=" + domainIdentifier + - ", priority='" + priority + '\'' + - ", implications=" + implications + - ", outcomes=" + outcomes + - ", results=" + results + - ", typeName='" + typeName + '\'' + - ", extendedProperties=" + extendedProperties + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - GovernanceDefinitionProperties that = (GovernanceDefinitionProperties) objectToCompare; - return domainIdentifier == that.domainIdentifier && - Objects.equals(documentIdentifier, that.documentIdentifier) && - Objects.equals(additionalProperties, that.additionalProperties) && - Objects.equals(title, that.title) && - Objects.equals(summary, that.summary) && - Objects.equals(description, that.description) && - Objects.equals(scope, that.scope) && - Objects.equals(priority, that.priority) && - Objects.equals(implications, that.implications) && - Objects.equals(outcomes, that.outcomes) && - Objects.equals(results, that.results) && - Objects.equals(typeName, that.typeName) && - Objects.equals(extendedProperties, that.extendedProperties); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(documentIdentifier, additionalProperties, title, summary, description, scope, domainIdentifier, priority, - implications, outcomes, results, typeName, extendedProperties); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/GovernanceDefinitionStatus.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/GovernanceDefinitionStatus.java deleted file mode 100644 index ce12eb0e5e6..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/GovernanceDefinitionStatus.java +++ /dev/null @@ -1,108 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.properties; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * GovernanceDefinitionStatus indicates whether the definition is complete and operational or in a state that means - * it is either under development or obsolete. - *
    - *
  • DRAFT - The governance definition is still in development.
  • - *
  • PROPOSED - The governance definition is in review and not yet active.
  • - *
  • ACTIVE - The governance definition is approved and in use.
  • - *
  • DEPRECATED - The governance definition has been superseded.
  • - *
  • OTHER - The governance definition in a locally defined state.
  • - *
- */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public enum GovernanceDefinitionStatus -{ - /** - * Draft - The governance definition is still in development. - */ - DRAFT (0, "Draft", "The governance definition is still in development."), - - /** - * Proposed - The governance definition is in review and not yet active. - */ - PROPOSED (1, "Proposed", "The governance definition is in review and not yet active."), - - /** - * Active - The governance definition is approved and in use. - */ - ACTIVE (2, "Active", "The governance definition is approved and in use."), - - /** - * Deprecated - The governance definition has been superseded. - */ - DEPRECATED (3, "Deprecated", "The governance definition has been superseded."), - - /** - * Other - The governance definition in a locally defined state. - */ - OTHER (99, "Other", "The governance definition in a locally defined state."); - - private final int ordinal; - private final String name; - private final String description; - - - /** - * Default constructor for the enumeration. - * - * @param ordinal numerical representation of the enumeration - * @param name default string name of the instance provenance type - * @param description default string description of the instance provenance type - */ - GovernanceDefinitionStatus(int ordinal, String name, String description) - { - this.ordinal = ordinal; - this.name = name; - this.description = description; - } - - - /** - * Return the numeric representation of the instance provenance type. - * - * @return int ordinal - */ - public int getOrdinal() { return ordinal; } - - - /** - * Return the default name of the instance provenance type. - * - * @return String name - */ - public String getName() { return name; } - - - /** - * Return the default description of the instance provenance type. - * - * @return String description - */ - public String getDescription() { return description; } - - - /** - * toString() JSON-style - * - * @return string description - */ - @Override - public String toString() - { - return "GovernanceDefinitionStatus : " + name; - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/LevelIdentifierProperties.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/LevelIdentifierProperties.java deleted file mode 100644 index e711fcad006..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/LevelIdentifierProperties.java +++ /dev/null @@ -1,106 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * LevelIdentifierProperties describes the properties for searching for a governance action classification by its level. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class LevelIdentifierProperties extends FindProperties -{ - private boolean returnSpecificLevel = false; - private int levelIdentifier = 0; - - - /** - * Default constructor - */ - public LevelIdentifierProperties() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public LevelIdentifierProperties(LevelIdentifierProperties template) - { - super(template); - - if (template != null) - { - this.returnSpecificLevel = template.getReturnSpecificLevel(); - this.levelIdentifier = template.getLevelIdentifier(); - } - } - - - /** - * Return whether the level identifier is in use - * - * @return boolean - */ - public boolean getReturnSpecificLevel() - { - return returnSpecificLevel; - } - - - /** - * Set up whether the level identifier is in use. - * - * @param flag boolean - */ - public void setReturnSpecificLevel(boolean flag) - { - returnSpecificLevel = flag; - } - - - /** - * Return the level to match on. - * - * @return int - */ - public int getLevelIdentifier() - { - return levelIdentifier; - } - - - /** - * Set up the level to match on. - * - * @param levelIdentifier int - */ - public void setLevelIdentifier(int levelIdentifier) - { - this.levelIdentifier = levelIdentifier; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "LevelIdentifierProperties{" + - "returnSpecificLevel=" + returnSpecificLevel + - ", levelIdentifier=" + levelIdentifier + - '}'; - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/LicenseProperties.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/LicenseProperties.java deleted file mode 100644 index de58dece4d8..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/LicenseProperties.java +++ /dev/null @@ -1,545 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Date; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * LicenseProperties describe the details of a license that shows that an element is licensed with a particular license type. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class LicenseProperties extends RelationshipProperties -{ - private String licenseId = null; - private Date startDate = null; - private Date endDate = null; - private String conditions = null; - private String licensedBy = null; - private String licensedByTypeName = null; - private String licensedByPropertyName = null; - private String custodian = null; - private String custodianTypeName = null; - private String custodianPropertyName = null; - private String licensee = null; - private String licenseeTypeName = null; - private String licenseePropertyName = null; - private Map entitlements = null; - private Map restrictions = null; - private Map obligations = null; - private String notes = null; - - - /** - * Default Constructor - */ - public LicenseProperties() - { - } - - - /** - * Copy/clone Constructor - the resulting object. - * - * @param template object being copied - */ - public LicenseProperties(LicenseProperties template) - { - super(template); - - if (template != null) - { - this.licenseId = template.getLicenseId(); - this.startDate = template.getStartDate(); - this.endDate = template.getEndDate(); - this.conditions = template.getConditions(); - this.licensedBy = template.getLicensedBy(); - this.licensedByTypeName = template.getLicensedByTypeName(); - this.licensedByPropertyName = template.getLicensedByPropertyName(); - this.custodian = template.getCustodian(); - this.custodianTypeName = template.getCustodianTypeName(); - this.custodianPropertyName = template.getCustodianPropertyName(); - this.licensee = template.getLicensee(); - this.licenseeTypeName = template.getLicenseeTypeName(); - this.licenseePropertyName = template.getLicenseePropertyName(); - this.entitlements = template.getEntitlements(); - this.restrictions = template.getRestrictions(); - this.obligations = template.getObligations(); - this.notes = template.getNotes(); - } - } - - - /** - * Return the unique identifier of the license. This value comes from the license authority. - * - * @return string - */ - public String getLicenseId() - { - return licenseId; - } - - - /** - * Set up the unique identifier of the license. This value comes from the license authority. - * - * @param licenseId string - */ - public void setLicenseId(String licenseId) - { - this.licenseId = licenseId; - } - - - /** - * Return the date/time that this license is valid from. - * - * @return date/time - */ - public Date getStartDate() - { - return startDate; - } - - - /** - * Set up the date/time that this license is valid from. - * - * @param startDate date/time - */ - public void setStartDate(Date startDate) - { - this.startDate = startDate; - } - - - /** - * Return the date/time that this license is no longer valid. - * - * @return date/time - */ - public Date getEndDate() - { - return endDate; - } - - - /** - * Set up the date/time that this license is no longer valid. - * - * @param endDate date/time - */ - public void setEndDate(Date endDate) - { - this.endDate = endDate; - } - - - /** - * Return any conditions or endorsements to this license. - * - * @return string text - */ - public String getConditions() - { - return conditions; - } - - - /** - * Set up any conditions or endorsements to this license. - * - * @param conditions string text - */ - public void setConditions(String conditions) - { - this.conditions = conditions; - } - - - /** - * Return the name of the person in the license authority that granted this license. - * - * @return string name/id - */ - public String getLicensedBy() - { - return licensedBy; - } - - - /** - * Set up the name of the person in the license authority that granted this license. - * - * @param licensedBy string name/id - */ - public void setLicensedBy(String licensedBy) - { - this.licensedBy = licensedBy; - } - - - /** - * Return the name of the type of the element supplying the licensedBy property. - * - * @return string type name - */ - public String getLicensedByTypeName() - { - return licensedByTypeName; - } - - - /** - * Set up the name of the type of the element supplying the licensedBy property. - * - * @param licensedByTypeName string type name - */ - public void setLicensedByTypeName(String licensedByTypeName) - { - this.licensedByTypeName = licensedByTypeName; - } - - - /** - * Return the name of the property from the element supplying the licensedBy property. - * - * @return string property name - */ - public String getLicensedByPropertyName() - { - return licensedByPropertyName; - } - - - /** - * Set up the name of the property from the element supplying the licensedBy property. - * - * @param licensedByPropertyName string property name - */ - public void setLicensedByPropertyName(String licensedByPropertyName) - { - this.licensedByPropertyName = licensedByPropertyName; - } - - - /** - * Return the person/team responsible for ensuring that the license conditions are adhered to. - * - * @return string name/id - */ - public String getCustodian() - { - return custodian; - } - - - /** - * Set up the person/team responsible for ensuring that the license conditions are adhered to. - * - * @param custodian string name/id - */ - public void setCustodian(String custodian) - { - this.custodian = custodian; - } - - - /** - * Return the name of the type of the element supplying the custodian property. - * - * @return string type name - */ - public String getCustodianTypeName() - { - return custodianTypeName; - } - - - /** - * Set up the name of the type of the element supplying the custodian property. - * - * @param custodianTypeName string type name - */ - public void setCustodianTypeName(String custodianTypeName) - { - this.custodianTypeName = custodianTypeName; - } - - - /** - * Return the name of the property from the element supplying the custodian property. - * - * @return string property name - */ - public String getCustodianPropertyName() - { - return custodianPropertyName; - } - - - /** - * Set up the name of the property from the element supplying the custodian property. - * - * @param custodianPropertyName string property name - */ - public void setCustodianPropertyName(String custodianPropertyName) - { - this.custodianPropertyName = custodianPropertyName; - } - - - /** - * Return the person/team that received the license. - * - * @return string name/id - */ - public String getLicensee() - { - return licensee; - } - - - /** - * Set up the person/team that received the license. - * - * @param licensee string name/id - */ - public void setLicensee(String licensee) - { - this.licensee = licensee; - } - - - /** - * Return the name of the type of the element supplying the licensee property. - * - * @return string type name - */ - public String getLicenseeTypeName() - { - return licenseeTypeName; - } - - - /** - * Set up the name of the type of the element supplying the licensee property. - * - * @param licenseeTypeName string type name - */ - public void setLicenseeTypeName(String licenseeTypeName) - { - this.licenseeTypeName = licenseeTypeName; - } - - - /** - * Return the name of the property from the element supplying the licensee property. - * - * @return string property name - */ - public String getLicenseePropertyName() - { - return licenseePropertyName; - } - - - /** - * Set up the name of the property from the element supplying the licensee property. - * - * @param licenseePropertyName string property name - */ - public void setLicenseePropertyName(String licenseePropertyName) - { - this.licenseePropertyName = licenseePropertyName; - } - - - /** - * Return the entitlements granted by the license. - * - * @return name value pairs - */ - public Map getEntitlements() - { - return entitlements; - } - - - /** - * Set up the entitlements granted by the license. - * - * @param entitlements name value pairs - */ - public void setEntitlements(Map entitlements) - { - this.entitlements = entitlements; - } - - - /** - * Return the restrictions imposed by the license. - * - * @return name value pairs - */ - public Map getRestrictions() - { - return restrictions; - } - - - /** - * Set up the restrictions imposed by the license. - * - * @param restrictions name value pairs - */ - public void setRestrictions(Map restrictions) - { - this.restrictions = restrictions; - } - - - /** - * Return the obligations stipulated by the license. - * - * @return name value pairs - */ - public Map getObligations() - { - return obligations; - } - - - /** - * Set up the obligations stipulated by the license. - * - * @param obligations name value pairs - */ - public void setObligations(Map obligations) - { - this.obligations = obligations; - } - - - /** - * Return any notes associated with the license. - * - * @return string text - */ - public String getNotes() - { - return notes; - } - - - /** - * Set up any notes associated with the license. - * - * @param notes string text - */ - public void setNotes(String notes) - { - this.notes = notes; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "LicenseProperties{" + - "licenseId='" + licenseId + '\'' + - ", startDate=" + startDate + - ", endDate=" + endDate + - ", conditions='" + conditions + '\'' + - ", licensedBy='" + licensedBy + '\'' + - ", licensedByTypeName='" + licensedByTypeName + '\'' + - ", licensedByPropertyName='" + licensedByPropertyName + '\'' + - ", custodian='" + custodian + '\'' + - ", custodianTypeName='" + custodianTypeName + '\'' + - ", custodianPropertyName='" + custodianPropertyName + '\'' + - ", licensee='" + licensee + '\'' + - ", licenseeTypeName='" + licenseeTypeName + '\'' + - ", licenseePropertyName='" + licenseePropertyName + '\'' + - ", entitlements=" + entitlements + - ", restrictions=" + restrictions + - ", obligations=" + obligations + - ", notes='" + notes + '\'' + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (! (objectToCompare instanceof LicenseProperties)) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - LicenseProperties that = (LicenseProperties) objectToCompare; - return Objects.equals(licenseId, that.licenseId) && - Objects.equals(startDate, that.startDate) && - Objects.equals(endDate, that.endDate) && - Objects.equals(conditions, that.conditions) && - Objects.equals(licensedBy, that.licensedBy) && - Objects.equals(licensedByTypeName, that.licensedByTypeName) && - Objects.equals(licensedByPropertyName, that.licensedByPropertyName) && - Objects.equals(custodian, that.custodian) && - Objects.equals(custodianTypeName, that.custodianTypeName) && - Objects.equals(custodianPropertyName, that.custodianPropertyName) && - Objects.equals(licensee, that.licensee) && - Objects.equals(licenseeTypeName, that.licenseeTypeName) && - Objects.equals(licenseePropertyName, that.licenseePropertyName) && - Objects.equals(entitlements, that.entitlements) && - Objects.equals(restrictions, that.restrictions) && - Objects.equals(obligations, that.obligations) && - Objects.equals(notes, that.notes); - } - - - /** - * Just use the GUID for the hash code as it should be unique. - * - * @return int code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), licenseId, startDate, endDate, conditions, licensedBy, licensedByTypeName, licensedByPropertyName, - custodian, custodianTypeName, custodianPropertyName, licensee, licenseeTypeName, licenseePropertyName, - obligations, restrictions, entitlements, notes); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/LicenseTypeProperties.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/LicenseTypeProperties.java deleted file mode 100644 index 6e13ec17d30..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/LicenseTypeProperties.java +++ /dev/null @@ -1,136 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * LicenseTypeProperties defines a license that the organization recognizes and has governance - * definitions to support it. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class LicenseTypeProperties extends GovernanceDefinitionProperties -{ - private String details = null; - - - /** - * Default Constructor - */ - public LicenseTypeProperties() - { - } - - - /** - * Copy/Clone Constructor - * - * @param template object to copy - */ - public LicenseTypeProperties(LicenseTypeProperties template) - { - super(template); - - if (template != null) - { - this.details = template.getDetails(); - } - } - - - /** - * Return the specific details of the license. - * - * @return string description - */ - public String getDetails() - { - return details; - } - - - /** - * Set up the specific details of the license. - * - * @param details string description - */ - public void setDetails(String details) - { - this.details = details; - } - - - /** - * JSON-style toString - * - * @return string containing the properties and their values - */ - @Override - public String toString() - { - return "LicenseTypeProperties{" + - "details='" + details + '\'' + - ", typeName='" + getTypeName() + '\'' + - ", documentIdentifier='" + getDocumentIdentifier() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", extendedProperties=" + getExtendedProperties() + - ", title='" + getTitle() + '\'' + - ", summary='" + getSummary() + '\'' + - ", description='" + getDescription() + '\'' + - ", scope='" + getScope() + '\'' + - ", domainIdentifier=" + getDomainIdentifier() + - ", priority='" + getPriority() + '\'' + - ", implications=" + getImplications() + - ", outcomes=" + getOutcomes() + - ", results=" + getResults() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - LicenseTypeProperties that = (LicenseTypeProperties) objectToCompare; - return Objects.equals(details, that.details); - } - - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), details); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/MeaningProperties.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/MeaningProperties.java deleted file mode 100644 index 46ab3deb6ae..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/MeaningProperties.java +++ /dev/null @@ -1,156 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * MeaningProperties is a cut-down summary of a glossary term to aid the asset owner in understanding the content - * of an asset. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class MeaningProperties extends ReferenceableProperties -{ - /* - * Attributes of a meaning object definition - */ - private String name = null; - private String description = null; - - - /** - * Default constructor - */ - public MeaningProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template element to copy - */ - public MeaningProperties(MeaningProperties template) - { - super(template); - - if (template != null) - { - name = template.getName(); - description = template.getDescription(); - } - } - - - /** - * Return the glossary term name. - * - * @return String name - */ - public String getName() - { - return name; - } - - - /** - * Set up the glossary term name. - * - * @param name String name - */ - public void setName(String name) - { - this.name = name; - } - - - /** - * Return the description of the glossary term. - * - * @return String description - */ - public String getDescription() - { - return description; - } - - - /** - * Set up the description of the glossary term. - * - * @param description String description - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "MeaningProperties{" + - "name='" + name + '\'' + - ", description='" + description + '\'' + - ", typeName='" + getTypeName() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - MeaningProperties that = (MeaningProperties) objectToCompare; - return Objects.equals(name, that.name) && - Objects.equals(description, that.description); - } - - - /** - * Create a hash code for this element type. - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), name, description); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/NoteLogProperties.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/NoteLogProperties.java deleted file mode 100644 index 88f53ff94f4..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/NoteLogProperties.java +++ /dev/null @@ -1,156 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.properties; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * NoteLogHeader manages a list of notes for an asset - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class NoteLogProperties extends ReferenceableProperties -{ - - protected String displayName = null; - protected String description = null; - - - /** - * Default constructor - */ - public NoteLogProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template note log to copy - */ - public NoteLogProperties(NoteLogProperties template) - { - super(template); - - if (template != null) - { - displayName = template.getDisplayName(); - description = template.getDescription(); - } - } - - - /** - * Return the stored display name property for the note log. - * If no display name is available then null is returned. - * - * @return String Name - */ - public String getDisplayName() - { - return displayName; - } - - - /** - * Set up the stored display name property for the note log. - * - * @param displayName - String name - */ - public void setDisplayName(String displayName) - { - this.displayName = displayName; - } - - - /** - * Return the stored description property for the note log. - * If no description is provided then null is returned. - * - * @return description - */ - public String getDescription() - { - return description; - } - - - /** - * Set up the stored description property for the note log. - * - * @param description String text - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "NoteLogProperties{" + - "displayName='" + displayName + '\'' + - ", description='" + description + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - NoteLogProperties noteLog = (NoteLogProperties) objectToCompare; - return Objects.equals(getDisplayName(), noteLog.getDisplayName()) && - Objects.equals(getDescription(), noteLog.getDescription()); - } - - - /** - * Hash of properties - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), getDisplayName(), getDescription()); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/NoteProperties.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/NoteProperties.java deleted file mode 100644 index 05b1b3563f3..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/NoteProperties.java +++ /dev/null @@ -1,148 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * Note defines the properties of a single note in a note log. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class NoteProperties extends ReferenceableProperties -{ - private String title = null; - private String text = null; - - - - /** - * Default constructor - */ - public NoteProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template note to copy - */ - public NoteProperties(NoteProperties template) - { - super(template); - - if (template != null) - { - title = template.getTitle(); - text = template.getText(); - } - } - - - /** - * Return the title. - * - * @return string - */ - public String getTitle() - { - return title; - } - - - /** - * Set up the title. - * - * @param title string - */ - public void setTitle(String title) - { - this.title = title; - } - - - /** - * Return the text of the note. - * - * @return String text - */ - public String getText() { return text; } - - - /** - * Set up the text of the note. - * - * @param text String text - */ - public void setText(String text) - { - this.text = text; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "NoteProperties{" + - "title='" + title + '\'' + - ", text='" + text + '\'' + - ", typeName='" + getTypeName() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (! (objectToCompare instanceof NoteProperties that)) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - return Objects.equals(title, that.title) && Objects.equals(text, that.text); - } - - - /** - * Hash of properties - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), title, text); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/ReferenceableProperties.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/ReferenceableProperties.java deleted file mode 100644 index 722b913eb6c..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/ReferenceableProperties.java +++ /dev/null @@ -1,284 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetowner.properties; - -import com.fasterxml.jackson.annotation.*; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.ReferenceableElement; - -import java.util.*; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ReferenceableProperties provides a structure for passing a referenceable element's properties over the Java API. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes( - { - @JsonSubTypes.Type(value = ReferenceableElement.class, name = "ReferenceableElement"), - @JsonSubTypes.Type(value = AssetProperties.class, name = "AssetProperties"), - @JsonSubTypes.Type(value = MeaningProperties.class, name = "MeaningProperties"), - @JsonSubTypes.Type(value = SoftwareCapabilityProperties.class, name = "SoftwareCapabilityProperties"), - @JsonSubTypes.Type(value = EndpointProperties.class, name = "EndpointProperties"), - @JsonSubTypes.Type(value = SchemaElementProperties.class, name = "SchemaElementProperties") - }) -public class ReferenceableProperties -{ - private String qualifiedName = null; - private Map additionalProperties = null; - - private Date effectiveFrom = null; - private Date effectiveTo = null; - private String typeName = null; - private Map extendedProperties = null; - - - /** - * Default constructor - */ - public ReferenceableProperties() - { - super(); - } - - - /** - * Copy/clone constructor. Retrieve values from the supplied template - * - * @param template element to copy - */ - public ReferenceableProperties(ReferenceableProperties template) - { - if (template != null) - { - qualifiedName = template.getQualifiedName(); - additionalProperties = template.getAdditionalProperties(); - - effectiveFrom = template.getEffectiveFrom(); - effectiveTo = template.getEffectiveTo(); - - typeName = template.getTypeName(); - extendedProperties = template.getExtendedProperties(); - } - } - - - /** - * Set up the fully qualified name. - * - * @param qualifiedName String name - */ - public void setQualifiedName(String qualifiedName) - { - this.qualifiedName = qualifiedName; - } - - - /** - * Returns the stored qualified name property for the metadata entity. - * If no qualified name is available then the empty string is returned. - * - * @return qualifiedName - */ - public String getQualifiedName() - { - return qualifiedName; - } - - - /** - * Set up additional properties. - * - * @param additionalProperties Additional properties object - */ - public void setAdditionalProperties(Map additionalProperties) - { - this.additionalProperties = additionalProperties; - } - - - /** - * Return a copy of the additional properties. Null means no additional properties are available. - * - * @return AdditionalProperties - */ - public Map getAdditionalProperties() - { - if (additionalProperties == null) - { - return null; - } - else if (additionalProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(additionalProperties); - } - } - - - /** - * Return the date/time that this element is effective from (null means effective from the epoch). - * - * @return date object - */ - public Date getEffectiveFrom() - { - return effectiveFrom; - } - - - /** - * Set up the date/time that this element is effective from (null means effective from the epoch). - * - * @param effectiveFrom date object - */ - public void setEffectiveFrom(Date effectiveFrom) - { - this.effectiveFrom = effectiveFrom; - } - - - /** - * Return the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @return date object - */ - public Date getEffectiveTo() - { - return effectiveTo; - } - - - /** - * Set the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @param effectiveTo date object - */ - public void setEffectiveTo(Date effectiveTo) - { - this.effectiveTo = effectiveTo; - } - - - /** - * Return the name of the open metadata type for this metadata element. - * - * @return string name - */ - public String getTypeName() - { - return typeName; - } - - - /** - * Set up the name of the open metadata type for this element. - * - * @param typeName string name - */ - public void setTypeName(String typeName) - { - this.typeName = typeName; - } - - - /** - * Return the properties that have been defined for a subtype of this object that are not supported explicitly - * by this bean. - * - * @return property map - */ - public Map getExtendedProperties() - { - if (extendedProperties == null) - { - return null; - } - else if (extendedProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(extendedProperties); - } - } - - - /** - * Set up the properties that have been defined for a subtype of this object that are not supported explicitly - * by this bean. - * - * @param extendedProperties property map - */ - public void setExtendedProperties(Map extendedProperties) - { - this.extendedProperties = extendedProperties; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "ReferenceableProperties{" + - "qualifiedName='" + qualifiedName + '\'' + - ", additionalProperties=" + additionalProperties + - ", typeName='" + typeName + '\'' + - ", extendedProperties=" + extendedProperties + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ReferenceableProperties that = (ReferenceableProperties) objectToCompare; - return Objects.equals(qualifiedName, that.qualifiedName) && - Objects.equals(additionalProperties, that.additionalProperties) && - Objects.equals(effectiveFrom, that.effectiveFrom) && - Objects.equals(effectiveTo, that.effectiveTo) && - Objects.equals(typeName, that.typeName) && - Objects.equals(extendedProperties, that.extendedProperties); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(qualifiedName, additionalProperties, effectiveFrom, effectiveTo, typeName, extendedProperties); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/RelationshipProperties.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/RelationshipProperties.java deleted file mode 100644 index 1aad6c0eb4f..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/RelationshipProperties.java +++ /dev/null @@ -1,199 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; - -import java.util.Date; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * RelationshipProperties provides the base class for relationships items. This provides extended properties with the ability to - * set effectivity dates. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes( - { - @JsonSubTypes.Type(value = DataContentForDataSetProperties.class, name = "DataContentForDataSetProperties"), - @JsonSubTypes.Type(value = ResourceListProperties.class, name = "ResourceListProperties"), - @JsonSubTypes.Type(value = LicenseProperties.class, name = "LicenseProperties"), - @JsonSubTypes.Type(value = CertificationProperties.class, name = "CertificationProperties"), - @JsonSubTypes.Type(value = ExternalReferenceLinkProperties.class, name = "ExternalReferenceLinkProperties"), - }) -public class RelationshipProperties -{ - private Date effectiveFrom = null; - private Date effectiveTo = null; - - private Map extendedProperties = null; - - - /** - * Default constructor - */ - public RelationshipProperties() - { - super(); - } - - - /** - * Copy/clone constructor. Retrieve values from the supplied template - * - * @param template element to copy - */ - public RelationshipProperties(RelationshipProperties template) - { - if (template != null) - { - effectiveFrom = template.getEffectiveFrom(); - effectiveTo = template.getEffectiveTo(); - extendedProperties = template.getExtendedProperties(); - } - } - - - /** - * Return the date/time that this element is effective from (null means effective from the epoch). - * - * @return date object - */ - public Date getEffectiveFrom() - { - return effectiveFrom; - } - - - /** - * Set up the date/time that this element is effective from (null means effective from the epoch). - * - * @param effectiveFrom date object - */ - public void setEffectiveFrom(Date effectiveFrom) - { - this.effectiveFrom = effectiveFrom; - } - - - /** - * Return the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @return date object - */ - public Date getEffectiveTo() - { - return effectiveTo; - } - - - /** - * Set the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @param effectiveTo date object - */ - public void setEffectiveTo(Date effectiveTo) - { - this.effectiveTo = effectiveTo; - } - - - /** - * Return the properties that have been defined for a subtype of this object that are not supported explicitly - * by this bean. - * - * @return property map - */ - public Map getExtendedProperties() - { - if (extendedProperties == null) - { - return null; - } - else if (extendedProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(extendedProperties); - } - } - - - /** - * Set up the properties that have been defined for a subtype of this object that are not supported explicitly - * by this bean. - * - * @param extendedProperties property map - */ - public void setExtendedProperties(Map extendedProperties) - { - this.extendedProperties = extendedProperties; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "RelationshipProperties{" + - "effectiveFrom=" + effectiveFrom + - ", effectiveTo=" + effectiveTo + - ", extendedProperties=" + extendedProperties + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - RelationshipProperties that = (RelationshipProperties) objectToCompare; - return Objects.equals(effectiveFrom, that.effectiveFrom) && - Objects.equals(effectiveTo, that.effectiveTo) && - Objects.equals(extendedProperties, that.extendedProperties); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(effectiveFrom, effectiveTo, extendedProperties); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/ResourceListProperties.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/ResourceListProperties.java deleted file mode 100644 index c92a1fc0086..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/ResourceListProperties.java +++ /dev/null @@ -1,202 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.properties; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ResourceListProperties provides a details of why an element providing resources (such as a community) has been attached to an initiative - * such as a governance domain. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ResourceListProperties extends RelationshipProperties -{ - String resourceUse = null; - String resourceUseDescription = null; - Map resourceUseProperties = null; - boolean watchResource = false; - - /** - * Default constructor - */ - public ResourceListProperties() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ResourceListProperties(ResourceListProperties template) - { - super(template); - - if (template != null) - { - this.resourceUse = template.getResourceUse(); - this.resourceUseDescription = template.getResourceUseDescription(); - this.resourceUseProperties = template.getResourceUseProperties(); - this.watchResource = template.getWatchResource(); - } - } - - - /** - * Return the identifier that describes the type of resource use. (Use ResourceUse enum in GAF). - * - * @return string - */ - public String getResourceUse() - { - return resourceUse; - } - - - /** - * Set up identifier that describes the type of resource use. (Use ResourceUse enum in GAF). - * - * @param resourceUse string - */ - public void setResourceUse(String resourceUse) - { - this.resourceUse = resourceUse; - } - - - /** - * Return the description of how the resource is used, or why it is useful. - * - * @return string - */ - public String getResourceUseDescription() - { - return resourceUseDescription; - } - - - /** - * Set up the description of how the resource is used, or why it is useful. - * - * @param resourceUseDescription string - */ - public void setResourceUseDescription(String resourceUseDescription) - { - this.resourceUseDescription = resourceUseDescription; - } - - - /** - * Return any additional properties that explains how to use the resource. - * - * @return map - */ - public Map getResourceUseProperties() - { - return resourceUseProperties; - } - - - /** - * Set up any additional properties that explains how to use the resource. - * - * @param resourceUseProperties map - */ - public void setResourceUseProperties(Map resourceUseProperties) - { - this.resourceUseProperties = resourceUseProperties; - } - - - /** - * Return whether changes to the resource result in notifications to the initiative. - * - * @return flag - */ - public boolean getWatchResource() - { - return watchResource; - } - - - /** - * Set up whether changes to the resource result in notifications to the initiative. - * - * @param watchResource flag - */ - public void setWatchResource(boolean watchResource) - { - this.watchResource = watchResource; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ResourceListProperties{" + - "resourceUse='" + resourceUse + '\'' + - "resourceUseDescription='" + resourceUseDescription + '\'' + - "resourceUseProperties='" + resourceUseProperties + '\'' + - ", watchResource=" + watchResource + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - ResourceListProperties that = (ResourceListProperties) objectToCompare; - return watchResource == that.watchResource && - Objects.equals(resourceUse, that.resourceUse) && - Objects.equals(resourceUseDescription, that.resourceUseDescription) && - Objects.equals(resourceUseProperties, that.resourceUseProperties); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), resourceUse, resourceUseDescription, resourceUseProperties, watchResource); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/RetentionClassificationProperties.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/RetentionClassificationProperties.java deleted file mode 100644 index bf1d0fcba11..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/RetentionClassificationProperties.java +++ /dev/null @@ -1,211 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetowner.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Date; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * RetentionClassificationProperties defines the retention requirements for related data items. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class RetentionClassificationProperties extends GovernanceClassificationBase -{ - private int retentionBasis = 0; - private String associatedGUID = null; - private Date archiveAfter = null; - private Date deleteAfter = null; - - - /** - * Default constructor - */ - public RetentionClassificationProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public RetentionClassificationProperties(RetentionClassificationProperties template) - { - super(template); - - if (template != null) - { - retentionBasis = template.getRetentionBasis(); - associatedGUID = template.getAssociatedGUID(); - archiveAfter = template.getArchiveAfter(); - deleteAfter = template.getDeleteAfter(); - } - } - - - /** - * Return a description of the factor used to set the archiveAfter and deleteAfter dates. - * - * @return int - */ - public int getRetentionBasis() - { - return retentionBasis; - } - - - /** - * Set up a description of the factor used to set the archiveAfter and deleteAfter dates. - * - * @param retentionBasis int - */ - public void setRetentionBasis(int retentionBasis) - { - this.retentionBasis = retentionBasis; - } - - - /** - * Return the unique identifier of the element used in deciding the archiveAfter and deleteAfter dates. - * For example if the retention basis is determined by the project lifetime, this identifier is the - * identifier of the associated project. - * - * @return string guid - */ - public String getAssociatedGUID() - { - return associatedGUID; - } - - - /** - * Set up the unique identifier of the element used in deciding the archiveAfter and deleteAfter dates. - * For example if the retention basis is determined by the project lifetime, this identifier is the - * identifier of the associated project. - * - * @param associatedGUID string guid - */ - public void setAssociatedGUID(String associatedGUID) - { - this.associatedGUID = associatedGUID; - } - - - /** - * Return the date that this asset will be archived. - * - * @return date/timestamp - */ - public Date getArchiveAfter() - { - return archiveAfter; - } - - - /** - * Set up the date that this asset will be archived. - * - * @param archiveAfter date/timestamp - */ - public void setArchiveAfter(Date archiveAfter) - { - this.archiveAfter = archiveAfter; - } - - - /** - * Return the date that this asset will be permanently deleted. - * - * @return date/timestamp - */ - public Date getDeleteAfter() - { - return deleteAfter; - } - - - /** - * Set up the date that this asset will be permanently deleted. - * - * @param deleteAfter date/timestamp - */ - public void setDeleteAfter(Date deleteAfter) - { - this.deleteAfter = deleteAfter; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "RetentionClassificationProperties{" + - "retentionBasis=" + retentionBasis + - ", associatedGUID='" + associatedGUID + '\'' + - ", archiveAfter=" + archiveAfter + - ", deleteAfter=" + deleteAfter + - ", status=" + getStatus() + - ", confidence=" + getConfidence() + - ", steward='" + getSteward() + '\'' + - ", source='" + getSource() + '\'' + - ", notes='" + getNotes() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - RetentionClassificationProperties that = (RetentionClassificationProperties) objectToCompare; - return retentionBasis == that.retentionBasis && - Objects.equals(associatedGUID, that.associatedGUID) && - Objects.equals(archiveAfter, that.archiveAfter) && - Objects.equals(deleteAfter, that.deleteAfter); - } - - - /** - * Return code value representing the contents of this object. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), retentionBasis, associatedGUID, archiveAfter, deleteAfter); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/SchemaAttributeProperties.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/SchemaAttributeProperties.java deleted file mode 100644 index 15a4b82d003..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/SchemaAttributeProperties.java +++ /dev/null @@ -1,554 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.properties; - -import com.fasterxml.jackson.annotation.*; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.SchemaAttributeElement; -import org.odpi.openmetadata.frameworks.openmetadata.enums.DataItemSortOrder; - -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * SchemaAttributeProperties carries the common parameters for creating or updating schema attributes. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes({ - @JsonSubTypes.Type(value = SchemaAttributeElement.class, name = "SchemaAttributeElement"), - }) -public class SchemaAttributeProperties extends SchemaElementProperties -{ - private int elementPosition = 0; - - /* - * Details related to the instances of the attribute - */ - private int minCardinality = 0; - private int maxCardinality = -1; - private boolean allowsDuplicateValues = false; - private boolean orderedValues = false; - private String defaultValueOverride = null; - private DataItemSortOrder sortOrder = null; - private int minimumLength = 0; - private int length = 0; - private int precision = 0; - private int significantDigits = 0; - private boolean isNullable = true; - - /* - * Two choices on how the type is expressed - */ - private SchemaTypeProperties attributeType = null; - - /* - * Attribute relationships are things like foreign keys - */ - private List attributeRelationships = null; - - /* - * Implementation details - */ - private String nativeJavaClass = null; - private List aliases = null; - - - /** - * Default constructor - */ - public SchemaAttributeProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template template schema attribute to copy. - */ - public SchemaAttributeProperties(SchemaAttributeProperties template) - { - super(template); - - if (template != null) - { - elementPosition = template.getElementPosition(); - minCardinality = template.getMinCardinality(); - maxCardinality = template.getMaxCardinality(); - allowsDuplicateValues = template.getAllowsDuplicateValues(); - orderedValues = template.getOrderedValues(); - sortOrder = template.getSortOrder(); - minimumLength = template.getMinimumLength(); - length = template.getLength(); - precision = template.getPrecision(); - significantDigits = template.getSignificantDigits(); - isNullable = template.getIsNullable(); - defaultValueOverride = template.getDefaultValueOverride(); - attributeType = template.getAttributeType(); - attributeRelationships = template.getAttributeRelationships(); - nativeJavaClass = template.getNativeJavaClass(); - aliases = template.getAliases(); - } - } - - - /** - * Return the position of this schema attribute in its parent schema. - * - * @return int position in schema - 0 means first - */ - public int getElementPosition() { return elementPosition; } - - - /** - * Set up the position of this schema attribute in its parent schema. - * - * @param elementPosition int position in schema - 0 means first - */ - public void setElementPosition(int elementPosition) - { - this.elementPosition = elementPosition; - } - - - /** - * Return this minimum number of instances allowed for this attribute. - * - * @return int - */ - public int getMinCardinality() - { - return minCardinality; - } - - - /** - * Set up the minimum number of instances allowed for this attribute. - * - * @param minCardinality int - */ - public void setMinCardinality(int minCardinality) - { - this.minCardinality = minCardinality; - } - - - /** - * Return the maximum number of instances allowed for this attribute. - * - * @return int (-1 means infinite) - */ - public int getMaxCardinality() - { - return maxCardinality; - } - - - /** - * Set up the maximum number of instances allowed for this attribute. - * - * @param maxCardinality int (-1 means infinite) - */ - public void setMaxCardinality(int maxCardinality) - { - this.maxCardinality = maxCardinality; - } - - - /** - * Return whether the same value can be used by more than one instance of this attribute. - * - * @return boolean flag - */ - public boolean getAllowsDuplicateValues() - { - return allowsDuplicateValues; - } - - - /** - * Set up whether the same value can be used by more than one instance of this attribute. - * - * @param allowsDuplicateValues boolean flag - */ - public void setAllowsDuplicateValues(boolean allowsDuplicateValues) - { - this.allowsDuplicateValues = allowsDuplicateValues; - } - - - /** - * Return whether the attribute instances are arranged in an order. - * - * @return boolean flag - */ - public boolean getOrderedValues() - { - return orderedValues; - } - - - /** - * Set up whether the attribute instances are arranged in an order. - * - * @param orderedValues boolean flag - */ - public void setOrderedValues(boolean orderedValues) - { - this.orderedValues = orderedValues; - } - - - /** - * Return the order that the attribute instances are arranged in - if any. - * - * @return DataItemSortOrder enum - */ - public DataItemSortOrder getSortOrder() - { - return sortOrder; - } - - - /** - * Set up the order that the attribute instances are arranged in - if any. - * - * @param sortOrder DataItemSortOrder enum - */ - public void setSortOrder(DataItemSortOrder sortOrder) - { - this.sortOrder = sortOrder; - } - - - /** - * Return the minimum length of the data. - * - * @return int - */ - public int getMinimumLength() - { - return minimumLength; - } - - - /** - * Set up the minimum length of the data. - * - * @param minimumLength int - */ - public void setMinimumLength(int minimumLength) - { - this.minimumLength = minimumLength; - } - - - /** - * Return the length of the data field. - * - * @return int - */ - public int getLength() - { - return length; - } - - - /** - * Set up the length of the data field. - * - * @param length int - */ - public void setLength(int length) - { - this.length = length; - } - - - /** - * Return the number of significant digits to the right of decimal point. - * - * @return int - */ - public int getPrecision() - { - return precision; - } - - - /** - * Set up the number of significant digits to the right of decimal point. - * - * @param precision int - */ - public void setPrecision(int precision) - { - this.precision = precision; - } - - - /** - * Return the number of significant digits before the decimal point (zero means it is an integer). - * - * @return int - */ - public int getSignificantDigits() - { - return significantDigits; - } - - - /** - * Set up the number of significant digits before the decimal point (zero means it is an integer). - * - * @param significantDigits int - */ - public void setSignificantDigits(int significantDigits) - { - this.significantDigits = significantDigits; - } - - - /** - * Return whether the field is nullable or not. - * - * @return boolean - */ - public boolean getIsNullable() - { - return isNullable; - } - - - /** - * Set up whether the field is nullable or not. - * - * @param nullable boolean - */ - public void setIsNullable(boolean nullable) - { - isNullable = nullable; - } - - - /** - * Return any default value for this attribute that would override the default defined in the - * schema element for this attribute's type (note only used is type is primitive). - * - * @return String default value override - */ - public String getDefaultValueOverride() { return defaultValueOverride; } - - - /** - * Set up any default value for this attribute that would override the default defined in the - * schema element for this attribute's type (note only used is type is primitive). - * - * @param defaultValueOverride String default value override - */ - public void setDefaultValueOverride(String defaultValueOverride) - { - this.defaultValueOverride = defaultValueOverride; - } - - - /** - * Return the SchemaType that relates to the type of this attribute. - * - * @return SchemaType - */ - public SchemaTypeProperties getAttributeType() - { - return attributeType; - } - - - /** - * Set up the SchemaType that relates to the type of this attribute. - * - * @param attributeType SchemaType - */ - public void setAttributeType(SchemaTypeProperties attributeType) - { - this.attributeType = attributeType; - } - - - /** - * Return any relationships to other schema attributes. - * - * @return list of attribute relationships - */ - public List getAttributeRelationships() - { - if (attributeRelationships == null) - { - return null; - } - else if (attributeRelationships.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(attributeRelationships); - } - } - - - /** - * Set up any relationships to other schema attributes. - * - * @param attributeRelationships list of attribute relationships - */ - public void setAttributeRelationships(List attributeRelationships) - { - this.attributeRelationships = attributeRelationships; - } - - - /** - * Return the name of the Java class to use to represent this type. - * - * @return fully qualified Java class name - */ - public String getNativeJavaClass() - { - return nativeJavaClass; - } - - - /** - * Set up the name of the Java class to use to represent this type. - * - * @param nativeJavaClass fully qualified Java class name - */ - public void setNativeJavaClass(String nativeJavaClass) - { - this.nativeJavaClass = nativeJavaClass; - } - - - /** - * Return a list of alternative names for the attribute. - * - * @return list of names - */ - public List getAliases() - { - return aliases; - } - - - /** - * Set up a list of alternative names for the attribute. - * - * @param aliases list of names - */ - public void setAliases(List aliases) - { - this.aliases = aliases; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "SchemaAttributeProperties{" + - "elementPosition=" + elementPosition + - ", minCardinality=" + minCardinality + - ", maxCardinality=" + maxCardinality + - ", allowsDuplicateValues=" + allowsDuplicateValues + - ", orderedValues=" + orderedValues + - ", defaultValueOverride='" + defaultValueOverride + '\'' + - ", sortOrder=" + sortOrder + - ", minimumLength=" + minimumLength + - ", length=" + length + - ", precision=" + precision + - ", significantDigits=" + significantDigits + - ", isNullable=" + isNullable + - ", attributeType=" + attributeType + - ", attributeRelationships=" + attributeRelationships + - ", nativeJavaClass='" + nativeJavaClass + '\'' + - ", aliases=" + aliases + - ", displayName='" + getDisplayName() + '\'' + - ", description='" + getDescription() + '\'' + - ", isDeprecated=" + getIsDeprecated() + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (! (objectToCompare instanceof SchemaAttributeProperties that)) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - return elementPosition == that.elementPosition && - minCardinality == that.minCardinality && - maxCardinality == that.maxCardinality && - allowsDuplicateValues == that.allowsDuplicateValues && - orderedValues == that.orderedValues && - minimumLength == that.minimumLength && - length == that.length && - precision == that.precision && - significantDigits == that.significantDigits && - isNullable == that.isNullable && - Objects.equals(defaultValueOverride, that.defaultValueOverride) && - sortOrder == that.sortOrder && - Objects.equals(attributeType, that.attributeType) && - Objects.equals(attributeRelationships, that.attributeRelationships) && - Objects.equals(nativeJavaClass, that.nativeJavaClass) && - Objects.equals(aliases, that.aliases); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementPosition, minCardinality, maxCardinality, allowsDuplicateValues, orderedValues, - defaultValueOverride, sortOrder, minimumLength, length, precision, significantDigits, isNullable, attributeType, - attributeRelationships, nativeJavaClass, aliases); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/SchemaElementProperties.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/SchemaElementProperties.java deleted file mode 100644 index 0845442fe67..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/SchemaElementProperties.java +++ /dev/null @@ -1,179 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.properties; - -import com.fasterxml.jackson.annotation.*; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * SchemaElementProperties carries the common parameters for creating or updating schema elements such as schema types and attributes. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes({ - @JsonSubTypes.Type(value = SchemaTypeProperties.class, name = "SchemaTypeProperties"), - @JsonSubTypes.Type(value = SchemaAttributeProperties.class, name = "SchemaAttributeProperties") - }) -public abstract class SchemaElementProperties extends ReferenceableProperties -{ - private String displayName = null; - private String description = null; - private boolean isDeprecated = false; - - - /** - * Default constructor - */ - public SchemaElementProperties() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public SchemaElementProperties(SchemaElementProperties template) - { - super(template); - - if (template != null) - { - displayName = template.getDisplayName(); - description = template.getDescription(); - isDeprecated = template.getIsDeprecated(); - } - } - - - /** - * Return the display name of the file - * - * @return string name - */ - public String getDisplayName() - { - return displayName; - } - - - /** - * Set up the display name of the file. - * - * @param displayName string name - */ - public void setDisplayName(String displayName) - { - this.displayName = displayName; - } - - - /** - * Return the description of the file. - * - * @return string description - */ - public String getDescription() - { - return description; - } - - - /** - * Set up the description of the file. - * - * @param description string description - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * Is the schema element deprecated? - * - * @return boolean flag - */ - public boolean getIsDeprecated() - { - return isDeprecated; - } - - - /** - * Set whether the schema element deprecated or not. Default is false. - * - * @param deprecated boolean flag - */ - public void setIsDeprecated(boolean deprecated) - { - isDeprecated = deprecated; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "SchemaElementProperties{" + - "displayName='" + displayName + '\'' + - ", description='" + description + '\'' + - ", isDeprecated=" + isDeprecated + - ", typeName='" + getTypeName() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - SchemaElementProperties that = (SchemaElementProperties) objectToCompare; - return Objects.equals(getDisplayName(), that.getDisplayName()) && - Objects.equals(getDescription(), that.getDescription()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(getDisplayName(), getDescription()); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/SchemaTypeProperties.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/SchemaTypeProperties.java deleted file mode 100644 index 8a74e403364..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/SchemaTypeProperties.java +++ /dev/null @@ -1,315 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.properties; - -import com.fasterxml.jackson.annotation.*; - -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * SchemaTypeProperties carries the common parameters for creating or updating schema types. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class SchemaTypeProperties extends SchemaElementProperties -{ - private String versionNumber = null; - private String author = null; - private String usage = null; - private String encodingStandard = null; - private String namespace = null; - - /* - * Values for when the schemaType is derived from other values rather than stored - */ - private String formula = null; - private String formulaType = null; - private List queries = null; - - /** - * Default constructor - */ - public SchemaTypeProperties() - { - super(); - } - - - /** - * Copy/clone Constructor. - * - * @param template template object to copy. - */ - public SchemaTypeProperties(SchemaTypeProperties template) - { - super(template); - - if (template != null) - { - versionNumber = template.getVersionNumber(); - author = template.getAuthor(); - usage = template.getUsage(); - encodingStandard = template.getEncodingStandard(); - namespace = template.getNamespace(); - formula = template.getFormula(); - formulaType = template.getFormulaType(); - queries = template.getQueries(); - } - } - - - /** - * Return the version number of the schema element - null means no version number. - * - * @return String version number - */ - public String getVersionNumber() { return versionNumber; } - - - /** - * Set up the version number of the schema element - null means no version number. - * - * @param versionNumber String version number - */ - public void setVersionNumber(String versionNumber) - { - this.versionNumber = versionNumber; - } - - - /** - * Return the name of the author of the schema element. Null means the author is unknown. - * - * @return String author name - */ - public String getAuthor() { return author; } - - - /** - * Set up the name of the author of the schema element. Null means the author is unknown. - * - * @param author String author name - */ - public void setAuthor(String author) - { - this.author = author; - } - - - /** - * Return the usage guidance for this schema element. Null means no guidance available. - * - * @return String usage guidance - */ - public String getUsage() { return usage; } - - - /** - * Set up the usage guidance for this schema element. Null means no guidance available. - * - * @param usage String usage guidance - */ - public void setUsage(String usage) - { - this.usage = usage; - } - - - /** - * Return the format (encoding standard) used for this schema. It may be XML, JSON, SQL DDL or something else. - * Null means the encoding standard is unknown or there are many choices. - * - * @return String encoding standard - */ - public String getEncodingStandard() { return encodingStandard; } - - - /** - * Set up the format (encoding standard) used for this schema. It may be XML, JSON, SQL DDL or something else. - * Null means the encoding standard is unknown or there are many choices. - * - * @param encodingStandard String encoding standard - */ - public void setEncodingStandard(String encodingStandard) - { - this.encodingStandard = encodingStandard; - } - - - /** - * Return the name of the namespace that this type belongs to. - * - * @return string name - */ - public String getNamespace() - { - return namespace; - } - - - /** - * Set up the name of the namespace that this type belongs to. - * - * @param namespace string name - */ - public void setNamespace(String namespace) - { - this.namespace = namespace; - } - - - /** - * Return the formula used to combine the values of the queries. Each query is numbers 0, 1, ... and the - * formula has placeholders in it to show how the query results are combined. - * - * @return String formula - */ - public String getFormula() { return formula; } - - - /** - * Set up the formula used to combine the values of the queries. Each query is numbers 0, 1, ... and the - * formula has placeholders in it to show how the query results are combined. - * - * @param formula String formula - */ - public void setFormula(String formula) - { - this.formula = formula; - } - - - /** - * Return the specification language for the formula. - * - * @return string description - */ - public String getFormulaType() - { - return formulaType; - } - - - /** - * Set up the specification language for the formula. - * - * @param formulaType string description - */ - public void setFormulaType(String formulaType) - { - this.formulaType = formulaType; - } - - - /** - * Return the list of queries that are used to create the derived schema element. - * - * @return list of queries - */ - public List getQueries() - { - if (queries == null) - { - return null; - } - else if (queries.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(queries); - } - } - - - /** - * Set up the list of queries that are used to create the derived schema element. - * - * @param queries list of queries - */ - public void setQueries(List queries) - { - this.queries = queries; - } - - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "SchemaTypeProperties{" + - "versionNumber='" + versionNumber + '\'' + - ", author='" + author + '\'' + - ", usage='" + usage + '\'' + - ", encodingStandard='" + encodingStandard + '\'' + - ", namespace='" + namespace + '\'' + - ", formula='" + formula + '\'' + - ", formulaType='" + formulaType + '\'' + - ", queries=" + queries + - ", displayName='" + getDisplayName() + '\'' + - ", description='" + getDescription() + '\'' + - ", deprecated=" + getIsDeprecated() + - ", typeName='" + getTypeName() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - SchemaTypeProperties that = (SchemaTypeProperties) objectToCompare; - return Objects.equals(versionNumber, that.versionNumber) && - Objects.equals(author, that.author) && - Objects.equals(usage, that.usage) && - Objects.equals(encodingStandard, that.encodingStandard) && - Objects.equals(namespace, that.namespace) && - Objects.equals(formula, that.formula) && - Objects.equals(formulaType, that.formulaType) && - Objects.equals(queries, that.queries); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), versionNumber, author, usage, encodingStandard, namespace, formula, formulaType, queries); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/SecurityTagsProperties.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/SecurityTagsProperties.java deleted file mode 100644 index ea5d161f628..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/SecurityTagsProperties.java +++ /dev/null @@ -1,172 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetowner.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.*; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * SecurityTagsProperties holds the list of labels and properties used by a security enforcement engine to control access - * and visibility to the contents of the real-world object described by the Referenceable. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class SecurityTagsProperties -{ - private List securityLabels = null; - private Map securityProperties = null; - - - /** - * Default constructor - */ - public SecurityTagsProperties() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public SecurityTagsProperties(SecurityTagsProperties template) - { - super(); - - if (template != null) - { - this.securityLabels = template.getSecurityLabels(); - this.securityProperties = template.getSecurityProperties(); - } - } - - - /** - * Return the list of security labels attached to the element. - * - * @return list of label strings - */ - public List getSecurityLabels() - { - if (securityLabels == null) - { - return null; - } - else if (securityLabels.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(securityLabels); - } - } - - - /** - * Set up the list of security labels for the element. - * - * @param securityLabels list of label strings - */ - public void setSecurityLabels(List securityLabels) - { - this.securityLabels = securityLabels; - } - - - /** - * Return the security properties associated with the element. These are name-value pairs. - * - * @return map of properties - */ - public Map getSecurityProperties() - { - if (securityProperties == null) - { - return null; - } - else if (securityProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(securityProperties); - } - } - - - /** - * Set up the security properties associated with the element. These are name-value pairs. - * - * @param securityProperties map of properties - */ - public void setSecurityProperties(Map securityProperties) - { - this.securityProperties = securityProperties; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "SecurityTagsProperties{" + - "securityLabels=" + securityLabels + - ", securityProperties=" + securityProperties + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - SecurityTagsProperties that = (SecurityTagsProperties) objectToCompare; - return Objects.equals(securityLabels, that.securityLabels) && - Objects.equals(securityProperties, that.securityProperties); - } - - - /** - * Create a hash code for this element type. - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), securityLabels, securityProperties); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/SemanticAssignmentProperties.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/SemanticAssignmentProperties.java deleted file mode 100644 index 1fae31ca4be..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/SemanticAssignmentProperties.java +++ /dev/null @@ -1,282 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetowner.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.openmetadata.enums.GlossaryTermAssignmentStatus; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * SemanticAssignmentProperties links an element to a glossary term to indicate that the glossary term describes its meaning. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class SemanticAssignmentProperties extends RelationshipProperties -{ - private String expression = null; - private String description = null; - private GlossaryTermAssignmentStatus status = null; - private int confidence = 0; - private String createdBy = null; - private String steward = null; - private String source = null; - - - /** - * Default constructor - */ - public SemanticAssignmentProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template template object to copy. - */ - public SemanticAssignmentProperties(SemanticAssignmentProperties template) - { - super(template); - - if (template != null) - { - expression = template.getExpression(); - description = template.getDescription(); - status = template.getStatus(); - steward = template.getSteward(); - source = template.getSource(); - } - } - - - /** - * Set up the expression that describes the relationship. - * - * @param expression String name - */ - public void setExpression(String expression) - { - this.expression = expression; - } - - - /** - * Returns the expression that describes the relationship. - * - * @return String name - */ - public String getExpression() - { - return expression; - } - - - /** - * Set up description of the relationship. - * - * @param description String - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * Return the description for the relationship. - * - * @return String description - */ - public String getDescription() - { - return description; - } - - - /** - * Set up whether this relationship should be used. - * - * @param status status enum - */ - public void setStatus(GlossaryTermAssignmentStatus status) - { - this.status = status; - } - - - /** - * Returns whether this relationship should be used. - * - * @return status enum - */ - public GlossaryTermAssignmentStatus getStatus() - { - return status; - } - - - /** - * Return the level of confidence that the relationship is correct. 0 means unassigned. Typical assigned values are usually between 1-100 - * as a percentage scale. - * - * @return int - */ - public int getConfidence() - { - return confidence; - } - - - /** - * Set up the level of confidence that the relationship is correct. 0 means unassigned. Typical assigned values are usually between 1-100 - * as a percentage scale. - * - * @param confidence int - */ - public void setConfidence(int confidence) - { - this.confidence = confidence; - } - - - /** - * Return the name/description of the creator of the relationship. The relationship includes the userId of the creator, so this field is for - * a more business friendly name. - * - * @return string name - */ - public String getCreatedBy() - { - return createdBy; - } - - - /** - * Set up the name/description of the creator of the relationship. The relationship includes the userId of the creator, so this field is for - * a more business friendly name. - * - * @param createdBy string name - */ - public void setCreatedBy(String createdBy) - { - this.createdBy = createdBy; - } - - - /** - * Set up the id of the steward who assigned the relationship (or approved the discovered value). - * - * @param steward user id or name of steward - */ - public void setSteward(String steward) - { - this.steward = steward; - } - - - /** - * Returns the id of the steward who assigned the relationship (or approved the discovered value). - * - * @return user id or name of steward - */ - public String getSteward() - { - return steward; - } - - - /** - * Set up the id of the source of the knowledge of the relationship. - * - * @param source String id - */ - public void setSource(String source) - { - this.source = source; - } - - - /** - * Returns the id of the source of the knowledge of the relationship. - * - * @return String id - */ - public String getSource() - { - return source; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "GlossaryTermRelationship{" + - "expression='" + expression + '\'' + - ", description='" + description + '\'' + - ", status=" + status + - ", steward='" + steward + '\'' + - ", source='" + source + '\'' + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (! (objectToCompare instanceof SemanticAssignmentProperties that)) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - return confidence == that.confidence && - Objects.equals(expression, that.expression) && - Objects.equals(description, that.description) && - status == that.status && - Objects.equals(createdBy, that.createdBy) && - Objects.equals(steward, that.steward) && - Objects.equals(source, that.source); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), expression, description, status, confidence, createdBy, steward, source); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/SoftwareCapabilityProperties.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/SoftwareCapabilityProperties.java deleted file mode 100644 index 0e622d6635d..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/SoftwareCapabilityProperties.java +++ /dev/null @@ -1,262 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.properties; - -import com.fasterxml.jackson.annotation.*; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * SoftwareCapabilityProperties describe the properties needed to describe a specific software server's capability. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes({ - @JsonSubTypes.Type(value = FileSystemProperties.class, name = "FileSystemProperties") -}) -public class SoftwareCapabilityProperties extends ReferenceableProperties -{ - private String displayName = null; - private String description = null; - private String typeDescription = null; - private String version = null; - private String patchLevel = null; - private String source = null; - - - /** - * Default constructor. - */ - public SoftwareCapabilityProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public SoftwareCapabilityProperties(SoftwareCapabilityProperties template) - { - super(template); - - if (template != null) - { - displayName = template.getDisplayName(); - description = template.getDescription(); - typeDescription = template.getTypeDescription(); - version = template.getVersion(); - patchLevel = template.getPatchLevel(); - source = template.getSource(); - } - } - - - /** - * Return the display name for messages and UI. - * - * @return string name - */ - public String getDisplayName() - { - return displayName; - } - - - /** - * Set up the display name for messages and UI. - * - * @param displayName string name - */ - public void setDisplayName(String displayName) - { - this.displayName = displayName; - } - - - /** - * Return the description of the discovery engine. - * - * @return string description - */ - public String getDescription() - { - return description; - } - - - /** - * Set up the description of the discovery engine. - * - * @param description string - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * Return the description of the type of discovery engine this is. - * - * @return string description - */ - public String getTypeDescription() - { - return typeDescription; - } - - - /** - * Set up the description of the type of discovery engine this is. - * - * @param typeDescription string - */ - public void setTypeDescription(String typeDescription) - { - this.typeDescription = typeDescription; - } - - - /** - * Return the version of the discovery engine. - * - * @return version string - */ - public String getVersion() - { - return version; - } - - - /** - * Set up the version string of the discovery engine. - * - * @param version string - */ - public void setVersion(String version) - { - this.version = version; - } - - - /** - * Return the patch level of the discovery engine. - * - * @return patch level string - */ - public String getPatchLevel() - { - return patchLevel; - } - - - /** - * Set up the patch level of the discovery engine. - * - * @param patchLevel string - */ - public void setPatchLevel(String patchLevel) - { - this.patchLevel = patchLevel; - } - - - /** - * Return the source of the discovery engine implementation. - * - * @return string url - */ - public String getSource() - { - return source; - } - - - /** - * Set up the source of the discovery engine implementation. - * - * @param source string url - */ - public void setSource(String source) - { - this.source = source; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "SoftwareCapabilityProperties{" + - "displayName='" + displayName + '\'' + - ", description='" + description + '\'' + - ", typeDescription='" + typeDescription + '\'' + - ", version='" + version + '\'' + - ", patchLevel='" + patchLevel + '\'' + - ", source='" + source + '\'' + - ", typeName='" + getTypeName() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - SoftwareCapabilityProperties that = (SoftwareCapabilityProperties) objectToCompare; - return Objects.equals(getDisplayName(), that.getDisplayName()) && - Objects.equals(getDescription(), that.getDescription()) && - Objects.equals(getTypeDescription(), that.getTypeDescription()) && - Objects.equals(getVersion(), that.getVersion()) && - Objects.equals(getPatchLevel(), that.getPatchLevel()) && - Objects.equals(getSource(), that.getSource()); - } - - - /** - * Create a hash code for this element type. - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), getDisplayName(), getDescription(), getTypeDescription(), getVersion(), - getPatchLevel(), getSource()); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/StakeholderProperties.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/StakeholderProperties.java deleted file mode 100644 index 73d78725581..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/StakeholderProperties.java +++ /dev/null @@ -1,125 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.properties; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * StakeholderProperties provides a details of a stakeholder for an initiative. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class StakeholderProperties extends RelationshipProperties -{ - String stakeholderRole = null; - - /** - * Default constructor - */ - public StakeholderProperties() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public StakeholderProperties(StakeholderProperties template) - { - super(template); - - if (template != null) - { - this.stakeholderRole = template.getStakeholderRole(); - } - } - - - /** - * Return the role of the stakeholder to the initiative. - * - * @return role type - */ - public String getStakeholderRole() - { - return stakeholderRole; - } - - - /** - * Set up the role of the stakeholder to the initiative. - * - * @param stakeholderRole role type - */ - public void setStakeholderRole(String stakeholderRole) - { - this.stakeholderRole = stakeholderRole; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "StakeholderProperties{" + - "effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", extendedProperties=" + getExtendedProperties() + - ", stakeholderRole='" + stakeholderRole + '\'' + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - StakeholderProperties that = (StakeholderProperties) objectToCompare; - return Objects.equals(stakeholderRole, that.stakeholderRole); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), stakeholderRole); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/SupplementaryProperties.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/SupplementaryProperties.java deleted file mode 100644 index fe5771d41bd..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/SupplementaryProperties.java +++ /dev/null @@ -1,243 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetowner.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * SupplementaryProperties describe additional information about a technical element (typically assets and schemas) - * that has been added as part of a governance process. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes( - { - @JsonSubTypes.Type(value = AssetProperties.class, name = "AssetProperties"), - }) -public class SupplementaryProperties extends ReferenceableProperties -{ - private String displayName = null; - private String displaySummary = null; - private String displayDescription = null; - private String abbreviation = null; - private String usage = null; - - - /** - * Default constructor - */ - public SupplementaryProperties() - { - } - - - /** - * Copy/clone constructor. Note, this is a deep copy - * - * @param template object to copy - */ - public SupplementaryProperties(SupplementaryProperties template) - { - super(template); - - if (template != null) - { - displayName = template.getDisplayName(); - displaySummary = template.getDisplaySummary(); - displayDescription = template.getDisplayDescription(); - abbreviation = template.getAbbreviation(); - usage = template.getUsage(); - } - } - - - /** - * Returns the stored display name property for the technical element. - * If no display name is available then null is returned. - * - * @return String name - */ - public String getDisplayName() - { - return displayName; - } - - - /** - * Set up the stored display name property for the technical element. - * - * @param displayName String name - */ - public void setDisplayName(String displayName) - { - this.displayName = displayName; - } - - - /** - * Return the short (1-2 sentence) description of the technical element. - * - * @return string text - */ - public String getDisplaySummary() - { - return displaySummary; - } - - - /** - * Set up the short (1-2 sentence) description of the technical element. - * - * @param displaySummary string text - */ - public void setDisplaySummary(String displaySummary) - { - this.displaySummary = displaySummary; - } - - - /** - * Returns the stored description property for the technical element. - * If no description is provided then null is returned. - * - * @return String text - */ - public String getDisplayDescription() - { - return displayDescription; - } - - - /** - * Set up the stored description property for the technical element. - * - * @param displayDescription String text - */ - public void setDisplayDescription(String displayDescription) - { - this.displayDescription = displayDescription; - } - - - /** - * Return the abbreviation used for this technical element. - * - * @return string text - */ - public String getAbbreviation() - { - return abbreviation; - } - - - /** - * Set up the abbreviation used for this technical element. - * - * @param abbreviation string text - */ - public void setAbbreviation(String abbreviation) - { - this.abbreviation = abbreviation; - } - - - /** - * Return details of the expected usage of this technical element. - * - * @return string text - */ - public String getUsage() - { - return usage; - } - - - /** - * Set up details of the expected usage of this technical element. - * - * @param usage string text - */ - public void setUsage(String usage) - { - this.usage = usage; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "SupplementaryProperties{" + - "typeName='" + getTypeName() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", extendedProperties=" + getExtendedProperties() + - ", displayName='" + displayName + '\'' + - ", displaySummary='" + displaySummary + '\'' + - ", displayDescription='" + displayDescription + '\'' + - ", abbreviation='" + abbreviation + '\'' + - ", usage='" + usage + '\'' + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - SupplementaryProperties that = (SupplementaryProperties) objectToCompare; - return Objects.equals(getDisplayName(), that.getDisplayName()) && - Objects.equals(getDisplaySummary(), that.getDisplaySummary()) && - Objects.equals(getDisplayDescription(), that.getDisplayDescription()) && - Objects.equals(getAbbreviation(), that.getAbbreviation()) && - Objects.equals(getUsage(), that.getUsage()); - } - - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), getDisplayName(), getDisplaySummary(), getDisplayDescription(), getAbbreviation(), getUsage()); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/ValidValueProperties.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/ValidValueProperties.java deleted file mode 100644 index f0c3beed698..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/ValidValueProperties.java +++ /dev/null @@ -1,335 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ValidValueProperties provides the common super class for ValidValueSet and ValidValueDefinition. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ValidValueProperties extends ReferenceableProperties -{ - private String displayName = null; - private String description = null; - private String usage = null; - private String scope = null; - private String category = null; - private String preferredValue = null; - private String dataType = null; - private boolean isDeprecated = false; - private boolean isCaseSensitive = false; - - - /** - * Constructor - */ - public ValidValueProperties() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ValidValueProperties(ValidValueProperties template) - { - super(template); - - if (template != null) - { - displayName = template.getDisplayName(); - description = template.getDescription(); - usage = template.getUsage(); - scope = template.getScope(); - category = template.getCategory(); - preferredValue = template.getPreferredValue(); - dataType = template.getDataType(); - isDeprecated = template.getIsDeprecated(); - isCaseSensitive = template.getIsCaseSensitive(); - } - } - - - /** - * Returns the stored display name property for the valid value. - * If no display name is available then null is returned. - * - * @return String name - */ - public String getDisplayName() - { - return displayName; - } - - - /** - * Set up the stored display name property for the valid value. - * - * @param displayName String name - */ - public void setDisplayName(String displayName) - { - this.displayName = displayName; - } - - - /** - * Returns the stored description property for the valid value. - * If no description is provided then null is returned. - * - * @return description String text - */ - public String getDescription() - { - return description; - } - - - /** - * Set up the stored description property associated with the valid value. - * - * @param description String text - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * Return the description of how this valid value should be used. - * - * @return String text - */ - public String getUsage() - { - return usage; - } - - - /** - * Set up the description of how this valid value should be used. - * - * @param usage String text - */ - public void setUsage(String usage) - { - this.usage = usage; - } - - - /** - * Return the scope of values that this valid value covers (normally used with sets) - * - * @return String text - */ - public String getScope() - { - return scope; - } - - - /** - * Set up the scope of values that this valid value covers (normally used with sets) - * - * @param scope String text - */ - public void setScope(String scope) - { - this.scope = scope; - } - - - /** - * Return the category of reference data. - * - * @return string name - */ - public String getCategory() - { - return category; - } - - - /** - * Set up the category of reference data. - * - * @param category string name - */ - public void setCategory(String category) - { - this.category = category; - } - - - /** - * Return the preferred values to use in implementations (normally used with definitions) - * - * @return String value - */ - public String getPreferredValue() - { - return preferredValue; - } - - - /** - * Set up the preferred values to use in implementations (normally used with definitions) - * - * @param preferredValue String value - */ - public void setPreferredValue(String preferredValue) - { - this.preferredValue = preferredValue; - } - - - /** - * Returns the data type of the preferred value. - * - * @return string - */ - public String getDataType() - { - return dataType; - } - - - /** - * Set up the data type of the preferred value. - * - * @param dataType string - */ - public void setDataType(String dataType) - { - this.dataType = dataType; - } - - - /** - * Is the valid value deprecated? - * - * @return boolean flag - */ - public boolean getIsDeprecated() - { - return isDeprecated; - } - - - /** - * Set whether the valid value is deprecated or not. Default is false. - * - * @param deprecated boolean flag - */ - public void setIsDeprecated(boolean deprecated) - { - isDeprecated = deprecated; - } - - - /** - * Return whether this valid value is case-sensitive, or will match irrespective of case. - * - * @return boolean flag - */ - public boolean getIsCaseSensitive() - { - return isCaseSensitive; - } - - - /** - * Set up whether this valid value is case-sensitive, or will match irrespective of case. - * - * @param caseSensitive boolean flag - */ - public void setIsCaseSensitive(boolean caseSensitive) - { - isCaseSensitive = caseSensitive; - } - - - /** - * Generate a string containing the properties. - * - * @return string value - */ - @Override - public String toString() - { - return "ValidValueProperties{" + - "displayName='" + displayName + '\'' + - ", description='" + description + '\'' + - ", usage='" + usage + '\'' + - ", scope='" + scope + '\'' + - ", category='" + category + '\'' + - ", preferredValue='" + preferredValue + '\'' + - ", dataType='" + dataType + '\'' + - ", isDeprecated=" + isDeprecated + - ", isCaseSensitive=" + isCaseSensitive + - ", typeName='" + getTypeName() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ValidValueProperties that = (ValidValueProperties) objectToCompare; - return Objects.equals(displayName, that.displayName) && - Objects.equals(description, that.description) && - Objects.equals(usage, that.usage) && - Objects.equals(scope, that.scope) && - Objects.equals(category, that.category) && - Objects.equals(isDeprecated, that.isDeprecated) && - Objects.equals(isCaseSensitive, that.isCaseSensitive) && - Objects.equals(preferredValue, that.preferredValue) && - Objects.equals(dataType, that.dataType); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), displayName, description, usage, scope, category, preferredValue, dataType, isDeprecated, isCaseSensitive); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/package-info.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/package-info.java index 945b4515a60..a73d304185f 100644 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/package-info.java +++ b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/package-info.java @@ -2,8 +2,7 @@ /* Copyright Contributors to the ODPi Egeria project. */ /** - * This package provides the properties used to create different types of instances for an asset and its attachments. - * + * This package provides the properties that are unique to Asset Owner OMAS. * They are used as request body structures on the REST APIs and are also embedded in the element beans when the instances are * retrieved from the repository */ diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/AnnotationListResponse.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/AnnotationListResponse.java deleted file mode 100644 index 4f835fb8c3b..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/AnnotationListResponse.java +++ /dev/null @@ -1,144 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetowner.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.surveyaction.properties.Annotation; - -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * AnnotationListResponse is the response structure used on OMAS REST API calls that return a - * list of Annotations objects as a response. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class AnnotationListResponse extends AssetOwnerOMASAPIResponse -{ - private List annotations = null; - - /** - * Default constructor - */ - public AnnotationListResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public AnnotationListResponse(AnnotationListResponse template) - { - super(template); - - if (template != null) - { - this.annotations = template.getAnnotations(); - } - } - - - /** - * Return the properties objects. - * - * @return list of properties objects - */ - public List getAnnotations() - { - if (annotations == null) - { - return null; - } - else - { - return annotations; - } - } - - - /** - * Set up the properties objects. - * - * @param annotations list of properties objects - */ - public void setAnnotations(List annotations) - { - this.annotations = annotations; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "AnnotationListResponse{" + - "annotations=" + annotations + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - AnnotationListResponse that = (AnnotationListResponse) objectToCompare; - return Objects.equals(getAnnotations(), that.getAnnotations()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), getAnnotations()); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/AnnotationResponse.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/AnnotationResponse.java deleted file mode 100644 index dac254ad91a..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/AnnotationResponse.java +++ /dev/null @@ -1,150 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetowner.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.surveyaction.properties.Annotation; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * AnnotationResponse is the response structure used on the OMAS REST API calls that return a - * Annotation object as a response. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class AnnotationResponse extends AssetOwnerOMASAPIResponse -{ - private Annotation annotation = null; - - /** - * Default constructor - */ - public AnnotationResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public AnnotationResponse(AnnotationResponse template) - { - super(template); - - if (template != null) - { - this.annotation = template.getAnnotation(); - } - } - - - /** - * Return the Annotation object. - * - * @return annotation - */ - public Annotation getAnnotation() - { - if (annotation == null) - { - return null; - } - else - { - return annotation; - } - } - - - /** - * Set up the Annotation object. - * - * @param annotation - annotation object - */ - public void setAnnotation(Annotation annotation) - { - this.annotation = annotation; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "AnnotationResponse{" + - "annotation=" + annotation + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof AnnotationResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - AnnotationResponse that = (AnnotationResponse) objectToCompare; - return Objects.equals(getAnnotation(), that.getAnnotation()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - if (annotation == null) - { - return super.hashCode(); - } - else - { - return annotation.hashCode(); - } - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/AssetElementResponse.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/AssetElementResponse.java deleted file mode 100644 index 270f016a022..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/AssetElementResponse.java +++ /dev/null @@ -1,137 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.AssetElement; - - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * AssetElementResponse is the response structure used on the OMAS REST API calls that return a - * AssetElement bean object as a response. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class AssetElementResponse extends AssetOwnerOMASAPIResponse -{ - private AssetElement asset = null; - - - /** - * Default constructor - */ - public AssetElementResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public AssetElementResponse(AssetElementResponse template) - { - super(template); - - if (template != null) - { - this.asset = template.getAsset(); - } - } - - - /** - * Return the asset result. - * - * @return unique identifier - */ - public AssetElement getAsset() - { - return asset; - } - - - /** - * Set up the asset result. - * - * @param asset unique identifier - */ - public void setAsset(AssetElement asset) - { - this.asset = asset; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "AssetElementResponse{" + - "asset=" + asset + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - AssetElementResponse that = (AssetElementResponse) objectToCompare; - return Objects.equals(asset, that.asset); - } - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), getAsset()); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/AssetElementsResponse.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/AssetElementsResponse.java deleted file mode 100644 index 889ac9448f4..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/AssetElementsResponse.java +++ /dev/null @@ -1,153 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.rest; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.AssetElement; - -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * AssetElementsResponse returns a list of assets from the server. The list may be too long to - * retrieve in a single call so there is support for paging of replies. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class AssetElementsResponse extends PagedResponse -{ - private List assets = null; - - - /** - * Default constructor - */ - public AssetElementsResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public AssetElementsResponse(AssetElementsResponse template) - { - super(template); - - if (template != null) - { - this.assets = template.getAssets(); - } - } - - - /** - * Return the list of assets in the response. - * - * @return list of assets - */ - public List getAssets() - { - if (assets == null) - { - return null; - } - else if (assets.isEmpty()) - { - return null; - } - else - { - List clonedList = new ArrayList<>(); - - for (AssetElement existingElement : assets) - { - clonedList.add(new AssetElement(existingElement)); - } - - return clonedList; - } - } - - - /** - * Set up the list of assets for the response. - * - * @param assets list - */ - public void setAssets(List assets) - { - this.assets = assets; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "AssetElementsResponse{" + - "assets=" + assets + - ", startingFromElement=" + getStartingFromElement() + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - AssetElementsResponse that = (AssetElementsResponse) objectToCompare; - return Objects.equals(getAssets(), that.getAssets()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), getAssets()); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/AssetOwnerOMASAPIRequestBody.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/AssetOwnerOMASAPIRequestBody.java deleted file mode 100644 index 6fe18fd01d9..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/AssetOwnerOMASAPIRequestBody.java +++ /dev/null @@ -1,57 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetowner.rest; - -import com.fasterxml.jackson.annotation.*; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * AssetOwnerOMASAPIRequestBody provides a common header for Asset Owner OMAS request bodies for its REST API. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes({ - @JsonSubTypes.Type(value = ReferenceableRequestBody.class, name = "ReferenceableRequestBody"), - @JsonSubTypes.Type(value = NewFileAssetRequestBody.class, name = "NewFileAssetRequestBody"), - @JsonSubTypes.Type(value = NewFileSystemRequestBody.class, name = "NewFileSystemRequestBody"), - @JsonSubTypes.Type(value = PathNameRequestBody.class, name = "PathNameRequestBody") - }) -public abstract class AssetOwnerOMASAPIRequestBody -{ - /** - * Default constructor - */ - public AssetOwnerOMASAPIRequestBody() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public AssetOwnerOMASAPIRequestBody(AssetOwnerOMASAPIRequestBody template) - { - } - - - /** - * JSON-like toString - * - * @return string containing the class name - */ - @Override - public String toString() - { - return "AssetOwnerOMASAPIRequestBody{}"; - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/AssetOwnerOMASAPIResponse.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/AssetOwnerOMASAPIResponse.java deleted file mode 100644 index e0d8cf89876..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/AssetOwnerOMASAPIResponse.java +++ /dev/null @@ -1,72 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.rest; - -import com.fasterxml.jackson.annotation.*; -import org.odpi.openmetadata.commonservices.ffdc.rest.FFDCResponseBase; - -import java.util.Arrays; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * AssetOwnerOMASAPIResponse provides a common header for Asset Owner OMAS managed rest to its REST API. - * It manages information about exceptions. If no exception has been raised exceptionClassName is null. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes({ - @JsonSubTypes.Type(value = FileSystemResponse.class, name = "FileSystemResponse"), - @JsonSubTypes.Type(value = FolderResponse.class, name = "FolderResponse") - - }) -public abstract class AssetOwnerOMASAPIResponse extends FFDCResponseBase -{ - /** - * Default constructor - */ - public AssetOwnerOMASAPIResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public AssetOwnerOMASAPIResponse(AssetOwnerOMASAPIResponse template) - { - super(template); - } - - - /** - * JSON-like toString - * - * @return string containing the property names and values - */ - @Override - public String toString() - { - return "AssetOwnerOMASAPIResponse{" + - "exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/CertificateIdRequestBody.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/CertificateIdRequestBody.java deleted file mode 100644 index 6a1813c4c17..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/CertificateIdRequestBody.java +++ /dev/null @@ -1,122 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * CertificateIdRequestBody provides a structure for the unique certificate identifier. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class CertificateIdRequestBody extends AssetOwnerOMASAPIRequestBody -{ - private String certificateId = null; - - - /** - * Default constructor - */ - public CertificateIdRequestBody() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public CertificateIdRequestBody(CertificateIdRequestBody template) - { - super(template); - - if (template != null) - { - this.certificateId = template.getCertificateId(); - } - } - - - /** - * Return the unique identifier for the certificate from the certificate authority. - * - * @return String identifier - */ - public String getCertificateId() - { - return certificateId; - } - - - /** - * Set up the unique identifier for the certificate from the certificate authority. - * - * @param certificateId String identifier - */ - public void setCertificateId(String certificateId) - { - this.certificateId = certificateId; - } - - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "CertificateIdRequestBody{" + - "certificateId='" + certificateId + '\'' + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - CertificateIdRequestBody that = (CertificateIdRequestBody) objectToCompare; - return Objects.equals(certificateId, that.certificateId); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(certificateId); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/CertificationListResponse.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/CertificationListResponse.java deleted file mode 100644 index 1e79d3c7985..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/CertificationListResponse.java +++ /dev/null @@ -1,149 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.CertificationElement; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * CertificationTypeListResponse is the response structure used on the OMAS REST API calls that return a - * list of certifications as a response. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class CertificationListResponse extends AssetOwnerOMASAPIResponse -{ - private List elements = null; - - - /** - * Default constructor - */ - public CertificationListResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public CertificationListResponse(CertificationListResponse template) - { - super(template); - - if (template != null) - { - this.elements = template.getElements(); - } - } - - - /** - * Return the list of certification types. - * - * @return list of objects or null - */ - public List getElements() - { - if (elements == null) - { - return null; - } - else if (elements.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elements); - } - } - - - /** - * Set up the list of certification types. - * - * @param elements - list of objects or null - */ - public void setElements(List elements) - { - this.elements = elements; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "CertificationListResponse{" + - "elements=" + elements + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof CertificationListResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - CertificationListResponse that = (CertificationListResponse) objectToCompare; - return Objects.equals(this.getElements(), that.getElements()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(elements, super.hashCode()); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/CertificationTypeListResponse.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/CertificationTypeListResponse.java deleted file mode 100644 index 8d200786912..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/CertificationTypeListResponse.java +++ /dev/null @@ -1,149 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.CertificationTypeElement; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * CertificationTypeListResponse is the response structure used on the OMAS REST API calls that return a - * list of certification types as a response. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class CertificationTypeListResponse extends AssetOwnerOMASAPIResponse -{ - private List elements = null; - - - /** - * Default constructor - */ - public CertificationTypeListResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public CertificationTypeListResponse(CertificationTypeListResponse template) - { - super(template); - - if (template != null) - { - this.elements = template.getElements(); - } - } - - - /** - * Return the list of certification types. - * - * @return list of objects or null - */ - public List getElements() - { - if (elements == null) - { - return null; - } - else if (elements.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elements); - } - } - - - /** - * Set up the list of certification types. - * - * @param elements - list of objects or null - */ - public void setElements(List elements) - { - this.elements = elements; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "CertificationTypeListResponse{" + - "elements=" + elements + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof CertificationTypeListResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - CertificationTypeListResponse that = (CertificationTypeListResponse) objectToCompare; - return Objects.equals(this.getElements(), that.getElements()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(elements, super.hashCode()); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/CertificationTypeRequestBody.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/CertificationTypeRequestBody.java deleted file mode 100644 index 9b95434dc5b..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/CertificationTypeRequestBody.java +++ /dev/null @@ -1,145 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetowner.properties.CertificationTypeProperties; -import org.odpi.openmetadata.accessservices.assetowner.properties.GovernanceDefinitionStatus; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * CertificationTypeRequestBody provides a structure used when creating certification types. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class CertificationTypeRequestBody extends AssetOwnerOMASAPIRequestBody -{ - private CertificationTypeProperties properties = null; - private GovernanceDefinitionStatus initialStatus = null; - - - /** - * Default constructor - */ - public CertificationTypeRequestBody() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public CertificationTypeRequestBody(CertificationTypeRequestBody template) - { - super(template); - - if (template != null) - { - this.properties = template.getProperties(); - this.initialStatus = template.getInitialStatus(); - } - } - - - /** - * Return the properties of the certification type. - * - * @return properties - */ - public CertificationTypeProperties getProperties() - { - return properties; - } - - - /** - * Set up the properties of the certification type. - * - * @param properties properties - */ - public void setProperties(CertificationTypeProperties properties) - { - this.properties = properties; - } - - - /** - * Return the initial status of the certification type. - * - * @return instance status - */ - public GovernanceDefinitionStatus getInitialStatus() - { - return initialStatus; - } - - - /** - * Set up the initial status of the certification type. - * - * @param initialStatus instance status - */ - public void setInitialStatus(GovernanceDefinitionStatus initialStatus) - { - this.initialStatus = initialStatus; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "CertificationTypeRequestBody{" + - "properties=" + properties + - ", initialStatus=" + initialStatus + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - CertificationTypeRequestBody that = (CertificationTypeRequestBody) objectToCompare; - return Objects.equals(properties, that.properties) && - initialStatus == that.initialStatus; - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(properties, initialStatus); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/CertificationTypeResponse.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/CertificationTypeResponse.java deleted file mode 100644 index 7ad36707e64..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/CertificationTypeResponse.java +++ /dev/null @@ -1,136 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.CertificationTypeElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * CertificationTypeResponse is the response structure used on the OMAS REST API calls that returns a - * certification type object as a response. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class CertificationTypeResponse extends AssetOwnerOMASAPIResponse -{ - private CertificationTypeElement element = null; - - - /** - * Default constructor - */ - public CertificationTypeResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public CertificationTypeResponse(CertificationTypeResponse template) - { - super(template); - - if (template != null) - { - this.element = template.getElement(); - } - } - - - /** - * Return the element result. - * - * @return CertificationTypeProperties object - */ - public CertificationTypeElement getElement() - { - return element; - } - - - /** - * Set up the element result. - * - * @param element CertificationTypeProperties object - */ - public void setElement(CertificationTypeElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "CertificationTypeResponse{" + - "element='" + getElement() + '\'' + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof CertificationTypeResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - CertificationTypeResponse that = (CertificationTypeResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/ClassificationRequestBody.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/ClassificationRequestBody.java deleted file mode 100644 index 9698fe604c3..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/ClassificationRequestBody.java +++ /dev/null @@ -1,127 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.rest; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetowner.properties.ClassificationProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * ClassificationRequestBody describes the request body used when attaching classification to elements. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ClassificationRequestBody extends ExternalSourceRequestBody -{ - private ClassificationProperties properties = null; - - - /** - * Default constructor - */ - public ClassificationRequestBody() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public ClassificationRequestBody(ClassificationRequestBody template) - { - super(template); - - if (template != null) - { - properties = template.getProperties(); - } - } - - - /** - * Return the properties for the classification. - * - * @return properties object - */ - public ClassificationProperties getProperties() - { - return properties; - } - - - /** - * Set up the properties for the classification. - * - * @param properties properties object - */ - public void setProperties(ClassificationProperties properties) - { - this.properties = properties; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ClassificationRequestBody{" + - "externalSourceGUID='" + getExternalSourceGUID() + '\'' + - ", externalSourceName='" + getExternalSourceName() + '\'' + - ", properties=" + properties + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ClassificationRequestBody that = (ClassificationRequestBody) objectToCompare; - return Objects.equals(getProperties(), that.getProperties()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), properties); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/ConnectionRequestBody.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/ConnectionRequestBody.java deleted file mode 100644 index d9f96bf74c4..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/ConnectionRequestBody.java +++ /dev/null @@ -1,153 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ConnectionRequestBody carries the parameters for created a new asset. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ConnectionRequestBody extends AssetOwnerOMASAPIRequestBody -{ - protected String shortDescription = null; - protected Connection connection = null; - - /** - * Default constructor - */ - public ConnectionRequestBody() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ConnectionRequestBody(ConnectionRequestBody template) - { - super(template); - - if (template != null) - { - shortDescription = template.getShortDescription(); - connection = template.getConnection(); - } - } - - - /** - * Returns the short description of the asset from relationship with Connection. - * - * @return shortDescription String - */ - public String getShortDescription() - { - return shortDescription; - } - - - /** - * Set up the short description of the asset from relationship with Connection. - * - * @param shortDescription String text - */ - public void setShortDescription(String shortDescription) - { - this.shortDescription = shortDescription; - } - - - /** - * Return the Connection object. - * - * @return connection - */ - public Connection getConnection() - { - if (connection == null) - { - return null; - } - else - { - return connection; - } - } - - - /** - * Set up the Connection object. - * - * @param connection - connection object - */ - public void setConnection(Connection connection) - { - this.connection = connection; - } - - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "ConnectionRequestBody{" + - "shortDescription='" + shortDescription + '\'' + - ", connection=" + connection + - '}'; - } - - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ConnectionRequestBody that = (ConnectionRequestBody) objectToCompare; - return Objects.equals(getShortDescription(), that.getShortDescription()) && - Objects.equals(getConnection(), that.getConnection()); - } - - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(getShortDescription(), getConnection()); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/ConnectionResponse.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/ConnectionResponse.java deleted file mode 100644 index 62c70d4be18..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/ConnectionResponse.java +++ /dev/null @@ -1,134 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetowner.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.ConnectionElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ConnectionResponse is a response object for passing back a single connection object. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ConnectionResponse extends AssetOwnerOMASAPIResponse -{ - private ConnectionElement element = null; - - - /** - * Default constructor - */ - public ConnectionResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ConnectionResponse(ConnectionResponse template) - { - super(template); - - if (template != null) - { - element = template.getElement(); - } - } - - - /** - * Return the metadata element. - * - * @return result object - */ - public ConnectionElement getElement() - { - return element; - } - - - /** - * Set up the metadata element to return. - * - * @param element result object - */ - public void setElement(ConnectionElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ConnectionResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ConnectionResponse that = (ConnectionResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/ConnectionsResponse.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/ConnectionsResponse.java deleted file mode 100644 index a4ca05dc480..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/ConnectionsResponse.java +++ /dev/null @@ -1,146 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetowner.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.ConnectionElement; - -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ConnectionsResponse is a response object for passing back a list of connection objects. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ConnectionsResponse extends AssetOwnerOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public ConnectionsResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ConnectionsResponse(ConnectionsResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return elementList; - } - } - - - /** - * Set up the list of metadata elements to return. - * - * @param elementList result object - */ - public void setElementList(List elementList) - { - this.elementList = elementList; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ConnectionsResponse{" + - "element=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ConnectionsResponse that = (ConnectionsResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/ConnectorTypeResponse.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/ConnectorTypeResponse.java deleted file mode 100644 index e90545261ca..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/ConnectorTypeResponse.java +++ /dev/null @@ -1,134 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetowner.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.ConnectorTypeElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ConnectorReportResponse is a response object for passing back a single connector type object. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ConnectorTypeResponse extends AssetOwnerOMASAPIResponse -{ - private ConnectorTypeElement element = null; - - - /** - * Default constructor - */ - public ConnectorTypeResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ConnectorTypeResponse(ConnectorTypeResponse template) - { - super(template); - - if (template != null) - { - element = template.getElement(); - } - } - - - /** - * Return the metadata element. - * - * @return result object - */ - public ConnectorTypeElement getElement() - { - return element; - } - - - /** - * Set up the metadata element to return. - * - * @param element result object - */ - public void setElement(ConnectorTypeElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ConnectorReportResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ConnectorTypeResponse that = (ConnectorTypeResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/ConnectorTypesResponse.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/ConnectorTypesResponse.java deleted file mode 100644 index e4b5c85fe2a..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/ConnectorTypesResponse.java +++ /dev/null @@ -1,146 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetowner.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.ConnectorTypeElement; - -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ConnectorTypesResponse is a response object for passing back a list of connector type objects. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ConnectorTypesResponse extends AssetOwnerOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public ConnectorTypesResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ConnectorTypesResponse(ConnectorTypesResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return elementList; - } - } - - - /** - * Set up the list of metadata elements to return. - * - * @param elementList result object - */ - public void setElementList(List elementList) - { - this.elementList = elementList; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ConnectorTypesResponse{" + - "element=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ConnectorTypesResponse that = (ConnectorTypesResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/EffectiveTimeQueryRequestBody.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/EffectiveTimeQueryRequestBody.java deleted file mode 100644 index 31d3dc4a385..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/EffectiveTimeQueryRequestBody.java +++ /dev/null @@ -1,124 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Date; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * EffectiveTimeQueryRequestBody carries the date/time for a query. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class EffectiveTimeQueryRequestBody extends AssetOwnerOMASAPIRequestBody -{ - private Date effectiveTime = null; - - - /** - * Default constructor - */ - public EffectiveTimeQueryRequestBody() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public EffectiveTimeQueryRequestBody(EffectiveTimeQueryRequestBody template) - { - super(template); - - if (template != null) - { - effectiveTime = template.getEffectiveTime(); - } - } - - - /** - * Return the date/time to use for the query. - * - * @return date object - */ - public Date getEffectiveTime() - { - return effectiveTime; - } - - - /** - * Set up the date/time to use for the query. - * - * @param effectiveTime date object - */ - public void setEffectiveTime(Date effectiveTime) - { - this.effectiveTime = effectiveTime; - } - - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "EffectiveTimeQueryRequestBody{" + - "effectiveTime=" + effectiveTime + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - EffectiveTimeQueryRequestBody that = (EffectiveTimeQueryRequestBody) objectToCompare; - return Objects.equals(effectiveTime, that.effectiveTime); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), effectiveTime); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/ElementHeaderResponse.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/ElementHeaderResponse.java deleted file mode 100644 index 92437464d62..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/ElementHeaderResponse.java +++ /dev/null @@ -1,137 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetowner.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * ElementHeaderResponse is the response structure used on the OMAS REST API calls that return the header - * for a element. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ElementHeaderResponse extends AssetOwnerOMASAPIResponse -{ - private ElementHeader element = null; - - - /** - * Default constructor - */ - public ElementHeaderResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ElementHeaderResponse(ElementHeaderResponse template) - { - super(template); - - if (template != null) - { - this.element = template.getElement(); - } - } - - - /** - * Return the element result. - * - * @return bean - */ - public ElementHeader getElement() - { - return element; - } - - - /** - * Set up the element result. - * - * @param element bean - */ - public void setElement(ElementHeader element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ElementHeaderResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof ElementHeaderResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ElementHeaderResponse that = (ElementHeaderResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(element); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/ElementStubListResponse.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/ElementStubListResponse.java deleted file mode 100644 index 08e996e967c..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/ElementStubListResponse.java +++ /dev/null @@ -1,149 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * ElementStubListResponse is the response structure used on the OMAS REST API calls that return a - * list of element identifiers as a response. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ElementStubListResponse extends AssetOwnerOMASAPIResponse -{ - private List elements = null; - - - /** - * Default constructor - */ - public ElementStubListResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ElementStubListResponse(ElementStubListResponse template) - { - super(template); - - if (template != null) - { - this.elements = template.getElements(); - } - } - - - /** - * Return the list of element identifiers. - * - * @return list of objects or null - */ - public List getElements() - { - if (elements == null) - { - return null; - } - else if (elements.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elements); - } - } - - - /** - * Set up the list of element identifiers. - * - * @param elements - list of objects or null - */ - public void setElements(List elements) - { - this.elements = elements; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ElementStubListResponse{" + - "elements=" + elements + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof ElementStubListResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ElementStubListResponse that = (ElementStubListResponse) objectToCompare; - return Objects.equals(this.getElements(), that.getElements()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(elements, super.hashCode()); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/EmbeddedConnectionRequestBody.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/EmbeddedConnectionRequestBody.java deleted file mode 100644 index b6abefb0064..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/EmbeddedConnectionRequestBody.java +++ /dev/null @@ -1,184 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.rest; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * The EmbeddedConnection is used within a VirtualConnection to link to the embedded connections. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class EmbeddedConnectionRequestBody -{ - protected int position = 0; - protected String displayName = null; - protected Map arguments = null; - - - /** - * Default constructor - */ - public EmbeddedConnectionRequestBody() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template element to copy - */ - public EmbeddedConnectionRequestBody(EmbeddedConnectionRequestBody template) - { - if (template != null) - { - position = template.getPosition(); - displayName = template.getDisplayName(); - arguments = template.getArguments(); - } - } - - - /** - * Return the position that this connector is in the list of embedded connectors. - * - * @return int - */ - public int getPosition() - { - return position; - } - - - /** - * Set up the position that this connector is in the list of embedded connectors. - * - * @param position int - */ - public void setPosition(int position) - { - this.position = position; - } - - - /** - * Return the printable name of the embedded connection. - * - * @return String name - */ - public String getDisplayName() - { - return displayName; - } - - - /** - * Set up the printable name of the embedded connection. - * - * @param displayName String name - */ - public void setDisplayName(String displayName) - { - this.displayName = displayName; - } - - - /** - * Return the arguments for the embedded connection. - * - * @return property map - */ - public Map getArguments() - { - if (arguments == null) - { - return null; - } - else if (arguments.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(arguments); - } - } - - - /** - * Set up the arguments for the embedded connection. - * - * @param arguments property map - */ - public void setArguments(Map arguments) - { - this.arguments = arguments; - } - - - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "EmbeddedConnection{" + - "position=" + position + - ", displayName='" + displayName + '\'' + - ", arguments=" + arguments + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - EmbeddedConnectionRequestBody that = (EmbeddedConnectionRequestBody) objectToCompare; - return position == that.position && - Objects.equals(displayName, that.displayName) && - Objects.equals(arguments, that.arguments); - } - - - /** - * Create a hash code for this element type. - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(position, displayName, arguments); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/EndpointResponse.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/EndpointResponse.java deleted file mode 100644 index 46a174d5584..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/EndpointResponse.java +++ /dev/null @@ -1,134 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetowner.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.EndpointElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * EndpointResponse is a response object for passing back a single endpoint object. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class EndpointResponse extends AssetOwnerOMASAPIResponse -{ - private EndpointElement element = null; - - - /** - * Default constructor - */ - public EndpointResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public EndpointResponse(EndpointResponse template) - { - super(template); - - if (template != null) - { - element = template.getElement(); - } - } - - - /** - * Return the metadata element. - * - * @return result object - */ - public EndpointElement getElement() - { - return element; - } - - - /** - * Set up the metadata element to return. - * - * @param element result object - */ - public void setElement(EndpointElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "EndpointResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - EndpointResponse that = (EndpointResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/EndpointsResponse.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/EndpointsResponse.java deleted file mode 100644 index fdb649b5859..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/EndpointsResponse.java +++ /dev/null @@ -1,146 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetowner.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.EndpointElement; - -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * EndpointsResponse is a response object for passing back a list of endpoint objects. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class EndpointsResponse extends AssetOwnerOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public EndpointsResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public EndpointsResponse(EndpointsResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return elementList; - } - } - - - /** - * Set up the list of metadata elements to return. - * - * @param elementList result object - */ - public void setElementList(List elementList) - { - this.elementList = elementList; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "EndpointsResponse{" + - "element=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - EndpointsResponse that = (EndpointsResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/ExternalReferenceIdRequestBody.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/ExternalReferenceIdRequestBody.java deleted file mode 100644 index 71d68a65056..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/ExternalReferenceIdRequestBody.java +++ /dev/null @@ -1,122 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ExternalReferenceIdRequestBody provides a structure for the unique external reference identifier. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ExternalReferenceIdRequestBody extends AssetOwnerOMASAPIRequestBody -{ - private String referenceId = null; - - - /** - * Default constructor - */ - public ExternalReferenceIdRequestBody() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ExternalReferenceIdRequestBody(ExternalReferenceIdRequestBody template) - { - super(template); - - if (template != null) - { - this.referenceId = template.getReferenceId(); - } - } - - - /** - * Return the unique identifier for the certificate from the certificate authority. - * - * @return String identifier - */ - public String getReferenceId() - { - return referenceId; - } - - - /** - * Set up the unique identifier for the certificate from the certificate authority. - * - * @param referenceId String identifier - */ - public void setReferenceId(String referenceId) - { - this.referenceId = referenceId; - } - - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "CertificateIdRequestBody{" + - "referenceId='" + referenceId + '\'' + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ExternalReferenceIdRequestBody that = (ExternalReferenceIdRequestBody) objectToCompare; - return Objects.equals(referenceId, that.referenceId); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(referenceId); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/ExternalReferenceListResponse.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/ExternalReferenceListResponse.java deleted file mode 100644 index b7967a04d10..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/ExternalReferenceListResponse.java +++ /dev/null @@ -1,149 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.ExternalReferenceElement; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * ExternalReferenceListResponse is the response structure used on the OMAS REST API calls that return a - * list of external references as a response. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ExternalReferenceListResponse extends AssetOwnerOMASAPIResponse -{ - private List elements = null; - - - /** - * Default constructor - */ - public ExternalReferenceListResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ExternalReferenceListResponse(ExternalReferenceListResponse template) - { - super(template); - - if (template != null) - { - this.elements = template.getElements(); - } - } - - - /** - * Return the list of external references. - * - * @return list of objects or null - */ - public List getElements() - { - if (elements == null) - { - return null; - } - else if (elements.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elements); - } - } - - - /** - * Set up the list of external references. - * - * @param elements - list of objects or null - */ - public void setElements(List elements) - { - this.elements = elements; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ExternalReferenceListResponse{" + - "elements=" + elements + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof ExternalReferenceListResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ExternalReferenceListResponse that = (ExternalReferenceListResponse) objectToCompare; - return Objects.equals(this.getElements(), that.getElements()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(elements, super.hashCode()); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/ExternalReferenceRequestBody.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/ExternalReferenceRequestBody.java deleted file mode 100644 index 7bbaaea7d5c..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/ExternalReferenceRequestBody.java +++ /dev/null @@ -1,148 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetowner.properties.ExternalReferenceProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ExternalReferenceRequestBody provides a structure for a new ExternalReference. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ExternalReferenceRequestBody extends AssetOwnerOMASAPIRequestBody -{ - private String anchorGUID = null; - private ExternalReferenceProperties properties = null; - - - /** - * Default constructor - */ - public ExternalReferenceRequestBody() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ExternalReferenceRequestBody(ExternalReferenceRequestBody template) - { - super(template); - - if (template != null) - { - this.anchorGUID = template.getAnchorGUID(); - this.properties = template.getProperties(); - } - } - - - /** - * Return the optional anchor unique identifier. - * - * @return String guid - */ - public String getAnchorGUID() - { - return anchorGUID; - } - - - /** - * Set up the optional anchor unique identifier. - * - * @param guid String guid - */ - public void setAnchorGUID(String guid) - { - this.anchorGUID = guid; - } - - - /** - * Return the properties for this external reference. - * - * @return date - */ - public ExternalReferenceProperties getProperties() - { - return properties; - } - - - /** - * Set up the properties for this external reference. - * - * @param properties date - */ - public void setProperties(ExternalReferenceProperties properties) - { - this.properties = properties; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "ExternalReferenceRequestBody{" + - "anchorGUID='" + anchorGUID + '\'' + - ", properties=" + properties + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ExternalReferenceRequestBody that = (ExternalReferenceRequestBody) objectToCompare; - return Objects.equals(anchorGUID, that.anchorGUID) && - Objects.equals(properties, that.properties); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(anchorGUID, properties); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/ExternalReferenceResponse.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/ExternalReferenceResponse.java deleted file mode 100644 index 2ba5a1208e2..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/ExternalReferenceResponse.java +++ /dev/null @@ -1,136 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.ExternalReferenceElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * ExternalReferenceResponse is the response structure used on the OMAS REST API calls that returns a - * external reference object as a response. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ExternalReferenceResponse extends AssetOwnerOMASAPIResponse -{ - private ExternalReferenceElement element = null; - - - /** - * Default constructor - */ - public ExternalReferenceResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ExternalReferenceResponse(ExternalReferenceResponse template) - { - super(template); - - if (template != null) - { - this.element = template.getElement(); - } - } - - - /** - * Return the element result. - * - * @return external reference object - */ - public ExternalReferenceElement getElement() - { - return element; - } - - - /** - * Set up the element result. - * - * @param element external reference object - */ - public void setElement(ExternalReferenceElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ExternalReferenceResponse{" + - "element='" + getElement() + '\'' + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof ExternalReferenceResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ExternalReferenceResponse that = (ExternalReferenceResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/ExternalSourceRequestBody.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/ExternalSourceRequestBody.java deleted file mode 100644 index a1464074cdd..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/ExternalSourceRequestBody.java +++ /dev/null @@ -1,143 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ExternalSourceRequestBody carries the parameters for marking an asset or schema as external. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ExternalSourceRequestBody extends AssetOwnerOMASAPIRequestBody -{ - private String externalSourceGUID = null; - private String externalSourceName = null; - - - /** - * Default constructor - */ - public ExternalSourceRequestBody() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ExternalSourceRequestBody(ExternalSourceRequestBody template) - { - super(template); - - if (template != null) - { - externalSourceGUID = template.getExternalSourceGUID(); - externalSourceName = template.getExternalSourceName(); - } - } - - - /** - * Return the unique identifier of the software server capability entity that represented the external source - null for local. - * - * @return string guid - */ - public String getExternalSourceGUID() - { - return externalSourceGUID; - } - - - /** - * Set up the unique identifier of the software server capability entity that represented the external source - null for local. - * - * @param externalSourceGUID string guid - */ - public void setExternalSourceGUID(String externalSourceGUID) - { - this.externalSourceGUID = externalSourceGUID; - } - - - /** - * Return the unique name of the software server capability entity that represented the external source. - * - * @return string name - */ - public String getExternalSourceName() - { - return externalSourceName; - } - - - /** - * Set up the unique name of the software server capability entity that represented the external source. - * - * @param externalSourceName string name - */ - public void setExternalSourceName(String externalSourceName) - { - this.externalSourceName = externalSourceName; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ExternalSourceRequestBody{" + - "externalSourceGUID='" + externalSourceGUID + '\'' + - ", externalSourceName='" + externalSourceName + '\'' + - '}'; - } - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ExternalSourceRequestBody that = (ExternalSourceRequestBody) objectToCompare; - return Objects.equals(externalSourceGUID, that.externalSourceGUID) && - Objects.equals(externalSourceName, that.externalSourceName); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), externalSourceGUID, externalSourceName); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/FileSystemResponse.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/FileSystemResponse.java deleted file mode 100644 index f04dadb58fd..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/FileSystemResponse.java +++ /dev/null @@ -1,138 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetowner.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.FileSystemElement; -import org.odpi.openmetadata.accessservices.assetowner.properties.FileSystemProperties; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * FileSystemResponse is the response structure used on the OMAS REST API calls that return the properties - * for a file system. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class FileSystemResponse extends AssetOwnerOMASAPIResponse -{ - private FileSystemElement fileSystem = null; - - - /** - * Default constructor - */ - public FileSystemResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public FileSystemResponse(FileSystemResponse template) - { - super(template); - - if (template != null) - { - this.fileSystem = template.getFileSystem(); - } - } - - - /** - * Return the fileSystem result. - * - * @return bean - */ - public FileSystemElement getFileSystem() - { - return fileSystem; - } - - - /** - * Set up the fileSystem result. - * - * @param fileSystem - bean - */ - public void setFileSystem(FileSystemElement fileSystem) - { - this.fileSystem = fileSystem; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "FileSystemResponse{" + - "fileSystem=" + fileSystem + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof FileSystemResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - FileSystemResponse that = (FileSystemResponse) objectToCompare; - return Objects.equals(fileSystem, that.fileSystem); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(fileSystem); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/FolderResponse.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/FolderResponse.java deleted file mode 100644 index ff8b572c6c8..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/FolderResponse.java +++ /dev/null @@ -1,137 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetowner.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.FolderElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * FolderResponse is the response structure used on the OMAS REST API calls that return the properties - * for a folder. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class FolderResponse extends AssetOwnerOMASAPIResponse -{ - private FolderElement folder = null; - - - /** - * Default constructor - */ - public FolderResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public FolderResponse(FolderResponse template) - { - super(template); - - if (template != null) - { - this.folder = template.getFolder(); - } - } - - - /** - * Return the folder result. - * - * @return bean - */ - public FolderElement getFolder() - { - return folder; - } - - - /** - * Set up the folder result. - * - * @param folder - bean - */ - public void setFolder(FolderElement folder) - { - this.folder = folder; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "FolderResponse{" + - "folder=" + folder + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof FolderResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - FolderResponse that = (FolderResponse) objectToCompare; - return Objects.equals(folder, that.folder); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(folder); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/LicenseIdRequestBody.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/LicenseIdRequestBody.java deleted file mode 100644 index c056eb3322b..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/LicenseIdRequestBody.java +++ /dev/null @@ -1,122 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * LicenseIdRequestBody provides a structure for the unique certificate identifier. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class LicenseIdRequestBody extends AssetOwnerOMASAPIRequestBody -{ - private String licenseId = null; - - - /** - * Default constructor - */ - public LicenseIdRequestBody() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public LicenseIdRequestBody(LicenseIdRequestBody template) - { - super(template); - - if (template != null) - { - this.licenseId = template.getLicenseId(); - } - } - - - /** - * Return the unique identifier for the license. - * - * @return String identifier - */ - public String getLicenseId() - { - return licenseId; - } - - - /** - * Set up the unique identifier for the license. - * - * @param licenseId String identifier - */ - public void setLicenseId(String licenseId) - { - this.licenseId = licenseId; - } - - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "LicenseIdRequestBody{" + - "licenseId='" + licenseId + '\'' + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - LicenseIdRequestBody that = (LicenseIdRequestBody) objectToCompare; - return Objects.equals(licenseId, that.licenseId); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(licenseId); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/LicenseListResponse.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/LicenseListResponse.java deleted file mode 100644 index 3e424c173cc..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/LicenseListResponse.java +++ /dev/null @@ -1,149 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.LicenseElement; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * LicenseListResponse is the response structure used on the OMAS REST API calls that return a - * list of licenses as a response. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class LicenseListResponse extends AssetOwnerOMASAPIResponse -{ - private List elements = null; - - - /** - * Default constructor - */ - public LicenseListResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public LicenseListResponse(LicenseListResponse template) - { - super(template); - - if (template != null) - { - this.elements = template.getElements(); - } - } - - - /** - * Return the list of license types. - * - * @return list of objects or null - */ - public List getElements() - { - if (elements == null) - { - return null; - } - else if (elements.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elements); - } - } - - - /** - * Set up the list of license types. - * - * @param elements - list of objects or null - */ - public void setElements(List elements) - { - this.elements = elements; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "LicenseListResponse{" + - "elements=" + elements + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof LicenseListResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - LicenseListResponse that = (LicenseListResponse) objectToCompare; - return Objects.equals(this.getElements(), that.getElements()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(elements, super.hashCode()); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/LicenseTypeListResponse.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/LicenseTypeListResponse.java deleted file mode 100644 index 1fb50fbb10c..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/LicenseTypeListResponse.java +++ /dev/null @@ -1,149 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.LicenseTypeElement; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * LicenseTypeListResponse is the response structure used on the OMAS REST API calls that return a - * list of license types as a response. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class LicenseTypeListResponse extends AssetOwnerOMASAPIResponse -{ - private List elements = null; - - - /** - * Default constructor - */ - public LicenseTypeListResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public LicenseTypeListResponse(LicenseTypeListResponse template) - { - super(template); - - if (template != null) - { - this.elements = template.getElements(); - } - } - - - /** - * Return the list of license types. - * - * @return list of objects or null - */ - public List getElements() - { - if (elements == null) - { - return null; - } - else if (elements.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elements); - } - } - - - /** - * Set up the list of license types. - * - * @param elements - list of objects or null - */ - public void setElements(List elements) - { - this.elements = elements; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "LicenseTypeListResponse{" + - "elements=" + elements + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof LicenseTypeListResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - LicenseTypeListResponse that = (LicenseTypeListResponse) objectToCompare; - return Objects.equals(this.getElements(), that.getElements()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(elements, super.hashCode()); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/LicenseTypeRequestBody.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/LicenseTypeRequestBody.java deleted file mode 100644 index 65bb250a5aa..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/LicenseTypeRequestBody.java +++ /dev/null @@ -1,145 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetowner.properties.GovernanceDefinitionStatus; -import org.odpi.openmetadata.accessservices.assetowner.properties.LicenseTypeProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * LicenseTypeRequestBody provides a structure used when creating license types. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class LicenseTypeRequestBody extends AssetOwnerOMASAPIRequestBody -{ - private LicenseTypeProperties properties = null; - private GovernanceDefinitionStatus initialStatus = null; - - - /** - * Default constructor - */ - public LicenseTypeRequestBody() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public LicenseTypeRequestBody(LicenseTypeRequestBody template) - { - super(template); - - if (template != null) - { - this.properties = template.getProperties(); - this.initialStatus = template.getInitialStatus(); - } - } - - - /** - * Return the properties of the license type. - * - * @return properties - */ - public LicenseTypeProperties getProperties() - { - return properties; - } - - - /** - * Set up the properties of the license type. - * - * @param properties properties - */ - public void setProperties(LicenseTypeProperties properties) - { - this.properties = properties; - } - - - /** - * Return the initial status of the license type. - * - * @return instance status - */ - public GovernanceDefinitionStatus getInitialStatus() - { - return initialStatus; - } - - - /** - * Set up the initial status of the license type. - * - * @param initialStatus instance status - */ - public void setInitialStatus(GovernanceDefinitionStatus initialStatus) - { - this.initialStatus = initialStatus; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "LicenseTypeRequestBody{" + - "properties=" + properties + - ", initialStatus=" + initialStatus + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - LicenseTypeRequestBody that = (LicenseTypeRequestBody) objectToCompare; - return Objects.equals(properties, that.properties) && - initialStatus == that.initialStatus; - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(properties, initialStatus); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/LicenseTypeResponse.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/LicenseTypeResponse.java deleted file mode 100644 index bb79aba546a..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/LicenseTypeResponse.java +++ /dev/null @@ -1,136 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.LicenseTypeElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * LicenseTypeResponse is the response structure used on the OMAS REST API calls that returns a - * license type object as a response. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class LicenseTypeResponse extends AssetOwnerOMASAPIResponse -{ - private LicenseTypeElement element = null; - - - /** - * Default constructor - */ - public LicenseTypeResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public LicenseTypeResponse(LicenseTypeResponse template) - { - super(template); - - if (template != null) - { - this.element = template.getElement(); - } - } - - - /** - * Return the element result. - * - * @return LicenseTypeProperties object - */ - public LicenseTypeElement getElement() - { - return element; - } - - - /** - * Set up the element result. - * - * @param element LicenseTypeProperties object - */ - public void setElement(LicenseTypeElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "LicenseTypeResponse{" + - "element='" + getElement() + '\'' + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof LicenseTypeResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - LicenseTypeResponse that = (LicenseTypeResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/PagedResponse.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/PagedResponse.java deleted file mode 100644 index 32faa3900bd..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/PagedResponse.java +++ /dev/null @@ -1,140 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.rest; - -import com.fasterxml.jackson.annotation.*; -import org.odpi.openmetadata.commonservices.ffdc.rest.FFDCResponseBase; - - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * PagedResponse is used for responses that can contain paged responses - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes( - { - @JsonSubTypes.Type(value = AssetElementsResponse.class, name = "AssetElementsResponse"), - @JsonSubTypes.Type(value = AnnotationListResponse.class, name = "AnnotationListResponse") - }) -public class PagedResponse extends FFDCResponseBase -{ - private int startingFromElement = 0; - - /** - * Default constructor - */ - public PagedResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public PagedResponse(PagedResponse template) - { - super(template); - - if (template != null) - { - this.startingFromElement = template.getStartingFromElement(); - } - } - - - /** - * Return the starting element number from the server side list that this response contains. - * - * @return int - */ - public int getStartingFromElement() - { - return startingFromElement; - } - - - /** - * Set up the starting element number from the server side list that this response contains. - * - * @param startingFromElement int - */ - public void setStartingFromElement(int startingFromElement) - { - this.startingFromElement = startingFromElement; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "PagedResponse{" + - "startingFromElement=" + startingFromElement + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - PagedResponse that = (PagedResponse) objectToCompare; - return getStartingFromElement() == that.getStartingFromElement(); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), getStartingFromElement()); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/PathNameRequestBody.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/PathNameRequestBody.java deleted file mode 100644 index 4a0ef34a9cb..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/PathNameRequestBody.java +++ /dev/null @@ -1,115 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.rest; - -import com.fasterxml.jackson.annotation.*; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * PathNameRequestBody carries the parameters for creating a new FolderProperties asset. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class PathNameRequestBody extends AssetOwnerOMASAPIRequestBody -{ - private String fullPath = null; - - - /** - * Default constructor - */ - public PathNameRequestBody() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public PathNameRequestBody(PathNameRequestBody template) - { - super(template); - - if (template != null) - { - fullPath = template.getFullPath(); - } - } - - - /** - * Return the full path of the file - this should be unique. - * - * @return string name - */ - public String getFullPath() - { - return fullPath; - } - - - /** - * Set up the full path of the file - this should be unique. - * - * @param fullPath string name - */ - public void setFullPath(String fullPath) - { - this.fullPath = fullPath; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "PathNameRequestBody{" + - ", fullPath='" + fullPath + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - PathNameRequestBody that = (PathNameRequestBody) objectToCompare; - return Objects.equals(getFullPath(), that.getFullPath()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(getFullPath()); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/ReferenceableRequestBody.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/ReferenceableRequestBody.java deleted file mode 100644 index 68ec91b524e..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/ReferenceableRequestBody.java +++ /dev/null @@ -1,156 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetowner.rest; - -import com.fasterxml.jackson.annotation.*; -import org.odpi.openmetadata.accessservices.assetowner.properties.ReferenceableProperties; - -import java.util.*; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ReferenceableRequestBody provides a structure for passing a referenceables' properties as a request body over a REST API. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes( - { - @JsonSubTypes.Type(value = ValidValuesRequestBody.class, name = "ValidValuesRequestBody") - }) -public class ReferenceableRequestBody extends AssetOwnerOMASAPIRequestBody -{ - private String anchorGUID = null; - private ReferenceableProperties properties = null; - - - - /** - * Default constructor - */ - public ReferenceableRequestBody() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ReferenceableRequestBody(ReferenceableRequestBody template) - { - super(template); - - if (template != null) - { - anchorGUID = template.getAnchorGUID(); - properties = template.getProperties(); - } - } - - - - /** - * Return the properties for the relationship. - * - * @return properties object - */ - public ReferenceableProperties getProperties() - { - return properties; - } - - - /** - * Set up the properties for the relationship. - * - * @param properties properties object - */ - public void setProperties(ReferenceableProperties properties) - { - this.properties = properties; - } - - - /** - * Return an optional anchor GUID to attach the new element to. - * - * @return guid - */ - public String getAnchorGUID() - { - return anchorGUID; - } - - - /** - * Set up an optional anchor GUID to attach the new element to. - * - * @param anchorGUID guid - */ - public void setAnchorGUID(String anchorGUID) - { - this.anchorGUID = anchorGUID; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "ReferenceableRequestBody{" + - "anchorGUID='" + anchorGUID + '\'' + - ", properties=" + properties + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (! (objectToCompare instanceof ReferenceableRequestBody)) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - ReferenceableRequestBody that = (ReferenceableRequestBody) objectToCompare; - return Objects.equals(anchorGUID, that.anchorGUID) && Objects.equals(properties, that.properties); - } - - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), anchorGUID, properties); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/RelatedElementListResponse.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/RelatedElementListResponse.java deleted file mode 100644 index 239fcad2de6..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/RelatedElementListResponse.java +++ /dev/null @@ -1,146 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetowner.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.RelatedElement; - -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * RelatedElementListResponse is a response object for passing back a list of relatedElement objects. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class RelatedElementListResponse extends AssetOwnerOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public RelatedElementListResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public RelatedElementListResponse(RelatedElementListResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return elementList; - } - } - - - /** - * Set up the list of metadata elements to return. - * - * @param elements result object - */ - public void setElementList(List elements) - { - this.elementList = elements; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "RelatedElementListResponse{" + - "element=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - RelatedElementListResponse that = (RelatedElementListResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/RelationshipElementResponse.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/RelationshipElementResponse.java deleted file mode 100644 index ba6e08498f3..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/RelationshipElementResponse.java +++ /dev/null @@ -1,137 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetowner.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.RelationshipElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * RelationshipElementResponse is the response structure used on the OMAS REST API calls that return the properties - * for a relationship. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class RelationshipElementResponse extends AssetOwnerOMASAPIResponse -{ - private RelationshipElement element = null; - - - /** - * Default constructor - */ - public RelationshipElementResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public RelationshipElementResponse(RelationshipElementResponse template) - { - super(template); - - if (template != null) - { - this.element = template.getElement(); - } - } - - - /** - * Return the element result. - * - * @return bean - */ - public RelationshipElement getElement() - { - return element; - } - - - /** - * Set up the element result. - * - * @param element bean - */ - public void setElement(RelationshipElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "RelationshipElementResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof RelationshipElementResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - RelationshipElementResponse that = (RelationshipElementResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(element); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/RelationshipElementsResponse.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/RelationshipElementsResponse.java deleted file mode 100644 index 2c74d9e970a..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/RelationshipElementsResponse.java +++ /dev/null @@ -1,149 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetowner.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.RelationshipElement; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * RelationshipElementsResponse is a response object for passing back a list of relationships - * or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class RelationshipElementsResponse extends AssetOwnerOMASAPIResponse -{ - - private List elementList = null; - - - /** - * Default constructor - */ - public RelationshipElementsResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public RelationshipElementsResponse(RelationshipElementsResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elementList); - } - } - - - /** - * Set up the metadata element to return. - * - * @param elementList result object - */ - public void setElementList(List elementList) - { - this.elementList = elementList; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "RelationshipElementsResponse{" + - "elementList=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - RelationshipElementsResponse that = (RelationshipElementsResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/RelationshipRequestBody.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/RelationshipRequestBody.java deleted file mode 100644 index 30b3b9ea588..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/RelationshipRequestBody.java +++ /dev/null @@ -1,151 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.rest; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetowner.properties.RelationshipProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * RelationshipRequestBody describes the request body used when linking elements together. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class RelationshipRequestBody extends EffectiveTimeQueryRequestBody -{ - private String relationshipName = null; - private RelationshipProperties properties = null; - - - /** - * Default constructor - */ - public RelationshipRequestBody() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public RelationshipRequestBody(RelationshipRequestBody template) - { - super(template); - - if (template != null) - { - relationshipName = template.getRelationshipName(); - properties = template.getProperties(); - } - } - - - /** - * Return the name of the relationship type. - * - * @return type name - */ - public String getRelationshipName() - { - return relationshipName; - } - - - /** - * Set up the name of the relationship type. - * - * @param relationshipName type name - */ - public void setRelationshipName(String relationshipName) - { - this.relationshipName = relationshipName; - } - - - /** - * Return the properties for the relationship. - * - * @return properties object - */ - public RelationshipProperties getProperties() - { - return properties; - } - - - /** - * Set up the properties for the relationship. - * - * @param properties properties object - */ - public void setProperties(RelationshipProperties properties) - { - this.properties = properties; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "RelationshipRequestBody{" + - "relationshipName='" + relationshipName + '\'' + - ", properties=" + properties + - ", effectiveTime=" + getEffectiveTime() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - RelationshipRequestBody that = (RelationshipRequestBody) objectToCompare; - return Objects.equals(getProperties(), that.getProperties()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), relationshipName, properties); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/SchemaAttributeElementResponse.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/SchemaAttributeElementResponse.java deleted file mode 100644 index 7f513bf4a26..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/SchemaAttributeElementResponse.java +++ /dev/null @@ -1,137 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetowner.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.SchemaAttributeElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * SchemaAttributeElementResponse is the response structure used on the OMAS REST API calls that return the properties - * for a element. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class SchemaAttributeElementResponse extends AssetOwnerOMASAPIResponse -{ - private SchemaAttributeElement element = null; - - - /** - * Default constructor - */ - public SchemaAttributeElementResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public SchemaAttributeElementResponse(SchemaAttributeElementResponse template) - { - super(template); - - if (template != null) - { - this.element = template.getElement(); - } - } - - - /** - * Return the element result. - * - * @return bean - */ - public SchemaAttributeElement getElement() - { - return element; - } - - - /** - * Set up the element result. - * - * @param element bean - */ - public void setElement(SchemaAttributeElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "SchemaAttributeElementResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof SchemaAttributeElementResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - SchemaAttributeElementResponse that = (SchemaAttributeElementResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(element); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/SchemaAttributeElementsResponse.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/SchemaAttributeElementsResponse.java deleted file mode 100644 index 993a1177430..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/SchemaAttributeElementsResponse.java +++ /dev/null @@ -1,147 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetowner.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.SchemaAttributeElement; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * SchemaAttributeElementsResponse is a response object for passing back a a list of glossaries - * or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class SchemaAttributeElementsResponse extends AssetOwnerOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public SchemaAttributeElementsResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public SchemaAttributeElementsResponse(SchemaAttributeElementsResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elementList); - } - } - - - /** - * Set up the metadata element to return. - * - * @param elementList result object - */ - public void setElementList(List elementList) - { - this.elementList = elementList; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "SchemaAttributeElementsResponse{" + - "elementList=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - SchemaAttributeElementsResponse that = (SchemaAttributeElementsResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/SchemaTypeElementResponse.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/SchemaTypeElementResponse.java deleted file mode 100644 index 3e425f46263..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/SchemaTypeElementResponse.java +++ /dev/null @@ -1,136 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetowner.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.SchemaTypeElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * SchemaTypeElementResponse is the response structure used on the OMAS REST API calls that return the properties for an element. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class SchemaTypeElementResponse extends AssetOwnerOMASAPIResponse -{ - private SchemaTypeElement element = null; - - - /** - * Default constructor - */ - public SchemaTypeElementResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public SchemaTypeElementResponse(SchemaTypeElementResponse template) - { - super(template); - - if (template != null) - { - this.element = template.getElement(); - } - } - - - /** - * Return the element result. - * - * @return bean - */ - public SchemaTypeElement getElement() - { - return element; - } - - - /** - * Set up the element result. - * - * @param element bean - */ - public void setElement(SchemaTypeElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "SchemaTypeElementResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof SchemaTypeElementResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - SchemaTypeElementResponse that = (SchemaTypeElementResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(element); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/SchemaTypeElementsResponse.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/SchemaTypeElementsResponse.java deleted file mode 100644 index d5dfe6896c5..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/SchemaTypeElementsResponse.java +++ /dev/null @@ -1,146 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetowner.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.SchemaTypeElement; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * SchemaTypeElementsResponse is a response object for passing back a list of elements or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class SchemaTypeElementsResponse extends AssetOwnerOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public SchemaTypeElementsResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public SchemaTypeElementsResponse(SchemaTypeElementsResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elementList); - } - } - - - /** - * Set up the metadata element to return. - * - * @param elementList result object - */ - public void setElementList(List elementList) - { - this.elementList = elementList; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "SchemaTypeElementsResponse{" + - "elementList=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - SchemaTypeElementsResponse that = (SchemaTypeElementsResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/StatusRequestBody.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/StatusRequestBody.java deleted file mode 100644 index b13c557ca06..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/StatusRequestBody.java +++ /dev/null @@ -1,122 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetowner.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.surveyaction.properties.AnnotationStatus; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * StatusRequestBody provides a structure for passing the annotation status of an Annotation. This value is used to - * restrict the values that are returned. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class StatusRequestBody extends AssetOwnerOMASAPIRequestBody -{ - private AnnotationStatus annotationStatus = null; - - - /** - * Default constructor - */ - public StatusRequestBody() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public StatusRequestBody(StatusRequestBody template) - { - super(template); - - if (template != null) - { - annotationStatus = template.getAnnotationStatus(); - } - } - - - /** - * Set up the fully qualified name. - * - * @param annotationStatus String name - */ - public void setAnnotationStatus(AnnotationStatus annotationStatus) - { - this.annotationStatus = annotationStatus; - } - - - /** - * Returns the stored qualified name property for the metadata entity. - * If no qualified name is available then the empty string is returned. - * - * @return annotationStatus - */ - public AnnotationStatus getAnnotationStatus() - { - return annotationStatus; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "StatusRequestBody{" + - "qualifiedName='" + annotationStatus + '\'' + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - StatusRequestBody that = (StatusRequestBody) objectToCompare; - return Objects.equals(getAnnotationStatus(), that.getAnnotationStatus()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(getAnnotationStatus()); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/SurveyReportListResponse.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/SurveyReportListResponse.java deleted file mode 100644 index 6866063f248..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/SurveyReportListResponse.java +++ /dev/null @@ -1,144 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetowner.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.surveyaction.properties.SurveyReport; - -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * SurveyReportListResponse is the response structure used on OMAS REST API calls that return a - * list of SurveyReport properties objects as a response. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class SurveyReportListResponse extends AssetOwnerOMASAPIResponse -{ - private List surveyReports = null; - - /** - * Default constructor - */ - public SurveyReportListResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public SurveyReportListResponse(SurveyReportListResponse template) - { - super(template); - - if (template != null) - { - this.surveyReports = template.getSurveyReports(); - } - } - - - /** - * Return the properties objects. - * - * @return list of properties objects - */ - public List getSurveyReports() - { - if (surveyReports == null) - { - return null; - } - else - { - return surveyReports; - } - } - - - /** - * Set up the properties objects. - * - * @param surveyReports list of properties objects - */ - public void setSurveyReports(List surveyReports) - { - this.surveyReports = surveyReports; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "SurveyReportListResponse{" + - "discoveryAnalysisReports=" + surveyReports + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - SurveyReportListResponse that = (SurveyReportListResponse) objectToCompare; - return Objects.equals(getSurveyReports(), that.getSurveyReports()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), getSurveyReports()); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/TemplateRequestBody.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/TemplateRequestBody.java index 02d01dc904c..66a5b1cfca4 100644 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/TemplateRequestBody.java +++ b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/TemplateRequestBody.java @@ -7,6 +7,7 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import org.odpi.openmetadata.accessservices.assetowner.properties.TemplateProperties; +import org.odpi.openmetadata.commonservices.ffdc.rest.UpdateRequestBody; import java.util.Objects; diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/ValidValueResponse.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/ValidValueResponse.java deleted file mode 100644 index 6c73de30c33..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/ValidValueResponse.java +++ /dev/null @@ -1,134 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetowner.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.ValidValueElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ValidValueResponse is a response object for passing back a single valid value object. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ValidValueResponse extends AssetOwnerOMASAPIResponse -{ - private ValidValueElement element = null; - - - /** - * Default constructor - */ - public ValidValueResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ValidValueResponse(ValidValueResponse template) - { - super(template); - - if (template != null) - { - element = template.getElement(); - } - } - - - /** - * Return the metadata element. - * - * @return result object - */ - public ValidValueElement getElement() - { - return element; - } - - - /** - * Set up the metadata element to return. - * - * @param element result object - */ - public void setElement(ValidValueElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ValidValueResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ValidValueResponse that = (ValidValueResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/ValidValuesResponse.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/ValidValuesResponse.java deleted file mode 100644 index 004d5981125..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/ValidValuesResponse.java +++ /dev/null @@ -1,146 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.assetowner.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.ValidValueElement; - -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ValidValuesResponse is a response object for passing back a list of valid value objects. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ValidValuesResponse extends AssetOwnerOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public ValidValuesResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ValidValuesResponse(ValidValuesResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return elementList; - } - } - - - /** - * Set up the list of metadata elements to return. - * - * @param elementList result object - */ - public void setElementList(List elementList) - { - this.elementList = elementList; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ValidValuesResponse{" + - "element=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ValidValuesResponse that = (ValidValuesResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/package-info.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/package-info.java index 584d53878a1..2caff110e72 100644 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/package-info.java +++ b/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/package-info.java @@ -3,10 +3,8 @@ /** * This package defines the beans used to build the REST request and response payloads. - * * REST APIs can pass parameters in their URLs (called path variables) as well has having a RequestBody bean * for additional, more complex, or optional parameters. Responses are returned in response beans. - * * The response beans encode the return type of the method as well as any exceptions and associated messages. */ package org.odpi.openmetadata.accessservices.assetowner.rest; diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-client/src/main/java/org/odpi/openmetadata/accessservices/assetowner/client/AssetCertificationManager.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-client/src/main/java/org/odpi/openmetadata/accessservices/assetowner/client/AssetCertificationManager.java index 11c64b07645..80eb1740b2c 100644 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-client/src/main/java/org/odpi/openmetadata/accessservices/assetowner/client/AssetCertificationManager.java +++ b/open-metadata-implementation/access-services/asset-owner/asset-owner-client/src/main/java/org/odpi/openmetadata/accessservices/assetowner/client/AssetCertificationManager.java @@ -4,17 +4,17 @@ import org.odpi.openmetadata.accessservices.assetowner.api.AssetCertificationInterface; import org.odpi.openmetadata.accessservices.assetowner.client.rest.AssetOwnerRESTClient; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.CertificationTypeElement; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.RelatedElement; -import org.odpi.openmetadata.accessservices.assetowner.properties.CertificationProperties; -import org.odpi.openmetadata.accessservices.assetowner.rest.CertificationTypeListResponse; -import org.odpi.openmetadata.accessservices.assetowner.rest.CertificationTypeResponse; -import org.odpi.openmetadata.accessservices.assetowner.rest.RelatedElementListResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.CertificationTypeResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.CertificationTypesResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.RelatedElementsResponse; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.CertificationTypeElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.RelatedElement; import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.CertificationProperties; import java.util.List; @@ -232,13 +232,13 @@ public List getCertificationTypesByTitle(String userId requestBody.setSearchString(title); requestBody.setSearchStringParameterName(titleParameterName); - CertificationTypeListResponse restResult = restClient.callCertificationTypeListPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - startFrom, - queryPageSize); + CertificationTypesResponse restResult = restClient.callCertificationTypeListPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + startFrom, + queryPageSize); return restResult.getElements(); } @@ -273,13 +273,13 @@ public List getCertificationTypeByDomainId(String user invalidParameterHandler.validateUserId(userId, methodName); int queryPageSize = invalidParameterHandler.validatePaging(startFrom, pageSize, methodName); - CertificationTypeListResponse restResult = restClient.callCertificationTypeListGetRESTCall(methodName, - urlTemplate, - serverName, - userId, - domainIdentifier, - startFrom, - queryPageSize); + CertificationTypesResponse restResult = restClient.callCertificationTypeListGetRESTCall(methodName, + urlTemplate, + serverName, + userId, + domainIdentifier, + startFrom, + queryPageSize); return restResult.getElements(); } @@ -344,9 +344,9 @@ public String certifyElement(String userId, public void updateCertification(String userId, String certificationGUID, boolean isMergeUpdate, - CertificationProperties properties) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException + CertificationProperties properties) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException { final String methodName = "updateCertification"; final String urlTemplate = serverPlatformURLRoot + "/servers/{0}/open-metadata/access-services/asset-owner/users/{1}/certifications/{2}/update?isMergeUpdate={3}"; @@ -456,14 +456,14 @@ public List getCertifications(String userId, int queryPageSize = invalidParameterHandler.validatePaging(startFrom, pageSize, methodName); - RelatedElementListResponse restResult = restClient.callRelatedElementListGetRESTCall(methodName, - urlTemplate, - serverName, - userId, - elementGUID, - startFrom, - queryPageSize); + RelatedElementsResponse restResult = restClient.callRelatedElementsGetRESTCall(methodName, + urlTemplate, + serverName, + userId, + elementGUID, + startFrom, + queryPageSize); - return restResult.getElementList(); + return restResult.getElements(); } } diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-client/src/main/java/org/odpi/openmetadata/accessservices/assetowner/client/AssetLicenseManager.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-client/src/main/java/org/odpi/openmetadata/accessservices/assetowner/client/AssetLicenseManager.java index 3fd5fb12d7f..fc5bff00262 100644 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-client/src/main/java/org/odpi/openmetadata/accessservices/assetowner/client/AssetLicenseManager.java +++ b/open-metadata-implementation/access-services/asset-owner/asset-owner-client/src/main/java/org/odpi/openmetadata/accessservices/assetowner/client/AssetLicenseManager.java @@ -4,18 +4,18 @@ import org.odpi.openmetadata.accessservices.assetowner.api.AssetLicenseInterface; import org.odpi.openmetadata.accessservices.assetowner.client.rest.AssetOwnerRESTClient; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.LicenseElement; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.LicenseTypeElement; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.RelatedElement; -import org.odpi.openmetadata.accessservices.assetowner.properties.LicenseProperties; -import org.odpi.openmetadata.accessservices.assetowner.rest.LicenseListResponse; -import org.odpi.openmetadata.accessservices.assetowner.rest.LicenseTypeListResponse; -import org.odpi.openmetadata.accessservices.assetowner.rest.LicenseTypeResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.LicenseTypeResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.LicenseTypesResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.LicensesResponse; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.LicenseElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.LicenseTypeElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.RelatedElement; import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.LicenseProperties; import java.util.List; @@ -234,13 +234,13 @@ public List getLicenseTypesByTitle(String userId, requestBody.setSearchString(title); requestBody.setSearchStringParameterName(titleParameterName); - LicenseTypeListResponse restResult = restClient.callLicenseTypeListPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - startFrom, - queryPageSize); + LicenseTypesResponse restResult = restClient.callLicenseTypeListPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + startFrom, + queryPageSize); return restResult.getElements(); } @@ -275,13 +275,13 @@ public List getLicenseTypeByDomainId(String userId, int queryPageSize = invalidParameterHandler.validatePaging(startFrom, pageSize, methodName); - LicenseTypeListResponse restResult = restClient.callLicenseTypeListGetRESTCall(methodName, - urlTemplate, - serverName, - userId, - domainIdentifier, - startFrom, - queryPageSize); + LicenseTypesResponse restResult = restClient.callLicenseTypesGetRESTCall(methodName, + urlTemplate, + serverName, + userId, + domainIdentifier, + startFrom, + queryPageSize); return restResult.getElements(); } @@ -458,13 +458,13 @@ public List getLicenses(String userId, int queryPageSize = invalidParameterHandler.validatePaging(startFrom, pageSize, methodName); - LicenseListResponse restResult = restClient.callLicenseListGetRESTCall(methodName, - urlTemplate, - serverName, - userId, - elementGUID, - startFrom, - queryPageSize); + LicensesResponse restResult = restClient.callLicensesGetRESTCall(methodName, + urlTemplate, + serverName, + userId, + elementGUID, + startFrom, + queryPageSize); return restResult.getElements(); } diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-client/src/main/java/org/odpi/openmetadata/accessservices/assetowner/client/AssetOwner.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-client/src/main/java/org/odpi/openmetadata/accessservices/assetowner/client/AssetOwner.java index 9dd0fe8d376..ead9bd5c4c6 100644 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-client/src/main/java/org/odpi/openmetadata/accessservices/assetowner/client/AssetOwner.java +++ b/open-metadata-implementation/access-services/asset-owner/asset-owner-client/src/main/java/org/odpi/openmetadata/accessservices/assetowner/client/AssetOwner.java @@ -5,15 +5,12 @@ import org.odpi.openmetadata.accessservices.assetowner.api.*; import org.odpi.openmetadata.accessservices.assetowner.client.rest.AssetOwnerRESTClient; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.*; -import org.odpi.openmetadata.accessservices.assetowner.properties.*; -import org.odpi.openmetadata.accessservices.assetowner.rest.*; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NameListResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.StringMapResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.StringRequestBody; +import org.odpi.openmetadata.accessservices.assetowner.rest.TemplateRequestBody; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.RelationshipElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; +import org.odpi.openmetadata.accessservices.assetowner.properties.TemplateProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.*; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.Connector; import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectionCheckedException; @@ -23,9 +20,20 @@ import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; import org.odpi.openmetadata.frameworks.connectors.properties.AssetUniverse; import org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; -import org.odpi.openmetadata.frameworks.openmetadata.enums.AssetOwnerType; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.RetentionClassificationProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.SchemaAttributeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.SchemaTypeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.SemanticAssignmentProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.AssetProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.collections.CollectionFolderProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.collections.CollectionMembershipProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.collections.CollectionProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.ConnectionProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.EndpointProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.FindAssetOriginProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.GovernanceClassificationProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.DataFieldQueryProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.DataFieldValuesProperties; import org.odpi.openmetadata.frameworks.surveyaction.properties.Annotation; import org.odpi.openmetadata.frameworks.surveyaction.properties.AnnotationStatus; import org.odpi.openmetadata.frameworks.surveyaction.properties.SurveyReport; @@ -274,7 +282,7 @@ public String addAssetToCatalog(String userId, assetProperties.setTypeName(typeName); assetProperties.setQualifiedName(qualifiedName); assetProperties.setName(name); - assetProperties.setDescription(description); + assetProperties.setResourceDescription(description); assetProperties.setAdditionalProperties(additionalProperties); assetProperties.setExtendedProperties(extendedProperties); @@ -642,7 +650,7 @@ public List getRelatedAssetsAtEnd2(String userId, startFrom, pageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -690,7 +698,7 @@ public List getRelatedAssetsAtEnd1(String userId, startFrom, pageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -713,7 +721,7 @@ public List getRelatedAssetsAtEnd1(String userId, @Override public String addCombinedSchemaToAsset(String userId, String assetGUID, - SchemaTypeProperties schemaType, + SchemaTypeProperties schemaType, List schemaAttributes) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException @@ -1352,7 +1360,7 @@ public List findSchemaType(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -1442,7 +1450,7 @@ public List getSchemaTypeByName(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -1862,7 +1870,7 @@ public List findSchemaAttributes(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/schema-attributes/by-search-string?startFrom={2}&pageSize={3}"; - SchemaAttributeElementsResponse restResult = restClient.callSchemaAttributesPostRESTCall(methodName, + SchemaAttributesResponse restResult = restClient.callSchemaAttributesPostRESTCall(methodName, urlTemplate, requestBody, serverName, @@ -1870,7 +1878,7 @@ public List findSchemaAttributes(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -1905,16 +1913,16 @@ public List getNestedSchemaAttributes(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/schema-elements/{2}/schema-attributes/retrieve?startFrom={3}&pageSize={4}"; - SchemaAttributeElementsResponse restResult = restClient.callSchemaAttributesPostRESTCall(methodName, - urlTemplate, - new EffectiveTimeQueryRequestBody(), - serverName, - userId, - parentSchemaElementGUID, - startFrom, - validatedPageSize); + SchemaAttributesResponse restResult = restClient.callSchemaAttributesPostRESTCall(methodName, + urlTemplate, + new EffectiveTimeQueryRequestBody(), + serverName, + userId, + parentSchemaElementGUID, + startFrom, + validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -1956,15 +1964,15 @@ public List getSchemaAttributesByName(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/schema-attributes/by-name?startFrom={2}&pageSize={3}"; - SchemaAttributeElementsResponse restResult = restClient.callSchemaAttributesPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - startFrom, - validatedPageSize); + SchemaAttributesResponse restResult = restClient.callSchemaAttributesPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + startFrom, + validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -1994,7 +2002,7 @@ public SchemaAttributeElement getSchemaAttributeByGUID(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/schema-attributes/{2}/retrieve"; - SchemaAttributeElementResponse restResult = restClient.callSchemaAttributePostRESTCall(methodName, + SchemaAttributeResponse restResult = restClient.callSchemaAttributePostRESTCall(methodName, urlTemplate, new EffectiveTimeQueryRequestBody(), serverName, @@ -2033,7 +2041,7 @@ public void addConnectionToAsset(String userId, invalidParameterHandler.validateUserId(userId, methodName); invalidParameterHandler.validateGUID(assetGUID, assetGUIDParameter, methodName); - ConnectionRequestBody requestBody = new ConnectionRequestBody(); + OCFConnectionRequestBody requestBody = new OCFConnectionRequestBody(); requestBody.setShortDescription(assetSummary); requestBody.setConnection(connection); @@ -3320,7 +3328,7 @@ public List findConnections(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -3358,7 +3366,7 @@ public List scanConnections(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -3407,7 +3415,7 @@ public List getConnectionsByName(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -3437,11 +3445,11 @@ public ConnectionElement getConnectionByGUID(String userId, final String urlTemplate = serverPlatformURLRoot + "/servers/{0}/open-metadata/access-services/asset-owner/users/{1}/connections/{2}"; - ConnectionResponse restResult = restClient.callMyConnectionGetRESTCall(methodName, - urlTemplate, - serverName, - userId, - connectionGUID); + ConnectionResponse restResult = restClient.callConnectionGetRESTCall(methodName, + urlTemplate, + serverName, + userId, + connectionGUID); return restResult.getElement(); } @@ -3650,7 +3658,7 @@ public List findEndpoints(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -3699,7 +3707,7 @@ public List getEndpointsByName(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -3784,7 +3792,7 @@ public List findConnectorTypes(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -3833,7 +3841,7 @@ public List getConnectorTypesByName(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -3863,11 +3871,11 @@ public ConnectorTypeElement getConnectorTypeByGUID(String userId, final String urlTemplate = serverPlatformURLRoot + "/servers/{0}/open-metadata/access-services/asset-owner/users/{1}/connector-types/{2}"; - ConnectorTypeResponse restResult = restClient.callMyConnectorTypeGetRESTCall(methodName, - urlTemplate, - serverName, - userId, - connectorTypeGUID); + ConnectorTypeResponse restResult = restClient.callConnectorTypeGetRESTCall(methodName, + urlTemplate, + serverName, + userId, + connectorTypeGUID); return restResult.getElement(); } @@ -3921,7 +3929,7 @@ public List getAssetsByName(String userId, startFrom, pageSize); - return restResult.getAssets(); + return restResult.getElements(); } @@ -3968,7 +3976,7 @@ public List findAssets(String userId, startFrom, pageSize); - return restResult.getAssets(); + return restResult.getElements(); } @@ -4002,7 +4010,7 @@ public AssetElement getAssetSummary(String userId, userId, assetGUID); - return restResult.getAsset(); + return restResult.getElement(); } @@ -4078,13 +4086,13 @@ public List getSurveyReports(String userId, invalidParameterHandler.validateGUID(assetGUID, assetGUIDParameter, methodName); invalidParameterHandler.validatePaging(startingFrom, maximumResults, methodName); - SurveyReportListResponse restResult = restClient.callSurveyReportListGetRESTCall(methodName, - urlTemplate, - serverName, - userId, - assetGUID, - Integer.toString(startingFrom), - Integer.toString(maximumResults)); + SurveyReportsResponse restResult = restClient.callSurveyReportListGetRESTCall(methodName, + urlTemplate, + serverName, + userId, + assetGUID, + Integer.toString(startingFrom), + Integer.toString(maximumResults)); return restResult.getSurveyReports(); } @@ -4179,20 +4187,20 @@ public List getSurveyReportAnnotations(String userId, invalidParameterHandler.validateGUID(surveyReportGUID, discoveryReportGUIDParameter, methodName); invalidParameterHandler.validatePaging(startingFrom, maximumResults, methodName); - StatusRequestBody requestBody = new StatusRequestBody(); + AnnotationStatusRequestBody requestBody = new AnnotationStatusRequestBody(); requestBody.setAnnotationStatus(annotationStatus); - AnnotationListResponse restResult = restClient.callAnnotationListPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - surveyReportGUID, - Integer.toString(startingFrom), - Integer.toString(maximumResults)); + AnnotationsResponse restResult = restClient.callAnnotationListPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + surveyReportGUID, + Integer.toString(startingFrom), + Integer.toString(maximumResults)); - return restResult.getAnnotations(); + return restResult.getElements(); } @@ -4229,20 +4237,20 @@ public List getExtendedAnnotations(String userId, invalidParameterHandler.validateGUID(annotationGUID, annotationGUIDParameter, methodName); invalidParameterHandler.validatePaging(startingFrom, maximumResults, methodName); - StatusRequestBody requestBody = new StatusRequestBody(); + AnnotationStatusRequestBody requestBody = new AnnotationStatusRequestBody(); requestBody.setAnnotationStatus(annotationStatus); - AnnotationListResponse restResult = restClient.callAnnotationListPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - annotationGUID, - Integer.toString(startingFrom), - Integer.toString(maximumResults)); + AnnotationsResponse restResult = restClient.callAnnotationListPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + annotationGUID, + Integer.toString(startingFrom), + Integer.toString(maximumResults)); - return restResult.getAnnotations(); + return restResult.getElements(); } /** @@ -4459,7 +4467,7 @@ public List getMeanings(String userId, String elementGUID, */ @Override public List getSemanticAssignees(String userId, String glossaryTermGUID, int startFrom, int pageSize, Date effectiveTime, - boolean forLineage, boolean forDuplicateProcessing) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException + boolean forLineage, boolean forDuplicateProcessing) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { return null; } diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-client/src/main/java/org/odpi/openmetadata/accessservices/assetowner/client/AssetOwnerBaseClient.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-client/src/main/java/org/odpi/openmetadata/accessservices/assetowner/client/AssetOwnerBaseClient.java index 061600d7405..5de50b27077 100644 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-client/src/main/java/org/odpi/openmetadata/accessservices/assetowner/client/AssetOwnerBaseClient.java +++ b/open-metadata-implementation/access-services/asset-owner/asset-owner-client/src/main/java/org/odpi/openmetadata/accessservices/assetowner/client/AssetOwnerBaseClient.java @@ -5,25 +5,18 @@ import org.odpi.openmetadata.accessservices.assetowner.api.RelatedElementsManagementInterface; import org.odpi.openmetadata.accessservices.assetowner.client.rest.AssetOwnerRESTClient; -import org.odpi.openmetadata.accessservices.assetowner.properties.ClassificationProperties; -import org.odpi.openmetadata.accessservices.assetowner.properties.StakeholderProperties; -import org.odpi.openmetadata.accessservices.assetowner.rest.ElementStubListResponse; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.RelatedElement; -import org.odpi.openmetadata.accessservices.assetowner.properties.ReferenceableProperties; -import org.odpi.openmetadata.accessservices.assetowner.properties.RelationshipProperties; -import org.odpi.openmetadata.accessservices.assetowner.properties.ResourceListProperties; -import org.odpi.openmetadata.accessservices.assetowner.rest.ClassificationRequestBody; -import org.odpi.openmetadata.accessservices.assetowner.rest.ExternalSourceRequestBody; -import org.odpi.openmetadata.accessservices.assetowner.rest.ReferenceableRequestBody; -import org.odpi.openmetadata.accessservices.assetowner.rest.RelatedElementListResponse; -import org.odpi.openmetadata.accessservices.assetowner.rest.RelationshipRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NullRequestBody; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ClassificationProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.StakeholderProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.RelatedElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ReferenceableProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.resources.ResourceListProperties; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementStub; import org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.client.ConnectedAssetClientBase; import java.util.List; @@ -36,7 +29,6 @@ public class AssetOwnerBaseClient extends ConnectedAssetClientBase implements Re protected final AssetOwnerRESTClient restClient; /* Initialized in constructor */ protected static final String serviceURLName = "asset-owner"; - protected static final String defaultAssetType = "Asset"; final protected String urlTemplatePrefix = "/servers/{0}/open-metadata/access-services/asset-owner/users/{1}"; private static final String elementsURLTemplatePrefix = "/servers/{0}/open-metadata/access-services/asset-owner/users/{1}/related-elements"; @@ -716,15 +708,15 @@ List getRelatedElements(String userId, invalidParameterHandler.validateUserId(userId, methodName); invalidParameterHandler.validateGUID(startingElementGUID, startingElementGUIDParameterName, methodName); - RelatedElementListResponse restResult = restClient.callRelatedElementListGetRESTCall(methodName, - urlTemplate, - serverName, - userId, - startingElementGUID, - Integer.toString(startFrom), - Integer.toString(pageSize)); + RelatedElementsResponse restResult = restClient.callRelatedElementsGetRESTCall(methodName, + urlTemplate, + serverName, + userId, + startingElementGUID, + Integer.toString(startFrom), + Integer.toString(pageSize)); - return restResult.getElementList(); + return restResult.getElements(); } @@ -757,13 +749,13 @@ List getElementStubsByName(String userId, invalidParameterHandler.validateUserId(userId, methodName); invalidParameterHandler.validateName(name, nameParameterName, methodName); - ElementStubListResponse restResult = restClient.callElementStubListGetRESTCall(methodName, - urlTemplate, - serverName, - userId, - name, - Integer.toString(startFrom), - Integer.toString(pageSize)); + ElementStubsResponse restResult = restClient.callElementStubsGetRESTCall(methodName, + urlTemplate, + serverName, + userId, + name, + Integer.toString(startFrom), + Integer.toString(pageSize)); return restResult.getElements(); } diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-client/src/main/java/org/odpi/openmetadata/accessservices/assetowner/client/AvroFileAssetOwner.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-client/src/main/java/org/odpi/openmetadata/accessservices/assetowner/client/AvroFileAssetOwner.java index 7bd7705680c..4918a1f60cc 100644 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-client/src/main/java/org/odpi/openmetadata/accessservices/assetowner/client/AvroFileAssetOwner.java +++ b/open-metadata-implementation/access-services/asset-owner/asset-owner-client/src/main/java/org/odpi/openmetadata/accessservices/assetowner/client/AvroFileAssetOwner.java @@ -4,8 +4,8 @@ import org.odpi.openmetadata.accessservices.assetowner.api.AssetOnboardingAvroFileInterface; import org.odpi.openmetadata.accessservices.assetowner.client.rest.AssetOwnerRESTClient; -import org.odpi.openmetadata.accessservices.assetowner.rest.NewFileAssetRequestBody; import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDListResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.NewFileAssetRequestBody; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-client/src/main/java/org/odpi/openmetadata/accessservices/assetowner/client/CSVFileAssetOwner.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-client/src/main/java/org/odpi/openmetadata/accessservices/assetowner/client/CSVFileAssetOwner.java index 3d242b2861c..67cb9d28a3e 100644 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-client/src/main/java/org/odpi/openmetadata/accessservices/assetowner/client/CSVFileAssetOwner.java +++ b/open-metadata-implementation/access-services/asset-owner/asset-owner-client/src/main/java/org/odpi/openmetadata/accessservices/assetowner/client/CSVFileAssetOwner.java @@ -4,8 +4,8 @@ import org.odpi.openmetadata.accessservices.assetowner.api.AssetOnboardingCSVFileInterface; import org.odpi.openmetadata.accessservices.assetowner.client.rest.AssetOwnerRESTClient; -import org.odpi.openmetadata.accessservices.assetowner.rest.NewCSVFileAssetRequestBody; import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDListResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.NewCSVFileAssetRequestBody; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-client/src/main/java/org/odpi/openmetadata/accessservices/assetowner/client/ExternalReferenceManager.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-client/src/main/java/org/odpi/openmetadata/accessservices/assetowner/client/ExternalReferenceManager.java index d60a372801f..09e10238b22 100644 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-client/src/main/java/org/odpi/openmetadata/accessservices/assetowner/client/ExternalReferenceManager.java +++ b/open-metadata-implementation/access-services/asset-owner/asset-owner-client/src/main/java/org/odpi/openmetadata/accessservices/assetowner/client/ExternalReferenceManager.java @@ -4,18 +4,18 @@ import org.odpi.openmetadata.accessservices.assetowner.api.ExternalReferencesInterface; import org.odpi.openmetadata.accessservices.assetowner.client.rest.AssetOwnerRESTClient; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.ExternalReferenceElement; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.RelatedElement; -import org.odpi.openmetadata.accessservices.assetowner.properties.ExternalReferenceLinkProperties; -import org.odpi.openmetadata.accessservices.assetowner.properties.ExternalReferenceProperties; -import org.odpi.openmetadata.accessservices.assetowner.rest.ExternalReferenceListResponse; -import org.odpi.openmetadata.accessservices.assetowner.rest.ExternalReferenceResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.ExternalReferenceResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.ExternalReferencesResponse; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ExternalReferenceElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.RelatedElement; import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.properties.externalreferences.ExternalReferenceLinkProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.externalreferences.ExternalReferenceProperties; import java.util.List; @@ -290,7 +290,7 @@ public ExternalReferenceElement getExternalReferenceByGUID(String userId, invalidParameterHandler.validateGUID(externalReferenceGUID, guidParameterName, methodName); ExternalReferenceResponse restResult = restClient.callExternalReferenceGetRESTCall(methodName, - urlTemplate, + urlTemplate, serverName, userId, externalReferenceGUID); @@ -335,13 +335,13 @@ public List findExternalReferencesById(String userId, requestBody.setSearchString(resourceId); requestBody.setSearchStringParameterName(resourceIdParameterName); - ExternalReferenceListResponse restResult = restClient.callExternalReferenceListPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - startFrom, - queryPageSize); + ExternalReferencesResponse restResult = restClient.callExternalReferencesPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + startFrom, + queryPageSize); return restResult.getElements(); } @@ -382,13 +382,13 @@ public List getExternalReferencesByURL(String userId, requestBody.setName(url); requestBody.setNameParameterName(urlParameterName); - ExternalReferenceListResponse restResult = restClient.callExternalReferenceListPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - startFrom, - queryPageSize); + ExternalReferencesResponse restResult = restClient.callExternalReferencesPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + startFrom, + queryPageSize); return restResult.getElements(); } @@ -426,13 +426,13 @@ public List retrieveAttachedExternalReferences(String int queryPageSize = invalidParameterHandler.validatePaging(startFrom, pageSize, methodName); - ExternalReferenceListResponse restResult = restClient.callExternalReferenceListGetRESTCall(methodName, - urlTemplate, - serverName, - userId, - attachedToGUID, - startFrom, - queryPageSize); + ExternalReferencesResponse restResult = restClient.callExternalReferencesGetRESTCall(methodName, + urlTemplate, + serverName, + userId, + attachedToGUID, + startFrom, + queryPageSize); return restResult.getElements(); } diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-client/src/main/java/org/odpi/openmetadata/accessservices/assetowner/client/FileSystemAssetOwner.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-client/src/main/java/org/odpi/openmetadata/accessservices/assetowner/client/FileSystemAssetOwner.java index 4d39664a191..71be3cc3308 100644 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-client/src/main/java/org/odpi/openmetadata/accessservices/assetowner/client/FileSystemAssetOwner.java +++ b/open-metadata-implementation/access-services/asset-owner/asset-owner-client/src/main/java/org/odpi/openmetadata/accessservices/assetowner/client/FileSystemAssetOwner.java @@ -4,11 +4,9 @@ import org.odpi.openmetadata.accessservices.assetowner.api.AssetOnboardingFileSystem; import org.odpi.openmetadata.accessservices.assetowner.client.rest.AssetOwnerRESTClient; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.FileSystemElement; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.FolderElement; -import org.odpi.openmetadata.accessservices.assetowner.rest.*; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDListResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.FileSystemElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.FolderElement; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; @@ -219,7 +217,7 @@ public List createFolderStructureInCatalog(String userId, invalidParameterHandler.validateName(pathName, pathParameter, methodName); PathNameRequestBody requestBody = new PathNameRequestBody(); - requestBody.setFullPath(pathName); + requestBody.setPathName(pathName); GUIDListResponse restResult = restClient.callGUIDListPostRESTCall(methodName, urlTemplate, @@ -260,7 +258,7 @@ public List createFolderStructureInCatalog(String userId, invalidParameterHandler.validateName(pathName, pathParameter, methodName); PathNameRequestBody requestBody = new PathNameRequestBody(); - requestBody.setFullPath(pathName); + requestBody.setPathName(pathName); GUIDListResponse restResult = restClient.callGUIDListPostRESTCall(methodName, urlTemplate, @@ -628,7 +626,7 @@ public FileSystemElement getFileSystemByGUID(String userId, userId, fileSystemGUID); - return restResult.getFileSystem(); + return restResult.getElement(); } @@ -663,7 +661,7 @@ public FileSystemElement getFileSystemByUniqueName(String userId, userId, uniqueName); - return restResult.getFileSystem(); + return restResult.getElement(); } @@ -734,7 +732,7 @@ public FolderElement getFolderByGUID(String userId, userId, folderGUID); - return restResult.getFolder(); + return restResult.getElement(); } @@ -769,7 +767,7 @@ public FolderElement getFolderByPathName(String userId, userId, pathName); - return restResult.getFolder(); + return restResult.getElement(); } diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-client/src/main/java/org/odpi/openmetadata/accessservices/assetowner/client/ValidValuesAssetOwner.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-client/src/main/java/org/odpi/openmetadata/accessservices/assetowner/client/ValidValuesAssetOwner.java index 7f817b1552d..af06c7149d7 100644 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-client/src/main/java/org/odpi/openmetadata/accessservices/assetowner/client/ValidValuesAssetOwner.java +++ b/open-metadata-implementation/access-services/asset-owner/asset-owner-client/src/main/java/org/odpi/openmetadata/accessservices/assetowner/client/ValidValuesAssetOwner.java @@ -4,8 +4,7 @@ import org.odpi.openmetadata.accessservices.assetowner.api.AssetOnboardingValidValues; import org.odpi.openmetadata.accessservices.assetowner.client.rest.AssetOwnerRESTClient; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.ValidValueElement; -import org.odpi.openmetadata.accessservices.assetowner.rest.*; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ValidValueElement; import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; @@ -20,7 +19,6 @@ * ValidValuesAssetOwner provides the API operations to create and maintain lists of valid * value definitions grouped into a valid value set. Both valid value definitions and valid value sets have * the same attributes and so inherit from ValidValue where all the attributes are defined. - * * A set is just grouping of valid values. Valid value definitions and set can be nested many times in other * valid value sets. */ @@ -515,7 +513,7 @@ public List getValidValueByName(String userId, startFrom, pageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -565,7 +563,7 @@ public List findValidValues(String userId, startFrom, pageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -606,7 +604,7 @@ public List getValidValueSetMembers(String userId, validValueSetGUID, Integer.toString(startFrom), Integer.toString(pageSize)); - return restResult.getElementList(); + return restResult.getElements(); } @@ -647,6 +645,6 @@ public List getSetsForValidValue(String userId, validValueGUID, Integer.toString(startFrom), Integer.toString(pageSize)); - return restResult.getElementList(); + return restResult.getElements(); } } diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-client/src/main/java/org/odpi/openmetadata/accessservices/assetowner/client/converters/AssetOwnerConverterBase.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-client/src/main/java/org/odpi/openmetadata/accessservices/assetowner/client/converters/AssetOwnerConverterBase.java index e6d83355034..6634f25607f 100644 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-client/src/main/java/org/odpi/openmetadata/accessservices/assetowner/client/converters/AssetOwnerConverterBase.java +++ b/open-metadata-implementation/access-services/asset-owner/asset-owner-client/src/main/java/org/odpi/openmetadata/accessservices/assetowner/client/converters/AssetOwnerConverterBase.java @@ -2,15 +2,7 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.assetowner.client.converters; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.RelatedElement; -import org.odpi.openmetadata.accessservices.assetowner.properties.RelationshipProperties; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; import org.odpi.openmetadata.frameworks.governanceaction.converters.OpenMetadataConverterBase; -import org.odpi.openmetadata.frameworks.governanceaction.properties.OpenMetadataElement; -import org.odpi.openmetadata.frameworks.governanceaction.properties.OpenMetadataRelationship; -import org.odpi.openmetadata.frameworks.governanceaction.properties.RelatedMetadataElement; -import org.odpi.openmetadata.frameworks.governanceaction.search.ElementProperties; import org.odpi.openmetadata.frameworks.governanceaction.search.PropertyHelper; /** @@ -35,93 +27,4 @@ public AssetOwnerConverterBase(PropertyHelper propertyHelper, } - /** - * Using the supplied instances, return a new instance of a relatedElement bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param element entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - public RelatedElement getRelatedElement(Class beanClass, - OpenMetadataElement element, - OpenMetadataRelationship relationship, - String methodName) throws PropertyServerException - { - RelatedElement relatedElement = new RelatedElement(); - - relatedElement.setRelationshipHeader(this.getMetadataElementHeader(beanClass, relationship, relationship.getRelationshipGUID(), null, methodName)); - - if (relationship != null) - { - ElementProperties instanceProperties = new ElementProperties(relationship.getRelationshipProperties()); - - RelationshipProperties relationshipProperties = new RelationshipProperties(); - - relationshipProperties.setEffectiveFrom(relationship.getEffectiveFromTime()); - relationshipProperties.setEffectiveTo(relationship.getEffectiveToTime()); - relationshipProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - - relatedElement.setRelationshipProperties(relationshipProperties); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), OpenMetadataRelationship.class.getName(), methodName); - } - - if (element != null) - { - ElementStub elementStub = this.getElementStub(beanClass, element, methodName); - - relatedElement.setRelatedElement(elementStub); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), OpenMetadataElement.class.getName(), methodName); - } - - return relatedElement; - } - - - /** - * Using the supplied instances, return a new instance of a relatedElement bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param relatedMetadataElement results containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - public RelatedElement getRelatedElement(Class beanClass, - RelatedMetadataElement relatedMetadataElement, - String methodName) throws PropertyServerException - { - RelatedElement relatedElement = new RelatedElement(); - - relatedElement.setRelationshipHeader(this.getMetadataElementHeader(beanClass, relatedMetadataElement, relatedMetadataElement.getRelationshipGUID(), null, methodName)); - - if (relatedMetadataElement != null) - { - ElementProperties instanceProperties = new ElementProperties(relatedMetadataElement.getRelationshipProperties()); - - RelationshipProperties relationshipProperties = new RelationshipProperties(); - - relationshipProperties.setEffectiveFrom(relatedMetadataElement.getEffectiveFromTime()); - relationshipProperties.setEffectiveTo(relatedMetadataElement.getEffectiveToTime()); - relationshipProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - - relatedElement.setRelationshipProperties(relationshipProperties); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), OpenMetadataRelationship.class.getName(), methodName); - } - - return relatedElement; - } } diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-client/src/main/java/org/odpi/openmetadata/accessservices/assetowner/client/rest/AssetOwnerRESTClient.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-client/src/main/java/org/odpi/openmetadata/accessservices/assetowner/client/rest/AssetOwnerRESTClient.java index 4738b997070..83eae6de7b0 100644 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-client/src/main/java/org/odpi/openmetadata/accessservices/assetowner/client/rest/AssetOwnerRESTClient.java +++ b/open-metadata-implementation/access-services/asset-owner/asset-owner-client/src/main/java/org/odpi/openmetadata/accessservices/assetowner/client/rest/AssetOwnerRESTClient.java @@ -2,12 +2,9 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.assetowner.client.rest; -import org.odpi.openmetadata.accessservices.assetowner.rest.*; -import org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.client.OCFRESTClient; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.client.OCFRESTClient; /** @@ -88,1081 +85,4 @@ public AssetOwnerRESTClient(String serverName, } - - /** - * Issue a GET REST call that returns a ConnectionResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return ConnectionResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public ConnectionResponse callMyConnectionGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ConnectionResponse restResult = this.callGetRESTCall(methodName, ConnectionResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a POST REST call that returns a ConnectionsResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return ConnectionsResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public ConnectionsResponse callConnectionsGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ConnectionsResponse restResult = this.callGetRESTCall(methodName, ConnectionsResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - - /** - * Issue a POST REST call that returns a ConnectionsResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param requestBody properties describing the valid value definition/set - * @param params a list of parameters that are slotted into the url template. - * - * @return ConnectionsResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public ConnectionsResponse callConnectionsPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ConnectionsResponse restResult = this.callPostRESTCall(methodName, ConnectionsResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a ConnectorReportResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return ConnectorReportResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public ConnectorTypeResponse callMyConnectorTypeGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ConnectorTypeResponse restResult = this.callGetRESTCall(methodName, ConnectorTypeResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a POST REST call that returns a ConnectorTypesResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param requestBody properties describing the valid value definition/set - * @param params a list of parameters that are slotted into the url template. - * - * @return ConnectorTypesResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public ConnectorTypesResponse callConnectorTypesPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ConnectorTypesResponse restResult = this.callPostRESTCall(methodName, ConnectorTypesResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a EndpointResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return EndpointResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public EndpointResponse callEndpointGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - EndpointResponse restResult = this.callGetRESTCall(methodName, EndpointResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a POST REST call that returns a EndpointsResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param requestBody properties describing the valid value definition/set - * @param params a list of parameters that are slotted into the url template. - * - * @return EndpointsResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public EndpointsResponse callEndpointsPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - EndpointsResponse restResult = this.callPostRESTCall(methodName, EndpointsResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a FileSystemResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return FileSystemResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public FileSystemResponse callFileSystemGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - FileSystemResponse restResult = this.callGetRESTCall(methodName, FileSystemResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a FolderResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return FolderResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public FolderResponse callFolderGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - FolderResponse restResult = this.callGetRESTCall(methodName, FolderResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a ValidValuesResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return ValidValueResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public ValidValueResponse callValidValueGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ValidValueResponse restResult = this.callGetRESTCall(methodName, ValidValueResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a ValidValuesResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return ValidValuesResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public ValidValuesResponse callValidValuesGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ValidValuesResponse restResult = this.callGetRESTCall(methodName, ValidValuesResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a POST REST call that returns a ValidValuesResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param requestBody additional parameters - * @param params a list of parameters that are slotted into the url template. - * - * @return ValidValuesResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public ValidValuesResponse callValidValuesPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ValidValuesResponse restResult = this.callPostRESTCall(methodName, ValidValuesResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns an AssetElementResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return AssetElementResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException something went wrong with the REST call stack. - */ - public AssetElementResponse callAssetElementGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - AssetElementResponse restResult = this.callGetRESTCall(methodName, AssetElementResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns an AssetElementsResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return AssetElementsResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException something went wrong with the REST call stack. - */ - public AssetElementsResponse callAssetElementsGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - AssetElementsResponse restResult = this.callGetRESTCall(methodName, AssetElementsResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a POST REST call that returns an AssetElementsResponse object. - * - * @param methodName name of the method being called. - * @param requestBody request body for the REST call - contains most of the parameters - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return AssetElementsResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException something went wrong with the REST call stack. - */ - public AssetElementsResponse callAssetElementsPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - AssetElementsResponse restResult = this.callPostRESTCall(methodName, AssetElementsResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - - /** - * Issue a GET REST call that returns a DiscoveryAnalysisReportListResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return DiscoveryAnalysisReportResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException something went wrong with the REST call stack. - */ - public SurveyReportListResponse callSurveyReportListGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - SurveyReportListResponse restResult = this.callGetRESTCall(methodName, - SurveyReportListResponse.class, - urlTemplate, - params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a POST REST call that returns a DiscoveryAnalysisReportListResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param requestBody request body for the REST call - contains most of the parameters - * @param params a list of parameters that are slotted into the url template. - * - * @return DiscoveryAnalysisReportResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException something went wrong with the REST call stack. - */ - public SurveyReportListResponse callDiscoveryAnalysisReportListPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - SurveyReportListResponse restResult = this.callPostRESTCall(methodName, - SurveyReportListResponse.class, - urlTemplate, - requestBody, - params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns an AnnotationListResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return AnnotationListResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException something went wrong with the REST call stack. - */ - public AnnotationListResponse callAnnotationListGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - AnnotationListResponse restResult = this.callGetRESTCall(methodName, AnnotationListResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a POST REST call that returns an AnnotationResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param requestBody request body for the REST call - contains most of the parameters - * @param params a list of parameters that are slotted into the url template. - * - * @return AnnotationResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException something went wrong with the REST call stack. - */ - public AnnotationListResponse callAnnotationListPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - AnnotationListResponse restResult = this.callPostRESTCall(methodName, AnnotationListResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns an AnnotationResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return AnnotationResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException something went wrong with the REST call stack. - */ - public AnnotationResponse callAnnotationGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - AnnotationResponse restResult = this.callGetRESTCall(methodName, AnnotationResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a POST REST call that returns an AnnotationResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param requestBody request body for the REST call - contains most of the parameters - * @param params a list of parameters that are slotted into the url template. - * - * @return AnnotationResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException something went wrong with the REST call stack. - */ - public AnnotationResponse callAnnotationPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - AnnotationResponse restResult = this.callPostRESTCall(methodName, AnnotationResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a CertificationTypeResponse object. - * - * @param methodName name of the method being called - * @param urlTemplate template of the URL with place-holders for the parameters - * @param params a list of parameters that are slotted into the url template - * @return CertificationTypeResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public CertificationTypeResponse callCertificationTypeGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException - { - CertificationTypeResponse restResult = this.callGetRESTCall(methodName, CertificationTypeResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a list of CertificationTypeElement objects. - * - * @param methodName name of the method being called - * @param urlTemplate template of the URL with place-holders for the parameters - * @param params a list of parameters that are slotted into the url template - * @return CertificationTypeListResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public CertificationTypeListResponse callCertificationTypeListGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException - { - CertificationTypeListResponse restResult = this.callGetRESTCall(methodName, CertificationTypeListResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a POST REST call that returns a list of CertificationTypeElement objects. - * - * @param methodName name of the method being called - * @param urlTemplate template of the URL with place-holders for the parameters - * @param requestBody request body for the REST call - contains most of the parameters - * @param params a list of parameters that are slotted into the url template - * @return CertificationTypeListResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public CertificationTypeListResponse callCertificationTypeListPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException - { - CertificationTypeListResponse restResult = this.callPostRESTCall(methodName, CertificationTypeListResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a ElementStubListResponse object. - * - * @param methodName name of the method being called - * @param urlTemplate template of the URL with place-holders for the parameters - * @param params a list of parameters that are slotted into the url template - * @return ElementStubListResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public ElementStubListResponse callElementStubListGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException - { - ElementStubListResponse restResult = this.callGetRESTCall(methodName, ElementStubListResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a ExternalReferenceResponse object. - * - * @param methodName name of the method being called - * @param urlTemplate template of the URL with place-holders for the parameters - * @param params a list of parameters that are slotted into the url template - * @return ExternalReferenceResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public ExternalReferenceResponse callExternalReferenceGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException - { - ExternalReferenceResponse restResult = this.callGetRESTCall(methodName, ExternalReferenceResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a list of ExternalReferenceElement objects. - * - * @param methodName name of the method being called - * @param urlTemplate template of the URL with place-holders for the parameters - * @param params a list of parameters that are slotted into the url template - * @return ExternalReferenceListResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public ExternalReferenceListResponse callExternalReferenceListGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException - { - ExternalReferenceListResponse restResult = this.callGetRESTCall(methodName, ExternalReferenceListResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a POST REST call that returns a list of ExternalReferenceElement objects. - * - * @param methodName name of the method being called - * @param urlTemplate template of the URL with place-holders for the parameters - * @param requestBody request body for the REST call - contains most of the parameters - * @param params a list of parameters that are slotted into the url template - * @return ExternalReferenceListResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public ExternalReferenceListResponse callExternalReferenceListPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException - { - ExternalReferenceListResponse restResult = this.callPostRESTCall(methodName, ExternalReferenceListResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a RelatedElementListResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate REST API call URL template with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public RelatedElementListResponse callRelatedElementListGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - RelatedElementListResponse restResult = this.callGetRESTCall(methodName, RelatedElementListResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a LicenseTypeResponse object. - * - * @param methodName name of the method being called - * @param urlTemplate template of the URL with place-holders for the parameters - * @param params a list of parameters that are slotted into the url template - * @return LicenseTypeResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public LicenseTypeResponse callLicenseTypeGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException - { - LicenseTypeResponse restResult = this.callGetRESTCall(methodName, LicenseTypeResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a list of LicenseTypeElement objects. - * - * @param methodName name of the method being called - * @param urlTemplate template of the URL with place-holders for the parameters - * @param params a list of parameters that are slotted into the url template - * @return LicenseTypeListResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public LicenseTypeListResponse callLicenseTypeListGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException - { - LicenseTypeListResponse restResult = this.callGetRESTCall(methodName, LicenseTypeListResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - - /** - * Issue a GET REST call that returns a list of LicenseElement objects. - * - * @param methodName name of the method being called - * @param urlTemplate template of the URL with place-holders for the parameters - * @param params a list of parameters that are slotted into the url template - * @return LicenseListResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public LicenseListResponse callLicenseListGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException - { - LicenseListResponse restResult = this.callGetRESTCall(methodName, LicenseListResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a POST REST call that returns a list of LicenseTypeElement objects. - * - * @param methodName name of the method being called - * @param urlTemplate template of the URL with place-holders for the parameters - * @param requestBody request body for the REST call - contains most of the parameters - * @param params a list of parameters that are slotted into the url template - * @return LicenseTypeListResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public LicenseTypeListResponse callLicenseTypeListPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException - { - LicenseTypeListResponse restResult = this.callPostRESTCall(methodName, LicenseTypeListResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - - /** - * Issue a POST REST call that returns a SchemaAttributeElementResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param requestBody object that passes additional parameters - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public SchemaAttributeElementResponse callSchemaAttributePostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - SchemaAttributeElementResponse restResult = this.callPostRESTCall(methodName, SchemaAttributeElementResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a POST REST call that returns a SchemaAttributeElementsResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param requestBody object that passes additional parameters - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public SchemaAttributeElementsResponse callSchemaAttributesPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - SchemaAttributeElementsResponse restResult = this.callPostRESTCall(methodName, SchemaAttributeElementsResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a POST REST call that returns a SchemaTypeElementResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param requestBody object that passes additional parameters - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public SchemaTypeElementResponse callSchemaTypePostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - SchemaTypeElementResponse restResult = this.callPostRESTCall(methodName, SchemaTypeElementResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a POST REST call that returns a SchemaTypeElementsResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param requestBody object that passes additional parameters - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public SchemaTypeElementsResponse callSchemaTypesPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - SchemaTypeElementsResponse restResult = this.callPostRESTCall(methodName, SchemaTypeElementsResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - /** - * Issue a POST REST call that returns a ElementHeaderResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param requestBody object that passes additional parameters - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public ElementHeaderResponse callElementHeaderPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ElementHeaderResponse restResult = this.callPostRESTCall(methodName, - ElementHeaderResponse.class, - urlTemplate, - requestBody, - params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - /** - * Issue a POST REST call that returns a RelationshipElementResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param requestBody object that passes additional parameters - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public RelationshipElementResponse callRelationshipPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - RelationshipElementResponse restResult = this.callPostRESTCall(methodName, RelationshipElementResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a POST REST call that returns a RelationshipElementsResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param requestBody object that passes additional parameters - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public RelationshipElementsResponse callRelationshipsPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - RelationshipElementsResponse restResult = this.callPostRESTCall(methodName, RelationshipElementsResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } } diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/converters/AssetConverter.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/converters/AssetConverter.java deleted file mode 100644 index 507aa4ecf59..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/converters/AssetConverter.java +++ /dev/null @@ -1,123 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.converters; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.AssetElement; -import org.odpi.openmetadata.accessservices.assetowner.properties.AssetProperties; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.*; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; - - -/** - * AssetConverter provides common methods for transferring relevant properties from an Open Metadata Repository Services (OMRS) - * EntityDetail object into a bean that inherits from AssetProperties. - */ -public class AssetConverter extends AssetOwnerOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public AssetConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof AssetElement bean) - { - AssetProperties assetProperties = new AssetProperties(); - - if (entity != null) - { - bean.setElementHeader(super.getMetadataElementHeader(beanClass, entity, methodName)); - - /* - * The initial set of values come from the entity. - */ - InstanceProperties instanceProperties = new InstanceProperties(entity.getProperties()); - - assetProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); - assetProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); - assetProperties.setName(this.removeName(instanceProperties)); - assetProperties.setDisplayName(assetProperties.getName()); - assetProperties.setVersionIdentifier(this.removeVersionIdentifier(instanceProperties)); - assetProperties.setDescription(this.removeDescription(instanceProperties)); - assetProperties.setDeployedImplementationType(this.removeDeployedImplementationType(instanceProperties)); - - /* - * Any remaining properties are returned in the extended properties. They are - * assumed to be defined in a subtype. - */ - assetProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); - assetProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - - bean.setAssetProperties(assetProperties); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - Relationship relationship, - String methodName) throws PropertyServerException - { - return getNewBean(beanClass, entity, methodName); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/converters/AssetOwnerOMASConverter.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/converters/AssetOwnerOMASConverter.java deleted file mode 100644 index f426e321ad5..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/converters/AssetOwnerOMASConverter.java +++ /dev/null @@ -1,148 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.converters; - -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.RelatedElement; -import org.odpi.openmetadata.accessservices.assetowner.properties.RelationshipProperties; -import org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericConverter; -import org.odpi.openmetadata.frameworks.openmetadata.enums.AssetOwnerType; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.*; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.util.Map; - - -/** - * AssetOwnerOMASConverter provides the generic methods for the Data Manager beans converters. Generic classes - * have limited knowledge of the classes these are working on and this means creating a new instance of a - * class from within a generic is a little involved. This class provides the generic method for creating - * and initializing a Data Manager bean. - */ -abstract class AssetOwnerOMASConverter extends OpenMetadataAPIGenericConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName name of this server - */ - AssetOwnerOMASConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super (repositoryHelper, serviceName, serverName); - } - - - /** - * Using the supplied instances, return a new instance of a relatedElement bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - public RelatedElement getRelatedElement(Class beanClass, - EntityDetail entity, - Relationship relationship, - String methodName) throws PropertyServerException - { - RelatedElement relatedElement = new RelatedElement(); - - relatedElement.setRelationshipHeader(this.getMetadataElementHeader(beanClass, relationship, null, methodName)); - - if (relationship != null) - { - InstanceProperties instanceProperties = new InstanceProperties(relationship.getProperties()); - - RelationshipProperties relationshipProperties = new RelationshipProperties(); - - relationshipProperties.setEffectiveFrom(instanceProperties.getEffectiveFromTime()); - relationshipProperties.setEffectiveTo(instanceProperties.getEffectiveToTime()); - relationshipProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - - relatedElement.setRelationshipProperties(relationshipProperties); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.RELATIONSHIP_DEF, methodName); - } - - - if (entity != null) - { - ElementStub elementStub = this.getElementStub(beanClass, entity, methodName); - - relatedElement.setRelatedElement(elementStub); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - - return relatedElement; - } - - - - /** - * Using the supplied instances, return a new instance of a relatedElement bean. This is used for beans that - * contain a combination of the properties from an entityProxy and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entityProxy entityProxy containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - public RelatedElement getRelatedElement(Class beanClass, - Relationship relationship, - EntityProxy entityProxy, - String methodName) throws PropertyServerException - { - RelatedElement relatedElement = new RelatedElement(); - - relatedElement.setRelationshipHeader(this.getMetadataElementHeader(beanClass, relationship, null, methodName)); - - if (relationship != null) - { - InstanceProperties instanceProperties = new InstanceProperties(relationship.getProperties()); - - RelationshipProperties relationshipProperties = new RelationshipProperties(); - - relationshipProperties.setEffectiveFrom(instanceProperties.getEffectiveFromTime()); - relationshipProperties.setEffectiveTo(instanceProperties.getEffectiveToTime()); - relationshipProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - - relatedElement.setRelationshipProperties(relationshipProperties); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.RELATIONSHIP_DEF, methodName); - } - - - if (entityProxy != null) - { - ElementStub elementStub = this.getElementStub(beanClass, entityProxy, methodName); - - relatedElement.setRelatedElement(elementStub); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - - return relatedElement; - } - -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/converters/CertificationTypeConverter.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/converters/CertificationTypeConverter.java deleted file mode 100644 index 276910e1651..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/converters/CertificationTypeConverter.java +++ /dev/null @@ -1,141 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.converters; - - -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.CertificationTypeElement; -import org.odpi.openmetadata.accessservices.assetowner.properties.CertificationTypeProperties; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; - - -/** - * CertificationTypeConverter provides common methods for transferring relevant properties from an Open Metadata Repository Services (OMRS) - * EntityDetail object into a bean that inherits from CertificationTypeElement. - */ -public class CertificationTypeConverter extends AssetOwnerOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public CertificationTypeConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - - /** - * Using the supplied entity, return a new instance of the bean. This is used for most beans that have - * a one to one correspondence with the repository instances. - * - * @param beanClass name of the class to create - * @param primaryEntity entity containing the properties - * @param methodName calling method - * @return bean populated with properties from the entity supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - public B getNewBean(Class beanClass, - EntityDetail primaryEntity, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof CertificationTypeElement) - { - CertificationTypeElement bean = (CertificationTypeElement) returnBean; - - if (primaryEntity != null) - { - bean.setElementHeader(this.getMetadataElementHeader(beanClass, primaryEntity, primaryEntity.getClassifications(), methodName)); - - /* - * The initial set of values come from the entity. - */ - InstanceProperties instanceProperties = new InstanceProperties(primaryEntity.getProperties()); - - CertificationTypeProperties governanceDefinitionProperties = new CertificationTypeProperties(); - - governanceDefinitionProperties.setDocumentIdentifier(this.removeQualifiedName(instanceProperties)); - governanceDefinitionProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); - governanceDefinitionProperties.setTitle(this.removeTitle(instanceProperties)); - governanceDefinitionProperties.setScope(this.removeScope(instanceProperties)); - governanceDefinitionProperties.setDomainIdentifier(this.removeDomainIdentifier(instanceProperties)); - governanceDefinitionProperties.setPriority(this.removePriority(instanceProperties)); - governanceDefinitionProperties.setOutcomes(this.removeOutcomes(instanceProperties)); - governanceDefinitionProperties.setResults(this.removeResults(instanceProperties)); - governanceDefinitionProperties.setDetails(this.removeDetails(instanceProperties)); - - /* - * Any remaining properties are returned in the extended properties. They are - * assumed to be defined in a subtype. - */ - governanceDefinitionProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); - governanceDefinitionProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - - bean.setProperties(governanceDefinitionProperties); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @SuppressWarnings(value = "unused") - public B getNewBean(Class beanClass, - EntityDetail entity, - Relationship relationship, - String methodName) throws PropertyServerException - { - final String thisMethodName = "getNewBean(entity, relationship)"; - B returnBean = this.getNewBean(beanClass, entity, methodName); - - if (returnBean instanceof CertificationTypeElement) - { - CertificationTypeElement bean = (CertificationTypeElement) returnBean; - - bean.setRelatedElement(super.getRelatedElement(beanClass, entity, relationship, methodName)); - } - - return returnBean; - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/converters/ConnectionConverter.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/converters/ConnectionConverter.java deleted file mode 100644 index c244a6807b1..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/converters/ConnectionConverter.java +++ /dev/null @@ -1,156 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.converters; - -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.ConnectionElement; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.EmbeddedConnection; -import org.odpi.openmetadata.accessservices.assetowner.properties.ConnectionProperties; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; -import java.util.ArrayList; -import java.util.List; - -/** - * ConnectionConverter transfers the relevant properties from some Open Metadata Repository Services (OMRS) - * EntityDetail and Relationship objects into a Connection bean (or a VirtualConnection bean). - */ -public class ConnectionConverter extends AssetOwnerOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public ConnectionConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - /** - * Using the supplied instances, return a new instance of the bean. It is used for beans such as - * a connection bean which made up of 3 entities (Connection, ConnectorType and Endpoint) plus the - * relationships between them. The relationships may be omitted if they do not have an properties. - * - * @param beanClass name of the class to create - * @param primaryEntity entity that is the root of the collection of entities that make up the - * content of the bean - * @param supplementaryEntities entities connected to the primary entity by the relationships - * @param relationships relationships linking the entities - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - @SuppressWarnings(value = "unchecked") - public B getNewComplexBean(Class beanClass, - EntityDetail primaryEntity, - List supplementaryEntities, - List relationships, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof ConnectionElement) - { - ConnectionElement bean = (ConnectionElement) returnBean; - ConnectionProperties connectionProperties = new ConnectionProperties(); - - if (primaryEntity != null) - { - bean.setElementHeader(this.getMetadataElementHeader(beanClass, primaryEntity, methodName)); - - /* - * The initial set of values come from the entity. - */ - InstanceProperties instanceProperties = new InstanceProperties(primaryEntity.getProperties()); - - connectionProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); - connectionProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); - connectionProperties.setDisplayName(this.removeDisplayName(instanceProperties)); - connectionProperties.setDescription(this.removeDescription(instanceProperties)); - connectionProperties.setSecuredProperties(this.removeSecuredProperties(instanceProperties)); - connectionProperties.setConfigurationProperties(this.removeConfigurationProperties(instanceProperties)); - connectionProperties.setUserId(this.removeUserId(instanceProperties)); - connectionProperties.setClearPassword(this.removeClearPassword(instanceProperties)); - connectionProperties.setEncryptedPassword(this.removeEncryptedPassword(instanceProperties)); - /* - * Any remaining properties are returned in the extended properties. They are - * assumed to be defined in a subtype. - */ - connectionProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); - connectionProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - - bean.setConnectionProperties(connectionProperties); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - - if (relationships != null) - { - List embeddedConnections = new ArrayList<>(); - - for (Relationship relationship : relationships) - { - if ((relationship != null) && (relationship.getType() != null)) - { - if (repositoryHelper.isTypeOf(serviceName, relationship.getType().getTypeDefName(), OpenMetadataType.EMBEDDED_CONNECTION_TYPE_NAME)) - { - EmbeddedConnection embeddedConnection = new EmbeddedConnection(); - - InstanceProperties relationshipProperties = relationship.getProperties(); - - embeddedConnection.setPosition(this.getPosition(relationshipProperties)); - embeddedConnection.setDisplayName(this.getDisplayName(relationshipProperties)); - embeddedConnection.setArguments(this.getArguments(relationshipProperties)); - - embeddedConnection.setEmbeddedConnection(getElementStub(beanClass, relationship.getEntityTwoProxy(), methodName)); - - embeddedConnections.add(embeddedConnection); - } - else if (repositoryHelper.isTypeOf(serviceName, relationship.getType().getTypeDefName(), OpenMetadataType.CONNECTION_CONNECTOR_TYPE_TYPE_NAME)) - { - bean.setConnectorType(getElementStub(beanClass, relationship.getEntityTwoProxy(), methodName)); - } - else if (repositoryHelper.isTypeOf(serviceName, relationship.getType().getTypeDefName(), OpenMetadataType.CONNECTION_ENDPOINT_TYPE_NAME)) - { - bean.setEndpoint(getElementStub(beanClass, relationship.getEntityOneProxy(), methodName)); - } - } - } - - if (! embeddedConnections.isEmpty()) - { - bean.setEmbeddedConnections(embeddedConnections); - } - } - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/converters/ConnectorTypeConverter.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/converters/ConnectorTypeConverter.java deleted file mode 100644 index 52ef342e8c9..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/converters/ConnectorTypeConverter.java +++ /dev/null @@ -1,136 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.converters; - -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.ConnectorTypeElement; -import org.odpi.openmetadata.accessservices.assetowner.properties.ConnectorTypeProperties; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; - -/** - * ConnectorTypeConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) - * EntityDetail object into a ConnectorTypeElement bean. - */ -public class ConnectorTypeConverter extends AssetOwnerOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity/relationship objects - * @param serviceName name of this component - * @param serverName local server name - */ - public ConnectorTypeConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof ConnectorTypeElement) - { - ConnectorTypeElement bean = (ConnectorTypeElement) returnBean; - ConnectorTypeProperties connectorTypeProperties = new ConnectorTypeProperties(); - - if (entity != null) - { - bean.setElementHeader(this.getMetadataElementHeader(beanClass, entity, methodName)); - - /* - * The initial set of values come from the entity. - */ - InstanceProperties instanceProperties = new InstanceProperties(entity.getProperties()); - - connectorTypeProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); - connectorTypeProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); - connectorTypeProperties.setDisplayName(this.removeDisplayName(instanceProperties)); - connectorTypeProperties.setDescription(this.removeDescription(instanceProperties)); - connectorTypeProperties.setSupportedAssetTypeName(this.removeSupportedAssetTypeName(instanceProperties)); - connectorTypeProperties.setExpectedDataFormat(this.removeExpectedDataFormat(instanceProperties)); - connectorTypeProperties.setConnectorProviderClassName(this.removeConnectorProviderClassName(instanceProperties)); - connectorTypeProperties.setConnectorFrameworkName(this.removeConnectorFrameworkName(instanceProperties)); - connectorTypeProperties.setConnectorInterfaceLanguage(this.removeConnectorInterfaceLanguage(instanceProperties)); - connectorTypeProperties.setConnectorInterfaces(this.removeConnectorInterfaces(instanceProperties)); - connectorTypeProperties.setTargetTechnologySource(this.removeTargetTechnologySource(instanceProperties)); - connectorTypeProperties.setTargetTechnologyName(this.removeTargetTechnologyName(instanceProperties)); - connectorTypeProperties.setTargetTechnologyInterfaces(this.removeTargetTechnologyInterfaces(instanceProperties)); - connectorTypeProperties.setTargetTechnologyVersions(this.removeTargetTechnologyVersions(instanceProperties)); - connectorTypeProperties.setRecognizedAdditionalProperties(this.removeRecognizedAdditionalProperties(instanceProperties)); - connectorTypeProperties.setRecognizedSecuredProperties(this.removeRecognizedSecuredProperties(instanceProperties)); - connectorTypeProperties.setRecognizedConfigurationProperties(this.removeRecognizedConfigurationProperties(instanceProperties)); - - /* - * Any remaining properties are returned in the extended properties. They are - * assumed to be defined in a subtype. - */ - connectorTypeProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); - connectorTypeProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - - bean.setConnectorTypeProperties(connectorTypeProperties); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - Relationship relationship, - String methodName) throws PropertyServerException - { - return getNewBean(beanClass, entity, methodName); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/converters/DataFileConverter.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/converters/DataFileConverter.java deleted file mode 100644 index ed865b32dd6..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/converters/DataFileConverter.java +++ /dev/null @@ -1,141 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.converters; - -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.FileElement; -import org.odpi.openmetadata.accessservices.assetowner.properties.FileProperties; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; - -/** - * DataFileConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) - * EntityDetail object into a DataFileElement bean. - */ -public class DataFileConverter extends AssetOwnerOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity/relationship objects - * @param serviceName name of this component - * @param serverName local server name - */ - public DataFileConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - @SuppressWarnings(value = "deprecation") - public B getNewBean(Class beanClass, - EntityDetail entity, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof FileElement bean) - { - FileProperties fileProperties = new FileProperties(); - - bean.setElementHeader(super.getMetadataElementHeader(beanClass, entity, methodName)); - - InstanceProperties instanceProperties; - - /* - * The initial set of values come from the entity. - */ - if (entity != null) - { - instanceProperties = new InstanceProperties(entity.getProperties()); - - fileProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); - fileProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); - fileProperties.setName(this.removeName(instanceProperties)); - fileProperties.setVersionIdentifier(this.removeVersionIdentifier(instanceProperties)); - fileProperties.setDescription(this.removeDescription(instanceProperties)); - fileProperties.setPathName(this.removePathName(instanceProperties)); - fileProperties.setCreateTime(this.removeStoreCreateTime(instanceProperties)); - fileProperties.setModifiedTime(this.removeStoreUpdateTime(instanceProperties)); - fileProperties.setDeployedImplementationType(this.removeDeployedImplementationType(instanceProperties)); - fileProperties.setFileName(this.removeFileName(instanceProperties)); - fileProperties.setFileType(this.removeFileType(instanceProperties)); - fileProperties.setFileExtension(this.removeFileExtension(instanceProperties)); - - /* - * Any remaining properties are returned in the extended properties. They are - * assumed to be defined in a subtype. - */ - fileProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); - fileProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - - instanceProperties = super.getClassificationProperties(OpenMetadataType.DATA_ASSET_ENCODING_CLASSIFICATION.typeName, entity); - - fileProperties.setEncodingType(this.getDataStoreEncodingType(instanceProperties)); - fileProperties.setEncodingLanguage(this.getDataStoreEncodingLanguage(instanceProperties)); - fileProperties.setEncodingDescription(this.getDataStoreEncodingDescription(instanceProperties)); - fileProperties.setEncodingProperties(this.getEncodingProperties(instanceProperties)); - - bean.setFileProperties(fileProperties); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - Relationship relationship, - String methodName) throws PropertyServerException - { - return getNewBean(beanClass, entity, methodName); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/converters/ElementHeaderConverter.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/converters/ElementHeaderConverter.java deleted file mode 100644 index 7bf24f405bf..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/converters/ElementHeaderConverter.java +++ /dev/null @@ -1,191 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.converters; - -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityProxy; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; - -/** - * ElementHeaderConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) - * EntityDetail object into a ElementHeader bean. - */ -public class ElementHeaderConverter extends AssetOwnerOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity/relationship objects - * @param serviceName name of this component - * @param serverName local server name - */ - public ElementHeaderConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @SuppressWarnings(value = "unchecked") - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof ElementHeader) - { - if (entity != null) - { - returnBean = (B) this.getMetadataElementHeader(beanClass, entity, methodName); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @SuppressWarnings(value = "unchecked") - public B getNewBean(Class beanClass, - EntityProxy entity, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof ElementHeader) - { - if (entity != null) - { - returnBean = (B) this.getMetadataElementHeader(beanClass, entity, null, methodName); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from a relationship and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @SuppressWarnings(value = "unchecked") - public B getNewBean(Class beanClass, - Relationship relationship, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof ElementHeader) - { - if (relationship != null) - { - returnBean = (B) this.getMetadataElementHeader(beanClass, relationship, null, methodName); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - Relationship relationship, - String methodName) throws PropertyServerException - { - return getNewBean(beanClass, entity, methodName); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/converters/EndpointConverter.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/converters/EndpointConverter.java deleted file mode 100644 index 9d9bd686f78..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/converters/EndpointConverter.java +++ /dev/null @@ -1,127 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.converters; - -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.EndpointElement; -import org.odpi.openmetadata.accessservices.assetowner.properties.EndpointProperties; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; - -/** - * EndpointConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) - * EntityDetail object into a EndpointElement bean. - */ -public class EndpointConverter extends AssetOwnerOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity/relationship objects - * @param serviceName name of this component - * @param serverName local server name - */ - public EndpointConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof EndpointElement) - { - EndpointElement bean = (EndpointElement) returnBean; - EndpointProperties endpointProperties = new EndpointProperties(); - - if (entity != null) - { - bean.setElementHeader(this.getMetadataElementHeader(beanClass, entity, methodName)); - - /* - * The initial set of values come from the entity. - */ - InstanceProperties instanceProperties = new InstanceProperties(entity.getProperties()); - - endpointProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); - endpointProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); - endpointProperties.setName(this.removeName(instanceProperties)); - endpointProperties.setDescription(this.removeDescription(instanceProperties)); - endpointProperties.setAddress(this.removeNetworkAddress(instanceProperties)); - endpointProperties.setProtocol(this.removeProtocol(instanceProperties)); - endpointProperties.setEncryptionMethod(this.removeEncryptionMethod(instanceProperties)); - - - /* - * Any remaining properties are returned in the extended properties. They are - * assumed to be defined in a subtype. - */ - endpointProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); - endpointProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - - bean.setEndpointProperties(endpointProperties); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - Relationship relationship, - String methodName) throws PropertyServerException - { - return getNewBean(beanClass, entity, methodName); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/converters/ExternalReferenceConverter.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/converters/ExternalReferenceConverter.java deleted file mode 100644 index d2d8b23bccf..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/converters/ExternalReferenceConverter.java +++ /dev/null @@ -1,136 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.converters; - - -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.ExternalReferenceElement; -import org.odpi.openmetadata.accessservices.assetowner.properties.ExternalReferenceProperties; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; - - -/** - * ExternalReferenceConverter provides common methods for transferring relevant properties from an Open Metadata Repository Services (OMRS) - * EntityDetail object into a bean that inherits from ExternalReferenceElement. - */ -public class ExternalReferenceConverter extends AssetOwnerOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public ExternalReferenceConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - String methodName) throws PropertyServerException - { - return getNewBean(beanClass, entity, null, methodName); - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - Relationship relationship, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof ExternalReferenceElement) - { - ExternalReferenceElement bean = (ExternalReferenceElement) returnBean; - - if (entity != null) - { - bean.setElementHeader(this.getMetadataElementHeader(beanClass, entity, entity.getClassifications(), methodName)); - ExternalReferenceProperties externalReferenceProperties = new ExternalReferenceProperties(); - - /* - * The initial set of values come from the entity. - */ - InstanceProperties instanceProperties = new InstanceProperties(entity.getProperties()); - - externalReferenceProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); - externalReferenceProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); - externalReferenceProperties.setDisplayName(this.removeDisplayName(instanceProperties)); - externalReferenceProperties.setURI(this.removeURL(instanceProperties)); - externalReferenceProperties.setVersion(this.removeReferenceVersion(instanceProperties)); - externalReferenceProperties.setResourceDescription(this.removeDescription(instanceProperties)); - externalReferenceProperties.setOrganization(this.removeOwningOrganization(instanceProperties)); - - /* - * Any remaining properties are returned in the extended properties. They are - * assumed to be defined in a subtype. - */ - externalReferenceProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); - externalReferenceProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - - if (relationship != null) - { - instanceProperties = relationship.getProperties(); - - externalReferenceProperties.setLinkDescription(this.getDescription(instanceProperties)); - externalReferenceProperties.setLocalReferenceId(this.getReferenceId(instanceProperties)); - } - - bean.setProperties(externalReferenceProperties); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/converters/FileFolderConverter.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/converters/FileFolderConverter.java deleted file mode 100644 index b2bc242a3a5..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/converters/FileFolderConverter.java +++ /dev/null @@ -1,139 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.converters; - -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.FolderElement; -import org.odpi.openmetadata.accessservices.assetowner.properties.FolderProperties; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; - -/** - * FileFolderConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) - * EntityDetail object into a FileFolderElement bean. - */ -public class FileFolderConverter extends AssetConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity/relationship objects - * @param serviceName name of this component - * @param serverName local server name - */ - public FileFolderConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - @SuppressWarnings(value = "deprecation") - public B getNewBean(Class beanClass, - EntityDetail entity, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof FolderElement) - { - FolderElement bean = (FolderElement) returnBean; - FolderProperties folderProperties = new FolderProperties(); - - bean.setElementHeader(super.getMetadataElementHeader(beanClass, entity, methodName)); - - InstanceProperties instanceProperties; - - /* - * The initial set of values come from the entity. - */ - if (entity != null) - { - instanceProperties = new InstanceProperties(entity.getProperties()); - - folderProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); - folderProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); - folderProperties.setName(this.removeName(instanceProperties)); - folderProperties.setDisplayName(folderProperties.getName()); - folderProperties.setVersionIdentifier(this.removeVersionIdentifier(instanceProperties)); - folderProperties.setDescription(this.removeDescription(instanceProperties)); - folderProperties.setPathName(this.removePathName(instanceProperties)); - folderProperties.setCreateTime(this.removeStoreCreateTime(instanceProperties)); - folderProperties.setModifiedTime(this.removeStoreUpdateTime(instanceProperties)); - - /* - * Any remaining properties are returned in the extended properties. They are - * assumed to be defined in a subtype. - */ - folderProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); - folderProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - - instanceProperties = super.getClassificationProperties(OpenMetadataType.DATA_ASSET_ENCODING_CLASSIFICATION.typeName, entity); - - folderProperties.setEncodingType(this.getDataStoreEncodingType(instanceProperties)); - folderProperties.setEncodingLanguage(this.getDataStoreEncodingLanguage(instanceProperties)); - folderProperties.setEncodingDescription(this.getDataStoreEncodingDescription(instanceProperties)); - folderProperties.setEncodingProperties(this.getEncodingProperties(instanceProperties)); - - bean.setFolderProperties(folderProperties); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - Relationship relationship, - String methodName) throws PropertyServerException - { - return getNewBean(beanClass, entity, methodName); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/converters/FileSystemConverter.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/converters/FileSystemConverter.java deleted file mode 100644 index 8987aad2a0d..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/converters/FileSystemConverter.java +++ /dev/null @@ -1,131 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.converters; - -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.FileSystemElement; -import org.odpi.openmetadata.accessservices.assetowner.properties.FileSystemProperties; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; - -/** - * FileSystemConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) - * EntityDetail object into a FileSystemElement bean. - */ -public class FileSystemConverter extends AssetOwnerOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public FileSystemConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof FileSystemElement) - { - FileSystemElement bean = (FileSystemElement) returnBean; - FileSystemProperties fileSystemProperties = new FileSystemProperties(); - - if (entity != null) - { - /* - * The initial set of values come from the entity. - */ - InstanceProperties instanceProperties = new InstanceProperties(entity.getProperties()); - - fileSystemProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); - fileSystemProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); - fileSystemProperties.setDisplayName(this.removeName(instanceProperties)); - fileSystemProperties.setDescription(this.removeDescription(instanceProperties)); - fileSystemProperties.setTypeDescription(this.removeCapabilityType(instanceProperties)); - fileSystemProperties.setVersion(this.removeCapabilityVersion(instanceProperties)); - fileSystemProperties.setPatchLevel(this.removePatchLevel(instanceProperties)); - fileSystemProperties.setSource(this.removeSource(instanceProperties)); - - /* - * Any remaining properties are returned in the extended properties. They are - * assumed to be defined in a subtype. - */ - fileSystemProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); - fileSystemProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - - instanceProperties = super.getClassificationProperties(OpenMetadataType.FILE_SYSTEM_CLASSIFICATION_TYPE_NAME, entity); - - fileSystemProperties.setFormat(this.getFormat(instanceProperties)); - fileSystemProperties.setEncryption(this.getEncryption(instanceProperties)); - - bean.setFileSystemProperties(fileSystemProperties); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - Relationship relationship, - String methodName) throws PropertyServerException - { - return getNewBean(beanClass, entity, methodName); - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/converters/LicenseTypeConverter.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/converters/LicenseTypeConverter.java deleted file mode 100644 index 525c86ad9bf..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/converters/LicenseTypeConverter.java +++ /dev/null @@ -1,141 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.converters; - - -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.LicenseTypeElement; -import org.odpi.openmetadata.accessservices.assetowner.properties.LicenseTypeProperties; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; - - -/** - * LicenseTypeConverter provides common methods for transferring relevant properties from an Open Metadata Repository Services (OMRS) - * EntityDetail object into a bean that inherits from LicenseTypeElement. - */ -public class LicenseTypeConverter extends AssetOwnerOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public LicenseTypeConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - - /** - * Using the supplied entity, return a new instance of the bean. This is used for most beans that have - * a one to one correspondence with the repository instances. - * - * @param beanClass name of the class to create - * @param primaryEntity entity containing the properties - * @param methodName calling method - * @return bean populated with properties from the entity supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - public B getNewBean(Class beanClass, - EntityDetail primaryEntity, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof LicenseTypeElement) - { - LicenseTypeElement bean = (LicenseTypeElement) returnBean; - - if (primaryEntity != null) - { - bean.setElementHeader(this.getMetadataElementHeader(beanClass, primaryEntity, primaryEntity.getClassifications(), methodName)); - - /* - * The initial set of values come from the entity. - */ - InstanceProperties instanceProperties = new InstanceProperties(primaryEntity.getProperties()); - - LicenseTypeProperties licenseTypeProperties = new LicenseTypeProperties(); - - licenseTypeProperties.setDocumentIdentifier(this.removeQualifiedName(instanceProperties)); - licenseTypeProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); - licenseTypeProperties.setTitle(this.removeTitle(instanceProperties)); - licenseTypeProperties.setScope(this.removeScope(instanceProperties)); - licenseTypeProperties.setDomainIdentifier(this.removeDomainIdentifier(instanceProperties)); - licenseTypeProperties.setPriority(this.removePriority(instanceProperties)); - licenseTypeProperties.setOutcomes(this.removeOutcomes(instanceProperties)); - licenseTypeProperties.setResults(this.removeResults(instanceProperties)); - licenseTypeProperties.setDetails(this.removeDetails(instanceProperties)); - - /* - * Any remaining properties are returned in the extended properties. They are - * assumed to be defined in a subtype. - */ - licenseTypeProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); - licenseTypeProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - - bean.setProperties(licenseTypeProperties); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @SuppressWarnings(value = "unused") - public B getNewBean(Class beanClass, - EntityDetail entity, - Relationship relationship, - String methodName) throws PropertyServerException - { - final String thisMethodName = "getNewBean(entity, relationship)"; - B returnBean = this.getNewBean(beanClass, entity, methodName); - - if (returnBean instanceof LicenseTypeElement) - { - LicenseTypeElement bean = (LicenseTypeElement) returnBean; - - bean.setRelatedElement(super.getRelatedElement(beanClass, entity, relationship, methodName)); - } - - return returnBean; - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/converters/RelatedElementConverter.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/converters/RelatedElementConverter.java deleted file mode 100644 index a472abe9b61..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/converters/RelatedElementConverter.java +++ /dev/null @@ -1,64 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.converters; - - -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - - -/** - * RelatedElementConverter generates a RelatedElement from a relationship and attached entity - */ -public class RelatedElementConverter extends AssetOwnerOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public RelatedElementConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - @SuppressWarnings(value = "unchecked") - public B getNewBean(Class beanClass, - EntityDetail entity, - Relationship relationship, - String methodName) throws PropertyServerException - { - try - { - return (B)super.getRelatedElement(beanClass, entity, relationship, methodName); - } - catch (ClassCastException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/converters/SchemaAttributeConverter.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/converters/SchemaAttributeConverter.java deleted file mode 100644 index eb086053951..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/converters/SchemaAttributeConverter.java +++ /dev/null @@ -1,160 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.converters; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.SchemaAttributeElement; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.SchemaTypeElement; -import org.odpi.openmetadata.accessservices.assetowner.properties.SchemaAttributeProperties; -import org.odpi.openmetadata.frameworks.openmetadata.enums.DataItemSortOrder; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; -import java.util.List; - - -/** - * SchemaAttributeConverter provides common methods for transferring relevant properties from an Open Metadata Repository Services (OMRS) - * EntityDetail object into a SchemaAttributeElement bean. - */ -public class SchemaAttributeConverter extends AssetOwnerOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public SchemaAttributeConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - /** - * Extract the properties from the schema attribute entity. Each API creates a specialization of this method for its beans. - * - * @param beanClass name of the class to create - * @param schemaAttributeEntity entity containing the properties for the main schema attribute - * @param typeClass name of type used to describe the schema type - * @param schemaType bean containing the properties of the schema type - this is filled out by the schema type converter - * @param schemaAttributeRelationships relationships containing the links to other schema attributes - * @param methodName calling method - * @param bean type used to create the schema type - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewSchemaAttributeBean(Class beanClass, - EntityDetail schemaAttributeEntity, - Class typeClass, - T schemaType, - List schemaAttributeRelationships, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof SchemaAttributeElement bean) - { - SchemaAttributeProperties schemaAttributeProperties = new SchemaAttributeProperties(); - - if (schemaAttributeEntity != null) - { - /* - * Check that the entity is of the correct type. - */ - bean.setElementHeader(this.getMetadataElementHeader(beanClass, schemaAttributeEntity, methodName)); - - /* - * The initial set of values come from the entity properties. The super class properties are removed from a copy of the entities - * properties, leaving any subclass properties to be stored in extended properties. - */ - InstanceProperties instanceProperties = new InstanceProperties(schemaAttributeEntity.getProperties()); - - schemaAttributeProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); - schemaAttributeProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); - schemaAttributeProperties.setDisplayName(this.removeDisplayName(instanceProperties)); - schemaAttributeProperties.setDescription(this.removeDescription(instanceProperties)); - schemaAttributeProperties.setIsDeprecated(this.removeIsDeprecated(instanceProperties)); - schemaAttributeProperties.setElementPosition(this.removePosition(instanceProperties)); - schemaAttributeProperties.setMinCardinality(this.removeMinCardinality(instanceProperties)); - schemaAttributeProperties.setMaxCardinality(this.removeMaxCardinality(instanceProperties)); - schemaAttributeProperties.setAllowsDuplicateValues(this.removeAllowsDuplicateValues(instanceProperties)); - schemaAttributeProperties.setOrderedValues(this.removeOrderedValues(instanceProperties)); - schemaAttributeProperties.setDefaultValueOverride(this.removeDefaultValueOverride(instanceProperties)); - schemaAttributeProperties.setMinimumLength(this.removeMinimumLength(instanceProperties)); - schemaAttributeProperties.setLength(this.removeLength(instanceProperties)); - schemaAttributeProperties.setPrecision(this.removePrecision(instanceProperties)); - schemaAttributeProperties.setSignificantDigits(this.removeSignificantDigits(instanceProperties)); - schemaAttributeProperties.setIsNullable(this.removeIsNullable(instanceProperties)); - schemaAttributeProperties.setNativeJavaClass(this.removeNativeClass(instanceProperties)); - schemaAttributeProperties.setAliases(this.removeAliases(instanceProperties)); - schemaAttributeProperties.setSortOrder(this.removeSortOrder(instanceProperties)); - - if (schemaType instanceof SchemaTypeElement) - { - schemaAttributeProperties.setAttributeType(((SchemaTypeElement) schemaType).getSchemaTypeProperties()); - } - - bean.setSchemaAttributeProperties(schemaAttributeProperties); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - - /** - * Extract and delete the sortOrder property from the supplied instance properties. - * - * @param instanceProperties properties from entity - * @return DataItemSortOrder enum - */ - private DataItemSortOrder removeSortOrder(InstanceProperties instanceProperties) - { - final String methodName = "removeSortOrder"; - - if (instanceProperties != null) - { - int ordinal = repositoryHelper.removeEnumPropertyOrdinal(serviceName, - OpenMetadataProperty.SORT_ORDER.name, - instanceProperties, - methodName); - - for (DataItemSortOrder dataItemSortOrder : DataItemSortOrder.values()) - { - if (dataItemSortOrder.getOrdinal() == ordinal) - { - return dataItemSortOrder; - } - } - } - - return DataItemSortOrder.UNSORTED; - } - -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/converters/SchemaTypeConverter.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/converters/SchemaTypeConverter.java deleted file mode 100644 index 095080c9a0a..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/converters/SchemaTypeConverter.java +++ /dev/null @@ -1,195 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.converters; - -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.*; -import org.odpi.openmetadata.accessservices.assetowner.properties.*; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.*; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; -import java.util.ArrayList; -import java.util.List; - - -/** - * SchemaTypeConverter provides common methods for transferring relevant properties from an Open Metadata Repository Services (OMRS) - * EntityDetail object into a SchemaTypeElement bean. - */ -public class SchemaTypeConverter extends AssetOwnerOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public SchemaTypeConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - /** - * Return the converted bean. This is a special method used for schema types since they are stored - * as a collection of instances. For external schema types and map elements, both the GUID and the bean are returned to - * allow the consuming OMAS to choose whether it is returning GUIDs of the linked to schema or the schema type bean itself. - * - * @param beanClass name of the class to create - * @param schemaRootHeader header of the schema element that holds the root information - * @param schemaTypeTypeName name of type of the schema type to create - * @param schemaRootProperties properties describing the schema type - * @param schemaRootClassifications classifications from the schema root entity - * @param attributeCount number of attributes (for a complex schema type) - * @param validValueSetGUID unique identifier of the set of valid values (for an enum schema type) - * @param externalSchemaTypeGUID unique identifier of the external schema type - * @param externalSchemaType unique identifier for the properties of the schema type that is shared by multiple attributes/assets - * @param mapFromSchemaTypeGUID unique identifier of the mapFrom schema type - * @param mapFromSchemaType bean containing the properties of the schema type that is part of a map definition - * @param mapToSchemaTypeGUID unique identifier of the mapTo schema type - * @param mapToSchemaType bean containing the properties of the schema type that is part of a map definition - * @param schemaTypeOptionGUIDs list of unique identifiers for schema types that could be the type for this attribute - * @param schemaTypeOptions list of schema types that could be the type for this attribute - * @param queryTargetRelationships list of relationships to schema types that contain data values used to derive the schema type value(s) - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewSchemaTypeBean(Class beanClass, - InstanceHeader schemaRootHeader, - String schemaTypeTypeName, - InstanceProperties schemaRootProperties, - List schemaRootClassifications, - int attributeCount, - String validValueSetGUID, - String externalSchemaTypeGUID, - B externalSchemaType, - String mapFromSchemaTypeGUID, - B mapFromSchemaType, - String mapToSchemaTypeGUID, - B mapToSchemaType, - List schemaTypeOptionGUIDs, - List schemaTypeOptions, - List queryTargetRelationships, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof SchemaTypeElement) - { - if ((schemaRootHeader != null) && (schemaRootProperties != null)) - { - SchemaTypeElement bean = (SchemaTypeElement)returnBean; - - bean.setElementHeader(this.getMetadataElementHeader(beanClass, schemaRootHeader, schemaRootClassifications, methodName)); - - /* - * Set up schema properties to create. - */ - InstanceProperties instanceProperties = new InstanceProperties(schemaRootProperties); - SchemaTypeProperties schemaTypeProperties = new SchemaTypeProperties(); - - schemaTypeProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); - schemaTypeProperties.setDisplayName(this.removeDisplayName(instanceProperties)); - schemaTypeProperties.setDescription(this.removeDescription(instanceProperties)); - schemaTypeProperties.setIsDeprecated(this.removeIsDeprecated(instanceProperties)); - schemaTypeProperties.setVersionNumber(this.removeVersionNumber(instanceProperties)); - schemaTypeProperties.setAuthor(this.removeAuthor(instanceProperties)); - schemaTypeProperties.setUsage(this.removeUsage(instanceProperties)); - schemaTypeProperties.setEncodingStandard(this.removeEncodingStandard(instanceProperties)); - schemaTypeProperties.setNamespace(this.removeNamespace(instanceProperties)); - schemaTypeProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); - - /* - * Any remaining properties are returned in the extended properties. They are - * assumed to be defined in a subtype. - */ - schemaTypeProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - - bean.setSchemaTypeProperties(schemaTypeProperties); - - bean.setAttributeCount(attributeCount); - bean.setMapFromElement((SchemaTypeElement)mapFromSchemaType); - bean.setMapToElement((SchemaTypeElement)mapToSchemaType); - bean.setExternalSchemaType((SchemaTypeElement)externalSchemaType); - - if ((schemaTypeOptions != null) && (! schemaTypeOptions.isEmpty())) - { - List schemaTypeOptionBeans = new ArrayList<>(); - - for (B optionBean : schemaTypeOptions) - { - if (optionBean != null) - { - schemaTypeOptionBeans.add((SchemaTypeElement) optionBean); - } - } - - if (! schemaTypeOptionBeans.isEmpty()) - { - bean.setSchemaOptions(schemaTypeOptionBeans); - } - } - - InstanceProperties classificationProperties = - super.getClassificationProperties(OpenMetadataType.CALCULATED_VALUE_CLASSIFICATION_TYPE_NAME, - schemaRootClassifications); - - bean.setFormula(this.getFormula(classificationProperties)); - bean.setFormulaType(this.getFormulaType(classificationProperties)); - - if (queryTargetRelationships != null) - { - List queryTargets = new ArrayList<>(); - - for (Relationship relationship : queryTargetRelationships) - { - if ((relationship != null) && (relationship.getEntityTwoProxy() != null)) - { - DerivedSchemaTypeQueryTargetProperties queryTargetProperties = new DerivedSchemaTypeQueryTargetProperties(); - - queryTargetProperties.setQueryId(this.getQueryId(relationship.getProperties())); - queryTargetProperties.setQuery(this.getQuery(relationship.getProperties())); - queryTargetProperties.setQueryTargetGUID(relationship.getEntityTwoProxy().getGUID()); - - queryTargets.add(queryTargetProperties); - } - else - { - handleBadRelationship(beanClass.getName(), relationship, methodName); - } - } - if (! queryTargets.isEmpty()) - { - bean.setQueries(queryTargets); - } - } - - return returnBean; - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - } - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/converters/SurveyReportConverter.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/converters/SurveyReportConverter.java deleted file mode 100644 index b609a636996..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/converters/SurveyReportConverter.java +++ /dev/null @@ -1,132 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.converters; - -import org.odpi.openmetadata.commonservices.generichandlers.SAFConverter; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.surveyaction.properties.SurveyReport; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.*; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; -import java.util.List; - - - -/** - * SurveyReportConverter transfers the relevant properties from some Open Metadata Repository Services (OMRS) - * EntityDetail object into an SurveyReport bean. - */ -public class SurveyReportConverter extends SAFConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity/relationship objects - * @param serviceName name of this component - * @param serverName local server name - */ - public SurveyReportConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - /** - * Using the supplied instances, return a new instance of the bean. It is used for beans such as - * a connection bean which made up of 3 entities (Connection, ConnectorType and Endpoint) plus the - * relationships between them. The relationships may be omitted if they do not have an properties. - * - * @param beanClass name of the class to create - * @param primaryEntity entity that is the root of the collection of entities that make up the - * content of the bean - * @param supplementaryEntities entities connected to the primary entity by the relationships - * @param relationships relationships linking the entities - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewComplexBean(Class beanClass, - EntityDetail primaryEntity, - List supplementaryEntities, - List relationships, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof SurveyReport bean) - { - /* - * Check that the entity is of the correct type. - */ - bean.setElementHeader(this.getMetadataElementHeader(beanClass, primaryEntity, methodName)); - - /* - * The initial set of values come from the entity properties. The super class properties are removed from a copy of the entities - * properties, leaving any subclass properties to be stored in extended properties. - */ - InstanceProperties instanceProperties = new InstanceProperties(primaryEntity.getProperties()); - - bean.setQualifiedName(this.removeQualifiedName(instanceProperties)); - bean.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); - - bean.setDisplayName(this.removeDisplayName(instanceProperties)); - bean.setDescription(this.removeDescription(instanceProperties)); - bean.setStartDate(this.removeExecutionDate(instanceProperties)); - bean.setAnalysisParameters(this.removeAnalysisParameters(instanceProperties)); - bean.setAnalysisStep(this.removeAnalysisStep(instanceProperties)); - - /* - * Any remaining properties are returned in the extended properties. They are - * assumed to be defined in a subtype. - */ - bean.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - - if (relationships != null) - { - for (Relationship relationship : relationships) - { - if ((relationship != null) && (relationship.getType() != null) && (relationship.getType().getTypeDefName() != null)) - { - if (repositoryHelper.isTypeOf(serviceName, relationship.getType().getTypeDefName(), OpenMetadataType.REPORT_TO_ASSET_TYPE_NAME)) - { - EntityProxy endOne = relationship.getEntityOneProxy(); - - if (endOne != null) - { - bean.setAssetGUID(endOne.getGUID()); - } - } - else if (repositoryHelper.isTypeOf(serviceName, relationship.getType().getTypeDefName(), OpenMetadataType.ENGINE_ACTION_SURVEY_REPORT_RELATIONSHIP.typeName)) - { - EntityProxy endOne = relationship.getEntityOneProxy(); - - if (endOne != null) - { - bean.setEngineActionGUID(endOne.getGUID()); - } - } - } - } - } - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/converters/ValidValueConverter.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/converters/ValidValueConverter.java deleted file mode 100644 index aff4bf56977..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/converters/ValidValueConverter.java +++ /dev/null @@ -1,176 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.converters; - -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.ValidValueElement; -import org.odpi.openmetadata.accessservices.assetowner.properties.ValidValueProperties; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; - - -/** - * ValidValueConverter provides common methods for transferring relevant properties from an Open Metadata Repository Services (OMRS) - * EntityDetail object into a bean that inherits from ValidValueElement. - */ -public class ValidValueConverter extends AssetOwnerOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public ValidValueConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - Relationship relationship, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof ValidValueElement) - { - ValidValueElement bean = (ValidValueElement) returnBean; - this.updateSimpleMetadataElement(beanClass, bean, entity, methodName); - - if (relationship != null) - { - if (repositoryHelper.isTypeOf(serviceName, relationship.getType().getTypeDefName(), OpenMetadataType.VALID_VALUE_MEMBER_RELATIONSHIP.typeName)) - { - bean.setSetGUID(relationship.getEntityOneProxy().getGUID()); - bean.setIsDefaultValue(this.removeIsDefaultValue(relationship.getProperties())); - } - } - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof ValidValueElement) - { - this.updateSimpleMetadataElement(beanClass, (ValidValueElement) returnBean, entity, methodName); - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - /** - * Extract the properties from the entity. Each concrete DataManager OMAS converter implements this method. - * The top level fills in the header - * - * @param beanClass name of the class to create - * @param bean output bean - * @param entity entity containing the properties - * @param methodName calling method - * @throws PropertyServerException there is a problem instantiating the bean - */ - void updateSimpleMetadataElement(Class beanClass, - ValidValueElement bean, - EntityDetail entity, - String methodName) throws PropertyServerException - { - if (entity != null) - { - bean.setElementHeader(this.getMetadataElementHeader(beanClass, entity, methodName)); - ValidValueProperties validValueProperties = new ValidValueProperties(); - - InstanceProperties instanceProperties = new InstanceProperties(entity.getProperties()); - - validValueProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); - validValueProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); - validValueProperties.setDisplayName(this.removeName(instanceProperties)); - validValueProperties.setDescription(this.removeDescription(instanceProperties)); - validValueProperties.setCategory(this.removeCategory(instanceProperties)); - validValueProperties.setUsage(this.removeUsage(instanceProperties)); - validValueProperties.setScope(this.removeScope(instanceProperties)); - validValueProperties.setPreferredValue(this.removePreferredValue(instanceProperties)); - validValueProperties.setDataType(this.removeDataType(instanceProperties)); - validValueProperties.setIsDeprecated(this.removeIsDeprecated(instanceProperties)); - validValueProperties.setIsCaseSensitive(this.removeIsCaseSensitive(instanceProperties)); - - /* - * Any remaining properties are returned in the extended properties. They are - * assumed to be defined in a subtype. - */ - validValueProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); - validValueProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - - bean.setValidValueProperties(validValueProperties); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - } -} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/converters/package-info.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/converters/package-info.java deleted file mode 100644 index 797f2d46c43..00000000000 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/converters/package-info.java +++ /dev/null @@ -1,8 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -/** - * Provides the converters that take beans from the repository services (eg entities and relationships) - * and converts them into Asset Owner OMAS beans to return to the caller. - */ -package org.odpi.openmetadata.accessservices.assetowner.converters; diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/outtopic/AssetOwnerOMRSTopicListener.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/outtopic/AssetOwnerOMRSTopicListener.java index c45548fa7ab..b79adcbed94 100644 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/outtopic/AssetOwnerOMRSTopicListener.java +++ b/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/outtopic/AssetOwnerOMRSTopicListener.java @@ -2,7 +2,7 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.assetowner.outtopic; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.AssetElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.AssetElement; import org.odpi.openmetadata.accessservices.assetowner.events.AssetOwnerEventType; import org.odpi.openmetadata.commonservices.generichandlers.AssetHandler; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/outtopic/AssetOwnerOutTopicPublisher.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/outtopic/AssetOwnerOutTopicPublisher.java index 082791e05d7..bf10fe7e917 100644 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/outtopic/AssetOwnerOutTopicPublisher.java +++ b/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/outtopic/AssetOwnerOutTopicPublisher.java @@ -4,12 +4,12 @@ package org.odpi.openmetadata.accessservices.assetowner.outtopic; import org.odpi.openmetadata.accessservices.assetowner.connectors.outtopic.AssetOwnerOutTopicServerConnector; -import org.odpi.openmetadata.accessservices.assetowner.converters.ElementHeaderConverter; +import org.odpi.openmetadata.commonservices.generichandlers.ElementHeaderConverter; import org.odpi.openmetadata.accessservices.assetowner.events.AssetOwnerEventType; import org.odpi.openmetadata.accessservices.assetowner.events.AssetOwnerOutTopicEvent; import org.odpi.openmetadata.accessservices.assetowner.ffdc.AssetOwnerAuditCode; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Classification; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/AssetOwnerInstanceHandler.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/AssetOwnerInstanceHandler.java index 1bea6b9fb33..66e88c6b77c 100644 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/AssetOwnerInstanceHandler.java +++ b/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/AssetOwnerInstanceHandler.java @@ -2,13 +2,17 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.assetowner.server; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.*; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.AssetElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ConnectionElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ConnectorTypeElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.EndpointElement; import org.odpi.openmetadata.adminservices.configuration.registration.AccessServiceDescription; import org.odpi.openmetadata.commonservices.generichandlers.*; import org.odpi.openmetadata.commonservices.multitenant.OMASServiceInstanceHandler; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; import org.odpi.openmetadata.frameworks.surveyaction.properties.SurveyReport; import org.odpi.openmetadata.frameworks.surveyaction.properties.Annotation; diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/AssetOwnerRESTServices.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/AssetOwnerRESTServices.java index 2516b73327f..97d9fab8f17 100644 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/AssetOwnerRESTServices.java +++ b/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/AssetOwnerRESTServices.java @@ -3,10 +3,11 @@ package org.odpi.openmetadata.accessservices.assetowner.server; -import org.odpi.openmetadata.accessservices.assetowner.converters.ElementHeaderConverter; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.*; -import org.odpi.openmetadata.accessservices.assetowner.properties.*; -import org.odpi.openmetadata.accessservices.assetowner.rest.*; +import org.odpi.openmetadata.commonservices.generichandlers.ElementHeaderConverter; +import org.odpi.openmetadata.accessservices.assetowner.properties.TemplateProperties; +import org.odpi.openmetadata.accessservices.assetowner.rest.TemplateRequestBody; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.*; import org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler; import org.odpi.openmetadata.commonservices.generichandlers.*; import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; @@ -19,8 +20,14 @@ import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; import org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; import org.odpi.openmetadata.frameworks.openmetadata.enums.DataItemSortOrder; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.SchemaAttributeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.SchemaTypeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.SemanticAssignmentProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.SupplementaryProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.AssetProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.DataContentForDataSetProperties; import org.odpi.openmetadata.frameworks.surveyaction.properties.Annotation; import org.odpi.openmetadata.frameworks.surveyaction.properties.AnnotationStatus; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; @@ -195,7 +202,7 @@ public GUIDResponse addAssetToCatalog(String serverName, requestBody.getQualifiedName(), requestBody.getName(), requestBody.getVersionIdentifier(), - requestBody.getDescription(), + requestBody.getResourceDescription(), requestBody.getDeployedImplementationType(), requestBody.getAdditionalProperties(), assetTypeName, @@ -352,8 +359,9 @@ public VoidResponse updateAsset(String serverName, assetGUIDParameterName, requestBody.getQualifiedName(), requestBody.getName(), + requestBody.getResourceName(), requestBody.getVersionIdentifier(), - requestBody.getDescription(), + requestBody.getResourceDescription(), requestBody.getDeployedImplementationType(), requestBody.getAdditionalProperties(), requestBody.getTypeName(), @@ -908,7 +916,7 @@ public RelationshipElementsResponse getRelatedAssetsAtEnd2(String relationshipElements.add(getRelationshipElement(relationship, handler.getRepositoryHelper(), serverName, methodName)); } - response.setElementList(relationshipElements); + response.setElements(relationshipElements); } } catch (Exception error) @@ -1019,7 +1027,7 @@ public RelationshipElementsResponse getRelatedAssetsAtEnd1(String relationshipElements.add(getRelationshipElement(relationship, handler.getRepositoryHelper(), serverName, methodName)); } - response.setElementList(relationshipElements); + response.setElements(relationshipElements); } } catch (Exception error) @@ -1451,9 +1459,9 @@ private String addAssociatedSchemaAttribute(String userId, methodName); } - if (schemaAttribute.getAttributeType() != null) + if (schemaAttribute.getSchemaType() != null) { - SchemaTypeProperties schemaTypeProperties = schemaAttribute.getAttributeType(); + SchemaTypeProperties schemaTypeProperties = schemaAttribute.getSchemaType(); SchemaTypeBuilder attributeSchemaTypeBuilder = new SchemaTypeBuilder(schemaTypeProperties.getQualifiedName(), schemaTypeProperties.getDisplayName(), schemaTypeProperties.getDescription(), @@ -2363,15 +2371,15 @@ public SchemaTypeElementsResponse findSchemaType(String serverN { SchemaTypeHandler handler = instanceHandler.getSchemaTypeHandler(userId, serverName, methodName); - response.setElementList(handler.findSchemaTypes(userId, - null, - requestBody.getSearchString(), - startFrom, - pageSize, - false, - false, - requestBody.getEffectiveTime(), - methodName)); + response.setElements(handler.findSchemaTypes(userId, + null, + requestBody.getSearchString(), + startFrom, + pageSize, + false, + false, + requestBody.getEffectiveTime(), + methodName)); } else { @@ -2484,15 +2492,15 @@ public SchemaTypeElementsResponse getSchemaTypeByName(String serverNa { SchemaTypeHandler handler = instanceHandler.getSchemaTypeHandler(userId, serverName, methodName); - response.setElementList(handler.getSchemaTypeByName(userId, - null, - requestBody.getName(), - startFrom, - pageSize, - false, - false, - null, - methodName)); + response.setElements(handler.getSchemaTypeByName(userId, + null, + requestBody.getName(), + startFrom, + pageSize, + false, + false, + null, + methodName)); } else { @@ -3098,9 +3106,9 @@ private SchemaAttributeBuilder getSchemaAttributeBuilder(String instanceHandler.getServiceName(), serverName); - if (schemaAttributeProperties.getAttributeType() != null) + if (schemaAttributeProperties.getSchemaType() != null) { - SchemaTypeBuilder schemaTypeBuilder = this.getSchemaTypeBuilder(schemaAttributeProperties.getAttributeType(), + SchemaTypeBuilder schemaTypeBuilder = this.getSchemaTypeBuilder(schemaAttributeProperties.getSchemaType(), repositoryHelper, instanceHandler.getServiceName(), serverName, @@ -3348,19 +3356,19 @@ public VoidResponse removeSchemaAttribute(String serverName, * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - public SchemaAttributeElementsResponse findSchemaAttributes(String serverName, - String userId, - int startFrom, - int pageSize, - SearchStringRequestBody requestBody) + public SchemaAttributesResponse findSchemaAttributes(String serverName, + String userId, + int startFrom, + int pageSize, + SearchStringRequestBody requestBody) { final String methodName = "findSchemaAttributes"; final String searchStringParameterName = "searchString"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SchemaAttributeElementsResponse response = new SchemaAttributeElementsResponse(); - AuditLog auditLog = null; + SchemaAttributesResponse response = new SchemaAttributesResponse(); + AuditLog auditLog = null; try { @@ -3370,19 +3378,19 @@ public SchemaAttributeElementsResponse findSchemaAttributes(String { SchemaAttributeHandler handler = instanceHandler.getSchemaAttributeHandler(userId, serverName, methodName); - response.setElementList(handler.findSchemaAttributes(userId, - requestBody.getSearchString(), - searchStringParameterName, - OpenMetadataType.SCHEMA_ATTRIBUTE.typeGUID, - OpenMetadataType.SCHEMA_ATTRIBUTE.typeName, - null, - null, - startFrom, - pageSize, - false, - false, - null, - methodName)); + response.setElements(handler.findSchemaAttributes(userId, + requestBody.getSearchString(), + searchStringParameterName, + OpenMetadataType.SCHEMA_ATTRIBUTE.typeGUID, + OpenMetadataType.SCHEMA_ATTRIBUTE.typeName, + null, + null, + startFrom, + pageSize, + false, + false, + null, + methodName)); } else { @@ -3415,20 +3423,20 @@ public SchemaAttributeElementsResponse findSchemaAttributes(String * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - public SchemaAttributeElementsResponse getNestedAttributes(String serverName, - String userId, - String schemaTypeGUID, - int startFrom, - int pageSize, - EffectiveTimeQueryRequestBody requestBody) + public SchemaAttributesResponse getNestedAttributes(String serverName, + String userId, + String schemaTypeGUID, + int startFrom, + int pageSize, + EffectiveTimeQueryRequestBody requestBody) { final String methodName = "getNestedAttributes"; final String elementGUIDParameterName = "schemaAttributeGUID"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SchemaAttributeElementsResponse response = new SchemaAttributeElementsResponse(); - AuditLog auditLog = null; + SchemaAttributesResponse response = new SchemaAttributesResponse(); + AuditLog auditLog = null; try { @@ -3438,16 +3446,16 @@ public SchemaAttributeElementsResponse getNestedAttributes(String { SchemaAttributeHandler handler = instanceHandler.getSchemaAttributeHandler(userId, serverName, methodName); - response.setElementList(handler.getAttachedSchemaAttributes(userId, - schemaTypeGUID, - elementGUIDParameterName, - OpenMetadataType.SCHEMA_ATTRIBUTE.typeName, - startFrom, - pageSize, - false, - false, - null, - methodName)); + response.setElements(handler.getAttachedSchemaAttributes(userId, + schemaTypeGUID, + elementGUIDParameterName, + OpenMetadataType.SCHEMA_ATTRIBUTE.typeName, + startFrom, + pageSize, + false, + false, + null, + methodName)); } else { @@ -3480,18 +3488,18 @@ public SchemaAttributeElementsResponse getNestedAttributes(String * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - public SchemaAttributeElementsResponse getSchemaAttributesByName(String serverName, - String userId, - int startFrom, - int pageSize, - NameRequestBody requestBody) + public SchemaAttributesResponse getSchemaAttributesByName(String serverName, + String userId, + int startFrom, + int pageSize, + NameRequestBody requestBody) { final String methodName = "getSchemaAttributesByName"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SchemaAttributeElementsResponse response = new SchemaAttributeElementsResponse(); - AuditLog auditLog = null; + SchemaAttributesResponse response = new SchemaAttributesResponse(); + AuditLog auditLog = null; try { @@ -3501,18 +3509,18 @@ public SchemaAttributeElementsResponse getSchemaAttributesByName(String { SchemaAttributeHandler handler = instanceHandler.getSchemaAttributeHandler(userId, serverName, methodName); - response.setElementList(handler.getSchemaAttributesByName(userId, - OpenMetadataType.SCHEMA_ATTRIBUTE.typeGUID, - OpenMetadataType.SCHEMA_ATTRIBUTE.typeName, - requestBody.getName(), - null, - null, - startFrom, - pageSize, - false, - false, - null, - methodName)); + response.setElements(handler.getSchemaAttributesByName(userId, + OpenMetadataType.SCHEMA_ATTRIBUTE.typeGUID, + OpenMetadataType.SCHEMA_ATTRIBUTE.typeName, + requestBody.getName(), + null, + null, + startFrom, + pageSize, + false, + false, + null, + methodName)); } else { @@ -3543,18 +3551,18 @@ public SchemaAttributeElementsResponse getSchemaAttributesByName(String * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - public SchemaAttributeElementResponse getSchemaAttributeByGUID(String serverName, - String userId, - String schemaAttributeGUID, - EffectiveTimeQueryRequestBody requestBody) + public SchemaAttributeResponse getSchemaAttributeByGUID(String serverName, + String userId, + String schemaAttributeGUID, + EffectiveTimeQueryRequestBody requestBody) { final String methodName = "getSchemaAttributeByGUID"; final String guidParameterName = "schemaAttributeGUID"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SchemaAttributeElementResponse response = new SchemaAttributeElementResponse(); - AuditLog auditLog = null; + SchemaAttributeResponse response = new SchemaAttributeResponse(); + AuditLog auditLog = null; try { @@ -3606,10 +3614,10 @@ public SchemaAttributeElementResponse getSchemaAttributeByGUID(String * PropertyServerException problem accessing property server or * UserNotAuthorizedException security access problem */ - public VoidResponse addConnectionToAsset(String serverName, - String userId, - String assetGUID, - ConnectionRequestBody requestBody) + public VoidResponse addConnectionToAsset(String serverName, + String userId, + String assetGUID, + OCFConnectionRequestBody requestBody) { final String methodName = "addConnectionToAsset"; final String assetGUIDParameterName = "assetGUID"; @@ -4714,8 +4722,7 @@ public AssetElementsResponse getAssetsByName(String serverName, methodName); addSupplementaryProperties(assets, handler, methodName); - response.setAssets(assets); - response.setStartingFromElement(startFrom); + response.setElements(assets); } else { @@ -4780,10 +4787,7 @@ public AssetElementsResponse findAssets(String serverName, methodName); addSupplementaryProperties(assets, handler, methodName); - response.setAssets(assets); - response.setStartingFromElement(startFrom); - - response.setStartingFromElement(startFrom); + response.setElements(assets); } else { @@ -4841,14 +4845,14 @@ public AssetElementResponse getAssetSummary(String serverName, { getSupplementaryProperties(assetGUID, assetGUIDParameter, - asset.getAssetProperties(), + asset.getProperties(), handler, handler.getRepositoryHelper(), handler.getServiceName(), methodName); } - response.setAsset(asset); + response.setElement(asset); } catch (Exception error) { @@ -4874,18 +4878,18 @@ public AssetElementResponse getAssetSummary(String serverName, * PropertyServerException problem accessing property server or * UserNotAuthorizedException security access problem */ - public SurveyReportListResponse getSurveyReports(String serverName, - String userId, - String assetGUID, - int startingFrom, - int maxPageSize) + public SurveyReportsResponse getSurveyReports(String serverName, + String userId, + String assetGUID, + int startingFrom, + int maxPageSize) { final String methodName = "getSurveyReports"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SurveyReportListResponse response = new SurveyReportListResponse(); - AuditLog auditLog = null; + SurveyReportsResponse response = new SurveyReportsResponse(); + AuditLog auditLog = null; try { @@ -4926,19 +4930,19 @@ public SurveyReportListResponse getSurveyReports(String serverName, * PropertyServerException problem accessing property server or * UserNotAuthorizedException security access problem */ - public AnnotationListResponse getSurveyReportAnnotations(String serverName, - String userId, - String surveyReportGUID, - int startingFrom, - int maximumResults, - StatusRequestBody requestBody) + public AnnotationsResponse getSurveyReportAnnotations(String serverName, + String userId, + String surveyReportGUID, + int startingFrom, + int maximumResults, + AnnotationStatusRequestBody requestBody) { final String methodName = "getDiscoveryReportAnnotations"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - AnnotationListResponse response = new AnnotationListResponse(); - AuditLog auditLog = null; + AnnotationsResponse response = new AnnotationsResponse(); + AuditLog auditLog = null; try { @@ -4953,12 +4957,12 @@ public AnnotationListResponse getSurveyReportAnnotations(String serve { annotationStatus = requestBody.getAnnotationStatus().getOrdinal(); } - response.setAnnotations(handler.getSurveyReportAnnotations(userId, - surveyReportGUID, - annotationStatus, - startingFrom, - maximumResults, - methodName)); + response.setElements(handler.getSurveyReportAnnotations(userId, + surveyReportGUID, + annotationStatus, + startingFrom, + maximumResults, + methodName)); } else { @@ -4991,19 +4995,19 @@ public AnnotationListResponse getSurveyReportAnnotations(String serve * PropertyServerException problem accessing property server or * UserNotAuthorizedException security access problem */ - public AnnotationListResponse getExtendedAnnotations(String serverName, - String userId, - String annotationGUID, - int startingFrom, - int maximumResults, - StatusRequestBody requestBody) + public AnnotationsResponse getExtendedAnnotations(String serverName, + String userId, + String annotationGUID, + int startingFrom, + int maximumResults, + AnnotationStatusRequestBody requestBody) { final String methodName = "getExtendedAnnotations"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - AnnotationListResponse response = new AnnotationListResponse(); - AuditLog auditLog = null; + AnnotationsResponse response = new AnnotationsResponse(); + AuditLog auditLog = null; AnnotationStatus annotationStatus = AnnotationStatus.UNKNOWN_STATUS; if (requestBody != null) @@ -5016,12 +5020,12 @@ public AnnotationListResponse getExtendedAnnotations(String serverNa auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); AnnotationHandler handler = instanceHandler.getAnnotationHandler(userId, serverName, methodName); - response.setAnnotations(handler.getExtendedAnnotations(userId, - annotationGUID, - annotationStatus.getOrdinal(), - startingFrom, - maximumResults, - methodName)); + response.setElements(handler.getExtendedAnnotations(userId, + annotationGUID, + annotationStatus.getOrdinal(), + startingFrom, + maximumResults, + methodName)); } catch (Exception error) { @@ -5252,7 +5256,7 @@ void maintainSupplementaryProperties(String userId, String elementTypeName, String elementDomainName, String elementQualifiedName, - SupplementaryProperties supplementaryProperties, + SupplementaryProperties supplementaryProperties, boolean isMergeUpdate, Date effectiveTime, AssetHandler assetHandler, @@ -5326,7 +5330,7 @@ void addSupplementaryProperties(List assets, { getSupplementaryProperties(element.getElementHeader().getGUID(), elementGUIDParameterName, - element.getAssetProperties(), + element.getProperties(), assetHandler, assetHandler.getRepositoryHelper(), assetHandler.getServiceName(), diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/AssetOwnerServicesInstance.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/AssetOwnerServicesInstance.java index 2b92012578c..723ecae1f3d 100644 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/AssetOwnerServicesInstance.java +++ b/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/AssetOwnerServicesInstance.java @@ -3,28 +3,19 @@ package org.odpi.openmetadata.accessservices.assetowner.server; -import org.odpi.openmetadata.accessservices.assetowner.converters.*; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.AssetElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ConnectionElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ConnectorTypeElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.EndpointElement; +import org.odpi.openmetadata.commonservices.generichandlers.ConnectionConverter; import org.odpi.openmetadata.accessservices.assetowner.ffdc.AssetOwnerErrorCode; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.*; import org.odpi.openmetadata.adminservices.configuration.registration.AccessServiceDescription; -import org.odpi.openmetadata.commonservices.generichandlers.AssetHandler; -import org.odpi.openmetadata.commonservices.generichandlers.CertificationHandler; -import org.odpi.openmetadata.commonservices.generichandlers.ExternalReferenceHandler; -import org.odpi.openmetadata.commonservices.generichandlers.LicenseHandler; -import org.odpi.openmetadata.commonservices.generichandlers.ReferenceableHandler; -import org.odpi.openmetadata.commonservices.generichandlers.SchemaAttributeHandler; -import org.odpi.openmetadata.commonservices.generichandlers.SchemaTypeHandler; -import org.odpi.openmetadata.commonservices.generichandlers.FilesAndFoldersHandler; -import org.odpi.openmetadata.commonservices.generichandlers.ValidValuesHandler; -import org.odpi.openmetadata.commonservices.generichandlers.AnnotationHandler; -import org.odpi.openmetadata.commonservices.generichandlers.SurveyReportHandler; -import org.odpi.openmetadata.commonservices.generichandlers.ConnectionHandler; -import org.odpi.openmetadata.commonservices.generichandlers.ConnectorTypeHandler; -import org.odpi.openmetadata.commonservices.generichandlers.EndpointHandler; +import org.odpi.openmetadata.commonservices.generichandlers.*; import org.odpi.openmetadata.commonservices.multitenant.OMASServiceInstance; import org.odpi.openmetadata.commonservices.multitenant.ffdc.exceptions.NewInstanceException; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; import org.odpi.openmetadata.frameworks.surveyaction.properties.Annotation; import org.odpi.openmetadata.frameworks.surveyaction.properties.SurveyReport; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryConnector; @@ -60,7 +51,7 @@ public class AssetOwnerServicesInstance extends OMASServiceInstance private final ExternalReferenceHandler externalReferenceHandler; private final CertificationHandler certificationTypeHandler; private final LicenseHandler licenseTypeHandler; - private final ReferenceableHandler relatedElementHandler; + private final ReferenceableHandler relatedElementHandler; /** * Set up the local repository connector that will service the REST Calls. diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/CertificationRESTServices.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/CertificationRESTServices.java index 3c5341663e1..5afedb13202 100644 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/CertificationRESTServices.java +++ b/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/CertificationRESTServices.java @@ -2,21 +2,17 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.assetowner.server; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.CertificationTypeElement; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.RelatedElement; -import org.odpi.openmetadata.accessservices.assetowner.properties.CertificationProperties; -import org.odpi.openmetadata.accessservices.assetowner.properties.CertificationTypeProperties; -import org.odpi.openmetadata.accessservices.assetowner.rest.CertificationTypeListResponse; -import org.odpi.openmetadata.accessservices.assetowner.rest.CertificationTypeResponse; -import org.odpi.openmetadata.accessservices.assetowner.rest.RelatedElementListResponse; -import org.odpi.openmetadata.accessservices.assetowner.rest.RelationshipRequestBody; + +import org.odpi.openmetadata.commonservices.ffdc.rest.*; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.CertificationTypeElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.RelatedElement; + import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; import org.odpi.openmetadata.commonservices.generichandlers.CertificationHandler; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.CertificationProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.CertificationTypeProperties; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.commonservices.generichandlers.ReferenceableHandler; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; @@ -168,19 +164,19 @@ public CertificationTypeResponse getCertificationTypeByDocId(String serverName, * PropertyServerException problem accessing property server * UserNotAuthorizedException security access problem */ - public CertificationTypeListResponse getCertificationTypesByTitle(String serverName, - String userId, - int startFrom, - int pageSize, - SearchStringRequestBody requestBody) + public CertificationTypesResponse getCertificationTypesByTitle(String serverName, + String userId, + int startFrom, + int pageSize, + SearchStringRequestBody requestBody) { final String methodName = "getCertificationTypesByTitle"; final String titleParameterName = "title"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - CertificationTypeListResponse response = new CertificationTypeListResponse(); - AuditLog auditLog = null; + CertificationTypesResponse response = new CertificationTypesResponse(); + AuditLog auditLog = null; try { @@ -230,18 +226,18 @@ public CertificationTypeListResponse getCertificationTypesByTitle(String * PropertyServerException problem accessing property server * UserNotAuthorizedException security access problem */ - public CertificationTypeListResponse getCertificationTypeByDomainId(String serverName, - String userId, - int domainIdentifier, - int startFrom, - int pageSize) + public CertificationTypesResponse getCertificationTypeByDomainId(String serverName, + String userId, + int domainIdentifier, + int startFrom, + int pageSize) { final String methodName = "getCertificationTypeByDomainId"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - CertificationTypeListResponse response = new CertificationTypeListResponse(); - AuditLog auditLog = null; + CertificationTypesResponse response = new CertificationTypesResponse(); + AuditLog auditLog = null; try { @@ -517,41 +513,41 @@ public VoidResponse decertifyElement(String serverName, * PropertyServerException problem accessing property server * UserNotAuthorizedException security access problem */ - public RelatedElementListResponse getCertifiedElements(String serverName, - String userId, - String certificationTypeGUID, - int startFrom, - int pageSize) + public RelatedElementsResponse getCertifiedElements(String serverName, + String userId, + String certificationTypeGUID, + int startFrom, + int pageSize) { final String methodName = "getCertifiedElements"; final String guidParameter = "certificationTypeGUID"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - RelatedElementListResponse response = new RelatedElementListResponse(); - AuditLog auditLog = null; + RelatedElementsResponse response = new RelatedElementsResponse(); + AuditLog auditLog = null; try { auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); ReferenceableHandler handler = instanceHandler.getRelatedElementHandler(userId, serverName, methodName); - response.setElementList(handler.getAttachedElements(userId, - certificationTypeGUID, - guidParameter, - OpenMetadataType.CERTIFICATION_TYPE_TYPE_NAME, - OpenMetadataType.CERTIFICATION_OF_REFERENCEABLE_TYPE_GUID, - OpenMetadataType.CERTIFICATION_OF_REFERENCEABLE_TYPE_NAME, - OpenMetadataType.REFERENCEABLE.typeName, - null, - null, - 1, - false, - false, - startFrom, - pageSize, - new Date(), - methodName)); + response.setElements(handler.getAttachedElements(userId, + certificationTypeGUID, + guidParameter, + OpenMetadataType.CERTIFICATION_TYPE_TYPE_NAME, + OpenMetadataType.CERTIFICATION_OF_REFERENCEABLE_TYPE_GUID, + OpenMetadataType.CERTIFICATION_OF_REFERENCEABLE_TYPE_NAME, + OpenMetadataType.REFERENCEABLE.typeName, + null, + null, + 1, + false, + false, + startFrom, + pageSize, + new Date(), + methodName)); } catch (Exception error) { @@ -577,41 +573,41 @@ public RelatedElementListResponse getCertifiedElements(String serverName, * PropertyServerException problem accessing property server * UserNotAuthorizedException security access problem */ - public RelatedElementListResponse getCertifications(String serverName, - String userId, - String elementGUID, - int startFrom, - int pageSize) + public RelatedElementsResponse getCertifications(String serverName, + String userId, + String elementGUID, + int startFrom, + int pageSize) { final String methodName = "getLicences"; final String guidParameterName = "elementGUID"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - RelatedElementListResponse response = new RelatedElementListResponse(); - AuditLog auditLog = null; + RelatedElementsResponse response = new RelatedElementsResponse(); + AuditLog auditLog = null; try { auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); ReferenceableHandler handler = instanceHandler.getRelatedElementHandler(userId, serverName, methodName); - response.setElementList(handler.getAttachedElements(userId, - elementGUID, - guidParameterName, - OpenMetadataType.REFERENCEABLE.typeName, - OpenMetadataType.CERTIFICATION_OF_REFERENCEABLE_TYPE_GUID, - OpenMetadataType.CERTIFICATION_OF_REFERENCEABLE_TYPE_NAME, - OpenMetadataType.CERTIFICATION_TYPE_TYPE_NAME, - null, - null, - 2, - false, - false, - startFrom, - pageSize, - new Date(), - methodName)); + response.setElements(handler.getAttachedElements(userId, + elementGUID, + guidParameterName, + OpenMetadataType.REFERENCEABLE.typeName, + OpenMetadataType.CERTIFICATION_OF_REFERENCEABLE_TYPE_GUID, + OpenMetadataType.CERTIFICATION_OF_REFERENCEABLE_TYPE_NAME, + OpenMetadataType.CERTIFICATION_TYPE_TYPE_NAME, + null, + null, + 2, + false, + false, + startFrom, + pageSize, + new Date(), + methodName)); } catch (Exception error) { diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/ConnectionRESTServices.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/ConnectionRESTServices.java index ca033afc1d3..1f32f97aa15 100644 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/ConnectionRESTServices.java +++ b/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/ConnectionRESTServices.java @@ -2,32 +2,20 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.assetowner.server; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.ConnectionElement; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.ConnectorTypeElement; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.EndpointElement; -import org.odpi.openmetadata.accessservices.assetowner.properties.ConnectionProperties; -import org.odpi.openmetadata.accessservices.assetowner.properties.EndpointProperties; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ConnectionElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ConnectorTypeElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.EndpointElement; import org.odpi.openmetadata.accessservices.assetowner.properties.TemplateProperties; -import org.odpi.openmetadata.accessservices.assetowner.rest.ConnectionsResponse; -import org.odpi.openmetadata.accessservices.assetowner.rest.EndpointsResponse; -import org.odpi.openmetadata.accessservices.assetowner.rest.ConnectorTypesResponse; -import org.odpi.openmetadata.accessservices.assetowner.rest.ConnectionResponse; -import org.odpi.openmetadata.accessservices.assetowner.rest.EndpointResponse; -import org.odpi.openmetadata.accessservices.assetowner.rest.ConnectorTypeResponse; -import org.odpi.openmetadata.accessservices.assetowner.rest.EmbeddedConnectionRequestBody; import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.StringRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.NullRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; import org.odpi.openmetadata.commonservices.generichandlers.ConnectionHandler; import org.odpi.openmetadata.commonservices.generichandlers.ConnectorTypeHandler; import org.odpi.openmetadata.commonservices.generichandlers.EndpointHandler; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.ConnectionProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.EndpointProperties; import org.slf4j.LoggerFactory; import java.util.Date; @@ -909,7 +897,7 @@ public ConnectionsResponse findConnections(String serverName, false, new Date(), methodName); - response.setElementList(connections); + response.setElements(connections); } else { @@ -972,7 +960,7 @@ public ConnectionsResponse getConnectionsByName(String serverName, false, new Date(), methodName); - response.setElementList(connections); + response.setElements(connections); } else { @@ -1083,7 +1071,7 @@ public GUIDResponse createEndpoint(String serverName, null, endpointProperties.getQualifiedName(), endpointProperties.getName(), - endpointProperties.getDescription(), + endpointProperties.getResourceDescription(), endpointProperties.getAddress(), endpointProperties.getProtocol(), endpointProperties.getEncryptionMethod(), @@ -1214,7 +1202,7 @@ public VoidResponse updateEndpoint(String serverName, guidParameter, endpointProperties.getQualifiedName(), endpointProperties.getName(), - endpointProperties.getDescription(), + endpointProperties.getResourceDescription(), endpointProperties.getAddress(), endpointProperties.getProtocol(), endpointProperties.getEncryptionMethod(), @@ -1343,7 +1331,7 @@ public EndpointsResponse findEndpoints(String serverName, false, new Date(), methodName); - response.setElementList(endpoints); + response.setElements(endpoints); } else { @@ -1406,7 +1394,7 @@ public EndpointsResponse getEndpointsByName(String serverName, false, new Date(), methodName); - response.setElementList(endpoints); + response.setElements(endpoints); } else { @@ -1527,7 +1515,7 @@ public ConnectorTypesResponse findConnectorTypes(String serverN false, new Date(), methodName); - response.setElementList(connectorTypes); + response.setElements(connectorTypes); } else { @@ -1590,7 +1578,7 @@ public ConnectorTypesResponse getConnectorTypesByName(String serverName false, new Date(), methodName); - response.setElementList(connectorTypes); + response.setElements(connectorTypes); } else { diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/ExternalReferenceRESTServices.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/ExternalReferenceRESTServices.java index d3720ba5dc6..e7796f5015f 100644 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/ExternalReferenceRESTServices.java +++ b/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/ExternalReferenceRESTServices.java @@ -2,26 +2,17 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.assetowner.server; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.ExternalReferenceElement; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.RelatedElement; -import org.odpi.openmetadata.accessservices.assetowner.properties.ExternalReferenceLinkProperties; -import org.odpi.openmetadata.accessservices.assetowner.properties.ExternalReferenceProperties; -import org.odpi.openmetadata.accessservices.assetowner.rest.ExternalReferenceListResponse; -import org.odpi.openmetadata.accessservices.assetowner.rest.ExternalReferenceResponse; -import org.odpi.openmetadata.accessservices.assetowner.rest.ExternalSourceRequestBody; -import org.odpi.openmetadata.accessservices.assetowner.rest.ReferenceableRequestBody; -import org.odpi.openmetadata.accessservices.assetowner.rest.RelatedElementListResponse; -import org.odpi.openmetadata.accessservices.assetowner.rest.RelationshipRequestBody; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ExternalReferenceElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.RelatedElement; import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; import org.odpi.openmetadata.commonservices.generichandlers.ExternalReferenceHandler; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; +import org.odpi.openmetadata.frameworks.openmetadata.properties.externalreferences.ExternalReferenceProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.externalreferences.ExternalReferenceLinkProperties; import org.odpi.openmetadata.commonservices.generichandlers.ReferenceableHandler; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; @@ -63,9 +54,9 @@ public ExternalReferenceRESTServices() * PropertyServerException problem accessing property server * UserNotAuthorizedException security access problem */ - public GUIDResponse createExternalReference(String serverName, - String userId, - ReferenceableRequestBody requestBody) + public GUIDResponse createExternalReference(String serverName, + String userId, + ReferenceableRequestBody requestBody) { final String methodName = "createExternalReference"; @@ -531,19 +522,19 @@ public ExternalReferenceResponse getExternalReferenceByGUID(String serverName, * PropertyServerException problem accessing property server * UserNotAuthorizedException security access problem */ - public ExternalReferenceListResponse findExternalReferencesById(String serverName, - String userId, - int startFrom, - int pageSize, - SearchStringRequestBody requestBody) + public ExternalReferencesResponse findExternalReferencesById(String serverName, + String userId, + int startFrom, + int pageSize, + SearchStringRequestBody requestBody) { final String methodName = "findExternalReferencesById"; final String resourceIdParameterName = "resourceId"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - ExternalReferenceListResponse response = new ExternalReferenceListResponse(); - AuditLog auditLog = null; + ExternalReferencesResponse response = new ExternalReferencesResponse(); + AuditLog auditLog = null; try { @@ -594,19 +585,19 @@ public ExternalReferenceListResponse findExternalReferencesById(String * PropertyServerException problem accessing property server * UserNotAuthorizedException security access problem */ - public ExternalReferenceListResponse getExternalReferencesByURL(String serverName, - String userId, - int startFrom, - int pageSize, - NameRequestBody requestBody) + public ExternalReferencesResponse getExternalReferencesByURL(String serverName, + String userId, + int startFrom, + int pageSize, + NameRequestBody requestBody) { final String methodName = "getExternalReferencesByURL"; final String urlParameterName = "resourceId"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - ExternalReferenceListResponse response = new ExternalReferenceListResponse(); - AuditLog auditLog = null; + ExternalReferencesResponse response = new ExternalReferencesResponse(); + AuditLog auditLog = null; try { @@ -654,19 +645,19 @@ public ExternalReferenceListResponse getExternalReferencesByURL(String * PropertyServerException problem accessing property server * UserNotAuthorizedException security access problem */ - public ExternalReferenceListResponse retrieveAttachedExternalReferences(String serverName, - String userId, - String attachedToGUID, - int startFrom, - int pageSize) + public ExternalReferencesResponse retrieveAttachedExternalReferences(String serverName, + String userId, + String attachedToGUID, + int startFrom, + int pageSize) { final String methodName = "retrieveAttachedExternalReferences"; final String guidParameterName = "attachedToGUID"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - ExternalReferenceListResponse response = new ExternalReferenceListResponse(); - AuditLog auditLog = null; + ExternalReferencesResponse response = new ExternalReferencesResponse(); + AuditLog auditLog = null; try { @@ -714,41 +705,41 @@ public ExternalReferenceListResponse retrieveAttachedExternalReferences(String s * PropertyServerException problem accessing property server * UserNotAuthorizedException security access problem */ - public RelatedElementListResponse getElementsForExternalReference(String serverName, - String userId, - String externalReferenceGUID, - int startFrom, - int pageSize) + public RelatedElementsResponse getElementsForExternalReference(String serverName, + String userId, + String externalReferenceGUID, + int startFrom, + int pageSize) { final String methodName = "getElementsForExternalReference"; final String guidParameter = "externalReferenceGUID"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - RelatedElementListResponse response = new RelatedElementListResponse(); - AuditLog auditLog = null; + RelatedElementsResponse response = new RelatedElementsResponse(); + AuditLog auditLog = null; try { auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); ReferenceableHandler handler = instanceHandler.getRelatedElementHandler(userId, serverName, methodName); - response.setElementList(handler.getAttachedElements(userId, - externalReferenceGUID, - guidParameter, - OpenMetadataType.EXTERNAL_REFERENCE.typeName, - OpenMetadataType.EXTERNAL_REFERENCE_LINK_RELATIONSHIP.typeGUID, - OpenMetadataType.EXTERNAL_REFERENCE_LINK_RELATIONSHIP.typeName, - OpenMetadataType.REFERENCEABLE.typeName, - null, - null, - 1, - false, - false, - startFrom, - pageSize, - new Date(), - methodName)); + response.setElements(handler.getAttachedElements(userId, + externalReferenceGUID, + guidParameter, + OpenMetadataType.EXTERNAL_REFERENCE.typeName, + OpenMetadataType.EXTERNAL_REFERENCE_LINK_RELATIONSHIP.typeGUID, + OpenMetadataType.EXTERNAL_REFERENCE_LINK_RELATIONSHIP.typeName, + OpenMetadataType.REFERENCEABLE.typeName, + null, + null, + 1, + false, + false, + startFrom, + pageSize, + new Date(), + methodName)); } catch (Exception error) { diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/FileSystemRESTServices.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/FileSystemRESTServices.java index caa2ae3a7f4..e37504cbdab 100644 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/FileSystemRESTServices.java +++ b/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/FileSystemRESTServices.java @@ -3,17 +3,13 @@ package org.odpi.openmetadata.accessservices.assetowner.server; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.FileElement; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.FileSystemElement; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.FolderElement; -import org.odpi.openmetadata.accessservices.assetowner.rest.*; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.FileElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.FileSystemElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.FolderElement; import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDListResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NullRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; import org.odpi.openmetadata.commonservices.generichandlers.FilesAndFoldersHandler; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.openmetadata.refdata.DeployedImplementationType; @@ -158,7 +154,7 @@ public GUIDListResponse createFolderStructureInCatalog(String serve null, null, anchorGUID, - requestBody.getFullPath(), + requestBody.getPathName(), null, null, false, @@ -217,7 +213,7 @@ public GUIDListResponse createFolderStructureInCatalog(String serve null, null, null, - requestBody.getFullPath(), + requestBody.getPathName(), null, null, false, @@ -403,6 +399,7 @@ public GUIDListResponse addDataFileAssetToCatalog(String server null, null, requestBody.getName(), + requestBody.getResourceName(), null, requestBody.getDescription(), DeployedImplementationType.DATA_FILE.getDeployedImplementationType(), @@ -471,6 +468,7 @@ public GUIDListResponse addDataFolderAssetToCatalog(String serv null, requestBody.getFullPath(), requestBody.getName(), + requestBody.getResourceName(), null, requestBody.getDescription(), DeployedImplementationType.DATA_FOLDER.getDeployedImplementationType(), @@ -790,7 +788,7 @@ public FileSystemResponse getFileSystemByGUID(String serverName, new Date(), methodName); - response.setFileSystem(fileSystemElement); + response.setElement(fileSystemElement); } catch (Exception error) { @@ -835,13 +833,13 @@ public FileSystemResponse getFileSystemByUniqueName(String serverName, FolderElement, FileElement> handler = instanceHandler.getFilesAndFoldersHandler(userId, serverName, methodName); - response.setFileSystem(new FileSystemElement(handler.getFileSystemByUniqueName(userId, - uniqueName, - uniqueNameParameterName, - false, - false, - new Date(), - methodName))); + response.setElement(new FileSystemElement(handler.getFileSystemByUniqueName(userId, + uniqueName, + uniqueNameParameterName, + false, + false, + new Date(), + methodName))); } catch (Exception error) { @@ -938,12 +936,12 @@ public FolderResponse getFolderByGUID(String serverName, FolderElement, FileElement> handler = instanceHandler.getFilesAndFoldersHandler(userId, serverName, methodName); - response.setFolder(new FolderElement(handler.getFolderByGUID(userId, - folderGUID, - false, - false, - new Date(), - methodName))); + response.setElement(new FolderElement(handler.getFolderByGUID(userId, + folderGUID, + false, + false, + new Date(), + methodName))); } catch (Exception error) { @@ -989,12 +987,12 @@ public FolderResponse getFolderByPathName(String serverName, FolderElement, FileElement> handler = instanceHandler.getFilesAndFoldersHandler(userId, serverName, methodName); - response.setFolder(new FolderElement(handler.getFolderByPathName(userId, - requestBody.getFullPath(), - false, - false, - new Date(), - methodName))); + response.setElement(new FolderElement(handler.getFolderByPathName(userId, + requestBody.getPathName(), + false, + false, + new Date(), + methodName))); } } catch (Exception error) @@ -1165,6 +1163,7 @@ public GUIDListResponse addAvroFileToCatalog(String serverNam null, null, requestBody.getName(), + requestBody.getResourceName(), requestBody.getVersionIdentifier(), requestBody.getDescription(), DeployedImplementationType.AVRO_FILE.getDeployedImplementationType(), @@ -1231,6 +1230,7 @@ public GUIDListResponse addCSVFileToCatalog(String serverN null, null, requestBody.getName(), + requestBody.getResourceName(), requestBody.getVersionIdentifier(), requestBody.getDescription(), DeployedImplementationType.CSV_FILE.getDeployedImplementationType(), diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/LicenseRESTServices.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/LicenseRESTServices.java index 3640db6ef95..2503fec9a9d 100644 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/LicenseRESTServices.java +++ b/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/LicenseRESTServices.java @@ -2,21 +2,16 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.assetowner.server; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.LicenseTypeElement; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.RelatedElement; -import org.odpi.openmetadata.accessservices.assetowner.properties.LicenseProperties; -import org.odpi.openmetadata.accessservices.assetowner.properties.LicenseTypeProperties; -import org.odpi.openmetadata.accessservices.assetowner.rest.LicenseTypeListResponse; -import org.odpi.openmetadata.accessservices.assetowner.rest.LicenseTypeResponse; -import org.odpi.openmetadata.accessservices.assetowner.rest.RelatedElementListResponse; -import org.odpi.openmetadata.accessservices.assetowner.rest.RelationshipRequestBody; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.LicenseTypeElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.RelatedElement; + import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; import org.odpi.openmetadata.commonservices.generichandlers.LicenseHandler; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.LicenseProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.LicenseTypeProperties; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.commonservices.generichandlers.ReferenceableHandler; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; @@ -62,8 +57,8 @@ public LicenseRESTServices() * UserNotAuthorizedException security access problem */ public LicenseTypeResponse getLicenseTypeByGUID(String serverName, - String userId, - String licenseTypeGUID) + String userId, + String licenseTypeGUID) { final String methodName = "getLicenseTypeByGUID"; final String guidParameterName = "licenseTypeGUID"; @@ -167,19 +162,19 @@ public LicenseTypeResponse getLicenseTypeByDocId(String serverName, * PropertyServerException problem accessing property server * UserNotAuthorizedException security access problem */ - public LicenseTypeListResponse getLicenseTypesByTitle(String serverName, - String userId, - int startFrom, - int pageSize, - SearchStringRequestBody requestBody) + public LicenseTypesResponse getLicenseTypesByTitle(String serverName, + String userId, + int startFrom, + int pageSize, + SearchStringRequestBody requestBody) { final String methodName = "getLicenseTypesByTitle"; final String titleParameterName = "title"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - LicenseTypeListResponse response = new LicenseTypeListResponse(); - AuditLog auditLog = null; + LicenseTypesResponse response = new LicenseTypesResponse(); + AuditLog auditLog = null; try { @@ -229,18 +224,18 @@ public LicenseTypeListResponse getLicenseTypesByTitle(String se * PropertyServerException problem accessing property server * UserNotAuthorizedException security access problem */ - public LicenseTypeListResponse getLicenseTypeByDomainId(String serverName, - String userId, - int domainIdentifier, - int startFrom, - int pageSize) + public LicenseTypesResponse getLicenseTypeByDomainId(String serverName, + String userId, + int domainIdentifier, + int startFrom, + int pageSize) { final String methodName = "getLicenseTypeByDomainId"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - LicenseTypeListResponse response = new LicenseTypeListResponse(); - AuditLog auditLog = null; + LicenseTypesResponse response = new LicenseTypesResponse(); + AuditLog auditLog = null; try { @@ -516,41 +511,41 @@ public VoidResponse unlicenseElement(String serverName, * PropertyServerException problem accessing property server * UserNotAuthorizedException security access problem */ - public RelatedElementListResponse getLicensedElements(String serverName, - String userId, - String licenseTypeGUID, - int startFrom, - int pageSize) + public RelatedElementsResponse getLicensedElements(String serverName, + String userId, + String licenseTypeGUID, + int startFrom, + int pageSize) { final String methodName = "getLicensedElements"; final String guidParameter = "licenseTypeGUID"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - RelatedElementListResponse response = new RelatedElementListResponse(); - AuditLog auditLog = null; + RelatedElementsResponse response = new RelatedElementsResponse(); + AuditLog auditLog = null; try { auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); ReferenceableHandler handler = instanceHandler.getRelatedElementHandler(userId, serverName, methodName); - response.setElementList(handler.getAttachedElements(userId, - licenseTypeGUID, - guidParameter, - OpenMetadataType.LICENSE_TYPE_TYPE_NAME, - OpenMetadataType.LICENSE_OF_REFERENCEABLE_TYPE_GUID, - OpenMetadataType.LICENSE_OF_REFERENCEABLE_TYPE_NAME, - OpenMetadataType.REFERENCEABLE.typeName, - null, - null, - 1, - false, - false, - startFrom, - pageSize, - new Date(), - methodName)); + response.setElements(handler.getAttachedElements(userId, + licenseTypeGUID, + guidParameter, + OpenMetadataType.LICENSE_TYPE_TYPE_NAME, + OpenMetadataType.LICENSE_OF_REFERENCEABLE_TYPE_GUID, + OpenMetadataType.LICENSE_OF_REFERENCEABLE_TYPE_NAME, + OpenMetadataType.REFERENCEABLE.typeName, + null, + null, + 1, + false, + false, + startFrom, + pageSize, + new Date(), + methodName)); } catch (Exception error) { @@ -576,41 +571,41 @@ public RelatedElementListResponse getLicensedElements(String serverName, * PropertyServerException problem accessing property server * UserNotAuthorizedException security access problem */ - public RelatedElementListResponse getLicenses(String serverName, - String userId, - String elementGUID, - int startFrom, - int pageSize) + public RelatedElementsResponse getLicenses(String serverName, + String userId, + String elementGUID, + int startFrom, + int pageSize) { final String methodName = "getLicences"; final String guidParameterName = "elementGUID"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - RelatedElementListResponse response = new RelatedElementListResponse(); - AuditLog auditLog = null; + RelatedElementsResponse response = new RelatedElementsResponse(); + AuditLog auditLog = null; try { auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); ReferenceableHandler handler = instanceHandler.getRelatedElementHandler(userId, serverName, methodName); - response.setElementList(handler.getAttachedElements(userId, - elementGUID, - guidParameterName, - OpenMetadataType.REFERENCEABLE.typeName, - OpenMetadataType.LICENSE_OF_REFERENCEABLE_TYPE_GUID, - OpenMetadataType.LICENSE_OF_REFERENCEABLE_TYPE_NAME, - OpenMetadataType.LICENSE_TYPE_TYPE_NAME, - null, - null, - 2, - false, - false, - startFrom, - pageSize, - new Date(), - methodName)); + response.setElements(handler.getAttachedElements(userId, + elementGUID, + guidParameterName, + OpenMetadataType.REFERENCEABLE.typeName, + OpenMetadataType.LICENSE_OF_REFERENCEABLE_TYPE_GUID, + OpenMetadataType.LICENSE_OF_REFERENCEABLE_TYPE_NAME, + OpenMetadataType.LICENSE_TYPE_TYPE_NAME, + null, + null, + 2, + false, + false, + startFrom, + pageSize, + new Date(), + methodName)); } catch (Exception error) { diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/RelatedElementRESTServices.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/RelatedElementRESTServices.java index cc200a9a37e..c1ed6155acb 100644 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/RelatedElementRESTServices.java +++ b/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/RelatedElementRESTServices.java @@ -3,12 +3,12 @@ package org.odpi.openmetadata.accessservices.assetowner.server; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.RelatedElement; -import org.odpi.openmetadata.accessservices.assetowner.properties.ResourceListProperties; -import org.odpi.openmetadata.accessservices.assetowner.properties.StakeholderProperties; -import org.odpi.openmetadata.accessservices.assetowner.rest.ExternalSourceRequestBody; -import org.odpi.openmetadata.accessservices.assetowner.rest.RelatedElementListResponse; -import org.odpi.openmetadata.accessservices.assetowner.rest.RelationshipRequestBody; +import org.odpi.openmetadata.commonservices.ffdc.rest.ExternalSourceRequestBody; +import org.odpi.openmetadata.commonservices.ffdc.rest.RelatedElementsResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.RelationshipRequestBody; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.RelatedElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.resources.ResourceListProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.StakeholderProperties; import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; @@ -208,19 +208,19 @@ public VoidResponse clearMoreInformation(String serverName, * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - public RelatedElementListResponse getMoreInformation(String serverName, - String userId, - String elementGUID, - int startFrom, - int pageSize) + public RelatedElementsResponse getMoreInformation(String serverName, + String userId, + String elementGUID, + int startFrom, + int pageSize) { final String methodName = "getMoreInformation"; final String guidPropertyName = "elementGUID"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - RelatedElementListResponse response = new RelatedElementListResponse(); - AuditLog auditLog = null; + RelatedElementsResponse response = new RelatedElementsResponse(); + AuditLog auditLog = null; try { @@ -228,17 +228,17 @@ public RelatedElementListResponse getMoreInformation(String serverName, ReferenceableHandler handler = instanceHandler.getRelatedElementHandler(userId, serverName, methodName); - response.setElementList(handler.getMoreInformation(userId, - elementGUID, - guidPropertyName, - OpenMetadataType.REFERENCEABLE.typeName, - OpenMetadataType.REFERENCEABLE.typeName, - startFrom, - pageSize, - false, - false, - new Date(), - methodName)); + response.setElements(handler.getMoreInformation(userId, + elementGUID, + guidPropertyName, + OpenMetadataType.REFERENCEABLE.typeName, + OpenMetadataType.REFERENCEABLE.typeName, + startFrom, + pageSize, + false, + false, + new Date(), + methodName)); } catch (Exception error) { @@ -265,19 +265,19 @@ public RelatedElementListResponse getMoreInformation(String serverName, * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - public RelatedElementListResponse getDescriptiveElements(String serverName, - String userId, - String detailGUID, - int startFrom, - int pageSize) + public RelatedElementsResponse getDescriptiveElements(String serverName, + String userId, + String detailGUID, + int startFrom, + int pageSize) { final String methodName = "getDescriptiveElements"; final String guidPropertyName = "detailGUID"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - RelatedElementListResponse response = new RelatedElementListResponse(); - AuditLog auditLog = null; + RelatedElementsResponse response = new RelatedElementsResponse(); + AuditLog auditLog = null; try { @@ -285,17 +285,17 @@ public RelatedElementListResponse getDescriptiveElements(String serverName, ReferenceableHandler handler = instanceHandler.getRelatedElementHandler(userId, serverName, methodName); - response.setElementList(handler.getDescriptiveElements(userId, - detailGUID, - guidPropertyName, - OpenMetadataType.REFERENCEABLE.typeName, - OpenMetadataType.REFERENCEABLE.typeName, - startFrom, - pageSize, - false, - false, - new Date(), - methodName)); + response.setElements(handler.getDescriptiveElements(userId, + detailGUID, + guidPropertyName, + OpenMetadataType.REFERENCEABLE.typeName, + OpenMetadataType.REFERENCEABLE.typeName, + startFrom, + pageSize, + false, + false, + new Date(), + methodName)); } catch (Exception error) { @@ -489,19 +489,19 @@ public VoidResponse clearStakeholder(String serverName, * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - public RelatedElementListResponse getStakeholders(String serverName, - String userId, - String elementGUID, - int startFrom, - int pageSize) + public RelatedElementsResponse getStakeholders(String serverName, + String userId, + String elementGUID, + int startFrom, + int pageSize) { final String methodName = "getStakeholders"; final String guidPropertyName = "elementGUID"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - RelatedElementListResponse response = new RelatedElementListResponse(); - AuditLog auditLog = null; + RelatedElementsResponse response = new RelatedElementsResponse(); + AuditLog auditLog = null; try { @@ -509,17 +509,17 @@ public RelatedElementListResponse getStakeholders(String serverName, ReferenceableHandler handler = instanceHandler.getRelatedElementHandler(userId, serverName, methodName); - response.setElementList(handler.getStakeholders(userId, - elementGUID, - guidPropertyName, - OpenMetadataType.REFERENCEABLE.typeName, - OpenMetadataType.REFERENCEABLE.typeName, - startFrom, - pageSize, - false, - false, - new Date(), - methodName)); + response.setElements(handler.getStakeholders(userId, + elementGUID, + guidPropertyName, + OpenMetadataType.REFERENCEABLE.typeName, + OpenMetadataType.REFERENCEABLE.typeName, + startFrom, + pageSize, + false, + false, + new Date(), + methodName)); } catch (Exception error) { @@ -546,19 +546,19 @@ public RelatedElementListResponse getStakeholders(String serverName, * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - public RelatedElementListResponse getStakeholderCommissionedElements(String serverName, - String userId, - String stakeholderGUID, - int startFrom, - int pageSize) + public RelatedElementsResponse getStakeholderCommissionedElements(String serverName, + String userId, + String stakeholderGUID, + int startFrom, + int pageSize) { final String methodName = "getStakeholderCommissionedElements"; final String guidPropertyName = "stakeholderGUID"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - RelatedElementListResponse response = new RelatedElementListResponse(); - AuditLog auditLog = null; + RelatedElementsResponse response = new RelatedElementsResponse(); + AuditLog auditLog = null; try { @@ -566,17 +566,17 @@ public RelatedElementListResponse getStakeholderCommissionedElements(String ser ReferenceableHandler handler = instanceHandler.getRelatedElementHandler(userId, serverName, methodName); - response.setElementList(handler.getCommissionedByStakeholder(userId, - stakeholderGUID, - guidPropertyName, - OpenMetadataType.REFERENCEABLE.typeName, - OpenMetadataType.REFERENCEABLE.typeName, - startFrom, - pageSize, - false, - false, - new Date(), - methodName)); + response.setElements(handler.getCommissionedByStakeholder(userId, + stakeholderGUID, + guidPropertyName, + OpenMetadataType.REFERENCEABLE.typeName, + OpenMetadataType.REFERENCEABLE.typeName, + startFrom, + pageSize, + false, + false, + new Date(), + methodName)); } catch (Exception error) { @@ -777,19 +777,19 @@ public VoidResponse clearResource(String serverName, * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - public RelatedElementListResponse getResourceList(String serverName, - String userId, - String elementGUID, - int startFrom, - int pageSize) + public RelatedElementsResponse getResourceList(String serverName, + String userId, + String elementGUID, + int startFrom, + int pageSize) { final String methodName = "getResourceList"; final String guidPropertyName = "elementGUID"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - RelatedElementListResponse response = new RelatedElementListResponse(); - AuditLog auditLog = null; + RelatedElementsResponse response = new RelatedElementsResponse(); + AuditLog auditLog = null; try { @@ -797,16 +797,16 @@ public RelatedElementListResponse getResourceList(String serverName, ReferenceableHandler handler = instanceHandler.getRelatedElementHandler(userId, serverName, methodName); - response.setElementList(handler.getResourceList(userId, - elementGUID, - guidPropertyName, - OpenMetadataType.REFERENCEABLE.typeName, - startFrom, - pageSize, - false, - false, - new Date(), - methodName)); + response.setElements(handler.getResourceList(userId, + elementGUID, + guidPropertyName, + OpenMetadataType.REFERENCEABLE.typeName, + startFrom, + pageSize, + false, + false, + new Date(), + methodName)); } catch (Exception error) { @@ -833,11 +833,11 @@ public RelatedElementListResponse getResourceList(String serverName, * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - public RelatedElementListResponse getSupportedByResource(String serverName, - String userId, - String resourceGUID, - int startFrom, - int pageSize) + public RelatedElementsResponse getSupportedByResource(String serverName, + String userId, + String resourceGUID, + int startFrom, + int pageSize) { final String methodName = "getSupportedByResource"; final String guidPropertyName = "resourceGUID"; @@ -845,8 +845,8 @@ public RelatedElementListResponse getSupportedByResource(String serverName, RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - RelatedElementListResponse response = new RelatedElementListResponse(); - AuditLog auditLog = null; + RelatedElementsResponse response = new RelatedElementsResponse(); + AuditLog auditLog = null; try { @@ -854,16 +854,16 @@ public RelatedElementListResponse getSupportedByResource(String serverName, ReferenceableHandler handler = instanceHandler.getRelatedElementHandler(userId, serverName, methodName); - response.setElementList(handler.getSupportedByResource(userId, - resourceGUID, - guidPropertyName, - OpenMetadataType.REFERENCEABLE.typeName, - startFrom, - pageSize, - false, - false, - new Date(), - methodName)); + response.setElements(handler.getSupportedByResource(userId, + resourceGUID, + guidPropertyName, + OpenMetadataType.REFERENCEABLE.typeName, + startFrom, + pageSize, + false, + false, + new Date(), + methodName)); } catch (Exception error) { @@ -1056,19 +1056,19 @@ public VoidResponse clearCatalogTemplate(String serverName, * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - public RelatedElementListResponse getCatalogTemplateList(String serverName, - String userId, - String elementGUID, - int startFrom, - int pageSize) + public RelatedElementsResponse getCatalogTemplateList(String serverName, + String userId, + String elementGUID, + int startFrom, + int pageSize) { final String methodName = "getCatalogTemplateList"; final String guidPropertyName = "elementGUID"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - RelatedElementListResponse response = new RelatedElementListResponse(); - AuditLog auditLog = null; + RelatedElementsResponse response = new RelatedElementsResponse(); + AuditLog auditLog = null; try { @@ -1076,16 +1076,16 @@ public RelatedElementListResponse getCatalogTemplateList(String serverName, ReferenceableHandler handler = instanceHandler.getRelatedElementHandler(userId, serverName, methodName); - response.setElementList(handler.getCatalogTemplateList(userId, - elementGUID, - guidPropertyName, - OpenMetadataType.REFERENCEABLE.typeName, - startFrom, - pageSize, - false, - false, - new Date(), - methodName)); + response.setElements(handler.getCatalogTemplateList(userId, + elementGUID, + guidPropertyName, + OpenMetadataType.REFERENCEABLE.typeName, + startFrom, + pageSize, + false, + false, + new Date(), + methodName)); } catch (Exception error) { @@ -1112,11 +1112,11 @@ public RelatedElementListResponse getCatalogTemplateList(String serverName, * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - public RelatedElementListResponse getSupportedByTemplate(String serverName, - String userId, - String templateGUID, - int startFrom, - int pageSize) + public RelatedElementsResponse getSupportedByTemplate(String serverName, + String userId, + String templateGUID, + int startFrom, + int pageSize) { final String methodName = "getSupportedByTemplate"; final String guidPropertyName = "templateGUID"; @@ -1124,8 +1124,8 @@ public RelatedElementListResponse getSupportedByTemplate(String serverName, RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - RelatedElementListResponse response = new RelatedElementListResponse(); - AuditLog auditLog = null; + RelatedElementsResponse response = new RelatedElementsResponse(); + AuditLog auditLog = null; try { @@ -1133,16 +1133,16 @@ public RelatedElementListResponse getSupportedByTemplate(String serverName, ReferenceableHandler handler = instanceHandler.getRelatedElementHandler(userId, serverName, methodName); - response.setElementList(handler.getSupportedByTemplate(userId, - templateGUID, - guidPropertyName, - OpenMetadataType.REFERENCEABLE.typeName, - startFrom, - pageSize, - false, - false, - new Date(), - methodName)); + response.setElements(handler.getSupportedByTemplate(userId, + templateGUID, + guidPropertyName, + OpenMetadataType.REFERENCEABLE.typeName, + startFrom, + pageSize, + false, + false, + new Date(), + methodName)); } catch (Exception error) { diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/ValidValuesRESTServices.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/ValidValuesRESTServices.java index fd85a992547..d69cc31af8e 100644 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/ValidValuesRESTServices.java +++ b/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/ValidValuesRESTServices.java @@ -2,10 +2,10 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.assetowner.server; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.ValidValueElement; -import org.odpi.openmetadata.accessservices.assetowner.rest.ValidValueResponse; -import org.odpi.openmetadata.accessservices.assetowner.rest.ValidValuesRequestBody; -import org.odpi.openmetadata.accessservices.assetowner.rest.ValidValuesResponse; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ValidValueElement; +import org.odpi.openmetadata.commonservices.ffdc.rest.ValidValueResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.ValidValuesRequestBody; +import org.odpi.openmetadata.commonservices.ffdc.rest.ValidValuesResponse; import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; @@ -522,16 +522,16 @@ public ValidValuesResponse getValidValueByName(String serverName, { ValidValuesHandler handler = instanceHandler.getValidValuesHandler(userId, serverName, methodName); - response.setElementList(handler.getValidValueByName(userId, - validValueName, - nameParameterName, - startFrom, - pageSize, - false, - false, - instanceHandler.getSupportedZones(userId, serverName, methodName), - new Date(), - methodName)); + response.setElements(handler.getValidValueByName(userId, + validValueName, + nameParameterName, + startFrom, + pageSize, + false, + false, + instanceHandler.getSupportedZones(userId, serverName, methodName), + new Date(), + methodName)); } } catch (Exception error) @@ -581,16 +581,16 @@ public ValidValuesResponse findValidValues(String serverName, { ValidValuesHandler handler = instanceHandler.getValidValuesHandler(userId, serverName, methodName); - response.setElementList(handler.findValidValues(userId, - requestBody.getFilter(), - searchStringParameterName, - startFrom, - pageSize, - false, - false, - instanceHandler.getSupportedZones(userId, serverName, methodName), - requestBody.getEffectiveTime(), - methodName)); + response.setElements(handler.findValidValues(userId, + requestBody.getFilter(), + searchStringParameterName, + startFrom, + pageSize, + false, + false, + instanceHandler.getSupportedZones(userId, serverName, methodName), + requestBody.getEffectiveTime(), + methodName)); } } catch (Exception error) @@ -637,16 +637,16 @@ public ValidValuesResponse getValidValueSetMembers(String serverName, ValidValuesHandler handler = instanceHandler.getValidValuesHandler(userId, serverName, methodName); - response.setElementList(handler.getValidValueSetMembers(userId, - validValueSetGUID, - validValueGUIDParameter, - startFrom, - pageSize, - false, - false, - instanceHandler.getSupportedZones(userId, serverName, methodName), - new Date(), - methodName)); + response.setElements(handler.getValidValueSetMembers(userId, + validValueSetGUID, + validValueGUIDParameter, + startFrom, + pageSize, + false, + false, + instanceHandler.getSupportedZones(userId, serverName, methodName), + new Date(), + methodName)); } catch (Exception error) { @@ -692,16 +692,16 @@ public ValidValuesResponse getSetsForValidValue(String serverName, ValidValuesHandler handler = instanceHandler.getValidValuesHandler(userId, serverName, methodName); - response.setElementList(handler.getSetsForValidValue(userId, - validValueGUID, - validValueGUIDParameter, - startFrom, - pageSize, - false, - false, - instanceHandler.getSupportedZones(userId, serverName, methodName), - new Date(), - methodName)); + response.setElements(handler.getSetsForValidValue(userId, + validValueGUID, + validValueGUIDParameter, + startFrom, + pageSize, + false, + false, + instanceHandler.getSupportedZones(userId, serverName, methodName), + new Date(), + methodName)); } catch (Exception error) { diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-spring/build.gradle b/open-metadata-implementation/access-services/asset-owner/asset-owner-spring/build.gradle index f7bd4b7c831..60c7670cafb 100644 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-spring/build.gradle +++ b/open-metadata-implementation/access-services/asset-owner/asset-owner-spring/build.gradle @@ -5,6 +5,7 @@ dependencies { + implementation project(':open-metadata-implementation:frameworks:open-metadata-framework') implementation project(':open-metadata-implementation:common-services:ffdc-services') implementation project(':open-metadata-implementation:access-services:asset-owner:asset-owner-server') implementation project(':open-metadata-implementation:access-services:asset-owner:asset-owner-api') diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-spring/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/spring/AssetCertificationsResource.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-spring/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/spring/AssetCertificationsResource.java index 25344a37546..d1555a53bb2 100644 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-spring/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/spring/AssetCertificationsResource.java +++ b/open-metadata-implementation/access-services/asset-owner/asset-owner-spring/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/spring/AssetCertificationsResource.java @@ -5,14 +5,9 @@ import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.accessservices.assetowner.rest.CertificationTypeListResponse; -import org.odpi.openmetadata.accessservices.assetowner.rest.CertificationTypeResponse; -import org.odpi.openmetadata.accessservices.assetowner.rest.RelatedElementListResponse; -import org.odpi.openmetadata.accessservices.assetowner.rest.RelationshipRequestBody; + import org.odpi.openmetadata.accessservices.assetowner.server.CertificationRESTServices; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; @@ -111,11 +106,11 @@ public CertificationTypeResponse getCertificationTypeByDocId(@PathVariable Strin */ @PostMapping (path = "/certification-types/by-title") - public CertificationTypeListResponse getCertificationTypesByTitle(@PathVariable String serverName, - @PathVariable String userId, - @RequestParam int startFrom, - @RequestParam int pageSize, - @RequestBody SearchStringRequestBody requestBody) + public CertificationTypesResponse getCertificationTypesByTitle(@PathVariable String serverName, + @PathVariable String userId, + @RequestParam int startFrom, + @RequestParam int pageSize, + @RequestBody SearchStringRequestBody requestBody) { return restAPI.getCertificationTypesByTitle(serverName, userId, startFrom, pageSize, requestBody); } @@ -137,11 +132,11 @@ public CertificationTypeListResponse getCertificationTypesByTitle(@PathVariable */ @GetMapping (path = "/certification-types/by-domain/{domainIdentifier}") - public CertificationTypeListResponse getCertificationTypeByDomainId(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable int domainIdentifier, - @RequestParam int startFrom, - @RequestParam int pageSize) + public CertificationTypesResponse getCertificationTypeByDomainId(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable int domainIdentifier, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getCertificationTypeByDomainId(serverName, userId, domainIdentifier, startFrom, pageSize); } @@ -245,11 +240,11 @@ public VoidResponse decertifyElement(@PathVariable String serve */ @GetMapping (path = "/elements/certifications/{certificationGUID}") - public RelatedElementListResponse getCertifiedElements(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String certificationGUID, - @RequestParam int startFrom, - @RequestParam int pageSize) + public RelatedElementsResponse getCertifiedElements(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String certificationGUID, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getCertifiedElements(serverName, userId, certificationGUID, startFrom, pageSize); } @@ -271,11 +266,11 @@ public RelatedElementListResponse getCertifiedElements(@PathVariable String serv */ @GetMapping (path = "/elements/{elementGUID}/certifications") - public RelatedElementListResponse getCertifications(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String elementGUID, - @RequestParam int startFrom, - @RequestParam int pageSize) + public RelatedElementsResponse getCertifications(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String elementGUID, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getCertifications(serverName, userId, elementGUID, startFrom, pageSize); } diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-spring/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/spring/AssetExternalReferenceResource.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-spring/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/spring/AssetExternalReferenceResource.java index 8bd682e633d..44d5949fa6c 100644 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-spring/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/spring/AssetExternalReferenceResource.java +++ b/open-metadata-implementation/access-services/asset-owner/asset-owner-spring/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/spring/AssetExternalReferenceResource.java @@ -5,17 +5,9 @@ import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.accessservices.assetowner.rest.ExternalReferenceListResponse; -import org.odpi.openmetadata.accessservices.assetowner.rest.ExternalReferenceResponse; -import org.odpi.openmetadata.accessservices.assetowner.rest.ExternalSourceRequestBody; -import org.odpi.openmetadata.accessservices.assetowner.rest.ReferenceableRequestBody; -import org.odpi.openmetadata.accessservices.assetowner.rest.RelatedElementListResponse; -import org.odpi.openmetadata.accessservices.assetowner.rest.RelationshipRequestBody; + import org.odpi.openmetadata.accessservices.assetowner.server.ExternalReferenceRESTServices; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; @@ -64,9 +56,9 @@ public AssetExternalReferenceResource() */ @PostMapping(path = "/external-references") - public GUIDResponse createExternalReference(@PathVariable String serverName, - @PathVariable String userId, - @RequestBody ReferenceableRequestBody requestBody) + public GUIDResponse createExternalReference(@PathVariable String serverName, + @PathVariable String userId, + @RequestBody ReferenceableRequestBody requestBody) { return restAPI.createExternalReference(serverName, userId, requestBody); } @@ -214,11 +206,11 @@ public ExternalReferenceResponse getExternalReferenceByGUID(@PathVariable String */ @PostMapping(path = "/external-references/by-resource-id") - public ExternalReferenceListResponse findExternalReferencesById(@PathVariable String serverName, - @PathVariable String userId, - @RequestParam int startFrom, - @RequestParam int pageSize, - @RequestBody SearchStringRequestBody requestBody) + public ExternalReferencesResponse findExternalReferencesById(@PathVariable String serverName, + @PathVariable String userId, + @RequestParam int startFrom, + @RequestParam int pageSize, + @RequestBody SearchStringRequestBody requestBody) { return restAPI.findExternalReferencesById(serverName, userId, startFrom, pageSize, requestBody); } @@ -240,11 +232,11 @@ public ExternalReferenceListResponse findExternalReferencesById(@PathVariable St */ @PostMapping(path = "/external-references/by-url") - public ExternalReferenceListResponse getExternalReferencesByURL(@PathVariable String serverName, - @PathVariable String userId, - @RequestParam int startFrom, - @RequestParam int pageSize, - @RequestBody NameRequestBody requestBody) + public ExternalReferencesResponse getExternalReferencesByURL(@PathVariable String serverName, + @PathVariable String userId, + @RequestParam int startFrom, + @RequestParam int pageSize, + @RequestBody NameRequestBody requestBody) { return restAPI.getExternalReferencesByURL(serverName, userId, startFrom, pageSize, requestBody); } @@ -266,11 +258,11 @@ public ExternalReferenceListResponse getExternalReferencesByURL(@PathVariable St */ @GetMapping(path = "/elements/{attachedToGUID}/external-references") - public ExternalReferenceListResponse retrieveAttachedExternalReferences(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String attachedToGUID, - @RequestParam int startFrom, - @RequestParam int pageSize) + public ExternalReferencesResponse retrieveAttachedExternalReferences(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String attachedToGUID, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.retrieveAttachedExternalReferences(serverName, userId, attachedToGUID, startFrom, pageSize); } @@ -292,11 +284,11 @@ public ExternalReferenceListResponse retrieveAttachedExternalReferences(@PathVar */ @GetMapping(path = "/elements/external-references/{externalReferenceGUID}") - public RelatedElementListResponse getElementsForExternalReference(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String externalReferenceGUID, - @RequestParam int startFrom, - @RequestParam int pageSize) + public RelatedElementsResponse getElementsForExternalReference(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String externalReferenceGUID, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getElementsForExternalReference(serverName, userId, externalReferenceGUID, startFrom, pageSize); } diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-spring/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/spring/AssetLicensesResource.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-spring/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/spring/AssetLicensesResource.java index 1cdd6aac194..3cdf5c3e7b6 100644 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-spring/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/spring/AssetLicensesResource.java +++ b/open-metadata-implementation/access-services/asset-owner/asset-owner-spring/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/spring/AssetLicensesResource.java @@ -5,14 +5,8 @@ import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.accessservices.assetowner.rest.LicenseTypeListResponse; -import org.odpi.openmetadata.accessservices.assetowner.rest.LicenseTypeResponse; -import org.odpi.openmetadata.accessservices.assetowner.rest.RelatedElementListResponse; -import org.odpi.openmetadata.accessservices.assetowner.rest.RelationshipRequestBody; import org.odpi.openmetadata.accessservices.assetowner.server.LicenseRESTServices; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; @@ -111,11 +105,11 @@ public LicenseTypeResponse getLicenseTypeByDocId(@PathVariable String serverName */ @PostMapping (path = "/license-types/by-title") - public LicenseTypeListResponse getLicenseTypesByTitle(@PathVariable String serverName, - @PathVariable String userId, - @RequestParam int startFrom, - @RequestParam int pageSize, - @RequestBody SearchStringRequestBody requestBody) + public LicenseTypesResponse getLicenseTypesByTitle(@PathVariable String serverName, + @PathVariable String userId, + @RequestParam int startFrom, + @RequestParam int pageSize, + @RequestBody SearchStringRequestBody requestBody) { return restAPI.getLicenseTypesByTitle(serverName, userId, startFrom, pageSize, requestBody); } @@ -137,11 +131,11 @@ public LicenseTypeListResponse getLicenseTypesByTitle(@PathVariable String */ @GetMapping (path = "/license-types/by-domain/{domainIdentifier}") - public LicenseTypeListResponse getLicenseTypeByDomainId(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable int domainIdentifier, - @RequestParam int startFrom, - @RequestParam int pageSize) + public LicenseTypesResponse getLicenseTypeByDomainId(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable int domainIdentifier, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getLicenseTypeByDomainId(serverName, userId, domainIdentifier, startFrom, pageSize); } @@ -245,11 +239,11 @@ public VoidResponse unlicenseElement(@PathVariable String serve */ @GetMapping (path = "/elements/licenses/{licenseGUID}") - public RelatedElementListResponse getCertifiedElements(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String licenseGUID, - @RequestParam int startFrom, - @RequestParam int pageSize) + public RelatedElementsResponse getCertifiedElements(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String licenseGUID, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getLicensedElements(serverName, userId, licenseGUID, startFrom, pageSize); } @@ -271,11 +265,11 @@ public RelatedElementListResponse getCertifiedElements(@PathVariable String serv */ @GetMapping (path = "/elements/{elementGUID}/licenses") - public RelatedElementListResponse getLicenses(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String elementGUID, - @RequestParam int startFrom, - @RequestParam int pageSize) + public RelatedElementsResponse getLicenses(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String elementGUID, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getLicenses(serverName, userId, elementGUID, startFrom, pageSize); } diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-spring/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/spring/AssetOwnerResource.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-spring/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/spring/AssetOwnerResource.java index 7c1fd5b0c75..03dfb499b45 100644 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-spring/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/spring/AssetOwnerResource.java +++ b/open-metadata-implementation/access-services/asset-owner/asset-owner-spring/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/spring/AssetOwnerResource.java @@ -7,8 +7,14 @@ import io.swagger.v3.oas.annotations.tags.Tag; import org.odpi.openmetadata.accessservices.assetowner.properties.*; import org.odpi.openmetadata.accessservices.assetowner.rest.*; +import org.odpi.openmetadata.accessservices.assetowner.rest.TemplateRequestBody; import org.odpi.openmetadata.accessservices.assetowner.server.AssetOwnerRESTServices; import org.odpi.openmetadata.commonservices.ffdc.rest.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.AssetProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.SchemaTypeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.SchemaAttributeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.SemanticAssignmentProperties; + import org.springframework.web.bind.annotation.*; import java.util.List; @@ -1053,11 +1059,11 @@ public VoidResponse removeSchemaAttribute(@PathVariable String server */ @PostMapping(path = "/schema-attributes/by-search-string") - public SchemaAttributeElementsResponse findSchemaAttributes(@PathVariable String serverName, - @PathVariable String userId, - @RequestParam int startFrom, - @RequestParam int pageSize, - @RequestBody SearchStringRequestBody requestBody) + public SchemaAttributesResponse findSchemaAttributes(@PathVariable String serverName, + @PathVariable String userId, + @RequestParam int startFrom, + @RequestParam int pageSize, + @RequestBody SearchStringRequestBody requestBody) { return restAPI.findSchemaAttributes(serverName, userId, startFrom, pageSize, requestBody); } @@ -1080,12 +1086,12 @@ public SchemaAttributeElementsResponse findSchemaAttributes(@PathVariable String */ @PostMapping(path = "/schema-elements/{parentSchemaElementGUID}/schema-attributes/retrieve") - public SchemaAttributeElementsResponse getNestedAttributes(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String parentSchemaElementGUID, - @RequestParam int startFrom, - @RequestParam int pageSize, - @RequestBody EffectiveTimeQueryRequestBody requestBody) + public SchemaAttributesResponse getNestedAttributes(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String parentSchemaElementGUID, + @RequestParam int startFrom, + @RequestParam int pageSize, + @RequestBody EffectiveTimeQueryRequestBody requestBody) { return restAPI.getNestedAttributes(serverName, userId, parentSchemaElementGUID, startFrom, pageSize, requestBody); } @@ -1108,11 +1114,11 @@ public SchemaAttributeElementsResponse getNestedAttributes(@PathVariable String */ @PostMapping(path = "/schema-attributes/by-name") - public SchemaAttributeElementsResponse getSchemaAttributesByName(@PathVariable String serverName, - @PathVariable String userId, - @RequestParam int startFrom, - @RequestParam int pageSize, - @RequestBody NameRequestBody requestBody) + public SchemaAttributesResponse getSchemaAttributesByName(@PathVariable String serverName, + @PathVariable String userId, + @RequestParam int startFrom, + @RequestParam int pageSize, + @RequestBody NameRequestBody requestBody) { return restAPI.getSchemaAttributesByName(serverName, userId, startFrom, pageSize, requestBody); } @@ -1133,10 +1139,10 @@ public SchemaAttributeElementsResponse getSchemaAttributesByName(@PathVariable S */ @PostMapping(path = "/schema-attributes/{schemaAttributeGUID}/retrieve") - public SchemaAttributeElementResponse getSchemaAttributeByGUID(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String schemaAttributeGUID, - @RequestBody EffectiveTimeQueryRequestBody requestBody) + public SchemaAttributeResponse getSchemaAttributeByGUID(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String schemaAttributeGUID, + @RequestBody EffectiveTimeQueryRequestBody requestBody) { return restAPI.getSchemaAttributeByGUID(serverName, userId, schemaAttributeGUID, requestBody); } @@ -1161,7 +1167,7 @@ public SchemaAttributeElementResponse getSchemaAttributeByGUID(@PathVariable Str public VoidResponse addConnectionToAsset(@PathVariable String serverName, @PathVariable String userId, @PathVariable String assetGUID, - @RequestBody ConnectionRequestBody requestBody) + @RequestBody OCFConnectionRequestBody requestBody) { return restAPI.addConnectionToAsset(serverName, userId, assetGUID, requestBody); } @@ -1686,11 +1692,11 @@ public AssetElementResponse getAssetSummary(@PathVariable String serverName, */ @GetMapping(path = "/assets/{assetGUID}/discovery-analysis-reports") - public SurveyReportListResponse getDiscoveryAnalysisReports(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String assetGUID, - @RequestParam int startingFrom, - @RequestParam int maximumResults) + public SurveyReportsResponse getDiscoveryAnalysisReports(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String assetGUID, + @RequestParam int startingFrom, + @RequestParam int maximumResults) { return restAPI.getSurveyReports(serverName, userId, @@ -1718,12 +1724,12 @@ public SurveyReportListResponse getDiscoveryAnalysisReports(@PathVariable String */ @GetMapping(path = "/discovery-analysis-reports/{discoveryReportGUID}/annotations") - public AnnotationListResponse getDiscoveryReportAnnotations(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String discoveryReportGUID, - @RequestParam int startingFrom, - @RequestParam int maximumResults, - @RequestBody StatusRequestBody requestBody) + public AnnotationsResponse getDiscoveryReportAnnotations(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String discoveryReportGUID, + @RequestParam int startingFrom, + @RequestParam int maximumResults, + @RequestBody AnnotationStatusRequestBody requestBody) { return restAPI.getSurveyReportAnnotations(serverName, userId, @@ -1752,12 +1758,12 @@ public AnnotationListResponse getDiscoveryReportAnnotations(@PathVariable String */ @GetMapping(path = "/annotations/{annotationGUID}/annotations") - public AnnotationListResponse getExtendedAnnotations(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String annotationGUID, - @RequestParam int startingFrom, - @RequestParam int maximumResults, - @RequestBody StatusRequestBody requestBody) + public AnnotationsResponse getExtendedAnnotations(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String annotationGUID, + @RequestParam int startingFrom, + @RequestParam int maximumResults, + @RequestBody AnnotationStatusRequestBody requestBody) { return restAPI.getExtendedAnnotations(serverName, userId, diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-spring/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/spring/AssetRelationshipsResource.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-spring/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/spring/AssetRelationshipsResource.java index c3b78c0a2bc..a7e4f73ad4c 100644 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-spring/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/spring/AssetRelationshipsResource.java +++ b/open-metadata-implementation/access-services/asset-owner/asset-owner-spring/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/spring/AssetRelationshipsResource.java @@ -4,10 +4,11 @@ import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.accessservices.assetowner.rest.ExternalSourceRequestBody; -import org.odpi.openmetadata.accessservices.assetowner.rest.RelatedElementListResponse; -import org.odpi.openmetadata.accessservices.assetowner.rest.RelationshipRequestBody; + import org.odpi.openmetadata.accessservices.assetowner.server.RelatedElementRESTServices; +import org.odpi.openmetadata.commonservices.ffdc.rest.ExternalSourceRequestBody; +import org.odpi.openmetadata.commonservices.ffdc.rest.RelatedElementsResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.RelationshipRequestBody; import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; @@ -91,7 +92,7 @@ public VoidResponse clearMoreInformation(@PathVariable String @PathVariable String userId, @PathVariable String elementGUID, @PathVariable String detailGUID, - @RequestBody ExternalSourceRequestBody requestBody) + @RequestBody ExternalSourceRequestBody requestBody) { return restAPI.clearMoreInformation(serverName, userId, elementGUID, detailGUID, requestBody); } @@ -113,11 +114,11 @@ public VoidResponse clearMoreInformation(@PathVariable String */ @GetMapping(path = "/related-elements/more-information/by-descriptive-element/{elementGUID}") - public RelatedElementListResponse getMoreInformation(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String elementGUID, - @RequestParam int startFrom, - @RequestParam int pageSize) + public RelatedElementsResponse getMoreInformation(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String elementGUID, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getMoreInformation(serverName, userId, elementGUID, startFrom, pageSize); } @@ -139,11 +140,11 @@ public RelatedElementListResponse getMoreInformation(@PathVariable String serve */ @GetMapping(path = "/related-elements/more-information/by-detail-element/{detailGUID}") - public RelatedElementListResponse getDescriptiveElements(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String detailGUID, - @RequestParam int startFrom, - @RequestParam int pageSize) + public RelatedElementsResponse getDescriptiveElements(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String detailGUID, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getDescriptiveElements(serverName, userId, detailGUID, startFrom, pageSize); } @@ -217,11 +218,11 @@ public VoidResponse clearStakeholder(@PathVariable String ser */ @GetMapping(path = "/related-elements/stakeholders/by-commissioned-element/{elementGUID}") - public RelatedElementListResponse getStakeholders(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String elementGUID, - @RequestParam int startFrom, - @RequestParam int pageSize) + public RelatedElementsResponse getStakeholders(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String elementGUID, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getStakeholders(serverName, userId, elementGUID, startFrom, pageSize); } @@ -243,11 +244,11 @@ public RelatedElementListResponse getStakeholders(@PathVariable String serverNa */ @GetMapping(path = "/related-elements/stakeholders/by-stakeholder/{stakeholderGUID}") - public RelatedElementListResponse getStakeholderCommissionedElements(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String stakeholderGUID, - @RequestParam int startFrom, - @RequestParam int pageSize) + public RelatedElementsResponse getStakeholderCommissionedElements(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String stakeholderGUID, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getStakeholderCommissionedElements(serverName, userId, stakeholderGUID, startFrom, pageSize); } @@ -321,11 +322,11 @@ public VoidResponse clearResource(@PathVariable String server */ @GetMapping(path = "/related-elements/resource-list/by-assignee/{elementGUID}") - public RelatedElementListResponse getResourceList(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String elementGUID, - @RequestParam int startFrom, - @RequestParam int pageSize) + public RelatedElementsResponse getResourceList(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String elementGUID, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getResourceList(serverName, userId, elementGUID, startFrom, pageSize); } @@ -347,11 +348,11 @@ public RelatedElementListResponse getResourceList(@PathVariable String serverNa */ @GetMapping(path = "/related-elements/resource-list/by-resource/{resourceGUID}") - public RelatedElementListResponse getSupportedByResource(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String resourceGUID, - @RequestParam int startFrom, - @RequestParam int pageSize) + public RelatedElementsResponse getSupportedByResource(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String resourceGUID, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getSupportedByResource(serverName, userId, resourceGUID, startFrom, pageSize); } @@ -425,11 +426,11 @@ public VoidResponse clearCatalogTemplate(@PathVariable String */ @GetMapping(path = "/related-elements/catalog-templates/by-assignee/{elementGUID}") - public RelatedElementListResponse getCatalogTemplateList(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String elementGUID, - @RequestParam int startFrom, - @RequestParam int pageSize) + public RelatedElementsResponse getCatalogTemplateList(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String elementGUID, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getCatalogTemplateList(serverName, userId, elementGUID, startFrom, pageSize); } @@ -451,11 +452,11 @@ public RelatedElementListResponse getCatalogTemplateList(@PathVariable String s */ @GetMapping(path = "/related-elements/catalog-templates/by-template/{templateGUID}") - public RelatedElementListResponse getSupportedByTemplate(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String templateGUID, - @RequestParam int startFrom, - @RequestParam int pageSize) + public RelatedElementsResponse getSupportedByTemplate(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String templateGUID, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getSupportedByTemplate(serverName, userId, templateGUID, startFrom, pageSize); } diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-spring/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/spring/ConnectionsBuildingResource.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-spring/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/spring/ConnectionsBuildingResource.java index ac3c083208d..1745f137be5 100644 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-spring/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/spring/ConnectionsBuildingResource.java +++ b/open-metadata-implementation/access-services/asset-owner/asset-owner-spring/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/spring/ConnectionsBuildingResource.java @@ -4,23 +4,11 @@ import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.accessservices.assetowner.properties.ConnectionProperties; -import org.odpi.openmetadata.accessservices.assetowner.properties.EndpointProperties; import org.odpi.openmetadata.accessservices.assetowner.properties.TemplateProperties; -import org.odpi.openmetadata.accessservices.assetowner.rest.ConnectionResponse; -import org.odpi.openmetadata.accessservices.assetowner.rest.ConnectionsResponse; -import org.odpi.openmetadata.accessservices.assetowner.rest.ConnectorTypeResponse; -import org.odpi.openmetadata.accessservices.assetowner.rest.ConnectorTypesResponse; -import org.odpi.openmetadata.accessservices.assetowner.rest.EmbeddedConnectionRequestBody; -import org.odpi.openmetadata.accessservices.assetowner.rest.EndpointResponse; -import org.odpi.openmetadata.accessservices.assetowner.rest.EndpointsResponse; import org.odpi.openmetadata.accessservices.assetowner.server.ConnectionRESTServices; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.NullRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.StringRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.ConnectionProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.EndpointProperties; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-spring/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/spring/FileSystemOnboardingResource.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-spring/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/spring/FileSystemOnboardingResource.java index 729b8b0a4a4..33ab02fb1e1 100644 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-spring/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/spring/FileSystemOnboardingResource.java +++ b/open-metadata-implementation/access-services/asset-owner/asset-owner-spring/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/spring/FileSystemOnboardingResource.java @@ -5,12 +5,8 @@ import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.accessservices.assetowner.rest.*; import org.odpi.openmetadata.accessservices.assetowner.server.FileSystemRESTServices; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDListResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NullRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.springframework.web.bind.annotation.*; /** diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-spring/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/spring/ValidValuesOnboardingResource.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-spring/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/spring/ValidValuesOnboardingResource.java index 9197f7cfb23..d55cdefd2ea 100644 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-spring/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/spring/ValidValuesOnboardingResource.java +++ b/open-metadata-implementation/access-services/asset-owner/asset-owner-spring/src/main/java/org/odpi/openmetadata/accessservices/assetowner/server/spring/ValidValuesOnboardingResource.java @@ -4,9 +4,9 @@ import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.accessservices.assetowner.rest.ValidValueResponse; -import org.odpi.openmetadata.accessservices.assetowner.rest.ValidValuesRequestBody; -import org.odpi.openmetadata.accessservices.assetowner.rest.ValidValuesResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.ValidValueResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.ValidValuesRequestBody; +import org.odpi.openmetadata.commonservices.ffdc.rest.ValidValuesResponse; import org.odpi.openmetadata.accessservices.assetowner.server.ValidValuesRESTServices; import org.odpi.openmetadata.commonservices.ffdc.rest.FilterRequestBody; import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-topic-connectors/build.gradle b/open-metadata-implementation/access-services/asset-owner/asset-owner-topic-connectors/build.gradle index 653027e2990..b3c3ea43996 100644 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-topic-connectors/build.gradle +++ b/open-metadata-implementation/access-services/asset-owner/asset-owner-topic-connectors/build.gradle @@ -6,6 +6,7 @@ dependencies { implementation project(':open-metadata-implementation:frameworks:audit-log-framework') + implementation project(':open-metadata-implementation:frameworks:open-metadata-framework') implementation project(':open-metadata-implementation:frameworks:open-connector-framework') implementation project(':open-metadata-implementation:repository-services:repository-services-apis') implementation project(':open-metadata-implementation:access-services:asset-owner:asset-owner-api') diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/api/CollectionManagementInterface.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/api/CollectionManagementInterface.java index a8558fe75c1..e15f9231d6b 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/api/CollectionManagementInterface.java +++ b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/api/CollectionManagementInterface.java @@ -3,14 +3,15 @@ package org.odpi.openmetadata.accessservices.communityprofile.api; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.CollectionElement; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.CollectionMember; -import org.odpi.openmetadata.accessservices.communityprofile.properties.CollectionFolderProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.CollectionMembershipProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.CollectionProperties; + import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.CollectionElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.CollectionMember; +import org.odpi.openmetadata.frameworks.openmetadata.properties.collections.CollectionFolderProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.collections.CollectionMembershipProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.collections.CollectionProperties; import java.util.List; diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/api/CommunityManagementInterface.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/api/CommunityManagementInterface.java index a748433ad31..18255f41846 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/api/CommunityManagementInterface.java +++ b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/api/CommunityManagementInterface.java @@ -2,10 +2,10 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.communityprofile.api; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.CommunityElement; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.PersonRoleElement; -import org.odpi.openmetadata.accessservices.communityprofile.properties.CommunityMembershipProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.CommunityProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.CommunityElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.PersonRoleElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.communities.CommunityMembershipProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.communities.CommunityProperties; import org.odpi.openmetadata.accessservices.communityprofile.properties.TemplateProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/api/ExternalReferenceManagementInterface.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/api/ExternalReferenceManagementInterface.java index cdf1611d3bb..67707532324 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/api/ExternalReferenceManagementInterface.java +++ b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/api/ExternalReferenceManagementInterface.java @@ -2,11 +2,11 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.communityprofile.api; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.ExternalReferenceElement; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ExternalReferenceProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ExternalReferenceElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.externalreferences.ExternalReferenceProperties; import java.util.List; diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/api/LocationManagementInterface.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/api/LocationManagementInterface.java index f977006e7f4..66b0799f07c 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/api/LocationManagementInterface.java +++ b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/api/LocationManagementInterface.java @@ -2,15 +2,15 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.communityprofile.api; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.LocationElement; -import org.odpi.openmetadata.accessservices.communityprofile.properties.AdjacentLocationProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.AssetLocationProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.DigitalLocationProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.FixedLocationProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.LocationProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.NestedLocationProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ProfileLocationProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.SecureLocationProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.LocationElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.locations.AdjacentLocationProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.locations.AssetLocationProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.locations.DigitalLocationProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.locations.FixedLocationProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.locations.LocationProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.locations.NestedLocationProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.locations.ProfileLocationProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.locations.SecureLocationProperties; import org.odpi.openmetadata.accessservices.communityprofile.properties.TemplateProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/api/MetadataSourceInterface.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/api/MetadataSourceInterface.java index 4049934d7e7..936aa715a1d 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/api/MetadataSourceInterface.java +++ b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/api/MetadataSourceInterface.java @@ -3,8 +3,8 @@ package org.odpi.openmetadata.accessservices.communityprofile.api; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.MetadataSourceElement; -import org.odpi.openmetadata.accessservices.communityprofile.properties.MetadataSourceProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.MetadataSourceElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities.MetadataSourceProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/api/OrganizationManagementInterface.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/api/OrganizationManagementInterface.java index 79ebb93c51d..50a183b2828 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/api/OrganizationManagementInterface.java +++ b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/api/OrganizationManagementInterface.java @@ -2,17 +2,14 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.communityprofile.api; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.ActorProfileElement; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.PersonRoleAppointee; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.PersonRoleElement; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ActorProfileProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.AppointmentProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ContactMethodProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ContributionRecord; -import org.odpi.openmetadata.accessservices.communityprofile.properties.PersonRoleProperties; + import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ActorProfileElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.Appointee; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.PersonRoleElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.*; import java.util.Date; import java.util.List; @@ -417,13 +414,13 @@ String linkPersonRoleToProfile(String userId, * @throws PropertyServerException problem accessing property server * @throws UserNotAuthorizedException security access problem */ - List getAppointees(String userId, - String personRoleGUID, - Date effectiveTime, - int startFrom, - int pageSize) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException; + List getAppointees(String userId, + String personRoleGUID, + Date effectiveTime, + int startFrom, + int pageSize) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException; /** diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/api/RelatedElementsManagementInterface.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/api/RelatedElementsManagementInterface.java index 52bfb093c54..d310ca556a9 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/api/RelatedElementsManagementInterface.java +++ b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/api/RelatedElementsManagementInterface.java @@ -2,14 +2,14 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.communityprofile.api; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.RelatedElement; -import org.odpi.openmetadata.accessservices.communityprofile.properties.AssignmentScopeProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.RelationshipProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ResourceListProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.StakeholderProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.RelatedElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.AssignmentScopeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.projects.StakeholderProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.resources.ResourceListProperties; import java.util.List; diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/api/SecurityGroupInterface.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/api/SecurityGroupInterface.java index bf282912471..681a806437b 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/api/SecurityGroupInterface.java +++ b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/api/SecurityGroupInterface.java @@ -2,12 +2,12 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.communityprofile.api; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.SecurityGroupElement; -import org.odpi.openmetadata.accessservices.communityprofile.properties.SecurityGroupProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.SecurityGroupElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.security.SecurityGroupProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementStub; import java.util.List; diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/api/ToDoManagementInterface.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/api/ToDoManagementInterface.java index d6886b013cf..e2c09777df7 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/api/ToDoManagementInterface.java +++ b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/api/ToDoManagementInterface.java @@ -2,10 +2,10 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.communityprofile.api; -import org.odpi.openmetadata.accessservices.communityprofile.properties.NewActionTargetProperties; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.ToDoElement; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ActionTargetProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ToDoProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actions.NewToDoActionTargetProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ToDoElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actions.ToDoActionTargetProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actions.ToDoProperties; import org.odpi.openmetadata.frameworks.openmetadata.enums.ToDoStatus; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; @@ -38,7 +38,7 @@ String createToDo(String userId, String originatorGUID, String actionSponsorGUID, String assignToActorGUID, - List newActionTargetProperties, + List newActionTargetProperties, ToDoProperties properties) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException; @@ -79,9 +79,9 @@ void updateToDo(String userId, void updateActionTargetProperties(String userId, String actionTargetGUID, boolean isMergeUpdate, - ActionTargetProperties actionTargetProperties) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException; + ToDoActionTargetProperties actionTargetProperties) throws InvalidParameterException, + PropertyServerException, + UserNotAuthorizedException; /** diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/api/UserIdentityManagementInterface.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/api/UserIdentityManagementInterface.java index e867930093b..c7f147476f9 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/api/UserIdentityManagementInterface.java +++ b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/api/UserIdentityManagementInterface.java @@ -2,12 +2,12 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.communityprofile.api; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.UserIdentityElement; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ProfileIdentityProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.UserIdentityProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.UserIdentityElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.ProfileIdentityProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.UserIdentityProperties; import java.util.List; diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/api/ValidValueManagementInterface.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/api/ValidValueManagementInterface.java index 2715929564b..60fdfd42fd6 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/api/ValidValueManagementInterface.java +++ b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/api/ValidValueManagementInterface.java @@ -2,15 +2,15 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.communityprofile.api; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.ValidValueElement; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.RelatedElement; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ReferenceValueAssignmentProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ValidValueAssignmentProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ValidValueMembershipProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ValidValueProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.RelatedElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ValidValueElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues.ReferenceValueAssignmentProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues.ValidValueAssignmentProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues.ValidValueMembershipProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues.ValidValueProperties; import java.util.Date; import java.util.List; @@ -87,8 +87,8 @@ void setupValidValueMember(String userId, String validValueSetGUID, ValidValueMembershipProperties properties, String validValueMemberGUID) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException; + UserNotAuthorizedException, + PropertyServerException; /** diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/events/CommunityProfileOutboundEvent.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/events/CommunityProfileOutboundEvent.java index e9e97fa8097..f7fb0264242 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/events/CommunityProfileOutboundEvent.java +++ b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/events/CommunityProfileOutboundEvent.java @@ -3,7 +3,7 @@ package org.odpi.openmetadata.accessservices.communityprofile.events; import com.fasterxml.jackson.annotation.*; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementStub; import java.util.Date; import java.util.Map; diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/ActionTargetElement.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/ActionTargetElement.java deleted file mode 100644 index 69d1e123703..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/ActionTargetElement.java +++ /dev/null @@ -1,165 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ActionTargetProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; -import org.odpi.openmetadata.frameworks.governanceaction.properties.OpenMetadataElement; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ActionTargetElement describes an element that a person owning a "To Do" action should process. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ActionTargetElement -{ - private ElementHeader relationshipHeader = null; - private ActionTargetProperties relationshipProperties = null; - private OpenMetadataElement targetElement = null; - - - /** - * Typical Constructor - */ - public ActionTargetElement() - { - } - - - /** - * Copy/clone Constructor the resulting object will return true if tested with this.equals(template) as - * long as the template object is not null; - * - * @param template object being copied - */ - public ActionTargetElement(ActionTargetElement template) - { - if (template != null) - { - relationshipHeader = template.getRelationshipHeader(); - relationshipProperties = template.getRelationshipProperties(); - targetElement = template.getTargetElement(); - } - } - - - /** - * Return the header of the ActionTarget relationship. - * - * @return header - */ - public ElementHeader getRelationshipHeader() - { - return relationshipHeader; - } - - - /** - * Set up the header of the ActionTarget relationship. - * - * @param relationshipHeader header - */ - public void setRelationshipHeader(ElementHeader relationshipHeader) - { - this.relationshipHeader = relationshipHeader; - } - - - /** - * Return the properties of the ActionTarget relationship. - * - * @return properties - */ - public ActionTargetProperties getRelationshipProperties() - { - return relationshipProperties; - } - - - /** - * Set up the properties of the ActionTarget relationship. - * - * @param relationshipProperties properties - */ - public void setRelationshipProperties(ActionTargetProperties relationshipProperties) - { - this.relationshipProperties = relationshipProperties; - } - - - /** - * Return details of the target element that the governance action service is to process. - * - * @return metadata element properties - */ - public OpenMetadataElement getTargetElement() - { - return targetElement; - } - - - /** - * Set up details of the target element that the governance action service is to process. - * - * @param targetElement metadata element properties - */ - public void setTargetElement(OpenMetadataElement targetElement) - { - this.targetElement = targetElement; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "ActionTargetElement{" + - "relationshipGUID=" + relationshipHeader + - ", relationshipProperties=" + relationshipProperties + - ", targetElement=" + targetElement + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) return true; - if (objectToCompare == null || getClass() != objectToCompare.getClass()) return false; - if (!super.equals(objectToCompare)) return false; - ActionTargetElement that = (ActionTargetElement) objectToCompare; - return Objects.equals(relationshipHeader, that.relationshipHeader) && - Objects.equals(relationshipProperties, that.relationshipProperties) && - Objects.equals(targetElement, that.targetElement); - } - - /** - * Create a hash code for this element type. - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), relationshipHeader, relationshipProperties, targetElement); - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/ActorProfileElement.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/ActorProfileElement.java deleted file mode 100644 index 290e6c33403..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/ActorProfileElement.java +++ /dev/null @@ -1,459 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ActorProfileProperties; - -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; - - -/** - * The ActorProfileElement describes an individual, system, team or organization. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ActorProfileElement implements MetadataElement -{ - private ElementHeader elementHeader = null; - private ActorProfileProperties profileProperties = null; - private List contactMethods = null; - private ContributionRecordElement contributionRecord = null; /* Person only */ - private List personRoles = null; /* Person only */ - private List peers = null; /* Person only */ - private List locations = null; - private List userIdentities = null; - private ElementStub superTeam = null; /* Team only */ - private List subTeams = null; /* Team only */ - private List teamLeaderRoles = null; /* Team only */ - private List teamMemberRoles = null; /* Team only */ - private List businessCapability = null; /* Team only */ - private List linkedInfrastructure = null; /* ITProfile only */ - - - /** - * Default Constructor - */ - public ActorProfileElement() - { - } - - - /** - * Copy/clone Constructor - the resulting object. - * - * @param template object being copied - */ - public ActorProfileElement(ActorProfileElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - profileProperties = template.getProfileProperties(); - contactMethods = template.getContactMethods(); - contributionRecord = template.getContributionRecord(); - personRoles = template.getPersonRoles(); - peers = template.getPeers(); - locations = template.getLocations(); - userIdentities = template.getUserIdentities(); - superTeam = template.getSuperTeam(); - subTeams = template.getSubTeams(); - teamLeaderRoles = template.getTeamLeaderRoles(); - teamMemberRoles = template.getTeamMemberRoles(); - businessCapability = template.getBusinessCapability(); - linkedInfrastructure = template.getLinkedInfrastructure(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the properties of the profile. - * - * @return properties - */ - public ActorProfileProperties getProfileProperties() - { - return profileProperties; - } - - - /** - * Set up the profile properties. - * - * @param profileProperties properties - */ - public void setProfileProperties(ActorProfileProperties profileProperties) - { - this.profileProperties = profileProperties; - } - - - /** - * Return the contact methods for this profile. - * - * @return list of contact methods - */ - public List getContactMethods() - { - return contactMethods; - } - - - /** - * Set up the contact methods for this profile. - * - * @param contactMethods list of contact methods - */ - public void setContactMethods(List contactMethods) - { - this.contactMethods = contactMethods; - } - - - /** - * Return the contribution record (only if this profile is for a person). - * - * @return contribution record - */ - public ContributionRecordElement getContributionRecord() - { - return contributionRecord; - } - - - /** - * Set up the contribution record (only if this profile is for a person). - * - * @param contributionRecord contribution record - */ - public void setContributionRecord(ContributionRecordElement contributionRecord) - { - this.contributionRecord = contributionRecord; - } - - - /** - * Return the headers of the person roles that this actor is appointed to. - * - * @return role stubs - */ - public List getPersonRoles() - { - return personRoles; - } - - - /** - * Set up the headers of the person roles that this actor is appointed to. - * - * @param personRoles role stubs - */ - public void setPersonRoles(List personRoles) - { - this.personRoles = personRoles; - } - - - /** - * Return the list of profile identifiers (GUIDs) for peers. - * - * @return list of stubs for linked elements - */ - public List getPeers() - { - return peers; - } - - - /** - * Set up the list of profile identifiers (GUIDs) for peers. - * - * @param peers list of stubs for linked elements - */ - public void setPeers(List peers) - { - this.peers = peers; - } - - - /** - * Return the headers of the location that this actor is linked to. - * - * @return location stubs - */ - public List getLocations() - { - return locations; - } - - - /** - * Set up the headers of the person roles that this actor is linked to. - * - * @param locations location stubs - */ - public void setLocations(List locations) - { - this.locations = locations; - } - - - /** - * Return the list of user identities for this profile. - * - * @return list of userIds - */ - public List getUserIdentities() - { - return userIdentities; - } - - - /** - * Set up the list of user identities for this profile. - * - * @param userIdentities list of userIds - */ - public void setUserIdentities(List userIdentities) - { - this.userIdentities = userIdentities; - } - - - /** - * Return a summary of the team that is above this team in the organizational hierarchy. - * - * @return team stub - */ - public ElementStub getSuperTeam() - { - return superTeam; - } - - - /** - * Set up a summary of the team that is above this team in the organizational hierarchy. - * - * @param superTeam team stub - */ - public void setSuperTeam(ElementStub superTeam) - { - this.superTeam = superTeam; - } - - - /** - * Return the list of team that report to this team. - * - * @return list of team stubs - */ - public List getSubTeams() - { - return subTeams; - } - - - /** - * Set up the list of team that report to this team. - * - * @param subTeams list of team stubs - */ - public void setSubTeams(List subTeams) - { - this.subTeams = subTeams; - } - - - /** - * Return the list of leader roles assigned to this team. - * - * @return list of role stubs - */ - public List getTeamLeaderRoles() - { - return teamLeaderRoles; - } - - - /** - * Set up the list of leader roles assigned to this team. - * - * @param teamLeaderRoles list of role stubs - */ - public void setTeamLeaderRoles(List teamLeaderRoles) - { - this.teamLeaderRoles = teamLeaderRoles; - } - - - /** - * Return the list of member roles assigned to this team. - * - * @return list of role stubs - */ - public List getTeamMemberRoles() - { - return teamMemberRoles; - } - - - /** - * Set up the list of member roles assigned to this team. - * - * @param teamMemberRoles list of role stubs - */ - public void setTeamMemberRoles(List teamMemberRoles) - { - this.teamMemberRoles = teamMemberRoles; - } - - - /** - * Return the business capability linked via the organizational capability relationship. - * - * @return list of capabilities - */ - public List getBusinessCapability() - { - return businessCapability; - } - - - /** - * Set up the business capability linked via the organizational capability relationship. - * - * @param businessCapability list of capabilities - */ - public void setBusinessCapability(List businessCapability) - { - this.businessCapability = businessCapability; - } - - - /** - * Return the stubs of the pieces of IT infrastructure linked to the profile. - * - * @return list of element stubs - */ - public List getLinkedInfrastructure() - { - return linkedInfrastructure; - } - - - /** - * Set up the stubs of the pieces of IT infrastructure linked to the profile. - * - * @param linkedInfrastructure list of element stubs - */ - public void setLinkedInfrastructure(List linkedInfrastructure) - { - this.linkedInfrastructure = linkedInfrastructure; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ActorProfileElement{" + - "elementHeader=" + elementHeader + - ", profileProperties=" + profileProperties + - ", contactMethods=" + contactMethods + - ", contributionRecord=" + contributionRecord + - ", personRoles=" + personRoles + - ", peers=" + peers + - ", locations=" + locations + - ", userIdentities=" + userIdentities + - ", superTeam=" + superTeam + - ", subTeams=" + subTeams + - ", teamLeaderRoles=" + teamLeaderRoles + - ", teamMemberRoles=" + teamMemberRoles + - ", businessCapability=" + businessCapability + - ", linkedInfrastructure=" + linkedInfrastructure + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ActorProfileElement that = (ActorProfileElement) objectToCompare; - return Objects.equals(elementHeader, that.elementHeader) && - Objects.equals(profileProperties, that.profileProperties) && - Objects.equals(contactMethods, that.contactMethods) && - Objects.equals(contributionRecord, that.contributionRecord) && - Objects.equals(personRoles, that.personRoles) && - Objects.equals(peers, that.peers) && - Objects.equals(locations, that.locations) && - Objects.equals(userIdentities, that.userIdentities) && - Objects.equals(superTeam, that.superTeam) && - Objects.equals(subTeams, that.subTeams) && - Objects.equals(teamLeaderRoles, that.teamLeaderRoles) && - Objects.equals(teamMemberRoles, that.teamMemberRoles) && - Objects.equals(businessCapability, that.businessCapability) && - Objects.equals(linkedInfrastructure, that.linkedInfrastructure); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(elementHeader, profileProperties, contactMethods, contributionRecord, userIdentities, superTeam, subTeams, - teamLeaderRoles, personRoles, peers, locations, teamMemberRoles, businessCapability,linkedInfrastructure); - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/CollectionElement.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/CollectionElement.java deleted file mode 100644 index 8fd5635335d..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/CollectionElement.java +++ /dev/null @@ -1,175 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.communityprofile.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.communityprofile.properties.CollectionProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * CollectionElement contains the properties and header for a collection retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class CollectionElement implements MetadataElement -{ - private ElementHeader elementHeader = null; - private CollectionProperties properties = null; - private RelatedElement relatedElement = null; - - - /** - * Default constructor - */ - public CollectionElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public CollectionElement(CollectionElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - properties = template.getProperties(); - relatedElement = template.getRelatedElement(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - @Override - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the properties of the collection. - * - * @return properties - */ - public CollectionProperties getProperties() - { - return properties; - } - - - /** - * Set up the collection properties. - * - * @param properties properties - */ - public void setProperties(CollectionProperties properties) - { - this.properties = properties; - } - - - /** - * Return details of the relationship used to retrieve this element. - * Will be null if the element was retrieved directly rather than via a relationship. - * - * @return list of element stubs - */ - public RelatedElement getRelatedElement() - { - return relatedElement; - } - - - /** - * Set up details of the relationship used to retrieve this element. - * Will be null if the element was retrieved directly rather than via a relationship. - * - * @param relatedElement relationship details - */ - public void setRelatedElement(RelatedElement relatedElement) - { - this.relatedElement = relatedElement; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "CollectionElement{" + - "elementHeader=" + elementHeader + - ", properties=" + properties + - ", relatedElement=" + relatedElement + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - CollectionElement that = (CollectionElement) objectToCompare; - return Objects.equals(elementHeader, that.elementHeader) && - Objects.equals(properties, that.properties) && - Objects.equals(relatedElement, that.relatedElement); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementHeader, properties, relatedElement); - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/CollectionMember.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/CollectionMember.java deleted file mode 100644 index 75c2b68b6ad..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/CollectionMember.java +++ /dev/null @@ -1,202 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.communityprofile.properties.CollectionMembershipProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ReferenceableProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.RelationshipProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * CollectionMember describes a member of a collection. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class CollectionMember implements MetadataElement -{ - private ElementHeader relationshipHeader = null; - private CollectionMembershipProperties relationshipProperties = null; - - private ElementHeader elementHeader = null; - - private ReferenceableProperties properties = null; - - - /** - * Default constructor - */ - public CollectionMember() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public CollectionMember(CollectionMember template) - { - - if (template != null) - { - relationshipHeader = template.getRelationshipHeader(); - relationshipProperties = template.getRelationshipProperties(); - elementHeader = template.getElementHeader(); - properties = template.getProperties(); - } - } - - /** - * Return the element header associated with the relationship. - * - * @return element header object - */ - public ElementHeader getRelationshipHeader() - { - return relationshipHeader; - } - - - /** - * Set up the element header associated with the relationship. - * - * @param relationshipHeader element header object - */ - public void setRelationshipHeader(ElementHeader relationshipHeader) - { - this.relationshipHeader = relationshipHeader; - } - - - /** - * Return details of the relationship - * - * @return relationship properties - */ - public CollectionMembershipProperties getRelationshipProperties() - { - return relationshipProperties; - } - - - /** - * Set up relationship properties - * - * @param relationshipProperties relationship properties - */ - public void setRelationshipProperties(CollectionMembershipProperties relationshipProperties) - { - this.relationshipProperties = relationshipProperties; - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - @Override - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the properties of the element. - * - * @return properties - */ - public ReferenceableProperties getProperties() - { - return properties; - } - - - /** - * Set up the properties of the element. - * - * @param properties properties - */ - public void setProperties(ReferenceableProperties properties) - { - this.properties = properties; - } - - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "CollectionMember{" + - "relationshipHeader=" + relationshipHeader + - ", relationshipProperties=" + relationshipProperties + - ", elementHeader=" + elementHeader + - ", properties=" + properties + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - CollectionMember that = (CollectionMember) objectToCompare; - return Objects.equals(relationshipHeader, that.relationshipHeader) && - Objects.equals(relationshipProperties, that.relationshipProperties) && - Objects.equals(elementHeader, that.elementHeader) && - Objects.equals(properties, that.properties); - } - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(relationshipHeader, relationshipProperties, elementHeader, properties); - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/CommentElement.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/CommentElement.java deleted file mode 100644 index a83d6ae66cb..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/CommentElement.java +++ /dev/null @@ -1,177 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.communityprofile.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.communityprofile.properties.CommentProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * CommentElement contains the properties and header for a comment retrieved from the metadata repository. - * It is used for personal messages. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class CommentElement implements MetadataElement -{ - private ElementHeader elementHeader = null; - private CommentProperties properties = null; - private RelatedElement relatedElement = null; - - - /** - * Default constructor - */ - public CommentElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public CommentElement(CommentElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - properties = template.getProperties(); - relatedElement = template.getRelatedElement(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - @Override - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the properties of the comment. - * - * @return properties - */ - public CommentProperties getProperties() - { - return properties; - } - - - /** - * Set up the comment properties. - * - * @param properties properties - */ - public void setProperties(CommentProperties properties) - { - this.properties = properties; - } - - - /** - * Return details of the relationship used to retrieve this element. - * Will be null if the element was retrieved directly rather than via a relationship. - * - * @return list of element stubs - */ - public RelatedElement getRelatedElement() - { - return relatedElement; - } - - - /** - * Set up details of the relationship used to retrieve this element. - * Will be null if the element was retrieved directly rather than via a relationship. - * - * @param relatedElement relationship details - */ - public void setRelatedElement(RelatedElement relatedElement) - { - this.relatedElement = relatedElement; - } - - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "CommentElement{" + - "elementHeader=" + elementHeader + - ", properties=" + properties + - ", relatedElement=" + relatedElement + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - CommentElement that = (CommentElement) objectToCompare; - return Objects.equals(elementHeader, that.elementHeader) && - Objects.equals(properties, that.properties) && - Objects.equals(relatedElement, that.relatedElement); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementHeader, properties, relatedElement); - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/ContactMethodElement.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/ContactMethodElement.java deleted file mode 100644 index 3745c4cba29..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/ContactMethodElement.java +++ /dev/null @@ -1,147 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.communityprofile.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ContactMethodProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * ContactMethodElement contains the properties and header for a contract method retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ContactMethodElement implements MetadataElement -{ - private ElementHeader elementHeader = null; - private ContactMethodProperties properties = null; - - - /** - * Default constructor - */ - public ContactMethodElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ContactMethodElement(ContactMethodElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - properties = template.getProperties(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - @Override - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the properties of the contact method. - * - * @return properties - */ - public ContactMethodProperties getProperties() - { - return properties; - } - - - /** - * Set up the contract method properties. - * - * @param properties properties - */ - public void setProperties(ContactMethodProperties properties) - { - this.properties = properties; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ContactMethodElement{" + - "elementHeader=" + elementHeader + - ", properties=" + properties + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ContactMethodElement that = (ContactMethodElement) objectToCompare; - return Objects.equals(elementHeader, that.elementHeader) && - Objects.equals(properties, that.properties); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementHeader, properties); - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/ContributionRecordElement.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/ContributionRecordElement.java deleted file mode 100644 index b646c672cce..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/ContributionRecordElement.java +++ /dev/null @@ -1,147 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.communityprofile.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ContributionRecord; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * ContributionRecordElement contains the properties and header for a contribution record retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ContributionRecordElement implements MetadataElement -{ - private ElementHeader elementHeader = null; - private ContributionRecord properties = null; - - - /** - * Default constructor - */ - public ContributionRecordElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ContributionRecordElement(ContributionRecordElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - properties = template.getProperties(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - @Override - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the properties of the contribution record. - * - * @return properties - */ - public ContributionRecord getProperties() - { - return properties; - } - - - /** - * Set up the contribution record properties. - * - * @param properties properties - */ - public void setProperties(ContributionRecord properties) - { - this.properties = properties; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ContributionRecordElement{" + - "elementHeader=" + elementHeader + - ", properties=" + properties + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ContributionRecordElement that = (ContributionRecordElement) objectToCompare; - return Objects.equals(elementHeader, that.elementHeader) && - Objects.equals(properties, that.properties); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementHeader, properties); - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/ExternalReferenceElement.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/ExternalReferenceElement.java deleted file mode 100644 index e936cd4c15e..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/ExternalReferenceElement.java +++ /dev/null @@ -1,143 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ExternalReferenceProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - - -/** - * ExternalReferenceElement stores information about an link to an external resource that is relevant to this element. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ExternalReferenceElement implements MetadataElement -{ - private ElementHeader elementHeader = null; - private ExternalReferenceProperties properties = null; - - /** - * Default Constructor - */ - public ExternalReferenceElement() - { - } - - - /** - * Copy/clone Constructor - the resulting object. - * - * @param template object being copied - */ - public ExternalReferenceElement(ExternalReferenceElement template) - { - if (template != null) - { - this.elementHeader = template.getElementHeader(); - this.properties = template.getProperties(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the link to external documentation that are relevant to this element. - * - * @return list of external references - */ - public ExternalReferenceProperties getProperties() - { - return properties; - } - - - /** - * Set up the list of links to external documentation that are relevant to this element. - * - * @param properties of external references - */ - public void setProperties(ExternalReferenceProperties properties) - { - this.properties = properties; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "ExternalReferenceElement{" + - "elementHeader=" + elementHeader + - ", properties=" + properties + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ExternalReferenceElement that = (ExternalReferenceElement) objectToCompare; - return Objects.equals(elementHeader, that.elementHeader) && - Objects.equals(properties, that.properties); - } - - - /** - * Hash of properties - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), properties, elementHeader); - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/InformalTagElement.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/InformalTagElement.java deleted file mode 100644 index c49b6dc1ddc..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/InformalTagElement.java +++ /dev/null @@ -1,147 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.communityprofile.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.communityprofile.properties.InformalTagProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * InformalTagElement contains the properties and header for an informal retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class InformalTagElement implements MetadataElement -{ - private ElementHeader elementHeader = null; - private InformalTagProperties properties = null; - - - /** - * Default constructor - */ - public InformalTagElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public InformalTagElement(InformalTagElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - properties = template.getProperties(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - @Override - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the properties of the tag. - * - * @return properties - */ - public InformalTagProperties getProperties() - { - return properties; - } - - - /** - * Set up the tag properties. - * - * @param properties properties - */ - public void setProperties(InformalTagProperties properties) - { - this.properties = properties; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "InformalTagElement{" + - "elementHeader=" + elementHeader + - ", properties=" + properties + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - InformalTagElement that = (InformalTagElement) objectToCompare; - return Objects.equals(elementHeader, that.elementHeader) && - Objects.equals(properties, that.properties); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementHeader, properties); - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/LikeElement.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/LikeElement.java deleted file mode 100644 index d6766e85d81..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/LikeElement.java +++ /dev/null @@ -1,147 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.communityprofile.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.communityprofile.properties.LikeProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * LikeElement contains the properties and header for a like entity retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class LikeElement implements MetadataElement -{ - private ElementHeader elementHeader = null; - private LikeProperties properties = null; - - - /** - * Default constructor - */ - public LikeElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public LikeElement(LikeElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - properties = template.getProperties(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - @Override - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the properties of the like. - * - * @return properties - */ - public LikeProperties getProperties() - { - return properties; - } - - - /** - * Set up the like properties. - * - * @param properties properties - */ - public void setProperties(LikeProperties properties) - { - this.properties = properties; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "LikeElement{" + - "elementHeader=" + elementHeader + - ", properties=" + properties + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - LikeElement that = (LikeElement) objectToCompare; - return Objects.equals(elementHeader, that.elementHeader) && - Objects.equals(properties, that.properties); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementHeader, properties); - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/LocationElement.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/LocationElement.java deleted file mode 100644 index 2d5c9757292..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/LocationElement.java +++ /dev/null @@ -1,179 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.communityprofile.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.communityprofile.properties.LocationProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * LocationElement contains the properties and header for a location definition retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class LocationElement implements MetadataElement -{ - private ElementHeader elementHeader = null; - private LocationProperties locationProperties = null; - private RelatedElement relatedElement = null; - - - /** - * Default constructor - */ - public LocationElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public LocationElement(LocationElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - locationProperties = template.getLocationProperties(); - relatedElement = template.getRelatedElement(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - @Override - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the properties for the location definition. - * - * @return properties bean - */ - public LocationProperties getLocationProperties() - { - return locationProperties; - } - - - /** - * Set up the properties for the location definition. - * - * @param locationProperties properties bean - */ - public void setLocationProperties(LocationProperties locationProperties) - { - this.locationProperties = locationProperties; - } - - - /** - * Return details of the relationship used to retrieve this element. - * Will be null if the element was retrieved directly rather than via a relationship. - * - * @return list of element stubs - */ - public RelatedElement getRelatedElement() - { - return relatedElement; - } - - - /** - * Set up details of the relationship used to retrieve this element. - * Will be null if the element was retrieved directly rather than via a relationship. - * - * @param relatedElement relationship details - */ - public void setRelatedElement(RelatedElement relatedElement) - { - this.relatedElement = relatedElement; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "LocationElement{" + - "elementHeader=" + elementHeader + - ", locationProperties=" + locationProperties + - ", relatedElement=" + relatedElement + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - LocationElement that = (LocationElement) objectToCompare; - return Objects.equals(elementHeader, that.elementHeader) && - Objects.equals(locationProperties, that.locationProperties) && - Objects.equals(relatedElement, that.relatedElement); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementHeader, locationProperties, relatedElement); - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/MetadataElement.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/MetadataElement.java deleted file mode 100644 index ab11b9c8b1c..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/MetadataElement.java +++ /dev/null @@ -1,27 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.communityprofile.metadataelements; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * MetadataElement is the common interface for all metadata elements. It adds the header information that is stored with the properties. - * This includes detains of its unique identifier, type and origin. - */ -public interface MetadataElement -{ - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - ElementHeader getElementHeader(); - - - /** - * Set up the element header associated with the properties. - * - * @param header element header object - */ - void setElementHeader(ElementHeader header); -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/PersonRoleAppointee.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/PersonRoleAppointee.java deleted file mode 100644 index f63e794c2f0..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/PersonRoleAppointee.java +++ /dev/null @@ -1,181 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.communityprofile.properties.AppointmentProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * PersonRoleAppointee describes an individual's appointment to a specific governance role. It includes their personal details along with the - * start and end date of their appointment. The elementHeader is from the PersonRoleAppointment relationship. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class PersonRoleAppointee implements MetadataElement -{ - private ElementHeader elementHeader = null; - private AppointmentProperties properties = null; - private ActorProfileElement profile = null; - - - - /** - * Default constructor - */ - public PersonRoleAppointee() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public PersonRoleAppointee(PersonRoleAppointee template) - { - if (template != null) - { - this.elementHeader = template.getElementHeader(); - this.profile = template.getProfile(); - this.properties = template.getProperties(); - } - } - - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - @Override - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the properties of the appointment relationship. - * - * @return properties - */ - public AppointmentProperties getProperties() - { - return properties; - } - - - /** - * Set up the properties of the appointment relationship. - * - * @param properties properties - */ - public void setProperties(AppointmentProperties properties) - { - this.properties = properties; - } - - - /** - * Return the profile information for the individual. - * - * @return personal profile object - */ - public ActorProfileElement getProfile() - { - if (profile == null) - { - return null; - } - else - { - return profile; - } - } - - - /** - * Set up the profile information for the individual. - * - * @param profile personal profile object - */ - public void setProfile(ActorProfileElement profile) - { - this.profile = profile; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "PersonRoleAppointee{" + - "elementHeader=" + elementHeader + - ", properties=" + properties + - ", profile=" + profile + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - PersonRoleAppointee that = (PersonRoleAppointee) objectToCompare; - return Objects.equals(elementHeader, that.elementHeader) && - Objects.equals(properties, that.properties) && - Objects.equals(profile, that.profile); - } - - - /** - * Hash code for this object - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(elementHeader, properties, profile); - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/PersonRoleElement.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/PersonRoleElement.java deleted file mode 100644 index 00d807b26df..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/PersonRoleElement.java +++ /dev/null @@ -1,175 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.communityprofile.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.communityprofile.properties.PersonRoleProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * PersonalRoleElement contains the properties and header for a person role assigned to a profile retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class PersonRoleElement implements MetadataElement -{ - private ElementHeader elementHeader = null; - private PersonRoleProperties properties = null; - private RelatedElement relatedElement = null; - - - /** - * Default constructor - */ - public PersonRoleElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public PersonRoleElement(PersonRoleElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - properties = template.getProperties(); - relatedElement = template.getRelatedElement(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param header element header object - */ - @Override - public void setElementHeader(ElementHeader header) - { - this.elementHeader = header; - } - - - /** - * Return the properties of the role. - * - * @return properties - */ - public PersonRoleProperties getProperties() - { - return properties; - } - - - /** - * Set up the role properties. - * - * @param properties properties - */ - public void setProperties(PersonRoleProperties properties) - { - this.properties = properties; - } - - - /** - * Return details of the relationship used to retrieve this element. - * Will be null if the element was retrieved directly rather than via a relationship. - * - * @return list of element stubs - */ - public RelatedElement getRelatedElement() - { - return relatedElement; - } - - - /** - * Set up details of the relationship used to retrieve this element. - * Will be null if the element was retrieved directly rather than via a relationship. - * - * @param relatedElement relationship details - */ - public void setRelatedElement(RelatedElement relatedElement) - { - this.relatedElement = relatedElement; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "PersonRoleElement{" + - "elementHeader=" + elementHeader + - ", properties=" + properties + - ", relatedElement=" + relatedElement + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - PersonRoleElement that = (PersonRoleElement) objectToCompare; - return Objects.equals(elementHeader, that.elementHeader) && - Objects.equals(properties, that.properties) && - Objects.equals(relatedElement, that.relatedElement); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementHeader, properties, relatedElement); - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/ProfileIdentityElement.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/ProfileIdentityElement.java deleted file mode 100644 index 0ca7ad08d1a..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/ProfileIdentityElement.java +++ /dev/null @@ -1,145 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.communityprofile.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ProfileIdentityProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ProfileIdentityElement contains the properties and header for a relationship between a profile and a user identity retrieved - * from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ProfileIdentityElement -{ - private ProfileIdentityProperties profileIdentity = null; - private UserIdentityElement userIdentity = null; - - - /** - * Default constructor - */ - public ProfileIdentityElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ProfileIdentityElement(ProfileIdentityElement template) - { - if (template != null) - { - profileIdentity = template.getProfileIdentity(); - userIdentity = template.getUserIdentity(); - } - } - - - /** - * Return the properties from the profile identity relationship. - * - * @return profile identity - */ - public ProfileIdentityProperties getProfileIdentity() - { - return profileIdentity; - } - - - /** - * Set up the properties from the profile identity relationship. - * - * @param profileIdentity profile identity - */ - public void setProfileIdentity(ProfileIdentityProperties profileIdentity) - { - this.profileIdentity = profileIdentity; - } - - - /** - * Return the properties of the userId. - * - * @return properties - */ - public UserIdentityElement getUserIdentity() - { - return userIdentity; - } - - - /** - * Set up the userId properties. - * - * @param userIdentity properties - */ - public void setUserIdentity(UserIdentityElement userIdentity) - { - this.userIdentity = userIdentity; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ProfileIdentityElement{" + - "profileIdentity=" + profileIdentity + - ", properties=" + userIdentity + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ProfileIdentityElement that = (ProfileIdentityElement) objectToCompare; - return Objects.equals(profileIdentity, that.profileIdentity) && - Objects.equals(userIdentity, that.userIdentity); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), profileIdentity, userIdentity); - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/ProfileLocationElement.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/ProfileLocationElement.java deleted file mode 100644 index 6105377df27..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/ProfileLocationElement.java +++ /dev/null @@ -1,147 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.communityprofile.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ProfileIdentityProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ProfileLocationProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ProfileLocationElement contains the properties and header for a relationship between a profile and a user identity retrieved - * from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ProfileLocationElement -{ - private ProfileLocationProperties properties = null; - private ElementStub location = null; - - - /** - * Default constructor - */ - public ProfileLocationElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ProfileLocationElement(ProfileLocationElement template) - { - if (template != null) - { - properties = template.getProperties(); - location = template.getLocation(); - } - } - - - /** - * Return the properties from the profile location relationship. - * - * @return profile identity - */ - public ProfileLocationProperties getProperties() - { - return properties; - } - - - /** - * Set up the properties from the profile location relationship. - * - * @param properties profile identity - */ - public void setProperties(ProfileLocationProperties properties) - { - this.properties = properties; - } - - - /** - * Return the properties of the location. - * - * @return properties - */ - public ElementStub getLocation() - { - return location; - } - - - /** - * Set up the userId properties. - * - * @param location properties - */ - public void setLocation(ElementStub location) - { - this.location = location; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ProfileLocationElement{" + - "properties=" + properties + - ", location=" + location + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ProfileLocationElement that = (ProfileLocationElement) objectToCompare; - return Objects.equals(properties, that.properties) && - Objects.equals(location, that.location); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), properties, location); - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/RatingElement.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/RatingElement.java deleted file mode 100644 index 9b8d6ee777e..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/RatingElement.java +++ /dev/null @@ -1,147 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.communityprofile.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.communityprofile.properties.RatingProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * RatingElement contains the properties and header for a rating retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class RatingElement implements MetadataElement -{ - private ElementHeader elementHeader = null; - private RatingProperties properties = null; - - - /** - * Default constructor - */ - public RatingElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public RatingElement(RatingElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - properties = template.getProperties(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - @Override - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the properties of the rating. - * - * @return properties - */ - public RatingProperties getProperties() - { - return properties; - } - - - /** - * Set up the rating properties. - * - * @param properties properties - */ - public void setProperties(RatingProperties properties) - { - this.properties = properties; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "RatingElement{" + - "elementHeader=" + elementHeader + - ", properties=" + properties + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - RatingElement that = (RatingElement) objectToCompare; - return Objects.equals(elementHeader, that.elementHeader) && - Objects.equals(properties, that.properties); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementHeader, properties); - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/RelatedElement.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/RelatedElement.java deleted file mode 100644 index 0a60b06a426..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/RelatedElement.java +++ /dev/null @@ -1,172 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.communityprofile.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.communityprofile.properties.RelationshipProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * RelatedElement contains the properties and header for a relationship retrieved from the metadata repository along with the stub - * of the related element. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class RelatedElement -{ - private ElementHeader relationshipHeader = null; - private RelationshipProperties relationshipProperties = null; - private ElementStub relatedElement = null; - - /** - * Default constructor - */ - public RelatedElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public RelatedElement(RelatedElement template) - { - if (template != null) - { - relationshipHeader = template.getRelationshipHeader(); - relationshipProperties = template.getRelationshipProperties(); - relatedElement = template.getRelatedElement(); - } - } - - - /** - * Return the element header associated with the relationship. - * - * @return element header object - */ - public ElementHeader getRelationshipHeader() - { - return relationshipHeader; - } - - - /** - * Set up the element header associated with the relationship. - * - * @param relationshipHeader element header object - */ - public void setRelationshipHeader(ElementHeader relationshipHeader) - { - this.relationshipHeader = relationshipHeader; - } - - - /** - * Return details of the relationship - * - * @return relationship properties - */ - public RelationshipProperties getRelationshipProperties() - { - return relationshipProperties; - } - - - /** - * Set up relationship properties - * - * @param relationshipProperties relationship properties - */ - public void setRelationshipProperties(RelationshipProperties relationshipProperties) - { - this.relationshipProperties = relationshipProperties; - } - - - /** - * Return the element header associated with end 1 of the relationship. - * - * @return element stub object - */ - public ElementStub getRelatedElement() - { - return relatedElement; - } - - - /** - * Set up the element header associated with end 1 of the relationship. - * - * @param relatedElement element stub object - */ - public void setRelatedElement(ElementStub relatedElement) - { - this.relatedElement = relatedElement; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "RelatedElement{" + - "relationshipHeader=" + relationshipHeader + - ", relationshipProperties=" + relationshipProperties + - ", relatedElement=" + relatedElement + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - RelatedElement that = (RelatedElement) objectToCompare; - return Objects.equals(getRelationshipHeader(), that.getRelationshipHeader()) && - Objects.equals(getRelationshipProperties(), that.getRelationshipProperties()) && - Objects.equals(getRelatedElement(), that.getRelatedElement()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), relationshipHeader, relationshipProperties, relatedElement); - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/RelationshipElement.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/RelationshipElement.java deleted file mode 100644 index eccead67925..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/RelationshipElement.java +++ /dev/null @@ -1,197 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.communityprofile.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.communityprofile.properties.RelationshipProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * RelationshipElement contains the properties and header for a relationship retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class RelationshipElement -{ - private ElementHeader relationshipHeader = null; - private RelationshipProperties relationshipProperties = null; - private ElementHeader end1GUID = null; - private ElementHeader end2GUID = null; - - /** - * Default constructor - */ - public RelationshipElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public RelationshipElement(RelationshipElement template) - { - if (template != null) - { - relationshipHeader = template.getRelationshipHeader(); - relationshipProperties = template.getRelationshipProperties(); - end1GUID = template.getEnd1GUID(); - end2GUID = template.getEnd2GUID(); - } - } - - - /** - * Return the element header associated with the relationship. - * - * @return element header object - */ - public ElementHeader getRelationshipHeader() - { - return relationshipHeader; - } - - - /** - * Set up the element header associated with the relationship. - * - * @param relationshipHeader element header object - */ - public void setRelationshipHeader(ElementHeader relationshipHeader) - { - this.relationshipHeader = relationshipHeader; - } - - - /** - * Return details of the relationship - * - * @return relationship properties - */ - public RelationshipProperties getRelationshipProperties() - { - return relationshipProperties; - } - - - /** - * Set up relationship properties - * - * @param relationshipProperties relationship properties - */ - public void setRelationshipProperties(RelationshipProperties relationshipProperties) - { - this.relationshipProperties = relationshipProperties; - } - - - /** - * Return the element header associated with end 1 of the relationship. - * - * @return element header object - */ - public ElementHeader getEnd1GUID() - { - return end1GUID; - } - - - /** - * Set up the element header associated with end 1 of the relationship. - * - * @param end1GUID element header object - */ - public void setEnd1GUID(ElementHeader end1GUID) - { - this.end1GUID = end1GUID; - } - - - - /** - * Return the element header associated with end 2 of the relationship. - * - * @return element header object - */ - public ElementHeader getEnd2GUID() - { - return end2GUID; - } - - - /** - * Set up the element header associated with end 2 of the relationship. - * - * @param end2GUID element header object - */ - public void setEnd2GUID(ElementHeader end2GUID) - { - this.end2GUID = end2GUID; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "RelationshipElement{" + - "relationshipHeader=" + relationshipHeader + - ", relationshipProperties=" + relationshipProperties + - ", end1GUID=" + end1GUID + - ", end2GUID=" + end2GUID + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - RelationshipElement that = (RelationshipElement) objectToCompare; - return Objects.equals(getRelationshipHeader(), that.getRelationshipHeader()) && - Objects.equals(getRelationshipProperties(), that.getRelationshipProperties()) && - Objects.equals(getEnd1GUID(), that.getEnd1GUID()) && - Objects.equals(getEnd2GUID(), that.getEnd2GUID()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), relationshipHeader, relationshipProperties, end1GUID, end2GUID); - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/ResourceElement.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/ResourceElement.java deleted file mode 100644 index ce6804bff12..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/ResourceElement.java +++ /dev/null @@ -1,175 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.communityprofile.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ResourceProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * ResourceElement contains the properties and header for a referenceable retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ResourceElement implements MetadataElement -{ - private ElementHeader elementHeader = null; - private ResourceProperties properties = null; - private RelatedElement relatedElement = null; - - - /** - * Default constructor - */ - public ResourceElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ResourceElement(ResourceElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - properties = template.getProperties(); - relatedElement = template.getRelatedElement(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - @Override - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the properties of the rating. - * - * @return properties - */ - public ResourceProperties getProperties() - { - return properties; - } - - - /** - * Set up the rating properties. - * - * @param properties properties - */ - public void setProperties(ResourceProperties properties) - { - this.properties = properties; - } - - - /** - * Return details of the relationship used to retrieve this element. - * Will be null if the element was retrieved directly rather than via a relationship. - * - * @return list of element stubs - */ - public RelatedElement getRelatedElement() - { - return relatedElement; - } - - - /** - * Set up details of the relationship used to retrieve this element. - * Will be null if the element was retrieved directly rather than via a relationship. - * - * @param relatedElement relationship details - */ - public void setRelatedElement(RelatedElement relatedElement) - { - this.relatedElement = relatedElement; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ResourceElement{" + - "elementHeader=" + elementHeader + - ", properties=" + properties + - ", relatedElement=" + relatedElement + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ResourceElement that = (ResourceElement) objectToCompare; - return Objects.equals(elementHeader, that.elementHeader) && - Objects.equals(properties, that.properties) && - Objects.equals(relatedElement, that.relatedElement); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementHeader, properties, relatedElement); - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/SecurityGroupElement.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/SecurityGroupElement.java deleted file mode 100644 index 436396d543f..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/SecurityGroupElement.java +++ /dev/null @@ -1,174 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.communityprofile.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.communityprofile.properties.SecurityGroupProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * SecurityGroupElement is the superclass used to return the common properties of a governance definition stored in the - * open metadata repositories. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class SecurityGroupElement implements MetadataElement -{ - private ElementHeader elementHeader = null; - private SecurityGroupProperties properties = null; - private RelatedElement relatedElement = null; - - - /** - * Default constructor - */ - public SecurityGroupElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public SecurityGroupElement(SecurityGroupElement template) - { - if (template != null) - { - this.elementHeader = template.getElementHeader(); - this.properties = template.getProperties(); - this.relatedElement = template.getRelatedElement(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the requested security group. - * - * @return properties bean - */ - public SecurityGroupProperties getProperties() - { - return properties; - } - - - /** - * Set up the requested security group. - * - * @param properties properties bean - */ - public void setProperties(SecurityGroupProperties properties) - { - this.properties = properties; - } - - - /** - * Return details of the relationship used to retrieve this element. - * Will be null if the element was retrieved directly rather than via a relationship. - * - * @return list of element stubs - */ - public RelatedElement getRelatedElement() - { - return relatedElement; - } - - - /** - * Set up details of the relationship used to retrieve this element. - * Will be null if the element was retrieved directly rather than via a relationship. - * - * @param relatedElement relationship details - */ - public void setRelatedElement(RelatedElement relatedElement) - { - this.relatedElement = relatedElement; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "SecurityGroupElement{" + - "elementHeader=" + elementHeader + - ", properties=" + properties + - ", relatedElement=" + relatedElement + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - SecurityGroupElement that = (SecurityGroupElement) objectToCompare; - return Objects.equals(elementHeader, that.elementHeader) && - Objects.equals(properties, that.properties) && - Objects.equals(relatedElement, that.relatedElement); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementHeader, properties, relatedElement); - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/TeamProfileElement.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/TeamProfileElement.java deleted file mode 100644 index 57a0a91c1b8..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/TeamProfileElement.java +++ /dev/null @@ -1,211 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.communityprofile.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.communityprofile.properties.TeamProfileProperties; - -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; - -/** - * TeamProfileElement contains the properties and header for a team profile retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class TeamProfileElement implements MetadataElement -{ - private ElementHeader elementHeader = null; - private TeamProfileProperties properties = null; - private ElementStub superTeam = null; - private List subTeams = null; - - /** - * Default constructor - */ - public TeamProfileElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public TeamProfileElement(TeamProfileElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - properties = template.getProperties(); - superTeam = template.getSuperTeam(); - subTeams = template.getSubTeams(); - } - } - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - @Override - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the properties from the team profile. - * - * @return properties - */ - public TeamProfileProperties getProperties() - { - return properties; - } - - - /** - * Set up the properties from the team profile. - * - * @param properties properties - */ - public void setProperties(TeamProfileProperties properties) - { - this.properties = properties; - } - - - /** - * Return the unique identifier (guid) of the team that this team reports to - null means top level team. - * - * @return description of linked profile - */ - public ElementStub getSuperTeam() - { - return superTeam; - } - - - /** - * Set up the unique identifier (guid) of the team that this team reports to - null means top level team. - * - * @param superTeam description of linked profile - */ - public void setSuperTeam(ElementStub superTeam) - { - this.superTeam = superTeam; - } - - - /** - * Return the list of unique identifiers (guids) for the teams that report to this team. - * - * @return list of descriptions of linked profiles - */ - public List getSubTeams() - { - if (subTeams == null) - { - return null; - } - else if (subTeams.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(subTeams); - } - } - - - /** - * Set up the list of unique identifiers (guids) for the teams that report to this team. - * - * @param subTeams list of descriptions of linked profiles - */ - public void setSubTeams(List subTeams) - { - this.subTeams = subTeams; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "TeamProfileElement{" + - "elementHeader=" + elementHeader + - ", properties=" + properties + - ", superTeam='" + superTeam + '\'' + - ", subTeams=" + subTeams + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - TeamProfileElement that = (TeamProfileElement) objectToCompare; - return Objects.equals(elementHeader, that.elementHeader) && - Objects.equals(properties, that.properties) && - Objects.equals(superTeam, that.superTeam) && - Objects.equals(subTeams, that.subTeams); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(elementHeader, properties, superTeam, subTeams); - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/UserIdentityElement.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/UserIdentityElement.java deleted file mode 100644 index 841c01dc23d..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/UserIdentityElement.java +++ /dev/null @@ -1,175 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.communityprofile.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.communityprofile.properties.UserIdentityProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * UserIdentityElement contains the properties and header for a user identity retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class UserIdentityElement implements MetadataElement -{ - private ElementHeader elementHeader = null; - private UserIdentityProperties properties = null; - private RelatedElement relatedElement = null; - - - /** - * Default constructor - */ - public UserIdentityElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public UserIdentityElement(UserIdentityElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - properties = template.getProperties(); - relatedElement = template.getRelatedElement(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - @Override - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the properties of the userId. - * - * @return properties - */ - public UserIdentityProperties getProperties() - { - return properties; - } - - - /** - * Set up the userId properties. - * - * @param properties properties - */ - public void setProperties(UserIdentityProperties properties) - { - this.properties = properties; - } - - - /** - * Return details of the relationship used to retrieve this element. - * Will be null if the element was retrieved directly rather than via a relationship. - * - * @return list of element stubs - */ - public RelatedElement getRelatedElement() - { - return relatedElement; - } - - - /** - * Set up details of the relationship used to retrieve this element. - * Will be null if the element was retrieved directly rather than via a relationship. - * - * @param relatedElement relationship details - */ - public void setRelatedElement(RelatedElement relatedElement) - { - this.relatedElement = relatedElement; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "UserIdentityElement{" + - "elementHeader=" + elementHeader + - ", properties=" + properties + - ", relatedElement=" + relatedElement + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - UserIdentityElement that = (UserIdentityElement) objectToCompare; - return Objects.equals(elementHeader, that.elementHeader) && - Objects.equals(properties, that.properties) && - Objects.equals(relatedElement, that.relatedElement); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementHeader, properties, relatedElement); - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/ValidValueElement.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/ValidValueElement.java deleted file mode 100644 index b17cfa71aa5..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/ValidValueElement.java +++ /dev/null @@ -1,175 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.communityprofile.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ValidValueProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * ValidValueElement contains the properties and header for a valid value definition or set entity retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ValidValueElement implements MetadataElement -{ - private ElementHeader elementHeader = null; - private ValidValueProperties validValueProperties = null; - private RelatedElement relatedElement = null; - - - /** - * Default constructor - */ - public ValidValueElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ValidValueElement(ValidValueElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - validValueProperties = template.getValidValueProperties(); - relatedElement = getRelatedElement(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - @Override - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the properties for the valid value definition or set. - * - * @return properties bean - */ - public ValidValueProperties getValidValueProperties() - { - return validValueProperties; - } - - - /** - * Set up the properties for the valid value definition or set. - * - * @param validValueProperties properties bean - */ - public void setValidValueProperties(ValidValueProperties validValueProperties) - { - this.validValueProperties = validValueProperties; - } - - - /** - * Return information about the related element and relationship (if any) that was - * used to retrieve the valid value. - * - * @return related element - */ - public RelatedElement getRelatedElement() - { - return relatedElement; - } - - - /** - * Set up information about the related element and relationship (if any) that was - * used to retrieve the valid value. - * - * @param relatedElement related element - */ - public void setRelatedElement(RelatedElement relatedElement) - { - this.relatedElement = relatedElement; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ValidValueElement{" + - "elementHeader=" + elementHeader + - ", validValueProperties=" + validValueProperties + - ", relatedElement=" + relatedElement + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ValidValueElement that = (ValidValueElement) objectToCompare; - return Objects.equals(elementHeader, that.elementHeader) && Objects.equals(validValueProperties, - that.validValueProperties) && Objects.equals( - relatedElement, that.relatedElement); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementHeader, validValueProperties, relatedElement); - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/package-info.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/package-info.java deleted file mode 100644 index cbe1b4d6419..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -/** - * The metadata elements describe the way that metadata is returned from the repository. - */ -package org.odpi.openmetadata.accessservices.communityprofile.metadataelements; diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/ActionTargetProperties.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/ActionTargetProperties.java deleted file mode 100644 index 376e1eb7bb5..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/ActionTargetProperties.java +++ /dev/null @@ -1,218 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.communityprofile.properties; - -import org.odpi.openmetadata.frameworks.openmetadata.enums.ToDoStatus; - -import java.util.Date; -import java.util.Objects; - -public class ActionTargetProperties -{ - private String actionTargetName = null; - private ToDoStatus status = null; - private Date startDate = null; - private Date completionDate = null; - private String completionMessage = null; - - - /** - * Typical Constructor - */ - public ActionTargetProperties() - { - } - - - /** - * Copy/clone Constructor the resulting object will return true if tested with this.equals(template) as - * long as the template object is not null; - * - * @param template object being copied - */ - public ActionTargetProperties(ActionTargetProperties template) - { - if (template != null) - { - actionTargetName = template.getActionTargetName(); - status = template.getStatus(); - startDate = template.getStartDate(); - completionDate = template.getCompletionDate(); - completionMessage = template.getCompletionMessage(); - } - } - - - /** - * Return the name assigned to this action target. This name helps to guide the governance service in its processing of this action target. - * - * @return string name - */ - public String getActionTargetName() - { - return actionTargetName; - } - - - /** - * Set up the name assigned to this action target. This name helps to guide the governance service in its processing of this action target. - * - * @param actionTargetName string name - */ - public void setActionTargetName(String actionTargetName) - { - this.actionTargetName = actionTargetName; - } - - - /** - * Return the current status of the action target. The default value is the status is derived from - * the engine action. However, if it has to process many target elements, then these values can - * be used to show progress. - * - * @return status enum - */ - public ToDoStatus getStatus() - { - return status; - } - - - /** - * Set up current status of the action target. The default value is the status is derived from - * the "To Do". However, if the assigned person has to process many target elements, then these values can - * be used to show progress. - * - * @param status enum - */ - public void setStatus(ToDoStatus status) - { - this.status = status; - } - - - /** - * Return the date/time when the governance action service started processing this target element. By default, - * this value is derived from the startDate for the governance action service. However, if it has to process many target elements, then these values can - * be used to show progress. - * - * @return date object - */ - public Date getStartDate() - { - return startDate; - } - - - /** - * Set up the date/time when the governance action service started processing this target element. By default, - * this value is derived from the startDate for the governance action service. However, if it has to process many target - * elements, then these values can be used to show progress. - * - * @param startDate date object - */ - public void setStartDate(Date startDate) - { - this.startDate = startDate; - } - - - /** - * Return the date/time when the governance action service stopped processing this target element. By default, - * this value is derived from the completionDate for the governance action service. However, if it has to process - * many target elements, then these values can be used to show progress. - * - * @return date object - */ - public Date getCompletionDate() - { - return completionDate; - } - - - /** - * Set up the date/time when the governance action service stopped processing this target element. By default, - * this value is derived from the completionDate for the governance action service. However, if it has to process - * many target elements, then these values can be used to show progress. - * - * @param completionDate date object - */ - public void setCompletionDate(Date completionDate) - { - this.completionDate = completionDate; - } - - - /** - * Return the optional message from the running governance service supplied on its completion. - * - * @return string message - */ - public String getCompletionMessage() - { - return completionMessage; - } - - - /** - * Set up optional message from the running governance service supplied on its completion. - * - * @param completionMessage string message - */ - public void setCompletionMessage(String completionMessage) - { - this.completionMessage = completionMessage; - } - - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "ActionTargetProperties{" + - "actionTargetName='" + actionTargetName + '\'' + - ", status=" + status + - ", startDate=" + startDate + - ", completionDate=" + completionDate + - ", completionMessage='" + completionMessage + '\'' + - "} " + super.toString(); - } - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) return true; - if (objectToCompare == null || getClass() != objectToCompare.getClass()) return false; - if (!super.equals(objectToCompare)) return false; - ActionTargetProperties that = (ActionTargetProperties) objectToCompare; - return status == that.status && - Objects.equals(actionTargetName, that.actionTargetName) && - Objects.equals(startDate, that.startDate) && - Objects.equals(completionDate, that.completionDate) && - Objects.equals(completionMessage, that.completionMessage); - } - - /** - * Create a hash code for this element type. - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(actionTargetName, status, startDate, completionDate, completionMessage); - } - -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/ActorProfileProperties.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/ActorProfileProperties.java deleted file mode 100644 index 03bc6fb372c..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/ActorProfileProperties.java +++ /dev/null @@ -1,162 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.properties; - -import com.fasterxml.jackson.annotation.*; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * The ActorProfileProperties describes the common properties of a Personal Profile, IT Profile and Team Profile. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes( - { - @JsonSubTypes.Type(value = TeamProfileProperties.class, name = "TeamProfileProperties"), - }) - -public class ActorProfileProperties extends ReferenceableProperties -{ - private String knownName = null; - private String description = null; - - - /** - * Default Constructor - */ - public ActorProfileProperties() - { - super(); - } - - - /** - * Copy/clone Constructor - the resulting object. - * - * @param template object being copied - */ - public ActorProfileProperties(ActorProfileProperties template) - { - super (template); - - if (template != null) - { - this.knownName = template.getKnownName(); - this.description = template.getDescription(); - } - } - - - /** - * Return the name that the person/automated agent/team is known as. - * - * @return string name - */ - public String getKnownName() - { - return knownName; - } - - - /** - * Set up the name that the person/automated agent/team is known as. - * - * @param knownName string name - */ - public void setKnownName(String knownName) - { - this.knownName = knownName; - } - - - /** - * Return description of the person/automated agent/team. - * - * @return text - */ - public String getDescription() - { - return description; - } - - - /** - * Set up description of the person/automated agent/team. - * - * @param description text - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "ActorProfileProperties{" + - "knownName='" + knownName + '\'' + - ", description='" + description + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ActorProfileProperties that = (ActorProfileProperties) objectToCompare; - return Objects.equals(knownName, that.knownName) && - Objects.equals(description, that.description); - } - - - /** - * Just use the GUID for the hash code as it should be unique. - * - * @return int code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), knownName, description); - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/AppointmentProperties.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/AppointmentProperties.java deleted file mode 100644 index eea89394887..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/AppointmentProperties.java +++ /dev/null @@ -1,170 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Date; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ExternalSourceRequestBody carries the parameters for marking an asset or schema as external. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class AppointmentProperties -{ - private Date effectiveFrom = null; - private Date effectiveTo = null; - private boolean isPublic = false; - - - /** - * Default constructor - */ - public AppointmentProperties() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public AppointmentProperties(AppointmentProperties template) - { - if (template != null) - { - effectiveFrom = template.getEffectiveFrom(); - effectiveTo = template.getEffectiveTo(); - isPublic = template.getIsPublic(); - } - } - - - /** - * Return the date/time that this element is effective from (null means effective from the epoch). - * - * @return date object - */ - public Date getEffectiveFrom() - { - return effectiveFrom; - } - - - /** - * Set up the date/time that this element is effective from (null means effective from the epoch). - * - * @param effectiveFrom date object - */ - public void setEffectiveFrom(Date effectiveFrom) - { - this.effectiveFrom = effectiveFrom; - } - - - /** - * Return the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @return date object - */ - public Date getEffectiveTo() - { - return effectiveTo; - } - - - /** - * Set the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @param effectiveTo date object - */ - public void setEffectiveTo(Date effectiveTo) - { - this.effectiveTo = effectiveTo; - } - - - /** - * Return if the contents of this profile be shared with colleagues. - * - * @return flag - */ - public boolean getIsPublic() - { - return isPublic; - } - - - /** - * Set up if the contents of this profile be shared with colleagues. - * - * @param isPublic flag - */ - public void setIsPublic(boolean isPublic) - { - this.isPublic = isPublic; - } - - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "AppointmentProperties{" + - "effectiveFrom=" + effectiveFrom + - ", effectiveTo=" + effectiveTo + - ", isPublic=" + isPublic + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - AppointmentProperties that = (AppointmentProperties) objectToCompare; - return isPublic == that.isPublic && - Objects.equals(effectiveFrom, that.effectiveFrom) && - Objects.equals(effectiveTo, that.effectiveTo); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), effectiveFrom, effectiveTo, isPublic); - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/AssetProperties.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/AssetProperties.java deleted file mode 100644 index 4dba89c30e6..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/AssetProperties.java +++ /dev/null @@ -1,253 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.*; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * AssetProperties describes an asset. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class AssetProperties extends ReferenceableProperties -{ - private String name = null; - private String versionIdentifier = null; - private String description = null; - private String deployedImplementationType = null; - private Date dateAssetCreated = null; - private Date dateAssetLastUpdated = null; - - - /** - * Default constructor - */ - public AssetProperties() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public AssetProperties(AssetProperties template) - { - super(template); - - if (template != null) - { - this.name = template.getName(); - this.versionIdentifier = template.getVersionIdentifier(); - this.description = template.getDescription(); - this.deployedImplementationType = template.getDeployedImplementationType(); - this.dateAssetCreated = template.getDateAssetCreated(); - this.dateAssetLastUpdated = template.getDateAssetLastUpdated(); - } - } - - - /** - * Return the name of the resource. - * - * @return string name - */ - public String getName() - { - return name; - } - - - /** - * Set up the name of the resource. - * - * @param name string name - */ - public void setName(String name) - { - this.name = name; - } - - - /** - * Set up the version identifier of the resource. - * - * @return string version name - */ - public String getVersionIdentifier() - { - return versionIdentifier; - } - - - /** - * Set up the version identifier of the resource. - * - * @param versionIdentifier string version name - */ - public void setVersionIdentifier(String versionIdentifier) - { - this.versionIdentifier = versionIdentifier; - } - - - /** - * Return the description of the asset. - * - * @return text - */ - public String getDescription() - { - return description; - } - - - /** - * Set up the description of the asset. - * - * @param description text - */ - public void setDescription(String description) - { - this.description = description; - } - - - - /** - * Retrieve the name of the technology used for this data asset. - * - * @return string name - */ - public String getDeployedImplementationType() - { - return deployedImplementationType; - } - - - /** - * Set up the name of the technology used for this data asset. - * - * @param deployedImplementationType string name - */ - public void setDeployedImplementationType(String deployedImplementationType) - { - this.deployedImplementationType = deployedImplementationType; - } - - - /** - * Return the date that the asset was created. - * - * @return date - */ - public Date getDateAssetCreated() - { - if (dateAssetCreated == null) - { - return null; - } - else - { - return new Date(dateAssetCreated.getTime()); - } - } - - - /** - * Set up the date that the asset was created. - * - * @param dateAssetCreated date - */ - public void setDateAssetCreated(Date dateAssetCreated) - { - this.dateAssetCreated = dateAssetCreated; - } - - - /** - * Return the date that the asset was last updated. - * - * @return date - */ - public Date getDateAssetLastUpdated() - { - if (dateAssetLastUpdated == null) - { - return null; - } - else - { - return new Date(dateAssetLastUpdated.getTime()); - } - } - - - /** - * Set up the date that the asset was last updated. - * - * @param dateAssetLastUpdated date - */ - public void setDateAssetLastUpdated(Date dateAssetLastUpdated) - { - this.dateAssetLastUpdated = dateAssetLastUpdated; - } - - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "AssetProperties{" + - "name='" + name + '\'' + - ", versionIdentifier='" + versionIdentifier + '\'' + - ", description='" + description + '\'' + - ", deployedImplementationType='" + deployedImplementationType + '\'' + - ", dateAssetCreated=" + dateAssetCreated + - ", dateAssetLastUpdated=" + dateAssetLastUpdated + - "} " + super.toString(); - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) return true; - if (objectToCompare == null || getClass() != objectToCompare.getClass()) return false; - if (!super.equals(objectToCompare)) return false; - AssetProperties that = (AssetProperties) objectToCompare; - return Objects.equals(name, that.name) && Objects.equals(versionIdentifier, that.versionIdentifier) && Objects.equals(description, that.description) && Objects.equals(deployedImplementationType, that.deployedImplementationType) && Objects.equals(dateAssetCreated, that.dateAssetCreated) && Objects.equals(dateAssetLastUpdated, that.dateAssetLastUpdated); - } - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), name, versionIdentifier, description, deployedImplementationType, dateAssetCreated, dateAssetLastUpdated); - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/AssignmentScopeProperties.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/AssignmentScopeProperties.java deleted file mode 100644 index 47651793d31..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/AssignmentScopeProperties.java +++ /dev/null @@ -1,150 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.properties; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * AssignmentScopeProperties provides a details of the scope of work/influence expected by the assigned actor(s). - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class AssignmentScopeProperties extends RelationshipProperties -{ - String assignmentType = null; - String description = null; - - /** - * Default constructor - */ - public AssignmentScopeProperties() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public AssignmentScopeProperties(AssignmentScopeProperties template) - { - super(template); - - if (template != null) - { - this.assignmentType = template.getAssignmentType(); - this.description = template.getDescription(); - } - } - - - /** - * Return the expectations with respect to the scope. - * - * @return type of assignment - */ - public String getAssignmentType() - { - return assignmentType; - } - - - /** - * Set up the expectations with respect to the scope. - * - * @param assignmentType type of assignment - */ - public void setAssignmentType(String assignmentType) - { - this.assignmentType = assignmentType; - } - - - /** - * Return additional descriptive text. - * - * @return text - */ - public String getDescription() - { - return description; - } - - - /** - * Set up additional descriptive text. - * - * @param description text - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "AssignmentScopeProperties{" + - "assignmentType='" + assignmentType + '\'' + - ", description='" + description + '\'' + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - AssignmentScopeProperties that = (AssignmentScopeProperties) objectToCompare; - return Objects.equals(assignmentType, that.assignmentType) && Objects.equals(description, that.description); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), assignmentType, description); - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/ClassificationProperties.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/ClassificationProperties.java deleted file mode 100644 index 92a91f5832e..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/ClassificationProperties.java +++ /dev/null @@ -1,196 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; - -import java.util.Date; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ClassificationProperties provides the base class for classification items. This provides extended properties with the ability to - * set effectivity dates. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes( - { - @JsonSubTypes.Type(value = FixedLocationProperties.class, name = "FixedLocationProperties"), - @JsonSubTypes.Type(value = DigitalLocationProperties.class, name = "DigitalLocationProperties"), - @JsonSubTypes.Type(value = SecureLocationProperties.class, name = "SecureLocationProperties"), - }) -public class ClassificationProperties -{ - private Date effectiveFrom = null; - private Date effectiveTo = null; - - private Map extendedProperties = null; - - - /** - * Default constructor - */ - public ClassificationProperties() - { - super(); - } - - - /** - * Copy/clone constructor. Retrieve values from the supplied template - * - * @param template element to copy - */ - public ClassificationProperties(ClassificationProperties template) - { - if (template != null) - { - effectiveFrom = template.getEffectiveFrom(); - effectiveTo = template.getEffectiveTo(); - extendedProperties = template.getExtendedProperties(); - } - } - - - /** - * Return the date/time that this element is effective from (null means effective from the epoch). - * - * @return date object - */ - public Date getEffectiveFrom() - { - return effectiveFrom; - } - - - /** - * Set up the date/time that this element is effective from (null means effective from the epoch). - * - * @param effectiveFrom date object - */ - public void setEffectiveFrom(Date effectiveFrom) - { - this.effectiveFrom = effectiveFrom; - } - - - /** - * Return the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @return date object - */ - public Date getEffectiveTo() - { - return effectiveTo; - } - - - /** - * Set the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @param effectiveTo date object - */ - public void setEffectiveTo(Date effectiveTo) - { - this.effectiveTo = effectiveTo; - } - - - /** - * Return the properties that have been defined for a subtype of this object that are not supported explicitly - * by this bean. - * - * @return property map - */ - public Map getExtendedProperties() - { - if (extendedProperties == null) - { - return null; - } - else if (extendedProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(extendedProperties); - } - } - - - /** - * Set up the properties that have been defined for a subtype of this object that are not supported explicitly - * by this bean. - * - * @param extendedProperties property map - */ - public void setExtendedProperties(Map extendedProperties) - { - this.extendedProperties = extendedProperties; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "ClassificationProperties{" + - "effectiveFrom=" + effectiveFrom + - ", effectiveTo=" + effectiveTo + - ", extendedProperties=" + extendedProperties + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ClassificationProperties that = (ClassificationProperties) objectToCompare; - return Objects.equals(effectiveFrom, that.effectiveFrom) && - Objects.equals(effectiveTo, that.effectiveTo); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(effectiveFrom, effectiveTo); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/CollectionFolderProperties.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/CollectionFolderProperties.java deleted file mode 100644 index 39e9ec5e5e9..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/CollectionFolderProperties.java +++ /dev/null @@ -1,156 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.openmetadata.enums.OrderBy; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * CollectionFolderProperties defines the properties used to create a Folder classification for a collection. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class CollectionFolderProperties extends CollectionProperties -{ - private String collectionOrderingProperty = null; - private OrderBy collectionOrdering = null; - - /** - * Default Constructor - */ - public CollectionFolderProperties() - { - super(); - } - - - /** - * Copy/clone Constructor - the resulting object. - * - * @param template object being copied - */ - public CollectionFolderProperties(CollectionFolderProperties template) - { - super(template); - - if (template != null) - { - this.collectionOrderingProperty = template.getCollectionOrderingProperty(); - this.collectionOrdering = template.getCollectionOrdering(); - } - } - - - /** - * Return the property to use to determine the order that member are returned. - * - * @return AssetCollectionOrder enum - */ - public OrderBy getCollectionOrdering() - { - return collectionOrdering; - } - - - /** - * Set up the property to use to determine the order that assets are returned. - * - * @param collectionOrdering AssetCollectionOrder enum - */ - public void setCollectionOrdering(OrderBy collectionOrdering) - { - this.collectionOrdering = collectionOrdering; - } - - - /** - * Return the name of the property to use if collectionOrdering is OTHER. - * - * @return property name - */ - public String getCollectionOrderingProperty() - { - return collectionOrderingProperty; - } - - - /** - * Set up the name of the property to use if collectionOrdering is OTHER. - * - * @param collectionOrderingProperty test - */ - public void setCollectionOrderingProperty(String collectionOrderingProperty) - { - this.collectionOrderingProperty = collectionOrderingProperty; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "CollectionFolderProperties{" + - "collectionOrderingProperty='" + collectionOrderingProperty + '\'' + - ", collectionOrdering=" + collectionOrdering + - ", name='" + getName() + '\'' + - ", description='" + getDescription() + '\'' + - ", collectionType='" + getCollectionType() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - CollectionFolderProperties that = (CollectionFolderProperties) objectToCompare; - return Objects.equals(collectionOrderingProperty, that.collectionOrderingProperty) && collectionOrdering == that.collectionOrdering; - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), collectionOrderingProperty, collectionOrdering); - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/CollectionMemberStatus.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/CollectionMemberStatus.java deleted file mode 100644 index c56a987da96..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/CollectionMemberStatus.java +++ /dev/null @@ -1,151 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * CollectionMemberStatus specifies the the status of the member in a collection. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public enum CollectionMemberStatus -{ - /** - * The status of the member is not known or not specified. This is the default value. - */ - UNKNOWN (0, 0, "Unknown", "The status of the member is not known or not specified. This is the default value."), - - /** - * The member was added by a discovery process. - */ - DISCOVERED (1, 1, "Discovered", "The member was added by a discovery process."), - - /** - * The member was proposed by a consumer. - */ - PROPOSED (2, 2, "Proposed", "The member was proposed by a consumer."), - - /** - * The member was imported from another system. - */ - IMPORTED (3, 3, "Imported", "The member was imported from another system."), - - /** - * The member has been validated by a custodian/steward/approver and can be trusted. - */ - VALIDATED (4, 4, "Validated", "The member has been validated by a custodian/steward/approver and can be trusted."), - - /** - * The membership has been deprecated. Consider stopping using it. - */ - DEPRECATED (5, 5, "Deprecated", "The membership has been deprecated. Consider stopping using it."), - - /** - * The membership is obsolete and should not be used. - */ - OBSOLETE (6, 6, "Obsolete", "The membership is obsolete and should not be used."), - - /** - * The membership has a different status not covered by the open metadata types. - */ - OTHER (99, 99, "Other", "The membership has a different status not covered by the open metadata types."); - - private static final String ENUM_TYPE_GUID = "a3bdb2ac-c28e-4e5a-8ab7-76aa01038832"; - private static final String ENUM_TYPE_NAME = "MembershipStatus"; - - private final int openTypeOrdinal; - - private final int ordinal; - private final String name; - private final String description; - - - /** - * Default constructor for the enumeration. - * - * @param ordinal numerical representation of the enumeration - * @param openTypeOrdinal code number from the equivalent Enum Type - * @param name default string name of the enumeration - * @param description default string description of the enumeration - */ - CollectionMemberStatus(int ordinal, - int openTypeOrdinal, - String name, - String description) - { - this.ordinal = ordinal; - this.openTypeOrdinal = openTypeOrdinal; - this.name = name; - this.description = description; - } - - - /** - * Return the numeric representation of the enumeration. - * - * @return int ordinal - */ - public int getOrdinal() { return ordinal; } - - - /** - * Return the default name of the enumeration. - * - * @return String name - */ - public String getName() { return name; } - - - /** - * Return the default description of the enumeration. - * - * @return String description - */ - public String getDescription() { return description; } - - - /** - * Return the code for this enum that comes from the Open Metadata Type that this enum represents. - * - * @return int code number - */ - public int getOpenTypeOrdinal() - { - return openTypeOrdinal; - } - - - /** - * Return the unique identifier for the open metadata enum type that this enum class represents. - * - * @return string guid - */ - public String getOpenTypeGUID() { return ENUM_TYPE_GUID; } - - - /** - * Return the unique name for the open metadata enum type that this enum class represents. - * - * @return string name - */ - public String getOpenTypeName() { return ENUM_TYPE_NAME; } - - - /** - * toString() JSON-style - * - * @return string description - */ - @Override - public String toString() - { - return "CollectionMemberStatus : " + name; - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/CollectionMembershipProperties.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/CollectionMembershipProperties.java deleted file mode 100644 index 687540a7121..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/CollectionMembershipProperties.java +++ /dev/null @@ -1,392 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * CollectionMember describes a member of a collection. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class CollectionMembershipProperties extends RelationshipProperties -{ - private String membershipRationale = null; - private String createdBy = null; - private String expression = null; - private int confidence = 0; - private CollectionMembershipStatus status = null; - private String userDefinedStatus = null; - private String steward = null; - private String stewardTypeName = null; - private String stewardPropertyName = null; - private String source = null; - private String notes = null; - - - - /** - * Default constructor - */ - public CollectionMembershipProperties() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public CollectionMembershipProperties(CollectionMembershipProperties template) - { - super(template); - - if (template != null) - { - membershipRationale = template.getMembershipRationale(); - createdBy = template.getCreatedBy(); - confidence = template.getConfidence(); - expression = template.getExpression(); - status = template.getStatus(); - userDefinedStatus = template.getUserDefinedStatus(); - source = template.getSource(); - steward = template.getSteward(); - stewardTypeName = template.getStewardTypeName(); - stewardPropertyName = template.getStewardPropertyName(); - notes = template.getNotes(); - } - } - - - /** - * Return the rationale or role of the asset in this collection. - * - * @return text - */ - public String getMembershipRationale() - { - return membershipRationale; - } - - - /** - * Set up the rationale or role of the asset in this collection. - * - * @param membershipRationale text - */ - public void setMembershipRationale(String membershipRationale) - { - this.membershipRationale = membershipRationale; - } - - - /** - * Return the identifier of the person/process that created this membership. The userId of the creator - * is automatically captured. This field can be used to add additional information about the creator. - * For example, this could be the identifier of a process instance that created the membership relationship. - * - * @return string - */ - public String getCreatedBy() - { - return createdBy; - } - - - /** - * Set up the identifier of the person/process that created this membership. The userId of the creator - * is automatically captured. This field can be used to add additional information about the creator. - * For example, this could be the identifier of a process instance that created the membership relationship. - * - * @param createdBy string - */ - public void setCreatedBy(String createdBy) - { - this.createdBy = createdBy; - } - - - /** - * Return the expression used to determine the membership. This is used by automated processes that are determining - * membership through one or more matching algorithms. This string helps the steward understand the type of match made. - * - * @return string - */ - public String getExpression() - { - return expression; - } - - /** - * Set up the expression used to determine the membership. This is used by automated processes that are determining - * membership through one or more matching algorithms. This string helps the steward understand the type of match made. - * - * @param expression string - */ - public void setExpression(String expression) - { - this.expression = expression; - } - - - /** - * Return the confidence level (0-100) that the matching is correct. - * - * @return int - */ - public int getConfidence() - { - return confidence; - } - - - /** - * Set up the confidence level (0-100) that the matching is correct. - * - * @param confidence int - */ - public void setConfidence(int confidence) - { - this.confidence = confidence; - } - - - /** - * Return the status of the membership in the collection. - * - * @return enum - */ - public CollectionMembershipStatus getStatus() - { - return status; - } - - - /** - * Set up the status of the membership in the collection. - * - * @param status enum - */ - public void setStatus(CollectionMembershipStatus status) - { - this.status = status; - } - - - /** - * Return the status of the membership in the collection. This status is controlled by the local deployment. - * - * @return string - */ - public String getUserDefinedStatus() - { - return userDefinedStatus; - } - - - /** - * Set up the status of the membership in the collection. This status is controlled by the local deployment. - * - * @param userDefinedStatus string - */ - public void setUserDefinedStatus(String userDefinedStatus) - { - this.userDefinedStatus = userDefinedStatus; - } - - - /** - * Return the source of information that determined the membership. - * - * @return string - */ - public String getSource() - { - return source; - } - - - /** - * Set up the source of information that determined the membership. - * - * @param source string - */ - public void setSource(String source) - { - this.source = source; - } - - - /** - * Returns the id of the steward responsible for the mapping. - * - * @return String id - */ - public String getSteward() - { - return steward; - } - - - /** - * Set up the id of the steward responsible for the mapping. - * - * @param steward String id - */ - public void setSteward(String steward) - { - this.steward = steward; - } - - - /** - * Return the type of element that describes the steward. - * - * @return type name - */ - public String getStewardTypeName() - { - return stewardTypeName; - } - - - /** - * Set up the type of element that describes the steward. - * - * @param stewardTypeName type name - */ - public void setStewardTypeName(String stewardTypeName) - { - this.stewardTypeName = stewardTypeName; - } - - - /** - * Return the name of the property that holds the steward's identifier. - * - * @return property name - */ - public String getStewardPropertyName() - { - return stewardPropertyName; - } - - - /** - * Set up the name of the property that holds the steward's identifier. - * - * @param stewardPropertyName property name - */ - public void setStewardPropertyName(String stewardPropertyName) - { - this.stewardPropertyName = stewardPropertyName; - } - - - /** - * Return the additional values associated with the symbolic name. - * - * @return string text - */ - public String getNotes() - { - return notes; - } - - - /** - * Set up the additional values associated with the symbolic name. - * - * @param notes string text - */ - public void setNotes(String notes) - { - this.notes = notes; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "CollectionMembershipProperties{" + - "membershipRationale='" + membershipRationale + '\'' + - ", createdBy='" + createdBy + '\'' + - ", expression='" + expression + '\'' + - ", confidence=" + confidence + - ", status=" + status + - ", userDefinedStatus='" + userDefinedStatus + '\'' + - ", steward='" + steward + '\'' + - ", stewardTypeName='" + stewardTypeName + '\'' + - ", stewardPropertyName='" + stewardPropertyName + '\'' + - ", source='" + source + '\'' + - ", notes='" + notes + '\'' + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - CollectionMembershipProperties that = (CollectionMembershipProperties) objectToCompare; - return confidence == that.confidence && - Objects.equals(membershipRationale, that.membershipRationale) - && Objects.equals(createdBy, that.createdBy) && - Objects.equals(expression, that.expression) && - status == that.status && - Objects.equals(userDefinedStatus, that.userDefinedStatus) - && Objects.equals(steward, that.steward) && - Objects.equals(stewardTypeName, that.stewardTypeName) && - Objects.equals(stewardPropertyName, that.stewardPropertyName) && - Objects.equals(source, that.source) && - Objects.equals(notes, that.notes); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), membershipRationale, createdBy, expression, confidence, status, userDefinedStatus, steward, - stewardTypeName, stewardPropertyName, source, notes); - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/CollectionMembershipStatus.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/CollectionMembershipStatus.java deleted file mode 100644 index 3b9b3c7fdaf..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/CollectionMembershipStatus.java +++ /dev/null @@ -1,97 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * CollectionMemberStatus specifies the status of an element's membership in a collection. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public enum CollectionMembershipStatus -{ - UNKNOWN (0, 0, "Unknown", "The membership origin is unknown."), - DISCOVERED (1, 1, "Discovered", "The membership was discovered by an automated process."), - ASSIGNED (2, 2, "Assigned", "The membership was proposed by an expert curator."), - IMPORTED (3, 3, "Imported", "The membership was imported from another metadata system."), - VALIDATED (4, 4, "Validated", "The membership created by an automated process has been validated and approved by an expert curator."), - DEPRECATED (5, 5, "Deprecated", "The membership should no longer be used."), - OBSOLETE (6, 6, "Obsolete", "The membership must no longer be used."), - OTHER (7, 99, "Other", "Another membership status. See userDefinedStatus."); - - private final int ordinal; - private final int openMetadataOrdinal; - private final String name; - private final String description; - - - /** - * Default constructor for the enumeration. - * - * @param ordinal numerical representation of the enumeration - * @param openMetadataOrdinal numerical representation of the enumeration from the open metadata types - * @param name default string name of the enumeration - * @param description default string description of the enumeration - */ - CollectionMembershipStatus(int ordinal, - int openMetadataOrdinal, - String name, - String description) - { - this.ordinal = ordinal; - this.openMetadataOrdinal = openMetadataOrdinal; - this.name = name; - this.description = description; - } - - - /** - * Return the numeric representation of the enumeration. - * - * @return int ordinal - */ - public int getOrdinal() { return ordinal; } - - - /** - * Return the numeric representation of the enumeration from the open metadata types. - * - * @return int ordinal - */ - public int getOpenMetadataOrdinal() { return openMetadataOrdinal; } - - - /** - * Return the default name of the enumeration. - * - * @return String name - */ - public String getName() { return name; } - - - /** - * Return the default description of the enumeration. - * - * @return String description - */ - public String getDescription() { return description; } - - - /** - * toString() JSON-style - * - * @return string description - */ - @Override - public String toString() - { - return "CollectionMembershipStatus : " + name; - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/CollectionProperties.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/CollectionProperties.java deleted file mode 100644 index a56807f203f..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/CollectionProperties.java +++ /dev/null @@ -1,186 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * CollectionProperties describes the core properties of a collection. The collection is a managed list of elements. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes( - { - @JsonSubTypes.Type(value = CollectionFolderProperties.class, name = "FolderProperties"), - }) -public class CollectionProperties extends ReferenceableProperties -{ - private String name = null; - private String description = null; - private String collectionType = null; - - - /** - * Default constructor - */ - public CollectionProperties() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public CollectionProperties(CollectionProperties template) - { - super(template); - - if (template != null) - { - this.name = template.getName(); - this.description = template.getDescription(); - this.collectionType = template.getCollectionType(); - } - } - - - /** - * Return the name of the collection. - * - * @return string name - */ - public String getName() - { - return name; - } - - - /** - * Set up the name of the collection. - * - * @param name string name - */ - public void setName(String name) - { - this.name = name; - } - - - /** - * Return the description of the collection. - * - * @return text - */ - public String getDescription() - { - return description; - } - - - /** - * Set up the description of the collection. - * - * @param description text - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * Return a descriptive name for the collection's type. - * - * @return string name - */ - public String getCollectionType() - { - return collectionType; - } - - - /** - * Set up a descriptive name for the collection's type. - * - * @param collectionType string name - */ - public void setCollectionType(String collectionType) - { - this.collectionType = collectionType; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "CollectionProperties{" + - "name='" + name + '\'' + - ", description='" + description + '\'' + - ", collectionType='" + collectionType + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - CollectionProperties that = (CollectionProperties) objectToCompare; - return Objects.equals(getName(), that.getName()) && Objects.equals(getCollectionType(), that.getCollectionType()) && - Objects.equals(getDescription(), that.getDescription()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), getName(), getDescription(), getCollectionType()); - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/CommentProperties.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/CommentProperties.java deleted file mode 100644 index f6d479630f9..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/CommentProperties.java +++ /dev/null @@ -1,214 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.openmetadata.enums.CommentType; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * The CommentProperties bean stores information about a comment connected to an asset. Comments provide informal feedback to assets - * and can be added at any time. - * Comments have the userId of the person who added the feedback, along with their comment text. - * The content of the comment is a personal statement (which is why the user's id is in the comment) - * and there is no formal review of the content. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class CommentProperties extends ReferenceableProperties -{ - private CommentType commentType = null; - private String commentText = null; - private String user = null; - private boolean isPublic = false; - - /** - * Default constructor - */ - public CommentProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template element to copy - */ - public CommentProperties(CommentProperties template) - { - super(template); - - if (template != null) - { - /* - * Copy the values from the supplied comment. - */ - commentType = template.getCommentType(); - user = template.getUser(); - commentText = template.getCommentText(); - isPublic = template.getIsPublic(); - } - } - - - /** - * Return an enum that describes the type of comment. - * - * @return CommentType enum - */ - public CommentType getCommentType() - { - return commentType; - } - - - /** - * Set up the enum that describes the type of comment. - * - * @param commentType CommentType enum - */ - public void setCommentType(CommentType commentType) - { - this.commentType = commentType; - } - - - /** - * Return the comment text. - * - * @return String commentText - */ - public String getCommentText() - { - return commentText; - } - - - /** - * Set up the comment text. - * - * @param commentText String text - */ - public void setCommentText(String commentText) - { - this.commentText = commentText; - } - - - /** - * Return the user id of the person who created the comment. Null means the user id is not known. - * - * @return String commenting user - */ - public String getUser() - { - return user; - } - - - /** - * Set up the user id of the person who created the comment. Null means the user id is not known. - * - * @param user String commenting user - */ - public void setUser(String user) - { - this.user = user; - } - - - /** - * Return whether the comment is private to the creating user or not. - * - * @return boolean - */ - public boolean getIsPublic() - { - return isPublic; - } - - - /** - * Set up whether the comment is private to the creating user or not. - * - * @param isPublic boolean - */ - public void setIsPublic(boolean isPublic) - { - this.isPublic = isPublic; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "CommentProperties{" + - "commentType=" + commentType + - ", commentText='" + commentText + '\'' + - ", user='" + user + '\'' + - ", isPublic=" + isPublic + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - CommentProperties that = (CommentProperties) objectToCompare; - return isPublic == that.isPublic && - commentType == that.commentType && - Objects.equals(commentText, that.commentText) && - Objects.equals(user, that.user); - } - - - /** - * Create a hash code for this element type. - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), commentType, commentText, user, isPublic); - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/CommunityForumContribution.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/CommunityForumContribution.java deleted file mode 100644 index 3063d324f59..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/CommunityForumContribution.java +++ /dev/null @@ -1,62 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.properties; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * CommunityForumContribution is used to add an entry to a community forum. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class CommunityForumContribution extends NoteLogEntryProperties -{ - /** - * Default constructor - */ - public CommunityForumContribution() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public CommunityForumContribution(CommunityForumContribution template) - { - super(template); - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "CommunityForumContribution{" + - "contributors=" + getContributors() + - ", title='" + getTitle() + '\'' + - ", text='" + getText() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/ContactMethodProperties.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/ContactMethodProperties.java deleted file mode 100644 index f1042b1a49e..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/ContactMethodProperties.java +++ /dev/null @@ -1,338 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.openmetadata.enums.ContactMethodType; - -import java.util.Date; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ContactMethodProperties describes a single mechanism that can be used to contact an individual. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ContactMethodProperties -{ - private String name = null; - private String contactType = null; - private ContactMethodType contactMethodType = null; - private String contactMethodService = null; - private String contactMethodValue = null; - private Date effectiveFrom = null; - private Date effectiveTo = null; - private String typeName = null; - private Map extendedProperties = null; - - - /** - * Default constructor - */ - public ContactMethodProperties() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ContactMethodProperties(ContactMethodProperties template) - { - if (template != null) - { - name = template.getName(); - contactType = template.getContactType(); - contactMethodType = template.getContactMethodType(); - contactMethodService = template.getContactMethodService(); - contactMethodValue = template.getContactMethodValue(); - effectiveFrom = template.getEffectiveFrom(); - effectiveTo = template.getEffectiveTo(); - typeName = template.getTypeName(); - extendedProperties = template.getExtendedProperties(); - } - } - - - /** - * Return the name to give this contact method (imagine a list of contact methods). - * - * @return string - */ - public String getName() - { - return name; - } - - - /** - * Set up the name to give this contact method (imagine a list of contact methods). - * - * @param name string - */ - public void setName(String name) - { - this.name = name; - } - - - /** - * Return the type of contact - is it related to work or personal etc. - * - * @return string type name - often controlled by a valid value set - */ - public String getContactType() - { - return contactType; - } - - - /** - * Set up the type of contact - is it related to work or personal etc. - * - * @param contactType string type name - often controlled by a valid value set - */ - public void setContactType(String contactType) - { - this.contactType = contactType; - } - - - /** - * Return the type of the contact method. - * - * @return contact method type enum - */ - public ContactMethodType getContactMethodType() - { - return contactMethodType; - } - - - /** - * Set up the type of the contact method. - * - * @param contactMethodType contact method type enum - */ - public void setContactMethodType(ContactMethodType contactMethodType) - { - this.contactMethodType = contactMethodType; - } - - - /** - * Return the URL of the service used to contact the individual. - * - * @return service URL - */ - public String getContactMethodService() - { - return contactMethodService; - } - - - /** - * Set up theURL of the service used to contact the individual. - * - * @param contactMethodService service URL - */ - public void setContactMethodService(String contactMethodService) - { - this.contactMethodService = contactMethodService; - } - - - /** - * Return the account name or similar value used to direct the message to the individual. - * - * @return value string - */ - public String getContactMethodValue() - { - return contactMethodValue; - } - - - /** - * Set up the account name or similar value used to direct the message to the individual. - * - * @param contactMethodValue value string - */ - public void setContactMethodValue(String contactMethodValue) - { - this.contactMethodValue = contactMethodValue; - } - - - - /** - * Return the date/time that this element is effective from (null means effective from the epoch). - * - * @return date object - */ - public Date getEffectiveFrom() - { - return effectiveFrom; - } - - - /** - * Set up the date/time that this element is effective from (null means effective from the epoch). - * - * @param effectiveFrom date object - */ - public void setEffectiveFrom(Date effectiveFrom) - { - this.effectiveFrom = effectiveFrom; - } - - - /** - * Return the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @return date object - */ - public Date getEffectiveTo() - { - return effectiveTo; - } - - - /** - * Set the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @param effectiveTo date object - */ - public void setEffectiveTo(Date effectiveTo) - { - this.effectiveTo = effectiveTo; - } - - - /** - * Return the name of the open metadata type for this metadata element. - * - * @return string name - */ - public String getTypeName() - { - return typeName; - } - - - /** - * Set up the name of the open metadata type for this element. - * - * @param typeName string name - */ - public void setTypeName(String typeName) - { - this.typeName = typeName; - } - - - /** - * Return the properties that have been defined for a subtype of this object that are not supported explicitly - * by this bean. - * - * @return property map - */ - public Map getExtendedProperties() - { - if (extendedProperties == null) - { - return null; - } - else if (extendedProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(extendedProperties); - } - } - - - /** - * Set up the properties that have been defined for a subtype of this object that are not supported explicitly - * by this bean. - * - * @param extendedProperties property map - */ - public void setExtendedProperties(Map extendedProperties) - { - this.extendedProperties = extendedProperties; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "ContactMethodProperties{" + - "type=" + contactMethodType + - ", service='" + contactMethodService + '\'' + - ", value='" + contactMethodValue + '\'' + - ", effectiveFrom=" + effectiveFrom + - ", effectiveTo=" + effectiveTo + - ", typeName='" + typeName + '\'' + - ", extendedProperties=" + extendedProperties + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ContactMethodProperties that = (ContactMethodProperties) objectToCompare; - return contactMethodType == that.contactMethodType && - Objects.equals(contactMethodService, that.contactMethodService) && - Objects.equals(contactMethodValue, that.contactMethodValue) && - Objects.equals(effectiveFrom, that.effectiveFrom) && - Objects.equals(effectiveTo, that.effectiveTo) && - Objects.equals(typeName, that.typeName) && - Objects.equals(extendedProperties, that.extendedProperties); - } - - - /** - * Hash code for this object - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(contactMethodType, contactMethodService, contactMethodValue, effectiveFrom, effectiveTo, typeName, extendedProperties); - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/ContributionRecord.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/ContributionRecord.java deleted file mode 100644 index 4865d8e8549..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/ContributionRecord.java +++ /dev/null @@ -1,185 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.*; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * The ContributionRecord holds the information about an individual's contribution to the open metadata - * ecosystem. The base types provide support for karma points. This can be extended using the - * open metadata type system and these new properties can be maintained using the extended properties. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ContributionRecord extends ReferenceableProperties -{ - private long karmaPoints = 0; - private long karmaPointPlateau = 0; - private boolean isPublic = false; - - - - /** - * Default Constructor - */ - public ContributionRecord() - { - super(); - } - - - /** - * Copy/clone Constructor - the resulting object. - * - * @param template object being copied - */ - public ContributionRecord(ContributionRecord template) - { - super (template); - - if (template != null) - { - this.karmaPoints = template.getKarmaPoints(); - this.karmaPointPlateau = template.getKarmaPointPlateau(); - this.isPublic = template.getIsPublic(); - } - } - - - /** - * Return the karma points awarded to this person. - * - * @return count - */ - public long getKarmaPoints() - { - return karmaPoints; - } - - - /** - * Set up the karma points for this person. - * - * @param karmaPoints count - */ - public void setKarmaPoints(long karmaPoints) - { - this.karmaPoints = karmaPoints; - } - - - /** - * Return the current karma point plateau level for this person. - * - * @return count - */ - public long getKarmaPointPlateau() - { - return karmaPointPlateau; - } - - - /** - * Set up the karma point plateau level for this person. - * - * @param karmaPointPlateau count - */ - public void setKarmaPointPlateau(long karmaPointPlateau) - { - this.karmaPointPlateau = karmaPointPlateau; - } - - - /** - * Return whether this record can be shared with colleagues. - * - * @return flag - */ - public boolean getIsPublic() - { - return isPublic; - } - - - /** - * Set up whether this record can be shared with colleagues. - * - * @param isPublic flag - */ - public void setIsPublic(boolean isPublic) - { - this.isPublic = isPublic; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "ContributionRecord{" + - "karmaPoints=" + karmaPoints + - ", karmaPointPlateau=" + karmaPointPlateau + - ", isPublic=" + isPublic + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - ContributionRecord that = (ContributionRecord) objectToCompare; - return karmaPoints == that.karmaPoints && - karmaPointPlateau == that.karmaPointPlateau && - isPublic == that.isPublic; - } - - - /** - * Just use the GUID for the hash code as it should be unique. - * - * @return int code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), karmaPoints, karmaPointPlateau, isPublic); - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/ExternalReferenceProperties.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/ExternalReferenceProperties.java deleted file mode 100644 index 0190cddb977..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/ExternalReferenceProperties.java +++ /dev/null @@ -1,387 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.*; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ExternalReferenceProperties stores information about an link to an external resource that is relevant to a personal - * profile or a community. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ExternalReferenceProperties -{ - private String linkId = null; - private String linkDescription = null; - private String resourceId = null; - private String resourceDisplayName = null; - private String resourceDescription = null; - private String resourceURL = null; - private String resourceVersion = null; - private String owningOrganization = null; - private String typeName = null; - private Map extendedProperties = null; - private Map additionalProperties = null; - - - /** - * Default constructor - */ - public ExternalReferenceProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template element to copy - */ - public ExternalReferenceProperties(ExternalReferenceProperties template) - { - if (template != null) - { - linkId = template.getLinkId(); - linkDescription = template.getLinkDescription(); - resourceId = template.getResourceId(); - resourceDisplayName = template.getResourceDisplayName(); - resourceURL = template.getResourceURL(); - resourceDescription = template.getResourceDescription(); - resourceVersion = template.getResourceVersion(); - owningOrganization = template.getOwningOrganization(); - typeName = template.getTypeName(); - extendedProperties = template.getExtendedProperties(); - additionalProperties = template.getAdditionalProperties(); - } - } - - - /** - * Return the identifier given to this reference (with respect to this element). - * - * @return linkId - */ - public String getLinkId() - { - return linkId; - } - - - /** - * Set up the identifier given to this reference (with respect to this element). - * - * @param linkId String name - */ - public void setLinkId(String linkId) - { - this.linkId = linkId; - } - - - /** - * Return the description of the reference (with respect to the element that this reference is linked to). - * - * @return String link description. - */ - public String getLinkDescription() { return linkDescription; } - - - /** - * Set up the description of the reference (with respect to the element that this reference is linked to). - * - * @param linkDescription String description - */ - public void setLinkDescription(String linkDescription) - { - this.linkDescription = linkDescription; - } - - - /** - * Return the fully qualified name. - * - * @return String resourceId - */ - public String getResourceId() { return resourceId; } - - - /** - * Set up the fully qualified name. - * - * @param resourceId String identifier - */ - public void setResourceId(String resourceId) - { - this.resourceId = resourceId; - } - - - /** - * Return the display name of this external reference. - * - * @return String display name. - */ - public String getResourceDisplayName() { return resourceDisplayName; } - - - /** - * Set up the display name of this external reference. - * - * @param name - string name - */ - public void setResourceDisplayName(String name) - { - this.resourceDisplayName = name; - } - - - - /** - * Return the description of the resource that this external reference represents. - * - * @return String description - */ - public String getResourceDescription() { return resourceDescription; } - - - /** - * Set up the description of the resource that this external reference represents. - * - * @param resourceDescription String description - */ - public void setResourceDescription(String resourceDescription) - { - this.resourceDescription = resourceDescription; - } - - - /** - * Return the URL used to retrieve the resource that this external reference represents. - * - * @return String URL - */ - public String getResourceURL() { return resourceURL; } - - - /** - * Set up the URL used to retrieve the resource that this external reference represents. - * - * @param url String URL - */ - public void setResourceURL(String url) - { - this.resourceURL = url; - } - - - - /** - * Return the version of the resource that this external reference represents. - * - * @return String version identifier - */ - public String getResourceVersion() { return resourceVersion; } - - - /** - * Set up the version of the resource that this external reference represents. - * - * @param version String identifier - */ - public void setResourceVersion(String version) - { - this.resourceVersion = version; - } - - - /** - * Return the name of the organization that owns the resource that this external reference represents. - * - * @return String organization name - */ - public String getOwningOrganization() { return owningOrganization; } - - - /** - * Set up the name of the organization that owns the resource that this external reference represents. - * - * @param owningOrganization String name - */ - public void setOwningOrganization(String owningOrganization) - { - this.owningOrganization = owningOrganization; - } - - - /** - * Return the type name of the external reference = null for default. - * - * @return string name - */ - public String getTypeName() - { - return typeName; - } - - - /** - * Set up the type name of the external reference = null for default. - * - * @param typeName string name - */ - public void setTypeName(String typeName) - { - this.typeName = typeName; - } - - - /** - * Return any properties associated with the subclass of this element. - * - * @return map of property names to property values - */ - public Map getExtendedProperties() - { - if (extendedProperties == null) - { - return null; - } - else if (extendedProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(extendedProperties); - } - } - - - /** - * Set up any additional properties associated with the element. - * - * @param additionalProperties map of property names to property values - */ - public void setExtendedProperties(Map additionalProperties) - { - this.extendedProperties = additionalProperties; - } - - - /** - * Return any additional properties associated with the element. - * - * @return map of property names to property values - */ - public Map getAdditionalProperties() - { - if (additionalProperties == null) - { - return null; - } - else if (additionalProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(additionalProperties); - } - } - - - /** - * Set up any additional properties associated with the element. - * - * @param additionalProperties map of property names to property values - */ - public void setAdditionalProperties(Map additionalProperties) - { - this.additionalProperties = additionalProperties; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "ExternalReferenceProperties{" + - "linkId='" + linkId + '\'' + - ", linkDescription='" + linkDescription + '\'' + - ", resourceId='" + resourceId + '\'' + - ", resourceDisplayName='" + resourceDisplayName + '\'' + - ", resourceDescription='" + resourceDescription + '\'' + - ", resourceURL='" + resourceURL + '\'' + - ", resourceVersion='" + resourceVersion + '\'' + - ", owningOrganization='" + owningOrganization + '\'' + - ", typeName='" + typeName + '\'' + - ", extendedProperties=" + extendedProperties + - ", additionalProperties=" + additionalProperties + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ExternalReferenceProperties that = (ExternalReferenceProperties) objectToCompare; - return Objects.equals(getResourceId(), that.getResourceId()) && - Objects.equals(getLinkId(), that.getLinkId()) && - Objects.equals(getResourceDisplayName(), that.getResourceDisplayName()) && - Objects.equals(getLinkDescription(), that.getLinkDescription()) && - Objects.equals(getResourceDescription(), that.getResourceDescription()) && - Objects.equals(getResourceURL(), that.getResourceURL()) && - Objects.equals(getResourceVersion(), that.getResourceVersion()) && - Objects.equals(getOwningOrganization(), that.getOwningOrganization()) && - Objects.equals(getTypeName(), that.getTypeName()) && - Objects.equals(getExtendedProperties(), that.getExtendedProperties()) && - Objects.equals(getAdditionalProperties(), that.getAdditionalProperties()); - } - - - - /** - * Uses the guid to create a hashcode. - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), getResourceId(), getLinkId(), getResourceDisplayName(), - getLinkDescription(), getResourceDescription(), getResourceURL(), getResourceVersion(), getOwningOrganization(), - getTypeName(), getExtendedProperties(), getAdditionalProperties()); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/GovernanceDefinitionProperties.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/GovernanceDefinitionProperties.java deleted file mode 100644 index 0208c72fb1b..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/GovernanceDefinitionProperties.java +++ /dev/null @@ -1,547 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * GovernanceDefinitionProperties provides the base class for many of the definitions that define the data strategy - * and governance program. It includes many of the common fields: - * - *
    - *
  • Document Id
  • - *
  • Title
  • - *
  • Summary
  • - *
  • Description
  • - *
  • Scope
  • - *
  • Domain Identifier
  • - *
  • Status
  • - *
  • Priority
  • - *
  • Implications
  • - *
  • Outcomes
  • - *
  • Results
  • - *
  • AdditionalProperties
  • - *
- */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes( - { - @JsonSubTypes.Type(value = SecurityGroupProperties.class, name = "SecurityGroupProperties"), - }) -public class GovernanceDefinitionProperties -{ - private String documentIdentifier = null; - private Map additionalProperties = null; - - private String title = null; - private String summary = null; - private String description = null; - private String scope = null; - private int domainIdentifier = 0; - private GovernanceDefinitionStatus status = null; - private String priority = null; - private List implications = null; - private List outcomes = null; - private List results = null; - - private String typeName = null; - private Map extendedProperties = null; - - - /** - * Default Constructor - */ - public GovernanceDefinitionProperties() - { - super(); - } - - - /** - * Copy/clone Constructor - * - * @param template object being copied - */ - public GovernanceDefinitionProperties(GovernanceDefinitionProperties template) - { - if (template != null) - { - this.documentIdentifier = template.getDocumentIdentifier(); - this.additionalProperties = template.getAdditionalProperties(); - this.title = template.getTitle(); - this.summary = template.getSummary(); - this.description = template.getDescription(); - this.scope = template.getScope(); - this.domainIdentifier = template.getDomainIdentifier(); - this.status = template.getStatus(); - this.priority = template.getPriority(); - this.implications = template.getImplications(); - this.outcomes = template.getOutcomes(); - this.results = template.getResults(); - this.typeName = template.getTypeName(); - this.extendedProperties = template.getExtendedProperties(); - } - } - - - /** - * Return the open metadata type name of this object - this is used to create a subtype of - * the referenceable. Any properties associated with this subtype are passed as extended properties. - * - * @return string type name - */ - public String getTypeName() - { - return typeName; - } - - - /** - * Set up the open metadata type name of this object - this is used to create a subtype of - * the referenceable. Any properties associated with this subtype are passed as extended properties. - * - * @param typeName string type name - */ - public void setTypeName(String typeName) - { - this.typeName = typeName; - } - - - /** - * Returns the stored qualified name property for the metadata entity. - * If no qualified name is available then the empty string is returned. - * - * @return documentIdentifier - */ - public String getDocumentIdentifier() - { - return documentIdentifier; - } - - - /** - * Set up the fully qualified name. - * - * @param documentIdentifier String name - */ - public void setDocumentIdentifier(String documentIdentifier) - { - this.documentIdentifier = documentIdentifier; - } - - - /** - * Return a copy of the additional properties. Null means no additional properties are available. - * - * @return AdditionalProperties - */ - public Map getAdditionalProperties() - { - if (additionalProperties == null) - { - return null; - } - else if (additionalProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(additionalProperties); - } - } - - - /** - * Set up additional properties. - * - * @param additionalProperties Additional properties object - */ - public void setAdditionalProperties(Map additionalProperties) - { - this.additionalProperties = additionalProperties; - } - - - /** - * Return the properties that are defined for a subtype of referenceable but are not explicitly - * supported by the bean. - * - * @return map of properties - */ - public Map getExtendedProperties() - { - if (extendedProperties == null) - { - return null; - } - else if (extendedProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(extendedProperties); - } - } - - - /** - * Set up the properties that are defined for a subtype of referenceable but are not explicitly - * supported by the bean. - * - * @param extendedProperties map of properties - */ - public void setExtendedProperties(Map extendedProperties) - { - this.extendedProperties = extendedProperties; - } - - - - /** - * Return the title associated with this governance definition. - * - * @return String title - */ - public String getTitle() - { - return title; - } - - - /** - * Set up the title associated with this governance definition. - * - * @param title String title - */ - public void setTitle(String title) - { - this.title = title; - } - - - - /** - * Return the summary for this governance definition. This should cover its essence. Think of it as - * the executive summary. - * - * @return String short description - */ - public String getSummary() - { - return summary; - } - - - /** - * Set up the summary of the governance definition. This should cover its essence. Think of it as - * the executive summary. - * - * @param summary String description - */ - public void setSummary(String summary) - { - this.summary = summary; - } - - - /** - * Return the full description of the governance definition. - * - * @return String description - */ - public String getDescription() - { - return description; - } - - - /** - * Set up the full description of the governance definition. - * - * @param description String description - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * Return the organizational scope that this governance definition applies to. - * - * @return String organization, department or team name - */ - public String getScope() - { - return scope; - } - - - /** - * Set up the organizational scope that this governance definition applies to. - * - * @param scope String organization, department or team name - */ - public void setScope(String scope) - { - this.scope = scope; - } - - - /** - * Return the identifier of the governance domain that this definition belongs to (0=all). - * - * @return int - */ - public int getDomainIdentifier() - { - return domainIdentifier; - } - - - /** - * Set up the identifier of the governance domain that this definition belongs to (0=all). - * - * @param domainIdentifier int - */ - public void setDomainIdentifier(int domainIdentifier) - { - this.domainIdentifier = domainIdentifier; - } - - - /** - * Return the status of this governance definition. The meaning of the different values are defined in the - * GovernanceDefinitionStatus enumeration. - * - * @return GovernanceDefinitionStatus enumeration - */ - public GovernanceDefinitionStatus getStatus() - { - return status; - } - - - /** - * Set up the status of this governance definition. The meaning of the different values are defined in the - * GovernanceDefinitionStatus enumeration. - * - * @param status GovernanceDefinitionStatus enumeration - */ - public void setStatus(GovernanceDefinitionStatus status) - { - this.status = status; - } - - - /** - * Return the priority of the governance definition. This may be something like high, medium or low, - * or maybe a time frame or more detailed explanation. - * - * @return String priority - */ - public String getPriority() - { - return priority; - } - - - /** - * Set up the priority of this governance definition. This may be something like high, medium or low, - * or maybe a time frame or more detailed explanation. - * - * @param priority String priority - */ - public void setPriority(String priority) - { - this.priority = priority; - } - - - /** - * Return the list of implications for the organization that this governance definition brings. - * This is often the first enumeration of the changes that that need to be implemented to bring - * the governance definition into effect. - * - * @return list of descriptions - */ - public List getImplications() - { - return implications; - } - - - /** - * Set up the list of implications for the organization that this governance definition brings. - * This is often the first enumeration of the changes that that need to be implemented to bring - * the governance definition into effect. - * - * @param implications list of descriptions - */ - public void setImplications(List implications) - { - this.implications = implications; - } - - - /** - * Return the list of expected outcomes from implementing this governance definition. - * - * @return list of outcome descriptions - */ - public List getOutcomes() - { - if (outcomes == null) - { - return null; - } - else if (outcomes.isEmpty()) - { - return null; - } - else - { - return outcomes; - } - } - - - /** - * Set up the list of expected outcomes from implementing this governance definition. - * - * @param outcomes list of descriptions of outcomes - */ - public void setOutcomes(List outcomes) - { - this.outcomes = outcomes; - } - - - /** - * Return the list of actual results from implementing this governance definition. - * - * @return list of result descriptions - */ - public List getResults() - { - if (outcomes == null) - { - return null; - } - else if (outcomes.isEmpty()) - { - return null; - } - else - { - return outcomes; - } - } - - - /** - * Set up the list of actual results from implementing this governance definition. - * - * @param results list of description of results - */ - public void setResults(List results) - { - this.results = results; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "GovernanceDefinitionProperties{" + - "documentIdentifier='" + documentIdentifier + '\'' + - ", additionalProperties=" + additionalProperties + - ", title='" + title + '\'' + - ", summary='" + summary + '\'' + - ", description='" + description + '\'' + - ", scope='" + scope + '\'' + - ", domainIdentifier=" + domainIdentifier + - ", status=" + status + - ", priority='" + priority + '\'' + - ", implications=" + implications + - ", outcomes=" + outcomes + - ", results=" + results + - ", typeName='" + typeName + '\'' + - ", extendedProperties=" + extendedProperties + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - GovernanceDefinitionProperties that = (GovernanceDefinitionProperties) objectToCompare; - return domainIdentifier == that.domainIdentifier && - Objects.equals(documentIdentifier, that.documentIdentifier) && - Objects.equals(additionalProperties, that.additionalProperties) && - Objects.equals(title, that.title) && - Objects.equals(summary, that.summary) && - Objects.equals(description, that.description) && - Objects.equals(scope, that.scope) && - status == that.status && - Objects.equals(priority, that.priority) && - Objects.equals(implications, that.implications) && - Objects.equals(outcomes, that.outcomes) && - Objects.equals(results, that.results) && - Objects.equals(typeName, that.typeName) && - Objects.equals(extendedProperties, that.extendedProperties); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(documentIdentifier, additionalProperties, title, summary, description, scope, domainIdentifier, status, priority, - implications, outcomes, results, typeName, extendedProperties); - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/GovernanceDefinitionStatus.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/GovernanceDefinitionStatus.java deleted file mode 100644 index e73d0425ef4..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/GovernanceDefinitionStatus.java +++ /dev/null @@ -1,89 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.properties; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * GovernanceDefinitionStatus indicates whether the definition is complete and operational or in a state that means - * it is either under development or obsolete. - *
    - *
  • DRAFT - The governance definition is still in development.
  • - *
  • PROPOSED - The governance definition is in review and not yet active.
  • - *
  • ACTIVE - The governance definition is approved and in use.
  • - *
  • DEPRECATED - The governance definition has been superseded.
  • - *
  • OTHER - The governance definition in a locally defined state.
  • - *
- */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public enum GovernanceDefinitionStatus -{ - DRAFT (0, "Draft", "The governance definition is still in development."), - PROPOSED (1, "Proposed", "The governance definition is in review and not yet active."), - ACTIVE (2, "Active", "The governance definition is approved and in use."), - DEPRECATED (3, "Deprecated", "The governance definition has been superseded."), - OTHER (99, "Other", "The governance definition in a locally defined state."); - - private final int ordinal; - private final String name; - private final String description; - - - /** - * Default constructor for the enumeration. - * - * @param ordinal numerical representation of the enumeration - * @param name default string name of the instance provenance type - * @param description default string description of the instance provenance type - */ - GovernanceDefinitionStatus(int ordinal, String name, String description) - { - this.ordinal = ordinal; - this.name = name; - this.description = description; - } - - - /** - * Return the numeric representation of the instance provenance type. - * - * @return int ordinal - */ - public int getOrdinal() { return ordinal; } - - - /** - * Return the default name of the instance provenance type. - * - * @return String name - */ - public String getName() { return name; } - - - /** - * Return the default description of the instance provenance type. - * - * @return String description - */ - public String getDescription() { return description; } - - - /** - * toString() JSON-style - * - * @return string description - */ - @Override - public String toString() - { - return "GovernanceDefinitionStatus : " + name; - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/InformalTagProperties.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/InformalTagProperties.java deleted file mode 100644 index bbf1068e3a3..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/InformalTagProperties.java +++ /dev/null @@ -1,238 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * InformalTagProperties stores information about a tag connected to an asset. - * InformalTags provide informal classifications to assets - * and can be added at any time. - * - * InformalTags have the userId of the person who added the tag, the name of the tag and its description. - * - * The content of the tag is a personal judgement (which is why the user's id is in the tag) - * and there is no formal review of the tags. However, they can be used as a basis for crowd-sourcing - * Glossary terms. - * - * Private InformalTags are only returned to the user that created them. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class InformalTagProperties -{ - /* - * Attributes of a InformalTagProperties - */ - private boolean isPublic = false; - private boolean isPrivateTag = false; - private String name = null; - private String description = null; - private String user = null; - - - /** - * Default constructor - */ - public InformalTagProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template element to copy - */ - public InformalTagProperties(InformalTagProperties template) - { - if (template != null) - { - isPublic = template.getIsPublic(); - isPrivateTag = template.getIsPrivateTag(); - user = template.getUser(); - name = template.getName(); - description = template.getDescription(); - } - } - - - /** - * Return if the link to the tag is private to the creating user. - * - * @return boolean - */ - public boolean getIsPublic() - { - return isPublic; - } - - - /** - * Set up whether the link to the tag is private to the creating user or not. - * - * @param aPublic boolean - */ - public void setIsPublic(boolean aPublic) - { - isPublic = aPublic; - } - - - /** - * Return boolean flag to say whether the tag is private or not. A private tag is only seen by the - * person who set it up. Public tags are visible to everyone. - * - * @return boolean is private flag - */ - public boolean getIsPrivateTag() { - return isPrivateTag; - } - - - /** - * Set up boolean flag to say whether the tag is private or not. A private tag is only seen by the - * person who set it up. Public tags are visible to everyone. - * - * @param privateTag indicator of a private tag - */ - public void setIsPrivateTag(boolean privateTag) - { - isPrivateTag = privateTag; - } - - - /** - * Return the user id of the person who created the tag. Null means the user id is not known. - * - * @return String tagging user - */ - public String getUser() { - return user; - } - - - /** - * Set up the user id of the person who created the tag. Null means the user id is not known. - * - * @param user String identifier of the creator of the tag. - */ - public void setUser(String user) - { - this.user = user; - } - - - /** - * Return the name of the tag. It is not valid to have a tag with no name. However, there is a point where - * the tag object is created and the tag name not yet set, so null is a possible response. - * - * @return String tag name - */ - public String getName() { - return name; - } - - - /** - * Set up the name of the tag. It is not valid to have a tag with no name. However, there is a point where - * the tag object is created and the tag name not yet set, so null is a possible response. - * - * @param name String tag name - */ - public void setName(String name) - { - this.name = name; - } - - - /** - * Return the tag description null means no description is available. - * - * @return String tag description - */ - public String getDescription() - { - return description; - } - - - /** - * Set up the tag description null means no description is available. - * - * @param tagDescription tag description - */ - public void setDescription(String tagDescription) { - this.description = tagDescription; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "InformalTagProperties{" + - "public=" + isPublic + - ", isPrivateTag=" + isPrivateTag + - ", name='" + name + '\'' + - ", description='" + description + '\'' + - ", user='" + user + '\'' + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof InformalTagProperties)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - InformalTagProperties that = (InformalTagProperties) objectToCompare; - return getIsPublic() == that.getIsPublic() && - getIsPrivateTag() == that.getIsPrivateTag() && - Objects.equals(getName(), that.getName()) && - Objects.equals(getDescription(), that.getDescription()) && - Objects.equals(getUser(), that.getUser()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(isPublic, isPrivateTag, name, description, user); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/LikeProperties.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/LikeProperties.java deleted file mode 100644 index 85152b64763..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/LikeProperties.java +++ /dev/null @@ -1,142 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.properties; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * The LikeProperties properties object records a single user's "like" of an asset. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class LikeProperties -{ - private String user = null; - private boolean isPublic = false; - - - /** - * Default constructor - */ - public LikeProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template element to copy - */ - public LikeProperties(LikeProperties template) - { - if (template != null) - { - user = template.getUser(); - isPublic = template.isPublic; - } - } - - - /** - * Return the user id of the person who created the like. Null means the user id is not known. - * - * @return String liking user - */ - public String getUser() { - return user; - } - - - /** - * Set up he user id of the person who created the like. Null means the user id is not known. - * - * @param user String liking user - */ - public void setUser(String user) - { - this.user = user; - } - - - /** - * Return if this like is private to the creating user. - * - * @return boolean - */ - public boolean getIsPublic() - { - return isPublic; - } - - - /** - * Set up whether the like is private to the creating user or not. - * - * @param aPublic boolean - */ - public void setIsPublic(boolean aPublic) - { - isPublic = aPublic; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "LikeProperties{" + - "user='" + user + '\'' + - ", isPublic='" + isPublic + '\'' + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - LikeProperties that = (LikeProperties) objectToCompare; - return isPublic == that.isPublic && - Objects.equals(user, that.user); - } - - - /** - * Create a hash code for this element type. - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(user, isPublic); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/LocationProperties.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/LocationProperties.java deleted file mode 100644 index 0b845be8cde..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/LocationProperties.java +++ /dev/null @@ -1,182 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.communityprofile.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * LocationProperties is a class for representing a generic location. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class LocationProperties extends ReferenceableProperties -{ - private String identifier = null; - private String displayName = null; - private String description = null; - - - /** - * Default constructor - */ - public LocationProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public LocationProperties(LocationProperties template) - { - super(template); - - if (template != null) - { - identifier = template.getIdentifier(); - displayName = template.getDisplayName(); - description = template.getDescription(); - } - } - - - /** - * Return the code value or symbol used to identify the location - typically unique. - * - * @return string identifier - */ - public String getIdentifier() - { - return identifier; - } - - - /** - * Set up the code value or symbol used to identify the location - typically unique. - * - * @param identifier string identifier - */ - public void setIdentifier(String identifier) - { - this.identifier = identifier; - } - - - /** - * Return a human memorable name for the location. - * - * @return string name - */ - public String getDisplayName() - { - return displayName; - } - - - /** - * Set up a human memorable name for the location. - * - * @param displayName string name - */ - public void setDisplayName(String displayName) - { - this.displayName = displayName; - } - - - /** - * Return the description of the location. - * - * @return string text - */ - public String getDescription() - { - return description; - } - - - /** - * Set up the description of the location. - * - * @param description string text - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "LocationProperties{" + - "identifier='" + identifier + '\'' + - ", displayName='" + displayName + '\'' + - ", description='" + description + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - LocationProperties that = (LocationProperties) objectToCompare; - return Objects.equals(identifier, that.identifier) && - Objects.equals(displayName, that.displayName) && - Objects.equals(description, that.description); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), identifier, displayName, description); - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/MetadataSourceProperties.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/MetadataSourceProperties.java deleted file mode 100644 index 99177a52caa..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/MetadataSourceProperties.java +++ /dev/null @@ -1,261 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.properties; - -import com.fasterxml.jackson.annotation.*; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * MetadataSourceProperties describe the properties for a capability that is supplying profile - * information to the Community Profile OMAS. This entity is stored as a SoftwareCapability and - * its GUID and qualifiedName is passed as the externalSourceGUID and externalSourceName on the profile - * management requests. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class MetadataSourceProperties extends ReferenceableProperties -{ - private String displayName = null; - private String description = null; - private String deployedImplementationType = null; - private String version = null; - private String patchLevel = null; - private String source = null; - - - /** - * Default constructor. - */ - public MetadataSourceProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public MetadataSourceProperties(MetadataSourceProperties template) - { - super(template); - - if (template != null) - { - displayName = template.getDisplayName(); - description = template.getDescription(); - deployedImplementationType = template.getDeployedImplementationType(); - version = template.getVersion(); - patchLevel = template.getPatchLevel(); - source = template.getSource(); - } - } - - - /** - * Return the display name for messages and UI. - * - * @return string name - */ - public String getDisplayName() - { - return displayName; - } - - - /** - * Set up the display name for messages and UI. - * - * @param displayName string name - */ - public void setDisplayName(String displayName) - { - this.displayName = displayName; - } - - - /** - * Return the description of the capability. - * - * @return string description - */ - public String getDescription() - { - return description; - } - - - /** - * Set up the description of the capability. - * - * @param description string - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * Return the description of the type of capability this is. - * - * @return string description - */ - public String getDeployedImplementationType() - { - return deployedImplementationType; - } - - - /** - * Set up the description of the type of capability this is. - * - * @param deployedImplementationType string - */ - public void setDeployedImplementationType(String deployedImplementationType) - { - this.deployedImplementationType = deployedImplementationType; - } - - - /** - * Return the version of the capability. - * - * @return version string - */ - public String getVersion() - { - return version; - } - - - /** - * Set up the version string of the capability. - * - * @param version string - */ - public void setVersion(String version) - { - this.version = version; - } - - - /** - * Return the patch level of the capability. - * - * @return patch level string - */ - public String getPatchLevel() - { - return patchLevel; - } - - - /** - * Set up the patch level of the capability. - * - * @param patchLevel string - */ - public void setPatchLevel(String patchLevel) - { - this.patchLevel = patchLevel; - } - - - /** - * Return the source of the capability implementation. - * - * @return string url - */ - public String getSource() - { - return source; - } - - - /** - * Set up the source of the capability implementation. - * - * @param source string url - */ - public void setSource(String source) - { - this.source = source; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "MetadataSourceProperties{" + - "displayName='" + displayName + '\'' + - ", description='" + description + '\'' + - ", typeDescription='" + deployedImplementationType + '\'' + - ", version='" + version + '\'' + - ", patchLevel='" + patchLevel + '\'' + - ", source='" + source + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - MetadataSourceProperties that = (MetadataSourceProperties) objectToCompare; - return Objects.equals(getDisplayName(), that.getDisplayName()) && - Objects.equals(getDescription(), that.getDescription()) && - Objects.equals(getDeployedImplementationType(), that.getDeployedImplementationType()) && - Objects.equals(getVersion(), that.getVersion()) && - Objects.equals(getPatchLevel(), that.getPatchLevel()) && - Objects.equals(getSource(), that.getSource()); - } - - - /** - * Create a hash code for this element type. - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), getDisplayName(), getDescription(), getDeployedImplementationType(), getVersion(), - getPatchLevel(), getSource()); - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/NewActionTargetProperties.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/NewActionTargetProperties.java deleted file mode 100644 index e3c70161a07..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/NewActionTargetProperties.java +++ /dev/null @@ -1,143 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * NewActionTarget identifies an element that a governance action service should process. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class NewActionTargetProperties -{ - private String actionTargetName = null; - private String actionTargetGUID = null; - - - /** - * Typical Constructor - */ - public NewActionTargetProperties() - { - } - - - /** - * Copy/clone Constructor the resulting object will return true if tested with this.equals(template) as - * long as the template object is not null; - * - * @param template object being copied - */ - public NewActionTargetProperties(NewActionTargetProperties template) - { - if (template != null) - { - actionTargetName = template.getActionTargetName(); - actionTargetGUID = template.getActionTargetGUID(); - } - } - - - /** - * Return the name assigned to this action target. This name helps to guide the governance service in its processing of this action target. - * - * @return string name - */ - public String getActionTargetName() - { - return actionTargetName; - } - - - /** - * Set up the name assigned to this action target. This name helps to guide the governance service in its processing of this action target. - * - * @param actionTargetName string name - */ - public void setActionTargetName(String actionTargetName) - { - this.actionTargetName = actionTargetName; - } - - - /** - * Return the unique identifier for this action target. - * - * @return string identifier - */ - public String getActionTargetGUID() - { - return actionTargetGUID; - } - - - /** - * Set up the unique identifier for this action target. - * - * @param actionTargetGUID string identifier - */ - public void setActionTargetGUID(String actionTargetGUID) - { - this.actionTargetGUID = actionTargetGUID; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "NewActionTarget{" + - "actionTargetName='" + actionTargetName + '\'' + - ", actionTargetGUID='" + actionTargetGUID + '\'' + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - NewActionTargetProperties that = (NewActionTargetProperties) objectToCompare; - return Objects.equals(actionTargetName, that.actionTargetName) && - Objects.equals(actionTargetGUID, that.actionTargetGUID); - } - - - - /** - * Create a hash code for this element type. - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(actionTargetName, actionTargetGUID); - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/PersonRoleProperties.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/PersonRoleProperties.java deleted file mode 100644 index d9015e8edac..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/PersonRoleProperties.java +++ /dev/null @@ -1,161 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.properties; - -import com.fasterxml.jackson.annotation.*; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * PersonRoleProperties covers a role that has been defined in an organization. One of more people - * can be assigned to a role. The optional headCount determines the maximum number of people that should be - * appointed (open metadata does not enforce this level but sends a notification if the headCount - * level is breached.) It also returns how many people are currently appointed to the role. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class PersonRoleProperties extends PersonalRoleProperties -{ - private boolean headCountLimitSet = false; - private int headCount = 0; - - - /** - * Default constructor - */ - public PersonRoleProperties() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public PersonRoleProperties(PersonRoleProperties template) - { - super(template); - - if (template != null) - { - this.headCountLimitSet = template.getHeadCountLimitSet(); - this.headCount = template.getHeadCount(); - } - } - - - /** - * Return the indicator whether the head count limit is set for a person role. - * - * @return boolean flag - */ - public boolean getHeadCountLimitSet() - { - return headCountLimitSet; - } - - - /** - * Set up the indicator whether the head count limit is set for a person role. - * - * @param headCountLimitSet boolean flag - */ - public void setHeadCountLimitSet(boolean headCountLimitSet) - { - this.headCountLimitSet = headCountLimitSet; - } - - - /** - * Return the head count limit (or zero if not set). - * - * @return int - */ - public int getHeadCount() - { - return headCount; - } - - - /** - * Set up the head count limit (or zero if not set). - * - * @param headCount int - */ - public void setHeadCount(int headCount) - { - this.headCount = headCount; - } - - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "PersonRoleProperties{" + - "headCountLimitSet=" + headCountLimitSet + - ", headCount=" + headCount + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", roleId='" + getRoleId() + '\'' + - ", scope='" + getScope() + '\'' + - ", title='" + getTitle() + '\'' + - ", description='" + getDescription() + '\'' + - ", domainIdentifier=" + getDomainIdentifier() + - ", additionalProperties=" + getAdditionalProperties() + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - PersonRoleProperties that = (PersonRoleProperties) objectToCompare; - return getHeadCountLimitSet() == that.getHeadCountLimitSet() && - getHeadCount() == that.getHeadCount(); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), getHeadCountLimitSet(), getHeadCount()); - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/PersonalRoleProperties.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/PersonalRoleProperties.java deleted file mode 100644 index b40188bef56..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/PersonalRoleProperties.java +++ /dev/null @@ -1,413 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.communityprofile.properties; - -import com.fasterxml.jackson.annotation.*; - -import java.util.Date; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * PersonalRoleProperties provides a structure for describe a role assigned to a person. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class PersonalRoleProperties -{ - private String qualifiedName = null; /* qualifiedName */ - private String roleId = null; /* identifier */ - private String scope = null; /* scope */ - private String title = null; /* name */ - private String description = null; /* description */ - - private int domainIdentifier = 0; /* Zero means not specific to a governance domain */ - - private Map additionalProperties = null; - - private Date effectiveFrom = null; - private Date effectiveTo = null; - - private String typeName = null; - private Map extendedProperties = null; - - - /** - * Default constructor - */ - public PersonalRoleProperties() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public PersonalRoleProperties(PersonalRoleProperties template) - { - if (template != null) - { - this.qualifiedName = template.getQualifiedName(); - this.roleId = template.getRoleId(); - this.scope = template.getScope(); - this.title = template.getTitle(); - this.description = template.getDescription(); - this.domainIdentifier = template.getDomainIdentifier(); - this.additionalProperties = template.getAdditionalProperties(); - this.effectiveFrom = template.getEffectiveFrom(); - this.effectiveTo = template.getEffectiveTo(); - this.typeName = template.getTypeName(); - this.extendedProperties = template.getExtendedProperties(); - } - } - - - - /** - * Return the unique name for element in open metadata ecosystem. - * - * @return unique name - */ - public String getQualifiedName() - { - return qualifiedName; - } - - - /** - * Set up the unique name for element in open metadata ecosystem. - * - * @param qualifiedName unique name - */ - public void setQualifiedName(String qualifiedName) - { - this.qualifiedName = qualifiedName; - } - - - /** - * Return the unique identifier for this job role/appointment typically from an HR system. - * - * @return unique identifier - */ - public String getRoleId() - { - return roleId; - } - - - /** - * Set up the unique identifier for this job role/appointment. - * - * @param roleId unique identifier - */ - public void setRoleId(String roleId) - { - this.roleId = roleId; - } - - - - /** - * Return the context in which the person is appointed. This may be an organizational scope, - * location, or scope of assets. - * - * @return string description - */ - public String getScope() - { - return scope; - } - - - /** - * Set up the context in which the person is appointed. This may be an organizational scope, - * location, or scope of assets. - * - * @param scope string description - */ - public void setScope(String scope) - { - this.scope = scope; - } - - - /** - * Return the job role title. - * - * @return string name - */ - public String getTitle() - { - return title; - } - - - /** - * Set up the job role title. - * - * @param title string name - */ - public void setTitle(String title) - { - this.title = title; - } - - - /** - * Return the description of the job role. - * - * @return string description - */ - public String getDescription() - { - return description; - } - - - /** - * Set up the description of the job role. - * - * @param description string description - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * Return the identifier of the governance domain that this role belongs to. Zero means that the - * role is not specific to any domain. - * - * @return int - */ - public int getDomainIdentifier() - { - return domainIdentifier; - } - - - /** - * Set up the identifier of the governance domain that this role belongs to. Zero means that the - * role is not specific to any domain. - * - * @param domainIdentifier int - */ - public void setDomainIdentifier(int domainIdentifier) - { - this.domainIdentifier = domainIdentifier; - } - - - /** - * Return a copy of the additional properties. Null means no additional properties are available. - * - * @return AdditionalProperties map - */ - public Map getAdditionalProperties() - { - if (additionalProperties == null) - { - return null; - } - else if (additionalProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(additionalProperties); - } - } - - - /** - * Set up additional properties. - * - * @param additionalProperties Additional properties map - */ - public void setAdditionalProperties(Map additionalProperties) - { - this.additionalProperties = additionalProperties; - } - - - /** - * Return the date/time that this element is effective from (null means effective from the epoch). - * - * @return date object - */ - public Date getEffectiveFrom() - { - return effectiveFrom; - } - - - /** - * Set up the date/time that this element is effective from (null means effective from the epoch). - * - * @param effectiveFrom date object - */ - public void setEffectiveFrom(Date effectiveFrom) - { - this.effectiveFrom = effectiveFrom; - } - - - /** - * Return the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @return date object - */ - public Date getEffectiveTo() - { - return effectiveTo; - } - - - /** - * Set the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @param effectiveTo date object - */ - public void setEffectiveTo(Date effectiveTo) - { - this.effectiveTo = effectiveTo; - } - - - /** - * Return the open metadata type name of this object - this is used to create a subtype of - * the referenceable. Any properties associated with this subtype are passed as extended properties. - * - * @return string type name - */ - public String getTypeName() - { - return typeName; - } - - - /** - * Set up the open metadata type name of this object - this is used to create a subtype of - * the referenceable. Any properties associated with this subtype are passed as extended properties. - * - * @param typeName string type name - */ - public void setTypeName(String typeName) - { - this.typeName = typeName; - } - - - /** - * Return the properties that are defined for a subtype of referenceable but are not explicitly - * supported by the bean. - * - * @return map of properties - */ - public Map getExtendedProperties() - { - if (extendedProperties == null) - { - return null; - } - else if (extendedProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(extendedProperties); - } - } - - - /** - * Set up the properties that are defined for a subtype of referenceable but are not explicitly - * supported by the bean. - * - * @param extendedProperties map of properties - */ - public void setExtendedProperties(Map extendedProperties) - { - this.extendedProperties = extendedProperties; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "PersonalRoleProperties{" + - "qualifiedName='" + qualifiedName + '\'' + - ", roleId='" + roleId + '\'' + - ", scope='" + scope + '\'' + - ", title='" + title + '\'' + - ", description='" + description + '\'' + - ", domainIdentifier=" + domainIdentifier + - ", additionalProperties=" + additionalProperties + - ", effectiveFrom=" + effectiveFrom + - ", effectiveTo=" + effectiveTo + - ", typeName='" + typeName + '\'' + - ", extendedProperties=" + extendedProperties + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - PersonalRoleProperties that = (PersonalRoleProperties) objectToCompare; - return domainIdentifier == that.domainIdentifier && - Objects.equals(qualifiedName, that.qualifiedName) && - Objects.equals(roleId, that.roleId) && - Objects.equals(scope, that.scope) && - Objects.equals(title, that.title) && - Objects.equals(description, that.description) && - Objects.equals(additionalProperties, that.additionalProperties) && - Objects.equals(effectiveFrom, that.effectiveFrom) && - Objects.equals(effectiveTo, that.effectiveTo) && - Objects.equals(typeName, that.typeName) && - Objects.equals(extendedProperties, that.extendedProperties); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(qualifiedName, roleId, scope, title, description, domainIdentifier, additionalProperties, effectiveFrom, effectiveTo, typeName, extendedProperties); - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/ProfileIdentityProperties.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/ProfileIdentityProperties.java deleted file mode 100644 index 598717d13cb..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/ProfileIdentityProperties.java +++ /dev/null @@ -1,171 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ProfileIdentityProperties describes the properties for the ProfileIdentity relationship between a profile - * and a user identity. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ProfileIdentityProperties extends RelationshipProperties -{ - private String roleTypeName = null; - private String roleGUID = null; - private String description = null; - - - /** - * Default constructor - */ - public ProfileIdentityProperties() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ProfileIdentityProperties(ProfileIdentityProperties template) - { - super(template); - - if (template != null) - { - roleTypeName = template.getRoleTypeName(); - roleGUID = template.getRoleGUID(); - description = template.getDescription(); - } - } - - - /** - * Return the type of the role. - * - * @return name - */ - public String getRoleTypeName() - { - return roleTypeName; - } - - - /** - * Set up the type of the role. - * - * @param roleTypeName name - */ - public void setRoleTypeName(String roleTypeName) - { - this.roleTypeName = roleTypeName; - } - - - /** - * Return the instance of the role. - * - * @return guid - */ - public String getRoleGUID() - { - return roleGUID; - } - - - /** - * Set up the instance of the role. - * - * @param roleGUID guid - */ - public void setRoleGUID(String roleGUID) - { - this.roleGUID = roleGUID; - } - - - /** - * Return the description of the user identity with respect to the individual. - * - * @return value string - */ - public String getDescription() - { - return description; - } - - - /** - * Set up the description of the user identity with respect to the individual. - * - * @param description value string - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "ProfileIdentityProperties{" + - "roleTypeName='" + roleTypeName + '\'' + - ", roleGUID='" + roleGUID + '\'' + - ", description='" + description + '\'' + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ProfileIdentityProperties that = (ProfileIdentityProperties) objectToCompare; - return Objects.equals(roleTypeName, that.roleTypeName) && - Objects.equals(roleGUID, that.roleGUID) && - Objects.equals(description, that.description); - } - - - /** - * Hash code for this object - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(roleTypeName, roleGUID, description); - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/ProfileLocationProperties.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/ProfileLocationProperties.java deleted file mode 100644 index c5c41f8ebe7..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/ProfileLocationProperties.java +++ /dev/null @@ -1,126 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ProfileLocationProperties describes the properties for the ProfileLocation relationship between a profile - * and a location. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ProfileLocationProperties extends RelationshipProperties -{ - private String associationType = null; - - - /** - * Default constructor - */ - public ProfileLocationProperties() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ProfileLocationProperties(ProfileLocationProperties template) - { - super(template); - - if (template != null) - { - associationType = template.getAssociationType(); - } - } - - - /** - * Return the type of the association. - * - * @return string - */ - public String getAssociationType() - { - return associationType; - } - - - /** - * Set up the type of the association. - * - * @param associationType string - */ - public void setAssociationType(String associationType) - { - this.associationType = associationType; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "ProfileLocationProperties{" + - "associationType='" + associationType + '\'' + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - ProfileLocationProperties that = (ProfileLocationProperties) objectToCompare; - return Objects.equals(associationType, that.associationType); - } - - - /** - * Hash code for this object - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), associationType); - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/ProjectProperties.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/ProjectProperties.java deleted file mode 100644 index 347e3560029..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/ProjectProperties.java +++ /dev/null @@ -1,275 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.*; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ProjectProperties describes a project. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ProjectProperties extends ReferenceableProperties -{ - private String identifier = null; - private String name = null; - private String description = null; - private String status = null; - private Date startDate = null; - private Date plannedEndDate = null; - - - /** - * Default constructor - */ - public ProjectProperties() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ProjectProperties(ProjectProperties template) - { - super(template); - - if (template != null) - { - this.identifier = template.getIdentifier(); - this.name = template.getName(); - this.description = template.getDescription(); - this.status = template.getStatus(); - this.startDate = template.getStartDate(); - this.plannedEndDate = template.getPlannedEndDate(); - } - } - - - /** - * Return the code value or symbol used to identify the project - typically unique. - * - * @return string identifier - */ - public String getIdentifier() - { - return identifier; - } - - - /** - * Set up the code value or symbol used to identify the project - typically unique. - * - * @param identifier string identifier - */ - public void setIdentifier(String identifier) - { - this.identifier = identifier; - } - - - - /** - * Return the name of the project. - * - * @return string name - */ - public String getName() - { - return name; - } - - - /** - * Set up the name of the project. - * - * @param name string name - */ - public void setName(String name) - { - this.name = name; - } - - - /** - * Return the description of the project. - * - * @return text - */ - public String getDescription() - { - return description; - } - - - /** - * Set up the description of the project. - * - * @param description text - */ - public void setDescription(String description) - { - this.description = description; - } - - - - /** - * Return the status for this project. - * - * @return string id - */ - public String getStatus() - { - return status; - } - - - /** - * Set up the status for this project. - * - * @param status string id - */ - public void setStatus(String status) - { - this.status = status; - } - - - /** - * Return the date that the project was created. - * - * @return date - */ - public Date getStartDate() - { - if (startDate == null) - { - return null; - } - else - { - return new Date(startDate.getTime()); - } - } - - - /** - * Set up the date that the project was created. - * - * @param startDate date - */ - public void setStartDate(Date startDate) - { - this.startDate = startDate; - } - - - /** - * Return the date that the project is expected to complete. - * - * @return date - */ - public Date getPlannedEndDate() - { - if (plannedEndDate == null) - { - return null; - } - else - { - return new Date(plannedEndDate.getTime()); - } - } - - - /** - * Set up the date that the project is expected to complete. - * - * @param plannedEndDate date - */ - public void setPlannedEndDate(Date plannedEndDate) - { - this.plannedEndDate = plannedEndDate; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ProjectProperties{" + - "identifier='" + identifier + '\'' + - ", name='" + name + '\'' + - ", description='" + description + '\'' + - ", status='" + status + '\'' + - ", startDate=" + startDate + - ", plannedEndDate=" + plannedEndDate + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - ProjectProperties that = (ProjectProperties) objectToCompare; - return Objects.equals(identifier, that.identifier) && - Objects.equals(name, that.name) && - Objects.equals(description, that.description) && - Objects.equals(status, that.status) && - Objects.equals(startDate, that.startDate) && - Objects.equals(plannedEndDate, that.plannedEndDate); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), identifier, name, description, status, startDate, plannedEndDate); - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/RatingProperties.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/RatingProperties.java deleted file mode 100644 index 5d63b3b0045..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/RatingProperties.java +++ /dev/null @@ -1,204 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.openmetadata.enums.StarRating; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * RatingProperties stores information about a rating connected to an asset. Ratings provide informal feedback on the quality of assets - * and can be added at any time. - * Ratings have the userId of the person who added it, a star rating and an optional review comment. - * The content of the rating is a personal judgement (which is why the user's id is in the object) - * and there is no formal review of the ratings. However, they can be used as a basis for crowd-sourcing - * feedback to asset owners. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class RatingProperties -{ - /* - * Attributes of a RatingProperties - */ - private StarRating starRating = null; - private String review = null; - private String user = null; - private boolean isPublic = false; - - /** - * Default constructor - */ - public RatingProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template element to copy - */ - public RatingProperties(RatingProperties template) - { - if (template != null) - { - user = template.getUser(); - starRating = template.getStarRating(); - review = template.getReview(); - isPublic = template.isPublic; - } - } - - - /** - * Return the user id of the person who created the rating. Null means the user id is not known. - * - * @return String user - */ - public String getUser() { - return user; - } - - - /** - * Set up the user id of the person who created the rating. Null means the user id is not known. - * - * @param user string - */ - public void setUser(String user) - { - this.user = user; - } - - - /** - * Return the stars for the rating. - * - * @return StarRating enum - */ - public StarRating getStarRating() { - return starRating; - } - - - /** - * Set up the stars for the rating. - * - * @param starRating StarRating enum - */ - public void setStarRating(StarRating starRating) - { - this.starRating = starRating; - } - - - /** - * Return the review comments - null means no review is available. - * - * @return String review comments - */ - public String getReview() - { - return review; - } - - - /** - * Set up the review comments - null means no review is available. - * - * @param review String review comments - */ - public void setReview(String review) - { - this.review = review; - } - - - /** - * Return if this rating is private ot the creating user. - * - * @return boolean - */ - public boolean isPublic() - { - return isPublic; - } - - - /** - * Set up whether the rating is private to the creating user or not. - * - * @param aPublic boolean - */ - public void setPublic(boolean aPublic) - { - isPublic = aPublic; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "RatingProperties{" + - "starRating=" + starRating + - ", review='" + review + '\'' + - ", user='" + user + '\'' + - ", isPublic='" + isPublic + '\'' + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - RatingProperties rating = (RatingProperties) objectToCompare; - return isPublic() == rating.isPublic() && - getStarRating() == rating.getStarRating() && - Objects.equals(getReview(), rating.getReview()) && - Objects.equals(getUser(), rating.getUser()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(starRating, review, user, isPublic); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/ReferenceValueAssignmentProperties.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/ReferenceValueAssignmentProperties.java deleted file mode 100644 index e426e321f90..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/ReferenceValueAssignmentProperties.java +++ /dev/null @@ -1,257 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.communityprofile.properties; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ReferenceValueAssignmentProperties is a java bean used to create a link between a valid value and a referenceable item - * to enable the valid value to be used as a semiformal tag/classifier. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ReferenceValueAssignmentProperties extends RelationshipProperties -{ - private String attributeName = null; - private int confidence = 0; - private String steward = null; - private String stewardTypeName = null; - private String stewardPropertyName = null; - private String notes = null; - - - /** - * Default constructor - */ - public ReferenceValueAssignmentProperties() - { - } - - - /** - * Copy/clone constructor. Note, this is a deep copy - * - * @param template object to copy - */ - public ReferenceValueAssignmentProperties(ReferenceValueAssignmentProperties template) - { - super (template); - - if (template != null) - { - attributeName = template.getAttributeName(); - confidence = template.getConfidence(); - steward = template.getSteward(); - stewardTypeName = template.getStewardTypeName(); - stewardPropertyName = template.getStewardPropertyName(); - notes = template.getNotes(); - } - } - - - /** - * Return the name of the attribute that this reference data value represents. - * - * @return string - */ - public String getAttributeName() - { - return attributeName; - } - - - /** - * Set up the name of the attribute that this reference data value represents. - * - * @param attributeName string - */ - public void setAttributeName(String attributeName) - { - this.attributeName = attributeName; - } - - - /** - * Return the confidence level (0-100) that the mapping is correct. - * - * @return int - */ - public int getConfidence() - { - return confidence; - } - - - /** - * Set up the confidence level (0-100) that the mapping is correct. - * - * @param confidence int - */ - public void setConfidence(int confidence) - { - this.confidence = confidence; - } - - - /** - * Returns the id of the steward responsible for the mapping. - * - * @return String id - */ - public String getSteward() - { - return steward; - } - - - /** - * Set up the id of the steward responsible for the mapping. - * - * @param steward String id - */ - public void setSteward(String steward) - { - this.steward = steward; - } - - - /** - * Return the type of element that describes the steward. - * - * @return type name - */ - public String getStewardTypeName() - { - return stewardTypeName; - } - - - /** - * Set up the type of element that describes the steward. - * - * @param stewardTypeName type name - */ - public void setStewardTypeName(String stewardTypeName) - { - this.stewardTypeName = stewardTypeName; - } - - - /** - * Return the name of the property that holds the steward's identifier. - * - * @return property name - */ - public String getStewardPropertyName() - { - return stewardPropertyName; - } - - - /** - * Set up the name of the property that holds the steward's identifier. - * - * @param stewardPropertyName property name - */ - public void setStewardPropertyName(String stewardPropertyName) - { - this.stewardPropertyName = stewardPropertyName; - } - - - /** - * Return the additional values associated with the symbolic name. - * - * @return string text - */ - public String getNotes() - { - return notes; - } - - - /** - * Set up the additional values associated with the symbolic name. - * - * @param notes string text - */ - public void setNotes(String notes) - { - this.notes = notes; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "ReferenceValueAssignmentProperties{" + - "confidence=" + confidence + - ", attributeName='" + attributeName + '\'' + - ", steward='" + steward + '\'' + - ", stewardTypeName='" + stewardTypeName + '\'' + - ", stewardPropertyName='" + stewardPropertyName + '\'' + - ", notes='" + notes + '\'' + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - ReferenceValueAssignmentProperties that = (ReferenceValueAssignmentProperties) objectToCompare; - return confidence == that.confidence && - Objects.equals(attributeName, that.attributeName) && - Objects.equals(steward, that.steward) && - Objects.equals(stewardTypeName, that.stewardTypeName) && - Objects.equals(stewardPropertyName, that.stewardPropertyName) && - Objects.equals(notes, that.notes); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), confidence, steward, stewardTypeName, stewardPropertyName, notes); - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/ReferenceableProperties.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/ReferenceableProperties.java deleted file mode 100644 index ad4b01d4d86..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/ReferenceableProperties.java +++ /dev/null @@ -1,336 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.properties; - -import com.fasterxml.jackson.annotation.*; - -import java.util.Date; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * Many open metadata entities are referenceable. It means that they have a qualified name and additional - * properties. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes( - { - @JsonSubTypes.Type(value = ActorProfileProperties.class, name = "ActorProfileProperties"), - @JsonSubTypes.Type(value = AssetProperties.class, name = "AssetProperties"), - @JsonSubTypes.Type(value = CommunityProperties.class, name = "CommunityProperties"), - @JsonSubTypes.Type(value = CommentProperties.class, name = "CommentProperties"), - @JsonSubTypes.Type(value = CollectionProperties.class, name = "CollectionProperties"), - @JsonSubTypes.Type(value = ContributionRecord.class, name = "ContributionRecord"), - @JsonSubTypes.Type(value = MetadataSourceProperties.class, name = "MetadataSourceProperties"), - @JsonSubTypes.Type(value = NoteLogEntryProperties.class, name = "NoteLogEntryProperties"), - @JsonSubTypes.Type(value = NoteLogHeaderProperties.class, name = "NoteLogHeaderProperties"), - @JsonSubTypes.Type(value = ProjectProperties.class, name = "ProjectProperties"), - @JsonSubTypes.Type(value = LocationProperties.class, name = "LocationProperties"), - @JsonSubTypes.Type(value = ResourceProperties.class, name = "ResourceProperties"), - @JsonSubTypes.Type(value = ToDoProperties.class, name = "ToDoProperties"), - @JsonSubTypes.Type(value = UserIdentityProperties.class, name = "UserIdentityProperties"), - @JsonSubTypes.Type(value = ValidValueProperties.class, name = "ValidValueProperties"), - }) -public class ReferenceableProperties -{ - private String qualifiedName = null; - private Map additionalProperties = null; - - private Date effectiveFrom = null; - private Date effectiveTo = null; - - private Map vendorProperties = null; - - private String typeName = null; - private Map extendedProperties = null; - - /** - * Default constructor - */ - public ReferenceableProperties() - { - super(); - } - - - /** - * Copy/clone constructor. Retrieves the values from the supplied template - * - * @param template element to copy - */ - public ReferenceableProperties(ReferenceableProperties template) - { - if (template != null) - { - qualifiedName = template.getQualifiedName(); - additionalProperties = template.getAdditionalProperties(); - - effectiveFrom = template.getEffectiveFrom(); - effectiveTo = template.getEffectiveTo(); - - vendorProperties = template.getVendorProperties(); - - typeName = template.getTypeName(); - extendedProperties = template.getExtendedProperties(); - } - } - - - /** - * Set up the fully qualified name. - * - * @param qualifiedName String name - */ - public void setQualifiedName(String qualifiedName) - { - this.qualifiedName = qualifiedName; - } - - - /** - * Returns the stored qualified name property for the metadata entity. - * If no qualified name is available then the empty string is returned. - * - * @return qualifiedName - */ - public String getQualifiedName() - { - return qualifiedName; - } - - - /** - * Set up additional properties. - * - * @param additionalProperties Additional properties object - */ - public void setAdditionalProperties(Map additionalProperties) - { - this.additionalProperties = additionalProperties; - } - - - /** - * Return a copy of the additional properties. Null means no additional properties are available. - * - * @return AdditionalProperties - */ - public Map getAdditionalProperties() - { - if (additionalProperties == null) - { - return null; - } - else if (additionalProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(additionalProperties); - } - } - - - /** - * Return the date/time that this element is effective from (null means effective from the epoch). - * - * @return date object - */ - public Date getEffectiveFrom() - { - return effectiveFrom; - } - - - /** - * Set up the date/time that this element is effective from (null means effective from the epoch). - * - * @param effectiveFrom date object - */ - public void setEffectiveFrom(Date effectiveFrom) - { - this.effectiveFrom = effectiveFrom; - } - - - /** - * Return the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @return date object - */ - public Date getEffectiveTo() - { - return effectiveTo; - } - - - /** - * Set the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @param effectiveTo date object - */ - public void setEffectiveTo(Date effectiveTo) - { - this.effectiveTo = effectiveTo; - } - - - /** - * Return specific properties for the data manager vendor. - * - * @return name value pairs - */ - public Map getVendorProperties() - { - if (vendorProperties == null) - { - return null; - } - else if (vendorProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(vendorProperties); - } - } - - - /** - * Set up specific properties for the data manager vendor. - * - * @param vendorProperties name value pairs - */ - public void setVendorProperties(Map vendorProperties) - { - this.vendorProperties = vendorProperties; - } - - - /** - * Return the name of the open metadata type for this metadata element. - * - * @return string name - */ - public String getTypeName() - { - return typeName; - } - - - /** - * Set up the name of the open metadata type for this element. - * - * @param typeName string name - */ - public void setTypeName(String typeName) - { - this.typeName = typeName; - } - - - /** - * Return the properties that have been defined for a subtype of this object that are not supported explicitly - * by this bean. - * - * @return property map - */ - public Map getExtendedProperties() - { - if (extendedProperties == null) - { - return null; - } - else if (extendedProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(extendedProperties); - } - } - - - /** - * Set up the properties that have been defined for a subtype of this object that are not supported explicitly - * by this bean. - * - * @param extendedProperties property map - */ - public void setExtendedProperties(Map extendedProperties) - { - this.extendedProperties = extendedProperties; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "ReferenceableProperties{" + - "qualifiedName='" + qualifiedName + '\'' + - ", additionalProperties=" + additionalProperties + - ", effectiveFrom=" + effectiveFrom + - ", effectiveTo=" + effectiveTo + - ", vendorProperties=" + vendorProperties + - ", typeName='" + typeName + '\'' + - ", extendedProperties=" + extendedProperties + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ReferenceableProperties that = (ReferenceableProperties) objectToCompare; - return Objects.equals(qualifiedName, that.qualifiedName) && - Objects.equals(additionalProperties, that.additionalProperties) && - Objects.equals(effectiveFrom, that.effectiveFrom) && - Objects.equals(effectiveTo, that.effectiveTo) && - Objects.equals(vendorProperties, that.vendorProperties) && - Objects.equals(typeName, that.typeName) && - Objects.equals(extendedProperties, that.extendedProperties); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(qualifiedName, additionalProperties, effectiveFrom, effectiveTo, vendorProperties, typeName, extendedProperties); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/RelationshipProperties.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/RelationshipProperties.java deleted file mode 100644 index 7ab1005b873..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/RelationshipProperties.java +++ /dev/null @@ -1,206 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; - -import java.util.Date; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * RelationshipProperties provides the base class for relationships items. This provides extended properties with the ability to - * set effectivity dates. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes( - { - @JsonSubTypes.Type(value = ResourceListProperties.class, name = "ResourceListProperties"), - @JsonSubTypes.Type(value = AssignmentScopeProperties.class, name = "AssignmentScopeProperties"), - @JsonSubTypes.Type(value = StakeholderProperties.class, name = "StakeholderProperties"), - @JsonSubTypes.Type(value = ProfileLocationProperties.class, name = "ProfileLocationProperties"), - @JsonSubTypes.Type(value = ProfileIdentityProperties.class, name = "ProfileIdentityProperties"), - @JsonSubTypes.Type(value = AssetLocationProperties.class, name = "AssetLocationProperties"), - @JsonSubTypes.Type(value = CollectionMembershipProperties.class, name = "CollectionMembershipProperties"), - @JsonSubTypes.Type(value = CommunityMembershipProperties.class, name = "CommunityMembershipProperties"), - @JsonSubTypes.Type(value = AdjacentLocationProperties.class, name = "AdjacentLocationProperties"), - @JsonSubTypes.Type(value = NestedLocationProperties.class, name = "NestedLocationProperties"), - @JsonSubTypes.Type(value = ReferenceValueAssignmentProperties.class, name = "ReferenceValueAssignmentProperties"), - @JsonSubTypes.Type(value = ValidValueAssignmentProperties.class, name = "ValidValueAssignmentProperties"), - @JsonSubTypes.Type(value = ValidValueMembershipProperties.class, name = "ValidValueMembershipProperties"), - }) -public class RelationshipProperties -{ - private Date effectiveFrom = null; - private Date effectiveTo = null; - - private Map extendedProperties = null; - - - /** - * Default constructor - */ - public RelationshipProperties() - { - super(); - } - - - /** - * Copy/clone constructor. Retrieve values from the supplied template - * - * @param template element to copy - */ - public RelationshipProperties(RelationshipProperties template) - { - if (template != null) - { - effectiveFrom = template.getEffectiveFrom(); - effectiveTo = template.getEffectiveTo(); - extendedProperties = template.getExtendedProperties(); - } - } - - - /** - * Return the date/time that this element is effective from (null means effective from the epoch). - * - * @return date object - */ - public Date getEffectiveFrom() - { - return effectiveFrom; - } - - - /** - * Set up the date/time that this element is effective from (null means effective from the epoch). - * - * @param effectiveFrom date object - */ - public void setEffectiveFrom(Date effectiveFrom) - { - this.effectiveFrom = effectiveFrom; - } - - - /** - * Return the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @return date object - */ - public Date getEffectiveTo() - { - return effectiveTo; - } - - - /** - * Set the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @param effectiveTo date object - */ - public void setEffectiveTo(Date effectiveTo) - { - this.effectiveTo = effectiveTo; - } - - - /** - * Return the properties that have been defined for a subtype of this object that are not supported explicitly - * by this bean. - * - * @return property map - */ - public Map getExtendedProperties() - { - if (extendedProperties == null) - { - return null; - } - else if (extendedProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(extendedProperties); - } - } - - - /** - * Set up the properties that have been defined for a subtype of this object that are not supported explicitly - * by this bean. - * - * @param extendedProperties property map - */ - public void setExtendedProperties(Map extendedProperties) - { - this.extendedProperties = extendedProperties; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "RelationshipProperties{" + - "effectiveFrom=" + effectiveFrom + - ", effectiveTo=" + effectiveTo + - ", extendedProperties=" + extendedProperties + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - RelationshipProperties that = (RelationshipProperties) objectToCompare; - return Objects.equals(effectiveFrom, that.effectiveFrom) && - Objects.equals(effectiveTo, that.effectiveTo); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(effectiveFrom, effectiveTo); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/ResourceListProperties.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/ResourceListProperties.java deleted file mode 100644 index 7930586292e..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/ResourceListProperties.java +++ /dev/null @@ -1,202 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.properties; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ResourceListProperties provides a details of why an element providing resources (such as a community) has been attached to an initiative - * such as a governance domain. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ResourceListProperties extends RelationshipProperties -{ - String resourceUse = null; - String resourceUseDescription = null; - Map resourceUseProperties = null; - boolean watchResource = false; - - /** - * Default constructor - */ - public ResourceListProperties() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ResourceListProperties(ResourceListProperties template) - { - super(template); - - if (template != null) - { - this.resourceUse = template.getResourceUse(); - this.resourceUseDescription = template.getResourceUseDescription(); - this.resourceUseProperties = template.getResourceUseProperties(); - this.watchResource = template.getWatchResource(); - } - } - - - /** - * Return the identifier that describes the type of resource use. (Use ResourceUse enum in GAF). - * - * @return string - */ - public String getResourceUse() - { - return resourceUse; - } - - - /** - * Set up identifier that describes the type of resource use. (Use ResourceUse enum in GAF). - * - * @param resourceUse string - */ - public void setResourceUse(String resourceUse) - { - this.resourceUse = resourceUse; - } - - - /** - * Return the description of how the resource is used, or why it is useful. - * - * @return string - */ - public String getResourceUseDescription() - { - return resourceUseDescription; - } - - - /** - * Set up the description of how the resource is used, or why it is useful. - * - * @param resourceUseDescription string - */ - public void setResourceUseDescription(String resourceUseDescription) - { - this.resourceUseDescription = resourceUseDescription; - } - - - /** - * Return any additional properties that explains how to use the resource. - * - * @return map - */ - public Map getResourceUseProperties() - { - return resourceUseProperties; - } - - - /** - * Set up any additional properties that explains how to use the resource. - * - * @param resourceUseProperties map - */ - public void setResourceUseProperties(Map resourceUseProperties) - { - this.resourceUseProperties = resourceUseProperties; - } - - - /** - * Return whether changes to the resource result in notifications to the initiative. - * - * @return flag - */ - public boolean getWatchResource() - { - return watchResource; - } - - - /** - * Set up whether changes to the resource result in notifications to the initiative. - * - * @param watchResource flag - */ - public void setWatchResource(boolean watchResource) - { - this.watchResource = watchResource; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ResourceListProperties{" + - "resourceUse='" + resourceUse + '\'' + - "resourceUseDescription='" + resourceUseDescription + '\'' + - "resourceUseProperties='" + resourceUseProperties + '\'' + - ", watchResource=" + watchResource + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - ResourceListProperties that = (ResourceListProperties) objectToCompare; - return watchResource == that.watchResource && - Objects.equals(resourceUse, that.resourceUse) && - Objects.equals(resourceUseDescription, that.resourceUseDescription) && - Objects.equals(resourceUseProperties, that.resourceUseProperties); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), resourceUse, resourceUseDescription, resourceUseProperties, watchResource); - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/ResourceProperties.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/ResourceProperties.java deleted file mode 100644 index db9f20617a5..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/ResourceProperties.java +++ /dev/null @@ -1,61 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.properties; - - -import com.fasterxml.jackson.annotation.*; - -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ResourceProperties provides a summary of a resource linked to a community or personal profile or something similar. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ResourceProperties extends ReferenceableProperties -{ - /** - * Default constructor - */ - public ResourceProperties() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ResourceProperties(ResourceProperties template) - { - super(template); - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ResourceProperties{" + - "qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/SecurityGroupProperties.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/SecurityGroupProperties.java deleted file mode 100644 index 671aa88e15a..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/SecurityGroupProperties.java +++ /dev/null @@ -1,136 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * SecurityGroupProperties defines a security group technical control. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class SecurityGroupProperties extends GovernanceDefinitionProperties -{ - private String distinguishedName = null; - - - /** - * Default Constructor - */ - public SecurityGroupProperties() - { - } - - - /** - * Copy/Clone Constructor - * - * @param template object to copy - */ - public SecurityGroupProperties(SecurityGroupProperties template) - { - super(template); - - if (template != null) - { - this.distinguishedName = template.getDistinguishedName(); - } - } - - - /** - * Return the specific distinguishedName of the license. - * - * @return string description - */ - public String getDistinguishedName() - { - return distinguishedName; - } - - - /** - * Set up the specific distinguishedName of the license. - * - * @param distinguishedName string description - */ - public void setDistinguishedName(String distinguishedName) - { - this.distinguishedName = distinguishedName; - } - - - /** - * JSON-style toString - * - * @return string containing the properties and their values - */ - @Override - public String toString() - { - return "SecurityGroupProperties{" + - "distinguishedName='" + distinguishedName + '\'' + - ", typeName='" + getTypeName() + '\'' + - ", documentIdentifier='" + getDocumentIdentifier() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", extendedProperties=" + getExtendedProperties() + - ", title='" + getTitle() + '\'' + - ", summary='" + getSummary() + '\'' + - ", description='" + getDescription() + '\'' + - ", scope='" + getScope() + '\'' + - ", domainIdentifier=" + getDomainIdentifier() + - ", status=" + getStatus() + - ", priority='" + getPriority() + '\'' + - ", implications=" + getImplications() + - ", outcomes=" + getOutcomes() + - ", results=" + getResults() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - SecurityGroupProperties that = (SecurityGroupProperties) objectToCompare; - return Objects.equals(distinguishedName, that.distinguishedName); - } - - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), distinguishedName); - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/StakeholderProperties.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/StakeholderProperties.java deleted file mode 100644 index 04b9eb771d8..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/StakeholderProperties.java +++ /dev/null @@ -1,125 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.properties; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * StakeholderProperties provides a details of a stakeholder for an initiative. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class StakeholderProperties extends RelationshipProperties -{ - String stakeholderRole = null; - - /** - * Default constructor - */ - public StakeholderProperties() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public StakeholderProperties(StakeholderProperties template) - { - super(template); - - if (template != null) - { - this.stakeholderRole = template.getStakeholderRole(); - } - } - - - /** - * Return the role of the stakeholder to the initiative. - * - * @return role type - */ - public String getStakeholderRole() - { - return stakeholderRole; - } - - - /** - * Set up the role of the stakeholder to the initiative. - * - * @param stakeholderRole role type - */ - public void setStakeholderRole(String stakeholderRole) - { - this.stakeholderRole = stakeholderRole; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "StakeholderProperties{" + - "effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", extendedProperties=" + getExtendedProperties() + - ", stakeholderRole='" + stakeholderRole + '\'' + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - StakeholderProperties that = (StakeholderProperties) objectToCompare; - return Objects.equals(stakeholderRole, that.stakeholderRole); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), stakeholderRole); - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/TeamProfileProperties.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/TeamProfileProperties.java deleted file mode 100644 index fe2d0700e4e..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/TeamProfileProperties.java +++ /dev/null @@ -1,154 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.properties; - -import com.fasterxml.jackson.annotation.*; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * The TeamProfileProperties describes an team of people. Information about the - * team is stored as a Team entity in the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class TeamProfileProperties extends ActorProfileProperties -{ - private String teamType = null; - private String identifier = null; - - - /** - * Default Constructor - */ - public TeamProfileProperties() - { - super(); - } - - - /** - * Copy/clone Constructor - the resulting object. - * - * @param template object being copied - */ - public TeamProfileProperties(TeamProfileProperties template) - { - super (template); - - if (template != null) - { - this.teamType = template.getTeamType(); - } - } - - - /** - * Return the type of team. - * - * @return string name - */ - public String getTeamType() - { - return teamType; - } - - - /** - * Set up the type of team. - * - * @param teamType string name - */ - public void setTeamType(String teamType) - { - this.teamType = teamType; - } - - - /** - * Return the code that uniquely identifies the team. - * - * @return string code - */ - public String getIdentifier() - { - return identifier; - } - - - /** - * Set up the code that uniquely identifies the team. - * - * @param identifier string code - */ - public void setIdentifier(String identifier) - { - this.identifier = identifier; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "TeamProfileProperties{" + - "teamType='" + teamType + '\'' + - ", knownName='" + getKnownName() + '\'' + - ", description='" + getDescription() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - TeamProfileProperties that = (TeamProfileProperties) objectToCompare; - return Objects.equals(teamType, that.teamType); - } - - - /** - * Just use the GUID for the hash code as it should be unique. - * - * @return int code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), teamType); - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/UserIdentityProperties.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/UserIdentityProperties.java deleted file mode 100644 index 85fa2ac0fc5..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/UserIdentityProperties.java +++ /dev/null @@ -1,155 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * UserIdentityProperties describes an element that is linked to a single userId. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class UserIdentityProperties extends ReferenceableProperties -{ - private String userId = null; - private String distinguishedName = null; - - - /** - * Default constructor - */ - public UserIdentityProperties() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public UserIdentityProperties(UserIdentityProperties template) - { - super(template); - - if (template != null) - { - this.userId = template.getUserId(); - this.distinguishedName = template.getDistinguishedName(); - } - } - - - /** - * Return the identifier of the user's account - * - * @return string - */ - public String getUserId() - { - return userId; - } - - - /** - * Return the identifier of the user's account. - * - * @param userId string - */ - public void setUserId(String userId) - { - this.userId = userId; - } - - - /** - * Return the unique name in LDAP. - * - * @return string name - */ - public String getDistinguishedName() - { - return distinguishedName; - } - - - /** - * Set up the unique name in LDAP. - * - * @param distinguishedName string name - */ - public void setDistinguishedName(String distinguishedName) - { - this.distinguishedName = distinguishedName; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "UserIdentityProperties{" + - "qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - ", userId='" + userId + '\'' + - ", distinguishedName='" + distinguishedName + '\'' + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - UserIdentityProperties that = (UserIdentityProperties) objectToCompare; - return Objects.equals(userId, that.userId) && - Objects.equals(distinguishedName, that.distinguishedName); - } - - - /** - * Just use the GUID for the hash code as it should be unique. - * - * @return int code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), userId, distinguishedName); - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/ValidValueAssignmentProperties.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/ValidValueAssignmentProperties.java deleted file mode 100644 index bcc517291fb..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/ValidValueAssignmentProperties.java +++ /dev/null @@ -1,115 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ValidValueAssignmentProperties describes the properties between a referenceable and its valid values. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ValidValueAssignmentProperties extends RelationshipProperties -{ - private boolean strictRequirement = true; - - - /** - * Default constructor - */ - public ValidValueAssignmentProperties() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ValidValueAssignmentProperties(ValidValueAssignmentProperties template) - { - super(template); - - if (template != null) - { - strictRequirement = template.getStrictRequirement(); - } - } - - - /** - * Return the strict requirement flag. - * - * @return boolean - */ - public boolean getStrictRequirement() - { - return strictRequirement; - } - - - /** - * Set up the strict requirement flag. - * - * @param strictRequirement string type name - */ - public void setStrictRequirement(boolean strictRequirement) - { - this.strictRequirement = strictRequirement; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ValidValueAssignmentProperties{" + "strictRequirement=" + strictRequirement + '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ValidValueAssignmentProperties that = (ValidValueAssignmentProperties) objectToCompare; - return strictRequirement == that.strictRequirement; - } - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(strictRequirement); - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/ValidValueMembershipProperties.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/ValidValueMembershipProperties.java deleted file mode 100644 index 1705c7c6df4..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/ValidValueMembershipProperties.java +++ /dev/null @@ -1,126 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.properties; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ValidValueMembershipProperties provides a flag to indicate if this value is the default value for the set. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ValidValueMembershipProperties extends RelationshipProperties -{ - boolean isDefaultValue = false; - - /** - * Default constructor - */ - public ValidValueMembershipProperties() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ValidValueMembershipProperties(ValidValueMembershipProperties template) - { - super(template); - - if (template != null) - { - this.isDefaultValue = template.getDefaultValue(); - } - } - - - /** - * Return whether it is a default value. - * - * @return flag - */ - public boolean getDefaultValue() - { - return isDefaultValue; - } - - - /** - * Set up whether it is a default value. - * - * @param defaultValue flag - */ - public void setDefaultValue(boolean defaultValue) - { - this.isDefaultValue = defaultValue; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ValidValueMembershipProperties{" + - "effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", extendedProperties=" + getExtendedProperties() + - ", isDefaultValue=" + isDefaultValue + - ", defaultValue=" + getDefaultValue() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - ValidValueMembershipProperties that = (ValidValueMembershipProperties) objectToCompare; - return isDefaultValue == that.isDefaultValue; - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), isDefaultValue); - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/ValidValueProperties.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/ValidValueProperties.java deleted file mode 100644 index 536ed013525..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/ValidValueProperties.java +++ /dev/null @@ -1,335 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ValidValueProperties provides the common super class for ValidValueSet and ValidValueDefinition. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ValidValueProperties extends ReferenceableProperties -{ - private String displayName = null; - private String description = null; - private String usage = null; - private String scope = null; - private String category = null; - private String preferredValue = null; - private String dataType = null; - private boolean isDeprecated = false; - private boolean isCaseSensitive = false; - - - /** - * Constructor - */ - public ValidValueProperties() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ValidValueProperties(ValidValueProperties template) - { - super(template); - - if (template != null) - { - displayName = template.getDisplayName(); - description = template.getDescription(); - usage = template.getUsage(); - scope = template.getScope(); - category = template.getCategory(); - preferredValue = template.getPreferredValue(); - dataType = template.getDataType(); - isDeprecated = template.getIsDeprecated(); - isCaseSensitive = template.getIsCaseSensitive(); - } - } - - - /** - * Returns the stored display name property for the valid value. - * If no display name is available then null is returned. - * - * @return String name - */ - public String getDisplayName() - { - return displayName; - } - - - /** - * Set up the stored display name property for the valid value. - * - * @param displayName String name - */ - public void setDisplayName(String displayName) - { - this.displayName = displayName; - } - - - /** - * Returns the stored description property for the valid value. - * If no description is provided then null is returned. - * - * @return description String text - */ - public String getDescription() - { - return description; - } - - - /** - * Set up the stored description property associated with the valid value. - * - * @param description String text - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * Return the description of how this valid value should be used. - * - * @return String text - */ - public String getUsage() - { - return usage; - } - - - /** - * Set up the description of how this valid value should be used. - * - * @param usage String text - */ - public void setUsage(String usage) - { - this.usage = usage; - } - - - /** - * Return the scope of values that this valid value covers (normally used with sets) - * - * @return String text - */ - public String getScope() - { - return scope; - } - - - /** - * Set up the scope of values that this valid value covers (normally used with sets) - * - * @param scope String text - */ - public void setScope(String scope) - { - this.scope = scope; - } - - - /** - * Return the category of reference data. - * - * @return string name - */ - public String getCategory() - { - return category; - } - - - /** - * Set up the category of reference data. - * - * @param category string name - */ - public void setCategory(String category) - { - this.category = category; - } - - - /** - * Return the preferred values to use in implementations (normally used with definitions) - * - * @return String value - */ - public String getPreferredValue() - { - return preferredValue; - } - - - /** - * Set up the preferred values to use in implementations (normally used with definitions) - * - * @param preferredValue String value - */ - public void setPreferredValue(String preferredValue) - { - this.preferredValue = preferredValue; - } - - - /** - * Returns the data type of the preferred value. - * - * @return string - */ - public String getDataType() - { - return dataType; - } - - - /** - * Set up the data type of the preferred value. - * - * @param dataType string - */ - public void setDataType(String dataType) - { - this.dataType = dataType; - } - - - /** - * Is the valid value deprecated? - * - * @return boolean flag - */ - public boolean getIsDeprecated() - { - return isDeprecated; - } - - - /** - * Set whether the valid value is deprecated or not. Default is false. - * - * @param deprecated boolean flag - */ - public void setIsDeprecated(boolean deprecated) - { - isDeprecated = deprecated; - } - - - /** - * Return whether this valid value is case-sensitive, or will match irrespective of case. - * - * @return boolean flag - */ - public boolean getIsCaseSensitive() - { - return isCaseSensitive; - } - - - /** - * Set up whether this valid value is case-sensitive, or will match irrespective of case. - * - * @param caseSensitive boolean flag - */ - public void setIsCaseSensitive(boolean caseSensitive) - { - isCaseSensitive = caseSensitive; - } - - - /** - * Generate a string containing the properties. - * - * @return string value - */ - @Override - public String toString() - { - return "ValidValueProperties{" + - "displayName='" + displayName + '\'' + - ", description='" + description + '\'' + - ", usage='" + usage + '\'' + - ", scope='" + scope + '\'' + - ", category='" + category + '\'' + - ", preferredValue='" + preferredValue + '\'' + - ", dataType='" + dataType + '\'' + - ", isDeprecated=" + isDeprecated + - ", isCaseSensitive=" + isCaseSensitive + - ", typeName='" + getTypeName() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ValidValueProperties that = (ValidValueProperties) objectToCompare; - return Objects.equals(displayName, that.displayName) && - Objects.equals(description, that.description) && - Objects.equals(usage, that.usage) && - Objects.equals(scope, that.scope) && - Objects.equals(category, that.category) && - Objects.equals(isDeprecated, that.isDeprecated) && - Objects.equals(isCaseSensitive, that.isCaseSensitive) && - Objects.equals(preferredValue, that.preferredValue) && - Objects.equals(dataType, that.dataType); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), displayName, description, usage, scope, category, preferredValue, dataType, isDeprecated, isCaseSensitive); - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/ActorProfileListResponse.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/ActorProfileListResponse.java deleted file mode 100644 index 3ff08357134..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/ActorProfileListResponse.java +++ /dev/null @@ -1,148 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.ActorProfileElement; - -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * ActorProfileListResponse is the response structure used on the OMAS REST API calls that return - * a list of profile elements. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ActorProfileListResponse extends CommunityProfileOMASAPIResponse -{ - private List elements = null; - - - /** - * Default constructor - */ - public ActorProfileListResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ActorProfileListResponse(ActorProfileListResponse template) - { - super(template); - - if (template != null) - { - this.elements = template.getElements(); - } - } - - - /** - * Return the profile result. - * - * @return unique identifier - */ - public List getElements() - { - if (elements == null) - { - return null; - } - else if (elements.isEmpty()) - { - return null; - } - else - { - return elements; - } - } - - - /** - * Set up the profile result. - * - * @param elements - unique identifier - */ - public void setElements(List elements) - { - this.elements = elements; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ActorProfileListResponse{" + - "elements=" + elements + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof ActorProfileListResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ActorProfileListResponse that = (ActorProfileListResponse) objectToCompare; - return Objects.equals(getElements(), that.getElements()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elements); - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/ActorProfileResponse.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/ActorProfileResponse.java deleted file mode 100644 index 0adeae204f1..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/ActorProfileResponse.java +++ /dev/null @@ -1,136 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.ActorProfileElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * ActorProfileResponse is the response structure used on the OMAS REST API calls that return a - * ActorProfileElement object as a response. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ActorProfileResponse extends CommunityProfileOMASAPIResponse -{ - private ActorProfileElement element = null; - - - /** - * Default constructor - */ - public ActorProfileResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ActorProfileResponse(ActorProfileResponse template) - { - super(template); - - if (template != null) - { - this.element = template.getElement(); - } - } - - - /** - * Return the element result. - * - * @return details of profile - */ - public ActorProfileElement getElement() - { - return element; - } - - - /** - * Set up the element result. - * - * @param element details of profile - */ - public void setElement(ActorProfileElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ActorProfileResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof ActorProfileResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ActorProfileResponse that = (ActorProfileResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/AppointmentRequestBody.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/AppointmentRequestBody.java deleted file mode 100644 index 45be7765691..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/AppointmentRequestBody.java +++ /dev/null @@ -1,123 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.communityprofile.properties.AppointmentProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * AppointmentRequestBody provides the request body payload for linking roles to people. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class AppointmentRequestBody extends ExternalSourceRequestBody -{ - private AppointmentProperties properties = null; - - /** - * Default constructor - */ - public AppointmentRequestBody() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public AppointmentRequestBody(AppointmentRequestBody template) - { - super(template); - - if (template != null) - { - this.properties = template.getProperties(); - } - } - - - /** - * Return the properties. - * - * @return properties - */ - public AppointmentProperties getProperties() - { - return properties; - } - - - /** - * Set up the properties. - * - * @param properties properties - */ - public void setProperties(AppointmentProperties properties) - { - this.properties = properties; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "AppointmentRequestBody{" + - "properties=" + properties + - ", externalSourceGUID='" + getExternalSourceGUID() + '\'' + - ", externalSourceName='" + getExternalSourceName() + '\'' + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - AppointmentRequestBody that = (AppointmentRequestBody) objectToCompare; - return Objects.equals(properties, that.properties); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), properties); - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/ClassificationRequestBody.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/ClassificationRequestBody.java index 4a246e49a14..0ae92f2680a 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/ClassificationRequestBody.java +++ b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/ClassificationRequestBody.java @@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ClassificationProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ClassificationProperties; import java.util.Objects; diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/CollectionListResponse.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/CollectionListResponse.java deleted file mode 100644 index 629b0d9c1d3..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/CollectionListResponse.java +++ /dev/null @@ -1,148 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.CollectionElement; - -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * CollectionListResponse is the response structure used on the OMAS REST API calls that return - * a list of collection elements. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class CollectionListResponse extends CommunityProfileOMASAPIResponse -{ - private List elements = null; - - - /** - * Default constructor - */ - public CollectionListResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public CollectionListResponse(CollectionListResponse template) - { - super(template); - - if (template != null) - { - this.elements = template.getElements(); - } - } - - - /** - * Return the collection result. - * - * @return unique identifier - */ - public List getElements() - { - if (elements == null) - { - return null; - } - else if (elements.isEmpty()) - { - return null; - } - else - { - return elements; - } - } - - - /** - * Set up the collection result. - * - * @param elements - unique identifier - */ - public void setElements(List elements) - { - this.elements = elements; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "CollectionListResponse{" + - "elements=" + elements + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof CollectionListResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - CollectionListResponse that = (CollectionListResponse) objectToCompare; - return Objects.equals(getElements(), that.getElements()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elements); - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/CollectionMemberListResponse.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/CollectionMemberListResponse.java deleted file mode 100644 index 49814428813..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/CollectionMemberListResponse.java +++ /dev/null @@ -1,148 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.CollectionMember; - -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * CollectionMemberListResponse is the response structure used on the OMAS REST API calls that return - * a list of collection membership elements. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class CollectionMemberListResponse extends CommunityProfileOMASAPIResponse -{ - private List elements = null; - - - /** - * Default constructor - */ - public CollectionMemberListResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public CollectionMemberListResponse(CollectionMemberListResponse template) - { - super(template); - - if (template != null) - { - this.elements = template.getElements(); - } - } - - - /** - * Return the collection membership result. - * - * @return unique identifier - */ - public List getElements() - { - if (elements == null) - { - return null; - } - else if (elements.isEmpty()) - { - return null; - } - else - { - return elements; - } - } - - - /** - * Set up the collection membership result. - * - * @param elements - unique identifier - */ - public void setElements(List elements) - { - this.elements = elements; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "CollectionMemberListResponse{" + - "elements=" + elements + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof CollectionMemberListResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - CollectionMemberListResponse that = (CollectionMemberListResponse) objectToCompare; - return Objects.equals(getElements(), that.getElements()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elements); - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/CollectionMemberResponse.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/CollectionMemberResponse.java deleted file mode 100644 index a52a79a682e..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/CollectionMemberResponse.java +++ /dev/null @@ -1,136 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.CollectionMember; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * CollectionMemberResponse is the response structure used on the OMAS REST API calls that return a - * CollectionMember object as a response. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class CollectionMemberResponse extends CommunityProfileOMASAPIResponse -{ - private CollectionMember element = null; - - - /** - * Default constructor - */ - public CollectionMemberResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public CollectionMemberResponse(CollectionMemberResponse template) - { - super(template); - - if (template != null) - { - this.element = template.getElement(); - } - } - - - /** - * Return the element result. - * - * @return details of person role - */ - public CollectionMember getElement() - { - return element; - } - - - /** - * Set up the element result. - * - * @param element details of person role - */ - public void setElement(CollectionMember element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "CollectionMemberResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof CollectionMemberResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - CollectionMemberResponse that = (CollectionMemberResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/CollectionResponse.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/CollectionResponse.java deleted file mode 100644 index 3f13676ae85..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/CollectionResponse.java +++ /dev/null @@ -1,136 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.CollectionElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * CollectionResponse is the response structure used on the OMAS REST API calls that return a - * CollectionElement object as a response. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class CollectionResponse extends CommunityProfileOMASAPIResponse -{ - private CollectionElement element = null; - - - /** - * Default constructor - */ - public CollectionResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public CollectionResponse(CollectionResponse template) - { - super(template); - - if (template != null) - { - this.element = template.getElement(); - } - } - - - /** - * Return the element result. - * - * @return details of person role - */ - public CollectionElement getElement() - { - return element; - } - - - /** - * Set up the element result. - * - * @param element details of person role - */ - public void setElement(CollectionElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "CollectionResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof CollectionResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - CollectionResponse that = (CollectionResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/CommunityListResponse.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/CommunityListResponse.java deleted file mode 100644 index e9e6b7949ad..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/CommunityListResponse.java +++ /dev/null @@ -1,148 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.CommunityElement; - -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * CommunityListResponse is the response structure used on the OMAS REST API calls that return - * a list of community elements. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class CommunityListResponse extends CommunityProfileOMASAPIResponse -{ - private List elements = null; - - - /** - * Default constructor - */ - public CommunityListResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public CommunityListResponse(CommunityListResponse template) - { - super(template); - - if (template != null) - { - this.elements = template.getElements(); - } - } - - - /** - * Return the community result. - * - * @return unique identifier - */ - public List getElements() - { - if (elements == null) - { - return null; - } - else if (elements.isEmpty()) - { - return null; - } - else - { - return elements; - } - } - - - /** - * Set up the community result. - * - * @param elements - unique identifier - */ - public void setElements(List elements) - { - this.elements = elements; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "CommunityListResponse{" + - "elements=" + elements + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof CommunityListResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - CommunityListResponse that = (CommunityListResponse) objectToCompare; - return Objects.equals(getElements(), that.getElements()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elements); - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/CommunityResponse.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/CommunityResponse.java deleted file mode 100644 index b88de9cc34a..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/CommunityResponse.java +++ /dev/null @@ -1,136 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.CommunityElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * CommunityResponse is the response structure used on the OMAS REST API calls that return a - * CommunityElement object as a response. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class CommunityResponse extends CommunityProfileOMASAPIResponse -{ - private CommunityElement element = null; - - - /** - * Default constructor - */ - public CommunityResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public CommunityResponse(CommunityResponse template) - { - super(template); - - if (template != null) - { - this.element = template.getElement(); - } - } - - - /** - * Return the element result. - * - * @return details of person role - */ - public CommunityElement getElement() - { - return element; - } - - - /** - * Set up the element result. - * - * @param element details of person role - */ - public void setElement(CommunityElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "CommunityResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof CommunityResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - CommunityResponse that = (CommunityResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/ContactMethodRequestBody.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/ContactMethodRequestBody.java deleted file mode 100644 index dc7edbae84b..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/ContactMethodRequestBody.java +++ /dev/null @@ -1,123 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ContactMethodProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ContactMethodRequestBody provides the request body payload for working on ContactMethod entities. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ContactMethodRequestBody extends ExternalSourceRequestBody -{ - private ContactMethodProperties properties = null; - - /** - * Default constructor - */ - public ContactMethodRequestBody() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ContactMethodRequestBody(ContactMethodRequestBody template) - { - super(template); - - if (template != null) - { - this.properties = template.getProperties(); - } - } - - - /** - * Return the properties for this contact method. - * - * @return properties bean - */ - public ContactMethodProperties getProperties() - { - return properties; - } - - - /** - * Set up the properties for this contact method. - * - * @param properties properties bean - */ - public void setProperties(ContactMethodProperties properties) - { - this.properties = properties; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "ContactMethodRequestBody{" + - "properties=" + properties + - ", externalSourceGUID='" + getExternalSourceGUID() + '\'' + - ", externalSourceName='" + getExternalSourceName() + '\'' + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ContactMethodRequestBody that = (ContactMethodRequestBody) objectToCompare; - return Objects.equals(properties, that.properties); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), properties); - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/EffectiveDatesRequestBody.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/EffectiveDatesRequestBody.java deleted file mode 100644 index 9784740712f..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/EffectiveDatesRequestBody.java +++ /dev/null @@ -1,151 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Date; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ExternalSourceRequestBody carries the parameters for marking an asset or schema as external. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class EffectiveDatesRequestBody extends ExternalSourceRequestBody -{ - private Date effectiveFrom = null; - private Date effectiveTo = null; - - - /** - * Default constructor - */ - public EffectiveDatesRequestBody() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public EffectiveDatesRequestBody(EffectiveDatesRequestBody template) - { - super(template); - - if (template != null) - { - effectiveFrom = template.getEffectiveFrom(); - effectiveTo = template.getEffectiveTo(); - } - } - - - /** - * Return the date/time that this element is effective from (null means effective from the epoch). - * - * @return date object - */ - public Date getEffectiveFrom() - { - return effectiveFrom; - } - - - /** - * Set up the date/time that this element is effective from (null means effective from the epoch). - * - * @param effectiveFrom date object - */ - public void setEffectiveFrom(Date effectiveFrom) - { - this.effectiveFrom = effectiveFrom; - } - - - /** - * Return the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @return date object - */ - public Date getEffectiveTo() - { - return effectiveTo; - } - - - /** - * Set the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @param effectiveTo date object - */ - public void setEffectiveTo(Date effectiveTo) - { - this.effectiveTo = effectiveTo; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "EffectiveDatesRequestBody{" + - "effectiveFrom=" + effectiveFrom + - ", effectiveTo=" + effectiveTo + - ", externalSourceGUID='" + getExternalSourceGUID() + '\'' + - ", externalSourceName='" + getExternalSourceName() + '\'' + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - EffectiveDatesRequestBody that = (EffectiveDatesRequestBody) objectToCompare; - return Objects.equals(effectiveFrom, that.effectiveFrom) && - Objects.equals(effectiveTo, that.effectiveTo); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), effectiveFrom, effectiveTo); - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/ElementStubsResponse.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/ElementStubsResponse.java deleted file mode 100644 index c7209eebfe7..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/ElementStubsResponse.java +++ /dev/null @@ -1,149 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * ElementStubListResponse is the response structure used on the OMAS REST API calls that return a - * list of element identifiers as a response. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ElementStubsResponse extends CommunityProfileOMASAPIResponse -{ - private List elements = null; - - - /** - * Default constructor - */ - public ElementStubsResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ElementStubsResponse(ElementStubsResponse template) - { - super(template); - - if (template != null) - { - this.elements = template.getElements(); - } - } - - - /** - * Return the list of element identifiers. - * - * @return list of objects or null - */ - public List getElements() - { - if (elements == null) - { - return null; - } - else if (elements.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elements); - } - } - - - /** - * Set up the list of element identifiers. - * - * @param elements - list of objects or null - */ - public void setElements(List elements) - { - this.elements = elements; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ElementStubListResponse{" + - "elements=" + elements + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof ElementStubsResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ElementStubsResponse that = (ElementStubsResponse) objectToCompare; - return Objects.equals(this.getElements(), that.getElements()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(elements, super.hashCode()); - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/LocationListResponse.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/LocationListResponse.java deleted file mode 100644 index 47af6379b2f..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/LocationListResponse.java +++ /dev/null @@ -1,146 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.communityprofile.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.LocationElement; - -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * LocationListResponse is a response object for passing back a list of location objects. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class LocationListResponse extends CommunityProfileOMASAPIResponse -{ - private List elements = null; - - - /** - * Default constructor - */ - public LocationListResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public LocationListResponse(LocationListResponse template) - { - super(template); - - if (template != null) - { - elements = template.getElements(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElements() - { - if (elements == null) - { - return null; - } - else if (elements.isEmpty()) - { - return null; - } - else - { - return elements; - } - } - - - /** - * Set up the list of metadata elements to return. - * - * @param elements result object - */ - public void setElements(List elements) - { - this.elements = elements; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "LocationListResponse{" + - "element=" + elements + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - LocationListResponse that = (LocationListResponse) objectToCompare; - return Objects.equals(elements, that.elements); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elements); - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/LocationResponse.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/LocationResponse.java deleted file mode 100644 index cc8794023ca..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/LocationResponse.java +++ /dev/null @@ -1,134 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.communityprofile.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.LocationElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * LocationResponse is a response object for passing back a single location object. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class LocationResponse extends CommunityProfileOMASAPIResponse -{ - private LocationElement element = null; - - - /** - * Default constructor - */ - public LocationResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public LocationResponse(LocationResponse template) - { - super(template); - - if (template != null) - { - element = template.getElement(); - } - } - - - /** - * Return the metadata element. - * - * @return result object - */ - public LocationElement getElement() - { - return element; - } - - - /** - * Set up the metadata element to return. - * - * @param element result object - */ - public void setElement(LocationElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "LocationResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - LocationResponse that = (LocationResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/MetadataSourceResponse.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/MetadataSourceResponse.java deleted file mode 100644 index 77d8d2a3f88..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/MetadataSourceResponse.java +++ /dev/null @@ -1,136 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.MetadataSourceElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * MetadataSourceResponse is the response structure used on the OMAS REST API calls that return a - * MetadataSourceElement object as a response. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class MetadataSourceResponse extends CommunityProfileOMASAPIResponse -{ - private MetadataSourceElement element = null; - - - /** - * Default constructor - */ - public MetadataSourceResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public MetadataSourceResponse(MetadataSourceResponse template) - { - super(template); - - if (template != null) - { - this.element = template.getElement(); - } - } - - - /** - * Return the element result. - * - * @return details of metadata source - */ - public MetadataSourceElement getElement() - { - return element; - } - - - /** - * Set up the element result. - * - * @param element details of metadata source - */ - public void setElement(MetadataSourceElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "MetadataSourceResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof MetadataSourceResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - MetadataSourceResponse that = (MetadataSourceResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/PersonRoleAppointeeListResponse.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/PersonRoleAppointeeListResponse.java deleted file mode 100644 index fea6ea69aaf..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/PersonRoleAppointeeListResponse.java +++ /dev/null @@ -1,148 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.PersonRoleAppointee; - -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * PersonRoleListResponse is the response structure used on the OMAS REST API calls that return a - * a list of person role elements. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class PersonRoleAppointeeListResponse extends CommunityProfileOMASAPIResponse -{ - private List elements = null; - - - /** - * Default constructor - */ - public PersonRoleAppointeeListResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public PersonRoleAppointeeListResponse(PersonRoleAppointeeListResponse template) - { - super(template); - - if (template != null) - { - this.elements = template.getElements(); - } - } - - - /** - * Return the person role result. - * - * @return unique identifier - */ - public List getElements() - { - if (elements == null) - { - return null; - } - else if (elements.isEmpty()) - { - return null; - } - else - { - return elements; - } - } - - - /** - * Set up the person role result. - * - * @param elements - unique identifier - */ - public void setElements(List elements) - { - this.elements = elements; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "PersonRoleAppointeeListResponse{" + - "elements=" + elements + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof PersonRoleAppointeeListResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - PersonRoleAppointeeListResponse that = (PersonRoleAppointeeListResponse) objectToCompare; - return Objects.equals(getElements(), that.getElements()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elements); - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/PersonRoleListResponse.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/PersonRoleListResponse.java deleted file mode 100644 index 9cac5f3d158..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/PersonRoleListResponse.java +++ /dev/null @@ -1,148 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.PersonRoleElement; - -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * PersonRoleListResponse is the response structure used on the OMAS REST API calls that return - * a list of person role elements. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class PersonRoleListResponse extends CommunityProfileOMASAPIResponse -{ - private List elements = null; - - - /** - * Default constructor - */ - public PersonRoleListResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public PersonRoleListResponse(PersonRoleListResponse template) - { - super(template); - - if (template != null) - { - this.elements = template.getElements(); - } - } - - - /** - * Return the person role result. - * - * @return unique identifier - */ - public List getElements() - { - if (elements == null) - { - return null; - } - else if (elements.isEmpty()) - { - return null; - } - else - { - return elements; - } - } - - - /** - * Set up the person role result. - * - * @param elements - unique identifier - */ - public void setElements(List elements) - { - this.elements = elements; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "PersonRoleListResponse{" + - "elements=" + elements + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof PersonRoleListResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - PersonRoleListResponse that = (PersonRoleListResponse) objectToCompare; - return Objects.equals(getElements(), that.getElements()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elements); - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/PersonRoleRequestBody.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/PersonRoleRequestBody.java deleted file mode 100644 index f06b9b85492..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/PersonRoleRequestBody.java +++ /dev/null @@ -1,124 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.communityprofile.properties.PersonRoleProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * PersonRoleRequestBody provides the request body payload for working on PersonRole entities. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class PersonRoleRequestBody extends ExternalSourceRequestBody -{ - private PersonRoleProperties properties = null; - - - /** - * Default constructor - */ - public PersonRoleRequestBody() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public PersonRoleRequestBody(PersonRoleRequestBody template) - { - super(template); - - if (template != null) - { - properties = template.getProperties(); - } - } - - - /** - * Return the properties for this person role. - * - * @return properties bean - */ - public PersonRoleProperties getProperties() - { - return properties; - } - - - /** - * Set up the properties for this person role. - * - * @param properties properties bean - */ - public void setProperties(PersonRoleProperties properties) - { - this.properties = properties; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "PersonRoleRequestBody{" + - "properties=" + properties + - ", externalSourceGUID='" + getExternalSourceGUID() + '\'' + - ", externalSourceName='" + getExternalSourceName() + '\'' + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - PersonRoleRequestBody that = (PersonRoleRequestBody) objectToCompare; - return Objects.equals(properties, that.properties); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), properties); - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/PersonRoleResponse.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/PersonRoleResponse.java deleted file mode 100644 index e740fab08e7..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/PersonRoleResponse.java +++ /dev/null @@ -1,136 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.PersonRoleElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * PersonRoleResponse is the response structure used on the OMAS REST API calls that return a - * PersonRoleElement object as a response. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class PersonRoleResponse extends CommunityProfileOMASAPIResponse -{ - private PersonRoleElement element = null; - - - /** - * Default constructor - */ - public PersonRoleResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public PersonRoleResponse(PersonRoleResponse template) - { - super(template); - - if (template != null) - { - this.element = template.getElement(); - } - } - - - /** - * Return the element result. - * - * @return details of person role - */ - public PersonRoleElement getElement() - { - return element; - } - - - /** - * Set up the element result. - * - * @param element details of person role - */ - public void setElement(PersonRoleElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "PersonRoleResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof PersonRoleResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - PersonRoleResponse that = (PersonRoleResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/ReferenceableRequestBody.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/ReferenceableRequestBody.java index 39c6721a750..313c656b742 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/ReferenceableRequestBody.java +++ b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/ReferenceableRequestBody.java @@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ReferenceableProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ReferenceableProperties; import java.util.Objects; diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/RelatedElementListResponse.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/RelatedElementListResponse.java deleted file mode 100644 index 954179afb93..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/RelatedElementListResponse.java +++ /dev/null @@ -1,146 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.communityprofile.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.RelatedElement; - -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * RelatedElementListResponse is a response object for passing back a list of relatedElement objects. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class RelatedElementListResponse extends CommunityProfileOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public RelatedElementListResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public RelatedElementListResponse(RelatedElementListResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return elementList; - } - } - - - /** - * Set up the list of metadata elements to return. - * - * @param elements result object - */ - public void setElementList(List elements) - { - this.elementList = elements; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "RelatedElementListResponse{" + - "element=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - RelatedElementListResponse that = (RelatedElementListResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/RelationshipElementResponse.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/RelationshipElementResponse.java index 8cb41cb9735..7705651b9ca 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/RelationshipElementResponse.java +++ b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/RelationshipElementResponse.java @@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.RelationshipElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.RelationshipElement; import java.util.Arrays; import java.util.Objects; diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/RelationshipElementsResponse.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/RelationshipElementsResponse.java index 2fb764ab3be..c6b823bb268 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/RelationshipElementsResponse.java +++ b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/RelationshipElementsResponse.java @@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.RelationshipElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.RelationshipElement; import java.util.ArrayList; import java.util.Arrays; diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/RelationshipRequestBody.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/RelationshipRequestBody.java index f3140d8857f..1e200d1dce3 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/RelationshipRequestBody.java +++ b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/RelationshipRequestBody.java @@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.communityprofile.properties.RelationshipProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; import java.util.Objects; diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/SecurityGroupResponse.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/SecurityGroupResponse.java deleted file mode 100644 index b7ddc5e7137..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/SecurityGroupResponse.java +++ /dev/null @@ -1,137 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.communityprofile.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.SecurityGroupElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * SecurityGroupResponse is the response structure used on the OMAS REST API calls that return the properties - * for a security group. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class SecurityGroupResponse extends CommunityProfileOMASAPIResponse -{ - private SecurityGroupElement element = null; - - - /** - * Default constructor - */ - public SecurityGroupResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public SecurityGroupResponse(SecurityGroupResponse template) - { - super(template); - - if (template != null) - { - this.element = template.getElement(); - } - } - - - /** - * Return the result. - * - * @return bean - */ - public SecurityGroupElement getElement() - { - return element; - } - - - /** - * Set up the result. - * - * @param element bean - */ - public void setElement(SecurityGroupElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "SecurityGroupResponse{" + - "datafile=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof SecurityGroupResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - SecurityGroupResponse that = (SecurityGroupResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(element); - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/SecurityGroupsResponse.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/SecurityGroupsResponse.java deleted file mode 100644 index b1e83534ba7..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/SecurityGroupsResponse.java +++ /dev/null @@ -1,147 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.communityprofile.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.SecurityGroupElement; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * SecurityGroupsResponse is a response object for passing back a a list of security groups - * or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class SecurityGroupsResponse extends CommunityProfileOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public SecurityGroupsResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public SecurityGroupsResponse(SecurityGroupsResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elementList); - } - } - - - /** - * Set up the metadata element to return. - * - * @param elementList result object - */ - public void setElementList(List elementList) - { - this.elementList = elementList; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "SecurityGroupsResponse{" + - "elementList=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - SecurityGroupsResponse that = (SecurityGroupsResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/UserIdentityListResponse.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/UserIdentityListResponse.java index 0dda7a99b99..eb43591afc6 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/UserIdentityListResponse.java +++ b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/UserIdentityListResponse.java @@ -5,7 +5,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.UserIdentityElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.UserIdentityElement; import java.util.Arrays; import java.util.List; diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/UserIdentityResponse.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/UserIdentityResponse.java index 961a4c1d877..d0e7220f4ad 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/UserIdentityResponse.java +++ b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/UserIdentityResponse.java @@ -5,7 +5,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.UserIdentityElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.UserIdentityElement; import java.util.Arrays; import java.util.Objects; diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/ValidValueListResponse.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/ValidValueListResponse.java index eaed84bf1a9..f0894fd9264 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/ValidValueListResponse.java +++ b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/ValidValueListResponse.java @@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.ValidValueElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ValidValueElement; import java.util.Arrays; import java.util.List; diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/ValidValueResponse.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/ValidValueResponse.java index 9c0f5ada9fc..29aab05934b 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/ValidValueResponse.java +++ b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/ValidValueResponse.java @@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.ValidValueElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ValidValueElement; import java.util.Arrays; import java.util.Objects; diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/test/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/ClassificationTest.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/test/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/ClassificationTest.java index 6b80ec0740d..cef2ba41199 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/test/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/ClassificationTest.java +++ b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/test/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/ClassificationTest.java @@ -3,7 +3,7 @@ package org.odpi.openmetadata.accessservices.communityprofile.metadataelements; import com.fasterxml.jackson.databind.ObjectMapper; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementClassification; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementClassification; import org.testng.annotations.Test; import java.util.HashMap; diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-client/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/client/CollectionManagement.java b/open-metadata-implementation/access-services/community-profile/community-profile-client/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/client/CollectionManagement.java index 3e315a23aa6..9039e0e7f46 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-client/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/client/CollectionManagement.java +++ b/open-metadata-implementation/access-services/community-profile/community-profile-client/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/client/CollectionManagement.java @@ -4,21 +4,21 @@ import org.odpi.openmetadata.accessservices.communityprofile.api.CollectionManagementInterface; import org.odpi.openmetadata.accessservices.communityprofile.client.rest.CommunityProfileRESTClient; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.CollectionElement; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.CollectionMember; -import org.odpi.openmetadata.accessservices.communityprofile.properties.CollectionFolderProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.CollectionMembershipProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.CollectionProperties; -import org.odpi.openmetadata.accessservices.communityprofile.rest.CollectionListResponse; -import org.odpi.openmetadata.accessservices.communityprofile.rest.CollectionMemberListResponse; -import org.odpi.openmetadata.accessservices.communityprofile.rest.CollectionMemberResponse; -import org.odpi.openmetadata.accessservices.communityprofile.rest.CollectionResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.CollectionMembersResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.CollectionsResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.CollectionMemberResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.CollectionResponse; import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.CollectionElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.CollectionMember; +import org.odpi.openmetadata.frameworks.openmetadata.properties.collections.CollectionFolderProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.collections.CollectionMembershipProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.collections.CollectionProperties; import java.util.List; @@ -157,8 +157,8 @@ public String createCollection(String userId, String externalSourceGUID, String externalSourceName, CollectionProperties collectionProperties) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException + UserNotAuthorizedException, + PropertyServerException { final String methodName = "createCollection"; final String propertiesParameterName = "collectionProperties"; @@ -380,13 +380,13 @@ public List findCollections(String userId, requestBody.setSearchString(searchString); requestBody.setSearchStringParameterName(searchStringParameterName); - CollectionListResponse restResult = restClient.callCollectionListPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - startFrom, - validatedPageSize); + CollectionsResponse restResult = restClient.callCollectionListPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + startFrom, + validatedPageSize); return restResult.getElements(); } @@ -429,13 +429,13 @@ public List getCollectionsByName(String userId, requestBody.setName(name); requestBody.setNamePropertyName(nameParameterName); - CollectionListResponse restResult = restClient.callCollectionListPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - startFrom, - validatedPageSize); + CollectionsResponse restResult = restClient.callCollectionListPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + startFrom, + validatedPageSize); return restResult.getElements(); } @@ -474,12 +474,12 @@ public List getCollections(String userId, final String urlTemplate = serverPlatformURLRoot + collectionURLTemplatePrefix + "?startFrom={2}&pageSize={3}"; - CollectionListResponse restResult = restClient.callCollectionListGetRESTCall(methodName, - urlTemplate, - serverName, - userId, - startFrom, - validatedPageSize); + CollectionsResponse restResult = restClient.callCollectionListGetRESTCall(methodName, + urlTemplate, + serverName, + userId, + startFrom, + validatedPageSize); return restResult.getElements(); } @@ -516,13 +516,13 @@ public List getCollectionMembers(String userId, final String urlTemplate = serverPlatformURLRoot + collectionURLTemplatePrefix + "/{2}/membership?startFrom={3}&pageSize={4}"; - CollectionMemberListResponse restResult = restClient.callCollectionMemberListGetRESTCall(methodName, - urlTemplate, - serverName, - userId, - collectionGUID, - Integer.toString(startFrom), - Integer.toString(pageSize)); + CollectionMembersResponse restResult = restClient.callCollectionMemberListGetRESTCall(methodName, + urlTemplate, + serverName, + userId, + collectionGUID, + Integer.toString(startFrom), + Integer.toString(pageSize)); return restResult.getElements(); } @@ -597,13 +597,13 @@ public List getElementsCollections(String userId, final String urlTemplate = serverPlatformURLRoot + baseURLTemplatePrefix + "/elements/{2}/collections?startFrom={3}&pageSize={4}"; - CollectionListResponse restResult = restClient.callCollectionListGetRESTCall(methodName, - urlTemplate, - serverName, - userId, - elementGUID, - Integer.toString(startFrom), - Integer.toString(pageSize)); + CollectionsResponse restResult = restClient.callCollectionListGetRESTCall(methodName, + urlTemplate, + serverName, + userId, + elementGUID, + Integer.toString(startFrom), + Integer.toString(pageSize)); return restResult.getElements(); } diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-client/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/client/CommunityManagement.java b/open-metadata-implementation/access-services/community-profile/community-profile-client/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/client/CommunityManagement.java index ca536a5baff..03b50f5a258 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-client/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/client/CommunityManagement.java +++ b/open-metadata-implementation/access-services/community-profile/community-profile-client/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/client/CommunityManagement.java @@ -4,20 +4,16 @@ import org.odpi.openmetadata.accessservices.communityprofile.api.CommunityManagementInterface; import org.odpi.openmetadata.accessservices.communityprofile.client.rest.CommunityProfileRESTClient; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.CommunityElement; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.PersonRoleElement; -import org.odpi.openmetadata.accessservices.communityprofile.properties.CommunityMembershipProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.CommunityProperties; import org.odpi.openmetadata.accessservices.communityprofile.properties.TemplateProperties; -import org.odpi.openmetadata.accessservices.communityprofile.rest.CommunityResponse; -import org.odpi.openmetadata.accessservices.communityprofile.rest.CommunityListResponse; -import org.odpi.openmetadata.accessservices.communityprofile.rest.PersonRoleListResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.CommunityElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.PersonRoleElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.communities.CommunityMembershipProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.communities.CommunityProperties; import java.util.List; @@ -369,13 +365,13 @@ public List findCommunities(String userId, requestBody.setSearchString(searchString); requestBody.setSearchStringParameterName(searchStringParameterName); - CommunityListResponse restResult = restClient.callCommunityListPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - startFrom, - validatedPageSize); + CommunitiesResponse restResult = restClient.callCommunitiesPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + startFrom, + validatedPageSize); return restResult.getElements(); } @@ -418,13 +414,13 @@ public List getCommunitiesByName(String userId, requestBody.setName(name); requestBody.setNamePropertyName(nameParameterName); - CommunityListResponse restResult = restClient.callCommunityListPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - startFrom, - validatedPageSize); + CommunitiesResponse restResult = restClient.callCommunitiesPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + startFrom, + validatedPageSize); return restResult.getElements(); } @@ -457,12 +453,12 @@ public List getCommunities(String userId, final String urlTemplate = serverPlatformURLRoot + communityURLTemplatePrefix + "?startFrom={2}&pageSize={3}"; - CommunityListResponse restResult = restClient.callCommunityListGetRESTCall(methodName, - urlTemplate, - serverName, - userId, - startFrom, - validatedPageSize); + CommunitiesResponse restResult = restClient.callCommunitiesGetRESTCall(methodName, + urlTemplate, + serverName, + userId, + startFrom, + validatedPageSize); return restResult.getElements(); } @@ -499,13 +495,13 @@ public List getRolesForCommunity(String userId, final String urlTemplate = serverPlatformURLRoot + baseURLTemplatePrefix + "/person-roles/by-community/{2}?startFrom={3}&pageSize={4}"; - PersonRoleListResponse restResult = restClient.callPersonRoleListGetRESTCall(methodName, - urlTemplate, - serverName, - userId, - communityGUID, - Integer.toString(startFrom), - Integer.toString(pageSize)); + PersonRolesResponse restResult = restClient.callPersonRolesGetRESTCall(methodName, + urlTemplate, + serverName, + userId, + communityGUID, + Integer.toString(startFrom), + Integer.toString(pageSize)); return restResult.getElements(); } diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-client/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/client/CommunityProfileBaseClient.java b/open-metadata-implementation/access-services/community-profile/community-profile-client/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/client/CommunityProfileBaseClient.java index d36ddd886c8..e109a8f7279 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-client/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/client/CommunityProfileBaseClient.java +++ b/open-metadata-implementation/access-services/community-profile/community-profile-client/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/client/CommunityProfileBaseClient.java @@ -4,27 +4,22 @@ import org.odpi.openmetadata.accessservices.communityprofile.api.RelatedElementsManagementInterface; import org.odpi.openmetadata.accessservices.communityprofile.client.rest.CommunityProfileRESTClient; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.RelatedElement; -import org.odpi.openmetadata.accessservices.communityprofile.properties.AssignmentScopeProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ClassificationProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ReferenceableProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.RelationshipProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ResourceListProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.StakeholderProperties; import org.odpi.openmetadata.accessservices.communityprofile.properties.TemplateProperties; -import org.odpi.openmetadata.accessservices.communityprofile.rest.ClassificationRequestBody; -import org.odpi.openmetadata.accessservices.communityprofile.rest.RelatedElementListResponse; -import org.odpi.openmetadata.accessservices.communityprofile.rest.ExternalSourceRequestBody; -import org.odpi.openmetadata.accessservices.communityprofile.rest.ReferenceableRequestBody; -import org.odpi.openmetadata.accessservices.communityprofile.rest.RelationshipRequestBody; import org.odpi.openmetadata.accessservices.communityprofile.rest.TemplateRequestBody; import org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; import org.odpi.openmetadata.frameworks.governanceaction.search.PropertyHelper; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.RelatedElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ClassificationProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ReferenceableProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.AssignmentScopeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.projects.StakeholderProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.resources.ResourceListProperties; import java.util.List; @@ -734,15 +729,15 @@ List getRelatedElements(String userId, invalidParameterHandler.validateUserId(userId, methodName); invalidParameterHandler.validateGUID(startingElementGUID, startingElementGUIDParameterName, methodName); - RelatedElementListResponse restResult = restClient.callRelatedElementListGetRESTCall(methodName, - urlTemplate, - serverName, - userId, - startingElementGUID, - Integer.toString(startFrom), - Integer.toString(pageSize)); + RelatedElementsResponse restResult = restClient.callRelatedElementsGetRESTCall(methodName, + urlTemplate, + serverName, + userId, + startingElementGUID, + Integer.toString(startFrom), + Integer.toString(pageSize)); - return restResult.getElementList(); + return restResult.getElements(); } diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-client/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/client/LocationManagement.java b/open-metadata-implementation/access-services/community-profile/community-profile-client/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/client/LocationManagement.java index f9792900999..14b2d2452d2 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-client/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/client/LocationManagement.java +++ b/open-metadata-implementation/access-services/community-profile/community-profile-client/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/client/LocationManagement.java @@ -4,18 +4,18 @@ import org.odpi.openmetadata.accessservices.communityprofile.api.LocationManagementInterface; import org.odpi.openmetadata.accessservices.communityprofile.client.rest.CommunityProfileRESTClient; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.LocationElement; -import org.odpi.openmetadata.accessservices.communityprofile.properties.AdjacentLocationProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.AssetLocationProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.LocationProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.NestedLocationProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ProfileLocationProperties; +import org.odpi.openmetadata.commonservices.ffdc.rest.LocationsResponse; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.LocationElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.locations.AdjacentLocationProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.locations.AssetLocationProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.locations.LocationProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.locations.NestedLocationProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.locations.ProfileLocationProperties; import org.odpi.openmetadata.accessservices.communityprofile.properties.TemplateProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.DigitalLocationProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.FixedLocationProperties; -import org.odpi.openmetadata.accessservices.communityprofile.rest.LocationListResponse; -import org.odpi.openmetadata.accessservices.communityprofile.rest.LocationResponse; -import org.odpi.openmetadata.accessservices.communityprofile.properties.SecureLocationProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.locations.DigitalLocationProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.locations.FixedLocationProperties; +import org.odpi.openmetadata.commonservices.ffdc.rest.LocationResponse; +import org.odpi.openmetadata.frameworks.openmetadata.properties.locations.SecureLocationProperties; import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; @@ -750,13 +750,13 @@ public List findLocations(String userId, requestBody.setSearchString(searchString); requestBody.setSearchStringParameterName(parameterName); - LocationListResponse restResult = restClient.callLocationsPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - startFrom, - validatedPageSize); + LocationsResponse restResult = restClient.callLocationsPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + startFrom, + validatedPageSize); return restResult.getElements(); } @@ -799,13 +799,13 @@ public List getLocationsByName(String userId, requestBody.setName(name); requestBody.setNamePropertyName(nameParameter); - LocationListResponse restResult = restClient.callLocationsPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - startFrom, - validatedPageSize); + LocationsResponse restResult = restClient.callLocationsPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + startFrom, + validatedPageSize); return restResult.getElements(); } @@ -843,13 +843,13 @@ public List getAdjacentLocations(String userId, final String urlTemplate = serverPlatformURLRoot + "/servers/{0}/open-metadata/access-services/community-profile/users/{1}/locations/{2}/has-peer-locations?startFrom={3}&pageSize={4}"; - LocationListResponse restResult = restClient.callLocationsGetRESTCall(methodName, - urlTemplate, - serverName, - userId, - locationGUID, - startFrom, - validatedPageSize); + LocationsResponse restResult = restClient.callLocationsGetRESTCall(methodName, + urlTemplate, + serverName, + userId, + locationGUID, + startFrom, + validatedPageSize); return restResult.getElements(); } @@ -886,13 +886,13 @@ public List getNestedLocations(String userId, final String urlTemplate = serverPlatformURLRoot + "/servers/{0}/open-metadata/access-services/community-profile/users/{1}/locations/{2}/has-nested-locations?startFrom={3}&pageSize={4}"; - LocationListResponse restResult = restClient.callLocationsGetRESTCall(methodName, - urlTemplate, - serverName, - userId, - locationGUID, - startFrom, - validatedPageSize); + LocationsResponse restResult = restClient.callLocationsGetRESTCall(methodName, + urlTemplate, + serverName, + userId, + locationGUID, + startFrom, + validatedPageSize); return restResult.getElements(); } @@ -929,13 +929,13 @@ public List getGroupingLocations(String userId, final String urlTemplate = serverPlatformURLRoot + "/servers/{0}/open-metadata/access-services/community-profile/users/{1}/locations/{2}/has-grouping-locations?startFrom={3}&pageSize={4}"; - LocationListResponse restResult = restClient.callLocationsGetRESTCall(methodName, - urlTemplate, - serverName, - userId, - locationGUID, - startFrom, - validatedPageSize); + LocationsResponse restResult = restClient.callLocationsGetRESTCall(methodName, + urlTemplate, + serverName, + userId, + locationGUID, + startFrom, + validatedPageSize); return restResult.getElements(); } @@ -972,13 +972,13 @@ public List getLocationsByProfile(String userId, final String urlTemplate = serverPlatformURLRoot + "/servers/{0}/open-metadata/access-services/community-profile/users/{1}/locations/by-actor-profile/{2}?startFrom={3}&pageSize={4}"; - LocationListResponse restResult = restClient.callLocationsGetRESTCall(methodName, - urlTemplate, - serverName, - userId, - actorProfileGUID, - startFrom, - validatedPageSize); + LocationsResponse restResult = restClient.callLocationsGetRESTCall(methodName, + urlTemplate, + serverName, + userId, + actorProfileGUID, + startFrom, + validatedPageSize); return restResult.getElements(); } @@ -1016,13 +1016,13 @@ public List getKnownLocationsForAsset(String userId, final String urlTemplate = serverPlatformURLRoot + "/servers/{0}/open-metadata/access-services/community-profile/users/{1}/locations/by-asset/{2}?startFrom={3}&pageSize={4}"; - LocationListResponse restResult = restClient.callLocationsGetRESTCall(methodName, - urlTemplate, - serverName, - userId, - assetGUID, - startFrom, - validatedPageSize); + LocationsResponse restResult = restClient.callLocationsGetRESTCall(methodName, + urlTemplate, + serverName, + userId, + assetGUID, + startFrom, + validatedPageSize); return restResult.getElements(); } @@ -1056,12 +1056,12 @@ public List getLocations(String userId, final String urlTemplate = serverPlatformURLRoot + "/servers/{0}/open-metadata/access-services/community-profile/users/{1}/locations?startFrom={2}&pageSize={3}"; - LocationListResponse restResult = restClient.callLocationsGetRESTCall(methodName, - urlTemplate, - serverName, - userId, - startFrom, - validatedPageSize); + LocationsResponse restResult = restClient.callLocationsGetRESTCall(methodName, + urlTemplate, + serverName, + userId, + startFrom, + validatedPageSize); return restResult.getElements(); } diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-client/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/client/MetadataSourceClient.java b/open-metadata-implementation/access-services/community-profile/community-profile-client/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/client/MetadataSourceClient.java index dd28366dc1b..05e9882d20b 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-client/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/client/MetadataSourceClient.java +++ b/open-metadata-implementation/access-services/community-profile/community-profile-client/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/client/MetadataSourceClient.java @@ -6,9 +6,9 @@ import org.odpi.openmetadata.accessservices.communityprofile.api.MetadataSourceInterface; import org.odpi.openmetadata.accessservices.communityprofile.client.rest.CommunityProfileRESTClient; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.MetadataSourceElement; -import org.odpi.openmetadata.accessservices.communityprofile.properties.MetadataSourceProperties; -import org.odpi.openmetadata.accessservices.communityprofile.rest.MetadataSourceResponse; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.MetadataSourceElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities.MetadataSourceProperties; +import org.odpi.openmetadata.commonservices.ffdc.rest.MetadataSourceResponse; import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; import org.odpi.openmetadata.commonservices.ffdc.rest.NullRequestBody; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-client/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/client/OrganizationManagement.java b/open-metadata-implementation/access-services/community-profile/community-profile-client/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/client/OrganizationManagement.java index 94d5d39c4c6..25a199ea6da 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-client/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/client/OrganizationManagement.java +++ b/open-metadata-implementation/access-services/community-profile/community-profile-client/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/client/OrganizationManagement.java @@ -5,34 +5,16 @@ import org.odpi.openmetadata.accessservices.communityprofile.api.OrganizationManagementInterface; import org.odpi.openmetadata.accessservices.communityprofile.client.rest.CommunityProfileRESTClient; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.ActorProfileElement; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.PersonRoleAppointee; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.PersonRoleElement; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ActorProfileProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.AppointmentProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ContactMethodProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ContributionRecord; -import org.odpi.openmetadata.accessservices.communityprofile.properties.PersonRoleProperties; -import org.odpi.openmetadata.accessservices.communityprofile.rest.ActorProfileListResponse; -import org.odpi.openmetadata.accessservices.communityprofile.rest.ActorProfileRequestBody; -import org.odpi.openmetadata.accessservices.communityprofile.rest.ActorProfileResponse; -import org.odpi.openmetadata.accessservices.communityprofile.rest.AppointmentRequestBody; -import org.odpi.openmetadata.accessservices.communityprofile.rest.ContactMethodRequestBody; -import org.odpi.openmetadata.accessservices.communityprofile.rest.EffectiveDatesRequestBody; -import org.odpi.openmetadata.accessservices.communityprofile.rest.EffectiveTimeRequestBody; -import org.odpi.openmetadata.accessservices.communityprofile.rest.ExternalSourceRequestBody; -import org.odpi.openmetadata.accessservices.communityprofile.rest.PersonRoleAppointeeListResponse; -import org.odpi.openmetadata.accessservices.communityprofile.rest.PersonRoleListResponse; -import org.odpi.openmetadata.accessservices.communityprofile.rest.PersonRoleRequestBody; -import org.odpi.openmetadata.accessservices.communityprofile.rest.PersonRoleResponse; -import org.odpi.openmetadata.accessservices.communityprofile.rest.TeamPlayerRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ActorProfileElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.Appointee; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.PersonRoleAppointee; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.PersonRoleElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.*; import java.util.Date; import java.util.List; @@ -567,13 +549,13 @@ public List getActorProfilesByName(String userId, requestBody.setNamePropertyName(namePropertyName); requestBody.setNameParameterName(nameParameterName); - ActorProfileListResponse restResult = restClient.callActorProfileListPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - Integer.toString(startFrom), - Integer.toString(pageSize)); + ActorProfilesResponse restResult = restClient.callActorProfilesPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + Integer.toString(startFrom), + Integer.toString(pageSize)); return restResult.getElements(); } @@ -605,12 +587,12 @@ public List getActorProfiles(String userId, final String urlTemplate = serverPlatformURLRoot + baseURLTemplatePrefix + "/profiles?startFrom={2}&pageSize={3}"; - ActorProfileListResponse restResult = restClient.callActorProfileListGetRESTCall(methodName, - urlTemplate, - serverName, - userId, - Integer.toString(startFrom), - Integer.toString(pageSize)); + ActorProfilesResponse restResult = restClient.callActorProfilesGetRESTCall(methodName, + urlTemplate, + serverName, + userId, + Integer.toString(startFrom), + Integer.toString(pageSize)); return restResult.getElements(); } @@ -647,13 +629,13 @@ public List getActorProfilesByLocation(String userId, final String urlTemplate = serverPlatformURLRoot + baseURLTemplatePrefix + "/profiles/by-location/{2}?startFrom={3}&pageSize={4}"; - ActorProfileListResponse restResult = restClient.callActorProfileListGetRESTCall(methodName, - urlTemplate, - serverName, - userId, - locationGUID, - Integer.toString(startFrom), - Integer.toString(pageSize)); + ActorProfilesResponse restResult = restClient.callActorProfilesGetRESTCall(methodName, + urlTemplate, + serverName, + userId, + locationGUID, + Integer.toString(startFrom), + Integer.toString(pageSize)); return restResult.getElements(); } @@ -694,13 +676,13 @@ public List findActorProfiles(String userId, requestBody.setSearchString(searchString); requestBody.setSearchStringParameterName(searchStringParameterName); - ActorProfileListResponse restResult = restClient.callActorProfileListPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - Integer.toString(startFrom), - Integer.toString(pageSize)); + ActorProfilesResponse restResult = restClient.callActorProfilesPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + Integer.toString(startFrom), + Integer.toString(pageSize)); return restResult.getElements(); } @@ -898,13 +880,13 @@ public String linkPersonRoleToProfile(String userId, * @throws UserNotAuthorizedException security access problem */ @Override - public List getAppointees(String userId, - String personRoleGUID, - Date effectiveTime, - int startFrom, - int pageSize) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException + public List getAppointees(String userId, + String personRoleGUID, + Date effectiveTime, + int startFrom, + int pageSize) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException { final String methodName = "getAppointees"; final String personRoleGUIDParameterName = "personRoleGUID"; @@ -918,14 +900,14 @@ public List getAppointees(String userId, requestBody.setEffectiveTime(effectiveTime); - PersonRoleAppointeeListResponse restResult = restClient.callPersonRoleAppointeeListPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - personRoleGUID, - Integer.toString(startFrom), - Integer.toString(pageSize)); + AppointeesResponse restResult = restClient.callAppointeesPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + personRoleGUID, + Integer.toString(startFrom), + Integer.toString(pageSize)); return restResult.getElements(); } @@ -1177,13 +1159,13 @@ public List getPersonRolesByName(String userId, requestBody.setNamePropertyName(namePropertyName); requestBody.setNameParameterName(nameParameterName); - PersonRoleListResponse restResult = restClient.callPersonRoleListPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - Integer.toString(startFrom), - Integer.toString(pageSize)); + PersonRolesResponse restResult = restClient.callPersonRolesPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + Integer.toString(startFrom), + Integer.toString(pageSize)); return restResult.getElements(); } @@ -1219,13 +1201,13 @@ public List getLeadershipRolesForTeam(String userId, final String urlTemplate = serverPlatformURLRoot + baseURLTemplatePrefix + "/person-roles/by-team/{2}/leadership?startFrom={3}&pageSize={4}"; - PersonRoleListResponse restResult = restClient.callPersonRoleListGetRESTCall(methodName, - urlTemplate, - serverName, - userId, - teamGUID, - Integer.toString(startFrom), - Integer.toString(pageSize)); + PersonRolesResponse restResult = restClient.callPersonRolesGetRESTCall(methodName, + urlTemplate, + serverName, + userId, + teamGUID, + Integer.toString(startFrom), + Integer.toString(pageSize)); return restResult.getElements(); } @@ -1261,13 +1243,13 @@ public List getMembershipRolesForTeam(String userId, final String urlTemplate = serverPlatformURLRoot + baseURLTemplatePrefix + "/person-roles/by-team/{2}/membership?startFrom={3}&pageSize={4}"; - PersonRoleListResponse restResult = restClient.callPersonRoleListGetRESTCall(methodName, - urlTemplate, - serverName, - userId, - teamGUID, - Integer.toString(startFrom), - Integer.toString(pageSize)); + PersonRolesResponse restResult = restClient.callPersonRolesGetRESTCall(methodName, + urlTemplate, + serverName, + userId, + teamGUID, + Integer.toString(startFrom), + Integer.toString(pageSize)); return restResult.getElements(); } @@ -1309,13 +1291,13 @@ public List findPersonRoles(String userId, requestBody.setSearchString(searchString); requestBody.setSearchStringParameterName(searchStringParameterName); - PersonRoleListResponse restResult = restClient.callPersonRoleListPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - Integer.toString(startFrom), - Integer.toString(pageSize)); + PersonRolesResponse restResult = restClient.callPersonRolesPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + Integer.toString(startFrom), + Integer.toString(pageSize)); return restResult.getElements(); } diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-client/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/client/SecurityGroupManagement.java b/open-metadata-implementation/access-services/community-profile/community-profile-client/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/client/SecurityGroupManagement.java index 01b20313547..9e1c9f31a81 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-client/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/client/SecurityGroupManagement.java +++ b/open-metadata-implementation/access-services/community-profile/community-profile-client/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/client/SecurityGroupManagement.java @@ -6,11 +6,11 @@ import org.odpi.openmetadata.accessservices.communityprofile.api.SecurityGroupInterface; import org.odpi.openmetadata.accessservices.communityprofile.client.rest.CommunityProfileRESTClient; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.SecurityGroupElement; -import org.odpi.openmetadata.accessservices.communityprofile.properties.SecurityGroupProperties; -import org.odpi.openmetadata.accessservices.communityprofile.rest.ElementStubsResponse; -import org.odpi.openmetadata.accessservices.communityprofile.rest.SecurityGroupResponse; -import org.odpi.openmetadata.accessservices.communityprofile.rest.SecurityGroupsResponse; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.SecurityGroupElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.security.SecurityGroupProperties; +import org.odpi.openmetadata.commonservices.ffdc.rest.ElementStubsResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.SecurityGroupResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.SecurityGroupsResponse; import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; import org.odpi.openmetadata.commonservices.ffdc.rest.NullRequestBody; import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; @@ -18,7 +18,7 @@ import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementStub; import java.util.List; @@ -295,7 +295,7 @@ public List getSecurityGroupsForDistinguishedName(String u startFrom, queryPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -386,7 +386,7 @@ public List findSecurityGroups(String userId, startFrom, queryPageSize); - return restResult.getElementList(); + return restResult.getElements(); } diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-client/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/client/ToDoActionManagement.java b/open-metadata-implementation/access-services/community-profile/community-profile-client/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/client/ToDoActionManagement.java index e3fb5a3f899..7ac6856b2ff 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-client/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/client/ToDoActionManagement.java +++ b/open-metadata-implementation/access-services/community-profile/community-profile-client/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/client/ToDoActionManagement.java @@ -4,18 +4,18 @@ package org.odpi.openmetadata.accessservices.communityprofile.client; import org.odpi.openmetadata.accessservices.communityprofile.api.ToDoManagementInterface; -import org.odpi.openmetadata.accessservices.communityprofile.client.converters.ToDoConverter; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.ToDoElement; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ActionTargetProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.NewActionTargetProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ToDoProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ToDoElement; +import org.odpi.openmetadata.frameworks.governanceaction.converters.ToDoConverter; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actions.ToDoActionTargetProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actions.NewToDoActionTargetProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actions.ToDoProperties; import org.odpi.openmetadata.frameworks.openmetadata.enums.ToDoStatus; import org.odpi.openmetadata.adminservices.configuration.registration.AccessServiceDescription; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStatus; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ElementStatus; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.frameworks.governanceaction.properties.OpenMetadataElement; @@ -147,7 +147,7 @@ public String createToDo(String userId, String originatorGUID, String actionSponsorGUID, String assignToActorGUID, - List newActionTargetProperties, + List newActionTargetProperties, ToDoProperties properties) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException @@ -224,7 +224,7 @@ public String createToDo(String userId, if (newActionTargetProperties != null) { - for (NewActionTargetProperties newActionTarget : newActionTargetProperties) + for (NewToDoActionTargetProperties newActionTarget : newActionTargetProperties) { if (newActionTarget != null) { @@ -310,9 +310,9 @@ public void updateToDo(String userId, public void updateActionTargetProperties(String userId, String actionTargetGUID, boolean isMergeUpdate, - ActionTargetProperties actionTargetProperties) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException + ToDoActionTargetProperties actionTargetProperties) throws InvalidParameterException, + PropertyServerException, + UserNotAuthorizedException { final String methodName = "updateActionTargetProperties"; final String propertiesName = "actionTargetProperties"; @@ -878,7 +878,7 @@ private ElementProperties getToDoProperties(ToDoProperties toDoProperties) * @param actionTargetProperties supplied to do properties * @return element properties */ - private ElementProperties getActionTargetProperties(ActionTargetProperties actionTargetProperties) + private ElementProperties getActionTargetProperties(ToDoActionTargetProperties actionTargetProperties) { if (actionTargetProperties != null) { diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-client/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/client/UserIdentityManagement.java b/open-metadata-implementation/access-services/community-profile/community-profile-client/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/client/UserIdentityManagement.java index bf770ac7a9b..29d1f869abf 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-client/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/client/UserIdentityManagement.java +++ b/open-metadata-implementation/access-services/community-profile/community-profile-client/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/client/UserIdentityManagement.java @@ -6,16 +6,17 @@ import org.odpi.openmetadata.accessservices.communityprofile.api.UserIdentityManagementInterface; import org.odpi.openmetadata.accessservices.communityprofile.client.rest.CommunityProfileRESTClient; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.UserIdentityElement; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ProfileIdentityProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.UserIdentityProperties; -import org.odpi.openmetadata.accessservices.communityprofile.rest.*; import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; +import org.odpi.openmetadata.commonservices.ffdc.rest.UserIdentitiesResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.UserIdentityResponse; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.UserIdentityElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.ProfileIdentityProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.UserIdentityProperties; import java.util.List; @@ -393,13 +394,13 @@ public List findUserIdentities(String userId, requestBody.setSearchString(searchString); requestBody.setSearchStringParameterName(searchStringParameterName); - UserIdentityListResponse restResult = restClient.callUserIdentityListPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - Integer.toString(startFrom), - Integer.toString(pageSize)); + UserIdentitiesResponse restResult = restClient.callUserIdentitiesPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + Integer.toString(startFrom), + Integer.toString(pageSize)); return restResult.getElements(); } @@ -443,13 +444,13 @@ public List getUserIdentitiesByName(String userId, requestBody.setNamePropertyName(namePropertyName); requestBody.setNameParameterName(nameParameterName); - UserIdentityListResponse restResult = restClient.callUserIdentityListPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - Integer.toString(startFrom), - Integer.toString(pageSize)); + UserIdentitiesResponse restResult = restClient.callUserIdentitiesPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + Integer.toString(startFrom), + Integer.toString(pageSize)); return restResult.getElements(); } diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-client/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/client/ValidValueManagement.java b/open-metadata-implementation/access-services/community-profile/community-profile-client/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/client/ValidValueManagement.java index f2f0da2e975..da2fbd06447 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-client/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/client/ValidValueManagement.java +++ b/open-metadata-implementation/access-services/community-profile/community-profile-client/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/client/ValidValueManagement.java @@ -4,21 +4,16 @@ import org.odpi.openmetadata.accessservices.communityprofile.api.ValidValueManagementInterface; import org.odpi.openmetadata.accessservices.communityprofile.client.rest.CommunityProfileRESTClient; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.RelatedElement; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.ValidValueElement; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ReferenceValueAssignmentProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ValidValueAssignmentProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ValidValueMembershipProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ValidValueProperties; -import org.odpi.openmetadata.accessservices.communityprofile.rest.RelatedElementListResponse; -import org.odpi.openmetadata.accessservices.communityprofile.rest.ValidValueListResponse; -import org.odpi.openmetadata.accessservices.communityprofile.rest.ValidValueResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues.ReferenceValueAssignmentProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues.ValidValueAssignmentProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues.ValidValueMembershipProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues.ValidValueProperties; import java.util.List; @@ -485,15 +480,15 @@ public List findValidValues(String userId, requestBody.setSearchString(searchString); requestBody.setSearchStringParameterName(searchStringParameterName); - ValidValueListResponse restResult = restClient.callValidValueListPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - startFrom, - validatedPageSize); + ValidValuesResponse restResult = restClient.callValidValuesPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + startFrom, + validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -534,15 +529,15 @@ public List getValidValuesByName(String userId, requestBody.setName(name); requestBody.setNamePropertyName(nameParameterName); - ValidValueListResponse restResult = restClient.callValidValueListPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - startFrom, - validatedPageSize); + ValidValuesResponse restResult = restClient.callValidValuesPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + startFrom, + validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -573,14 +568,14 @@ public List getAllValidValues(String userId, final String urlTemplate = serverPlatformURLRoot + validValueURLTemplatePrefix + "?startFrom={2}&pageSize={3}"; - ValidValueListResponse restResult = restClient.callValidValueListGetRESTCall(methodName, - urlTemplate, - serverName, - userId, - startFrom, - validatedPageSize); + ValidValuesResponse restResult = restClient.callValidValuesGetRESTCall(methodName, + urlTemplate, + serverName, + userId, + startFrom, + validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -614,15 +609,15 @@ public List getValidValueSetMembers(String userId, final String urlTemplate = serverPlatformURLRoot + validValueURLTemplatePrefix + "/members/{2}?startFrom={3}&pageSize={4}"; - ValidValueListResponse restResult = restClient.callValidValueListGetRESTCall(methodName, - urlTemplate, - serverName, - userId, - validValueSetGUID, - startFrom, - validatedPageSize); + ValidValuesResponse restResult = restClient.callValidValuesGetRESTCall(methodName, + urlTemplate, + serverName, + userId, + validValueSetGUID, + startFrom, + validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -655,7 +650,7 @@ public List getSetsForValidValue(String userId, final String urlTemplate = serverPlatformURLRoot + validValueURLTemplatePrefix + "/sets/{2}?startFrom={3}&pageSize={4}"; - ValidValueListResponse restResult = restClient.callValidValueListGetRESTCall(methodName, + ValidValuesResponse restResult = restClient.callValidValuesGetRESTCall(methodName, urlTemplate, serverName, userId, @@ -663,7 +658,7 @@ public List getSetsForValidValue(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -735,15 +730,15 @@ public List getConsumersOfValidValue(String userId, final String urlTemplate = serverPlatformURLRoot + validValueURLTemplatePrefix + "/{2}/consumers?startFrom={3}&pageSize={4}"; - RelatedElementListResponse restResult = restClient.callRelatedElementListGetRESTCall(methodName, - urlTemplate, - serverName, - userId, - validValueGUID, - startFrom, - validatedPageSize); + RelatedElementsResponse restResult = restClient.callRelatedElementsGetRESTCall(methodName, + urlTemplate, + serverName, + userId, + validValueGUID, + startFrom, + validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -776,14 +771,14 @@ public List getReferenceValues(String userId, final String urlTemplate = serverPlatformURLRoot + validValueURLTemplatePrefix + "/by-reference-value-tags/{2}?startFrom={3}&pageSize={4}"; - ValidValueListResponse restResult = restClient.callValidValueListGetRESTCall(methodName, + ValidValuesResponse restResult = restClient.callValidValuesGetRESTCall(methodName, urlTemplate, serverName, userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -819,15 +814,15 @@ public List getAssigneesOfReferenceValue(String userId, final String urlTemplate = serverPlatformURLRoot + validValueURLTemplatePrefix + "/{2}/by-reference-value-tag-assignees?startFrom={3}&pageSize={4}"; - RelatedElementListResponse restResult = restClient.callRelatedElementListGetRESTCall(methodName, - urlTemplate, - serverName, - userId, - validValueGUID, - startFrom, - validatedPageSize); + RelatedElementsResponse restResult = restClient.callRelatedElementsGetRESTCall(methodName, + urlTemplate, + serverName, + userId, + validValueGUID, + startFrom, + validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-client/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/client/converters/CollectionConverter.java b/open-metadata-implementation/access-services/community-profile/community-profile-client/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/client/converters/CollectionConverter.java deleted file mode 100644 index 75e20787c82..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-client/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/client/converters/CollectionConverter.java +++ /dev/null @@ -1,209 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.client.converters; - -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.CollectionElement; -import org.odpi.openmetadata.accessservices.communityprofile.properties.CollectionProperties; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.governanceaction.properties.OpenMetadataElement; -import org.odpi.openmetadata.frameworks.governanceaction.properties.OpenMetadataRelationship; -import org.odpi.openmetadata.frameworks.governanceaction.properties.RelatedMetadataElement; -import org.odpi.openmetadata.frameworks.governanceaction.search.ElementProperties; -import org.odpi.openmetadata.frameworks.governanceaction.search.PropertyHelper; - -import java.lang.reflect.InvocationTargetException; - - -/** - * CollectionConverter generates a CollectionElement from a Collection entity - */ -public class CollectionConverter extends CommunityProfileConverterBase -{ - /** - * Constructor - * - * @param propertyHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public CollectionConverter(PropertyHelper propertyHelper, - String serviceName, - String serverName) - { - super(propertyHelper, serviceName, serverName); - } - - - /** - * Using the supplied openMetadataElement, return a new instance of the bean. This is used for most beans that have - * a one to one correspondence with the repository instances. - * - * @param beanClass name of the class to create - * @param openMetadataElement openMetadataElement containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - OpenMetadataElement openMetadataElement, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof CollectionElement bean) - { - CollectionProperties collectionProperties = new CollectionProperties(); - - bean.setElementHeader(super.getMetadataElementHeader(beanClass, openMetadataElement, methodName)); - - ElementProperties elementProperties; - - /* - * The initial set of values come from the openMetadataElement. - */ - if (openMetadataElement != null) - { - elementProperties = new ElementProperties(openMetadataElement.getElementProperties()); - - collectionProperties.setQualifiedName(this.removeQualifiedName(elementProperties)); - collectionProperties.setAdditionalProperties(this.removeAdditionalProperties(elementProperties)); - collectionProperties.setName(this.removeName(elementProperties)); - collectionProperties.setDescription(this.removeDescription(elementProperties)); - collectionProperties.setCollectionType(this.removeCollectionType(elementProperties)); - collectionProperties.setEffectiveFrom(openMetadataElement.getEffectiveFromTime()); - collectionProperties.setEffectiveTo(openMetadataElement.getEffectiveToTime()); - - /* - * Any remaining properties are returned in the extended properties. They are - * assumed to be defined in a subtype. - */ - collectionProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); - collectionProperties.setExtendedProperties(this.getRemainingExtendedProperties(elementProperties)); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), OpenMetadataElement.class.getName(), methodName); - } - - bean.setProperties(collectionProperties); - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - - /** - * Using the supplied openMetadataElement, return a new instance of the bean. This is used for most beans that have - * a one to one correspondence with the repository instances. - * - * @param beanClass name of the class to create - * @param relatedMetadataElement the properties of an open metadata element plus details of the relationship used to navigate to it - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - RelatedMetadataElement relatedMetadataElement, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof CollectionElement bean) - { - CollectionProperties collectionProperties = new CollectionProperties(); - OpenMetadataElement openMetadataElement = relatedMetadataElement.getElement(); - - bean.setElementHeader(super.getMetadataElementHeader(beanClass, openMetadataElement, methodName)); - - ElementProperties elementProperties; - - /* - * The initial set of values come from the openMetadataElement. - */ - if (openMetadataElement != null) - { - elementProperties = new ElementProperties(openMetadataElement.getElementProperties()); - - collectionProperties.setQualifiedName(this.removeQualifiedName(elementProperties)); - collectionProperties.setAdditionalProperties(this.removeAdditionalProperties(elementProperties)); - collectionProperties.setName(this.removeName(elementProperties)); - collectionProperties.setDescription(this.removeDescription(elementProperties)); - collectionProperties.setCollectionType(this.removeCollectionType(elementProperties)); - collectionProperties.setEffectiveFrom(openMetadataElement.getEffectiveFromTime()); - collectionProperties.setEffectiveTo(openMetadataElement.getEffectiveToTime()); - - /* - * Any remaining properties are returned in the extended properties. They are - * assumed to be defined in a subtype. - */ - collectionProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); - collectionProperties.setExtendedProperties(this.getRemainingExtendedProperties(elementProperties)); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), OpenMetadataElement.class.getName(), methodName); - } - - bean.setProperties(collectionProperties); - - bean.setRelatedElement(super.getRelatedElement(beanClass, relatedMetadataElement, methodName)); - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an element and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param element element containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @SuppressWarnings(value = "unused") - public B getNewBean(Class beanClass, - OpenMetadataElement element, - OpenMetadataRelationship relationship, - String methodName) throws PropertyServerException - { - B returnBean = this.getNewBean(beanClass, element, methodName); - - if (returnBean instanceof CollectionElement bean) - { - bean.setRelatedElement(super.getRelatedElement(beanClass, element, relationship, methodName)); - } - - return returnBean; - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-client/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/client/converters/CollectionMemberConverter.java b/open-metadata-implementation/access-services/community-profile/community-profile-client/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/client/converters/CollectionMemberConverter.java deleted file mode 100644 index 2d7cc2f4bf0..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-client/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/client/converters/CollectionMemberConverter.java +++ /dev/null @@ -1,145 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.client.converters; - -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.CollectionMember; -import org.odpi.openmetadata.accessservices.communityprofile.properties.CollectionMembershipProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.CollectionMembershipStatus; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; -import org.odpi.openmetadata.frameworks.governanceaction.properties.OpenMetadataElement; -import org.odpi.openmetadata.frameworks.governanceaction.properties.RelatedMetadataElement; -import org.odpi.openmetadata.frameworks.governanceaction.search.ElementProperties; -import org.odpi.openmetadata.frameworks.governanceaction.search.PropertyHelper; - -import java.lang.reflect.InvocationTargetException; - - -/** - * CollectionMemberConverter generates a CollectionMember bean from a RelatedMetadataElement. - */ -public class CollectionMemberConverter extends CommunityProfileConverterBase -{ - /** - * Constructor - * - * @param propertyHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public CollectionMemberConverter(PropertyHelper propertyHelper, - String serviceName, - String serverName) - { - super(propertyHelper, serviceName, serverName); - } - - - /** - * Using the supplied openMetadataElement, return a new instance of the bean. This is used for most beans that have - * a one to one correspondence with the repository instances. - * - * @param beanClass name of the class to create - * @param relatedMetadataElement the properties of an open metadata element plus details of the relationship used to navigate to it - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - RelatedMetadataElement relatedMetadataElement, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof CollectionMember bean) - { - CollectionMembershipProperties membershipProperties = new CollectionMembershipProperties(); - - bean.setElementHeader(super.getMetadataElementHeader(beanClass, - relatedMetadataElement, - relatedMetadataElement.getRelationshipGUID(), - null, - methodName)); - - ElementProperties elementProperties; - - /* - * The initial set of values come from the openMetadataElement. - */ - if (relatedMetadataElement.getRelationshipProperties() != null) - { - elementProperties = new ElementProperties(relatedMetadataElement.getRelationshipProperties()); - - membershipProperties.setMembershipRationale(this.removeMembershipRationale(elementProperties)); - membershipProperties.setCreatedBy(this.removeCreatedBy(elementProperties)); - membershipProperties.setExpression(this.removeExpression(elementProperties)); - membershipProperties.setConfidence(this.removeConfidence(elementProperties)); - membershipProperties.setSteward(this.removeSteward(elementProperties)); - membershipProperties.setStewardTypeName(this.removeStewardTypeName(elementProperties)); - membershipProperties.setStewardPropertyName(this.removeStewardPropertyName(elementProperties)); - membershipProperties.setSource(this.removeSource(elementProperties)); - membershipProperties.setNotes(this.removeNotes(elementProperties)); - membershipProperties.setStatus(this.removeCollectionMemberStatus(elementProperties)); - membershipProperties.setEffectiveFrom(relatedMetadataElement.getEffectiveFromTime()); - membershipProperties.setEffectiveTo(relatedMetadataElement.getEffectiveToTime()); - - /* - * Any remaining properties are returned in the extended properties. They are - * assumed to be defined in a subtype. - */ - membershipProperties.setExtendedProperties(this.getRemainingExtendedProperties(elementProperties)); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), OpenMetadataElement.class.getName(), methodName); - } - - bean.setElementHeader(super.getElementStub(beanClass, relatedMetadataElement.getElement(), methodName)); - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - /** - * Extract and delete the CollectionMemberStatus property from the supplied element properties. - * - * @param elementProperties properties from entity - * @return KeyPattern enum - */ - CollectionMembershipStatus removeCollectionMemberStatus(ElementProperties elementProperties) - { - final String methodName = "removeCollectionMemberStatus"; - - if (elementProperties != null) - { - String retrievedProperty = propertyHelper.removeEnumProperty(serviceName, - OpenMetadataProperty.TO_DO_STATUS.name, - elementProperties, - methodName); - - for (CollectionMembershipStatus status : CollectionMembershipStatus.values()) - { - if (status.getName().equals(retrievedProperty)) - { - return status; - } - } - } - - return null; - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-client/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/client/converters/CommunityProfileConverterBase.java b/open-metadata-implementation/access-services/community-profile/community-profile-client/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/client/converters/CommunityProfileConverterBase.java deleted file mode 100644 index b62d634d909..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-client/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/client/converters/CommunityProfileConverterBase.java +++ /dev/null @@ -1,159 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.client.converters; - -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.RelatedElement; -import org.odpi.openmetadata.accessservices.communityprofile.properties.RelationshipProperties; -import org.odpi.openmetadata.frameworks.openmetadata.enums.ToDoStatus; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; -import org.odpi.openmetadata.frameworks.governanceaction.converters.OpenMetadataConverterBase; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; -import org.odpi.openmetadata.frameworks.governanceaction.properties.OpenMetadataElement; -import org.odpi.openmetadata.frameworks.governanceaction.properties.RelatedMetadataElement; -import org.odpi.openmetadata.frameworks.governanceaction.properties.OpenMetadataRelationship; -import org.odpi.openmetadata.frameworks.governanceaction.search.ElementProperties; -import org.odpi.openmetadata.frameworks.governanceaction.search.PropertyHelper; - -/** - * Provide base converter functions for the Community Profile OMAS. - * - * @param bean class - */ -public abstract class CommunityProfileConverterBase extends OpenMetadataConverterBase -{ - /** - * Constructor - * - * @param propertyHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public CommunityProfileConverterBase(PropertyHelper propertyHelper, - String serviceName, - String serverName) - { - super(propertyHelper, serviceName, serverName); - } - - - /** - * Using the supplied instances, return a new instance of a relatedElement bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param element entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - public RelatedElement getRelatedElement(Class beanClass, - OpenMetadataElement element, - OpenMetadataRelationship relationship, - String methodName) throws PropertyServerException - { - RelatedElement relatedElement = new RelatedElement(); - - relatedElement.setRelationshipHeader(this.getMetadataElementHeader(beanClass, relationship, relationship.getRelationshipGUID(), null, methodName)); - - if (relationship != null) - { - ElementProperties instanceProperties = new ElementProperties(relationship.getRelationshipProperties()); - - RelationshipProperties relationshipProperties = new RelationshipProperties(); - - relationshipProperties.setEffectiveFrom(relationship.getEffectiveFromTime()); - relationshipProperties.setEffectiveTo(relationship.getEffectiveToTime()); - relationshipProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - - relatedElement.setRelationshipProperties(relationshipProperties); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), OpenMetadataRelationship.class.getName(), methodName); - } - - if (element != null) - { - ElementStub elementStub = this.getElementStub(beanClass, element, methodName); - - relatedElement.setRelatedElement(elementStub); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), OpenMetadataElement.class.getName(), methodName); - } - - return relatedElement; - } - - - /** - * Using the supplied instances, return a new instance of a relatedElement bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param relatedMetadataElement results containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - public RelatedElement getRelatedElement(Class beanClass, - RelatedMetadataElement relatedMetadataElement, - String methodName) throws PropertyServerException - { - RelatedElement relatedElement = new RelatedElement(); - - relatedElement.setRelationshipHeader(this.getMetadataElementHeader(beanClass, relatedMetadataElement, relatedMetadataElement.getRelationshipGUID(), null, methodName)); - - if (relatedMetadataElement != null) - { - ElementProperties instanceProperties = new ElementProperties(relatedMetadataElement.getRelationshipProperties()); - - RelationshipProperties relationshipProperties = new RelationshipProperties(); - - relationshipProperties.setEffectiveFrom(relatedMetadataElement.getEffectiveFromTime()); - relationshipProperties.setEffectiveTo(relatedMetadataElement.getEffectiveToTime()); - relationshipProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - - relatedElement.setRelationshipProperties(relationshipProperties); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), OpenMetadataRelationship.class.getName(), methodName); - } - - return relatedElement; - } - - - /** - * Extract and delete the ToDoStatus property from the supplied element properties. - * - * @param elementProperties properties from entity - * @return KeyPattern enum - */ - ToDoStatus removeToDoStatus(ElementProperties elementProperties) - { - final String methodName = "removeToDoStatus"; - - if (elementProperties != null) - { - String retrievedProperty = propertyHelper.removeEnumProperty(serviceName, - OpenMetadataProperty.TO_DO_STATUS.name, - elementProperties, - methodName); - - for (ToDoStatus status : ToDoStatus.values()) - { - if (status.getName().equals(retrievedProperty)) - { - return status; - } - } - } - - return null; - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-client/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/client/converters/package-info.java b/open-metadata-implementation/access-services/community-profile/community-profile-client/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/client/converters/package-info.java deleted file mode 100644 index b5f3d832e2d..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-client/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/client/converters/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -/** - * The converters take Open Metadata Store elements and convert them to Community Profile OMAS beans. - */ -package org.odpi.openmetadata.accessservices.communityprofile.client.converters; \ No newline at end of file diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-client/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/client/rest/CommunityProfileRESTClient.java b/open-metadata-implementation/access-services/community-profile/community-profile-client/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/client/rest/CommunityProfileRESTClient.java index c6267cea38f..24ee4d5a740 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-client/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/client/rest/CommunityProfileRESTClient.java +++ b/open-metadata-implementation/access-services/community-profile/community-profile-client/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/client/rest/CommunityProfileRESTClient.java @@ -3,7 +3,7 @@ package org.odpi.openmetadata.accessservices.communityprofile.client.rest; import org.odpi.openmetadata.accessservices.communityprofile.rest.*; -import org.odpi.openmetadata.commonservices.ffdc.rest.FFDCRESTClient; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; @@ -87,817 +87,4 @@ public CommunityProfileRESTClient(String serverName, super(serverName, serverPlatformURLRoot, userId, password); } - - /** - * Issue a GET REST call that returns a MetadataSourceResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate REST API call URL template with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return MetadataSourceResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException something went wrong with the REST call stack. - */ - public MetadataSourceResponse callMetadataSourceGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - MetadataSourceResponse restResult = this.callGetRESTCall(methodName, MetadataSourceResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a ActorProfileElement in a response object. - * - * @param methodName name of the method being called. - * @param urlTemplate REST API call URL template with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException something went wrong with the REST call stack. - */ - public ActorProfileResponse callActorProfileGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ActorProfileResponse restResult = this.callGetRESTCall(methodName, ActorProfileResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a list of ActorProfileElements in a response object. - * - * @param methodName name of the method being called - * @param urlTemplate REST API call URL template with place-holders for the parameters - * @param params a list of parameters that are slotted into the url template - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException something went wrong with the REST call stack. - */ - public ActorProfileListResponse callActorProfileListGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ActorProfileListResponse restResult = this.callGetRESTCall(methodName, ActorProfileListResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a list of ActorProfileElements in a response object. - * - * @param methodName name of the method being called - * @param urlTemplate REST API call URL template with place-holders for the parameters - * @param requestBody request body for the request - * @param params a list of parameters that are slotted into the url template - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException something went wrong with the REST call stack. - */ - public ActorProfileListResponse callActorProfileListPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ActorProfileListResponse restResult = this.callPostRESTCall(methodName, ActorProfileListResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a CollectionElement in a response object. - * - * @param methodName name of the method being called. - * @param urlTemplate REST API call URL template with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException something went wrong with the REST call stack. - */ - public CollectionResponse callCollectionGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - CollectionResponse restResult = this.callGetRESTCall(methodName, CollectionResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a list of CollectionElements in a response object. - * - * @param methodName name of the method being called - * @param urlTemplate REST API call URL template with place-holders for the parameters - * @param params a list of parameters that are slotted into the url template - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException something went wrong with the REST call stack. - */ - public CollectionListResponse callCollectionListGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - CollectionListResponse restResult = this.callGetRESTCall(methodName, CollectionListResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a list of CollectionMembers in a response object. - * - * @param methodName name of the method being called - * @param urlTemplate REST API call URL template with place-holders for the parameters - * @param params a list of parameters that are slotted into the url template - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException something went wrong with the REST call stack. - */ - public CollectionMemberListResponse callCollectionMemberListGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - CollectionMemberListResponse restResult = this.callGetRESTCall(methodName, CollectionMemberListResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a CollectionMember in a response object. - * - * @param methodName name of the method being called. - * @param urlTemplate REST API call URL template with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException something went wrong with the REST call stack. - */ - public CollectionMemberResponse callCollectionMemberGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - CollectionMemberResponse restResult = this.callGetRESTCall(methodName, CollectionMemberResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - /** - * Issue a GET REST call that returns a list of CollectionElements in a response object. - * - * @param methodName name of the method being called - * @param urlTemplate REST API call URL template with place-holders for the parameters - * @param requestBody request body for the request - * @param params a list of parameters that are slotted into the url template - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException something went wrong with the REST call stack. - */ - public CollectionListResponse callCollectionListPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - CollectionListResponse restResult = this.callPostRESTCall(methodName, CollectionListResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - - /** - * Issue a GET REST call that returns a CommunityElement in a response object. - * - * @param methodName name of the method being called. - * @param urlTemplate REST API call URL template with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException something went wrong with the REST call stack. - */ - public CommunityResponse callCommunityGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - CommunityResponse restResult = this.callGetRESTCall(methodName, CommunityResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a list of CommunityElements in a response object. - * - * @param methodName name of the method being called - * @param urlTemplate REST API call URL template with place-holders for the parameters - * @param params a list of parameters that are slotted into the url template - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException something went wrong with the REST call stack. - */ - public CommunityListResponse callCommunityListGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - CommunityListResponse restResult = this.callGetRESTCall(methodName, CommunityListResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a list of CommunityElements in a response object. - * - * @param methodName name of the method being called - * @param urlTemplate REST API call URL template with place-holders for the parameters - * @param requestBody request body for the request - * @param params a list of parameters that are slotted into the url template - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException something went wrong with the REST call stack. - */ - public CommunityListResponse callCommunityListPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - CommunityListResponse restResult = this.callPostRESTCall(methodName, CommunityListResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a PersonRoleElement in a response object. - * - * @param methodName name of the method being called. - * @param urlTemplate REST API call URL template with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException something went wrong with the REST call stack. - */ - public PersonRoleResponse callPersonRoleGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - PersonRoleResponse restResult = this.callGetRESTCall(methodName, PersonRoleResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a list of PersonRoleElements in a response object. - * - * @param methodName name of the method being called - * @param urlTemplate REST API call URL template with place-holders for the parameters - * @param params a list of parameters that are slotted into the url template - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException something went wrong with the REST call stack. - */ - public PersonRoleListResponse callPersonRoleListGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - PersonRoleListResponse restResult = this.callGetRESTCall(methodName, PersonRoleListResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a POST REST call that returns a list of PersonRoleElements in a response object. - * - * @param methodName name of the method being called - * @param urlTemplate REST API call URL template with place-holders for the parameters - * @param requestBody request body for the request - * @param params a list of parameters that are slotted into the url template - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException something went wrong with the REST call stack. - */ - public PersonRoleListResponse callPersonRoleListPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - PersonRoleListResponse restResult = this.callPostRESTCall(methodName, PersonRoleListResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - - /** - * Issue a POST REST call that returns a list of PersonRoleAppointees in a response object. - * - * @param methodName name of the method being called - * @param urlTemplate REST API call URL template with place-holders for the parameters - * @param requestBody request body for the request - * @param params a list of parameters that are slotted into the url template - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException something went wrong with the REST call stack. - */ - public PersonRoleAppointeeListResponse callPersonRoleAppointeeListPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - PersonRoleAppointeeListResponse restResult = this.callPostRESTCall(methodName, PersonRoleAppointeeListResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a UserIdentityElement in a response object. - * - * @param methodName name of the method being called. - * @param urlTemplate REST API call URL template with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return UserIdentityResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException something went wrong with the REST call stack. - */ - public UserIdentityResponse callUserIdentityGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - UserIdentityResponse restResult = this.callGetRESTCall(methodName, UserIdentityResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a list of UserIdentityElements in a response object. - * - * @param methodName name of the method being called - * @param urlTemplate REST API call URL template with place-holders for the parameters - * @param params a list of parameters that are slotted into the url template - * @return UserIdentityListResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException something went wrong with the REST call stack. - */ - public UserIdentityListResponse callUserIdentityListGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - UserIdentityListResponse restResult = this.callGetRESTCall(methodName, UserIdentityListResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a POST REST call that returns a list of UserIdentityElements in a response object. - * - * @param methodName name of the method being called - * @param urlTemplate REST API call URL template with place-holders for the parameters - * @param requestBody request body for the request - * @param params a list of parameters that are slotted into the url template - * @return UserIdentityListResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException something went wrong with the REST call stack. - */ - public UserIdentityListResponse callUserIdentityListPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - UserIdentityListResponse restResult = this.callPostRESTCall(methodName, UserIdentityListResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a SecurityGroupResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate REST API call URL template with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public SecurityGroupResponse callSecurityGroupGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - SecurityGroupResponse restResult = this.callGetRESTCall(methodName, SecurityGroupResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a POST REST call that returns a SecurityGroupResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate REST API call URL template with place-holders for the parameters. - * @param requestBody object that passes additional parameters - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public SecurityGroupResponse callSecurityGroupPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - SecurityGroupResponse restResult = this.callPostRESTCall(methodName, SecurityGroupResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a SecurityGroupsResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate REST API call URL template with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public SecurityGroupsResponse callSecurityGroupsGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - SecurityGroupsResponse restResult = this.callGetRESTCall(methodName, SecurityGroupsResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a POST REST call that returns a SecurityGroupsResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate REST API call URL template with place-holders for the parameters. - * @param requestBody object that passes additional parameters - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public SecurityGroupsResponse callSecurityGroupsPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - SecurityGroupsResponse restResult = this.callPostRESTCall(methodName, SecurityGroupsResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a ElementStubsResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate REST API call URL template with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public ElementStubsResponse callElementStubsGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ElementStubsResponse restResult = this.callGetRESTCall(methodName, ElementStubsResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - - /** - * Issue a GET REST call that returns a RelatedElementListResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate REST API call URL template with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public RelatedElementListResponse callRelatedElementListGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - RelatedElementListResponse restResult = this.callGetRESTCall(methodName, RelatedElementListResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a LocationResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate REST API call URL template with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return LocationResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public LocationResponse callLocationGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - LocationResponse restResult = this.callGetRESTCall(methodName, LocationResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a LocationListResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate REST API call URL template with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return LocationListResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public LocationListResponse callLocationsGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - LocationListResponse restResult = this.callGetRESTCall(methodName, LocationListResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a POST REST call that returns a LocationListResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate REST API call URL template with place-holders for the parameters. - * @param requestBody properties describing the valid value definition/set - * @param params a list of parameters that are slotted into the url template. - * - * @return LocationListResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public LocationListResponse callLocationsPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - LocationListResponse restResult = this.callPostRESTCall(methodName, LocationListResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a ValidValueElement in a response object. - * - * @param methodName name of the method being called. - * @param urlTemplate REST API call URL template with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException something went wrong with the REST call stack. - */ - public ValidValueResponse callValidValueGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ValidValueResponse restResult = this.callGetRESTCall(methodName, ValidValueResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a list of ValidValueElements in a response object. - * - * @param methodName name of the method being called - * @param urlTemplate REST API call URL template with place-holders for the parameters - * @param params a list of parameters that are slotted into the url template - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException something went wrong with the REST call stack. - */ - public ValidValueListResponse callValidValueListGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ValidValueListResponse restResult = this.callGetRESTCall(methodName, ValidValueListResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a list of ValidValueElements in a response object. - * - * @param methodName name of the method being called - * @param urlTemplate REST API call URL template with place-holders for the parameters - * @param requestBody request body for the request - * @param params a list of parameters that are slotted into the url template - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException something went wrong with the REST call stack. - */ - public ValidValueListResponse callValidValueListPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ValidValueListResponse restResult = this.callPostRESTCall(methodName, ValidValueListResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } } diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/converters/ActorProfileConverter.java b/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/converters/ActorProfileConverter.java deleted file mode 100644 index 418585006fe..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/converters/ActorProfileConverter.java +++ /dev/null @@ -1,394 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.converters; - - -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.ActorProfileElement; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.ContactMethodElement; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.ContributionRecordElement; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.ProfileIdentityElement; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.ProfileLocationElement; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.RelatedElement; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.UserIdentityElement; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ActorProfileProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ContactMethodProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ContributionRecord; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ProfileIdentityProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ProfileLocationProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.UserIdentityProperties; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityProxy; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * ActorProfileConverter generates a ActorProfileElement bean from a ActorProfile entity. - */ -public class ActorProfileConverter extends CommunityProfileOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public ActorProfileConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - /** - * Using the supplied instances, return a new instance of the bean. It is used for beans such as - * a connection bean which made up of 3 entities (Connection, ConnectorType and Endpoint) plus the - * relationships between them. The relationships may be omitted if they do not have any properties. - * - * @param beanClass name of the class to create - * @param primaryEntity entity that is the root of the collection of entities that make up the content of the bean - * @param supplementaryEntities entities connected to the primary entity by the relationships - * @param relationships relationships linking the entities - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewComplexBean(Class beanClass, - EntityDetail primaryEntity, - List supplementaryEntities, - List relationships, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof ActorProfileElement bean) - { - ActorProfileProperties profileProperties = new ActorProfileProperties(); - - if (primaryEntity != null) - { - bean.setElementHeader(this.getMetadataElementHeader(beanClass, primaryEntity, methodName)); - - /* - * The initial set of values come from the entity. - */ - InstanceProperties instanceProperties = new InstanceProperties(primaryEntity.getProperties()); - - profileProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); - profileProperties.setKnownName(this.removeName(instanceProperties)); - profileProperties.setDescription(this.removeDescription(instanceProperties)); - profileProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); - profileProperties.setEffectiveFrom(instanceProperties.getEffectiveFromTime()); - profileProperties.setEffectiveTo(instanceProperties.getEffectiveToTime()); - - /* - * Any remaining properties are returned in the extended properties. They are - * assumed to be defined in a subtype. - */ - profileProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); - profileProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - - bean.setProfileProperties(profileProperties); - - Map userIdentities = new HashMap<>(); - - if (supplementaryEntities != null) - { - List contactMethods = new ArrayList<>(); - - for (EntityDetail entity : supplementaryEntities) - { - if ((entity != null) && (entity.getType() != null)) - { - String entityTypeName = entity.getType().getTypeDefName(); - - if (repositoryHelper.isTypeOf(serviceName, entityTypeName, OpenMetadataType.USER_IDENTITY_TYPE_NAME)) - { - UserIdentityElement userBean = new UserIdentityElement(); - UserIdentityProperties userProperties = new UserIdentityProperties(); - - bean.setElementHeader(this.getMetadataElementHeader(beanClass, entity, methodName)); - - InstanceProperties entityProperties = new InstanceProperties(entity.getProperties()); - - userProperties.setQualifiedName(this.removeQualifiedName(entityProperties)); - userProperties.setUserId(this.removeUserId(entityProperties)); - userProperties.setDistinguishedName(this.removeDistinguishedName(entityProperties)); - userProperties.setAdditionalProperties(this.removeAdditionalProperties(entityProperties)); - - userProperties.setEffectiveFrom(entityProperties.getEffectiveFromTime()); - userProperties.setEffectiveTo(entityProperties.getEffectiveToTime()); - - userProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); - userProperties.setExtendedProperties(this.getRemainingExtendedProperties(entityProperties)); - - userBean.setProperties(userProperties); - - userIdentities.put(entity.getGUID(), userBean); - } - else if (repositoryHelper.isTypeOf(serviceName, entityTypeName, OpenMetadataType.CONTRIBUTION_RECORD_TYPE_NAME)) - { - ContributionRecordElement contributionBean = new ContributionRecordElement(); - ContributionRecord contributionRecord = new ContributionRecord(); - - contributionBean.setElementHeader(super.getMetadataElementHeader(beanClass, entity, methodName)); - - InstanceProperties entityProperties = new InstanceProperties(entity.getProperties()); - - contributionRecord.setQualifiedName(this.removeQualifiedName(entityProperties)); - contributionRecord.setAdditionalProperties(this.removeAdditionalProperties(entityProperties)); - contributionRecord.setKarmaPoints(this.removeKarmaPoints(entityProperties)); - if ((contributionRecord.getKarmaPoints() > 0) && (karmaPointPlateau > 0)) - { - contributionRecord.setKarmaPointPlateau(contributionRecord.getKarmaPoints() / karmaPointPlateau); - } - contributionRecord.setIsPublic(this.removeIsPublic(entityProperties)); - contributionRecord.setTypeName(bean.getElementHeader().getType().getTypeName()); - contributionRecord.setExtendedProperties(this.getRemainingExtendedProperties(entityProperties)); - - contributionBean.setProperties(contributionRecord); - bean.setContributionRecord(contributionBean); - } - else if (repositoryHelper.isTypeOf(serviceName, entityTypeName, OpenMetadataType.CONTACT_DETAILS.typeName)) - { - ContactMethodElement contactMethodBean = new ContactMethodElement(); - ContactMethodProperties contactMethodProperties = new ContactMethodProperties(); - - contactMethodBean.setElementHeader(super.getMetadataElementHeader(beanClass, entity, methodName)); - - InstanceProperties entityProperties = new InstanceProperties(entity.getProperties()); - - contactMethodProperties.setName(this.removeName(entityProperties)); - contactMethodProperties.setContactType(this.removeContactType(entityProperties)); - contactMethodProperties.setContactMethodType(this.getContactMethodTypeFromProperties(entityProperties)); - contactMethodProperties.setContactMethodService(this.removeContactMethodService(entityProperties)); - contactMethodProperties.setContactMethodValue(this.removeContactMethodValue(entityProperties)); - - contactMethodProperties.setEffectiveFrom(entityProperties.getEffectiveFromTime()); - contactMethodProperties.setEffectiveTo(entityProperties.getEffectiveToTime()); - - contactMethodProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); - contactMethodProperties.setExtendedProperties(this.getRemainingExtendedProperties(entityProperties)); - - contactMethodBean.setProperties(contactMethodProperties); - - contactMethods.add(contactMethodBean); - } - } - else - { - handleBadEntity(beanClass.getName(), entity, methodName); - } - } - - if (! contactMethods.isEmpty()) - { - bean.setContactMethods(contactMethods); - } - } - - if (relationships != null) - { - List peers = new ArrayList<>(); - ElementStub superTeam = null; - List subTeams = new ArrayList<>(); - List teamLeaders = new ArrayList<>(); - List teamMembers = new ArrayList<>(); - List profileIdentities = new ArrayList<>(); - List locations = new ArrayList<>(); - List roles = new ArrayList<>(); - List businessCapabilities = new ArrayList<>(); - List linkedInfrastructure = new ArrayList<>(); - - for (Relationship relationship : relationships) - { - if ((relationship != null) && (relationship.getType() != null)) - { - String relationshipTypeName = relationship.getType().getTypeDefName(); - - if (repositoryHelper.isTypeOf(serviceName, relationshipTypeName, OpenMetadataType.PEER_RELATIONSHIP_TYPE_NAME)) - { - EntityProxy entityProxy = repositoryHelper.getOtherEnd(serviceName, primaryEntity.getGUID(), relationship); - - ElementStub elementStub = super.getElementStub(beanClass, entityProxy, methodName); - - peers.add(elementStub); - } - else if (repositoryHelper.isTypeOf(serviceName, relationshipTypeName, OpenMetadataType.TEAM_MEMBERSHIP_RELATIONSHIP_TYPE_NAME)) - { - EntityProxy entityProxy = repositoryHelper.getOtherEnd(serviceName, primaryEntity.getGUID(), relationship); - - ElementStub elementStub = super.getElementStub(beanClass, entityProxy, methodName); - - teamMembers.add(elementStub); - } - else if (repositoryHelper.isTypeOf(serviceName, relationshipTypeName, OpenMetadataType.TEAM_LEADERSHIP_RELATIONSHIP_TYPE_NAME)) - { - EntityProxy entityProxy = repositoryHelper.getOtherEnd(serviceName, primaryEntity.getGUID(), relationship); - - ElementStub elementStub = super.getElementStub(beanClass, entityProxy, methodName); - - teamLeaders.add(elementStub); - } - else if (repositoryHelper.isTypeOf(serviceName, relationshipTypeName, OpenMetadataType.PERSON_ROLE_APPOINTMENT_RELATIONSHIP_TYPE_NAME)) - { - EntityProxy entityProxy = repositoryHelper.getOtherEnd(serviceName, primaryEntity.getGUID(), relationship); - - ElementStub elementStub = super.getElementStub(beanClass, entityProxy, methodName); - - roles.add(elementStub); - } - else if (repositoryHelper.isTypeOf(serviceName, relationshipTypeName, OpenMetadataType.IT_INFRASTRUCTURE_PROFILE_RELATIONSHIP_TYPE_NAME)) - { - EntityProxy entityProxy = repositoryHelper.getOtherEnd(serviceName, primaryEntity.getGUID(), relationship); - - ElementStub elementStub = super.getElementStub(beanClass, entityProxy, methodName); - - linkedInfrastructure.add(elementStub); - } - else if (repositoryHelper.isTypeOf(serviceName, relationshipTypeName, OpenMetadataType.ORGANIZATIONAL_CAPABILITY_TYPE_NAME)) - { - EntityProxy entityProxy = repositoryHelper.getOtherEnd(serviceName, primaryEntity.getGUID(), relationship); - - RelatedElement relatedElement = super.getRelatedElement(beanClass, relationship, entityProxy, methodName); - - businessCapabilities.add(relatedElement); - } - else if (repositoryHelper.isTypeOf(serviceName, relationshipTypeName, OpenMetadataType.PROFILE_LOCATION_TYPE_NAME)) - { - EntityProxy entityProxy = relationship.getEntityTwoProxy(); - - ElementStub elementStub = super.getElementStub(beanClass, entityProxy, methodName); - - ProfileLocationElement locationElement = new ProfileLocationElement(); - ProfileLocationProperties locationProperties = new ProfileLocationProperties(); - - locationProperties.setAssociationType(this.removeAssociationType(relationship.getProperties())); - - locationElement.setLocation(elementStub); - locationElement.setProperties(locationProperties); - locations.add(locationElement); - } - else if (repositoryHelper.isTypeOf(serviceName, relationshipTypeName, OpenMetadataType.PROFILE_IDENTITY_RELATIONSHIP_TYPE_NAME)) - { - EntityProxy entityProxy = repositoryHelper.getOtherEnd(serviceName, primaryEntity.getGUID(), relationship); - - ProfileIdentityElement profileIdentityElement = new ProfileIdentityElement(); - ProfileIdentityProperties profileIdentityProperties = new ProfileIdentityProperties(); - - InstanceProperties relationshipProperties = relationship.getProperties(); - - profileIdentityProperties.setRoleTypeName(this.removeDescription(relationshipProperties)); - profileIdentityProperties.setRoleGUID(this.removeDescription(relationshipProperties)); - profileIdentityProperties.setDescription(this.removeDescription(relationshipProperties)); - - profileIdentityElement.setProfileIdentity(profileIdentityProperties); - profileIdentityElement.setUserIdentity(userIdentities.get(entityProxy.getGUID())); - - profileIdentities.add(profileIdentityElement); - } - else if (repositoryHelper.isTypeOf(serviceName, relationshipTypeName, OpenMetadataType.TEAM_STRUCTURE_RELATIONSHIP_TYPE_NAME)) - { - EntityProxy entityProxy = relationship.getEntityOneProxy(); - - if (primaryEntity.getGUID().equals(entityProxy.getGUID())) - { - /* - * The primary entity is the super team - save subteam - */ - ElementStub elementStub = super.getElementStub(beanClass, relationship.getEntityTwoProxy(), methodName); - subTeams.add(elementStub); - } - else - { - superTeam = super.getElementStub(beanClass, entityProxy, methodName); - } - } - } - else - { - handleBadRelationship(beanClass.getName(), relationship, methodName); - } - } - - if (!profileIdentities.isEmpty()) - { - bean.setUserIdentities(profileIdentities); - } - - bean.setSuperTeam(superTeam); - if (! subTeams.isEmpty()) - { - bean.setSubTeams(subTeams); - } - - if (! peers.isEmpty()) - { - bean.setPeers(peers); - } - - if (! teamLeaders.isEmpty()) - { - bean.setTeamLeaderRoles(teamLeaders); - } - - if (! teamMembers.isEmpty()) - { - bean.setTeamMemberRoles(teamMembers); - } - - if (! roles.isEmpty()) - { - bean.setPersonRoles(roles); - } - - if (! businessCapabilities.isEmpty()) - { - bean.setBusinessCapability(businessCapabilities); - } - - if (! locations.isEmpty()) - { - bean.setLocations(locations); - } - - if (! linkedInfrastructure.isEmpty()) - { - bean.setLinkedInfrastructure(linkedInfrastructure); - } - } - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/converters/CollectionConverter.java b/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/converters/CollectionConverter.java deleted file mode 100644 index 8dba924658c..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/converters/CollectionConverter.java +++ /dev/null @@ -1,136 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.converters; - -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.CollectionElement; -import org.odpi.openmetadata.accessservices.communityprofile.properties.CollectionProperties; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; - - -/** - * CollectionConverter generates a CollectionElement from a Collection entity - */ -public class CollectionConverter extends CommunityProfileOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public CollectionConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - /** - * Using the supplied entity, return a new instance of the bean. This is used for most beans that have - * a one to one correspondence with the repository instances. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof CollectionElement) - { - CollectionElement bean = (CollectionElement) returnBean; - CollectionProperties collectionProperties = new CollectionProperties(); - - bean.setElementHeader(super.getMetadataElementHeader(beanClass, entity, methodName)); - - InstanceProperties instanceProperties; - - /* - * The initial set of values come from the entity. - */ - if (entity != null) - { - instanceProperties = new InstanceProperties(entity.getProperties()); - - collectionProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); - collectionProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); - collectionProperties.setName(this.removeName(instanceProperties)); - collectionProperties.setDescription(this.removeDescription(instanceProperties)); - collectionProperties.setCollectionType(this.removeCollectionType(instanceProperties)); - collectionProperties.setEffectiveFrom(instanceProperties.getEffectiveFromTime()); - collectionProperties.setEffectiveTo(instanceProperties.getEffectiveToTime()); - - /* - * Any remaining properties are returned in the extended properties. They are - * assumed to be defined in a subtype. - */ - collectionProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); - collectionProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - - bean.setProperties(collectionProperties); - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - public B getNewBean(Class beanClass, - EntityDetail entity, - Relationship relationship, - String methodName) throws PropertyServerException - { - B returnBean = this.getNewBean(beanClass, entity, methodName); - - if (returnBean instanceof CollectionElement) - { - CollectionElement bean = (CollectionElement) returnBean; - - bean.setRelatedElement(super.getRelatedElement(beanClass, entity, relationship, methodName)); - } - - return returnBean; - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/converters/CommentConverter.java b/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/converters/CommentConverter.java deleted file mode 100644 index fd4f31d5b38..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/converters/CommentConverter.java +++ /dev/null @@ -1,187 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.converters; - -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.CommentElement; -import org.odpi.openmetadata.accessservices.communityprofile.properties.CommentProperties; -import org.odpi.openmetadata.frameworks.openmetadata.enums.CommentType; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.*; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; -import java.util.Map; - - -/** - * CommentConverter provides common methods for transferring relevant properties from an Open Metadata Repository Services (OMRS) - * EntityDetail object into a bean that inherits from CommentProperties. - */ -public class CommentConverter extends CommunityProfileOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public CommentConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - Relationship relationship, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof CommentElement) - { - CommentElement bean = (CommentElement) returnBean; - CommentProperties commentProperties = new CommentProperties(); - - bean.setElementHeader(super.getMetadataElementHeader(beanClass, entity, methodName)); - - InstanceProperties instanceProperties; - - /* - * The initial set of values come from the entity. - */ - if (entity != null) - { - instanceProperties = new InstanceProperties(entity.getProperties()); - commentProperties.setUser(entity.getCreatedBy()); - - - commentProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); - commentProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); - commentProperties.setCommentType(this.removeCommentTypeFromProperties(instanceProperties)); - commentProperties.setCommentText(this.removeCommentText(instanceProperties)); - - commentProperties.setEffectiveFrom(instanceProperties.getEffectiveFromTime()); - commentProperties.setEffectiveTo(instanceProperties.getEffectiveToTime()); - - /* - * Any remaining properties are returned in the extended properties. They are - * assumed to be defined in a subtype. - */ - commentProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); - commentProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - - if (relationship != null) - { - instanceProperties = new InstanceProperties(relationship.getProperties()); - - commentProperties.setIsPublic(this.getIsPublic(instanceProperties)); - } - - bean.setProperties(commentProperties); - - bean.setRelatedElement(super.getRelatedElement(beanClass, entity, relationship, methodName)); - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - /** - * Retrieve and delete the CommentType enum property from the instance properties of an entity - * - * @param properties entity properties - * @return CommentType enum value - */ - private CommentType removeCommentTypeFromProperties(InstanceProperties properties) - { - CommentType commentType = this.getCommentTypeFromProperties(properties); - - if (properties != null) - { - Map instancePropertiesMap = properties.getInstanceProperties(); - - if (instancePropertiesMap != null) - { - instancePropertiesMap.remove(OpenMetadataProperty.COMMENT_TYPE.name); - } - - properties.setInstanceProperties(instancePropertiesMap); - } - - return commentType; - } - - - /** - * Retrieve the CommentType enum property from the instance properties of an entity - * - * @param properties entity properties - * @return CommentType enum value - */ - private CommentType getCommentTypeFromProperties(InstanceProperties properties) - { - CommentType commentType = CommentType.STANDARD_COMMENT; - - if (properties != null) - { - Map instancePropertiesMap = properties.getInstanceProperties(); - - if (instancePropertiesMap != null) - { - InstancePropertyValue instancePropertyValue = instancePropertiesMap.get(OpenMetadataProperty.COMMENT_TYPE.name); - - if (instancePropertyValue instanceof EnumPropertyValue enumPropertyValue) - { - commentType = switch (enumPropertyValue.getOrdinal()) - { - case 0 -> CommentType.STANDARD_COMMENT; - case 1 -> CommentType.QUESTION; - case 2 -> CommentType.ANSWER; - case 3 -> CommentType.SUGGESTION; - case 4 -> CommentType.USAGE_EXPERIENCE; - case 99 -> CommentType.OTHER; - default -> commentType; - }; - } - } - } - - return commentType; - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/converters/CommunityProfileOMASConverter.java b/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/converters/CommunityProfileOMASConverter.java index a57e761e76f..c234ff86fee 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/converters/CommunityProfileOMASConverter.java +++ b/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/converters/CommunityProfileOMASConverter.java @@ -2,13 +2,14 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.communityprofile.converters; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.RelatedElement; -import org.odpi.openmetadata.accessservices.communityprofile.properties.RelationshipProperties; +import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; import org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericConverter; import org.odpi.openmetadata.frameworks.openmetadata.enums.ContactMethodType; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.RelatedElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementStub; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.*; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; @@ -20,9 +21,8 @@ * class from within a generic is a little involved. This class provides the generic method for creating * and initializing a Community Profile bean. */ -public class CommunityProfileOMASConverter extends OpenMetadataAPIGenericConverter +public class CommunityProfileOMASConverter extends OMFConverter { - long karmaPointPlateau = 0; /** @@ -39,24 +39,6 @@ public CommunityProfileOMASConverter(OMRSRepositoryHelper repositoryHelper, super (repositoryHelper, serviceName, serverName); } - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - * @param karmaPointPlateau how many karma points to a plateau - */ - public CommunityProfileOMASConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName, - int karmaPointPlateau) - { - this(repositoryHelper, serviceName, serverName); - - this.karmaPointPlateau = karmaPointPlateau; - } - /*=============================== * Methods to fill out headers and enums @@ -68,10 +50,10 @@ public CommunityProfileOMASConverter(OMRSRepositoryHelper repositoryHelper, * Using the supplied instances, return a new instance of a relatedElement bean. This is used for beans that * contain a combination of the properties from an entity and that of a connected relationship. * - * @param beanClass name of the class to create - * @param entity entity containing the properties + * @param beanClass name of the class to create + * @param entity entity containing the properties * @param relationship relationship containing the properties - * @param methodName calling method + * @param methodName calling method * @return bean populated with properties from the instances supplied * @throws PropertyServerException there is a problem instantiating the bean */ @@ -80,7 +62,7 @@ public RelatedElement getRelatedElement(Class beanClass, Relationship relationship, String methodName) throws PropertyServerException { - RelatedElement relatedElement = new RelatedElement(); + RelatedElement relatedElement = new RelatedElement(); relatedElement.setRelationshipHeader(this.getMetadataElementHeader(beanClass, relationship, null, methodName)); @@ -170,50 +152,4 @@ public RelatedElement getRelatedElement(Class beanClass, return relatedElement; } - - /** - * Retrieve the ContactMethodType enum property from the instance properties of an entity - * - * @param properties entity properties - * @return ContactMethodType enum value - */ - ContactMethodType getContactMethodTypeFromProperties(InstanceProperties properties) - { - final String methodName = "getContactMethodTypeFromProperties"; - - ContactMethodType contactMethodType = ContactMethodType.OTHER; - - if (properties != null) - { - int ordinal = repositoryHelper.removeEnumPropertyOrdinal(serviceName, OpenMetadataProperty.CONTACT_METHOD_TYPE.name, properties, methodName); - - switch (ordinal) - { - case 0: - contactMethodType = ContactMethodType.EMAIL; - break; - - case 1: - contactMethodType = ContactMethodType.PHONE; - break; - - case 2: - contactMethodType = ContactMethodType.CHAT; - break; - - case 3: - contactMethodType = ContactMethodType.PROFILE; - break; - - case 4: - contactMethodType = ContactMethodType.ACCOUNT; - break; - - case 99: - break; - } - } - - return contactMethodType; - } } diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/converters/ContactMethodConverter.java b/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/converters/ContactMethodConverter.java deleted file mode 100644 index fb04fed6e89..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/converters/ContactMethodConverter.java +++ /dev/null @@ -1,131 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.converters; - - -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.ContactMethodElement; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ContactMethodProperties; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - - -import java.lang.reflect.InvocationTargetException; - -/** - * ContactMethodConverter generates a ContactMethodProperties bean from a ContactMethodProperties entity. - */ -public class ContactMethodConverter extends CommunityProfileOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public ContactMethodConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - /** - * Using the supplied entity, return a new instance of the bean. This is used for most beans that have - * a one to one correspondence with the repository instances. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof ContactMethodElement) - { - ContactMethodElement bean = (ContactMethodElement) returnBean; - ContactMethodProperties contactMethodProperties = new ContactMethodProperties(); - - bean.setElementHeader(super.getMetadataElementHeader(beanClass, entity, methodName)); - - InstanceProperties entityProperties; - - /* - * The initial set of values come from the entity. - */ - if (entity != null) - { - entityProperties = new InstanceProperties(entity.getProperties()); - - contactMethodProperties.setName(this.removeName(entityProperties)); - contactMethodProperties.setContactType(this.removeContactType(entityProperties)); - contactMethodProperties.setContactMethodType(this.getContactMethodTypeFromProperties(entityProperties)); - contactMethodProperties.setContactMethodService(this.removeContactMethodService(entityProperties)); - contactMethodProperties.setContactMethodValue(this.removeContactMethodValue(entityProperties)); - contactMethodProperties.setEffectiveFrom(entityProperties.getEffectiveFromTime()); - contactMethodProperties.setEffectiveTo(entityProperties.getEffectiveToTime()); - - - /* - * Any remaining properties are returned in the extended properties. They are - * assumed to be defined in a subtype. - */ - contactMethodProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); - contactMethodProperties.setExtendedProperties(this.getRemainingExtendedProperties(entityProperties)); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - - bean.setProperties(contactMethodProperties); - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @SuppressWarnings(value = "unused") - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - Relationship relationship, - String methodName) throws PropertyServerException - { - return this.getNewBean(beanClass, entity, methodName); - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/converters/ExternalReferenceConverter.java b/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/converters/ExternalReferenceConverter.java deleted file mode 100644 index 9cdb36f5797..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/converters/ExternalReferenceConverter.java +++ /dev/null @@ -1,137 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.converters; - - -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.ExternalReferenceElement; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ExternalReferenceProperties; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; - - -/** - * ExternalReferenceConverter generates an ExternalReferenceProperties bean from an ExternalReferenceProperties entity - * and a Relationship to it. - */ -public class ExternalReferenceConverter extends CommunityProfileOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public ExternalReferenceConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - String methodName) throws PropertyServerException - { - return getNewBean(beanClass, entity, null, methodName); - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - Relationship relationship, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof ExternalReferenceElement) - { - ExternalReferenceElement bean = (ExternalReferenceElement) returnBean; - - if (entity != null) - { - bean.setElementHeader(this.getMetadataElementHeader(beanClass, entity, methodName)); - ExternalReferenceProperties externalReferenceProperties = new ExternalReferenceProperties(); - - /* - * The initial set of values come from the entity. - */ - InstanceProperties instanceProperties = new InstanceProperties(entity.getProperties()); - - externalReferenceProperties.setResourceId(this.removeQualifiedName(instanceProperties)); - externalReferenceProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); - externalReferenceProperties.setResourceDisplayName(this.removeDisplayName(instanceProperties)); - externalReferenceProperties.setResourceURL(this.removeURL(instanceProperties)); - externalReferenceProperties.setResourceVersion(this.removeReferenceVersion(instanceProperties)); - externalReferenceProperties.setResourceDescription(this.removeDescription(instanceProperties)); - externalReferenceProperties.setOwningOrganization(this.removeOwningOrganization(instanceProperties)); - - - /* - * Any remaining properties are returned in the extended properties. They are - * assumed to be defined in a subtype. - */ - externalReferenceProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); - externalReferenceProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - - if (relationship != null) - { - instanceProperties = relationship.getProperties(); - - externalReferenceProperties.setLinkDescription(this.getDescription(instanceProperties)); - externalReferenceProperties.setLinkId(this.getReferenceId(instanceProperties)); - } - - bean.setProperties(externalReferenceProperties); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/converters/InformalTagConverter.java b/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/converters/InformalTagConverter.java deleted file mode 100644 index 5e25a72fd24..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/converters/InformalTagConverter.java +++ /dev/null @@ -1,126 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.converters; - -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.InformalTagElement; -import org.odpi.openmetadata.accessservices.communityprofile.properties.InformalTagProperties; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; - - -/** - * InformalTagConverter provides common methods for transferring relevant properties from an Open Metadata Repository Services (OMRS) - * EntityDetail object into an InformalTagElement bean. - */ -public class InformalTagConverter extends CommunityProfileOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public InformalTagConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - Relationship relationship, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof InformalTagElement) - { - InformalTagElement bean = (InformalTagElement) returnBean; - InformalTagProperties informalTagProperties = new InformalTagProperties(); - - bean.setElementHeader(super.getMetadataElementHeader(beanClass, entity, methodName)); - - InstanceProperties instanceProperties; - - /* - * The initial set of values come from the entity. - */ - if (entity != null) - { - instanceProperties = new InstanceProperties(entity.getProperties()); - informalTagProperties.setUser(entity.getCreatedBy()); - - informalTagProperties.setName(this.removeTagName(instanceProperties)); - informalTagProperties.setDescription(this.removeTagDescription(instanceProperties)); - informalTagProperties.setIsPrivateTag(! this.removeIsPublic(instanceProperties)); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - - if (relationship != null) - { - instanceProperties = new InstanceProperties(relationship.getProperties()); - - informalTagProperties.setIsPublic(this.getIsPublic(instanceProperties)); - } - - bean.setProperties(informalTagProperties); - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - String methodName) throws PropertyServerException - { - return getNewBean(beanClass, entity, null, methodName); - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/converters/LikeConverter.java b/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/converters/LikeConverter.java deleted file mode 100644 index e96b9b971d7..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/converters/LikeConverter.java +++ /dev/null @@ -1,118 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.converters; - -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.LikeElement; -import org.odpi.openmetadata.accessservices.communityprofile.properties.LikeProperties; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; - - -/** - * LikeConverter provides common methods for transferring relevant properties from an Open Metadata Repository Services (OMRS) - * EntityDetail object into a RatingElement bean. - */ -public class LikeConverter extends CommunityProfileOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public LikeConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - Relationship relationship, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof LikeElement) - { - LikeElement bean = (LikeElement) returnBean; - LikeProperties likeProperties = new LikeProperties(); - - bean.setElementHeader(super.getMetadataElementHeader(beanClass, entity, methodName)); - - InstanceProperties instanceProperties; - - if (entity != null) - { - likeProperties.setUser(entity.getCreatedBy()); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - - if (relationship != null) - { - instanceProperties = new InstanceProperties(relationship.getProperties()); - - likeProperties.setIsPublic(this.getIsPublic(instanceProperties)); - } - - bean.setProperties(likeProperties); - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - String methodName) throws PropertyServerException - { - return getNewBean(beanClass, entity, null, methodName); - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/converters/LocationConverter.java b/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/converters/LocationConverter.java deleted file mode 100644 index fdd95efb4f5..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/converters/LocationConverter.java +++ /dev/null @@ -1,162 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.converters; - -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.LocationElement; -import org.odpi.openmetadata.accessservices.communityprofile.properties.LocationProperties; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; - - -/** - * LocationConverter provides common methods for transferring relevant properties from an Open Metadata Repository Services (OMRS) - * EntityDetail object into a bean that inherits from LocationElement. - */ -public class LocationConverter extends CommunityProfileOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public LocationConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - Relationship relationship, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof LocationElement) - { - LocationElement bean = (LocationElement) returnBean; - - this.updateSimpleMetadataElement(beanClass, bean, entity, methodName); - - bean.setRelatedElement(super.getRelatedElement(beanClass, entity, relationship, methodName)); - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof LocationElement) - { - this.updateSimpleMetadataElement(beanClass, (LocationElement) returnBean, entity, methodName); - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - /** - * Extract the properties from the entity. Each concrete DataManager OMAS converter implements this method. - * The top level fills in the header - * - * @param beanClass name of the class to create - * @param bean output bean - * @param entity entity containing the properties - * @param methodName calling method - * @throws PropertyServerException there is a problem instantiating the bean - */ - void updateSimpleMetadataElement(Class beanClass, - LocationElement bean, - EntityDetail entity, - String methodName) throws PropertyServerException - { - if (entity != null) - { - bean.setElementHeader(this.getMetadataElementHeader(beanClass, entity, methodName)); - LocationProperties locationProperties = new LocationProperties(); - - InstanceProperties instanceProperties = new InstanceProperties(entity.getProperties()); - - locationProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); - locationProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); - locationProperties.setIdentifier(this.removeIdentifier(instanceProperties)); - locationProperties.setDisplayName(this.removeDisplayName(instanceProperties)); - locationProperties.setDescription(this.removeDescription(instanceProperties)); - - /* - * Any remaining properties are returned in the extended properties. They are - * assumed to be defined in a subtype. - */ - locationProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); - locationProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - - bean.setLocationProperties(locationProperties); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/converters/NoteLogEntryConverter.java b/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/converters/NoteLogEntryConverter.java deleted file mode 100644 index 611163b2a8b..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/converters/NoteLogEntryConverter.java +++ /dev/null @@ -1,154 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.converters; - - -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.NoteLogEntryElement; -import org.odpi.openmetadata.accessservices.communityprofile.properties.NoteLogEntryProperties; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - - -import java.lang.reflect.InvocationTargetException; -import java.util.ArrayList; -import java.util.List; - -/** - * NoteLogEntryConverter generates a NoteLogEntryForumContribution from an NoteEntry entity. - */ -public class NoteLogEntryConverter extends CommunityProfileOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public NoteLogEntryConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - /** - * Using the supplied entity, return a new instance of the bean. This is used for most beans that have - * a one to one correspondence with the repository instances. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof NoteLogEntryElement) - { - NoteLogEntryElement bean = (NoteLogEntryElement) returnBean; - NoteLogEntryProperties logEntryProperties = new NoteLogEntryProperties(); - - bean.setElementHeader(super.getMetadataElementHeader(beanClass, entity, methodName)); - - InstanceProperties instanceProperties; - - /* - * The initial set of values come from the entity. - */ - if (entity != null) - { - instanceProperties = new InstanceProperties(entity.getProperties()); - - logEntryProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); - logEntryProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); - logEntryProperties.setTitle(this.removeTitle(instanceProperties)); - logEntryProperties.setText(this.removeText(instanceProperties)); - - logEntryProperties.setEffectiveFrom(instanceProperties.getEffectiveFromTime()); - logEntryProperties.setEffectiveTo(instanceProperties.getEffectiveToTime()); - - List contributors = new ArrayList<>(); - - contributors.add(entity.getCreatedBy()); - - if ((entity.getUpdatedBy() != null) && (! entity.getUpdatedBy().equals(entity.getCreatedBy()))) - { - contributors.add(entity.getUpdatedBy()); - } - - if (entity.getMaintainedBy() != null) - { - for (String maintainer : entity.getMaintainedBy()) - { - if ((maintainer != null) && (! maintainer.equals(entity.getCreatedBy()))) - { - contributors.add(maintainer); - } - } - } - - logEntryProperties.setContributors(contributors); - - /* - * Any remaining properties are returned in the extended properties. They are - * assumed to be defined in a subtype. - */ - logEntryProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); - logEntryProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - - bean.setProperties(logEntryProperties); - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @SuppressWarnings(value = "unused") - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - Relationship relationship, - String methodName) throws PropertyServerException - { - return this.getNewBean(beanClass, entity, methodName); - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/converters/NoteLogHeaderConverter.java b/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/converters/NoteLogHeaderConverter.java deleted file mode 100644 index 543d60f7a98..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/converters/NoteLogHeaderConverter.java +++ /dev/null @@ -1,118 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.converters; - - -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.NoteLogHeaderElement; -import org.odpi.openmetadata.accessservices.communityprofile.properties.NoteLogHeaderProperties; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.*; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; - - -/** - * NoteLogHeaderConverter generates a NoteLogHeaderElement from an NoteLogHeader entity - */ -public class NoteLogHeaderConverter extends CommunityProfileOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public NoteLogHeaderConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - Relationship relationship, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof NoteLogHeaderElement) - { - NoteLogHeaderElement bean = (NoteLogHeaderElement) returnBean; - NoteLogHeaderProperties logHeaderProperties = new NoteLogHeaderProperties(); - - bean.setElementHeader(super.getMetadataElementHeader(beanClass, entity, methodName)); - - InstanceProperties instanceProperties; - - /* - * The initial set of values come from the entity. - */ - if (entity != null) - { - instanceProperties = new InstanceProperties(entity.getProperties()); - - logHeaderProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); - logHeaderProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); - logHeaderProperties.setName(this.removeName(instanceProperties)); - logHeaderProperties.setDescription(this.removeDescription(instanceProperties)); - logHeaderProperties.setEffectiveFrom(instanceProperties.getEffectiveFromTime()); - logHeaderProperties.setEffectiveTo(instanceProperties.getEffectiveToTime()); - - /* - * Any remaining properties are returned in the extended properties. They are - * assumed to be defined in a subtype. - */ - logHeaderProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); - logHeaderProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - - if (relationship != null) - { - instanceProperties = new InstanceProperties(relationship.getProperties()); - - logHeaderProperties.setIsPublic(this.getIsPublic(instanceProperties)); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.RELATIONSHIP_DEF, methodName); - } - - bean.setProperties(logHeaderProperties); - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/converters/PersonRoleConverter.java b/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/converters/PersonRoleConverter.java deleted file mode 100644 index e16a540a0b9..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/converters/PersonRoleConverter.java +++ /dev/null @@ -1,143 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.converters; - - -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.PersonRoleElement; -import org.odpi.openmetadata.accessservices.communityprofile.properties.PersonRoleProperties; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - - -import java.lang.reflect.InvocationTargetException; - -/** - * PersonRoleConverter generates a PersonRoleProperties bean from an PersonRoleProperties entity and the relationships connected to it. - */ -public class PersonRoleConverter extends CommunityProfileOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public PersonRoleConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - /** - * Using the supplied entity, return a new instance of the bean. This is used for most beans that have - * a one to one correspondence with the repository instances. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param methodName calling method - * @return bean populated with properties from the entity supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof PersonRoleElement) - { - PersonRoleElement bean = (PersonRoleElement) returnBean; - PersonRoleProperties roleProperties = new PersonRoleProperties(); - - if (entity != null) - { - bean.setElementHeader(this.getMetadataElementHeader(beanClass, entity, methodName)); - - /* - * The initial set of values come from the entity. - */ - InstanceProperties instanceProperties = new InstanceProperties(entity.getProperties()); - - roleProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); - roleProperties.setRoleId(this.removeIdentifier(instanceProperties)); - roleProperties.setTitle(this.removeName(instanceProperties)); - roleProperties.setDescription(this.removeDescription(instanceProperties)); - roleProperties.setScope(this.removeScope(instanceProperties)); - roleProperties.setDomainIdentifier(this.removeDomainIdentifier(instanceProperties)); - roleProperties.setHeadCountLimitSet(instanceProperties.getPropertyValue(OpenMetadataType.HEAD_COUNT_PROPERTY_NAME) != null); - roleProperties.setHeadCount(this.removeHeadCount(instanceProperties)); - - roleProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); - roleProperties.setEffectiveFrom(instanceProperties.getEffectiveFromTime()); - roleProperties.setEffectiveTo(instanceProperties.getEffectiveToTime()); - - - /* - * Any remaining properties are returned in the extended properties. They are - * assumed to be defined in a subtype. - */ - roleProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); - roleProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - - bean.setProperties(roleProperties); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - Relationship relationship, - String methodName) throws PropertyServerException - { - B returnBean = this.getNewBean(beanClass, entity, methodName); - - if (returnBean instanceof PersonRoleElement) - { - PersonRoleElement bean = (PersonRoleElement) returnBean; - - bean.setRelatedElement(super.getRelatedElement(beanClass, entity, relationship, methodName)); - } - - return returnBean; - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/converters/RatingConverter.java b/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/converters/RatingConverter.java deleted file mode 100644 index 33fdb271c5a..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/converters/RatingConverter.java +++ /dev/null @@ -1,190 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.converters; - -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.RatingElement; -import org.odpi.openmetadata.accessservices.communityprofile.properties.RatingProperties; -import org.odpi.openmetadata.frameworks.openmetadata.enums.StarRating; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.*; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; -import java.util.Map; - - -/** - * RatingConverter provides common methods for transferring relevant properties from an Open Metadata Repository Services (OMRS) - * EntityDetail object into a RatingElement bean. - */ -public class RatingConverter extends CommunityProfileOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public RatingConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - Relationship relationship, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof RatingElement) - { - RatingElement bean = (RatingElement) returnBean; - RatingProperties ratingProperties = new RatingProperties(); - - bean.setElementHeader(super.getMetadataElementHeader(beanClass, entity, methodName)); - - InstanceProperties instanceProperties; - - /* - * The initial set of values come from the entity. - */ - if (entity != null) - { - instanceProperties = new InstanceProperties(entity.getProperties()); - - ratingProperties.setStarRating(this.removeStarRatingFromProperties(instanceProperties)); - ratingProperties.setReview(this.removeReview(instanceProperties)); - ratingProperties.setUser(entity.getCreatedBy()); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - - if (relationship != null) - { - instanceProperties = new InstanceProperties(relationship.getProperties()); - - ratingProperties.setPublic(this.getIsPublic(instanceProperties)); - } - - bean.setProperties(ratingProperties); - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - String methodName) throws PropertyServerException - { - return getNewBean(beanClass, entity, null, methodName); - } - - - /** - * Retrieve and delete the StarRating enum property from the instance properties of an entity - * - * @param properties entity properties - * @return StarRating enum value - */ - private StarRating removeStarRatingFromProperties(InstanceProperties properties) - { - StarRating starRating = this.getStarRatingFromProperties(properties); - - if (properties != null) - { - Map instancePropertiesMap = properties.getInstanceProperties(); - - if (instancePropertiesMap != null) - { - instancePropertiesMap.remove(OpenMetadataType.STARS_PROPERTY_NAME); - } - - properties.setInstanceProperties(instancePropertiesMap); - } - - return starRating; - } - - - /** - * Retrieve the StarRating enum property from the instance properties of an entity - * - * @param properties entity properties - * @return StarRating enum value - */ - private StarRating getStarRatingFromProperties(InstanceProperties properties) - { - StarRating starRating = StarRating.NOT_RECOMMENDED; - - if (properties != null) - { - Map instancePropertiesMap = properties.getInstanceProperties(); - - if (instancePropertiesMap != null) - { - InstancePropertyValue instancePropertyValue = instancePropertiesMap.get(OpenMetadataType.STARS_PROPERTY_NAME); - - if (instancePropertyValue instanceof EnumPropertyValue enumPropertyValue) - { - starRating = switch (enumPropertyValue.getOrdinal()) - { - case 0 -> StarRating.NOT_RECOMMENDED; - case 1 -> StarRating.ONE_STAR; - case 2 -> StarRating.TWO_STARS; - case 3 -> StarRating.THREE_STARS; - case 4 -> StarRating.FOUR_STARS; - case 99 -> StarRating.FIVE_STARS; - default -> starRating; - }; - } - } - } - - return starRating; - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/converters/RelatedElementConverter.java b/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/converters/RelatedElementConverter.java deleted file mode 100644 index 9121b93bef4..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/converters/RelatedElementConverter.java +++ /dev/null @@ -1,62 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.converters; - - -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - - -/** - * RelatedElementConverter generates a RelatedElement from a relationship and attached entity - */ -public class RelatedElementConverter extends CommunityProfileOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public RelatedElementConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - @SuppressWarnings(value = "unchecked") - public B getNewBean(Class beanClass, - EntityDetail entity, - Relationship relationship, - String methodName) throws PropertyServerException - { - try - { - return (B)this.getRelatedElement(beanClass, entity, relationship, methodName); - } - catch (ClassCastException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/converters/SecurityGroupConverter.java b/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/converters/SecurityGroupConverter.java deleted file mode 100644 index b1e2ff4e428..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/converters/SecurityGroupConverter.java +++ /dev/null @@ -1,147 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.converters; - - -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.CollectionElement; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.SecurityGroupElement; -import org.odpi.openmetadata.accessservices.communityprofile.properties.SecurityGroupProperties; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; -import java.util.List; - - -/** - * GovernanceDefinitionConverter provides common methods for transferring relevant properties from an Open Metadata Repository Services (OMRS) - * EntityDetail object into a bean that inherits from GovernanceDefinition. - */ -public class SecurityGroupConverter extends CommunityProfileOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public SecurityGroupConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - /** - * Using the supplied instances, return a new instance of the bean. It is used for beans such as - * an Annotation or DataField bean which combine knowledge from the entity and its linked relationships. - * - * @param beanClass name of the class to create - * @param primaryEntity entity that is the root of the collection of entities that make up the - * content of the bean - * @param relationships relationships linking the entities - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @SuppressWarnings(value = "unused") - @Override - public B getNewComplexBean(Class beanClass, - EntityDetail primaryEntity, - List relationships, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof SecurityGroupElement) - { - SecurityGroupElement bean = (SecurityGroupElement) returnBean; - - if (primaryEntity != null) - { - bean.setElementHeader(this.getMetadataElementHeader(beanClass, primaryEntity, methodName)); - - /* - * The initial set of values come from the entity. - */ - InstanceProperties instanceProperties = new InstanceProperties(primaryEntity.getProperties()); - - String typeName = primaryEntity.getType().getTypeDefName(); - SecurityGroupProperties securityGroupProperties = new SecurityGroupProperties(); - - securityGroupProperties.setDocumentIdentifier(this.removeQualifiedName(instanceProperties)); - securityGroupProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); - securityGroupProperties.setTitle(this.removeTitle(instanceProperties)); - securityGroupProperties.setScope(this.removeScope(instanceProperties)); - securityGroupProperties.setDomainIdentifier(this.removeDomainIdentifier(instanceProperties)); - securityGroupProperties.setPriority(this.removePriority(instanceProperties)); - securityGroupProperties.setOutcomes(this.removeOutcomes(instanceProperties)); - securityGroupProperties.setResults(this.removeResults(instanceProperties)); - securityGroupProperties.setDistinguishedName(this.removeDistinguishedName(instanceProperties)); - - /* - * Any remaining properties are returned in the extended properties. They are - * assumed to be defined in a subtype. - */ - securityGroupProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); - securityGroupProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - - bean.setProperties(securityGroupProperties); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - Relationship relationship, - String methodName) throws PropertyServerException - { - B returnBean = this.getNewBean(beanClass, entity, methodName); - - if (returnBean instanceof SecurityGroupElement) - { - SecurityGroupElement bean = (SecurityGroupElement) returnBean; - - bean.setRelatedElement(super.getRelatedElement(beanClass, entity, relationship, methodName)); - } - - return returnBean; - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/converters/UserIdentityConverter.java b/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/converters/UserIdentityConverter.java deleted file mode 100644 index c7789129f5d..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/converters/UserIdentityConverter.java +++ /dev/null @@ -1,134 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.converters; - - -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.CollectionElement; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.UserIdentityElement; -import org.odpi.openmetadata.accessservices.communityprofile.properties.UserIdentityProperties; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; - - -/** - * UserIdentityConverter generates an UserIdentityElement bean from an UserIdentity entity. - */ -public class UserIdentityConverter extends CommunityProfileOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public UserIdentityConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof UserIdentityElement bean) - { - UserIdentityProperties properties = new UserIdentityProperties(); - - if (entity != null) - { - bean.setElementHeader(this.getMetadataElementHeader(beanClass, entity, methodName)); - - /* - * The initial set of values come from the entity. - */ - InstanceProperties instanceProperties = new InstanceProperties(entity.getProperties()); - - properties.setQualifiedName(this.removeQualifiedName(instanceProperties)); - properties.setUserId(this.removeUserId(instanceProperties)); - properties.setDistinguishedName(this.removeDistinguishedName(instanceProperties)); - properties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); - properties.setEffectiveFrom(instanceProperties.getEffectiveFromTime()); - properties.setEffectiveTo(instanceProperties.getEffectiveToTime()); - - /* - * Any remaining properties are returned in the extended properties. They are - * assumed to be defined in a subtype. - */ - properties.setTypeName(bean.getElementHeader().getType().getTypeName()); - properties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - - bean.setProperties(properties); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - public B getNewBean(Class beanClass, - EntityDetail entity, - Relationship relationship, - String methodName) throws PropertyServerException - { - B returnBean = this.getNewBean(beanClass, entity, methodName); - - if (returnBean instanceof UserIdentityElement) - { - UserIdentityElement bean = (UserIdentityElement) returnBean; - - bean.setRelatedElement(super.getRelatedElement(beanClass, entity, relationship, methodName)); - } - - return returnBean; - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/converters/ValidValueConverter.java b/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/converters/ValidValueConverter.java deleted file mode 100644 index 5c1345f6a85..00000000000 --- a/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/converters/ValidValueConverter.java +++ /dev/null @@ -1,146 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.converters; - - -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.CollectionElement; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.ValidValueElement; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ValidValueProperties; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; - - -/** - * ValidValueConverter generates an ValidValueElement bean from an ValidValueProperties entity. - */ -public class ValidValueConverter extends CommunityProfileOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public ValidValueConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - - /** - * Using the supplied entity, return a new instance of the bean. This is used for most beans that have - * a one to one correspondence with the repository instances. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof ValidValueElement) - { - ValidValueElement bean = (ValidValueElement) returnBean; - ValidValueProperties validValueProperties = new ValidValueProperties(); - - bean.setElementHeader(super.getMetadataElementHeader(beanClass, entity, methodName)); - - InstanceProperties instanceProperties; - - /* - * The initial set of values come from the entity. - */ - if (entity != null) - { - instanceProperties = new InstanceProperties(entity.getProperties()); - - validValueProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); - validValueProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); - validValueProperties.setDisplayName(this.removeName(instanceProperties)); - validValueProperties.setDescription(this.removeDescription(instanceProperties)); - validValueProperties.setCategory(this.removeCategory(instanceProperties)); - validValueProperties.setUsage(this.removeUsage(instanceProperties)); - validValueProperties.setScope(this.removeScope(instanceProperties)); - validValueProperties.setPreferredValue(this.removePreferredValue(instanceProperties)); - validValueProperties.setDataType(this.removeDataType(instanceProperties)); - validValueProperties.setIsDeprecated(this.removeIsDeprecated(instanceProperties)); - validValueProperties.setIsCaseSensitive(this.removeIsCaseSensitive(instanceProperties)); - - validValueProperties.setEffectiveFrom(instanceProperties.getEffectiveFromTime()); - validValueProperties.setEffectiveTo(instanceProperties.getEffectiveToTime()); - - /* - * Any remaining properties are returned in the extended properties. They are - * assumed to be defined in a subtype. - */ - validValueProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); - validValueProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - - bean.setValidValueProperties(validValueProperties); - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - public B getNewBean(Class beanClass, - EntityDetail entity, - Relationship relationship, - String methodName) throws PropertyServerException - { - B returnBean = this.getNewBean(beanClass, entity, methodName); - - if (returnBean instanceof ValidValueElement) - { - ValidValueElement bean = (ValidValueElement) returnBean; - - bean.setRelatedElement(super.getRelatedElement(beanClass, entity, relationship, methodName)); - } - - return returnBean; - } -} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/converters/package-info.java b/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/converters/package-info.java index 51f4a4b3de2..a22d3f2d61a 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/converters/package-info.java +++ b/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/converters/package-info.java @@ -4,7 +4,6 @@ /** * The converters are responsible for converting entities, classifications and relationships retrieved from the * open metadata repositories into Community Profile OMAS beans. - * * The inheritance structure follows closely to the inheritance structure of the beans themselves and the naming * convention is consistent. The converter used is the one that corresponds to the desired bean. * When a converter is created, it is passed the entity with its embedded classifications and a relationship if diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/omrstopic/CommunityProfileOMRSTopicListener.java b/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/omrstopic/CommunityProfileOMRSTopicListener.java index e4aa137e481..030d8735d9b 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/omrstopic/CommunityProfileOMRSTopicListener.java +++ b/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/omrstopic/CommunityProfileOMRSTopicListener.java @@ -5,13 +5,13 @@ import org.odpi.openmetadata.accessservices.communityprofile.converters.CommunityProfileOMASConverter; import org.odpi.openmetadata.accessservices.communityprofile.events.CommunityProfileOutboundEventType; import org.odpi.openmetadata.accessservices.communityprofile.ffdc.CommunityProfileAuditCode; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.ActorProfileElement; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.ContributionRecordElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ActorProfileElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ContributionRecordElement; import org.odpi.openmetadata.accessservices.communityprofile.outtopic.CommunityProfileOutTopicPublisher; import org.odpi.openmetadata.accessservices.communityprofile.server.CommunityProfileServicesInstance; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementStub; import org.odpi.openmetadata.repositoryservices.connectors.omrstopic.OMRSTopicListenerBase; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.*; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefSummary; diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/outtopic/CommunityProfileOutTopicPublisher.java b/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/outtopic/CommunityProfileOutTopicPublisher.java index c5c92e07dbf..5206a8f3142 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/outtopic/CommunityProfileOutTopicPublisher.java +++ b/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/outtopic/CommunityProfileOutTopicPublisher.java @@ -6,7 +6,7 @@ import org.odpi.openmetadata.accessservices.communityprofile.ffdc.CommunityProfileAuditCode; import org.odpi.openmetadata.accessservices.communityprofile.events.*; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementStub; /** diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/CollectionRESTServices.java b/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/CollectionRESTServices.java index fc06d12f722..a961c602447 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/CollectionRESTServices.java +++ b/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/CollectionRESTServices.java @@ -2,19 +2,16 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.communityprofile.server; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.CollectionElement; -import org.odpi.openmetadata.accessservices.communityprofile.properties.CollectionFolderProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.CollectionMembershipProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.CollectionProperties; -import org.odpi.openmetadata.accessservices.communityprofile.rest.*; +import org.odpi.openmetadata.commonservices.ffdc.rest.CollectionsResponse; import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.odpi.openmetadata.commonservices.generichandlers.CollectionHandler; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.CollectionElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.collections.CollectionFolderProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.collections.CollectionMembershipProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.collections.CollectionProperties; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; @@ -183,8 +180,8 @@ public GUIDResponse createFolderCollection(String serverName, handler.addFolderClassificationToCollection(userId, collectionGUID, collectionGUIDParameterName, - properties.getCollectionOrdering().getOrdinal(), - properties.getCollectionOrderingProperty(), + properties.getCollectionOrder().getOrdinal(), + properties.getOrderByPropertyName(), false, false, false, @@ -565,18 +562,18 @@ public VoidResponse removeCollection(String serverName, * UserNotAuthorizedException the user is not authorized to issue this request or * PropertyServerException there is a problem reported in the open metadata server(s) */ - public CollectionListResponse findCollections(String serverName, - String userId, - SearchStringRequestBody requestBody, - int startFrom, - int pageSize) + public CollectionsResponse findCollections(String serverName, + String userId, + SearchStringRequestBody requestBody, + int startFrom, + int pageSize) { final String methodName = "findCollections"; final String searchStringParameterName = "searchString"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - CollectionListResponse response = new CollectionListResponse(); + CollectionsResponse response = new CollectionsResponse(); AuditLog auditLog = null; try @@ -630,7 +627,7 @@ public CollectionListResponse findCollections(String serverName * UserNotAuthorizedException the user is not authorized to issue this request or * PropertyServerException there is a problem reported in the open metadata server(s) */ - public CollectionListResponse getCollectionsByName(String serverName, + public CollectionsResponse getCollectionsByName(String serverName, String userId, NameRequestBody requestBody, int startFrom, @@ -641,7 +638,7 @@ public CollectionListResponse getCollectionsByName(String serverName, RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - CollectionListResponse response = new CollectionListResponse(); + CollectionsResponse response = new CollectionsResponse(); AuditLog auditLog = null; try @@ -695,7 +692,7 @@ public CollectionListResponse getCollectionsByName(String serverName, * PropertyServerException problem accessing property server * UserNotAuthorizedException security access problem */ - public CollectionMemberListResponse getCollectionMembers(String serverName, + public CollectionMembersResponse getCollectionMembers(String serverName, String userId, String collectionGUID, int startFrom, @@ -706,7 +703,7 @@ public CollectionMemberListResponse getCollectionMembers(String serverN RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - CollectionMemberListResponse response = new CollectionMemberListResponse(); + CollectionMembersResponse response = new CollectionMembersResponse(); AuditLog auditLog = null; try @@ -759,7 +756,7 @@ public CollectionMemberListResponse getCollectionMembers(String serverN * UserNotAuthorizedException the user is not authorized to issue this request or * PropertyServerException there is a problem reported in the open metadata server(s) */ - public CollectionListResponse getCollections(String serverName, + public CollectionsResponse getCollections(String serverName, String userId, String parentGUID, int startFrom, @@ -770,7 +767,7 @@ public CollectionListResponse getCollections(String serverName, RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - CollectionListResponse response = new CollectionListResponse(); + CollectionsResponse response = new CollectionsResponse(); AuditLog auditLog = null; try diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/CommunityProfileInstanceHandler.java b/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/CommunityProfileInstanceHandler.java index 5dc61c2fa1f..183ee85b9df 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/CommunityProfileInstanceHandler.java +++ b/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/CommunityProfileInstanceHandler.java @@ -2,7 +2,8 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.communityprofile.server; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.*; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.MetadataSourceElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; import org.odpi.openmetadata.adminservices.configuration.registration.AccessServiceDescription; import org.odpi.openmetadata.commonservices.generichandlers.*; import org.odpi.openmetadata.commonservices.multitenant.OMASServiceInstanceHandler; diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/CommunityProfileRESTServices.java b/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/CommunityProfileRESTServices.java index 9bbf0c2d29c..43382fda7e7 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/CommunityProfileRESTServices.java +++ b/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/CommunityProfileRESTServices.java @@ -3,16 +3,12 @@ package org.odpi.openmetadata.accessservices.communityprofile.server; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.MetadataSourceElement; -import org.odpi.openmetadata.accessservices.communityprofile.properties.MetadataSourceProperties; -import org.odpi.openmetadata.accessservices.communityprofile.rest.MetadataSourceResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.MetadataSourceElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities.MetadataSourceProperties; import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; -import org.odpi.openmetadata.commonservices.ffdc.rest.ConnectionResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NullRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.commonservices.generichandlers.SoftwareCapabilityHandler; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; @@ -53,16 +49,16 @@ public CommunityProfileRESTServices() * UserNotAuthorizedException user not authorized to issue this request or * PropertyServerException problem retrieving the discovery engine definition. */ - public ConnectionResponse getOutTopicConnection(String serverName, - String userId, - String callerId) + public OCFConnectionResponse getOutTopicConnection(String serverName, + String userId, + String callerId) { final String methodName = "getOutTopicConnection"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - ConnectionResponse response = new ConnectionResponse(); - AuditLog auditLog = null; + OCFConnectionResponse response = new OCFConnectionResponse(); + AuditLog auditLog = null; try { @@ -221,8 +217,8 @@ public GUIDResponse getMetadataSourceGUID(String serverName, * PropertyServerException problem accessing the property server */ public MetadataSourceResponse getMetadataSource(String serverName, - String userId, - String metadataSourceGUID) + String userId, + String metadataSourceGUID) { final String methodName = "getMetadataSource"; final String metadataSourceGUIDParameterName = "metadataSourceGUID"; diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/CommunityProfileServicesInstance.java b/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/CommunityProfileServicesInstance.java index c5e3bf979b9..f304043da04 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/CommunityProfileServicesInstance.java +++ b/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/CommunityProfileServicesInstance.java @@ -3,9 +3,15 @@ package org.odpi.openmetadata.accessservices.communityprofile.server; import org.odpi.openmetadata.accessservices.communityprofile.connectors.outtopic.CommunityProfileOutTopicClientProvider; -import org.odpi.openmetadata.accessservices.communityprofile.converters.*; import org.odpi.openmetadata.accessservices.communityprofile.ffdc.CommunityProfileErrorCode; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.*; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.MetadataSourceElement; +import org.odpi.openmetadata.commonservices.generichandlers.CommentConverter; +import org.odpi.openmetadata.commonservices.generichandlers.InformalTagConverter; +import org.odpi.openmetadata.commonservices.generichandlers.LikeConverter; +import org.odpi.openmetadata.commonservices.generichandlers.LocationConverter; +import org.odpi.openmetadata.commonservices.generichandlers.RatingConverter; +import org.odpi.openmetadata.commonservices.generichandlers.RelatedElementConverter; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; import org.odpi.openmetadata.adminservices.configuration.registration.AccessServiceDescription; import org.odpi.openmetadata.commonservices.generichandlers.*; import org.odpi.openmetadata.commonservices.multitenant.OMASServiceInstance; @@ -25,11 +31,11 @@ public class CommunityProfileServicesInstance extends OMASServiceInstance { private final static AccessServiceDescription myDescription = AccessServiceDescription.COMMUNITY_PROFILE_OMAS; - private final ReferenceableHandler relatedElementHandler; - private final SoftwareCapabilityHandler metadataSourceHandler; - private final UserIdentityHandler userIdentityHandler; - private final ActorProfileHandler actorProfileHandler; - private final PersonRoleHandler personRoleHandler; + private final ReferenceableHandler relatedElementHandler; + private final SoftwareCapabilityHandler metadataSourceHandler; + private final UserIdentityHandler userIdentityHandler; + private final ActorProfileHandler actorProfileHandler; + private final PersonRoleHandler personRoleHandler; private final CollectionHandler collectionHandler; private final CommunityHandler communityHandler; private final ContributionRecordHandler contributionRecordHandler; @@ -89,7 +95,7 @@ public CommunityProfileServicesInstance(OMRSRepositoryConnector repositoryConnec if (repositoryHandler != null) { - this.relatedElementHandler = new ReferenceableHandler<>(new RelatedElementConverter<>(repositoryHelper, serviceName,serverName), + this.relatedElementHandler = new ReferenceableHandler<>(new RelatedElementConverter<>(repositoryHelper, serviceName, serverName), RelatedElement.class, serviceName, serverName, @@ -132,7 +138,7 @@ public CommunityProfileServicesInstance(OMRSRepositoryConnector repositoryConnec publishZones, auditLog); - this.personRoleHandler = new PersonRoleHandler<>(new PersonRoleConverter<>(repositoryHelper, serviceName,serverName), + this.personRoleHandler = new PersonRoleHandler<>(new PersonRoleConverter<>(repositoryHelper, serviceName, serverName), PersonRoleElement.class, serviceName, serverName, @@ -160,7 +166,7 @@ public CommunityProfileServicesInstance(OMRSRepositoryConnector repositoryConnec publishZones, auditLog); - this.communityHandler = new CommunityHandler<>(new CommunityConverter<>(repositoryHelper, serviceName,serverName), + this.communityHandler = new CommunityHandler<>(new CommunityConverter<>(repositoryHelper, serviceName, serverName), CommunityElement.class, serviceName, serverName, diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/CommunityRESTServices.java b/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/CommunityRESTServices.java index aca207f46e0..c710e6a0d81 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/CommunityRESTServices.java +++ b/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/CommunityRESTServices.java @@ -2,25 +2,19 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.communityprofile.server; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.CommunityElement; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.PersonRoleElement; -import org.odpi.openmetadata.accessservices.communityprofile.properties.CommunityMembershipProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.CommunityMembershipType; -import org.odpi.openmetadata.accessservices.communityprofile.properties.CommunityProperties; -import org.odpi.openmetadata.accessservices.communityprofile.rest.CommunityListResponse; -import org.odpi.openmetadata.accessservices.communityprofile.rest.CommunityResponse; -import org.odpi.openmetadata.accessservices.communityprofile.rest.ExternalSourceRequestBody; -import org.odpi.openmetadata.accessservices.communityprofile.rest.PersonRoleListResponse; -import org.odpi.openmetadata.accessservices.communityprofile.rest.ReferenceableRequestBody; -import org.odpi.openmetadata.accessservices.communityprofile.rest.RelationshipRequestBody; + import org.odpi.openmetadata.accessservices.communityprofile.rest.TemplateRequestBody; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; +import org.odpi.openmetadata.commonservices.ffdc.rest.ExternalSourceRequestBody; +import org.odpi.openmetadata.commonservices.ffdc.rest.ReferenceableRequestBody; +import org.odpi.openmetadata.commonservices.ffdc.rest.RelationshipRequestBody; +import org.odpi.openmetadata.frameworks.openmetadata.properties.communities.CommunityMembershipProperties; +import org.odpi.openmetadata.frameworks.openmetadata.enums.CommunityMembershipType; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.communities.CommunityProperties; import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; import org.odpi.openmetadata.commonservices.generichandlers.CommunityHandler; import org.odpi.openmetadata.commonservices.generichandlers.PersonRoleHandler; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; @@ -82,10 +76,8 @@ public GUIDResponse createCommunity(String serverName, if (requestBody != null) { - if (requestBody.getProperties() instanceof CommunityProperties) + if (requestBody.getProperties() instanceof CommunityProperties properties) { - CommunityProperties properties = (CommunityProperties)requestBody.getProperties(); - String communityGUID = handler.createCommunity(userId, requestBody.getExternalSourceGUID(), requestBody.getExternalSourceName(), @@ -233,10 +225,8 @@ public VoidResponse updateCommunity(String serverName, if (requestBody != null) { - if (requestBody.getProperties() instanceof CommunityProperties) + if (requestBody.getProperties() instanceof CommunityProperties properties) { - CommunityProperties properties = (CommunityProperties) requestBody.getProperties(); - handler.updateCommunity(userId, requestBody.getExternalSourceGUID(), requestBody.getExternalSourceName(), @@ -329,10 +319,8 @@ public VoidResponse setupCommunityRole(String serverName, { int ordinal = CommunityMembershipType.CONTRIBUTOR.getOrdinal(); - if (requestBody.getProperties() instanceof CommunityMembershipProperties) + if (requestBody.getProperties() instanceof CommunityMembershipProperties properties) { - CommunityMembershipProperties properties = (CommunityMembershipProperties) requestBody.getProperties(); - if (properties.getMembershipType() != null) { ordinal = properties.getMembershipType().getOrdinal(); @@ -531,7 +519,7 @@ public VoidResponse removeCommunity(String serverName, * UserNotAuthorizedException the user is not authorized to issue this request or * PropertyServerException there is a problem reported in the open metadata server(s) */ - public CommunityListResponse findCommunities(String serverName, + public CommunitiesResponse findCommunities(String serverName, String userId, SearchStringRequestBody requestBody, int startFrom, @@ -542,8 +530,8 @@ public CommunityListResponse findCommunities(String serverName, RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - CommunityListResponse response = new CommunityListResponse(); - AuditLog auditLog = null; + CommunitiesResponse response = new CommunitiesResponse(); + AuditLog auditLog = null; try { @@ -596,19 +584,19 @@ public CommunityListResponse findCommunities(String serverName, * UserNotAuthorizedException the user is not authorized to issue this request or * PropertyServerException there is a problem reported in the open metadata server(s) */ - public CommunityListResponse getCommunitiesByName(String serverName, - String userId, - NameRequestBody requestBody, - int startFrom, - int pageSize) + public CommunitiesResponse getCommunitiesByName(String serverName, + String userId, + NameRequestBody requestBody, + int startFrom, + int pageSize) { final String methodName = "getCommunitiesByName"; final String nameParameterName = "name"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - CommunityListResponse response = new CommunityListResponse(); - AuditLog auditLog = null; + CommunitiesResponse response = new CommunitiesResponse(); + AuditLog auditLog = null; try { @@ -662,19 +650,19 @@ public CommunityListResponse getCommunitiesByName(String serverName, * PropertyServerException problem accessing property server * UserNotAuthorizedException security access problem */ - public PersonRoleListResponse getRolesForCommunity(String serverName, - String userId, - String communityGUID, - int startFrom, - int pageSize) + public PersonRolesResponse getRolesForCommunity(String serverName, + String userId, + String communityGUID, + int startFrom, + int pageSize) { final String methodName = "getRolesForCommunity"; final String guidParameterName = "communityGUID"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - PersonRoleListResponse response = new PersonRoleListResponse(); - AuditLog auditLog = null; + PersonRolesResponse response = new PersonRolesResponse(); + AuditLog auditLog = null; try { @@ -716,17 +704,17 @@ public PersonRoleListResponse getRolesForCommunity(String serverName, * UserNotAuthorizedException the user is not authorized to issue this request or * PropertyServerException there is a problem reported in the open metadata server(s) */ - public CommunityListResponse getCommunities(String serverName, - String userId, - int startFrom, - int pageSize) + public CommunitiesResponse getCommunities(String serverName, + String userId, + int startFrom, + int pageSize) { final String methodName = "getCommunities"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - CommunityListResponse response = new CommunityListResponse(); - AuditLog auditLog = null; + CommunitiesResponse response = new CommunitiesResponse(); + AuditLog auditLog = null; try { diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/LocationRESTServices.java b/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/LocationRESTServices.java index 748a7f9ea4d..cc158ff89db 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/LocationRESTServices.java +++ b/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/LocationRESTServices.java @@ -2,29 +2,21 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.communityprofile.server; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.LocationElement; -import org.odpi.openmetadata.accessservices.communityprofile.properties.AdjacentLocationProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.AssetLocationProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.LocationProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.NestedLocationProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ProfileLocationProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.DigitalLocationProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.FixedLocationProperties; -import org.odpi.openmetadata.accessservices.communityprofile.rest.ClassificationRequestBody; -import org.odpi.openmetadata.accessservices.communityprofile.rest.ExternalSourceRequestBody; -import org.odpi.openmetadata.accessservices.communityprofile.rest.LocationListResponse; -import org.odpi.openmetadata.accessservices.communityprofile.rest.LocationResponse; -import org.odpi.openmetadata.accessservices.communityprofile.properties.SecureLocationProperties; -import org.odpi.openmetadata.accessservices.communityprofile.rest.ReferenceableRequestBody; -import org.odpi.openmetadata.accessservices.communityprofile.rest.RelationshipRequestBody; + import org.odpi.openmetadata.accessservices.communityprofile.rest.TemplateRequestBody; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.LocationElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.locations.AdjacentLocationProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.locations.AssetLocationProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.locations.LocationProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.locations.NestedLocationProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.locations.ProfileLocationProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.locations.DigitalLocationProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.locations.FixedLocationProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.locations.SecureLocationProperties; import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; import org.odpi.openmetadata.commonservices.generichandlers.LocationHandler; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; @@ -300,9 +292,8 @@ public VoidResponse setLocationAsFixedPhysical(String serverN { LocationHandler handler = instanceHandler.getLocationHandler(userId, serverName, methodName); - if (requestBody.getProperties() instanceof FixedLocationProperties) + if (requestBody.getProperties() instanceof FixedLocationProperties properties) { - FixedLocationProperties properties = (FixedLocationProperties) requestBody.getProperties(); handler.addFixedLocationClassification(userId, requestBody.getExternalSourceGUID(), @@ -1425,19 +1416,19 @@ public VoidResponse clearAssetLocation(String serverName, * UserNotAuthorizedException the user is not authorized to make this request or * PropertyServerException the repository is not available or not working properly. */ - public LocationListResponse findLocations(String serverName, - String userId, - SearchStringRequestBody requestBody, - int startFrom, - int pageSize) + public LocationsResponse findLocations(String serverName, + String userId, + SearchStringRequestBody requestBody, + int startFrom, + int pageSize) { final String methodName = "findLocations"; final String parameterName = "searchString"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - LocationListResponse response = new LocationListResponse(); - AuditLog auditLog = null; + LocationsResponse response = new LocationsResponse(); + AuditLog auditLog = null; try { @@ -1488,19 +1479,19 @@ public LocationListResponse findLocations(String serverName, * UserNotAuthorizedException the user is not authorized to make this request or * PropertyServerException the repository is not available or not working properly. */ - public LocationListResponse getLocationsByName(String serverName, - String userId, - NameRequestBody requestBody, - int startFrom, - int pageSize) + public LocationsResponse getLocationsByName(String serverName, + String userId, + NameRequestBody requestBody, + int startFrom, + int pageSize) { final String methodName = "getLocationsByName"; final String parameterName = "name"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - LocationListResponse response = new LocationListResponse(); - AuditLog auditLog = null; + LocationsResponse response = new LocationsResponse(); + AuditLog auditLog = null; try { @@ -1550,19 +1541,19 @@ public LocationListResponse getLocationsByName(String serverName, * UserNotAuthorizedException the user is not authorized to make this request or * PropertyServerException the repository is not available or not working properly. */ - public LocationListResponse getAdjacentLocations(String serverName, - String userId, - String locationGUID, - int startFrom, - int pageSize) + public LocationsResponse getAdjacentLocations(String serverName, + String userId, + String locationGUID, + int startFrom, + int pageSize) { final String methodName = "getAdjacentLocations"; final String parameterName = "locationGUID"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - LocationListResponse response = new LocationListResponse(); - AuditLog auditLog = null; + LocationsResponse response = new LocationsResponse(); + AuditLog auditLog = null; try { @@ -1607,19 +1598,19 @@ public LocationListResponse getAdjacentLocations(String serverName, * UserNotAuthorizedException the user is not authorized to make this request or * PropertyServerException the repository is not available or not working properly. */ - public LocationListResponse getNestedLocations(String serverName, - String userId, - String locationGUID, - int startFrom, - int pageSize) + public LocationsResponse getNestedLocations(String serverName, + String userId, + String locationGUID, + int startFrom, + int pageSize) { final String methodName = "getNestedLocations"; final String parameterName = "locationGUID"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - LocationListResponse response = new LocationListResponse(); - AuditLog auditLog = null; + LocationsResponse response = new LocationsResponse(); + AuditLog auditLog = null; try { @@ -1664,19 +1655,19 @@ public LocationListResponse getNestedLocations(String serverName, * UserNotAuthorizedException the user is not authorized to make this request or * PropertyServerException the repository is not available or not working properly. */ - public LocationListResponse getGroupingLocations(String serverName, - String userId, - String locationGUID, - int startFrom, - int pageSize) + public LocationsResponse getGroupingLocations(String serverName, + String userId, + String locationGUID, + int startFrom, + int pageSize) { final String methodName = "getGroupingLocations"; final String parameterName = "locationGUID"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - LocationListResponse response = new LocationListResponse(); - AuditLog auditLog = null; + LocationsResponse response = new LocationsResponse(); + AuditLog auditLog = null; try { @@ -1720,19 +1711,19 @@ public LocationListResponse getGroupingLocations(String serverName, * UserNotAuthorizedException the user is not authorized to make this request or * PropertyServerException the repository is not available or not working properly. */ - public LocationListResponse getLocationsByProfile(String serverName, - String userId, - String actorProfileGUID, - int startFrom, - int pageSize) + public LocationsResponse getLocationsByProfile(String serverName, + String userId, + String actorProfileGUID, + int startFrom, + int pageSize) { final String methodName = "getLocationsByProfile"; final String parameterName = "actorProfileGUID"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - LocationListResponse response = new LocationListResponse(); - AuditLog auditLog = null; + LocationsResponse response = new LocationsResponse(); + AuditLog auditLog = null; try { @@ -1776,19 +1767,19 @@ public LocationListResponse getLocationsByProfile(String serverName, * UserNotAuthorizedException the user is not authorized to make this request or * PropertyServerException the repository is not available or not working properly. */ - public LocationListResponse getKnownLocationsForAsset(String serverName, - String userId, - String assetGUID, - int startFrom, - int pageSize) + public LocationsResponse getKnownLocationsForAsset(String serverName, + String userId, + String assetGUID, + int startFrom, + int pageSize) { final String methodName = "getKnownLocationsForAsset"; final String parameterName = "assetGUID"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - LocationListResponse response = new LocationListResponse(); - AuditLog auditLog = null; + LocationsResponse response = new LocationsResponse(); + AuditLog auditLog = null; try { @@ -1831,17 +1822,17 @@ public LocationListResponse getKnownLocationsForAsset(String serverName, * UserNotAuthorizedException the user is not authorized to make this request or * PropertyServerException the repository is not available or not working properly. */ - public LocationListResponse getLocations(String serverName, - String userId, - int startFrom, - int pageSize) + public LocationsResponse getLocations(String serverName, + String userId, + int startFrom, + int pageSize) { final String methodName = "getLocations"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - LocationListResponse response = new LocationListResponse(); - AuditLog auditLog = null; + LocationsResponse response = new LocationsResponse(); + AuditLog auditLog = null; try { diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/OrganizationRESTServices.java b/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/OrganizationRESTServices.java index aeed30cb34b..a7ae34477c0 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/OrganizationRESTServices.java +++ b/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/OrganizationRESTServices.java @@ -3,31 +3,10 @@ package org.odpi.openmetadata.accessservices.communityprofile.server; import org.odpi.openmetadata.accessservices.communityprofile.converters.CommunityProfileOMASConverter; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.ActorProfileElement; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.ContactMethodElement; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.ContributionRecordElement; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.PersonRoleAppointee; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.PersonRoleElement; -import org.odpi.openmetadata.accessservices.communityprofile.properties.AppointmentProperties; -import org.odpi.openmetadata.accessservices.communityprofile.rest.ActorProfileListResponse; -import org.odpi.openmetadata.accessservices.communityprofile.rest.ActorProfileRequestBody; -import org.odpi.openmetadata.accessservices.communityprofile.rest.ActorProfileResponse; -import org.odpi.openmetadata.accessservices.communityprofile.rest.AppointmentRequestBody; -import org.odpi.openmetadata.accessservices.communityprofile.rest.ContactMethodRequestBody; -import org.odpi.openmetadata.accessservices.communityprofile.rest.EffectiveDatesRequestBody; -import org.odpi.openmetadata.accessservices.communityprofile.rest.EffectiveTimeRequestBody; -import org.odpi.openmetadata.accessservices.communityprofile.rest.ExternalSourceRequestBody; -import org.odpi.openmetadata.accessservices.communityprofile.rest.PersonRoleAppointeeListResponse; -import org.odpi.openmetadata.accessservices.communityprofile.rest.PersonRoleListResponse; -import org.odpi.openmetadata.accessservices.communityprofile.rest.PersonRoleRequestBody; -import org.odpi.openmetadata.accessservices.communityprofile.rest.PersonRoleResponse; -import org.odpi.openmetadata.accessservices.communityprofile.rest.TeamPlayerRequestBody; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; import org.odpi.openmetadata.commonservices.generichandlers.ActorProfileHandler; import org.odpi.openmetadata.commonservices.generichandlers.ContactDetailsHandler; import org.odpi.openmetadata.commonservices.generichandlers.ContributionRecordHandler; @@ -39,7 +18,7 @@ import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; @@ -705,19 +684,19 @@ public ActorProfileResponse getActorProfileByUserId(String serverName, * PropertyServerException problem accessing property server * UserNotAuthorizedException security access problem */ - public ActorProfileListResponse getActorProfilesByName(String serverName, - String userId, - int startFrom, - int pageSize, - NameRequestBody requestBody) + public ActorProfilesResponse getActorProfilesByName(String serverName, + String userId, + int startFrom, + int pageSize, + NameRequestBody requestBody) { final String methodName = "getActorProfileByName"; final String nameParameterName = "name"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - ActorProfileListResponse response = new ActorProfileListResponse(); - AuditLog auditLog = null; + ActorProfilesResponse response = new ActorProfilesResponse(); + AuditLog auditLog = null; try { @@ -760,17 +739,17 @@ public ActorProfileListResponse getActorProfilesByName(String serverNam * PropertyServerException problem accessing property server * UserNotAuthorizedException security access problem */ - public ActorProfileListResponse getActorProfiles(String serverName, - String userId, - int startFrom, - int pageSize) + public ActorProfilesResponse getActorProfiles(String serverName, + String userId, + int startFrom, + int pageSize) { final String methodName = "getActorProfiles"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - ActorProfileListResponse response = new ActorProfileListResponse(); - AuditLog auditLog = null; + ActorProfilesResponse response = new ActorProfilesResponse(); + AuditLog auditLog = null; try { @@ -812,19 +791,19 @@ public ActorProfileListResponse getActorProfiles(String serverName, * PropertyServerException problem accessing property server * UserNotAuthorizedException security access problem */ - public ActorProfileListResponse getActorProfilesByLocation(String serverName, - String userId, - String locationGUID, - int startFrom, - int pageSize) + public ActorProfilesResponse getActorProfilesByLocation(String serverName, + String userId, + String locationGUID, + int startFrom, + int pageSize) { final String methodName = "getActorProfilesByLocation"; final String guidParameterName = "locationGUID"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - ActorProfileListResponse response = new ActorProfileListResponse(); - AuditLog auditLog = null; + ActorProfilesResponse response = new ActorProfilesResponse(); + AuditLog auditLog = null; try { @@ -867,19 +846,19 @@ public ActorProfileListResponse getActorProfilesByLocation(String serve * PropertyServerException the server is not available. * UserNotAuthorizedException the calling user is not authorized to issue the call. */ - public ActorProfileListResponse findActorProfiles(String serverName, - String userId, - int startFrom, - int pageSize, - SearchStringRequestBody requestBody) + public ActorProfilesResponse findActorProfiles(String serverName, + String userId, + int startFrom, + int pageSize, + SearchStringRequestBody requestBody) { final String methodName = "findActorProfiles"; final String searchStringParameterName = "searchString"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - ActorProfileListResponse response = new ActorProfileListResponse(); - AuditLog auditLog = null; + ActorProfilesResponse response = new ActorProfilesResponse(); + AuditLog auditLog = null; try { @@ -1214,20 +1193,20 @@ public GUIDResponse linkPersonRoleToProfile(String serverName, * PropertyServerException problem accessing property server * UserNotAuthorizedException security access problem */ - public PersonRoleAppointeeListResponse getAppointees(String serverName, - String userId, - String personRoleGUID, - int startFrom, - int pageSize, - EffectiveTimeRequestBody requestBody) + public AppointeesResponse getAppointees(String serverName, + String userId, + String personRoleGUID, + int startFrom, + int pageSize, + EffectiveTimeRequestBody requestBody) { final String methodName = "getAppointees"; final String personRoleGUIDParameterName = "personRoleGUID"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - PersonRoleAppointeeListResponse response = new PersonRoleAppointeeListResponse(); - AuditLog auditLog = null; + AppointeesResponse response = new AppointeesResponse(); + AuditLog auditLog = null; try { @@ -1256,11 +1235,11 @@ public PersonRoleAppointeeListResponse getAppointees(String se methodName); if (appointmentRelationships != null) { - List appointees = new ArrayList<>(); + List appointees = new ArrayList<>(); OMRSRepositoryHelper repositoryHelper = roleHandler.getRepositoryHelper(); String serviceName = roleHandler.getServiceName(); - CommunityProfileOMASConverter converter = new CommunityProfileOMASConverter<>(repositoryHelper, serviceName, serverName); - RepositoryErrorHandler errorHandler = new RepositoryErrorHandler(repositoryHelper, serviceName, serverName, auditLog); + CommunityProfileOMASConverter converter = new CommunityProfileOMASConverter<>(repositoryHelper, serviceName, serverName); + RepositoryErrorHandler errorHandler = new RepositoryErrorHandler(repositoryHelper, serviceName, serverName, auditLog); for (Relationship relationship : appointmentRelationships) { @@ -1268,14 +1247,14 @@ public PersonRoleAppointeeListResponse getAppointees(String se { if (requestBody.getEffectiveTime() == null) { - PersonRoleAppointee appointee = getAppointeeFromRelationship(userId, - relationship, - profileHandler, - converter, - repositoryHelper, - serviceName, - errorHandler, - methodName); + Appointee appointee = getAppointeeFromRelationship(userId, + relationship, + profileHandler, + converter, + repositoryHelper, + serviceName, + errorHandler, + methodName); appointees.add(appointee); } @@ -1290,14 +1269,14 @@ public PersonRoleAppointeeListResponse getAppointees(String se if (((properties.getEffectiveFromTime() == null) || properties.getEffectiveFromTime().before(effectiveTime)) && ((properties.getEffectiveToTime() == null) || properties.getEffectiveToTime().after(effectiveTime))) { - PersonRoleAppointee appointee = getAppointeeFromRelationship(userId, - relationship, - profileHandler, - converter, - repositoryHelper, - serviceName, - errorHandler, - methodName); + Appointee appointee = getAppointeeFromRelationship(userId, + relationship, + profileHandler, + converter, + repositoryHelper, + serviceName, + errorHandler, + methodName); appointees.add(appointee); } @@ -1345,41 +1324,38 @@ public PersonRoleAppointeeListResponse getAppointees(String se * @throws PropertyServerException the server is not available. * @throws UserNotAuthorizedException the calling user is not authorized to issue the call. */ - private PersonRoleAppointee getAppointeeFromRelationship(String userId, - Relationship relationship, - ActorProfileHandler profileHandler, - CommunityProfileOMASConverter converter, - OMRSRepositoryHelper repositoryHelper, - String serviceName, - RepositoryErrorHandler errorHandler, - String methodName) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException + private Appointee getAppointeeFromRelationship(String userId, + Relationship relationship, + ActorProfileHandler profileHandler, + CommunityProfileOMASConverter converter, + OMRSRepositoryHelper repositoryHelper, + String serviceName, + RepositoryErrorHandler errorHandler, + String methodName) throws InvalidParameterException, + PropertyServerException, + UserNotAuthorizedException { final String profileGUIDParameterName = "profileGUID"; if ((relationship != null) && (relationship.getProperties() != null) && (relationship.getEntityOneProxy() != null) && (relationship.getEntityTwoProxy() != null)) { - PersonRoleAppointee appointee = new PersonRoleAppointee(); + Appointee appointee = new Appointee(); InstanceProperties properties = relationship.getProperties(); - ElementHeader elementHeader = converter.getMetadataElementHeader(PersonRoleAppointee.class, + ElementHeader elementHeader = converter.getMetadataElementHeader(Appointee.class, relationship, null, methodName); appointee.setElementHeader(elementHeader); + appointee.setStartDate(properties.getEffectiveFromTime()); + appointee.setEndDate(properties.getEffectiveToTime()); + appointee.setIsPublic(repositoryHelper.getBooleanProperty(serviceName, + OpenMetadataProperty.IS_PUBLIC.name, + relationship.getProperties(), + methodName)); - AppointmentProperties appointmentProperties = new AppointmentProperties(); - appointmentProperties.setEffectiveFrom(properties.getEffectiveFromTime()); - appointmentProperties.setEffectiveTo(properties.getEffectiveToTime()); - appointmentProperties.setIsPublic(repositoryHelper.getBooleanProperty(serviceName, - OpenMetadataProperty.IS_PUBLIC.name, - relationship.getProperties(), - methodName)); - - appointee.setProperties(appointmentProperties); ActorProfileElement profile = profileHandler.getActorProfileByGUID(userId, relationship.getEntityOneProxy().getGUID(), @@ -1778,19 +1754,19 @@ public PersonRoleResponse getPersonRoleByGUID(String serverName, * PropertyServerException problem accessing property server * UserNotAuthorizedException security access problem */ - public PersonRoleListResponse getPersonRoleByName(String serverName, - String userId, - int startFrom, - int pageSize, - NameRequestBody requestBody) + public PersonRolesResponse getPersonRoleByName(String serverName, + String userId, + int startFrom, + int pageSize, + NameRequestBody requestBody) { final String methodName = "getPersonRoleByName"; final String nameParameterName = "name"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - PersonRoleListResponse response = new PersonRoleListResponse(); - AuditLog auditLog = null; + PersonRolesResponse response = new PersonRolesResponse(); + AuditLog auditLog = null; try { @@ -1832,19 +1808,19 @@ public PersonRoleListResponse getPersonRoleByName(String serverName, * PropertyServerException problem accessing property server * UserNotAuthorizedException security access problem */ - public PersonRoleListResponse getLeadershipRolesForTeam(String serverName, - String userId, - String teamGUID, - int startFrom, - int pageSize) + public PersonRolesResponse getLeadershipRolesForTeam(String serverName, + String userId, + String teamGUID, + int startFrom, + int pageSize) { final String methodName = "getLeadershipRolesForTeam"; final String guidParameterName = "teamGUID"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - PersonRoleListResponse response = new PersonRoleListResponse(); - AuditLog auditLog = null; + PersonRolesResponse response = new PersonRolesResponse(); + AuditLog auditLog = null; try { @@ -1887,19 +1863,19 @@ public PersonRoleListResponse getLeadershipRolesForTeam(String serverNa * PropertyServerException problem accessing property server * UserNotAuthorizedException security access problem */ - public PersonRoleListResponse getMembershipRolesForTeam(String serverName, - String userId, - String teamGUID, - int startFrom, - int pageSize) + public PersonRolesResponse getMembershipRolesForTeam(String serverName, + String userId, + String teamGUID, + int startFrom, + int pageSize) { final String methodName = "getMembershipRolesForTeam"; final String guidParameterName = "teamGUID"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - PersonRoleListResponse response = new PersonRoleListResponse(); - AuditLog auditLog = null; + PersonRolesResponse response = new PersonRolesResponse(); + AuditLog auditLog = null; try { @@ -1942,19 +1918,19 @@ public PersonRoleListResponse getMembershipRolesForTeam(String serverNa * PropertyServerException the server is not available. * UserNotAuthorizedException the calling user is not authorized to issue the call. */ - public PersonRoleListResponse findPersonRoles(String serverName, - String userId, - int startFrom, - int pageSize, - SearchStringRequestBody requestBody) + public PersonRolesResponse findPersonRoles(String serverName, + String userId, + int startFrom, + int pageSize, + SearchStringRequestBody requestBody) { final String methodName = "findPersonRoles"; final String searchStringParameterName = "searchString"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - PersonRoleListResponse response = new PersonRoleListResponse(); - AuditLog auditLog = null; + PersonRolesResponse response = new PersonRolesResponse(); + AuditLog auditLog = null; try { diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/RelatedElementRESTServices.java b/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/RelatedElementRESTServices.java index a3272ed7603..74c7b6642f9 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/RelatedElementRESTServices.java +++ b/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/RelatedElementRESTServices.java @@ -2,17 +2,14 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.communityprofile.server; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.RelatedElement; -import org.odpi.openmetadata.accessservices.communityprofile.properties.AssignmentScopeProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ResourceListProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.StakeholderProperties; -import org.odpi.openmetadata.accessservices.communityprofile.rest.ExternalSourceRequestBody; -import org.odpi.openmetadata.accessservices.communityprofile.rest.RelatedElementListResponse; -import org.odpi.openmetadata.accessservices.communityprofile.rest.RelationshipRequestBody; import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.RelatedElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.AssignmentScopeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.projects.StakeholderProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.resources.ResourceListProperties; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.commonservices.generichandlers.ReferenceableHandler; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; @@ -208,19 +205,19 @@ public VoidResponse clearMoreInformation(String serverName, * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - public RelatedElementListResponse getMoreInformation(String serverName, - String userId, - String elementGUID, - int startFrom, - int pageSize) + public RelatedElementsResponse getMoreInformation(String serverName, + String userId, + String elementGUID, + int startFrom, + int pageSize) { final String methodName = "getMoreInformation"; final String guidPropertyName = "elementGUID"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - RelatedElementListResponse response = new RelatedElementListResponse(); - AuditLog auditLog = null; + RelatedElementsResponse response = new RelatedElementsResponse(); + AuditLog auditLog = null; try { @@ -228,17 +225,17 @@ public RelatedElementListResponse getMoreInformation(String serverName, ReferenceableHandler handler = instanceHandler.getRelatedElementHandler(userId, serverName, methodName); - response.setElementList(handler.getMoreInformation(userId, - elementGUID, - guidPropertyName, - OpenMetadataType.REFERENCEABLE.typeName, - OpenMetadataType.REFERENCEABLE.typeName, - startFrom, - pageSize, - false, - false, - new Date(), - methodName)); + response.setElements(handler.getMoreInformation(userId, + elementGUID, + guidPropertyName, + OpenMetadataType.REFERENCEABLE.typeName, + OpenMetadataType.REFERENCEABLE.typeName, + startFrom, + pageSize, + false, + false, + new Date(), + methodName)); } catch (Exception error) { @@ -265,19 +262,19 @@ public RelatedElementListResponse getMoreInformation(String serverName, * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - public RelatedElementListResponse getDescriptiveElements(String serverName, - String userId, - String detailGUID, - int startFrom, - int pageSize) + public RelatedElementsResponse getDescriptiveElements(String serverName, + String userId, + String detailGUID, + int startFrom, + int pageSize) { final String methodName = "getDescriptiveElements"; final String guidPropertyName = "detailGUID"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - RelatedElementListResponse response = new RelatedElementListResponse(); - AuditLog auditLog = null; + RelatedElementsResponse response = new RelatedElementsResponse(); + AuditLog auditLog = null; try { @@ -285,17 +282,17 @@ public RelatedElementListResponse getDescriptiveElements(String serverName, ReferenceableHandler handler = instanceHandler.getRelatedElementHandler(userId, serverName, methodName); - response.setElementList(handler.getDescriptiveElements(userId, - detailGUID, - guidPropertyName, - OpenMetadataType.REFERENCEABLE.typeName, - OpenMetadataType.REFERENCEABLE.typeName, - startFrom, - pageSize, - false, - false, - new Date(), - methodName)); + response.setElements(handler.getDescriptiveElements(userId, + detailGUID, + guidPropertyName, + OpenMetadataType.REFERENCEABLE.typeName, + OpenMetadataType.REFERENCEABLE.typeName, + startFrom, + pageSize, + false, + false, + new Date(), + methodName)); } catch (Exception error) { @@ -345,9 +342,8 @@ public VoidResponse setupStakeholder(String serverName, if (requestBody != null) { - if (requestBody.getProperties() instanceof StakeholderProperties) + if (requestBody.getProperties() instanceof StakeholderProperties properties) { - StakeholderProperties properties = (StakeholderProperties) requestBody.getProperties(); handler.addStakeholder(userId, requestBody.getExternalSourceGUID(), @@ -491,19 +487,19 @@ public VoidResponse clearStakeholder(String serverName, * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - public RelatedElementListResponse getStakeholders(String serverName, - String userId, - String elementGUID, - int startFrom, - int pageSize) + public RelatedElementsResponse getStakeholders(String serverName, + String userId, + String elementGUID, + int startFrom, + int pageSize) { final String methodName = "getStakeholders"; final String guidPropertyName = "elementGUID"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - RelatedElementListResponse response = new RelatedElementListResponse(); - AuditLog auditLog = null; + RelatedElementsResponse response = new RelatedElementsResponse(); + AuditLog auditLog = null; try { @@ -511,17 +507,17 @@ public RelatedElementListResponse getStakeholders(String serverName, ReferenceableHandler handler = instanceHandler.getRelatedElementHandler(userId, serverName, methodName); - response.setElementList(handler.getStakeholders(userId, - elementGUID, - guidPropertyName, - OpenMetadataType.REFERENCEABLE.typeName, - OpenMetadataType.REFERENCEABLE.typeName, - startFrom, - pageSize, - false, - false, - new Date(), - methodName)); + response.setElements(handler.getStakeholders(userId, + elementGUID, + guidPropertyName, + OpenMetadataType.REFERENCEABLE.typeName, + OpenMetadataType.REFERENCEABLE.typeName, + startFrom, + pageSize, + false, + false, + new Date(), + methodName)); } catch (Exception error) { @@ -548,19 +544,19 @@ public RelatedElementListResponse getStakeholders(String serverName, * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - public RelatedElementListResponse getStakeholderCommissionedElements(String serverName, - String userId, - String stakeholderGUID, - int startFrom, - int pageSize) + public RelatedElementsResponse getStakeholderCommissionedElements(String serverName, + String userId, + String stakeholderGUID, + int startFrom, + int pageSize) { final String methodName = "getStakeholderCommissionedElements"; final String guidPropertyName = "stakeholderGUID"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - RelatedElementListResponse response = new RelatedElementListResponse(); - AuditLog auditLog = null; + RelatedElementsResponse response = new RelatedElementsResponse(); + AuditLog auditLog = null; try { @@ -568,17 +564,17 @@ public RelatedElementListResponse getStakeholderCommissionedElements(String ser ReferenceableHandler handler = instanceHandler.getRelatedElementHandler(userId, serverName, methodName); - response.setElementList(handler.getCommissionedByStakeholder(userId, - stakeholderGUID, - guidPropertyName, - OpenMetadataType.REFERENCEABLE.typeName, - OpenMetadataType.REFERENCEABLE.typeName, - startFrom, - pageSize, - false, - false, - new Date(), - methodName)); + response.setElements(handler.getCommissionedByStakeholder(userId, + stakeholderGUID, + guidPropertyName, + OpenMetadataType.REFERENCEABLE.typeName, + OpenMetadataType.REFERENCEABLE.typeName, + startFrom, + pageSize, + false, + false, + new Date(), + methodName)); } catch (Exception error) { @@ -628,10 +624,8 @@ public VoidResponse setupAssignmentScope(String serverName, if (requestBody != null) { - if (requestBody.getProperties() instanceof AssignmentScopeProperties) + if (requestBody.getProperties() instanceof AssignmentScopeProperties properties) { - AssignmentScopeProperties properties = (AssignmentScopeProperties) requestBody.getProperties(); - handler.addAssignmentScope(userId, requestBody.getExternalSourceGUID(), requestBody.getExternalSourceName(), @@ -776,19 +770,19 @@ public VoidResponse clearAssignmentScope(String serverName, * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - public RelatedElementListResponse getAssignedScopes(String serverName, - String userId, - String elementGUID, - int startFrom, - int pageSize) + public RelatedElementsResponse getAssignedScopes(String serverName, + String userId, + String elementGUID, + int startFrom, + int pageSize) { final String methodName = "getAssignedScopes"; final String guidPropertyName = "elementGUID"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - RelatedElementListResponse response = new RelatedElementListResponse(); - AuditLog auditLog = null; + RelatedElementsResponse response = new RelatedElementsResponse(); + AuditLog auditLog = null; try { @@ -796,17 +790,17 @@ public RelatedElementListResponse getAssignedScopes(String serverName, ReferenceableHandler handler = instanceHandler.getRelatedElementHandler(userId, serverName, methodName); - response.setElementList(handler.getAssignmentScope(userId, - elementGUID, - guidPropertyName, - OpenMetadataType.REFERENCEABLE.typeName, - OpenMetadataType.REFERENCEABLE.typeName, - startFrom, - pageSize, - false, - false, - new Date(), - methodName)); + response.setElements(handler.getAssignmentScope(userId, + elementGUID, + guidPropertyName, + OpenMetadataType.REFERENCEABLE.typeName, + OpenMetadataType.REFERENCEABLE.typeName, + startFrom, + pageSize, + false, + false, + new Date(), + methodName)); } catch (Exception error) { @@ -833,19 +827,19 @@ public RelatedElementListResponse getAssignedScopes(String serverName, * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - public RelatedElementListResponse getAssignedActors(String serverName, - String userId, - String scopeGUID, - int startFrom, - int pageSize) + public RelatedElementsResponse getAssignedActors(String serverName, + String userId, + String scopeGUID, + int startFrom, + int pageSize) { final String methodName = "getAssignedActors"; final String guidPropertyName = "scopeGUID"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - RelatedElementListResponse response = new RelatedElementListResponse(); - AuditLog auditLog = null; + RelatedElementsResponse response = new RelatedElementsResponse(); + AuditLog auditLog = null; try { @@ -853,17 +847,17 @@ public RelatedElementListResponse getAssignedActors(String serverName, ReferenceableHandler handler = instanceHandler.getRelatedElementHandler(userId, serverName, methodName); - response.setElementList(handler.getAssignedActors(userId, - scopeGUID, - guidPropertyName, - OpenMetadataType.REFERENCEABLE.typeName, - OpenMetadataType.REFERENCEABLE.typeName, - startFrom, - pageSize, - false, - false, - new Date(), - methodName)); + response.setElements(handler.getAssignedActors(userId, + scopeGUID, + guidPropertyName, + OpenMetadataType.REFERENCEABLE.typeName, + OpenMetadataType.REFERENCEABLE.typeName, + startFrom, + pageSize, + false, + false, + new Date(), + methodName)); } catch (Exception error) { @@ -1063,19 +1057,19 @@ public VoidResponse clearResource(String serverName, * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - public RelatedElementListResponse getResourceList(String serverName, - String userId, - String elementGUID, - int startFrom, - int pageSize) + public RelatedElementsResponse getResourceList(String serverName, + String userId, + String elementGUID, + int startFrom, + int pageSize) { final String methodName = "getResourceList"; final String guidPropertyName = "elementGUID"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - RelatedElementListResponse response = new RelatedElementListResponse(); - AuditLog auditLog = null; + RelatedElementsResponse response = new RelatedElementsResponse(); + AuditLog auditLog = null; try { @@ -1083,16 +1077,16 @@ public RelatedElementListResponse getResourceList(String serverName, ReferenceableHandler handler = instanceHandler.getRelatedElementHandler(userId, serverName, methodName); - response.setElementList(handler.getResourceList(userId, - elementGUID, - guidPropertyName, - OpenMetadataType.REFERENCEABLE.typeName, - startFrom, - pageSize, - false, - false, - new Date(), - methodName)); + response.setElements(handler.getResourceList(userId, + elementGUID, + guidPropertyName, + OpenMetadataType.REFERENCEABLE.typeName, + startFrom, + pageSize, + false, + false, + new Date(), + methodName)); } catch (Exception error) { @@ -1119,11 +1113,11 @@ public RelatedElementListResponse getResourceList(String serverName, * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - public RelatedElementListResponse getSupportedByResource(String serverName, - String userId, - String resourceGUID, - int startFrom, - int pageSize) + public RelatedElementsResponse getSupportedByResource(String serverName, + String userId, + String resourceGUID, + int startFrom, + int pageSize) { final String methodName = "getSupportedByResource"; final String guidPropertyName = "resourceGUID"; @@ -1131,8 +1125,8 @@ public RelatedElementListResponse getSupportedByResource(String serverName, RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - RelatedElementListResponse response = new RelatedElementListResponse(); - AuditLog auditLog = null; + RelatedElementsResponse response = new RelatedElementsResponse(); + AuditLog auditLog = null; try { @@ -1140,16 +1134,16 @@ public RelatedElementListResponse getSupportedByResource(String serverName, ReferenceableHandler handler = instanceHandler.getRelatedElementHandler(userId, serverName, methodName); - response.setElementList(handler.getSupportedByResource(userId, - resourceGUID, - guidPropertyName, - OpenMetadataType.REFERENCEABLE.typeName, - startFrom, - pageSize, - false, - false, - new Date(), - methodName)); + response.setElements(handler.getSupportedByResource(userId, + resourceGUID, + guidPropertyName, + OpenMetadataType.REFERENCEABLE.typeName, + startFrom, + pageSize, + false, + false, + new Date(), + methodName)); } catch (Exception error) { diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/SecurityGroupRESTServices.java b/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/SecurityGroupRESTServices.java index 26aded2e068..22ffe51ce49 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/SecurityGroupRESTServices.java +++ b/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/SecurityGroupRESTServices.java @@ -3,17 +3,11 @@ package org.odpi.openmetadata.accessservices.communityprofile.server; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.SecurityGroupElement; -import org.odpi.openmetadata.accessservices.communityprofile.properties.SecurityGroupProperties; -import org.odpi.openmetadata.accessservices.communityprofile.rest.ElementStubsResponse; -import org.odpi.openmetadata.accessservices.communityprofile.rest.SecurityGroupResponse; -import org.odpi.openmetadata.accessservices.communityprofile.rest.SecurityGroupsResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.SecurityGroupElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.security.SecurityGroupProperties; import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NullRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; import org.odpi.openmetadata.commonservices.generichandlers.GovernanceDefinitionHandler; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; @@ -294,18 +288,18 @@ public SecurityGroupsResponse getSecurityGroupsForDistinguishedName(String serve GovernanceDefinitionHandler handler = instanceHandler.getSecurityGroupHandler(userId, serverName, methodName); auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - response.setElementList(handler.getGovernanceDefinitionsByStringParameter(userId, - OpenMetadataType.SECURITY_GROUP_TYPE_GUID, - OpenMetadataType.SECURITY_GROUP_TYPE_NAME, - distinguishedName, - distinguishedNameParameterName, - OpenMetadataType.DISTINGUISHED_NAME_PROPERTY_NAME, - startFrom, - pageSize, - false, - false, - new Date(), - methodName)); + response.setElements(handler.getGovernanceDefinitionsByStringParameter(userId, + OpenMetadataType.SECURITY_GROUP_TYPE_GUID, + OpenMetadataType.SECURITY_GROUP_TYPE_NAME, + distinguishedName, + distinguishedNameParameterName, + OpenMetadataType.DISTINGUISHED_NAME_PROPERTY_NAME, + startFrom, + pageSize, + false, + false, + new Date(), + methodName)); } catch (Exception error) { @@ -380,16 +374,16 @@ public SecurityGroupsResponse findSecurityGroups(String serverN GovernanceDefinitionHandler handler = instanceHandler.getSecurityGroupHandler(userId, serverName, methodName); auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - response.setElementList(handler.findGovernanceDefinitions(userId, - OpenMetadataType.SECURITY_GROUP_TYPE_NAME, - requestBody.getSearchString(), - searchStringParameterName, - startFrom, - pageSize, - false, - false, - new Date(), - methodName)); + response.setElements(handler.findGovernanceDefinitions(userId, + OpenMetadataType.SECURITY_GROUP_TYPE_NAME, + requestBody.getSearchString(), + searchStringParameterName, + startFrom, + pageSize, + false, + false, + new Date(), + methodName)); } else { diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/UserIdentityRESTServices.java b/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/UserIdentityRESTServices.java index 8fca21fdab5..b5aecb4bc1a 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/UserIdentityRESTServices.java +++ b/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/UserIdentityRESTServices.java @@ -2,20 +2,13 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.communityprofile.server; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.UserIdentityElement; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ProfileIdentityProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.UserIdentityProperties; -import org.odpi.openmetadata.accessservices.communityprofile.rest.ExternalSourceRequestBody; -import org.odpi.openmetadata.accessservices.communityprofile.rest.ReferenceableRequestBody; -import org.odpi.openmetadata.accessservices.communityprofile.rest.RelationshipRequestBody; -import org.odpi.openmetadata.accessservices.communityprofile.rest.UserIdentityListResponse; -import org.odpi.openmetadata.accessservices.communityprofile.rest.UserIdentityResponse; + import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.UserIdentityElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.ProfileIdentityProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.UserIdentityProperties; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.commonservices.generichandlers.UserIdentityHandler; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; @@ -73,12 +66,10 @@ public GUIDResponse createUserIdentity(String serverName, { if (requestBody != null) { - if (requestBody.getProperties() instanceof UserIdentityProperties) + if (requestBody.getProperties() instanceof UserIdentityProperties userIdentityProperties) { UserIdentityHandler handler = instanceHandler.getUserIdentityHandler(userId, serverName, methodName); - UserIdentityProperties userIdentityProperties = (UserIdentityProperties) requestBody.getProperties(); - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); String userIdentityGUID = handler.createUserIdentity(userId, requestBody.getExternalSourceGUID(), @@ -150,12 +141,10 @@ public VoidResponse updateUserIdentity(String serverName, { if (requestBody != null) { - if (requestBody.getProperties() instanceof UserIdentityProperties) + if (requestBody.getProperties() instanceof UserIdentityProperties userIdentityProperties) { UserIdentityHandler handler = instanceHandler.getUserIdentityHandler(userId, serverName, methodName); - UserIdentityProperties userIdentityProperties = (UserIdentityProperties) requestBody.getProperties(); - auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); handler.updateUserIdentity(userId, requestBody.getExternalSourceGUID(), @@ -300,9 +289,8 @@ public VoidResponse addIdentityToProfile(String serverName, if (requestBody != null) { - if (requestBody.getProperties() instanceof ProfileIdentityProperties) + if (requestBody.getProperties() instanceof ProfileIdentityProperties properties) { - ProfileIdentityProperties properties = (ProfileIdentityProperties)requestBody.getProperties(); handler.addIdentityToProfile(userId, requestBody.getExternalSourceGUID(), requestBody.getExternalSourceName(), @@ -400,9 +388,8 @@ public VoidResponse updateIdentityProfile(String serverName, if (requestBody != null) { - if (requestBody.getProperties() instanceof ProfileIdentityProperties) + if (requestBody.getProperties() instanceof ProfileIdentityProperties properties) { - ProfileIdentityProperties properties = (ProfileIdentityProperties)requestBody.getProperties(); handler.updateIdentityProfile(userId, requestBody.getExternalSourceGUID(), requestBody.getExternalSourceName(), @@ -549,7 +536,7 @@ public VoidResponse removeIdentityFromProfile(String serverNa * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - public UserIdentityListResponse findUserIdentities(String serverName, + public UserIdentitiesResponse findUserIdentities(String serverName, String userId, int startFrom, int pageSize, @@ -560,7 +547,7 @@ public UserIdentityListResponse findUserIdentities(String serve RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - UserIdentityListResponse response = new UserIdentityListResponse(); + UserIdentitiesResponse response = new UserIdentitiesResponse(); AuditLog auditLog = null; try @@ -614,7 +601,7 @@ public UserIdentityListResponse findUserIdentities(String serve * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - public UserIdentityListResponse getUserIdentitiesByName(String serverName, + public UserIdentitiesResponse getUserIdentitiesByName(String serverName, String userId, int startFrom, int pageSize, @@ -625,8 +612,8 @@ public UserIdentityListResponse getUserIdentitiesByName(String serverNa RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - UserIdentityListResponse response = new UserIdentityListResponse(); - AuditLog auditLog = null; + UserIdentitiesResponse response = new UserIdentitiesResponse(); + AuditLog auditLog = null; try { @@ -670,7 +657,6 @@ public UserIdentityListResponse getUserIdentitiesByName(String serverNa * @param userIdentityGUID unique identifier of the requested metadata element * * @return matching metadata element or - * * InvalidParameterException one of the parameters is invalid * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/ValidValuesRESTServices.java b/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/ValidValuesRESTServices.java index 184e5c4bf70..da0400eca85 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/ValidValuesRESTServices.java +++ b/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/ValidValuesRESTServices.java @@ -2,31 +2,19 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.communityprofile.server; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.RelatedElement; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.ValidValueElement; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ReferenceValueAssignmentProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ValidValueAssignmentProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ValidValueMembershipProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ValidValueProperties; -import org.odpi.openmetadata.accessservices.communityprofile.rest.ExternalSourceRequestBody; -import org.odpi.openmetadata.accessservices.communityprofile.rest.ReferenceableRequestBody; -import org.odpi.openmetadata.accessservices.communityprofile.rest.RelatedElementListResponse; -import org.odpi.openmetadata.accessservices.communityprofile.rest.RelationshipRequestBody; -import org.odpi.openmetadata.accessservices.communityprofile.rest.ValidValueListResponse; -import org.odpi.openmetadata.accessservices.communityprofile.rest.ValidValueResponse; + import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.odpi.openmetadata.commonservices.generichandlers.ReferenceableHandler; import org.odpi.openmetadata.commonservices.generichandlers.ValidValuesHandler; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues.*; import org.slf4j.LoggerFactory; import java.util.Date; @@ -768,18 +756,18 @@ public VoidResponse removeValidValue(String serverName, * UserNotAuthorizedException the user is not authorized to issue this request or * PropertyServerException there is a problem reported in the open metadata server(s) */ - public ValidValueListResponse findValidValues(String serverName, - String userId, - SearchStringRequestBody requestBody, - int startFrom, - int pageSize) + public ValidValuesResponse findValidValues(String serverName, + String userId, + SearchStringRequestBody requestBody, + int startFrom, + int pageSize) { final String methodName = "findValidValues"; final String searchStringParameterName = "searchString"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - ValidValueListResponse response = new ValidValueListResponse(); + ValidValuesResponse response = new ValidValuesResponse(); AuditLog auditLog = null; try @@ -801,7 +789,7 @@ public ValidValueListResponse findValidValues(String serverName new Date(), methodName); - response.setElementList(setUpVendorProperties(userId, validValues, handler, methodName)); + response.setElements(setUpVendorProperties(userId, validValues, handler, methodName)); } else { @@ -834,7 +822,7 @@ public ValidValueListResponse findValidValues(String serverName * UserNotAuthorizedException the user is not authorized to issue this request or * PropertyServerException there is a problem reported in the open metadata server(s) */ - public ValidValueListResponse getValidValuesByName(String serverName, + public ValidValuesResponse getValidValuesByName(String serverName, String userId, NameRequestBody requestBody, int startFrom, @@ -845,7 +833,7 @@ public ValidValueListResponse getValidValuesByName(String serverName, RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - ValidValueListResponse response = new ValidValueListResponse(); + ValidValuesResponse response = new ValidValuesResponse(); AuditLog auditLog = null; try @@ -867,7 +855,7 @@ public ValidValueListResponse getValidValuesByName(String serverName, new Date(), methodName); - response.setElementList(setUpVendorProperties(userId, validValues, handler, methodName)); + response.setElements(setUpVendorProperties(userId, validValues, handler, methodName)); } else { @@ -899,7 +887,7 @@ public ValidValueListResponse getValidValuesByName(String serverName, * PropertyServerException problem accessing property server * UserNotAuthorizedException security access problem */ - public ValidValueListResponse getValidValueSetMembers(String serverName, + public ValidValuesResponse getValidValueSetMembers(String serverName, String userId, String validValueSetGUID, int startFrom, @@ -910,7 +898,7 @@ public ValidValueListResponse getValidValueSetMembers(String serverName RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - ValidValueListResponse response = new ValidValueListResponse(); + ValidValuesResponse response = new ValidValuesResponse(); AuditLog auditLog = null; try @@ -919,7 +907,7 @@ public ValidValueListResponse getValidValueSetMembers(String serverName auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - response.setElementList(handler.getValidValueSetMembers(userId, + response.setElements(handler.getValidValueSetMembers(userId, validValueSetGUID, guidParameterName, startFrom, @@ -954,7 +942,7 @@ public ValidValueListResponse getValidValueSetMembers(String serverName * PropertyServerException problem accessing property server * UserNotAuthorizedException security access problem */ - public ValidValueListResponse getSetsForValidValue(String serverName, + public ValidValuesResponse getSetsForValidValue(String serverName, String userId, String validValueGUID, int startFrom, @@ -965,7 +953,7 @@ public ValidValueListResponse getSetsForValidValue(String serverName, RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - ValidValueListResponse response = new ValidValueListResponse(); + ValidValuesResponse response = new ValidValuesResponse(); AuditLog auditLog = null; try @@ -974,7 +962,7 @@ public ValidValueListResponse getSetsForValidValue(String serverName, auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - response.setElementList(handler.getSetsForValidValue(userId, + response.setElements(handler.getSetsForValidValue(userId, validValueGUID, guidParameterName, startFrom, @@ -1062,19 +1050,19 @@ public ValidValueResponse getValidValuesForConsumer(String serverName, * PropertyServerException problem accessing property server * UserNotAuthorizedException security access problem */ - public RelatedElementListResponse getConsumersOfValidValue(String serverName, - String userId, - String validValueGUID, - int startFrom, - int pageSize) + public RelatedElementsResponse getConsumersOfValidValue(String serverName, + String userId, + String validValueGUID, + int startFrom, + int pageSize) { final String methodName = "getConsumersOfValidValue"; final String guidParameterName = "validValueGUID"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - RelatedElementListResponse response = new RelatedElementListResponse(); - AuditLog auditLog = null; + RelatedElementsResponse response = new RelatedElementsResponse(); + AuditLog auditLog = null; try { @@ -1082,15 +1070,15 @@ public RelatedElementListResponse getConsumersOfValidValue(String serve auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - response.setElementList(handler.getValidValueConsumers(userId, - validValueGUID, - guidParameterName, - startFrom, - pageSize, - false, - false, - new Date(), - methodName)); + response.setElements(handler.getValidValueConsumers(userId, + validValueGUID, + guidParameterName, + startFrom, + pageSize, + false, + false, + new Date(), + methodName)); } catch (Exception error) { @@ -1116,7 +1104,7 @@ public RelatedElementListResponse getConsumersOfValidValue(String serve * UserNotAuthorizedException the user is not authorized to issue this request or * PropertyServerException there is a problem reported in the open metadata server(s) */ - public ValidValueListResponse getReferenceValues(String serverName, + public ValidValuesResponse getReferenceValues(String serverName, String userId, String elementGUID, int startFrom, @@ -1127,7 +1115,7 @@ public ValidValueListResponse getReferenceValues(String serverName, RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - ValidValueListResponse response = new ValidValueListResponse(); + ValidValuesResponse response = new ValidValuesResponse(); AuditLog auditLog = null; try @@ -1147,7 +1135,7 @@ public ValidValueListResponse getReferenceValues(String serverName, new Date(), methodName); - response.setElementList(setUpVendorProperties(userId, validValue, handler, methodName)); + response.setElements(setUpVendorProperties(userId, validValue, handler, methodName)); } catch (Exception error) { @@ -1174,19 +1162,19 @@ public ValidValueListResponse getReferenceValues(String serverName, * PropertyServerException problem accessing property server * UserNotAuthorizedException security access problem */ - public RelatedElementListResponse getAssigneesOfReferenceValue(String serverName, - String userId, - String validValueGUID, - int startFrom, - int pageSize) + public RelatedElementsResponse getAssigneesOfReferenceValue(String serverName, + String userId, + String validValueGUID, + int startFrom, + int pageSize) { final String methodName = "getAssigneesOfReferenceValue"; final String guidParameterName = "validValueGUID"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - RelatedElementListResponse response = new RelatedElementListResponse(); - AuditLog auditLog = null; + RelatedElementsResponse response = new RelatedElementsResponse(); + AuditLog auditLog = null; try { @@ -1194,15 +1182,15 @@ public RelatedElementListResponse getAssigneesOfReferenceValue(String s auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - response.setElementList(handler.getReferenceValueAssignees(userId, - validValueGUID, - guidParameterName, - startFrom, - pageSize, - false, - false, - new Date(), - methodName)); + response.setElements(handler.getReferenceValueAssignees(userId, + validValueGUID, + guidParameterName, + startFrom, + pageSize, + false, + false, + new Date(), + methodName)); } catch (Exception error) { @@ -1228,7 +1216,7 @@ public RelatedElementListResponse getAssigneesOfReferenceValue(String s * UserNotAuthorizedException the user is not authorized to issue this request or * PropertyServerException there is a problem reported in the open metadata server(s) */ - public ValidValueListResponse getAllValidValues(String serverName, + public ValidValuesResponse getAllValidValues(String serverName, String userId, int startFrom, int pageSize) @@ -1237,7 +1225,7 @@ public ValidValueListResponse getAllValidValues(String serverName, RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - ValidValueListResponse response = new ValidValueListResponse(); + ValidValuesResponse response = new ValidValuesResponse(); AuditLog auditLog = null; try @@ -1255,7 +1243,7 @@ public ValidValueListResponse getAllValidValues(String serverName, new Date(), methodName); - response.setElementList(setUpVendorProperties(userId, validValues, handler, methodName)); + response.setElements(setUpVendorProperties(userId, validValues, handler, methodName)); } catch (Exception error) { diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-spring/build.gradle b/open-metadata-implementation/access-services/community-profile/community-profile-spring/build.gradle index d50dea64e7d..6a92e61aa4d 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-spring/build.gradle +++ b/open-metadata-implementation/access-services/community-profile/community-profile-spring/build.gradle @@ -7,6 +7,7 @@ dependencies { implementation project(':open-metadata-implementation:access-services:community-profile:community-profile-server') implementation project(':open-metadata-implementation:access-services:community-profile:community-profile-api') + implementation project(':open-metadata-implementation:frameworks:open-metadata-framework') implementation project(':open-metadata-implementation:common-services:ffdc-services') implementation 'org.springframework:spring-web' implementation 'io.swagger.core.v3:swagger-annotations' diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-spring/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/spring/CommunityProfileResource.java b/open-metadata-implementation/access-services/community-profile/community-profile-spring/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/spring/CommunityProfileResource.java index a05dd6f4e3f..e1dc82bb42d 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-spring/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/spring/CommunityProfileResource.java +++ b/open-metadata-implementation/access-services/community-profile/community-profile-spring/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/spring/CommunityProfileResource.java @@ -4,13 +4,10 @@ import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.accessservices.communityprofile.properties.MetadataSourceProperties; -import org.odpi.openmetadata.accessservices.communityprofile.rest.MetadataSourceResponse; + import org.odpi.openmetadata.accessservices.communityprofile.server.CommunityProfileRESTServices; -import org.odpi.openmetadata.commonservices.ffdc.rest.ConnectionResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NullRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities.MetadataSourceProperties; import org.springframework.web.bind.annotation.*; /** @@ -42,9 +39,9 @@ public class CommunityProfileResource */ @GetMapping(path = "/topics/out-topic-connection/{callerId}") - public ConnectionResponse getOutTopicConnection(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String callerId) + public OCFConnectionResponse getOutTopicConnection(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String callerId) { return restAPI.getOutTopicConnection(serverName, userId, callerId); } diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-spring/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/spring/CommunityProfileValidValuesResource.java b/open-metadata-implementation/access-services/community-profile/community-profile-spring/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/spring/CommunityProfileValidValuesResource.java index 7ebcbf9dc3b..0f7a01cb80f 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-spring/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/spring/CommunityProfileValidValuesResource.java +++ b/open-metadata-implementation/access-services/community-profile/community-profile-spring/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/spring/CommunityProfileValidValuesResource.java @@ -4,17 +4,8 @@ import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.accessservices.communityprofile.rest.ExternalSourceRequestBody; -import org.odpi.openmetadata.accessservices.communityprofile.rest.ReferenceableRequestBody; -import org.odpi.openmetadata.accessservices.communityprofile.rest.RelatedElementListResponse; -import org.odpi.openmetadata.accessservices.communityprofile.rest.RelationshipRequestBody; -import org.odpi.openmetadata.accessservices.communityprofile.rest.ValidValueListResponse; -import org.odpi.openmetadata.accessservices.communityprofile.rest.ValidValueResponse; import org.odpi.openmetadata.accessservices.communityprofile.server.ValidValuesRESTServices; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; @@ -297,7 +288,7 @@ public VoidResponse removeValidValue(@PathVariable String ser */ @PostMapping(path = "/valid-values/by-search-string") - public ValidValueListResponse findValidValues(@PathVariable String serverName, + public ValidValuesResponse findValidValues(@PathVariable String serverName, @PathVariable String userId, @RequestParam int startFrom, @RequestParam int pageSize, @@ -324,7 +315,7 @@ public ValidValueListResponse findValidValues(@PathVariable String */ @PostMapping(path = "/valid-values/by-name") - public ValidValueListResponse getValidValuesByName(@PathVariable String serverName, + public ValidValuesResponse getValidValuesByName(@PathVariable String serverName, @PathVariable String userId, @RequestParam int startFrom, @RequestParam int pageSize, @@ -351,7 +342,7 @@ public ValidValueListResponse getValidValuesByName(@PathVariable String */ @GetMapping(path = "/valid-values/members/{validValueSetGUID}") - public ValidValueListResponse getValidValueSetMembers(@PathVariable String serverName, + public ValidValuesResponse getValidValueSetMembers(@PathVariable String serverName, @PathVariable String userId, @PathVariable String validValueSetGUID, @RequestParam int startFrom, @@ -378,7 +369,7 @@ public ValidValueListResponse getValidValueSetMembers(@PathVariable String serve */ @GetMapping(path = "/valid-values/sets/{validValueGUID}") - public ValidValueListResponse getSetsForValidValue(@PathVariable String serverName, + public ValidValuesResponse getSetsForValidValue(@PathVariable String serverName, @PathVariable String userId, @PathVariable String validValueGUID, @RequestParam int startFrom, @@ -428,11 +419,11 @@ public ValidValueResponse getValidValuesForConsumer(@PathVariable String serverN */ @GetMapping(path = "/valid-values/{validValueGUID}/consumers") - public RelatedElementListResponse getConsumersOfValidValue(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String validValueGUID, - @RequestParam int startFrom, - @RequestParam int pageSize) + public RelatedElementsResponse getConsumersOfValidValue(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String validValueGUID, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getConsumersOfValidValue(serverName, userId, validValueGUID, startFrom, pageSize); } @@ -454,11 +445,11 @@ public RelatedElementListResponse getConsumersOfValidValue(@PathVariable String */ @GetMapping(path = "/valid-values/by-reference-value-tags/{elementGUID}") - public ValidValueListResponse getReferenceValues(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String elementGUID, - @RequestParam int startFrom, - @RequestParam int pageSize) + public ValidValuesResponse getReferenceValues(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String elementGUID, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getReferenceValues(serverName, userId, elementGUID, startFrom, pageSize); } @@ -481,11 +472,11 @@ public ValidValueListResponse getReferenceValues(@PathVariable String serverName */ @GetMapping(path = "/valid-values/{validValueGUID}/by-reference-value-tag-assignees") - public RelatedElementListResponse getAssigneesOfReferenceValue(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String validValueGUID, - @RequestParam int startFrom, - @RequestParam int pageSize) + public RelatedElementsResponse getAssigneesOfReferenceValue(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String validValueGUID, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getAssigneesOfReferenceValue(serverName, userId, validValueGUID, startFrom, pageSize); } @@ -507,10 +498,10 @@ public RelatedElementListResponse getAssigneesOfReferenceValue(@PathVariable Str */ @GetMapping(path = "/valid-values") - public ValidValueListResponse getAllValidValues(@PathVariable String serverName, - @PathVariable String userId, - @RequestParam int startFrom, - @RequestParam int pageSize) + public ValidValuesResponse getAllValidValues(@PathVariable String serverName, + @PathVariable String userId, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getAllValidValues(serverName, userId, startFrom, pageSize); } diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-spring/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/spring/CommunityResource.java b/open-metadata-implementation/access-services/community-profile/community-profile-spring/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/spring/CommunityResource.java index 5a2de81f2a2..bc7404c8663 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-spring/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/spring/CommunityResource.java +++ b/open-metadata-implementation/access-services/community-profile/community-profile-spring/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/spring/CommunityResource.java @@ -4,18 +4,10 @@ import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.accessservices.communityprofile.rest.CommunityListResponse; -import org.odpi.openmetadata.accessservices.communityprofile.rest.CommunityResponse; -import org.odpi.openmetadata.accessservices.communityprofile.rest.ExternalSourceRequestBody; -import org.odpi.openmetadata.accessservices.communityprofile.rest.PersonRoleListResponse; -import org.odpi.openmetadata.accessservices.communityprofile.rest.ReferenceableRequestBody; -import org.odpi.openmetadata.accessservices.communityprofile.rest.RelationshipRequestBody; + import org.odpi.openmetadata.accessservices.communityprofile.rest.TemplateRequestBody; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.odpi.openmetadata.accessservices.communityprofile.server.CommunityRESTServices; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; @@ -216,11 +208,11 @@ public VoidResponse removeCommunity(@PathVariable String serv */ @PostMapping(path = "/communities/by-search-string") - public CommunityListResponse findCommunities(@PathVariable String serverName, - @PathVariable String userId, - @RequestBody SearchStringRequestBody requestBody, - @RequestParam int startFrom, - @RequestParam int pageSize) + public CommunitiesResponse findCommunities(@PathVariable String serverName, + @PathVariable String userId, + @RequestBody SearchStringRequestBody requestBody, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.findCommunities(serverName, userId, requestBody, startFrom, pageSize); } @@ -243,11 +235,11 @@ public CommunityListResponse findCommunities(@PathVariable String */ @PostMapping(path = "/communities/by-name") - public CommunityListResponse getCommunitiesByName(@PathVariable String serverName, - @PathVariable String userId, - @RequestBody NameRequestBody requestBody, - @RequestParam int startFrom, - @RequestParam int pageSize) + public CommunitiesResponse getCommunitiesByName(@PathVariable String serverName, + @PathVariable String userId, + @RequestBody NameRequestBody requestBody, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getCommunitiesByName(serverName, userId, requestBody, startFrom, pageSize); } @@ -269,11 +261,11 @@ public CommunityListResponse getCommunitiesByName(@PathVariable String */ @GetMapping(path = "/person-roles/by-community/{communityGUID}") - public PersonRoleListResponse getRolesForCommunity(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String communityGUID, - @RequestParam int startFrom, - @RequestParam int pageSize) + public PersonRolesResponse getRolesForCommunity(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String communityGUID, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getRolesForCommunity(serverName, userId, communityGUID, startFrom, pageSize); } @@ -294,10 +286,10 @@ public PersonRoleListResponse getRolesForCommunity(@PathVariable String */ @GetMapping(path = "/communities") - public CommunityListResponse getCommunitiesByName(@PathVariable String serverName, - @PathVariable String userId, - @RequestParam int startFrom, - @RequestParam int pageSize) + public CommunitiesResponse getCommunitiesByName(@PathVariable String serverName, + @PathVariable String userId, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getCommunities(serverName, userId, startFrom, pageSize); } diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-spring/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/spring/LocationManagementResource.java b/open-metadata-implementation/access-services/community-profile/community-profile-spring/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/spring/LocationManagementResource.java index 2f7e220701f..8dd697b3f28 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-spring/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/spring/LocationManagementResource.java +++ b/open-metadata-implementation/access-services/community-profile/community-profile-spring/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/spring/LocationManagementResource.java @@ -4,18 +4,9 @@ import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.accessservices.communityprofile.rest.ClassificationRequestBody; -import org.odpi.openmetadata.accessservices.communityprofile.rest.ExternalSourceRequestBody; -import org.odpi.openmetadata.accessservices.communityprofile.rest.LocationListResponse; -import org.odpi.openmetadata.accessservices.communityprofile.rest.LocationResponse; -import org.odpi.openmetadata.accessservices.communityprofile.rest.ReferenceableRequestBody; -import org.odpi.openmetadata.accessservices.communityprofile.rest.RelationshipRequestBody; import org.odpi.openmetadata.accessservices.communityprofile.rest.TemplateRequestBody; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.odpi.openmetadata.accessservices.communityprofile.server.LocationRESTServices; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; @@ -87,7 +78,7 @@ public GUIDResponse createLocation(@PathVariable String server public GUIDResponse createLocationFromTemplate(@PathVariable String serverName, @PathVariable String userId, @PathVariable String templateGUID, - @RequestBody TemplateRequestBody templateProperties) + @RequestBody TemplateRequestBody templateProperties) { return restAPI.createLocationFromTemplate(serverName, userId, templateGUID, templateProperties); } @@ -521,11 +512,11 @@ public VoidResponse clearAssetLocation(@PathVariable String s */ @PostMapping(path = "/locations/by-search-string") - public LocationListResponse findLocations(@PathVariable String serverName, - @PathVariable String userId, - @RequestParam int startFrom, - @RequestParam int pageSize, - @RequestBody SearchStringRequestBody requestBody) + public LocationsResponse findLocations(@PathVariable String serverName, + @PathVariable String userId, + @RequestParam int startFrom, + @RequestParam int pageSize, + @RequestBody SearchStringRequestBody requestBody) { return restAPI.findLocations(serverName, userId, requestBody, startFrom, pageSize); } @@ -548,11 +539,11 @@ public LocationListResponse findLocations(@PathVariable String */ @PostMapping(path = "/locations/by-name") - public LocationListResponse getLocationsByName(@PathVariable String serverName, - @PathVariable String userId, - @RequestParam int startFrom, - @RequestParam int pageSize, - @RequestBody NameRequestBody requestBody) + public LocationsResponse getLocationsByName(@PathVariable String serverName, + @PathVariable String userId, + @RequestParam int startFrom, + @RequestParam int pageSize, + @RequestBody NameRequestBody requestBody) { return restAPI.getLocationsByName(serverName, userId, requestBody, startFrom, pageSize); } @@ -574,11 +565,11 @@ public LocationListResponse getLocationsByName(@PathVariable String ser */ @GetMapping(path = "/locations/{locationGUID}/has-peer-locations") - public LocationListResponse getAdjacentLocations(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String locationGUID, - @RequestParam int startFrom, - @RequestParam int pageSize) + public LocationsResponse getAdjacentLocations(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String locationGUID, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getAdjacentLocations(serverName, userId, locationGUID, startFrom, pageSize); } @@ -600,11 +591,11 @@ public LocationListResponse getAdjacentLocations(@PathVariable String serverName */ @GetMapping(path = "/locations/{locationGUID}/has-nested-locations") - public LocationListResponse getNestedLocations(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String locationGUID, - @RequestParam int startFrom, - @RequestParam int pageSize) + public LocationsResponse getNestedLocations(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String locationGUID, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getNestedLocations(serverName, userId, locationGUID, startFrom, pageSize); } @@ -626,11 +617,11 @@ public LocationListResponse getNestedLocations(@PathVariable String serverName, */ @GetMapping(path = "/locations/{locationGUID}/has-grouping-locations") - public LocationListResponse getGroupingLocations(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String locationGUID, - @RequestParam int startFrom, - @RequestParam int pageSize) + public LocationsResponse getGroupingLocations(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String locationGUID, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getGroupingLocations(serverName, userId, locationGUID, startFrom, pageSize); } @@ -652,11 +643,11 @@ public LocationListResponse getGroupingLocations(@PathVariable String serverName */ @GetMapping(path = "/locations/by-actor-profile/{actorProfileGUID}") - public LocationListResponse getLocationsByProfile(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String actorProfileGUID, - @RequestParam int startFrom, - @RequestParam int pageSize) + public LocationsResponse getLocationsByProfile(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String actorProfileGUID, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getLocationsByProfile(serverName, userId, actorProfileGUID, startFrom, pageSize); } @@ -678,11 +669,11 @@ public LocationListResponse getLocationsByProfile(@PathVariable String serverNam */ @GetMapping(path = "/locations/by-asset/{assetGUID}") - public LocationListResponse getKnownLocationsForAsset(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String assetGUID, - @RequestParam int startFrom, - @RequestParam int pageSize) + public LocationsResponse getKnownLocationsForAsset(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String assetGUID, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getKnownLocationsForAsset(serverName, userId, assetGUID, startFrom, pageSize); } @@ -704,10 +695,10 @@ public LocationListResponse getKnownLocationsForAsset(@PathVariable String serve */ @GetMapping(path = "/locations") - public LocationListResponse getLocations(@PathVariable String serverName, - @PathVariable String userId, - @RequestParam int startFrom, - @RequestParam int pageSize) + public LocationsResponse getLocations(@PathVariable String serverName, + @PathVariable String userId, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getLocations(serverName, userId, startFrom, pageSize); } diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-spring/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/spring/OrganizationResource.java b/open-metadata-implementation/access-services/community-profile/community-profile-spring/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/spring/OrganizationResource.java index 360207208e2..4d1fbcac76a 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-spring/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/spring/OrganizationResource.java +++ b/open-metadata-implementation/access-services/community-profile/community-profile-spring/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/spring/OrganizationResource.java @@ -4,25 +4,9 @@ import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.accessservices.communityprofile.rest.ActorProfileListResponse; -import org.odpi.openmetadata.accessservices.communityprofile.rest.ActorProfileRequestBody; -import org.odpi.openmetadata.accessservices.communityprofile.rest.ActorProfileResponse; -import org.odpi.openmetadata.accessservices.communityprofile.rest.AppointmentRequestBody; -import org.odpi.openmetadata.accessservices.communityprofile.rest.ContactMethodRequestBody; -import org.odpi.openmetadata.accessservices.communityprofile.rest.EffectiveDatesRequestBody; -import org.odpi.openmetadata.accessservices.communityprofile.rest.EffectiveTimeRequestBody; -import org.odpi.openmetadata.accessservices.communityprofile.rest.ExternalSourceRequestBody; -import org.odpi.openmetadata.accessservices.communityprofile.rest.PersonRoleAppointeeListResponse; -import org.odpi.openmetadata.accessservices.communityprofile.rest.PersonRoleListResponse; -import org.odpi.openmetadata.accessservices.communityprofile.rest.PersonRoleRequestBody; -import org.odpi.openmetadata.accessservices.communityprofile.rest.PersonRoleResponse; - -import org.odpi.openmetadata.accessservices.communityprofile.rest.TeamPlayerRequestBody; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; + import org.odpi.openmetadata.accessservices.communityprofile.server.OrganizationRESTServices; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; @@ -301,10 +285,10 @@ public ActorProfileResponse getActorProfileByUserId(@PathVariable String serverN */ @GetMapping(path = "/profiles") - public ActorProfileListResponse getActorProfiles(@PathVariable String serverName, - @PathVariable String userId, - @RequestParam int startFrom, - @RequestParam int pageSize) + public ActorProfilesResponse getActorProfiles(@PathVariable String serverName, + @PathVariable String userId, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getActorProfiles(serverName, userId, startFrom, pageSize); } @@ -327,11 +311,11 @@ public ActorProfileListResponse getActorProfiles(@PathVariable String serverName */ @GetMapping(path = "/profiles/locations/{locationGUID}") - public ActorProfileListResponse getActorProfilesByLocation(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String locationGUID, - @RequestParam int startFrom, - @RequestParam int pageSize) + public ActorProfilesResponse getActorProfilesByLocation(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String locationGUID, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getActorProfilesByLocation(serverName, userId, locationGUID, startFrom, pageSize); } @@ -354,11 +338,11 @@ public ActorProfileListResponse getActorProfilesByLocation(@PathVariable String */ @PostMapping(path = "/profiles/by-name") - public ActorProfileListResponse getActorProfilesByName(@PathVariable String serverName, - @PathVariable String userId, - @RequestParam int startFrom, - @RequestParam int pageSize, - @RequestBody NameRequestBody requestBody) + public ActorProfilesResponse getActorProfilesByName(@PathVariable String serverName, + @PathVariable String userId, + @RequestParam int startFrom, + @RequestParam int pageSize, + @RequestBody NameRequestBody requestBody) { return restAPI.getActorProfilesByName(serverName, userId, startFrom, pageSize, requestBody); } @@ -381,11 +365,11 @@ public ActorProfileListResponse getActorProfilesByName(@PathVariable String */ @PostMapping(path = "/profiles/by-search-string") - public ActorProfileListResponse findActorProfile(@PathVariable String serverName, - @PathVariable String userId, - @RequestParam int startFrom, - @RequestParam int pageSize, - @RequestBody SearchStringRequestBody requestBody) + public ActorProfilesResponse findActorProfile(@PathVariable String serverName, + @PathVariable String userId, + @RequestParam int startFrom, + @RequestParam int pageSize, + @RequestBody SearchStringRequestBody requestBody) { return restAPI.findActorProfiles(serverName, userId, startFrom, pageSize, requestBody); } @@ -510,12 +494,12 @@ public GUIDResponse linkPersonRoleToProfile(@PathVariable String */ @PostMapping(path = "/person-roles/{personRoleGUID}/appointees") - public PersonRoleAppointeeListResponse getAppointees(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String personRoleGUID, - @RequestParam int startFrom, - @RequestParam int pageSize, - @RequestBody EffectiveTimeRequestBody requestBody) + public AppointeesResponse getAppointees(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String personRoleGUID, + @RequestParam int startFrom, + @RequestParam int pageSize, + @RequestBody EffectiveTimeRequestBody requestBody) { return restAPI.getAppointees(serverName, userId, personRoleGUID, startFrom, pageSize, requestBody); } @@ -667,11 +651,11 @@ public PersonRoleResponse getPersonRoleByGUID(@PathVariable String serverName, */ @PostMapping(path = "/person-roles/by-name") - public PersonRoleListResponse getPersonRoleByName(@PathVariable String serverName, - @PathVariable String userId, - @RequestParam int startFrom, - @RequestParam int pageSize, - @RequestBody NameRequestBody requestBody) + public PersonRolesResponse getPersonRoleByName(@PathVariable String serverName, + @PathVariable String userId, + @RequestParam int startFrom, + @RequestParam int pageSize, + @RequestBody NameRequestBody requestBody) { return restAPI.getPersonRoleByName(serverName, userId, startFrom, pageSize, requestBody); } @@ -695,11 +679,11 @@ public PersonRoleListResponse getPersonRoleByName(@PathVariable String */ @GetMapping(path = "/person-roles/by-team/{teamGUID}/leadership") - public PersonRoleListResponse getLeadershipRolesForTeam(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String teamGUID, - @RequestParam int startFrom, - @RequestParam int pageSize) + public PersonRolesResponse getLeadershipRolesForTeam(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String teamGUID, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getLeadershipRolesForTeam(serverName, userId, teamGUID, startFrom, pageSize); } @@ -722,11 +706,11 @@ public PersonRoleListResponse getLeadershipRolesForTeam(@PathVariable String ser */ @GetMapping(path = "/person-roles/by-team/{teamGUID}/membership") - public PersonRoleListResponse getMembershipRolesForTeam(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String teamGUID, - @RequestParam int startFrom, - @RequestParam int pageSize) + public PersonRolesResponse getMembershipRolesForTeam(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String teamGUID, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getMembershipRolesForTeam(serverName, userId, teamGUID, startFrom, pageSize); } @@ -748,11 +732,11 @@ public PersonRoleListResponse getMembershipRolesForTeam(@PathVariable String ser */ @PostMapping(path = "/person-roles/by-search-string") - public PersonRoleListResponse findPersonRole(@PathVariable String serverName, - @PathVariable String userId, - @RequestParam int startFrom, - @RequestParam int pageSize, - @RequestBody SearchStringRequestBody requestBody) + public PersonRolesResponse findPersonRole(@PathVariable String serverName, + @PathVariable String userId, + @RequestParam int startFrom, + @RequestParam int pageSize, + @RequestBody SearchStringRequestBody requestBody) { return restAPI.findPersonRoles(serverName, userId, startFrom, pageSize, requestBody); } diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-spring/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/spring/RelatedElementsResource.java b/open-metadata-implementation/access-services/community-profile/community-profile-spring/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/spring/RelatedElementsResource.java index 691facfe19b..51d014afb85 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-spring/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/spring/RelatedElementsResource.java +++ b/open-metadata-implementation/access-services/community-profile/community-profile-spring/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/spring/RelatedElementsResource.java @@ -4,12 +4,9 @@ import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.accessservices.communityprofile.rest.ExternalSourceRequestBody; -import org.odpi.openmetadata.accessservices.communityprofile.rest.RelatedElementListResponse; -import org.odpi.openmetadata.accessservices.communityprofile.rest.RelationshipRequestBody; -import org.odpi.openmetadata.accessservices.communityprofile.server.RelatedElementRESTServices; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; +import org.odpi.openmetadata.accessservices.communityprofile.server.RelatedElementRESTServices; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; @@ -112,11 +109,11 @@ public VoidResponse clearMoreInformation(@PathVariable String */ @GetMapping(path = "/related-elements/more-information/by-descriptive-element/{elementGUID}") - public RelatedElementListResponse getMoreInformation(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String elementGUID, - @RequestParam int startFrom, - @RequestParam int pageSize) + public RelatedElementsResponse getMoreInformation(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String elementGUID, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getMoreInformation(serverName, userId, elementGUID, startFrom, pageSize); } @@ -138,11 +135,11 @@ public RelatedElementListResponse getMoreInformation(@PathVariable String serve */ @GetMapping(path = "/related-elements/more-information/by-detail-element/{detailGUID}") - public RelatedElementListResponse getDescriptiveElements(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String detailGUID, - @RequestParam int startFrom, - @RequestParam int pageSize) + public RelatedElementsResponse getDescriptiveElements(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String detailGUID, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getDescriptiveElements(serverName, userId, detailGUID, startFrom, pageSize); } @@ -216,11 +213,11 @@ public VoidResponse clearStakeholder(@PathVariable String ser */ @GetMapping(path = "/related-elements/stakeholders/by-commissioned-element/{elementGUID}") - public RelatedElementListResponse getStakeholders(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String elementGUID, - @RequestParam int startFrom, - @RequestParam int pageSize) + public RelatedElementsResponse getStakeholders(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String elementGUID, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getStakeholders(serverName, userId, elementGUID, startFrom, pageSize); } @@ -242,11 +239,11 @@ public RelatedElementListResponse getStakeholders(@PathVariable String serverNa */ @GetMapping(path = "/related-elements/stakeholders/by-stakeholder/{stakeholderGUID}") - public RelatedElementListResponse getStakeholderCommissionedElements(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String stakeholderGUID, - @RequestParam int startFrom, - @RequestParam int pageSize) + public RelatedElementsResponse getStakeholderCommissionedElements(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String stakeholderGUID, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getStakeholderCommissionedElements(serverName, userId, stakeholderGUID, startFrom, pageSize); } @@ -320,11 +317,11 @@ public VoidResponse clearAssignmentScope(@PathVariable String */ @GetMapping(path = "/related-elements/assignment-scopes/by-assigned-actor/{elementGUID}") - public RelatedElementListResponse getAssignedScopes(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String elementGUID, - @RequestParam int startFrom, - @RequestParam int pageSize) + public RelatedElementsResponse getAssignedScopes(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String elementGUID, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getAssignedScopes(serverName, userId, elementGUID, startFrom, pageSize); } @@ -346,11 +343,11 @@ public RelatedElementListResponse getAssignedScopes(@PathVariable String server */ @GetMapping(path = "/related-elements/assignment-scopes/by-assigned-scope/{scopeGUID}") - public RelatedElementListResponse getAssignedActors(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String scopeGUID, - @RequestParam int startFrom, - @RequestParam int pageSize) + public RelatedElementsResponse getAssignedActors(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String scopeGUID, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getAssignedActors(serverName, userId, scopeGUID, startFrom, pageSize); } @@ -424,11 +421,11 @@ public VoidResponse clearResource(@PathVariable String server */ @GetMapping(path = "/related-elements/resource-list/by-assignee/{elementGUID}") - public RelatedElementListResponse getResourceList(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String elementGUID, - @RequestParam int startFrom, - @RequestParam int pageSize) + public RelatedElementsResponse getResourceList(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String elementGUID, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getResourceList(serverName, userId, elementGUID, startFrom, pageSize); } @@ -450,11 +447,11 @@ public RelatedElementListResponse getResourceList(@PathVariable String serverNa */ @GetMapping(path = "/related-elements/resource-list/by-resource/{resourceGUID}") - public RelatedElementListResponse getSupportedByResource(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String resourceGUID, - @RequestParam int startFrom, - @RequestParam int pageSize) + public RelatedElementsResponse getSupportedByResource(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String resourceGUID, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getSupportedByResource(serverName, userId, resourceGUID, startFrom, pageSize); } diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-spring/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/spring/SecurityGroupResource.java b/open-metadata-implementation/access-services/community-profile/community-profile-spring/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/spring/SecurityGroupResource.java index b9d315bed4f..f7032b9adba 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-spring/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/spring/SecurityGroupResource.java +++ b/open-metadata-implementation/access-services/community-profile/community-profile-spring/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/spring/SecurityGroupResource.java @@ -4,16 +4,10 @@ import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.accessservices.communityprofile.properties.SecurityGroupProperties; -import org.odpi.openmetadata.accessservices.communityprofile.rest.ElementStubsResponse; -import org.odpi.openmetadata.accessservices.communityprofile.rest.SecurityGroupResponse; -import org.odpi.openmetadata.accessservices.communityprofile.rest.SecurityGroupsResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.odpi.openmetadata.accessservices.communityprofile.server.SecurityGroupRESTServices; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NullRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; +import org.odpi.openmetadata.frameworks.openmetadata.properties.security.SecurityGroupProperties; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; @@ -24,7 +18,7 @@ /** * The SecurityGroupResource provides a Spring based server-side REST API - * that supports the SecruityGroupManagementInterface. It delegates each request to the + * that supports the SecurityGroupManagementInterface. It delegates each request to the * SecurityGroupRESTServices. This provides the server-side implementation of the Community Profile Open Metadata * Access Service (OMAS) which is used to manage information about people, roles and organizations. */ @@ -63,7 +57,7 @@ public SecurityGroupResource() public GUIDResponse createSecurityGroup(@PathVariable String serverName, @PathVariable String userId, - @RequestBody SecurityGroupProperties requestBody) + @RequestBody SecurityGroupProperties requestBody) { return restAPI.createSecurityGroup(serverName, userId, requestBody); } diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-spring/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/spring/UserIdentityResource.java b/open-metadata-implementation/access-services/community-profile/community-profile-spring/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/spring/UserIdentityResource.java index edae14c6690..2e7c1e42929 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-spring/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/spring/UserIdentityResource.java +++ b/open-metadata-implementation/access-services/community-profile/community-profile-spring/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/server/spring/UserIdentityResource.java @@ -4,16 +4,9 @@ import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.accessservices.communityprofile.rest.ExternalSourceRequestBody; -import org.odpi.openmetadata.accessservices.communityprofile.rest.ReferenceableRequestBody; -import org.odpi.openmetadata.accessservices.communityprofile.rest.RelationshipRequestBody; -import org.odpi.openmetadata.accessservices.communityprofile.rest.UserIdentityListResponse; -import org.odpi.openmetadata.accessservices.communityprofile.rest.UserIdentityResponse; + import org.odpi.openmetadata.accessservices.communityprofile.server.UserIdentityRESTServices; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.springframework.web.bind.annotation.*; /** @@ -207,11 +200,11 @@ public VoidResponse removeIdentityFromProfile(@PathVariable String */ @PostMapping(path = "/user-identities/by-search-string") - public UserIdentityListResponse findUserIdentities(@PathVariable String serverName, - @PathVariable String userId, - @RequestParam int startFrom, - @RequestParam int pageSize, - @RequestBody SearchStringRequestBody requestBody) + public UserIdentitiesResponse findUserIdentities(@PathVariable String serverName, + @PathVariable String userId, + @RequestParam int startFrom, + @RequestParam int pageSize, + @RequestBody SearchStringRequestBody requestBody) { return restAPI.findUserIdentities(serverName, userId, startFrom, pageSize, requestBody); } @@ -234,11 +227,11 @@ public UserIdentityListResponse findUserIdentities(@PathVariable String */ @PostMapping(path = "/user-identities/by-name") - public UserIdentityListResponse getUserIdentitiesByName(@PathVariable String serverName, - @PathVariable String userId, - @RequestParam int startFrom, - @RequestParam int pageSize, - @RequestBody NameRequestBody requestBody) + public UserIdentitiesResponse getUserIdentitiesByName(@PathVariable String serverName, + @PathVariable String userId, + @RequestParam int startFrom, + @RequestParam int pageSize, + @RequestBody NameRequestBody requestBody) { return restAPI.getUserIdentitiesByName(serverName, userId, startFrom, pageSize, requestBody); } @@ -252,7 +245,6 @@ public UserIdentityListResponse getUserIdentitiesByName(@PathVariable String * @param userIdentityGUID unique identifier of the requested metadata element * * @return matching metadata element or - * * InvalidParameterException one of the parameters is invalid * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-topic-connectors/build.gradle b/open-metadata-implementation/access-services/community-profile/community-profile-topic-connectors/build.gradle index a38648fc74e..6c36fbed653 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-topic-connectors/build.gradle +++ b/open-metadata-implementation/access-services/community-profile/community-profile-topic-connectors/build.gradle @@ -6,6 +6,7 @@ dependencies { implementation project(':open-metadata-implementation:frameworks:audit-log-framework') + implementation project(':open-metadata-implementation:frameworks:open-metadata-framework') implementation project(':open-metadata-implementation:frameworks:open-connector-framework') implementation project(':open-metadata-implementation:repository-services:repository-services-apis') implementation project(':open-metadata-implementation:access-services:community-profile:community-profile-api') diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-topic-connectors/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/connectors/outtopic/CommunityProfileOutTopicClientConnector.java b/open-metadata-implementation/access-services/community-profile/community-profile-topic-connectors/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/connectors/outtopic/CommunityProfileOutTopicClientConnector.java index f01e3352b1b..f83a36999d3 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-topic-connectors/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/connectors/outtopic/CommunityProfileOutTopicClientConnector.java +++ b/open-metadata-implementation/access-services/community-profile/community-profile-topic-connectors/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/connectors/outtopic/CommunityProfileOutTopicClientConnector.java @@ -23,7 +23,7 @@ public class CommunityProfileOutTopicClientConnector extends OpenMetadataTopicLi { private static final Logger log = LoggerFactory.getLogger(CommunityProfileOutTopicClientConnector.class); - private List internalEventListeners = new ArrayList<>(); + private final List internalEventListeners = new ArrayList<>(); /** diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-topic-connectors/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/connectors/outtopic/CommunityProfileOutTopicClientProvider.java b/open-metadata-implementation/access-services/community-profile/community-profile-topic-connectors/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/connectors/outtopic/CommunityProfileOutTopicClientProvider.java index 2d001ca0fdc..8982dfb81f2 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-topic-connectors/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/connectors/outtopic/CommunityProfileOutTopicClientProvider.java +++ b/open-metadata-implementation/access-services/community-profile/community-profile-topic-connectors/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/connectors/outtopic/CommunityProfileOutTopicClientProvider.java @@ -8,7 +8,6 @@ /** * The CommunityProfileOutTopicClientProvider provides a base class for the connector provider supporting * CommunityProfileOutTopicClientConnector Connectors. - * * It extends ConnectorProviderBase which does the creation of connector instances. The subclasses of * CommunityProfileOutTopicClientProvider must initialize ConnectorProviderBase with the Java class * name of their Connector implementation (by calling super.setConnectorClassName(className)). diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/api/APIManagerInterface.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/api/APIManagerInterface.java index c01cbbb7b88..392b21e3c91 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/api/APIManagerInterface.java +++ b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/api/APIManagerInterface.java @@ -1,14 +1,18 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.datamanager.api; - -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.APIOperationElement; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.APIElement; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.APIParameterListElement; -import org.odpi.openmetadata.accessservices.datamanager.properties.*; +; +import org.odpi.openmetadata.accessservices.datamanager.properties.TemplateProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.APIElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.APIOperationElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.APIParameterListElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.apis.APIProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.apis.APIOperationProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.apis.APIParameterListProperties; +import org.odpi.openmetadata.frameworks.openmetadata.enums.APIParameterListType; import java.util.List; @@ -485,7 +489,7 @@ String createAPIParameterList(String userId, String apiManagerGUID, String apiManagerName, String apiOperationGUID, - APIParameterListType parameterListType, + APIParameterListType parameterListType, APIParameterListProperties properties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException; diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/api/ConnectionManagerInterface.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/api/ConnectionManagerInterface.java index d6e4beeb9fe..4b129cac594 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/api/ConnectionManagerInterface.java +++ b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/api/ConnectionManagerInterface.java @@ -3,24 +3,21 @@ package org.odpi.openmetadata.accessservices.datamanager.api; - -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.ConnectionElement; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.ConnectorTypeElement; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.EndpointElement; -import org.odpi.openmetadata.accessservices.datamanager.properties.ConnectionProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.ConnectorTypeProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.EndpointProperties; import org.odpi.openmetadata.accessservices.datamanager.properties.TemplateProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ConnectionElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ConnectorTypeElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.EndpointElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.ConnectionProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.EndpointProperties; import java.util.List; import java.util.Map; /** * ManageConnections provides methods to define connections and their supporting objects - * * The interface supports the following types of objects * *
    diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/api/DatabaseManagerInterface.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/api/DatabaseManagerInterface.java index 0971f62be2b..f8de9d74cc3 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/api/DatabaseManagerInterface.java +++ b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/api/DatabaseManagerInterface.java @@ -2,11 +2,14 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.datamanager.api; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.*; import org.odpi.openmetadata.accessservices.datamanager.properties.*; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.databases.DatabaseProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.databases.DatabaseSchemaProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.databases.*; import java.util.List; diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/api/DisplayApplicationInterface.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/api/DisplayApplicationInterface.java index ab3b769215a..2e660f5418a 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/api/DisplayApplicationInterface.java +++ b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/api/DisplayApplicationInterface.java @@ -2,12 +2,17 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.datamanager.api; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.*; -import org.odpi.openmetadata.accessservices.datamanager.properties.*; +import org.odpi.openmetadata.accessservices.datamanager.properties.TemplateProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.display.FormProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.display.QueryProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.display.ReportProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.display.DataContainerProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.display.DataFieldProperties; import java.util.List; diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/api/EventBrokerInterface.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/api/EventBrokerInterface.java index 9757942e64c..f3c33098eb2 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/api/EventBrokerInterface.java +++ b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/api/EventBrokerInterface.java @@ -2,11 +2,14 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.datamanager.api; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.*; + import org.odpi.openmetadata.accessservices.datamanager.properties.*; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.topics.TopicProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.events.EventTypeProperties; import java.util.List; diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/api/ExternalReferenceManagerInterface.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/api/ExternalReferenceManagerInterface.java index d063a91f5e3..5d0b4f7941c 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/api/ExternalReferenceManagerInterface.java +++ b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/api/ExternalReferenceManagerInterface.java @@ -2,11 +2,11 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.datamanager.api; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.ExternalReferenceElement; -import org.odpi.openmetadata.accessservices.datamanager.properties.ExternalReferenceProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ExternalReferenceElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.externalreferences.ExternalReferenceProperties; import java.util.List; diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/api/FilesAndFoldersInterface.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/api/FilesAndFoldersInterface.java index 4cb97aa49d2..a26b78f55b5 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/api/FilesAndFoldersInterface.java +++ b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/api/FilesAndFoldersInterface.java @@ -3,11 +3,12 @@ package org.odpi.openmetadata.accessservices.datamanager.api; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.DataFileElement; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.FileFolderElement; -import org.odpi.openmetadata.accessservices.datamanager.properties.ArchiveProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.DataFileProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.FileFolderProperties; + +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.DataFileElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.FileFolderElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ArchiveProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.filesandfolders.DataFileProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.filesandfolders.FileFolderProperties; import org.odpi.openmetadata.accessservices.datamanager.properties.TemplateProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/api/MetadataSourceInterface.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/api/MetadataSourceInterface.java index 3f2f33d4800..a40dbd4eb21 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/api/MetadataSourceInterface.java +++ b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/api/MetadataSourceInterface.java @@ -3,10 +3,10 @@ package org.odpi.openmetadata.accessservices.datamanager.api; -import org.odpi.openmetadata.accessservices.datamanager.properties.*; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities.*; /** * MetadataSourceInterface is the interface used to define information about the third party technologies that diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/api/SchemaManagerInterface.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/api/SchemaManagerInterface.java index a1df06b93d1..116fe4f30d9 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/api/SchemaManagerInterface.java +++ b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/api/SchemaManagerInterface.java @@ -2,12 +2,13 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.datamanager.api; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.*; -import org.odpi.openmetadata.accessservices.datamanager.properties.*; +import org.odpi.openmetadata.accessservices.datamanager.properties.TemplateProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.*; import java.util.List; diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/api/ValidValueManagementInterface.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/api/ValidValueManagementInterface.java index 246bcdfc5a2..f06895d6598 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/api/ValidValueManagementInterface.java +++ b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/api/ValidValueManagementInterface.java @@ -2,15 +2,11 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.datamanager.api; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.RelatedElement; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.ValidValueElement; -import org.odpi.openmetadata.accessservices.datamanager.properties.ReferenceValueAssignmentProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.ValidValueAssignmentProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.ValidValueMembershipProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.ValidValueProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues.*; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; import java.util.List; diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/events/DataManagerOutboundEvent.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/events/DataManagerOutboundEvent.java index d223e9f34d1..107d6f33821 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/events/DataManagerOutboundEvent.java +++ b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/events/DataManagerOutboundEvent.java @@ -5,7 +5,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementStub; import java.util.Objects; diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/ConnectionElement.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/ConnectionElement.java deleted file mode 100644 index 69afc3107e6..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/ConnectionElement.java +++ /dev/null @@ -1,238 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.properties.ConnectionProperties; - -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; - -/** - * ConnectionElement contains the properties and header for a connection retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ConnectionElement implements MetadataElement -{ - private ConnectionProperties connectionProperties = null; - private ElementHeader elementHeader = null; - private ElementStub connectorType = null; - private ElementStub endpoint = null; - private List embeddedConnections = null; - - - /** - * Default constructor - */ - public ConnectionElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ConnectionElement(ConnectionElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - connectionProperties = template.getConnectionProperties(); - connectorType = template.getConnectorType(); - endpoint = template.getEndpoint(); - embeddedConnections = template.getEmbeddedConnections(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - @Override - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the properties for the connection. - * - * @return asset properties (using appropriate subclass) - */ - public ConnectionProperties getConnectionProperties() - { - return connectionProperties; - } - - - /** - * Set up the properties for the connection. - * - * @param connectionProperties asset properties - */ - public void setConnectionProperties(ConnectionProperties connectionProperties) - { - this.connectionProperties = connectionProperties; - } - - - /** - * Set up the connector type properties for this Connection. - * - * @param connectorType ConnectorType properties object - */ - public void setConnectorType(ElementStub connectorType) - { - this.connectorType = connectorType; - } - - - /** - * Returns a copy of the properties for this connection's connector type. - * A null means there is no connection type. - * - * @return connector type for the connection - */ - public ElementStub getConnectorType() - { - return connectorType; - } - - - /** - * Set up the endpoint properties for this Connection. - * - * @param endpoint Endpoint properties object - */ - public void setEndpoint(ElementStub endpoint) - { - this.endpoint = endpoint; - } - - - /** - * Returns a copy of the properties for this connection's endpoint. - * Null means no endpoint information available. - * - * @return endpoint for the connection - */ - public ElementStub getEndpoint() - { - return endpoint; - } - - - /** - * Return the list of embedded connections for this virtual connection. - * - * @return list of EmbeddedConnection objects - */ - public List getEmbeddedConnections() - { - if (embeddedConnections == null) - { - return null; - } - else if (embeddedConnections.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(embeddedConnections); - } - } - - - /** - * Set up the list of embedded connections for this virtual connection. - * - * @param embeddedConnections list of EmbeddedConnection objects - */ - public void setEmbeddedConnections(List embeddedConnections) - { - this.embeddedConnections = embeddedConnections; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ConnectionElement{" + - "connectionProperties=" + connectionProperties + - ", elementHeader=" + elementHeader + - ", connectorType=" + connectorType + - ", endpoint=" + endpoint + - ", embeddedConnections=" + embeddedConnections + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ConnectionElement that = (ConnectionElement) objectToCompare; - return Objects.equals(getConnectionProperties(), that.getConnectionProperties()) && - Objects.equals(getElementHeader(), that.getElementHeader()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementHeader, connectionProperties); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/ConnectorTypeElement.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/ConnectorTypeElement.java deleted file mode 100644 index ef8d5eed5ea..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/ConnectorTypeElement.java +++ /dev/null @@ -1,148 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.properties.ConnectorTypeProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * ConnectorTypeElement contains the properties and header for a connector type retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ConnectorTypeElement implements MetadataElement -{ - private ConnectorTypeProperties connectorTypeProperties = null; - private ElementHeader elementHeader = null; - - - /** - * Default constructor - */ - public ConnectorTypeElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ConnectorTypeElement(ConnectorTypeElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - connectorTypeProperties = template.getConnectorTypeProperties(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - @Override - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - - /** - * Return the properties for the connector type. - * - * @return asset properties (using appropriate subclass) - */ - public ConnectorTypeProperties getConnectorTypeProperties() - { - return connectorTypeProperties; - } - - - /** - * Set up the properties for the connector type. - * - * @param connectorTypeProperties asset properties - */ - public void setConnectorTypeProperties(ConnectorTypeProperties connectorTypeProperties) - { - this.connectorTypeProperties = connectorTypeProperties; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ConnectorTypeElement{" + - "connectorTypeProperties=" + connectorTypeProperties + - ", elementHeader=" + elementHeader + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ConnectorTypeElement that = (ConnectorTypeElement) objectToCompare; - return Objects.equals(getConnectorTypeProperties(), that.getConnectorTypeProperties()) && - Objects.equals(getElementHeader(), that.getElementHeader()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementHeader, connectorTypeProperties); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/EmbeddedConnection.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/EmbeddedConnection.java deleted file mode 100644 index e3b15904f93..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/EmbeddedConnection.java +++ /dev/null @@ -1,214 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.metadataelements; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; - -/** - * The EmbeddedConnection is used within a VirtualConnection to link to the embedded connections. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class EmbeddedConnection -{ - /* - * Attributes of an embedded connection - */ - protected int position = 0; - protected String displayName = null; - protected Map arguments = null; - protected ElementStub embeddedConnection = null; - - - /** - * Default constructor - */ - public EmbeddedConnection() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template element to copy - */ - public EmbeddedConnection(EmbeddedConnection template) - { - if (template != null) - { - position = template.getPosition(); - displayName = template.getDisplayName(); - arguments = template.getArguments(); - embeddedConnection = template.getEmbeddedConnection(); - } - } - - - /** - * Return the position that this connector is in the list of embedded connectors. - * - * @return int - */ - public int getPosition() - { - return position; - } - - - /** - * Set up the position that this connector is in the list of embedded connectors. - * - * @param position int - */ - public void setPosition(int position) - { - this.position = position; - } - - - /** - * Return the printable name of the embedded connection. - * - * @return String name - */ - public String getDisplayName() - { - return displayName; - } - - - /** - * Set up the printable name of the embedded connection. - * - * @param displayName String name - */ - public void setDisplayName(String displayName) - { - this.displayName = displayName; - } - - - /** - * Return the arguments for the embedded connection. - * - * @return property map - */ - public Map getArguments() - { - if (arguments == null) - { - return null; - } - else if (arguments.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(arguments); - } - } - - - /** - * Set up the arguments for the embedded connection. - * - * @param arguments property map - */ - public void setArguments(Map arguments) - { - this.arguments = arguments; - } - - - /** - * Return the embedded connection. - * - * @return header of Connection object. - */ - public ElementStub getEmbeddedConnection() - { - return embeddedConnection; - } - - - /** - * Set up the embedded connection - * - * @param embeddedConnection header of Connection object - */ - public void setEmbeddedConnection(ElementStub embeddedConnection) - { - this.embeddedConnection = embeddedConnection; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "EmbeddedConnection{" + - "position=" + position + - ", displayName='" + displayName + '\'' + - ", arguments=" + arguments + - ", embeddedConnection=" + embeddedConnection + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - EmbeddedConnection that = (EmbeddedConnection) objectToCompare; - return position == that.position && - Objects.equals(displayName, that.displayName) && - Objects.equals(arguments, that.arguments) && - Objects.equals(embeddedConnection, that.embeddedConnection); - } - - - - /** - * Create a hash code for this element type. - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(position, displayName, arguments, embeddedConnection); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/EndpointElement.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/EndpointElement.java deleted file mode 100644 index 9f19528a358..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/EndpointElement.java +++ /dev/null @@ -1,147 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.properties.EndpointProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * EndpointElement contains the properties and header for an endpoint retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class EndpointElement implements MetadataElement -{ - private EndpointProperties endpointProperties = null; - private ElementHeader elementHeader = null; - - - /** - * Default constructor - */ - public EndpointElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public EndpointElement(EndpointElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - endpointProperties = template.getEndpointProperties(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - @Override - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the properties for the endpoint. - * - * @return asset properties (using appropriate subclass) - */ - public EndpointProperties getEndpointProperties() - { - return endpointProperties; - } - - - /** - * Set up the properties for the endpoint. - * - * @param endpointProperties asset properties - */ - public void setEndpointProperties(EndpointProperties endpointProperties) - { - this.endpointProperties = endpointProperties; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "EndpointElement{" + - "endpointProperties=" + endpointProperties + - ", elementHeader=" + elementHeader + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - EndpointElement that = (EndpointElement) objectToCompare; - return Objects.equals(getEndpointProperties(), that.getEndpointProperties()) && - Objects.equals(getElementHeader(), that.getElementHeader()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementHeader, endpointProperties); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/ExternalReferenceElement.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/ExternalReferenceElement.java deleted file mode 100644 index 70bdc843fcd..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/ExternalReferenceElement.java +++ /dev/null @@ -1,143 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.properties.ExternalReferenceProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * ExternalReferenceElement stores information about an link to an external resource that is relevant to this element. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ExternalReferenceElement implements MetadataElement -{ - private ElementHeader elementHeader = null; - private ExternalReferenceProperties properties = null; - - /** - * Default Constructor - */ - public ExternalReferenceElement() - { - } - - - /** - * Copy/clone Constructor - the resulting object. - * - * @param template object being copied - */ - public ExternalReferenceElement(ExternalReferenceElement template) - { - if (template != null) - { - this.elementHeader = template.getElementHeader(); - this.properties = template.getProperties(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the link to external documentation that are relevant to this element. - * - * @return list of external references - */ - public ExternalReferenceProperties getProperties() - { - return properties; - } - - - /** - * Set up the list of links to external documentation that are relevant to this element. - * - * @param properties of external references - */ - public void setProperties(ExternalReferenceProperties properties) - { - this.properties = properties; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "ExternalReferenceElement{" + - "elementHeader=" + elementHeader + - ", properties=" + properties + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ExternalReferenceElement that = (ExternalReferenceElement) objectToCompare; - return Objects.equals(elementHeader, that.elementHeader) && - Objects.equals(properties, that.properties); - } - - - /** - * Hash of properties - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), properties, elementHeader); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/FileSystemElement.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/FileSystemElement.java deleted file mode 100644 index 4a460a06f8f..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/FileSystemElement.java +++ /dev/null @@ -1,147 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.properties.FileSystemProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * FileSystemElement contains the properties and header for a SoftwareCapability entity retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class FileSystemElement implements MetadataElement -{ - private ElementHeader elementHeader = null; - private FileSystemProperties fileSystemProperties = null; - - - /** - * Default constructor - */ - public FileSystemElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public FileSystemElement(FileSystemElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - fileSystemProperties = template.getFileSystemProperties(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - @Override - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the properties of the file system. - * - * @return file system properties - */ - public FileSystemProperties getFileSystemProperties() - { - return fileSystemProperties; - } - - - /** - * Set up the properties for the file system. - * - * @param fileSystemProperties file system properties - */ - public void setFileSystemProperties(FileSystemProperties fileSystemProperties) - { - this.fileSystemProperties = fileSystemProperties; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "FileSystemElement{" + - "elementHeader=" + elementHeader + - ", fileSystemProperties=" + fileSystemProperties + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - FileSystemElement that = (FileSystemElement) objectToCompare; - return Objects.equals(elementHeader, that.elementHeader) && - Objects.equals(fileSystemProperties, that.fileSystemProperties); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementHeader, fileSystemProperties); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/MetadataElement.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/MetadataElement.java deleted file mode 100644 index abb77def0da..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/MetadataElement.java +++ /dev/null @@ -1,28 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.metadataelements; - -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * MetadataElement is the common interface for all metadata elements. It adds the header information that is stored with the properties. - * This includes detains of its unique identifier, type and origin. - */ -public interface MetadataElement -{ - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - ElementHeader getElementHeader(); - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - void setElementHeader(ElementHeader elementHeader); -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/RelatedElement.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/RelatedElement.java deleted file mode 100644 index bd687418f5f..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/RelatedElement.java +++ /dev/null @@ -1,172 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.properties.RelationshipProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; - -/** - * RelatedElement contains the properties and header for a relationship retrieved from the metadata repository along with the stub - * of the related element. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class RelatedElement -{ - private ElementHeader relationshipHeader = null; - private RelationshipProperties relationshipProperties = null; - private ElementStub relatedElement = null; - - /** - * Default constructor - */ - public RelatedElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public RelatedElement(RelatedElement template) - { - if (template != null) - { - relationshipHeader = template.getRelationshipHeader(); - relationshipProperties = template.getRelationshipProperties(); - relatedElement = template.getRelatedElement(); - } - } - - - /** - * Return the element header associated with the relationship. - * - * @return element header object - */ - public ElementHeader getRelationshipHeader() - { - return relationshipHeader; - } - - - /** - * Set up the element header associated with the relationship. - * - * @param relationshipHeader element header object - */ - public void setRelationshipHeader(ElementHeader relationshipHeader) - { - this.relationshipHeader = relationshipHeader; - } - - - /** - * Return details of the relationship - * - * @return relationship properties - */ - public RelationshipProperties getRelationshipProperties() - { - return relationshipProperties; - } - - - /** - * Set up relationship properties - * - * @param relationshipProperties relationship properties - */ - public void setRelationshipProperties(RelationshipProperties relationshipProperties) - { - this.relationshipProperties = relationshipProperties; - } - - - /** - * Return the element header associated with end 1 of the relationship. - * - * @return element stub object - */ - public ElementStub getRelatedElement() - { - return relatedElement; - } - - - /** - * Set up the element header associated with end 1 of the relationship. - * - * @param relatedElement element stub object - */ - public void setRelatedElement(ElementStub relatedElement) - { - this.relatedElement = relatedElement; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "RelatedElement{" + - "relationshipHeader=" + relationshipHeader + - ", relationshipProperties=" + relationshipProperties + - ", relatedElement=" + relatedElement + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - RelatedElement that = (RelatedElement) objectToCompare; - return Objects.equals(getRelationshipHeader(), that.getRelationshipHeader()) && - Objects.equals(getRelationshipProperties(), that.getRelationshipProperties()) && - Objects.equals(getRelatedElement(), that.getRelatedElement()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), relationshipHeader, relationshipProperties, relatedElement); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/RelationshipElement.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/RelationshipElement.java deleted file mode 100644 index b37a0ff5903..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/RelationshipElement.java +++ /dev/null @@ -1,197 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.properties.RelationshipProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * RelationshipElement contains the properties and header for a relationship retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class RelationshipElement -{ - private ElementHeader relationshipHeader = null; - private RelationshipProperties relationshipProperties = null; - private ElementHeader end1GUID = null; - private ElementHeader end2GUID = null; - - /** - * Default constructor - */ - public RelationshipElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public RelationshipElement(RelationshipElement template) - { - if (template != null) - { - relationshipHeader = template.getRelationshipHeader(); - relationshipProperties = template.getRelationshipProperties(); - end1GUID = template.getEnd1GUID(); - end2GUID = template.getEnd2GUID(); - } - } - - - /** - * Return the element header associated with the relationship. - * - * @return element header object - */ - public ElementHeader getRelationshipHeader() - { - return relationshipHeader; - } - - - /** - * Set up the element header associated with the relationship. - * - * @param relationshipHeader element header object - */ - public void setRelationshipHeader(ElementHeader relationshipHeader) - { - this.relationshipHeader = relationshipHeader; - } - - - /** - * Return details of the relationship - * - * @return relationship properties - */ - public RelationshipProperties getRelationshipProperties() - { - return relationshipProperties; - } - - - /** - * Set up relationship properties - * - * @param relationshipProperties relationship properties - */ - public void setRelationshipProperties(RelationshipProperties relationshipProperties) - { - this.relationshipProperties = relationshipProperties; - } - - - /** - * Return the element header associated with end 1 of the relationship. - * - * @return element header object - */ - public ElementHeader getEnd1GUID() - { - return end1GUID; - } - - - /** - * Set up the element header associated with end 1 of the relationship. - * - * @param end1GUID element header object - */ - public void setEnd1GUID(ElementHeader end1GUID) - { - this.end1GUID = end1GUID; - } - - - - /** - * Return the element header associated with end 2 of the relationship. - * - * @return element header object - */ - public ElementHeader getEnd2GUID() - { - return end2GUID; - } - - - /** - * Set up the element header associated with end 2 of the relationship. - * - * @param end2GUID element header object - */ - public void setEnd2GUID(ElementHeader end2GUID) - { - this.end2GUID = end2GUID; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "RelationshipElement{" + - "relationshipHeader=" + relationshipHeader + - ", relationshipProperties=" + relationshipProperties + - ", end1GUID=" + end1GUID + - ", end2GUID=" + end2GUID + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - RelationshipElement that = (RelationshipElement) objectToCompare; - return Objects.equals(getRelationshipHeader(), that.getRelationshipHeader()) && - Objects.equals(getRelationshipProperties(), that.getRelationshipProperties()) && - Objects.equals(getEnd1GUID(), that.getEnd1GUID()) && - Objects.equals(getEnd2GUID(), that.getEnd2GUID()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), relationshipHeader, relationshipProperties, end1GUID, end2GUID); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/SchemaAttributeElement.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/SchemaAttributeElement.java deleted file mode 100644 index cb77f2268ea..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/SchemaAttributeElement.java +++ /dev/null @@ -1,168 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.properties.SchemaAttributeProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * SchemaAttributeElement contains the properties and header for a data field - * retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class SchemaAttributeElement implements MetadataElement -{ - private ElementHeader elementHeader = null; - private SchemaAttributeProperties properties = null; - private SchemaTypeElement type = null; - - /** - * Default constructor - */ - public SchemaAttributeElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public SchemaAttributeElement(SchemaAttributeElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - properties = template.getProperties(); - type = template.getType(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - @Override - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the schema attribute. - * - * @return properties bean - */ - public SchemaAttributeProperties getProperties() - { - return properties; - } - - - /** - * Set up the schema attribute. - * - * @param properties properties bean - */ - public void setProperties(SchemaAttributeProperties properties) - { - this.properties = properties; - } - - - /** - * Set up the SchemaType that describe the structure/content of this attribute. - * - * @return schema type - */ - public SchemaTypeElement getType() - { - return type; - } - - - public void setType(SchemaTypeElement type) - { - this.type = type; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "SchemaAttributeElement{" + - "elementHeader=" + elementHeader + - ", properties=" + properties + - ", type=" + type + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - SchemaAttributeElement that = (SchemaAttributeElement) objectToCompare; - return Objects.equals(elementHeader, that.elementHeader) && - Objects.equals(properties, that.properties) && - Objects.equals(type, that.type); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(elementHeader, properties, type); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/SchemaTypeElement.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/SchemaTypeElement.java deleted file mode 100644 index 8a455dc0ce6..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/SchemaTypeElement.java +++ /dev/null @@ -1,391 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.properties.DerivedSchemaTypeQueryTargetProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.SchemaTypeProperties; - -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * SchemaTypeElement contains the properties and header for a reference data asset retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class SchemaTypeElement implements MetadataElement -{ - private SchemaTypeProperties schemaTypeProperties = null; - private ElementHeader elementHeader = null; - - /* - * For complex schema types such as StructSchemaType - */ - private int attributeCount = 0; - - /* - * For Map Schema Types - */ - private SchemaTypeElement mapFromElement = null; - private SchemaTypeElement mapToElement = null; - - /* - * For External Schema Types - */ - private SchemaTypeElement externalSchemaType = null; - - /* - * Schema options for SchemaTypeChoice - */ - private List schemaOptions = null; - - /* - * Used when a value, or set of values associated with the schema are derived rather than stored. - */ - private String formula = null; - private String formulaType = null; - private List queries = null; - - /** - * Default constructor - */ - public SchemaTypeElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public SchemaTypeElement(SchemaTypeElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - schemaTypeProperties = template.getSchemaTypeProperties(); - - attributeCount = template.getAttributeCount(); - - mapFromElement = template.getMapFromElement(); - mapToElement = template.getMapToElement(); - - externalSchemaType = template.getExternalSchemaType(); - - schemaOptions = template.getSchemaOptions(); - - formula = template.getFormula(); - formulaType = template.getFormulaType(); - queries = template.getQueries(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - @Override - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the properties for the schema. - * - * @return schema properties (using appropriate subclass) - */ - public SchemaTypeProperties getSchemaTypeProperties() - { - return schemaTypeProperties; - } - - - /** - * Set up the properties for the schema. - * - * @param schemaTypeProperties schema properties - */ - public void setSchemaTypeProperties(SchemaTypeProperties schemaTypeProperties) - { - this.schemaTypeProperties = schemaTypeProperties; - } - - - - /** - * Return the count of attributes in this schema type. - * - * @return String data type name - */ - public int getAttributeCount() { return attributeCount; } - - - /** - * Set up the count of attributes in this schema type - * - * @param attributeCount data type name - */ - public void setAttributeCount(int attributeCount) - { - this.attributeCount = attributeCount; - } - - - - /** - * Return the type of schema element that represents the key or property name for the map. - * This is also called the domain of the map. - * - * @return SchemaElement - */ - public SchemaTypeElement getMapFromElement() - { - return mapFromElement; - } - - - /** - * Set up the type of schema element that represents the key or property name for the map. - * This is also called the domain of the map. - * - * @param mapFromElement SchemaElement - */ - public void setMapFromElement(SchemaTypeElement mapFromElement) - { - this.mapFromElement = mapFromElement; - } - - - /** - * Return the type of schema element that represents the property value for the map. - * This is also called the range of the map. - * - * @return SchemaElement - */ - public SchemaTypeElement getMapToElement() - { - return mapToElement; - } - - - /** - * Set up the type of schema element that represents the property value for the map. - * This is also called the range of the map. - * - * @param mapToElement SchemaType - */ - public void setMapToElement(SchemaTypeElement mapToElement) - { - this.mapToElement = mapToElement; - } - - - /** - * Return the schema type that is reusable amongst assets. - * - * @return bean describing external schema - */ - public SchemaTypeElement getExternalSchemaType() - { - return externalSchemaType; - } - - - /** - * Set up the schema type that is reusable amongst assets. - * - * @param externalSchemaType bean describing external schema - */ - public void setExternalSchemaType(SchemaTypeElement externalSchemaType) - { - this.externalSchemaType = externalSchemaType; - } - - - /** - * Return the list of alternative schema types that this attribute or asset may use. - * - * @return list of schema types - */ - public List getSchemaOptions() - { - if (schemaOptions == null) - { - return null; - } - else if (schemaOptions.isEmpty()) - { - return null; - } - - return schemaOptions; - } - - - /** - * Set up the list of alternative schema types that this attribute or asset may use. - * - * @param schemaOptions list of schema types - */ - public void setSchemaOptions(List schemaOptions) - { - this.schemaOptions = schemaOptions; - } - - - /** - * Return the formula used to combine the values of the queries. Each query is has a identifier and the - * formula has placeholders for these identifiers in it to show how the query results are combined. - * - * @return String formula - */ - public String getFormula() { return formula; } - - - /** - * Set up the formula used to combine the values of the queries. Each query is has a identifier and the - * formula has placeholders for these identifiers in it to show how the query results are combined. - * - * @param formula String formula - */ - public void setFormula(String formula) - { - this.formula = formula; - } - - - /** - * Return the specification language for the formula. - * - * @return string description - */ - public String getFormulaType() - { - return formulaType; - } - - - /** - * Set up the specification language for the formula. - * - * @param formulaType string description - */ - public void setFormulaType(String formulaType) - { - this.formulaType = formulaType; - } - - - /** - * Return the list of individual query targets for a derived column. - * - * @return list of queries and their target element - */ - public List getQueries() - { - return queries; - } - - - /** - * Set up the list of individual query targets for a derived column. - * - * @param queries list of queries and their target element - */ - public void setQueries(List queries) - { - this.queries = queries; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "SchemaTypeElement{" + - "schemaTypeProperties=" + schemaTypeProperties + - ", elementHeader=" + elementHeader + - ", attributeCount=" + attributeCount + - ", mapFromElement=" + mapFromElement + - ", mapToElement=" + mapToElement + - ", formula='" + formula + '\'' + - ", formulaType='" + formulaType + '\'' + - ", queries=" + queries + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - SchemaTypeElement that = (SchemaTypeElement) objectToCompare; - return attributeCount == that.attributeCount && - Objects.equals(schemaTypeProperties, that.schemaTypeProperties) && - Objects.equals(elementHeader, that.elementHeader) && - Objects.equals(mapFromElement, that.mapFromElement) && - Objects.equals(mapToElement, that.mapToElement) && - Objects.equals(externalSchemaType, that.externalSchemaType) && - Objects.equals(schemaOptions, that.schemaOptions) && - Objects.equals(formula, that.formula) && - Objects.equals(formulaType, that.formulaType) && - Objects.equals(queries, that.queries); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(schemaTypeProperties, elementHeader, attributeCount, mapFromElement, mapToElement, externalSchemaType, schemaOptions, - formula, formulaType, queries); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/SoftwareCapabilityElement.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/SoftwareCapabilityElement.java deleted file mode 100644 index 73ef71661d9..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/SoftwareCapabilityElement.java +++ /dev/null @@ -1,148 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.properties.SoftwareCapabilitiesProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * SoftwareCapabilityElement contains the properties and header for a software server capabilities entity retrieved from the metadata - * repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class SoftwareCapabilityElement implements MetadataElement -{ - private ElementHeader elementHeader = null; - private SoftwareCapabilitiesProperties softwareCapabilitiesProperties = null; - - - /** - * Default constructor - */ - public SoftwareCapabilityElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public SoftwareCapabilityElement(SoftwareCapabilityElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - softwareCapabilitiesProperties = template.getSoftwareCapabilitiesProperties(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - @Override - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the properties of the software server capability. - * - * @return properties bean - */ - public SoftwareCapabilitiesProperties getSoftwareCapabilitiesProperties() - { - return softwareCapabilitiesProperties; - } - - - /** - * Set up the properties of the software server capability. - * - * @param softwareCapabilitiesProperties properties bean - */ - public void setSoftwareCapabilitiesProperties(SoftwareCapabilitiesProperties softwareCapabilitiesProperties) - { - this.softwareCapabilitiesProperties = softwareCapabilitiesProperties; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "SoftwareCapabilityElement{" + - "elementHeader=" + elementHeader + - ", softwareCapabilitiesProperties=" + softwareCapabilitiesProperties + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - SoftwareCapabilityElement that = (SoftwareCapabilityElement) objectToCompare; - return Objects.equals(elementHeader, that.elementHeader) && - Objects.equals(softwareCapabilitiesProperties, that.softwareCapabilitiesProperties); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementHeader, softwareCapabilitiesProperties); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/ValidValueElement.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/ValidValueElement.java deleted file mode 100644 index 2dd305a1b4e..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/ValidValueElement.java +++ /dev/null @@ -1,175 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.properties.ValidValueProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * ValidValueElement contains the properties and header for a valid value definition or set entity retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ValidValueElement implements MetadataElement -{ - private ElementHeader elementHeader = null; - private ValidValueProperties validValueProperties = null; - private RelatedElement relatedElement = null; - - - /** - * Default constructor - */ - public ValidValueElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ValidValueElement(ValidValueElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - validValueProperties = template.getValidValueProperties(); - relatedElement = getRelatedElement(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - @Override - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the properties for the valid value definition or set. - * - * @return properties bean - */ - public ValidValueProperties getValidValueProperties() - { - return validValueProperties; - } - - - /** - * Set up the properties for the valid value definition or set. - * - * @param validValueProperties properties bean - */ - public void setValidValueProperties(ValidValueProperties validValueProperties) - { - this.validValueProperties = validValueProperties; - } - - - /** - * Return information about the related element and relationship (if any) that was - * used to retrieve the valid value. - * - * @return related element - */ - public RelatedElement getRelatedElement() - { - return relatedElement; - } - - - /** - * Set up information about the related element and relationship (if any) that was - * used to retrieve the valid value. - * - * @param relatedElement related element - */ - public void setRelatedElement(RelatedElement relatedElement) - { - this.relatedElement = relatedElement; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ValidValueElement{" + - "elementHeader=" + elementHeader + - ", validValueProperties=" + validValueProperties + - ", relatedElement=" + relatedElement + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ValidValueElement that = (ValidValueElement) objectToCompare; - return Objects.equals(elementHeader, that.elementHeader) && Objects.equals(validValueProperties, - that.validValueProperties) && Objects.equals( - relatedElement, that.relatedElement); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementHeader, validValueProperties, relatedElement); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/package-info.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/package-info.java deleted file mode 100644 index daa68b0a7b5..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -/** - * The metadata elements describe the way that metadata is returned from the repository. - */ -package org.odpi.openmetadata.accessservices.datamanager.metadataelements; diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/APIManagerProperties.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/APIManagerProperties.java deleted file mode 100644 index ab6801540c9..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/APIManagerProperties.java +++ /dev/null @@ -1,63 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.properties; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * APIManagerProperties describes the API managing capability of a server - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class APIManagerProperties extends SoftwareCapabilitiesProperties -{ - /** - * Default constructor - */ - public APIManagerProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public APIManagerProperties(APIManagerProperties template) - { - super(template); - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "APIManagerProperties{" + - "displayName='" + getDisplayName() + '\'' + - ", description='" + getDescription() + '\'' + - ", typeDescription='" + getDeployedImplementationType() + '\'' + - ", version='" + getVersion() + '\'' + - ", patchLevel='" + getPatchLevel() + '\'' + - ", source='" + getSource() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/APIOperationProperties.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/APIOperationProperties.java deleted file mode 100644 index 16f6c6bf75b..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/APIOperationProperties.java +++ /dev/null @@ -1,163 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * APIOperationProperties is a class for an operation within an API specification. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class APIOperationProperties extends ComplexSchemaTypeProperties -{ - private String path = null; - private String command = null; - - - /** - * Default constructor - */ - public APIOperationProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public APIOperationProperties(APIOperationProperties template) - { - super(template); - - if (template != null) - { - path = template.getPath(); - command = template.getCommand(); - } - } - - - /** - * Return the path name to add to the network address in the API's endpoint. - * - * @return string path name - */ - public String getPath() - { - return path; - } - - - /** - * Set up the path name to add to the network address in the API's endpoint. - * - * @param path string path name - */ - public void setPath(String path) - { - this.path = path; - } - - - /** - * Return the command (eg GET, POST or method name) that is called. - * - * @return string command name - */ - public String getCommand() - { - return command; - } - - - /** - * Set up the command (eg GET, POST or method name) that is called. - * - * @param command command string - */ - public void setCommand(String command) - { - this.command = command; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "APIOperationProperties{" + - "path='" + path + '\'' + - ", command='" + command + '\'' + - ", versionNumber='" + getVersionNumber() + '\'' + - ", author='" + getAuthor() + '\'' + - ", usage='" + getUsage() + '\'' + - ", encodingStandard='" + getEncodingStandard() + '\'' + - ", namespace='" + getNamespace() + '\'' + - ", isDeprecated=" + getIsDeprecated() + - ", displayName='" + getDisplayName() + '\'' + - ", description='" + getDescription() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - APIOperationProperties that = (APIOperationProperties) objectToCompare; - return Objects.equals(path, that.path) && - Objects.equals(command, that.command); - } - - - - /** - * Create a hash code for this element type. - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), path, command); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/APIParameterListProperties.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/APIParameterListProperties.java deleted file mode 100644 index 24f25d77ea4..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/APIParameterListProperties.java +++ /dev/null @@ -1,136 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * APIParameterListProperties is a class for representing the list of parameters for an API - * operation's header, request or response payload. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class APIParameterListProperties extends ComplexSchemaTypeProperties -{ - private boolean required = true; - - /** - * Default constructor - */ - public APIParameterListProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public APIParameterListProperties(APIParameterListProperties template) - { - super(template); - - if (template != null) - { - required = template.getRequired(); - } - } - - /** - * Return if this is a mandatory parameter. - * - * @return boolean flag - */ - public boolean getRequired() - { - return required; - } - - - /** - * Set up if this is a mandatory parameter. - * - * @param required boolean flag - */ - public void setRequired(boolean required) - { - this.required = required; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "APIParameterListProperties{" + - "required='" + required + '\'' + - ", versionNumber='" + getVersionNumber() + '\'' + - ", author='" + getAuthor() + '\'' + - ", usage='" + getUsage() + '\'' + - ", encodingStandard='" + getEncodingStandard() + '\'' + - ", namespace='" + getNamespace() + '\'' + - ", isDeprecated=" + getIsDeprecated() + - ", displayName='" + getDisplayName() + '\'' + - ", description='" + getDescription() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - APIParameterListProperties that = (APIParameterListProperties) objectToCompare; - return Objects.equals(required, that.required); - } - - - - /** - * Create a hash code for this element type. - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), required); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/APIParameterProperties.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/APIParameterProperties.java deleted file mode 100644 index 95def372fcd..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/APIParameterProperties.java +++ /dev/null @@ -1,175 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * APIParameterProperties is a class for representing a parameter in an API specification. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class APIParameterProperties extends SchemaAttributeProperties -{ - private String parameterType = null; - - - /** - * Default constructor - */ - public APIParameterProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public APIParameterProperties(APIParameterProperties template) - { - super(template); - - if (template != null) - { - parameterType = template.getParameterType(); - } - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public APIParameterProperties(SchemaAttributeProperties template) - { - super(template); - - if (template != null) - { - if (getExtendedProperties() != null) - { - Map extendedProperties = getExtendedProperties(); - - parameterType = extendedProperties.get("parameterType").toString(); - - extendedProperties.remove("parameterType"); - - super.setExtendedProperties(extendedProperties); - } - } - } - - - /** - * Return the type of parameter - for example for REST APIs, is it a PathVariable or a RequestParameter? - * - * @return string name - */ - public String getParameterType() - { - return parameterType; - } - - - /** - * Set up the type of parameter - for example for REST APIs, is it a PathVariable or a RequestParameter? - * - * @param parameterType string name - */ - public void setParameterType(String parameterType) - { - this.parameterType = parameterType; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "APIParameterProperties{" + - "parameterType='" + parameterType + '\'' + - ", elementPosition=" + getElementPosition() + - ", minCardinality=" + getMinCardinality() + - ", maxCardinality=" + getMaxCardinality() + - ", allowsDuplicateValues=" + getAllowsDuplicateValues() + - ", orderedValues=" + getOrderedValues() + - ", sortOrder=" + getSortOrder() + - ", minimumLength=" + getMinimumLength() + - ", length=" + getLength() + - ", precision=" + getPrecision() + - ", isNullable=" + getIsNullable() + - ", defaultValueOverride='" + getDefaultValueOverride() + '\'' + - ", nativeJavaClass='" + getNativeJavaClass() + '\'' + - ", aliases=" + getAliases() + - ", dataType='" + getDataType() + '\'' + - ", defaultValue='" + getDefaultValue() + '\'' + - ", fixedValue='" + getFixedValue() + '\'' + - ", externalTypeGUID='" + getExternalTypeGUID() + '\'' + - ", validValuesSetGUID='" + getValidValuesSetGUID() + '\'' + - ", isDeprecated=" + getIsDeprecated() + - ", displayName='" + getDisplayName() + '\'' + - ", description='" + getDescription() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - APIParameterProperties that = (APIParameterProperties) objectToCompare; - return Objects.equals(parameterType, that.parameterType); - } - - - /** - * Create a hash code for this element type. - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), parameterType); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/ApplicationProperties.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/ApplicationProperties.java deleted file mode 100644 index 28e17912503..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/ApplicationProperties.java +++ /dev/null @@ -1,64 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.properties; - - -/** - * ApplicationProperties describes an collection of processes (application) that implements support for the business. - */ -public class ApplicationProperties extends SoftwareCapabilitiesProperties -{ - /** - * Default constructor - */ - public ApplicationProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public ApplicationProperties(ApplicationProperties template) - { - super(template); - } - - - /** - * Copy/clone constructor from OCF bean. - * - * @param template object to copy - */ - public ApplicationProperties(SoftwareCapabilitiesProperties template) - { - super(template); - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ApplicationProperties{" + - "displayName='" + getDisplayName() + '\'' + - ", description='" + getDescription() + '\'' + - ", typeDescription='" + getDeployedImplementationType() + '\'' + - ", version='" + getVersion() + '\'' + - ", patchLevel='" + getPatchLevel() + '\'' + - ", source='" + getSource() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/ArchiveProperties.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/ArchiveProperties.java deleted file mode 100644 index 4fd6c806893..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/ArchiveProperties.java +++ /dev/null @@ -1,185 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Date; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ArchiveProperties defined the properties that are stored when a data source is archived or deleted. This - * allows the Asset to remain in the metadata repository after the real-world artifact has gone. This is important - * to prevent lineage graphs from becoming fragmented. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class ArchiveProperties -{ - private Date archiveDate = null; - private String archiveProcess = null; - private Map archiveProperties = null; - - - /** - * Default constructor - */ - public ArchiveProperties() - { - super(); - } - - - /** - * Copy/clone constructor for the template properties. - * - * @param template template object to copy. - */ - public ArchiveProperties(ArchiveProperties template) - { - if (template != null) - { - archiveDate = template.getArchiveDate(); - archiveProcess = template.getArchiveProcess(); - archiveProperties = template.getArchiveProperties(); - } - } - - - /** - * Returns the date when the data source was archived (or discovered missing). Null means "now". - * - * @return date of archive - */ - public Date getArchiveDate() - { - return archiveDate; - } - - - /** - * Set up the date when the data source was archived (or discovered missing). Null means "now". - * - * @param archiveDate date of archive - */ - public void setArchiveDate(Date archiveDate) - { - this.archiveDate = archiveDate; - } - - - /** - * Returns the name of the process that either performed the archive or detected the missing data source. - * - * @return String name - */ - public String getArchiveProcess() - { - return archiveProcess; - } - - - /** - * Set up the name of the process that either performed the archive or detected the missing data source. - * - * @param archiveProcess String name - */ - public void setArchiveProcess(String archiveProcess) - { - this.archiveProcess = archiveProcess; - } - - - /** - * Return the properties that characterize where the data source was archived to. - * - * @return map of name value pairs, all strings - */ - public Map getArchiveProperties() - { - if (archiveProperties == null) - { - return null; - } - else if (archiveProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(archiveProperties); - } - } - - - /** - * Set up the properties that characterize where the data source was archived to. - * - * @param archiveProperties map of name value pairs, all strings - */ - public void setArchiveProperties(Map archiveProperties) - { - this.archiveProperties = archiveProperties; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "ArchiveProperties{" + - "archiveDate=" + archiveDate + - ", archiveProcess='" + archiveProcess + '\'' + - ", archiveProperties='" + archiveProperties + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ArchiveProperties that = (ArchiveProperties) objectToCompare; - return Objects.equals(archiveDate, that.archiveDate) && - Objects.equals(archiveProcess, that.archiveProcess) && - Objects.equals(archiveProperties, that.archiveProperties); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(archiveDate, archiveProcess, archiveProperties); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/AssetProperties.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/AssetProperties.java deleted file mode 100644 index 469db1877f0..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/AssetProperties.java +++ /dev/null @@ -1,207 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.properties; - -import com.fasterxml.jackson.annotation.*; - -import java.util.*; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * AssetProperties is a java bean used to create assets associated with the data manager. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes( - { - @JsonSubTypes.Type(value = DataSetProperties.class, name = "DataSetProperties"), - @JsonSubTypes.Type(value = DataStoreProperties.class, name = "DataStoreProperties"), - @JsonSubTypes.Type(value = APIProperties.class, name = "APIProperties"), - }) -public class AssetProperties extends ReferenceableProperties -{ - private String name = null; - private String versionIdentifier = null; - private String description = null; - private String deployedImplementationType = null; - - - - /** - * Default constructor - */ - public AssetProperties() - { - } - - - /** - * Copy/clone constructor. Note, this is a deep copy - * - * @param template object to copy - */ - public AssetProperties(AssetProperties template) - { - super(template); - - if (template != null) - { - name = template.getName(); - versionIdentifier = template.getVersionIdentifier(); - description = template.getDescription(); - deployedImplementationType = template.getDeployedImplementationType(); - } - } - - - /** - * Return the name of the resource that this asset represents. - * - * @return string resource name - */ - public String getName() - { - return name; - } - - - /** - * Set up the name of the resource that this asset represents. - * - * @param name string resource name - */ - public void setName(String name) - { - this.name = name; - } - - - /** - * Set up the version identifier of the resource. - * - * @return string version name - */ - public String getVersionIdentifier() - { - return versionIdentifier; - } - - - /** - * Set up the version identifier of the resource. - * - * @param versionIdentifier string version name - */ - public void setVersionIdentifier(String versionIdentifier) - { - this.versionIdentifier = versionIdentifier; - } - - - /** - * Returns the stored description property for the asset. - * If no description is provided then null is returned. - * - * @return description String text - */ - public String getDescription() - { - return description; - } - - - /** - * Set up the stored description property associated with the asset. - * - * @param description String text - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * Retrieve the name of the technology used for this data asset. - * - * @return string name - */ - public String getDeployedImplementationType() - { - return deployedImplementationType; - } - - - /** - * Set up the name of the technology used for this data asset. - * - * @param deployedImplementationType string name - */ - public void setDeployedImplementationType(String deployedImplementationType) - { - this.deployedImplementationType = deployedImplementationType; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "AssetProperties{" + - "name='" + name + '\'' + - ", versionIdentifier='" + versionIdentifier + '\'' + - ", name='" + name + '\'' + - ", description='" + description + '\'' + - ", deployedImplementationType='" + deployedImplementationType + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) return true; - if (objectToCompare == null || getClass() != objectToCompare.getClass()) return false; - if (!super.equals(objectToCompare)) return false; - AssetProperties that = (AssetProperties) objectToCompare; - return Objects.equals(name, that.name) && - Objects.equals(versionIdentifier, that.versionIdentifier) && - Objects.equals(description, that.description) && - Objects.equals(deployedImplementationType, that.deployedImplementationType); - } - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), name, versionIdentifier, description, deployedImplementationType); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/ClassificationProperties.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/ClassificationProperties.java deleted file mode 100644 index 4a864c0b64f..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/ClassificationProperties.java +++ /dev/null @@ -1,195 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; - -import java.util.Date; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ClassificationProperties provides the base class for classification items. This provides extended properties with the ability to - * set effectivity dates. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes( - { - @JsonSubTypes.Type(value = DatabasePrimaryKeyProperties.class, name = "DatabasePrimaryKeyProperties"), - }) - -public class ClassificationProperties -{ - private Date effectiveFrom = null; - private Date effectiveTo = null; - - private Map extendedProperties = null; - - - /** - * Default constructor - */ - public ClassificationProperties() - { - super(); - } - - - /** - * Copy/clone constructor. Retrieve values from the supplied template - * - * @param template element to copy - */ - public ClassificationProperties(ClassificationProperties template) - { - if (template != null) - { - effectiveFrom = template.getEffectiveFrom(); - effectiveTo = template.getEffectiveTo(); - extendedProperties = template.getExtendedProperties(); - } - } - - - /** - * Return the date/time that this element is effective from (null means effective from the epoch). - * - * @return date object - */ - public Date getEffectiveFrom() - { - return effectiveFrom; - } - - - /** - * Set up the date/time that this element is effective from (null means effective from the epoch). - * - * @param effectiveFrom date object - */ - public void setEffectiveFrom(Date effectiveFrom) - { - this.effectiveFrom = effectiveFrom; - } - - - /** - * Return the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @return date object - */ - public Date getEffectiveTo() - { - return effectiveTo; - } - - - /** - * Set the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @param effectiveTo date object - */ - public void setEffectiveTo(Date effectiveTo) - { - this.effectiveTo = effectiveTo; - } - - - /** - * Return the properties that have been defined for a subtype of this object that are not supported explicitly - * by this bean. - * - * @return property map - */ - public Map getExtendedProperties() - { - if (extendedProperties == null) - { - return null; - } - else if (extendedProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(extendedProperties); - } - } - - - /** - * Set up the properties that have been defined for a subtype of this object that are not supported explicitly - * by this bean. - * - * @param extendedProperties property map - */ - public void setExtendedProperties(Map extendedProperties) - { - this.extendedProperties = extendedProperties; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "ClassificationProperties{" + - "effectiveFrom=" + effectiveFrom + - ", effectiveTo=" + effectiveTo + - ", extendedProperties=" + extendedProperties + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ClassificationProperties that = (ClassificationProperties) objectToCompare; - return Objects.equals(effectiveFrom, that.effectiveFrom) && - Objects.equals(effectiveTo, that.effectiveTo); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(effectiveFrom, effectiveTo); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/ComplexSchemaTypeProperties.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/ComplexSchemaTypeProperties.java deleted file mode 100644 index f7bb8ea242b..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/ComplexSchemaTypeProperties.java +++ /dev/null @@ -1,74 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.properties; - - -import com.fasterxml.jackson.annotation.*; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ComplexSchemaTypeProperties describes a schema with multiple attributes. Notice it does not contain the attributes. - * This is because a complex schema type may have literally thousands of attributes - * and so the attribute contents are retrieved separated through calls that support paging. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes({ - @JsonSubTypes.Type(value = APIParameterListProperties.class, name = "APIParameterListProperties"), - @JsonSubTypes.Type(value = StructSchemaTypeProperties.class, name = "StructSchemaTypeProperties"), - @JsonSubTypes.Type(value = TabularSchemaTypeProperties.class, name = "TabularSchemaTypeProperties"), - }) -public class ComplexSchemaTypeProperties extends SchemaTypeProperties -{ - /** - * Default constructor used by subclasses - */ - public ComplexSchemaTypeProperties() - { - super(); - } - - - /** - * Copy/clone Constructor. - * - * @param template template object to copy. - */ - public ComplexSchemaTypeProperties(ComplexSchemaTypeProperties template) - { - super(template); - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "ComplexSchemaTypeProperties{" + - "versionNumber='" + getVersionNumber() + '\'' + - ", author='" + getAuthor() + '\'' + - ", usage='" + getUsage() + '\'' + - ", encodingStandard='" + getEncodingStandard() + '\'' + - ", namespace='" + getNamespace() + '\'' + - ", isDeprecated=" + getIsDeprecated() + - ", displayName='" + getDisplayName() + '\'' + - ", description='" + getDescription() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/ConnectionProperties.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/ConnectionProperties.java deleted file mode 100644 index 13c79b8c651..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/ConnectionProperties.java +++ /dev/null @@ -1,378 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * The connection is an object that contains the properties needed to create and initialise a connector to access a - * specific data assets. - * - * The properties for a connection are defined in model 0201. They include the following options for connector name: - *
      - *
    • - * guid - Globally unique identifier for the connection. - *
    • - *
    • - * url - URL of the connection definition in the metadata repository. - * This URL can be stored as a property in another entity to create an explicit link to this connection. - *
    • - *
    • - * qualifiedName - The official (unique) name for the connection. - * This is often defined by the IT systems management organization and should be used (when available) on - * audit logs and error messages. The qualifiedName is defined in the 0010 model as part of Referenceable. - *
    • - *
    • - * displayName - A consumable name for the connection. Often a shortened form of the qualifiedName for use - * on user interfaces and messages. The displayName should be only be used for audit logs and error messages - * if the qualifiedName is not set. - *
    • - *
    - * - * Either the guid, qualifiedName or displayName can be used to specify the name for a connection. - * - * Other properties for the connection include: - *
      - *
    • - * type - information about the TypeDef for Connection - *
    • - *
    • - * description - A full description of the connection covering details of the assets it connects to - * along with usage and version information. - *
    • - *
    • - * additionalProperties - Any additional properties associated with the connection. - *
    • - *
    • - * configurationProperties - properties for configuring the connector. - *
    • - *
    • - * securedProperties - Protected properties for secure log on by connector to back end server. These - * are protected properties that can only be retrieved by privileged connector code. - *
    • - *
    • - * userId - name or URI or connecting user. - *
    • - *
    • - * encryptedPassword - password for the userId - needs decrypting by connector before use. - *
    • - *
    • - * clearPassword - password for userId - ready to use. - *
    • - *
    • - * connectorType - Properties that describe the connector type for the connector. - *
    • - *
    • - * endpoint - Properties that describe the server endpoint where the connector will retrieve the assets. - *
    • - *
    • - * assetSummary - short description of the connected asset (if any). - *
    • - *
    - * - * The connection class is simply used to cache the properties for an connection. - * It is used by other classes to exchange this information between a metadata repository and a consumer. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ConnectionProperties extends ReferenceableProperties -{ - /* - * Attributes of a connector - */ - private String displayName = null; - private String description = null; - private String userId = null; - private String encryptedPassword = null; - private String clearPassword = null; - private Map configurationProperties = null; - private Map securedProperties = null; - - - /** - * Default constructor sets the Connection properties to null. - */ - public ConnectionProperties() - { - super(); - } - - - /** - * Copy/clone Constructor to return a copy of a connection object. - * - * @param template Connection to copy - */ - public ConnectionProperties(ConnectionProperties template) - { - super(template); - - if (template != null) - { - displayName = template.getDisplayName(); - description = template.getDescription(); - userId = template.getUserId(); - clearPassword = template.getClearPassword(); - encryptedPassword = template.getEncryptedPassword(); - configurationProperties = template.getConfigurationProperties(); - securedProperties = template.getSecuredProperties(); - } - } - - - /** - * Returns the stored display name property for the connection. - * Null means no displayName is available. - * - * @return displayName - */ - public String getDisplayName() { return displayName; } - - - /** - * Set up the display name for UIs and reports. - * - * @param displayName String name - */ - public void setDisplayName(String displayName) - { - this.displayName = displayName; - } - - - /** - * Set up description of the element. - * - * @param description String - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * Returns the stored description property for the connection. - * If no description is provided then null is returned. - * - * @return description - */ - public String getDescription() - { - return description; - } - - - /** - * Return the userId to use on this connection. - * - * @return string - */ - public String getUserId() - { - return userId; - } - - - /** - * Set up the userId to use on this connection. - * - * @param userId string - */ - public void setUserId(String userId) - { - this.userId = userId; - } - - - /** - * Return an encrypted password. The caller is responsible for decrypting it. - * - * @return string - */ - public String getEncryptedPassword() - { - return encryptedPassword; - } - - - /** - * Set up an encrypted password. - * - * @param encryptedPassword string - */ - public void setEncryptedPassword(String encryptedPassword) - { - this.encryptedPassword = encryptedPassword; - } - - - /** - * Return an unencrypted password. - * - * @return string - */ - public String getClearPassword() - { - return clearPassword; - } - - - /** - * Set up an unencrypted password. - * - * @param clearPassword string - */ - public void setClearPassword(String clearPassword) - { - this.clearPassword = clearPassword; - } - - - /** - * Set up the configuration properties for this Connection. - * - * @param configurationProperties properties that contain additional configuration information for the connector. - */ - public void setConfigurationProperties(Map configurationProperties) - { - this.configurationProperties = configurationProperties; - } - - - /** - * Return a copy of the configuration properties. Null means no secured properties are available. - * - * @return secured properties typically user credentials for the connection - */ - public Map getConfigurationProperties() - { - if (configurationProperties == null) - { - return null; - } - else if (configurationProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(configurationProperties); - } - } - - - /** - * Set up the secured properties for this Connection. - * - * @param securedProperties properties that contain secret information such as log on information. - */ - public void setSecuredProperties(Map securedProperties) - { - this.securedProperties = securedProperties; - } - - - /** - * Return a copy of the secured properties. Null means no secured properties are available. - * - * @return secured properties typically user credentials for the connection - */ - public Map getSecuredProperties() - { - if (securedProperties == null) - { - return null; - } - else if (securedProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(securedProperties); - } - } - - - /** - * Standard toString method. Note SecuredProperties and other credential type properties are not displayed. - * This is deliberate because there is no knowing where the string will be printed. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "ConnectionProperties{" + - "displayName='" + displayName + '\'' + - ", description='" + description + '\'' + - ", userId='" + userId + '\'' + - ", encryptedPassword='" + encryptedPassword + '\'' + - ", clearPassword='" + clearPassword + '\'' + - ", configurationProperties=" + configurationProperties + - ", securedProperties=" + securedProperties + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ConnectionProperties that = (ConnectionProperties) objectToCompare; - return Objects.equals(getDisplayName(), that.getDisplayName()) && - Objects.equals(getDescription(), that.getDescription()) && - Objects.equals(getUserId(), that.getUserId()) && - Objects.equals(getEncryptedPassword(), that.getEncryptedPassword()) && - Objects.equals(getClearPassword(), that.getClearPassword()) && - Objects.equals(getConfigurationProperties(), that.getConfigurationProperties()) && - Objects.equals(getSecuredProperties(), that.getSecuredProperties()); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), getDisplayName(), getDescription(), - getUserId(), getEncryptedPassword(), getClearPassword(), getSecuredProperties(), - getConfigurationProperties()); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/ConnectorTypeProperties.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/ConnectorTypeProperties.java deleted file mode 100644 index 2cb8472579e..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/ConnectorTypeProperties.java +++ /dev/null @@ -1,611 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * The ConnectorTypeProperties describe the implementation details of a particular type of connector. - * The properties for a connector type are defined in model 0201. - * They include: - * - *
      - *
    • - * guid - Globally unique identifier for the connector type. - *
    • - *
    • - * qualifiedName - The official (unique) name for the connector type. This is often defined by the IT - * systems management organization and should be used (when available) on audit logs and error messages. - *
    • - *
    • - * displayName - A consumable name for the connector type. Often a shortened form of the qualifiedName for use - * on user interfaces and messages. The displayName should be only be used for audit logs and error messages - * if the qualifiedName is not set. - *
    • - *
    • - * description - A full description of the connector type covering details of the assets it connects to - * along with usage and versioning information. - *
    • - *
    • - * supportedAssetTypeName - the type of asset that the connector implementation supports. - *
    • - *
    • - * expectedDataFormat - the format of the data that the connector supports - null for "any". - *
    • - *
    • - * connectorProviderClassName - The connector provider is the factory for a particular type of connector. - * This property defines the class name for the connector provider that the Connector Broker should use to request - * new connector instances. - *
    • - *
    • - * connectorFrameworkName - name of the connector framework that the connector implements - default Open Connector Framework (OCF). - *
    • - *
    • - * connectorInterfaceLanguage - the language that the connector is implemented in - default Java. - *
    • - *
    • - * connectorInterfaces - list of interfaces that the connector supports. - *
    • - *
    • - * targetTechnologySource - the organization that supplies the target technology that the connector implementation connects to. - *
    • - *
    • - * targetTechnologyName - the name of the target technology that the connector implementation connects to. - *
    • - *
    • - * targetTechnologyInterfaces - the names of the interfaces in the target technology that the connector calls. - *
    • - *
    • - * targetTechnologyVersions - the versions of the target technology that the connector supports. - *
    • - *
    • - * recognizedAdditionalProperties - these are the Connection additional properties recognized by the connector implementation - *
    • - *
    • - * recognizedConfigurationProperties - these are the Connection configuration properties recognized by the connector implementation - *
    • - *
    • - * recognizedSecuredProperties - these are the Connection secured properties recognized by the connector implementation - *
    • - *
    • - * additionalProperties - Any additional properties that the connector provider needs to know in order to - * create connector instances. - *
    • - *
    - * - * The connectorTypeProperties class is simply used to cache the properties for an connector type. - * It is used by other classes to exchange this information between a metadata repository and a consumer. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ConnectorTypeProperties extends ReferenceableProperties -{ - /* - * Attributes of a connector type - */ - private String displayName = null; - private String description = null; - private String supportedAssetTypeName = null; - private String expectedDataFormat = null; - private String connectorProviderClassName = null; - private String connectorFrameworkName = null; - private String connectorInterfaceLanguage = null; - private List connectorInterfaces = null; - private String targetTechnologySource = null; - private String targetTechnologyName = null; - private List targetTechnologyInterfaces = null; - private List targetTechnologyVersions = null; - private List recognizedAdditionalProperties = null; - private List recognizedConfigurationProperties = null; - private List recognizedSecuredProperties = null; - - - - /** - * Default constructor - */ - public ConnectorTypeProperties() - { - super(); - } - - - /** - * Copy/clone constructor for a connectorType that is not connected to an asset (either directly or indirectly). - * - * @param template template object to copy. - */ - public ConnectorTypeProperties(ConnectorTypeProperties template) - { - super(template); - - if (template != null) - { - displayName = template.getDisplayName(); - description = template.getDescription(); - supportedAssetTypeName = template.getSupportedAssetTypeName(); - expectedDataFormat = template.getExpectedDataFormat(); - connectorProviderClassName = template.getConnectorProviderClassName(); - connectorFrameworkName = template.getConnectorFrameworkName(); - connectorInterfaceLanguage = template.getConnectorInterfaceLanguage(); - connectorInterfaces = template.getConnectorInterfaces(); - targetTechnologySource = template.getTargetTechnologySource(); - targetTechnologyName = template.getTargetTechnologyName(); - targetTechnologyInterfaces = template.getTargetTechnologyInterfaces(); - targetTechnologyVersions = template.getTargetTechnologyVersions(); - recognizedAdditionalProperties = template.getRecognizedAdditionalProperties(); - recognizedConfigurationProperties = template.getRecognizedConfigurationProperties(); - recognizedSecuredProperties = template.getRecognizedSecuredProperties(); - } - } - - /** - * Set up the display name for UIs and reports. - * - * @param displayName String name - */ - public void setDisplayName(String displayName) - { - this.displayName = displayName; - } - - - /** - * Returns the stored display name property for the connector type. - * If no display name is available then null is returned. - * - * @return displayName - */ - public String getDisplayName() - { - return displayName; - } - - - /** - * Set up description of the element. - * - * @param description String - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * Returns the stored description property for the connector type. - * If no description is available then null is returned. - * - * @return description - */ - public String getDescription() - { - return description; - } - - - /** - * Return the type of asset that the connector implementation supports. - * - * @return string name - */ - public String getSupportedAssetTypeName() - { - return supportedAssetTypeName; - } - - - /** - * Set up the type of asset that the connector implementation supports. - * - * @param supportedAssetTypeName string name - */ - public void setSupportedAssetTypeName(String supportedAssetTypeName) - { - this.supportedAssetTypeName = supportedAssetTypeName; - } - - - /** - * Return the format of the data that the connector supports - null for "any". - * - * @return string name - */ - public String getExpectedDataFormat() - { - return expectedDataFormat; - } - - - /** - * Set up the format of the data that the connector supports - null for "any". - * - * @param expectedDataFormat string name - */ - public void setExpectedDataFormat(String expectedDataFormat) - { - this.expectedDataFormat = expectedDataFormat; - } - - - /** - * The name of the connector provider class name. - * - * @param connectorProviderClassName String class name - */ - public void setConnectorProviderClassName(String connectorProviderClassName) - { - this.connectorProviderClassName = connectorProviderClassName; - } - - - /** - * Returns the stored connectorProviderClassName property for the connector type. - * If no connectorProviderClassName is available then null is returned. - * - * @return connectorProviderClassName class name (including package name) - */ - public String getConnectorProviderClassName() - { - return connectorProviderClassName; - } - - - /** - * Return name of the connector framework that the connector implements - default Open Connector Framework (OCF). - * - * @return string name - */ - public String getConnectorFrameworkName() - { - return connectorFrameworkName; - } - - - /** - * Set up name of the connector framework that the connector implements - default Open Connector Framework (OCF). - * - * @param connectorFrameworkName string name - */ - public void setConnectorFrameworkName(String connectorFrameworkName) - { - this.connectorFrameworkName = connectorFrameworkName; - } - - - /** - * Return the language that the connector is implemented in - default Java. - * - * @return string name - */ - public String getConnectorInterfaceLanguage() - { - return connectorInterfaceLanguage; - } - - - /** - * Set up the language that the connector is implemented in - default Java. - * - * @param connectorInterfaceLanguage string name - */ - public void setConnectorInterfaceLanguage(String connectorInterfaceLanguage) - { - this.connectorInterfaceLanguage = connectorInterfaceLanguage; - } - - - /** - * Return list of interfaces that the connector supports. - * - * @return list of names - */ - public List getConnectorInterfaces() - { - return connectorInterfaces; - } - - - /** - * Set up list of interfaces that the connector supports. - * - * @param connectorInterfaces list of names - */ - public void setConnectorInterfaces(List connectorInterfaces) - { - this.connectorInterfaces = connectorInterfaces; - } - - - /** - * Return the name of the organization that supplies the target technology that the connector implementation connects to. - * - * @return string name - */ - public String getTargetTechnologySource() - { - return targetTechnologySource; - } - - - /** - * Set up the name of the organization that supplies the target technology that the connector implementation connects to. - * - * @param targetTechnologySource list of names - */ - public void setTargetTechnologySource(String targetTechnologySource) - { - this.targetTechnologySource = targetTechnologySource; - } - - - /** - * Return the name of the target technology that the connector implementation connects to. - * - * @return string name - */ - public String getTargetTechnologyName() - { - return targetTechnologyName; - } - - - /** - * Set up the name of the target technology that the connector implementation connects to. - * - * @param targetTechnologyName string name - */ - public void setTargetTechnologyName(String targetTechnologyName) - { - this.targetTechnologyName = targetTechnologyName; - } - - - /** - * Return the names of the interfaces in the target technology that the connector calls. - * - * @return list of interface names - */ - public List getTargetTechnologyInterfaces() - { - return targetTechnologyInterfaces; - } - - - /** - * Set up the names of the interfaces in the target technology that the connector calls. - * - * @param targetTechnologyInterfaces list of interface names - */ - public void setTargetTechnologyInterfaces(List targetTechnologyInterfaces) - { - this.targetTechnologyInterfaces = targetTechnologyInterfaces; - } - - - /** - * Return the versions of the target technology that the connector supports. - * - * @return list of version identifiers - */ - public List getTargetTechnologyVersions() - { - return targetTechnologyVersions; - } - - - /** - * Set up the versions of the target technology that the connector supports. - * - * @param targetTechnologyVersions list of version identifiers - */ - public void setTargetTechnologyVersions(List targetTechnologyVersions) - { - this.targetTechnologyVersions = targetTechnologyVersions; - } - - - /** - * Set up the list of property names that this connector/connector provider implementation looks for - * in the Connection object's additionalProperties. - * - * @param recognizedAdditionalProperties list of property names - */ - public void setRecognizedAdditionalProperties(List recognizedAdditionalProperties) - { - this.recognizedAdditionalProperties = recognizedAdditionalProperties; - } - - - /** - * Return the list of property names that this connector/connector provider implementation looks for - * in the Connection object's additionalProperties. - * - * @return list of property names - */ - public List getRecognizedAdditionalProperties() - { - if (recognizedAdditionalProperties == null) - { - return null; - } - else if (recognizedAdditionalProperties.isEmpty()) - { - return null; - } - else - { - return recognizedAdditionalProperties; - } - } - - - /** - * Set up the list of property names that this connector/connector provider implementation looks for - * in the Connection object's configurationProperties. - * - * @param recognizedConfigurationProperties list of property names - */ - public void setRecognizedConfigurationProperties(List recognizedConfigurationProperties) - { - - this.recognizedConfigurationProperties = recognizedConfigurationProperties; - } - - - /** - * Return the list of property names that this connector/connector provider implementation looks for - * in the Connection object's configurationProperties. - * - * @return list of property names - */ - public List getRecognizedConfigurationProperties() - { - if (recognizedConfigurationProperties == null) - { - return null; - } - else if (recognizedConfigurationProperties.isEmpty()) - { - return null; - } - else - { - return recognizedConfigurationProperties; - } - } - - - /** - * Set up the list of property names that this connector/connector provider implementation looks for - * in the Connection object's securedProperties. - * - * @param recognizedSecuredProperties list of property names - */ - public void setRecognizedSecuredProperties(List recognizedSecuredProperties) - { - this.recognizedSecuredProperties = recognizedSecuredProperties; - } - - - /** - * Return the list of property names that this connector/connector provider implementation looks for - * in the Connection object's securedProperties. - * - * @return list of property names - */ - public List getRecognizedSecuredProperties() - { - if (recognizedSecuredProperties == null) - { - return null; - } - else if (recognizedSecuredProperties.isEmpty()) - { - return null; - } - else - { - return recognizedSecuredProperties; - } - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "ConnectorTypeProperties{" + - "displayName='" + displayName + '\'' + - ", description='" + description + '\'' + - ", supportedAssetTypeName='" + supportedAssetTypeName + '\'' + - ", expectedDataFormat='" + expectedDataFormat + '\'' + - ", connectorProviderClassName='" + connectorProviderClassName + '\'' + - ", connectorFrameworkName='" + connectorFrameworkName + '\'' + - ", connectorInterfaceLanguage='" + connectorInterfaceLanguage + '\'' + - ", connectorInterfaces=" + connectorInterfaces + - ", targetTechnologySource='" + targetTechnologySource + '\'' + - ", targetTechnologyName='" + targetTechnologyName + '\'' + - ", targetTechnologyInterfaces=" + targetTechnologyInterfaces + - ", targetTechnologyVersions=" + targetTechnologyVersions + - ", recognizedAdditionalProperties=" + recognizedAdditionalProperties + - ", recognizedConfigurationProperties=" + recognizedConfigurationProperties + - ", recognizedSecuredProperties=" + recognizedSecuredProperties + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - ConnectorTypeProperties that = (ConnectorTypeProperties) objectToCompare; - return Objects.equals(displayName, that.displayName) && - Objects.equals(description, that.description) && - Objects.equals(supportedAssetTypeName, that.supportedAssetTypeName) && - Objects.equals(expectedDataFormat, that.expectedDataFormat) && - Objects.equals(connectorProviderClassName, that.connectorProviderClassName) && - Objects.equals(connectorFrameworkName, that.connectorFrameworkName) && - Objects.equals(connectorInterfaceLanguage, that.connectorInterfaceLanguage) && - Objects.equals(connectorInterfaces, that.connectorInterfaces) && - Objects.equals(targetTechnologySource, that.targetTechnologySource) && - Objects.equals(targetTechnologyName, that.targetTechnologyName) && - Objects.equals(targetTechnologyInterfaces, that.targetTechnologyInterfaces) && - Objects.equals(targetTechnologyVersions, that.targetTechnologyVersions) && - Objects.equals(recognizedAdditionalProperties, that.recognizedAdditionalProperties) && - Objects.equals(recognizedConfigurationProperties, that.recognizedConfigurationProperties) && - Objects.equals(recognizedSecuredProperties, that.recognizedSecuredProperties); - } - - - /** - * Hash of properties - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), displayName, description, supportedAssetTypeName, expectedDataFormat, connectorProviderClassName, - connectorFrameworkName, connectorInterfaceLanguage, connectorInterfaces, targetTechnologySource, targetTechnologyName, - targetTechnologyInterfaces, targetTechnologyVersions, recognizedAdditionalProperties, recognizedConfigurationProperties, - recognizedSecuredProperties); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/DataFieldProperties.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/DataFieldProperties.java deleted file mode 100644 index 4812100df92..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/DataFieldProperties.java +++ /dev/null @@ -1,87 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.properties; - -import com.fasterxml.jackson.annotation.*; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * DataFieldProperties is a class for representing a data field within a Form, Report or Que - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class DataFieldProperties extends SchemaAttributeProperties -{ - /** - * Default constructor used by subclasses - */ - public DataFieldProperties() - { - super(); - } - - - /** - * Copy/clone Constructor. - * - * @param template template object to copy. - */ - public DataFieldProperties(DataFieldProperties template) - { - super(template); - } - - - /** - * Copy/clone Constructor. - * - * @param template template object to copy. - */ - public DataFieldProperties(SchemaAttributeProperties template) - { - super(template); - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "DataFieldProperties{" + - "elementPosition=" + getElementPosition() + - ", minCardinality=" + getMinCardinality() + - ", maxCardinality=" + getMaxCardinality() + - ", allowsDuplicateValues=" + getAllowsDuplicateValues() + - ", orderedValues=" + getOrderedValues() + - ", sortOrder=" + getSortOrder() + - ", minimumLength=" + getMinimumLength() + - ", length=" + getLength() + - ", precision=" + getPrecision() + - ", isNullable=" + getIsNullable() + - ", defaultValueOverride='" + getDefaultValueOverride() + '\'' + - ", nativeJavaClass='" + getNativeJavaClass() + '\'' + - ", aliases=" + getAliases() + - ", dataType='" + getDataType() + '\'' + - ", defaultValue='" + getDefaultValue() + '\'' + - ", fixedValue='" + getFixedValue() + '\'' + - ", externalTypeGUID='" + getExternalTypeGUID() + '\'' + - ", validValuesSetGUID='" + getValidValuesSetGUID() + '\'' + - ", isDeprecated=" + getIsDeprecated() + - ", displayName='" + getDisplayName() + '\'' + - ", description='" + getDescription() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/DataFileProperties.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/DataFileProperties.java deleted file mode 100644 index 954b350d684..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/DataFileProperties.java +++ /dev/null @@ -1,179 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.properties; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * DataFileProperties describes the property of a single data file. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class DataFileProperties extends DataStoreProperties -{ - private String fileType = null; - private String fileName = null; - private String fileExtension = null; - - /** - * Default constructor - */ - public DataFileProperties() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public DataFileProperties(DataFileProperties template) - { - super(template); - - if (template != null) - { - fileType = template.getFileType(); - fileName = template.getFileName(); - fileExtension = template.getFileExtension(); - } - } - - - /** - * Return the file type of the file if known. - * - * @return file type string - */ - public String getFileType() - { - return fileType; - } - - - /** - * Set up the file type of the file if known. - * - * @param fileType string - */ - public void setFileType(String fileType) - { - this.fileType = fileType; - } - - - /** - * Return the name of the file (do not want to rely on Name). - * - * @return string - */ - public String getFileName() - { - return fileName; - } - - - /** - * Set up the name of the file (do not want to rely on Name). - * - * @param fileName string - */ - public void setFileName(String fileName) - { - this.fileName = fileName; - } - - - /** - * Return the file extension, if any. - * - * @return string - */ - public String getFileExtension() - { - return fileExtension; - } - - - /** - * Set up the file extension, if any. - * - * @param fileExtension string - */ - public void setFileExtension(String fileExtension) - { - this.fileExtension = fileExtension; - } - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "DataFileProperties{" + - "fileType='" + fileType + '\'' + - ", fileName='" + fileName + '\'' + - ", fileExtension='" + fileExtension + '\'' + - ", deployedImplementationType='" + getDeployedImplementationType() + '\'' + - ", pathName='" + getPathName() + '\'' + - ", createTime=" + getCreateTime() + - ", modifiedTime=" + getModifiedTime() + - ", encodingType='" + getEncodingType() + '\'' + - ", encodingLanguage='" + getEncodingLanguage() + '\'' + - ", encodingDescription='" + getEncodingDescription() + '\'' + - ", encodingProperties=" + getEncodingProperties() + - ", name='" + getName() + '\'' + - ", versionIdentifier='" + getVersionIdentifier() + '\'' + - ", description='" + getDescription() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) return true; - if (objectToCompare == null || getClass() != objectToCompare.getClass()) return false; - if (!super.equals(objectToCompare)) return false; - DataFileProperties that = (DataFileProperties) objectToCompare; - return Objects.equals(fileType, that.fileType) && Objects.equals(fileName, that.fileName) && Objects.equals(fileExtension, that.fileExtension); - } - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), fileType, fileName, fileExtension); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/DataProcessingEngineProperties.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/DataProcessingEngineProperties.java deleted file mode 100644 index 683442e5ef1..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/DataProcessingEngineProperties.java +++ /dev/null @@ -1,65 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.properties; - - -/** - * DataProcessingEngineProperties describes an engine. Set up the typeName to create common subtypes such as - * ReportingEngine, WorkflowEngine, AnalyticsEngine, DataMovementEngine or DataVirtualizationEngine. - */ -public class DataProcessingEngineProperties extends SoftwareCapabilitiesProperties -{ - /** - * Default constructor - */ - public DataProcessingEngineProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public DataProcessingEngineProperties(DataProcessingEngineProperties template) - { - super(template); - } - - - /** - * Copy/clone constructor from OCF bean. - * - * @param template object to copy - */ - public DataProcessingEngineProperties(SoftwareCapabilitiesProperties template) - { - super(template); - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "DataProcessingEngineProperties{" + - "displayName='" + getDisplayName() + '\'' + - ", description='" + getDescription() + '\'' + - ", typeDescription='" + getDeployedImplementationType() + '\'' + - ", version='" + getVersion() + '\'' + - ", patchLevel='" + getPatchLevel() + '\'' + - ", source='" + getSource() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/DataSetProperties.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/DataSetProperties.java deleted file mode 100644 index 4cd9c52fbfe..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/DataSetProperties.java +++ /dev/null @@ -1,61 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.properties; - -import com.fasterxml.jackson.annotation.*; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * DataSetProperties is a class for representing a generic data set. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes( - { - @JsonSubTypes.Type(value = DatabaseSchemaProperties.class, name = "DatabaseSchemaProperties"), - @JsonSubTypes.Type(value = FormProperties.class, name = "FormProperties"), - @JsonSubTypes.Type(value = ReportProperties.class, name = "ReportProperties"), - @JsonSubTypes.Type(value = QueryProperties.class, name = "QueryProperties"), - @JsonSubTypes.Type(value = TopicProperties.class, name = "TopicProperties"), - }) -public class DataSetProperties extends AssetProperties -{ - /** - * Default constructor - */ - public DataSetProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public DataSetProperties(DataSetProperties template) - { - super(template); - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - - @Override - public String toString() - { - return "DataSetProperties{} " + super.toString(); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/DataStoreProperties.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/DataStoreProperties.java deleted file mode 100644 index 56d5b1b755a..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/DataStoreProperties.java +++ /dev/null @@ -1,320 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.properties; - -import com.fasterxml.jackson.annotation.*; - -import java.util.Date; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * DataStoreProperties is a class for representing a generic data store. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes( - { - @JsonSubTypes.Type(value = DatabaseProperties.class, name = "DatabaseProperties"), - @JsonSubTypes.Type(value = DataFileProperties.class, name = "DataFileProperties"), - @JsonSubTypes.Type(value = FileFolderProperties.class, name = "FileFolderProperties"), - }) -public class DataStoreProperties extends AssetProperties -{ - private String pathName = null; - private Date createTime = null; - private Date modifiedTime = null; - private String encodingType = null; - private String encodingLanguage = null; - private String encodingDescription = null; - private Map encodingProperties = null; - - - /** - * Default constructor - */ - public DataStoreProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public DataStoreProperties(DataStoreProperties template) - { - super(template); - - if (template != null) - { - pathName = template.getPathName(); - createTime = template.getCreateTime(); - modifiedTime = template.getModifiedTime(); - encodingType = template.getEncodingType(); - encodingLanguage = template.getEncodingLanguage(); - encodingDescription = template.getEncodingDescription(); - encodingProperties = template.getEncodingProperties(); - } - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public DataStoreProperties(AssetProperties template) - { - super(template); - } - - - /** - * Return the fully qualified physical location of the data store. This should be suitable for the - * network address of the Endpoint. - * - * @return string name - */ - public String getPathName() - { - return pathName; - } - - - /** - * Set up the fully qualified physical location of the data store. This should be suitable for the - * network address of the Endpoint. - * - * @param pathName string name - */ - public void setPathName(String pathName) - { - this.pathName = pathName; - } - - - /** - * Return the time that the data store was created. - * - * @return date - */ - public Date getCreateTime() - { - return createTime; - } - - - /** - * Set up the time that the data store was created. - * - * @param createTime date - */ - public void setCreateTime(Date createTime) - { - this.createTime = createTime; - } - - - /** - * Return the last known time the data store was modified. - * - * @return date - */ - public Date getModifiedTime() - { - return modifiedTime; - } - - - /** - * Setup the last known time the data store was modified. - * - * @param modifiedTime date - */ - public void setModifiedTime(Date modifiedTime) - { - this.modifiedTime = modifiedTime; - } - - - /** - * Return the name of the encoding style used in the data store. - * - * @return string name - */ - public String getEncodingType() - { - return encodingType; - } - - - /** - * Set up the name of the encoding style used in the data store. - * - * @param encodingType string name - */ - public void setEncodingType(String encodingType) - { - this.encodingType = encodingType; - } - - - /** - * Return the name of the natural language used for text strings within the data store. - * - * @return string language name - */ - public String getEncodingLanguage() - { - return encodingLanguage; - } - - - /** - * Set up the name of the natural language used for text strings within the data store. - * - * @param encodingLanguage string language name - */ - public void setEncodingLanguage(String encodingLanguage) - { - this.encodingLanguage = encodingLanguage; - } - - - /** - * Return the description of the encoding used in the data store. - * - * @return string text - */ - public String getEncodingDescription() - { - return encodingDescription; - } - - - /** - * Set up the description of the encoding used in the data store. - * - * @param encodingDescription string text - */ - public void setEncodingDescription(String encodingDescription) - { - this.encodingDescription = encodingDescription; - } - - - /** - * Return the additional properties associated with the encoding process. - * - * @return map of name-value pairs - */ - public Map getEncodingProperties() - { - if (encodingProperties == null) - { - return null; - } - else if (encodingProperties.isEmpty()) - { - return null; - } - return encodingProperties; - } - - - /** - * Set up the additional properties associated with the encoding process. - * - * @param encodingProperties map of name-value pairs - */ - public void setEncodingProperties(Map encodingProperties) - { - this.encodingProperties = encodingProperties; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "DataStoreProperties{" + - "name='" + getName() + '\'' + - ", versionIdentifier='" + getVersionIdentifier() + '\'' + - ", description='" + getDescription() + '\'' + - ", deployedImplementationType='" + getDeployedImplementationType() + '\'' + - ", pathName='" + pathName + '\'' + - ", createTime=" + createTime + - ", modifiedTime=" + modifiedTime + - ", encodingType='" + encodingType + '\'' + - ", encodingLanguage='" + encodingLanguage + '\'' + - ", encodingDescription='" + encodingDescription + '\'' + - ", encodingProperties=" + encodingProperties + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (! (objectToCompare instanceof DataStoreProperties that)) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - return Objects.equals(pathName, that.pathName) && - Objects.equals(createTime, that.createTime) && - Objects.equals(modifiedTime, that.modifiedTime) && - Objects.equals(encodingType, that.encodingType) && - Objects.equals(encodingLanguage, that.encodingLanguage) && - Objects.equals(encodingDescription, that.encodingDescription) && - Objects.equals(encodingProperties, that.encodingProperties); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), pathName, createTime, modifiedTime, encodingType, - encodingLanguage, encodingDescription, encodingProperties); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/DatabaseColumnProperties.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/DatabaseColumnProperties.java deleted file mode 100644 index 750b26679bf..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/DatabaseColumnProperties.java +++ /dev/null @@ -1,177 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.properties; - -import com.fasterxml.jackson.annotation.*; - -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * DatabaseColumnProperties describes the properties of a database column. - * The database column may have a fixed value (inherited from tabular column or be derived by a formula. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class DatabaseColumnProperties extends TabularColumnProperties -{ - private String formula = null; - private List queries = null; - - - /** - * Default constructor - */ - public DatabaseColumnProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public DatabaseColumnProperties(DatabaseColumnProperties template) - { - super(template); - - if (template != null) - { - formula = template.getFormula(); - queries = template.getQueries(); - } - } - - - /** - * Return the formula used to combine the values of the queries. Each query is has a identifier and the - * formula has placeholders for these identifiers in it to show how the query results are combined. - * - * @return String formula - */ - public String getFormula() { return formula; } - - - /** - * Set up the formula used to combine the values of the queries. Each query is has a identifier and the - * formula has placeholders for these identifiers in it to show how the query results are combined. - * - * @param formula String formula - */ - public void setFormula(String formula) - { - this.formula = formula; - } - - - /** - * Return the list of individual query targets for a derived column. - * - * @return list of queries and their target element - */ - public List getQueries() - { - return queries; - } - - - /** - * Set up the list of individual query targets for a derived column. - * - * @param queries list of queries and their target element - */ - public void setQueries(List queries) - { - this.queries = queries; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "DatabaseColumnProperties{" + - "formula='" + formula + '\'' + - ", queries=" + queries + - ", elementPosition=" + getElementPosition() + - ", minCardinality=" + getMinCardinality() + - ", maxCardinality=" + getMaxCardinality() + - ", allowsDuplicateValues=" + getAllowsDuplicateValues() + - ", orderedValues=" + getOrderedValues() + - ", sortOrder=" + getSortOrder() + - ", minimumLength=" + getMinimumLength() + - ", length=" + getLength() + - ", precision=" + getPrecision() + - ", significantDigits=" + getSignificantDigits() + - ", isNullable=" + getIsNullable() + - ", defaultValueOverride='" + getDefaultValueOverride() + '\'' + - ", nativeJavaClass='" + getNativeJavaClass() + '\'' + - ", aliases=" + getAliases() + - ", dataType='" + getDataType() + '\'' + - ", defaultValue='" + getDefaultValue() + '\'' + - ", fixedValue='" + getFixedValue() + '\'' + - ", externalTypeGUID='" + getExternalTypeGUID() + '\'' + - ", validValuesSetGUID='" + getValidValuesSetGUID() + '\'' + - ", isDeprecated=" + getIsDeprecated() + - ", displayName='" + getDisplayName() + '\'' + - ", description='" + getDescription() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - DatabaseColumnProperties that = (DatabaseColumnProperties) objectToCompare; - return Objects.equals(formula, that.formula) && - Objects.equals(queries, that.queries); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), formula, queries); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/DatabaseManagerProperties.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/DatabaseManagerProperties.java deleted file mode 100644 index c9ddfff8e15..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/DatabaseManagerProperties.java +++ /dev/null @@ -1,63 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.properties; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * DatabaseManagerProperties describes the DBMS capability of a database server - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class DatabaseManagerProperties extends SoftwareCapabilitiesProperties -{ - /** - * Default constructor - */ - public DatabaseManagerProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public DatabaseManagerProperties(DatabaseManagerProperties template) - { - super(template); - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "DatabaseManagerProperties{" + - "displayName='" + getDisplayName() + '\'' + - ", description='" + getDescription() + '\'' + - ", typeDescription='" + getDeployedImplementationType() + '\'' + - ", version='" + getVersion() + '\'' + - ", patchLevel='" + getPatchLevel() + '\'' + - ", source='" + getSource() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/DatabaseSchemaProperties.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/DatabaseSchemaProperties.java deleted file mode 100644 index 96ec47ce9af..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/DatabaseSchemaProperties.java +++ /dev/null @@ -1,60 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.properties; - -import com.fasterxml.jackson.annotation.*; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * DatabaseSchemaProperties is a class for representing the top level database schema. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class DatabaseSchemaProperties extends DataSetProperties -{ - /** - * Default constructor - */ - public DatabaseSchemaProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public DatabaseSchemaProperties(DatabaseSchemaProperties template) - { - super(template); - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "DatabaseSchemaProperties{" + - "name='" + getName() + '\'' + - ", versionIdentifier='" + getVersionIdentifier() + '\'' + - ", description='" + getDescription() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/DatabaseSchemaTypeProperties.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/DatabaseSchemaTypeProperties.java deleted file mode 100644 index 1fcee2f7216..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/DatabaseSchemaTypeProperties.java +++ /dev/null @@ -1,59 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * DatabaseSchemaTypeProperties is a java bean used to create the database schema type associated with the database. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class DatabaseSchemaTypeProperties extends ReferenceableProperties -{ - /** - * Default constructor - */ - public DatabaseSchemaTypeProperties() - { - } - - - /** - * Copy/clone constructor. Note, this is a deep copy - * - * @param template object to copy - */ - public DatabaseSchemaTypeProperties(DatabaseSchemaTypeProperties template) - { - super(template); - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "DatabaseSchemaTypeProperties{" + - "qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/DatabaseTableProperties.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/DatabaseTableProperties.java deleted file mode 100644 index d703107772d..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/DatabaseTableProperties.java +++ /dev/null @@ -1,103 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.properties; - -import com.fasterxml.jackson.annotation.*; - -import java.util.ArrayList; -import java.util.List; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * DatabaseTableProperties is a class for representing a relational database table. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - property = "class") -@JsonSubTypes( - { - @JsonSubTypes.Type(value = DatabaseViewProperties.class, name = "DatabaseViewProperties"), - }) -public class DatabaseTableProperties extends SchemaElementProperties -{ - private List aliases = null; - - - /** - * Default constructor - */ - public DatabaseTableProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public DatabaseTableProperties(DatabaseTableProperties template) - { - super(template); - - } - - - /** - * Return a list of alternative names for the table. - * - * @return list of names - */ - public List getAliases() - { - if (aliases == null) - { - return null; - } - else if (aliases.isEmpty()) - { - return null; - } - - return new ArrayList<>(aliases); - } - - - /** - * Set up a list of alternative names for the table. - * - * @param aliases list of names - */ - public void setAliases(List aliases) - { - this.aliases = aliases; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "DatabaseTableProperties{" + - "aliases=" + aliases + - ", isDeprecated=" + getIsDeprecated() + - ", displayName='" + getDisplayName() + '\'' + - ", description='" + getDescription() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/DerivedSchemaTypeQueryTargetProperties.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/DerivedSchemaTypeQueryTargetProperties.java deleted file mode 100644 index 89f4c8464d7..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/DerivedSchemaTypeQueryTargetProperties.java +++ /dev/null @@ -1,171 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.properties; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * DerivedSchemaTypeQueryTargetProperties defines a query on a schema element that returns all or part of the value for a - * derived schema type. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class DerivedSchemaTypeQueryTargetProperties -{ - private String queryId = null; - private String query = null; - private String queryTargetGUID = null; - - - - /** - * Default constructor - */ - public DerivedSchemaTypeQueryTargetProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template template schema query to copy. - */ - public DerivedSchemaTypeQueryTargetProperties(DerivedSchemaTypeQueryTargetProperties template) - { - super(); - - if (template != null) - { - queryId = template.getQueryId(); - query = template.getQuery(); - queryTargetGUID = template.getQueryTargetGUID(); - } - } - - - /** - * Return the query id - this is used to identify where the results of this query should be plugged into - * the other queries or the formula for the parent derived schema element. - * - * @return String query identifier - */ - public String getQueryId() { return queryId; } - - - /** - * Set up the query id - this is used to identify where the results of this query should be plugged into - * the other queries or the formula for the parent derived schema element. - * - * @param queryId String query identifier - */ - public void setQueryId(String queryId) - { - this.queryId = queryId; - } - - - /** - * Return the query string for this element. The query string may have placeholders for values returned - * by queries that have a lower queryId than this element. - * - * @return String query - */ - public String getQuery() { return query; } - - - /** - * Set up the query string for this element. The query string may have placeholders for values returned - * by queries that have a lower queryId than this element. - * - * @param query String query - */ - public void setQuery(String query) - { - this.query = query; - } - - - /** - * Return the unique identifier that describes the data source that will be queried to get part of the derived value. - * - * @return string guid - */ - public String getQueryTargetGUID() - { - return queryTargetGUID; - } - - - /** - * Set up the unique identifier that describes the data source that will be queried to get part of the derived value. - * - * @param queryTargetGUID string guid - */ - public void setQueryTargetGUID(String queryTargetGUID) - { - this.queryTargetGUID = queryTargetGUID; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "DerivedSchemaTypeQueryTargetProperties{" + - "queryId=" + queryId + - ", query='" + query + '\'' + - ", queryTargetGUID=" + queryTargetGUID + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof DerivedSchemaTypeQueryTargetProperties)) - { - return false; - } - DerivedSchemaTypeQueryTargetProperties that = (DerivedSchemaTypeQueryTargetProperties) objectToCompare; - return Objects.equals(getQueryId(), that.getQueryId()) && - Objects.equals(getQuery(), that.getQuery()) && - Objects.equals(getQueryTargetGUID(), that.getQueryTargetGUID()); - } - - - /** - * Create a hash code for this element type. - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(getQueryId(), getQuery(), getQueryTargetGUID()); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/EndpointProperties.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/EndpointProperties.java deleted file mode 100644 index 0de07ff8ca1..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/EndpointProperties.java +++ /dev/null @@ -1,240 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * EndpointProperties describes the properties of a server endpoint. The endpoint is linked - * to the data manager's server and describes its network endpoint. It is also linked to connection objects - * that are used by clients to connect to the data manager. A connection is linked to each asset - * that is hosted on the data manager. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class EndpointProperties extends ReferenceableProperties -{ - private String displayName = null; - private String description = null; - private String address = null; - private String protocol = null; - private String encryptionMethod = null; - - - /** - * Default constructor - */ - public EndpointProperties() - { - super(); - } - - - /** - * Copy/clone constructor for an Endpoint. - * - * @param template template object to copy. - */ - public EndpointProperties(EndpointProperties template) - { - super(template); - - if (template != null) - { - displayName = template.getDisplayName(); - description = template.getDescription(); - address = template.getAddress(); - protocol = template.getProtocol(); - encryptionMethod = template.getEncryptionMethod(); - } - } - - - /** - * Set up the display name for UIs and reports. - * - * @param displayName String name - */ - public void setDisplayName(String displayName) - { - this.displayName = displayName; - } - - - /** - * Returns the stored display name property for the endpoint. - * If no display name is available then null is returned. - * - * @return String name - */ - public String getDisplayName() - { - return displayName; - } - - - /** - * Set up description of the element. - * - * @param description String - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * Return the description for the endpoint. - * - * @return String description - */ - public String getDescription() - { - return description; - } - - - /** - * Set up the network address of the Endpoint. - * - * @param address String resource name - */ - public void setAddress(String address) - { - this.address = address; - } - - - /** - * Returns the stored address property for the endpoint. - * If no network address is available then null is returned. - * - * @return address - */ - public String getAddress() - { - return address; - } - - - /** - * Set up the protocol to use for this Endpoint - * - * @param protocol String protocol name - */ - public void setProtocol(String protocol) - { - this.protocol = protocol; - } - - - /** - * Returns the stored protocol property for the endpoint. - * If no protocol is available then null is returned. - * - * @return protocol - */ - public String getProtocol() - { - return protocol; - } - - - /** - * Set up the encryption method used on this Endpoint. - * - * @param encryptionMethod String name - */ - public void setEncryptionMethod(String encryptionMethod) - { - this.encryptionMethod = encryptionMethod; - } - - - /** - * Returns the stored encryptionMethod property for the endpoint. This is an open type allowing the information - * needed to work with a specific encryption mechanism used by the endpoint to be defined. - * If no encryptionMethod property is available (typically because this is an unencrypted endpoint) - * then null is returned. - * - * @return encryption method information - */ - public String getEncryptionMethod() - { - return encryptionMethod; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "EndpointProperties{" + - "displayName='" + displayName + '\'' + - ", description='" + description + '\'' + - ", address='" + address + '\'' + - ", protocol='" + protocol + '\'' + - ", encryptionMethod='" + encryptionMethod + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - EndpointProperties that = (EndpointProperties) objectToCompare; - return Objects.equals(displayName, that.displayName) && - Objects.equals(description, that.description) && - Objects.equals(address, that.address) && - Objects.equals(protocol, that.protocol) && - Objects.equals(encryptionMethod, that.encryptionMethod); - } - - - /** - * Create a hash code for this element type. - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), displayName, description, address, protocol, encryptionMethod); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/EnumSchemaTypeProperties.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/EnumSchemaTypeProperties.java deleted file mode 100644 index 965bf3ce601..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/EnumSchemaTypeProperties.java +++ /dev/null @@ -1,131 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * EnumSchemaTypeProperties carries the specialized parameters for creating or updating enum schema types. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) - -public class EnumSchemaTypeProperties extends SimpleSchemaTypeProperties -{ - private String validValueSetGUID = null; - - /** - * Default constructor - */ - public EnumSchemaTypeProperties() - { - super(); - } - - - /** - * Copy/clone Constructor - * - * @param template template object to copy. - */ - public EnumSchemaTypeProperties(EnumSchemaTypeProperties template) - { - super(template); - } - - - /** - * Return the unique identifier of the valid value set that describes the enum values for this schema element. - * - * @return string guid - */ - public String getValidValueSetGUID() - { - return validValueSetGUID; - } - - - /** - * Set up the unique identifier of the value set that describes the enum values for this schema element. - * - * @param validValueSetGUID string guid - */ - public void setValidValueSetGUID(String validValueSetGUID) - { - this.validValueSetGUID = validValueSetGUID; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "EnumSchemaTypeProperties{" + - "validValueSet='" + validValueSetGUID + '\'' + - ", dataType='" + getDataType() + '\'' + - ", defaultValue='" + getDefaultValue() + '\'' + - ", versionNumber='" + getVersionNumber() + '\'' + - ", author='" + getAuthor() + '\'' + - ", usage='" + getUsage() + '\'' + - ", encodingStandard='" + getEncodingStandard() + '\'' + - ", namespace='" + getNamespace() + '\'' + - ", displayName='" + getDisplayName() + '\'' + - ", description='" + getDescription() + '\'' + - ", deprecated=" + getIsDeprecated() + - ", typeName='" + getTypeName() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - EnumSchemaTypeProperties that = (EnumSchemaTypeProperties) objectToCompare; - return Objects.equals(validValueSetGUID, that.validValueSetGUID); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), validValueSetGUID); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/EventSchemaAttributeProperties.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/EventSchemaAttributeProperties.java deleted file mode 100644 index bd35647d707..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/EventSchemaAttributeProperties.java +++ /dev/null @@ -1,77 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.properties; - -import com.fasterxml.jackson.annotation.*; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * TabularColumnProperties is a class for representing a column within a table type structure. - * Tabular columns are schema attributes with a simple type attached - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class EventSchemaAttributeProperties extends SchemaAttributeProperties -{ - /** - * Default constructor used by subclasses - */ - public EventSchemaAttributeProperties() - { - super(); - } - - - /** - * Copy/clone Constructor. - * - * @param template template object to copy. - */ - public EventSchemaAttributeProperties(EventSchemaAttributeProperties template) - { - super(template); - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "EventSchemaAttributeProperties{" + - "dataType='" + getDataType() + '\'' + - ", defaultValue='" + getDefaultValue() + '\'' + - ", fixedValue='" + getFixedValue() + '\'' + - ", externalTypeGUID='" + getExternalTypeGUID() + '\'' + - ", validValuesSetGUID='" + getValidValuesSetGUID() + '\'' + - ", elementPosition=" + getElementPosition() + - ", minCardinality=" + getMinCardinality() + - ", maxCardinality=" + getMaxCardinality() + - ", allowsDuplicateValues=" + getAllowsDuplicateValues() + - ", orderedValues=" + getOrderedValues() + - ", sortOrder=" + getSortOrder() + - ", minimumLength=" + getMinimumLength() + - ", length=" + getLength() + - ", precision=" + getPrecision() + - ", isNullable=" + getIsNullable() + - ", defaultValueOverride='" + getDefaultValueOverride() + '\'' + - ", nativeJavaClass='" + getNativeJavaClass() + '\'' + - ", aliases=" + getAliases() + - ", isDeprecated=" + getIsDeprecated() + - ", displayName='" + getDisplayName() + '\'' + - ", description='" + getDescription() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/EventTypeListProperties.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/EventTypeListProperties.java deleted file mode 100644 index bb0bae433f5..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/EventTypeListProperties.java +++ /dev/null @@ -1,65 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * EventTypeProperties is a class for representing the top-level element for an event. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class EventTypeListProperties extends SchemaTypeChoiceProperties -{ - /** - * Default constructor - */ - public EventTypeListProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public EventTypeListProperties(EventTypeListProperties template) - { - super(template); - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "EventTypeListProperties{" + - "versionNumber='" + getVersionNumber() + '\'' + - ", author='" + getAuthor() + '\'' + - ", usage='" + getUsage() + '\'' + - ", encodingStandard='" + getEncodingStandard() + '\'' + - ", namespace='" + getNamespace() + '\'' + - ", isDeprecated=" + getIsDeprecated() + - ", displayName='" + getDisplayName() + '\'' + - ", description='" + getDescription() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/ExternalReferenceProperties.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/ExternalReferenceProperties.java deleted file mode 100644 index f897a452ce5..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/ExternalReferenceProperties.java +++ /dev/null @@ -1,388 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ExternalReferenceProperties stores information about an link to an external resource that is relevant to an Asset. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ExternalReferenceProperties -{ - private String linkId = null; - private String linkDescription = null; - private String resourceId = null; - private String resourceDisplayName = null; - private String resourceDescription = null; - private String resourceURL = null; - private String resourceVersion = null; - private String owningOrganization = null; - private String typeName = null; - private Map extendedProperties = null; - private Map additionalProperties = null; - - - /** - * Default constructor - */ - public ExternalReferenceProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template element to copy - */ - public ExternalReferenceProperties(ExternalReferenceProperties template) - { - if (template != null) - { - linkId = template.getLinkId(); - linkDescription = template.getLinkDescription(); - resourceId = template.getResourceId(); - resourceDisplayName = template.getResourceDisplayName(); - resourceURL = template.getResourceURL(); - resourceDescription = template.getResourceDescription(); - resourceVersion = template.getResourceVersion(); - owningOrganization = template.getOwningOrganization(); - typeName = template.getTypeName(); - extendedProperties = template.getExtendedProperties(); - additionalProperties = template.getAdditionalProperties(); - } - } - - - /** - * Return the identifier given to this reference (with respect to this element). - * - * @return linkId - */ - public String getLinkId() - { - return linkId; - } - - - /** - * Set up the identifier given to this reference (with respect to this element). - * - * @param linkId String name - */ - public void setLinkId(String linkId) - { - this.linkId = linkId; - } - - - /** - * Return the description of the reference (with respect to the element that this reference is linked to). - * - * @return String link description. - */ - public String getLinkDescription() { return linkDescription; } - - - /** - * Set up the description of the reference (with respect to the element that this reference is linked to). - * - * @param linkDescription String description - */ - public void setLinkDescription(String linkDescription) - { - this.linkDescription = linkDescription; - } - - - /** - * Return the fully qualified name. - * - * @return String resourceId - */ - public String getResourceId() { return resourceId; } - - - /** - * Set up the fully qualified name. - * - * @param resourceId String identifier - */ - public void setResourceId(String resourceId) - { - this.resourceId = resourceId; - } - - - /** - * Return the display name of this external reference. - * - * @return String display name. - */ - public String getResourceDisplayName() { return resourceDisplayName; } - - - /** - * Set up the display name of this external reference. - * - * @param name - string name - */ - public void setResourceDisplayName(String name) - { - this.resourceDisplayName = name; - } - - - - /** - * Return the description of the resource that this external reference represents. - * - * @return String description - */ - public String getResourceDescription() { return resourceDescription; } - - - /** - * Set up the description of the resource that this external reference represents. - * - * @param resourceDescription String description - */ - public void setResourceDescription(String resourceDescription) - { - this.resourceDescription = resourceDescription; - } - - - /** - * Return the URL used to retrieve the resource that this external reference represents. - * - * @return String URL - */ - public String getResourceURL() { return resourceURL; } - - - /** - * Set up the URL used to retrieve the resource that this external reference represents. - * - * @param url String URL - */ - public void setResourceURL(String url) - { - this.resourceURL = url; - } - - - - /** - * Return the version of the resource that this external reference represents. - * - * @return String version identifier - */ - public String getResourceVersion() { return resourceVersion; } - - - /** - * Set up the version of the resource that this external reference represents. - * - * @param version String identifier - */ - public void setResourceVersion(String version) - { - this.resourceVersion = version; - } - - - /** - * Return the name of the organization that owns the resource that this external reference represents. - * - * @return String organization name - */ - public String getOwningOrganization() { return owningOrganization; } - - - /** - * Set up the name of the organization that owns the resource that this external reference represents. - * - * @param owningOrganization String name - */ - public void setOwningOrganization(String owningOrganization) - { - this.owningOrganization = owningOrganization; - } - - - /** - * Return the type name of the external reference = null for default. - * - * @return string name - */ - public String getTypeName() - { - return typeName; - } - - - /** - * Set up the type name of the external reference = null for default. - * - * @param typeName string name - */ - public void setTypeName(String typeName) - { - this.typeName = typeName; - } - - - /** - * Return any properties associated with the subclass of this element. - * - * @return map of property names to property values - */ - public Map getExtendedProperties() - { - if (extendedProperties == null) - { - return null; - } - else if (extendedProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(extendedProperties); - } - } - - - /** - * Set up any additional properties associated with the element. - * - * @param additionalProperties map of property names to property values - */ - public void setExtendedProperties(Map additionalProperties) - { - this.extendedProperties = additionalProperties; - } - - - /** - * Return any additional properties associated with the element. - * - * @return map of property names to property values - */ - public Map getAdditionalProperties() - { - if (additionalProperties == null) - { - return null; - } - else if (additionalProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(additionalProperties); - } - } - - - /** - * Set up any additional properties associated with the element. - * - * @param additionalProperties map of property names to property values - */ - public void setAdditionalProperties(Map additionalProperties) - { - this.additionalProperties = additionalProperties; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "ExternalReferenceProperties{" + - "linkId='" + linkId + '\'' + - ", linkDescription='" + linkDescription + '\'' + - ", resourceId='" + resourceId + '\'' + - ", resourceDisplayName='" + resourceDisplayName + '\'' + - ", resourceDescription='" + resourceDescription + '\'' + - ", resourceURL='" + resourceURL + '\'' + - ", resourceVersion='" + resourceVersion + '\'' + - ", owningOrganization='" + owningOrganization + '\'' + - ", typeName='" + typeName + '\'' + - ", extendedProperties=" + extendedProperties + - ", additionalProperties=" + additionalProperties + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ExternalReferenceProperties that = (ExternalReferenceProperties) objectToCompare; - return Objects.equals(getResourceId(), that.getResourceId()) && - Objects.equals(getLinkId(), that.getLinkId()) && - Objects.equals(getResourceDisplayName(), that.getResourceDisplayName()) && - Objects.equals(getLinkDescription(), that.getLinkDescription()) && - Objects.equals(getResourceDescription(), that.getResourceDescription()) && - Objects.equals(getResourceURL(), that.getResourceURL()) && - Objects.equals(getResourceVersion(), that.getResourceVersion()) && - Objects.equals(getOwningOrganization(), that.getOwningOrganization()) && - Objects.equals(getTypeName(), that.getTypeName()) && - Objects.equals(getExtendedProperties(), that.getExtendedProperties()) && - Objects.equals(getAdditionalProperties(), that.getAdditionalProperties()); - } - - - - /** - * Uses the guid to create a hashcode. - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), getResourceId(), getLinkId(), getResourceDisplayName(), - getLinkDescription(), getResourceDescription(), getResourceURL(), getResourceVersion(), getOwningOrganization(), - getTypeName(), getExtendedProperties(), getAdditionalProperties()); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/ExternalSchemaTypeProperties.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/ExternalSchemaTypeProperties.java deleted file mode 100644 index 67ad0fe39f6..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/ExternalSchemaTypeProperties.java +++ /dev/null @@ -1,69 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ExternalSchemaTypeProperties carries a reusable schema type. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) - -public class ExternalSchemaTypeProperties extends SimpleSchemaTypeProperties -{ - /** - * Default constructor - */ - public ExternalSchemaTypeProperties() - { - super(); - } - - - /** - * Copy/clone Constructor - * - * @param template template object to copy. - */ - public ExternalSchemaTypeProperties(ExternalSchemaTypeProperties template) - { - super(template); - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "ExternalSchemaTypeProperties{" + - " dataType='" + getDataType() + '\'' + - ", defaultValue='" + getDefaultValue() + '\'' + - ", versionNumber='" + getVersionNumber() + '\'' + - ", author='" + getAuthor() + '\'' + - ", usage='" + getUsage() + '\'' + - ", encodingStandard='" + getEncodingStandard() + '\'' + - ", namespace='" + getNamespace() + '\'' + - ", isDeprecated=" + getIsDeprecated() + - ", displayName='" + getDisplayName() + '\'' + - ", description='" + getDescription() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/FileFolderProperties.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/FileFolderProperties.java deleted file mode 100644 index 61cc7457901..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/FileFolderProperties.java +++ /dev/null @@ -1,69 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * FileFolderProperties defines an asset that is a folder. The qualified name is the fully qualified path name of the folder. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class FileFolderProperties extends DataStoreProperties -{ - /** - * Default constructor - */ - public FileFolderProperties() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public FileFolderProperties(FileFolderProperties template) - { - super(template); - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "FileFolderProperties{" + - "deployedImplementationType='" + getDeployedImplementationType() + '\'' + - ", pathName='" + getPathName() + '\'' + - ", createTime=" + getCreateTime() + - ", modifiedTime=" + getModifiedTime() + - ", encodingType='" + getEncodingType() + '\'' + - ", encodingLanguage='" + getEncodingLanguage() + '\'' + - ", encodingDescription='" + getEncodingDescription() + '\'' + - ", encodingProperties=" + getEncodingProperties() + - ", name='" + getName() + '\'' + - ", versionIdentifier='" + getVersionIdentifier() + '\'' + - ", description='" + getDescription() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/FileSystemProperties.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/FileSystemProperties.java deleted file mode 100644 index 21d1cf500ac..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/FileSystemProperties.java +++ /dev/null @@ -1,161 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.properties; - -import java.util.Objects; - - -/** - * FileSystemProperties describes the root node of a file system. - */ -public class FileSystemProperties extends SoftwareCapabilitiesProperties -{ - private String format = null; - private String encryption = null; - - - /** - * Default constructor - */ - public FileSystemProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public FileSystemProperties(FileSystemProperties template) - { - super(template); - - if (template != null) - { - format = template.getFormat(); - encryption = template.getEncryption(); - } - } - - - /** - * Copy/clone constructor from OCF bean. - * - * @param template object to copy - */ - public FileSystemProperties(SoftwareCapabilitiesProperties template) - { - super(template); - } - - - /** - * Return the format of the file system. - * - * @return string name - */ - public String getFormat() - { - return format; - } - - - /** - * Set up the format of the file system. - * - * @param format string name - */ - public void setFormat(String format) - { - this.format = format; - } - - - /** - * Return the type of encryption used on the file system (or null is unencrypted). - * - * @return encryption type - */ - public String getEncryption() - { - return encryption; - } - - - /** - * Set up the type of encryption used on the file system (or null is unencrypted). - * - * @param encryption encryption type - */ - public void setEncryption(String encryption) - { - this.encryption = encryption; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "FileSystemProperties{" + - "format='" + format + '\'' + - ", encryption='" + encryption + '\'' + - ", displayName='" + getDisplayName() + '\'' + - ", description='" + getDescription() + '\'' + - ", typeDescription='" + getDeployedImplementationType() + '\'' + - ", version='" + getVersion() + '\'' + - ", patchLevel='" + getPatchLevel() + '\'' + - ", source='" + getSource() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - FileSystemProperties that = (FileSystemProperties) objectToCompare; - return Objects.equals(getFormat(), that.getFormat()) && Objects.equals(getEncryption(), that.getEncryption()); - } - - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), getFormat(), getEncryption()); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/FormProperties.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/FormProperties.java deleted file mode 100644 index 89356782cb6..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/FormProperties.java +++ /dev/null @@ -1,62 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * FormProperties is a class for representing a display of data fields for a user to supply data values. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class FormProperties extends DataSetProperties -{ - /** - * Default constructor - */ - public FormProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public FormProperties(FormProperties template) - { - super(template); - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "FormProperties{" + - "name='" + getName() + '\'' + - ", versionIdentifier='" + getVersionIdentifier() + '\'' + - ", description='" + getDescription() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/MapSchemaTypeProperties.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/MapSchemaTypeProperties.java deleted file mode 100644 index a148fbb61ce..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/MapSchemaTypeProperties.java +++ /dev/null @@ -1,67 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * MapSchemaType describes a schema element of type map. It links to the type of schema element for the domain - * (eg property name) for the map and the schema element for the range (eg property value) for the map. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) - -public class MapSchemaTypeProperties extends SchemaTypeProperties -{ - /** - * Default constructor - */ - public MapSchemaTypeProperties() - { - super(); - } - - - /** - * Copy/clone Constructor. - * - * @param template template object to copy. - */ - public MapSchemaTypeProperties(MapSchemaTypeProperties template) - { - super(template); - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "MapSchemaTypeProperties{" + - "versionNumber='" + getVersionNumber() + '\'' + - ", author='" + getAuthor() + '\'' + - ", usage='" + getUsage() + '\'' + - ", encodingStandard='" + getEncodingStandard() + '\'' + - ", namespace='" + getNamespace() + '\'' + - ", displayName='" + getDisplayName() + '\'' + - ", description='" + getDescription() + '\'' + - ", deprecated=" + getIsDeprecated() + - ", typeName='" + getTypeName() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/PrimitiveSchemaTypeProperties.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/PrimitiveSchemaTypeProperties.java deleted file mode 100644 index cfbcb833d8a..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/PrimitiveSchemaTypeProperties.java +++ /dev/null @@ -1,65 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.properties; - -import com.fasterxml.jackson.annotation.*; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * PrimitiveSchemaTypeProperties is a class for representing a primitive value. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class PrimitiveSchemaTypeProperties extends SimpleSchemaTypeProperties -{ - /** - * Default constructor - */ - public PrimitiveSchemaTypeProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public PrimitiveSchemaTypeProperties(PrimitiveSchemaTypeProperties template) - { - super(template); - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "PrimitiveSchemaTypeProperties{" + - "dataType='" + getDataType() + '\'' + - ", defaultValue='" + getDefaultValue() + '\'' + - ", versionNumber='" + getVersionNumber() + '\'' + - ", author='" + getAuthor() + '\'' + - ", usage='" + getUsage() + '\'' + - ", encodingStandard='" + getEncodingStandard() + '\'' + - ", namespace='" + getNamespace() + '\'' + - ", deprecated=" + getIsDeprecated() + - ", displayName='" + getDisplayName() + '\'' + - ", description='" + getDescription() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/QueryProperties.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/QueryProperties.java deleted file mode 100644 index 48f94731c3f..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/QueryProperties.java +++ /dev/null @@ -1,62 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * QueryProperties is a class for representing a query that supports the access of data for a report or form. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class QueryProperties extends DataSetProperties -{ - /** - * Default constructor - */ - public QueryProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public QueryProperties(QueryProperties template) - { - super(template); - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "QueryProperties{" + - "name='" + getName() + '\'' + - ", versionIdentifier='" + getVersionIdentifier() + '\'' + - ", description='" + getDescription() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/ReferenceValueAssignmentProperties.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/ReferenceValueAssignmentProperties.java deleted file mode 100644 index e632933dfe4..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/ReferenceValueAssignmentProperties.java +++ /dev/null @@ -1,257 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.properties; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ReferenceValueAssignmentProperties is a java bean used to create a link between a valid value and a referenceable item - * to enable the valid value to be used as a semiformal tag/classifier. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ReferenceValueAssignmentProperties extends RelationshipProperties -{ - private String attributeName = null; - private int confidence = 0; - private String steward = null; - private String stewardTypeName = null; - private String stewardPropertyName = null; - private String notes = null; - - - /** - * Default constructor - */ - public ReferenceValueAssignmentProperties() - { - } - - - /** - * Copy/clone constructor. Note, this is a deep copy - * - * @param template object to copy - */ - public ReferenceValueAssignmentProperties(ReferenceValueAssignmentProperties template) - { - super (template); - - if (template != null) - { - attributeName = template.getAttributeName(); - confidence = template.getConfidence(); - steward = template.getSteward(); - stewardTypeName = template.getStewardTypeName(); - stewardPropertyName = template.getStewardPropertyName(); - notes = template.getNotes(); - } - } - - - /** - * Return the name of the attribute that this reference data value represents. - * - * @return string - */ - public String getAttributeName() - { - return attributeName; - } - - - /** - * Set up the name of the attribute that this reference data value represents. - * - * @param attributeName string - */ - public void setAttributeName(String attributeName) - { - this.attributeName = attributeName; - } - - - /** - * Return the confidence level (0-100) that the mapping is correct. - * - * @return int - */ - public int getConfidence() - { - return confidence; - } - - - /** - * Set up the confidence level (0-100) that the mapping is correct. - * - * @param confidence int - */ - public void setConfidence(int confidence) - { - this.confidence = confidence; - } - - - /** - * Returns the id of the steward responsible for the mapping. - * - * @return String id - */ - public String getSteward() - { - return steward; - } - - - /** - * Set up the id of the steward responsible for the mapping. - * - * @param steward String id - */ - public void setSteward(String steward) - { - this.steward = steward; - } - - - /** - * Return the type of element that describes the steward. - * - * @return type name - */ - public String getStewardTypeName() - { - return stewardTypeName; - } - - - /** - * Set up the type of element that describes the steward. - * - * @param stewardTypeName type name - */ - public void setStewardTypeName(String stewardTypeName) - { - this.stewardTypeName = stewardTypeName; - } - - - /** - * Return the name of the property that holds the steward's identifier. - * - * @return property name - */ - public String getStewardPropertyName() - { - return stewardPropertyName; - } - - - /** - * Set up the name of the property that holds the steward's identifier. - * - * @param stewardPropertyName property name - */ - public void setStewardPropertyName(String stewardPropertyName) - { - this.stewardPropertyName = stewardPropertyName; - } - - - /** - * Return the additional values associated with the symbolic name. - * - * @return string text - */ - public String getNotes() - { - return notes; - } - - - /** - * Set up the additional values associated with the symbolic name. - * - * @param notes string text - */ - public void setNotes(String notes) - { - this.notes = notes; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "ReferenceValueAssignmentProperties{" + - "confidence=" + confidence + - ", attributeName='" + attributeName + '\'' + - ", steward='" + steward + '\'' + - ", stewardTypeName='" + stewardTypeName + '\'' + - ", stewardPropertyName='" + stewardPropertyName + '\'' + - ", notes='" + notes + '\'' + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - ReferenceValueAssignmentProperties that = (ReferenceValueAssignmentProperties) objectToCompare; - return confidence == that.confidence && - Objects.equals(attributeName, that.attributeName) && - Objects.equals(steward, that.steward) && - Objects.equals(stewardTypeName, that.stewardTypeName) && - Objects.equals(stewardPropertyName, that.stewardPropertyName) && - Objects.equals(notes, that.notes); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), confidence, steward, stewardTypeName, stewardPropertyName, notes); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/ReferenceableProperties.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/ReferenceableProperties.java deleted file mode 100644 index a6f84b2a481..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/ReferenceableProperties.java +++ /dev/null @@ -1,327 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.properties; - -import com.fasterxml.jackson.annotation.*; - -import java.util.*; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * Many open metadata entities are referenceable. It means that they have a qualified name and additional - * properties. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes( - { - @JsonSubTypes.Type(value = AssetProperties.class, name = "AssetProperties"), - @JsonSubTypes.Type(value = ConnectionProperties.class, name = "ConnectionProperties"), - @JsonSubTypes.Type(value = ConnectorTypeProperties.class, name = "ConnectorTypeProperties"), - @JsonSubTypes.Type(value = DatabaseSchemaTypeProperties.class, name = "DatabaseSchemaTypeProperties"), - @JsonSubTypes.Type(value = EndpointProperties.class, name = "EndpointProperties"), - @JsonSubTypes.Type(value = SchemaElementProperties.class, name = "SchemaElementProperties"), - @JsonSubTypes.Type(value = SoftwareCapabilitiesProperties.class, name = "SoftwareCapabilitiesProperties"), - @JsonSubTypes.Type(value = ValidValueSetProperties.class, name = "ValidValueSetProperties"), - @JsonSubTypes.Type(value = ValidValueProperties.class, name = "ValidValueProperties"), - }) -public class ReferenceableProperties -{ - private String qualifiedName = null; - private Map additionalProperties = null; - - private Date effectiveFrom = null; - private Date effectiveTo = null; - - private Map vendorProperties = null; - - private String typeName = null; - private Map extendedProperties = null; - - /** - * Default constructor - */ - public ReferenceableProperties() - { - super(); - } - - - /** - * Copy/clone constructor. Retrieves the values from the supplied template - * - * @param template element to copy - */ - public ReferenceableProperties(ReferenceableProperties template) - { - if (template != null) - { - qualifiedName = template.getQualifiedName(); - additionalProperties = template.getAdditionalProperties(); - - effectiveFrom = template.getEffectiveFrom(); - effectiveTo = template.getEffectiveTo(); - - vendorProperties = template.getVendorProperties(); - - typeName = template.getTypeName(); - extendedProperties = template.getExtendedProperties(); - } - } - - - /** - * Set up the fully qualified name. - * - * @param qualifiedName String name - */ - public void setQualifiedName(String qualifiedName) - { - this.qualifiedName = qualifiedName; - } - - - /** - * Returns the stored qualified name property for the metadata entity. - * If no qualified name is available then the empty string is returned. - * - * @return qualifiedName - */ - public String getQualifiedName() - { - return qualifiedName; - } - - - /** - * Set up additional properties. - * - * @param additionalProperties Additional properties object - */ - public void setAdditionalProperties(Map additionalProperties) - { - this.additionalProperties = additionalProperties; - } - - - /** - * Return a copy of the additional properties. Null means no additional properties are available. - * - * @return AdditionalProperties - */ - public Map getAdditionalProperties() - { - if (additionalProperties == null) - { - return null; - } - else if (additionalProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(additionalProperties); - } - } - - - /** - * Return the date/time that this element is effective from (null means effective from the epoch). - * - * @return date object - */ - public Date getEffectiveFrom() - { - return effectiveFrom; - } - - - /** - * Set up the date/time that this element is effective from (null means effective from the epoch). - * - * @param effectiveFrom date object - */ - public void setEffectiveFrom(Date effectiveFrom) - { - this.effectiveFrom = effectiveFrom; - } - - - /** - * Return the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @return date object - */ - public Date getEffectiveTo() - { - return effectiveTo; - } - - - /** - * Set the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @param effectiveTo date object - */ - public void setEffectiveTo(Date effectiveTo) - { - this.effectiveTo = effectiveTo; - } - - - /** - * Return specific properties for the data manager vendor. - * - * @return name value pairs - */ - public Map getVendorProperties() - { - if (vendorProperties == null) - { - return null; - } - else if (vendorProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(vendorProperties); - } - } - - - /** - * Set up specific properties for the data manager vendor. - * - * @param vendorProperties name value pairs - */ - public void setVendorProperties(Map vendorProperties) - { - this.vendorProperties = vendorProperties; - } - - - /** - * Return the name of the open metadata type for this metadata element. - * - * @return string name - */ - public String getTypeName() - { - return typeName; - } - - - /** - * Set up the name of the open metadata type for this element. - * - * @param typeName string name - */ - public void setTypeName(String typeName) - { - this.typeName = typeName; - } - - - /** - * Return the properties that have been defined for a subtype of this object that are not supported explicitly - * by this bean. - * - * @return property map - */ - public Map getExtendedProperties() - { - if (extendedProperties == null) - { - return null; - } - else if (extendedProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(extendedProperties); - } - } - - - /** - * Set up the properties that have been defined for a subtype of this object that are not supported explicitly - * by this bean. - * - * @param extendedProperties property map - */ - public void setExtendedProperties(Map extendedProperties) - { - this.extendedProperties = extendedProperties; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "ReferenceableProperties{" + - "qualifiedName='" + qualifiedName + '\'' + - ", additionalProperties=" + additionalProperties + - ", effectiveFrom=" + effectiveFrom + - ", effectiveTo=" + effectiveTo + - ", vendorProperties=" + vendorProperties + - ", typeName='" + typeName + '\'' + - ", extendedProperties=" + extendedProperties + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ReferenceableProperties that = (ReferenceableProperties) objectToCompare; - return Objects.equals(qualifiedName, that.qualifiedName) && - Objects.equals(additionalProperties, that.additionalProperties) && - Objects.equals(effectiveFrom, that.effectiveFrom) && - Objects.equals(effectiveTo, that.effectiveTo) && - Objects.equals(vendorProperties, that.vendorProperties) && - Objects.equals(typeName, that.typeName) && - Objects.equals(extendedProperties, that.extendedProperties); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(qualifiedName, additionalProperties, effectiveFrom, effectiveTo, vendorProperties, typeName, extendedProperties); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/RelationshipProperties.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/RelationshipProperties.java deleted file mode 100644 index d4cdec94b00..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/RelationshipProperties.java +++ /dev/null @@ -1,197 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; - -import java.util.Date; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * RelationshipProperties provides the base class for relationships items. This provides extended properties with the ability to - * set effectivity dates. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes( - { - @JsonSubTypes.Type(value = DatabaseForeignKeyProperties.class, name = "DatabaseForeignKeyProperties"), - @JsonSubTypes.Type(value = ReferenceValueAssignmentProperties.class, name = "ReferenceValueAssignmentProperties"), - @JsonSubTypes.Type(value = ValidValueAssignmentProperties.class, name = "ValidValueAssignmentProperties"), - @JsonSubTypes.Type(value = ValidValueMembershipProperties.class, name = "ValidValueMembershipProperties"), - }) -public class RelationshipProperties -{ - private Date effectiveFrom = null; - private Date effectiveTo = null; - - private Map extendedProperties = null; - - - /** - * Default constructor - */ - public RelationshipProperties() - { - super(); - } - - - /** - * Copy/clone constructor. Retrieve values from the supplied template - * - * @param template element to copy - */ - public RelationshipProperties(RelationshipProperties template) - { - if (template != null) - { - effectiveFrom = template.getEffectiveFrom(); - effectiveTo = template.getEffectiveTo(); - extendedProperties = template.getExtendedProperties(); - } - } - - - /** - * Return the date/time that this element is effective from (null means effective from the epoch). - * - * @return date object - */ - public Date getEffectiveFrom() - { - return effectiveFrom; - } - - - /** - * Set up the date/time that this element is effective from (null means effective from the epoch). - * - * @param effectiveFrom date object - */ - public void setEffectiveFrom(Date effectiveFrom) - { - this.effectiveFrom = effectiveFrom; - } - - - /** - * Return the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @return date object - */ - public Date getEffectiveTo() - { - return effectiveTo; - } - - - /** - * Set the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @param effectiveTo date object - */ - public void setEffectiveTo(Date effectiveTo) - { - this.effectiveTo = effectiveTo; - } - - - /** - * Return the properties that have been defined for a subtype of this object that are not supported explicitly - * by this bean. - * - * @return property map - */ - public Map getExtendedProperties() - { - if (extendedProperties == null) - { - return null; - } - else if (extendedProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(extendedProperties); - } - } - - - /** - * Set up the properties that have been defined for a subtype of this object that are not supported explicitly - * by this bean. - * - * @param extendedProperties property map - */ - public void setExtendedProperties(Map extendedProperties) - { - this.extendedProperties = extendedProperties; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "RelationshipProperties{" + - "effectiveFrom=" + effectiveFrom + - ", effectiveTo=" + effectiveTo + - ", extendedProperties=" + extendedProperties + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - RelationshipProperties that = (RelationshipProperties) objectToCompare; - return Objects.equals(effectiveFrom, that.effectiveFrom) && - Objects.equals(effectiveTo, that.effectiveTo); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(effectiveFrom, effectiveTo); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/SchemaAttributeProperties.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/SchemaAttributeProperties.java deleted file mode 100644 index a0cee0e4e97..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/SchemaAttributeProperties.java +++ /dev/null @@ -1,619 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.properties; - -import com.fasterxml.jackson.annotation.*; -import org.odpi.openmetadata.frameworks.openmetadata.enums.DataItemSortOrder; - -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * SchemaAttributeProperties represents a data field that is part of a complex schema type. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - property = "class") -@JsonSubTypes( - { - @JsonSubTypes.Type(value = TabularColumnProperties.class, name = "TabularColumnProperties"), - }) -public class SchemaAttributeProperties extends SchemaElementProperties -{ - private int elementPosition = 0; - private int minCardinality = 0; - private int maxCardinality = 0; - private boolean allowsDuplicateValues = false; - private boolean orderedValues = false; - private String defaultValueOverride = null; - private DataItemSortOrder sortOrder = null; - private int minimumLength = 0; - private int length = 0; - private int precision = 0; - private int significantDigits = 0; - private boolean isNullable = true; - private String nativeJavaClass = null; - private List aliases = null; - - /* - * Details of the associated schema type when type is Primitive, Literal, External or Enum. Other types are - * created independently and linked to the schema attribute. - */ - - private String dataType = null; - private String defaultValue = null; - private String fixedValue = null; - private String externalTypeGUID = null; - private String validValuesSetGUID = null; - - - /** - * Default constructor - */ - public SchemaAttributeProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template template schema attribute to copy. - */ - public SchemaAttributeProperties(SchemaAttributeProperties template) - { - super(template); - - if (template != null) - { - elementPosition = template.getElementPosition(); - minCardinality = template.getMinCardinality(); - maxCardinality = template.getMaxCardinality(); - allowsDuplicateValues = template.getAllowsDuplicateValues(); - orderedValues = template.getOrderedValues(); - sortOrder = template.getSortOrder(); - minimumLength = template.getMinimumLength(); - length = template.getLength(); - precision = template.getPrecision(); - significantDigits = template.getSignificantDigits(); - isNullable = template.getIsNullable(); - defaultValueOverride = template.getDefaultValueOverride(); - nativeJavaClass = template.getNativeJavaClass(); - aliases = template.getAliases(); - - dataType = template.getDataType(); - defaultValue = template.getDefaultValue(); - fixedValue = template.getFixedValue(); - externalTypeGUID = template.getExternalTypeGUID(); - validValuesSetGUID = template.getValidValuesSetGUID(); - } - } - - - /** - * Return the position of this schema attribute in its parent schema. - * - * @return int position in schema - 0 means first - */ - public int getElementPosition() { return elementPosition; } - - - /** - * Set up the position of this schema attribute in its parent schema. - * - * @param elementPosition int position in schema - 0 means first - */ - public void setElementPosition(int elementPosition) - { - this.elementPosition = elementPosition; - } - - - /** - * Return this minimum number of instances allowed for this attribute. - * - * @return int - */ - public int getMinCardinality() - { - return minCardinality; - } - - - /** - * Set up the minimum number of instances allowed for this attribute. - * - * @param minCardinality int - */ - public void setMinCardinality(int minCardinality) - { - this.minCardinality = minCardinality; - } - - - /** - * Return the maximum number of instances allowed for this attribute. - * - * @return int (-1 means infinite) - */ - public int getMaxCardinality() - { - return maxCardinality; - } - - - /** - * Set up the maximum number of instances allowed for this attribute. - * - * @param maxCardinality int (-1 means infinite) - */ - public void setMaxCardinality(int maxCardinality) - { - this.maxCardinality = maxCardinality; - } - - - /** - * Return whether the same value can be used by more than one instance of this attribute. - * - * @return boolean flag - */ - public boolean getAllowsDuplicateValues() - { - return allowsDuplicateValues; - } - - - /** - * Set up whether the same value can be used by more than one instance of this attribute. - * - * @param allowsDuplicateValues boolean flag - */ - public void setAllowsDuplicateValues(boolean allowsDuplicateValues) - { - this.allowsDuplicateValues = allowsDuplicateValues; - } - - - /** - * Return whether the attribute instances are arranged in an order. - * - * @return boolean flag - */ - public boolean getOrderedValues() - { - return orderedValues; - } - - - /** - * Set up whether the attribute instances are arranged in an order. - * - * @param orderedValues boolean flag - */ - public void setOrderedValues(boolean orderedValues) - { - this.orderedValues = orderedValues; - } - - - /** - * Return the order that the attribute instances are arranged in - if any. - * - * @return DataItemSortOrder enum - */ - public DataItemSortOrder getSortOrder() - { - return sortOrder; - } - - - /** - * Set up the order that the attribute instances are arranged in - if any. - * - * @param sortOrder DataItemSortOrder enum - */ - public void setSortOrder(DataItemSortOrder sortOrder) - { - this.sortOrder = sortOrder; - } - - - /** - * Return the minimum length of the data. - * - * @return int - */ - public int getMinimumLength() - { - return minimumLength; - } - - - /** - * Set up the minimum length of the data. - * - * @param minimumLength int - */ - public void setMinimumLength(int minimumLength) - { - this.minimumLength = minimumLength; - } - - - /** - * Return the length of the data field. - * - * @return int - */ - public int getLength() - { - return length; - } - - - /** - * Set up the length of the data field. - * - * @param length int - */ - public void setLength(int length) - { - this.length = length; - } - - - /** - * Return the number of significant digits to the right of decimal point. - * - * @return int - */ - public int getPrecision() - { - return precision; - } - - - /** - * Set up the number of significant digits to the right of decimal point. - * - * @param precision int - */ - public void setPrecision(int precision) - { - this.precision = precision; - } - - - /** - * Return the number of significant digits before the decimal point (zero means it is an integer). - * - * @return int - */ - public int getSignificantDigits() - { - return significantDigits; - } - - - /** - * Set up the number of significant digits before the decimal point (zero means it is an integer). - * - * @param significantDigits int - */ - public void setSignificantDigits(int significantDigits) - { - this.significantDigits = significantDigits; - } - - - /** - * Return whether the field is nullable or not. - * - * @return boolean - */ - public boolean getIsNullable() - { - return isNullable; - } - - - /** - * Set up whether the field is nullable or not. - * - * @param nullable boolean - */ - public void setIsNullable(boolean nullable) - { - isNullable = nullable; - } - - - /** - * Return any default value for this attribute that would override the default defined in the - * schema element for this attribute's type (note only used is type is primitive). - * - * @return String default value override - */ - public String getDefaultValueOverride() { return defaultValueOverride; } - - - /** - * Set up any default value for this attribute that would override the default defined in the - * schema element for this attribute's type (note only used is type is primitive). - * - * @param defaultValueOverride String default value override - */ - public void setDefaultValueOverride(String defaultValueOverride) - { - this.defaultValueOverride = defaultValueOverride; - } - - - /** - * Return the name of the Java class to use to represent this type. - * - * @return fully qualified Java class name - */ - public String getNativeJavaClass() - { - return nativeJavaClass; - } - - - /** - * Set up the name of the Java class to use to represent this type. - * - * @param nativeJavaClass fully qualified Java class name - */ - public void setNativeJavaClass(String nativeJavaClass) - { - this.nativeJavaClass = nativeJavaClass; - } - - - /** - * Return a list of alternative names for the attribute. - * - * @return list of names - */ - public List getAliases() - { - if (aliases == null) - { - return null; - } - else if (aliases.isEmpty()) - { - return null; - } - - return new ArrayList<>(aliases); - } - - - /** - * Set up a list of alternative names for the attribute. - * - * @param aliases list of names - */ - public void setAliases(List aliases) - { - this.aliases = aliases; - } - - - - - /** - * Return the data type for this element. Null means unknown data type. - * - * @return string data type name - */ - public String getDataType() { return dataType; } - - - /** - * Set up the data type for this element. Null means unknown data type. - * - * @param dataType data type name - */ - public void setDataType(String dataType) - { - this.dataType = dataType; - } - - - /** - * Return the default value for the element. Null means no default value set up. - * - * @return string containing default value - */ - public String getDefaultValue() { return defaultValue; } - - - /** - * Set up the default value for the element. Null means no default value set up. - * - * @param defaultValue String containing default value - */ - public void setDefaultValue(String defaultValue) - { - this.defaultValue = defaultValue; - } - - - /** - * Return a fixed literal value - an alternative to default value. - * - * @return string value - */ - public String getFixedValue() - { - return fixedValue; - } - - - /** - * If the column contains a fixed literal value, set this value here - an alternative to default value. - * - * @param fixedValue string - */ - public void setFixedValue(String fixedValue) - { - this.fixedValue = fixedValue; - } - - - /** - * Return the unique identifier of this column's type. - * - * @return unique identifier (guid) of the external schema type - */ - public String getExternalTypeGUID() - { - return externalTypeGUID; - } - - - /** - * If the type of this column is represented by an external (standard type) put its value here. No need to set - * dataType, FixedType or defaultType - * - * @param externalTypeGUID unique identifier (guid) of the external schema type - */ - public void setExternalTypeGUID(String externalTypeGUID) - { - this.externalTypeGUID = externalTypeGUID; - } - - - /** - * Return the set of valid values for this column. - * - * @return unique identifier (guid) of the valid values set - */ - public String getValidValuesSetGUID() - { - return validValuesSetGUID; - } - - - /** - * If the type is controlled by a fixed set of values, set up the unique identifier of the valid values set - * that lists the valid values. - * - * @param validValuesSetGUID unique identifier (guid) of the valid values set - */ - public void setValidValuesSetGUID(String validValuesSetGUID) - { - this.validValuesSetGUID = validValuesSetGUID; - } - - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "SchemaAttributeProperties{" + - "elementPosition=" + elementPosition + - ", minCardinality=" + minCardinality + - ", maxCardinality=" + maxCardinality + - ", allowsDuplicateValues=" + allowsDuplicateValues + - ", orderedValues=" + orderedValues + - ", defaultValueOverride='" + defaultValueOverride + '\'' + - ", sortOrder=" + sortOrder + - ", minimumLength=" + minimumLength + - ", length=" + length + - ", precision=" + precision + - ", significantDigits=" + significantDigits + - ", isNullable=" + isNullable + - ", nativeJavaClass='" + nativeJavaClass + '\'' + - ", aliases=" + aliases + - ", dataType='" + dataType + '\'' + - ", defaultValue='" + defaultValue + '\'' + - ", fixedValue='" + fixedValue + '\'' + - ", externalTypeGUID='" + externalTypeGUID + '\'' + - ", validValuesSetGUID='" + validValuesSetGUID + '\'' + - ", isDeprecated=" + getIsDeprecated() + - ", displayName='" + getDisplayName() + '\'' + - ", description='" + getDescription() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - SchemaAttributeProperties that = (SchemaAttributeProperties) objectToCompare; - return elementPosition == that.elementPosition && - minCardinality == that.minCardinality && - maxCardinality == that.maxCardinality && - allowsDuplicateValues == that.allowsDuplicateValues && - orderedValues == that.orderedValues && - minimumLength == that.minimumLength && - length == that.length && - precision == that.precision && - significantDigits == that.significantDigits && - isNullable == that.isNullable && - Objects.equals(defaultValueOverride, that.defaultValueOverride) && - sortOrder == that.sortOrder && - Objects.equals(nativeJavaClass, that.nativeJavaClass) && - Objects.equals(aliases, that.aliases) && - Objects.equals(dataType, that.dataType) && - Objects.equals(defaultValue, that.defaultValue) && - Objects.equals(fixedValue, that.fixedValue) && - Objects.equals(externalTypeGUID, that.externalTypeGUID) && - Objects.equals(validValuesSetGUID, that.validValuesSetGUID); - } - - - /** - * Return a number that represents the contents of this object. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementPosition, minCardinality, maxCardinality, allowsDuplicateValues, orderedValues, - defaultValueOverride, sortOrder, minimumLength, length, precision, significantDigits, isNullable, nativeJavaClass, - aliases, dataType, defaultValue, fixedValue, externalTypeGUID, validValuesSetGUID); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/SchemaElementProperties.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/SchemaElementProperties.java deleted file mode 100644 index 424056c4b2a..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/SchemaElementProperties.java +++ /dev/null @@ -1,184 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.properties; - -import com.fasterxml.jackson.annotation.*; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * SchemaElementProperties is a bean containing the common attributes for schema types and schema attributes - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes( - { - @JsonSubTypes.Type(value = SchemaAttributeProperties.class, name = "SchemaAttributeProperties"), - @JsonSubTypes.Type(value = SchemaTypeProperties.class, name = "SchemaTypeProperties"), - @JsonSubTypes.Type(value = DatabaseTableProperties.class, name = "DatabaseTableProperties"), - }) -public class SchemaElementProperties extends ReferenceableProperties -{ - private boolean isDeprecated = false; - private String displayName = null; - private String description = null; - - /** - * Default constructor - */ - public SchemaElementProperties() - { - super(); - } - - - /** - * Copy/clone Constructor. - * - * @param template template object to copy. - */ - public SchemaElementProperties(SchemaElementProperties template) - { - super(template); - - if (template != null) - { - isDeprecated = template.getIsDeprecated(); - displayName = template.getDisplayName(); - description = template.getDescription(); - } - } - - - /** - * Is the schema element deprecated? - * - * @return boolean flag - */ - public boolean getIsDeprecated() - { - return isDeprecated; - } - - - /** - * Set whether the schema element deprecated or not. Default is false. - * - * @param deprecated boolean flag - */ - public void setIsDeprecated(boolean deprecated) - { - isDeprecated = deprecated; - } - - - /** - * Return the simple name of the schema element. - * - * @return string name - */ - public String getDisplayName() { return displayName; } - - - /** - * Set up the simple name of the schema element. - * - * @param name String display name - */ - public void setDisplayName(String name) - { - this.displayName = name; - } - - - /** - * Returns the stored description property for the schema element. - * - * @return string description - */ - public String getDescription() - { - return description; - } - - - /** - * Set up the stored description property for the schema element. - * - * @param description string description - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "SchemaElementProperties{" + - "isDeprecated=" + isDeprecated + - ", displayName='" + displayName + '\'' + - ", description='" + description + '\'' + - ", deprecated=" + getIsDeprecated() + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - SchemaElementProperties that = (SchemaElementProperties) objectToCompare; - return isDeprecated == that.isDeprecated && - Objects.equals(displayName, that.displayName) && - Objects.equals(description, that.description); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), isDeprecated, displayName, description); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/SchemaTypeProperties.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/SchemaTypeProperties.java deleted file mode 100644 index 87e5cd29669..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/SchemaTypeProperties.java +++ /dev/null @@ -1,234 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.properties; - -import com.fasterxml.jackson.annotation.*; - -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * SchemaTypeProperties carries the common parameters for creating or updating schema types. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes({ - @JsonSubTypes.Type(value = ComplexSchemaTypeProperties.class, name = "ComplexSchemaTypeProperties"), - @JsonSubTypes.Type(value = LiteralSchemaTypeProperties.class, name = "LiteralSchemaTypeProperties"), - @JsonSubTypes.Type(value = SimpleSchemaTypeProperties.class, name = "SimpleSchemaTypeProperties"), - @JsonSubTypes.Type(value = SchemaTypeChoiceProperties.class, name = "SchemaTypeChoiceProperties"), - @JsonSubTypes.Type(value = MapSchemaTypeProperties.class, name = "MapSchemaTypeProperties"), - }) -public class SchemaTypeProperties extends SchemaElementProperties -{ - private String versionNumber = null; - private String author = null; - private String usage = null; - private String encodingStandard = null; - private String namespace = null; - - - /** - * Default constructor - */ - public SchemaTypeProperties() - { - super(); - } - - - /** - * Copy/clone Constructor. - * - * @param template template object to copy. - */ - public SchemaTypeProperties(SchemaTypeProperties template) - { - super(template); - - if (template != null) - { - versionNumber = template.getVersionNumber(); - author = template.getAuthor(); - usage = template.getUsage(); - encodingStandard = template.getEncodingStandard(); - namespace = template.getNamespace(); - } - } - - - /** - * Return the version number of the schema element - null means no version number. - * - * @return String version number - */ - public String getVersionNumber() { return versionNumber; } - - - /** - * Set up the version number of the schema element - null means no version number. - * - * @param versionNumber String version number - */ - public void setVersionNumber(String versionNumber) - { - this.versionNumber = versionNumber; - } - - - /** - * Return the name of the author of the schema element. Null means the author is unknown. - * - * @return String author name - */ - public String getAuthor() { return author; } - - - /** - * Set up the name of the author of the schema element. Null means the author is unknown. - * - * @param author String author name - */ - public void setAuthor(String author) - { - this.author = author; - } - - - /** - * Return the usage guidance for this schema element. Null means no guidance available. - * - * @return String usage guidance - */ - public String getUsage() { return usage; } - - - /** - * Set up the usage guidance for this schema element. Null means no guidance available. - * - * @param usage String usage guidance - */ - public void setUsage(String usage) - { - this.usage = usage; - } - - - /** - * Return the format (encoding standard) used for this schema. It may be XML, JSON, SQL DDL or something else. - * Null means the encoding standard is unknown or there are many choices. - * - * @return String encoding standard - */ - public String getEncodingStandard() { return encodingStandard; } - - - /** - * Set up the format (encoding standard) used for this schema. It may be XML, JSON, SQL DDL or something else. - * Null means the encoding standard is unknown or there are many choices. - * - * @param encodingStandard String encoding standard - */ - public void setEncodingStandard(String encodingStandard) - { - this.encodingStandard = encodingStandard; - } - - - /** - * Return the name of the namespace that this type belongs to. - * - * @return string name - */ - public String getNamespace() - { - return namespace; - } - - - /** - * Set up the name of the namespace that this type belongs to. - * - * @param namespace string name - */ - public void setNamespace(String namespace) - { - this.namespace = namespace; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "SchemaTypeProperties{" + - "versionNumber='" + versionNumber + '\'' + - ", author='" + author + '\'' + - ", usage='" + usage + '\'' + - ", encodingStandard='" + encodingStandard + '\'' + - ", namespace='" + namespace + '\'' + - ", displayName='" + getDisplayName() + '\'' + - ", description='" + getDescription() + '\'' + - ", deprecated=" + getIsDeprecated() + - ", typeName='" + getTypeName() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - SchemaTypeProperties that = (SchemaTypeProperties) objectToCompare; - return Objects.equals(versionNumber, that.versionNumber) && - Objects.equals(author, that.author) && - Objects.equals(usage, that.usage) && - Objects.equals(encodingStandard, that.encodingStandard) && - Objects.equals(namespace, that.namespace); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), versionNumber, author, usage, encodingStandard, namespace); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/SoftwareCapabilitiesProperties.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/SoftwareCapabilitiesProperties.java deleted file mode 100644 index 448a1b6b216..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/SoftwareCapabilitiesProperties.java +++ /dev/null @@ -1,265 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.properties; - -import com.fasterxml.jackson.annotation.*; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * SoftwareCapabilitiesProperties describe the properties for a capability deployed to a software server. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes( - { - @JsonSubTypes.Type(value = DatabaseManagerProperties.class, name = "DatabaseManagerProperties"), - @JsonSubTypes.Type(value = FileSystemProperties.class, name = "FileSystemProperties"), - @JsonSubTypes.Type(value = FileManagerProperties.class, name = "FileManagerProperties"), - }) -public class SoftwareCapabilitiesProperties extends ReferenceableProperties -{ - private String displayName = null; - private String description = null; - private String deployedImplementationType = null; - private String version = null; - private String patchLevel = null; - private String source = null; - - - /** - * Default constructor. - */ - public SoftwareCapabilitiesProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public SoftwareCapabilitiesProperties(SoftwareCapabilitiesProperties template) - { - super(template); - - if (template != null) - { - displayName = template.getDisplayName(); - description = template.getDescription(); - deployedImplementationType = template.getDeployedImplementationType(); - version = template.getVersion(); - patchLevel = template.getPatchLevel(); - source = template.getSource(); - } - } - - - /** - * Return the display name for messages and UI. - * - * @return string name - */ - public String getDisplayName() - { - return displayName; - } - - - /** - * Set up the display name for messages and UI. - * - * @param displayName string name - */ - public void setDisplayName(String displayName) - { - this.displayName = displayName; - } - - - /** - * Return the description of the capability. - * - * @return string description - */ - public String getDescription() - { - return description; - } - - - /** - * Set up the description of the capability. - * - * @param description string - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * Return the description of the type of capability this is. - * - * @return string description - */ - public String getDeployedImplementationType() - { - return deployedImplementationType; - } - - - /** - * Set up the description of the type of capability this is. - * - * @param deployedImplementationType string - */ - public void setDeployedImplementationType(String deployedImplementationType) - { - this.deployedImplementationType = deployedImplementationType; - } - - - /** - * Return the version of the capability. - * - * @return version string - */ - public String getVersion() - { - return version; - } - - - /** - * Set up the version string of the capability. - * - * @param version string - */ - public void setVersion(String version) - { - this.version = version; - } - - - /** - * Return the patch level of the capability. - * - * @return patch level string - */ - public String getPatchLevel() - { - return patchLevel; - } - - - /** - * Set up the patch level of the capability. - * - * @param patchLevel string - */ - public void setPatchLevel(String patchLevel) - { - this.patchLevel = patchLevel; - } - - - /** - * Return the source of the capability implementation. - * - * @return string url - */ - public String getSource() - { - return source; - } - - - /** - * Set up the source of the capability implementation. - * - * @param source string url - */ - public void setSource(String source) - { - this.source = source; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "SoftwareCapabilitiesProperties{" + - "displayName='" + displayName + '\'' + - ", description='" + description + '\'' + - ", typeDescription='" + deployedImplementationType + '\'' + - ", version='" + version + '\'' + - ", patchLevel='" + patchLevel + '\'' + - ", source='" + source + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - SoftwareCapabilitiesProperties that = (SoftwareCapabilitiesProperties) objectToCompare; - return Objects.equals(getDisplayName(), that.getDisplayName()) && - Objects.equals(getDescription(), that.getDescription()) && - Objects.equals(getDeployedImplementationType(), that.getDeployedImplementationType()) && - Objects.equals(getVersion(), that.getVersion()) && - Objects.equals(getPatchLevel(), that.getPatchLevel()) && - Objects.equals(getSource(), that.getSource()); - } - - - /** - * Create a hash code for this element type. - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), getDisplayName(), getDescription(), getDeployedImplementationType(), getVersion(), - getPatchLevel(), getSource()); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/TabularColumnProperties.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/TabularColumnProperties.java deleted file mode 100644 index 52f8e269c44..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/TabularColumnProperties.java +++ /dev/null @@ -1,89 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.properties; - -import com.fasterxml.jackson.annotation.*; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * TabularColumnProperties is a class for representing a column within a table type structure. - * Tabular columns are schema attributes with a simple type attached - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes( - { - @JsonSubTypes.Type(value = DatabaseColumnProperties.class, name = "DatabaseColumnProperties"), - }) -public class TabularColumnProperties extends SchemaAttributeProperties -{ - /** - * Default constructor used by subclasses - */ - public TabularColumnProperties() - { - super(); - } - - - /** - * Copy/clone Constructor. - * - * @param template template object to copy. - */ - public TabularColumnProperties(TabularColumnProperties template) - { - super(template); - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "TabularColumnProperties{" + - "elementPosition=" + getElementPosition() + - ", minCardinality=" + getMinCardinality() + - ", maxCardinality=" + getMaxCardinality() + - ", allowsDuplicateValues=" + getAllowsDuplicateValues() + - ", orderedValues=" + getOrderedValues() + - ", sortOrder=" + getSortOrder() + - ", minimumLength=" + getMinimumLength() + - ", length=" + getLength() + - ", precision=" + getPrecision() + - ", significantDigits=" + getSignificantDigits() + - ", isNullable=" + getIsNullable() + - ", defaultValueOverride='" + getDefaultValueOverride() + '\'' + - ", nativeJavaClass='" + getNativeJavaClass() + '\'' + - ", aliases=" + getAliases() + - ", dataType='" + getDataType() + '\'' + - ", defaultValue='" + getDefaultValue() + '\'' + - ", fixedValue='" + getFixedValue() + '\'' + - ", externalTypeGUID='" + getExternalTypeGUID() + '\'' + - ", validValuesSetGUID='" + getValidValuesSetGUID() + '\'' + - ", isDeprecated=" + getIsDeprecated() + - ", displayName='" + getDisplayName() + '\'' + - ", description='" + getDescription() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/TabularSchemaTypeProperties.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/TabularSchemaTypeProperties.java deleted file mode 100644 index af2fdbfc8d7..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/TabularSchemaTypeProperties.java +++ /dev/null @@ -1,65 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.properties; - -import com.fasterxml.jackson.annotation.*; - - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * TabularSchemaTypeProperties is a class for representing a tabular schema such as the - * structure of a CSV file. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class TabularSchemaTypeProperties extends ComplexSchemaTypeProperties -{ - /** - * Default constructor used by subclasses - */ - public TabularSchemaTypeProperties() - { - super(); - } - - - /** - * Copy/clone Constructor. - * - * @param template template object to copy. - */ - public TabularSchemaTypeProperties(TabularSchemaTypeProperties template) - { - super(template); - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "TabularSchemaTypeProperties{" + - "versionNumber='" + getVersionNumber() + '\'' + - ", author='" + getAuthor() + '\'' + - ", usage='" + getUsage() + '\'' + - ", encodingStandard='" + getEncodingStandard() + '\'' + - ", namespace='" + getNamespace() + '\'' + - ", isDeprecated=" + getIsDeprecated() + - ", displayName='" + getDisplayName() + '\'' + - ", description='" + getDescription() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/ValidValueAssignmentProperties.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/ValidValueAssignmentProperties.java deleted file mode 100644 index 47b32c25936..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/ValidValueAssignmentProperties.java +++ /dev/null @@ -1,115 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ValidValueAssignmentProperties describes the properties between a referenceable and its valid values. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ValidValueAssignmentProperties extends RelationshipProperties -{ - private boolean strictRequirement = true; - - - /** - * Default constructor - */ - public ValidValueAssignmentProperties() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ValidValueAssignmentProperties(ValidValueAssignmentProperties template) - { - super(template); - - if (template != null) - { - strictRequirement = template.getStrictRequirement(); - } - } - - - /** - * Return the strict requirement flag. - * - * @return boolean - */ - public boolean getStrictRequirement() - { - return strictRequirement; - } - - - /** - * Set up the strict requirement flag. - * - * @param strictRequirement string type name - */ - public void setStrictRequirement(boolean strictRequirement) - { - this.strictRequirement = strictRequirement; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ValidValueAssignmentProperties{" + "strictRequirement=" + strictRequirement + '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ValidValueAssignmentProperties that = (ValidValueAssignmentProperties) objectToCompare; - return strictRequirement == that.strictRequirement; - } - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(strictRequirement); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/ValidValueMembershipProperties.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/ValidValueMembershipProperties.java deleted file mode 100644 index 8bb6fe2646b..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/ValidValueMembershipProperties.java +++ /dev/null @@ -1,126 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.properties; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ValidValueMembershipProperties provides a flag to indicate if this value is the default value for the set. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ValidValueMembershipProperties extends RelationshipProperties -{ - boolean isDefaultValue = false; - - /** - * Default constructor - */ - public ValidValueMembershipProperties() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ValidValueMembershipProperties(ValidValueMembershipProperties template) - { - super(template); - - if (template != null) - { - this.isDefaultValue = template.getDefaultValue(); - } - } - - - /** - * Return whether it is a default value. - * - * @return flag - */ - public boolean getDefaultValue() - { - return isDefaultValue; - } - - - /** - * Set up whether it is a default value. - * - * @param defaultValue flag - */ - public void setDefaultValue(boolean defaultValue) - { - this.isDefaultValue = defaultValue; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ValidValueMembershipProperties{" + - "effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", extendedProperties=" + getExtendedProperties() + - ", isDefaultValue=" + isDefaultValue + - ", defaultValue=" + getDefaultValue() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - ValidValueMembershipProperties that = (ValidValueMembershipProperties) objectToCompare; - return isDefaultValue == that.isDefaultValue; - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), isDefaultValue); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/ValidValueProperties.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/ValidValueProperties.java deleted file mode 100644 index b51fdbeb52b..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/ValidValueProperties.java +++ /dev/null @@ -1,335 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ValidValueProperties provides the common super class for ValidValueSet and ValidValueDefinition. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ValidValueProperties extends ReferenceableProperties -{ - private String displayName = null; - private String description = null; - private String usage = null; - private String scope = null; - private String category = null; - private String preferredValue = null; - private String dataType = null; - private boolean isDeprecated = false; - private boolean isCaseSensitive = false; - - - /** - * Constructor - */ - public ValidValueProperties() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ValidValueProperties(ValidValueProperties template) - { - super(template); - - if (template != null) - { - displayName = template.getDisplayName(); - description = template.getDescription(); - usage = template.getUsage(); - scope = template.getScope(); - category = template.getCategory(); - preferredValue = template.getPreferredValue(); - dataType = template.getDataType(); - isDeprecated = template.getIsDeprecated(); - isCaseSensitive = template.getIsCaseSensitive(); - } - } - - - /** - * Returns the stored display name property for the valid value. - * If no display name is available then null is returned. - * - * @return String name - */ - public String getDisplayName() - { - return displayName; - } - - - /** - * Set up the stored display name property for the valid value. - * - * @param displayName String name - */ - public void setDisplayName(String displayName) - { - this.displayName = displayName; - } - - - /** - * Returns the stored description property for the valid value. - * If no description is provided then null is returned. - * - * @return description String text - */ - public String getDescription() - { - return description; - } - - - /** - * Set up the stored description property associated with the valid value. - * - * @param description String text - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * Return the description of how this valid value should be used. - * - * @return String text - */ - public String getUsage() - { - return usage; - } - - - /** - * Set up the description of how this valid value should be used. - * - * @param usage String text - */ - public void setUsage(String usage) - { - this.usage = usage; - } - - - /** - * Return the scope of values that this valid value covers (normally used with sets) - * - * @return String text - */ - public String getScope() - { - return scope; - } - - - /** - * Set up the scope of values that this valid value covers (normally used with sets) - * - * @param scope String text - */ - public void setScope(String scope) - { - this.scope = scope; - } - - - /** - * Return the category of reference data. - * - * @return string name - */ - public String getCategory() - { - return category; - } - - - /** - * Set up the category of reference data. - * - * @param category string name - */ - public void setCategory(String category) - { - this.category = category; - } - - - /** - * Return the preferred values to use in implementations (normally used with definitions) - * - * @return String value - */ - public String getPreferredValue() - { - return preferredValue; - } - - - /** - * Set up the preferred values to use in implementations (normally used with definitions) - * - * @param preferredValue String value - */ - public void setPreferredValue(String preferredValue) - { - this.preferredValue = preferredValue; - } - - - /** - * Returns the data type of the preferred value. - * - * @return string - */ - public String getDataType() - { - return dataType; - } - - - /** - * Set up the data type of the preferred value. - * - * @param dataType string - */ - public void setDataType(String dataType) - { - this.dataType = dataType; - } - - - /** - * Is the valid value deprecated? - * - * @return boolean flag - */ - public boolean getIsDeprecated() - { - return isDeprecated; - } - - - /** - * Set whether the valid value is deprecated or not. Default is false. - * - * @param deprecated boolean flag - */ - public void setIsDeprecated(boolean deprecated) - { - isDeprecated = deprecated; - } - - - /** - * Return whether this valid value is case-sensitive, or will match irrespective of case. - * - * @return boolean flag - */ - public boolean getIsCaseSensitive() - { - return isCaseSensitive; - } - - - /** - * Set up whether this valid value is case-sensitive, or will match irrespective of case. - * - * @param caseSensitive boolean flag - */ - public void setIsCaseSensitive(boolean caseSensitive) - { - isCaseSensitive = caseSensitive; - } - - - /** - * Generate a string containing the properties. - * - * @return string value - */ - @Override - public String toString() - { - return "ValidValueProperties{" + - "displayName='" + displayName + '\'' + - ", description='" + description + '\'' + - ", usage='" + usage + '\'' + - ", scope='" + scope + '\'' + - ", category='" + category + '\'' + - ", preferredValue='" + preferredValue + '\'' + - ", dataType='" + dataType + '\'' + - ", isDeprecated=" + isDeprecated + - ", isCaseSensitive=" + isCaseSensitive + - ", typeName='" + getTypeName() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ValidValueProperties that = (ValidValueProperties) objectToCompare; - return Objects.equals(displayName, that.displayName) && - Objects.equals(description, that.description) && - Objects.equals(usage, that.usage) && - Objects.equals(scope, that.scope) && - Objects.equals(category, that.category) && - Objects.equals(isDeprecated, that.isDeprecated) && - Objects.equals(isCaseSensitive, that.isCaseSensitive) && - Objects.equals(preferredValue, that.preferredValue) && - Objects.equals(dataType, that.dataType); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), displayName, description, usage, scope, category, preferredValue, dataType, isDeprecated, isCaseSensitive); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/APIOperationResponse.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/APIOperationResponse.java deleted file mode 100644 index 2f4a03372c6..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/APIOperationResponse.java +++ /dev/null @@ -1,135 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.APIOperationElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * APIOperationResponse is a response object for passing back a single APIOperation - * element or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class APIOperationResponse extends DataManagerOMASAPIResponse -{ - private APIOperationElement element = null; - - - /** - * Default constructor - */ - public APIOperationResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public APIOperationResponse(APIOperationResponse template) - { - super(template); - - if (template != null) - { - element = template.getElement(); - } - } - - - /** - * Return the metadata element. - * - * @return result object - */ - public APIOperationElement getElement() - { - return element; - } - - - /** - * Set up the metadata element to return. - * - * @param element result object - */ - public void setElement(APIOperationElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "APIOperationResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - APIOperationResponse that = (APIOperationResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/APIOperationsResponse.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/APIOperationsResponse.java deleted file mode 100644 index 4b60d1f951b..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/APIOperationsResponse.java +++ /dev/null @@ -1,147 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.APIOperationElement; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * APIOperationsResponse is a response object for passing back a a list of APIOperations - * or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class APIOperationsResponse extends DataManagerOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public APIOperationsResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public APIOperationsResponse(APIOperationsResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elementList); - } - } - - - /** - * Set up the metadata element to return. - * - * @param elementList result object - */ - public void setElementList(List elementList) - { - this.elementList = elementList; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "APIOperationsResponse{" + - "elementList=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - APIOperationsResponse that = (APIOperationsResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/APIParameterListResponse.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/APIParameterListResponse.java deleted file mode 100644 index 8b5e6ae8322..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/APIParameterListResponse.java +++ /dev/null @@ -1,135 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.APIParameterListElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * APIParameterListResponse is a response object for passing back a single APIParameterList - * element or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class APIParameterListResponse extends DataManagerOMASAPIResponse -{ - private APIParameterListElement element = null; - - - /** - * Default constructor - */ - public APIParameterListResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public APIParameterListResponse(APIParameterListResponse template) - { - super(template); - - if (template != null) - { - element = template.getElement(); - } - } - - - /** - * Return the metadata element. - * - * @return result object - */ - public APIParameterListElement getElement() - { - return element; - } - - - /** - * Set up the metadata element to return. - * - * @param element result object - */ - public void setElement(APIParameterListElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "APIParameterListResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - APIParameterListResponse that = (APIParameterListResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/APIParameterListsResponse.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/APIParameterListsResponse.java deleted file mode 100644 index 5db15f98127..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/APIParameterListsResponse.java +++ /dev/null @@ -1,147 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.APIParameterListElement; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * APIParameterListsResponse is a response object for passing back a a list of APIParameterLists - * or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class APIParameterListsResponse extends DataManagerOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public APIParameterListsResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public APIParameterListsResponse(APIParameterListsResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elementList); - } - } - - - /** - * Set up the metadata element to return. - * - * @param elementList result object - */ - public void setElementList(List elementList) - { - this.elementList = elementList; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "APIParameterListsResponse{" + - "elementList=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - APIParameterListsResponse that = (APIParameterListsResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/APIParameterResponse.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/APIParameterResponse.java deleted file mode 100644 index d99e83dcde1..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/APIParameterResponse.java +++ /dev/null @@ -1,135 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.APIParameterElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * APIParameterResponse is a response object for passing back a single APIParameter - * element or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class APIParameterResponse extends DataManagerOMASAPIResponse -{ - private APIParameterElement element = null; - - - /** - * Default constructor - */ - public APIParameterResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public APIParameterResponse(APIParameterResponse template) - { - super(template); - - if (template != null) - { - element = template.getElement(); - } - } - - - /** - * Return the metadata element. - * - * @return result object - */ - public APIParameterElement getElement() - { - return element; - } - - - /** - * Set up the metadata element to return. - * - * @param element result object - */ - public void setElement(APIParameterElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "APIParameterResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - APIParameterResponse that = (APIParameterResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/APIParametersResponse.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/APIParametersResponse.java deleted file mode 100644 index 444febf56ba..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/APIParametersResponse.java +++ /dev/null @@ -1,147 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.APIParameterElement; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * APIParametersResponse is a response object for passing back a a list of APIParameters - * or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class APIParametersResponse extends DataManagerOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public APIParametersResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public APIParametersResponse(APIParametersResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elementList); - } - } - - - /** - * Set up the metadata element to return. - * - * @param elementList result object - */ - public void setElementList(List elementList) - { - this.elementList = elementList; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "APIParametersResponse{" + - "elementList=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - APIParametersResponse that = (APIParametersResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/APIResponse.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/APIResponse.java deleted file mode 100644 index 41685adb263..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/APIResponse.java +++ /dev/null @@ -1,135 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.APIElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * APIResponse is a response object for passing back a single API - * element or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class APIResponse extends DataManagerOMASAPIResponse -{ - private APIElement element = null; - - - /** - * Default constructor - */ - public APIResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public APIResponse(APIResponse template) - { - super(template); - - if (template != null) - { - element = template.getElement(); - } - } - - - /** - * Return the metadata element. - * - * @return result object - */ - public APIElement getElement() - { - return element; - } - - - /** - * Set up the metadata element to return. - * - * @param element result object - */ - public void setElement(APIElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "APIResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - APIResponse that = (APIResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/APIsResponse.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/APIsResponse.java deleted file mode 100644 index b46c4f43f52..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/APIsResponse.java +++ /dev/null @@ -1,147 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.APIElement; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * APIsResponse is a response object for passing back a a list of APIs - * or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class APIsResponse extends DataManagerOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public APIsResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public APIsResponse(APIsResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elementList); - } - } - - - /** - * Set up the metadata element to return. - * - * @param elementList result object - */ - public void setElementList(List elementList) - { - this.elementList = elementList; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "APIsResponse{" + - "elementList=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - APIsResponse that = (APIsResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/AssetConnectionRequestBody.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/AssetConnectionRequestBody.java deleted file mode 100644 index d9d6eca0c55..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/AssetConnectionRequestBody.java +++ /dev/null @@ -1,117 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * AssetConnectionRequestBody carries the parameters for creating a new relationship between an asset and a connection. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class AssetConnectionRequestBody extends MetadataSourceRequestBody -{ - private String assetSummary = null; - - - /** - * Default constructor - */ - public AssetConnectionRequestBody() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public AssetConnectionRequestBody(AssetConnectionRequestBody template) - { - super(template); - - if (template != null) - { - assetSummary = template.getAssetSummary(); - } - } - - - /** - * Return the full path of the file - this should be unique. - * - * @return string name - */ - public String getAssetSummary() - { - return assetSummary; - } - - - /** - * Set up the full path of the file - this should be unique. - * - * @param assetSummary string name - */ - public void setAssetSummary(String assetSummary) - { - this.assetSummary = assetSummary; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "PathNameRequestBody{" + - ", assetSummary='" + assetSummary + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - AssetConnectionRequestBody that = (AssetConnectionRequestBody) objectToCompare; - return Objects.equals(getAssetSummary(), that.getAssetSummary()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(getAssetSummary()); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/ClassificationRequestBody.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/ClassificationRequestBody.java deleted file mode 100644 index 52e7a9a8b6e..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/ClassificationRequestBody.java +++ /dev/null @@ -1,127 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.rest; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.properties.ClassificationProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * ClassificationRequestBody describes the request body used when attaching classification to elements. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ClassificationRequestBody extends ExternalSourceRequestBody -{ - private ClassificationProperties properties = null; - - - /** - * Default constructor - */ - public ClassificationRequestBody() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public ClassificationRequestBody(ClassificationRequestBody template) - { - super(template); - - if (template != null) - { - properties = template.getProperties(); - } - } - - - /** - * Return the properties for the classification. - * - * @return properties object - */ - public ClassificationProperties getProperties() - { - return properties; - } - - - /** - * Set up the properties for the classification. - * - * @param properties properties object - */ - public void setProperties(ClassificationProperties properties) - { - this.properties = properties; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ClassificationRequestBody{" + - "externalSourceGUID='" + getExternalSourceGUID() + '\'' + - ", externalSourceName='" + getExternalSourceName() + '\'' + - ", properties=" + properties + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ClassificationRequestBody that = (ClassificationRequestBody) objectToCompare; - return Objects.equals(getProperties(), that.getProperties()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), properties); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/ConnectionRequestBody.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/ConnectionRequestBody.java deleted file mode 100644 index 244bd0615b7..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/ConnectionRequestBody.java +++ /dev/null @@ -1,172 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.properties.ConnectionProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ConnectionRequestBody carries the parameters for describing a connection. - * The external source identifiers are used if the connection was created using the external source identifiers. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ConnectionRequestBody extends ConnectionProperties -{ - private String externalSourceGUID = null; - private String externalSourceName = null; - - - /** - * Default constructor - */ - public ConnectionRequestBody() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ConnectionRequestBody(ConnectionRequestBody template) - { - super(template); - - if (template != null) - { - externalSourceGUID = template.getExternalSourceGUID(); - externalSourceName = template.getExternalSourceName(); - } - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ConnectionRequestBody(ConnectionProperties template) - { - super(template); - } - - - /** - * Return the unique identifier of the software server capability entity that represented the external source - null for local. - * - * @return string guid - */ - public String getExternalSourceGUID() - { - return externalSourceGUID; - } - - - /** - * Set up the unique identifier of the software server capability entity that represented the external source - null for local. - * - * @param externalSourceGUID string guid - */ - public void setExternalSourceGUID(String externalSourceGUID) - { - this.externalSourceGUID = externalSourceGUID; - } - - - /** - * Return the unique name of the software server capability entity that represented the external source. - * - * @return string name - */ - public String getExternalSourceName() - { - return externalSourceName; - } - - - /** - * Set up the unique name of the software server capability entity that represented the external source. - * - * @param externalSourceName string name - */ - public void setExternalSourceName(String externalSourceName) - { - this.externalSourceName = externalSourceName; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ConnectionRequestBody{" + - "externalSourceGUID='" + externalSourceGUID + '\'' + - ", externalSourceName='" + externalSourceName + '\'' + - ", displayName='" + getDisplayName() + '\'' + - ", description='" + getDescription() + '\'' + - ", userId='" + getUserId() + '\'' + - ", encryptedPassword='" + getEncryptedPassword() + '\'' + - ", clearPassword='" + getClearPassword() + '\'' + - ", configurationProperties=" + getConfigurationProperties() + - ", securedProperties=" + getSecuredProperties() + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ConnectionRequestBody that = (ConnectionRequestBody) objectToCompare; - return Objects.equals(externalSourceGUID, that.externalSourceGUID) && - Objects.equals(externalSourceName, that.externalSourceName); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), externalSourceGUID, externalSourceName); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/ConnectionResponse.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/ConnectionResponse.java deleted file mode 100644 index 8ad92294cf5..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/ConnectionResponse.java +++ /dev/null @@ -1,134 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.ConnectionElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ConnectionResponse is a response object for passing back a single connection object. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ConnectionResponse extends DataManagerOMASAPIResponse -{ - private ConnectionElement element = null; - - - /** - * Default constructor - */ - public ConnectionResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ConnectionResponse(ConnectionResponse template) - { - super(template); - - if (template != null) - { - element = template.getElement(); - } - } - - - /** - * Return the metadata element. - * - * @return result object - */ - public ConnectionElement getElement() - { - return element; - } - - - /** - * Set up the metadata element to return. - * - * @param element result object - */ - public void setElement(ConnectionElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ConnectionResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ConnectionResponse that = (ConnectionResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/ConnectionsResponse.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/ConnectionsResponse.java deleted file mode 100644 index b7e9f43c01f..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/ConnectionsResponse.java +++ /dev/null @@ -1,146 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.ConnectionElement; - -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ConnectionsResponse is a response object for passing back a list of connection objects. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ConnectionsResponse extends DataManagerOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public ConnectionsResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ConnectionsResponse(ConnectionsResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return elementList; - } - } - - - /** - * Set up the list of metadata elements to return. - * - * @param elementList result object - */ - public void setElementList(List elementList) - { - this.elementList = elementList; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ConnectionsResponse{" + - "element=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ConnectionsResponse that = (ConnectionsResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/ConnectorTypeRequestBody.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/ConnectorTypeRequestBody.java deleted file mode 100644 index 1b64b4a9972..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/ConnectorTypeRequestBody.java +++ /dev/null @@ -1,171 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.properties.ConnectorTypeProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ConnectorTypeRequestBody carries the parameters for describing a connector type. - * The external source identifiers are used if the connector type was created using the external source identifiers. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ConnectorTypeRequestBody extends ConnectorTypeProperties -{ - private String externalSourceGUID = null; - private String externalSourceName = null; - - - /** - * Default constructor - */ - public ConnectorTypeRequestBody() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ConnectorTypeRequestBody(ConnectorTypeRequestBody template) - { - super(template); - - if (template != null) - { - externalSourceGUID = template.getExternalSourceGUID(); - externalSourceName = template.getExternalSourceName(); - } - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ConnectorTypeRequestBody(ConnectorTypeProperties template) - { - super(template); - } - - - /** - * Return the unique identifier of the software server capability entity that represented the external source - null for local. - * - * @return string guid - */ - public String getExternalSourceGUID() - { - return externalSourceGUID; - } - - - /** - * Set up the unique identifier of the software server capability entity that represented the external source - null for local. - * - * @param externalSourceGUID string guid - */ - public void setExternalSourceGUID(String externalSourceGUID) - { - this.externalSourceGUID = externalSourceGUID; - } - - - /** - * Return the unique name of the software server capability entity that represented the external source. - * - * @return string name - */ - public String getExternalSourceName() - { - return externalSourceName; - } - - - /** - * Set up the unique name of the software server capability entity that represented the external source. - * - * @param externalSourceName string name - */ - public void setExternalSourceName(String externalSourceName) - { - this.externalSourceName = externalSourceName; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ConnectorTypeRequestBody{" + - "externalSourceGUID='" + externalSourceGUID + '\'' + - ", externalSourceName='" + externalSourceName + '\'' + - ", displayName='" + getDisplayName() + '\'' + - ", description='" + getDescription() + '\'' + - ", connectorProviderClassName='" + getConnectorProviderClassName() + '\'' + - ", recognizedAdditionalProperties=" + getRecognizedAdditionalProperties() + - ", recognizedConfigurationProperties=" + getRecognizedConfigurationProperties() + - ", recognizedSecuredProperties=" + getRecognizedSecuredProperties() + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ConnectorTypeRequestBody that = (ConnectorTypeRequestBody) objectToCompare; - return Objects.equals(externalSourceGUID, that.externalSourceGUID) && - Objects.equals(externalSourceName, that.externalSourceName); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), externalSourceGUID, externalSourceName); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/ConnectorTypeResponse.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/ConnectorTypeResponse.java deleted file mode 100644 index 295e8b507bc..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/ConnectorTypeResponse.java +++ /dev/null @@ -1,134 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.ConnectorTypeElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ConnectorReportResponse is a response object for passing back a single connector type object. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ConnectorTypeResponse extends DataManagerOMASAPIResponse -{ - private ConnectorTypeElement element = null; - - - /** - * Default constructor - */ - public ConnectorTypeResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ConnectorTypeResponse(ConnectorTypeResponse template) - { - super(template); - - if (template != null) - { - element = template.getElement(); - } - } - - - /** - * Return the metadata element. - * - * @return result object - */ - public ConnectorTypeElement getElement() - { - return element; - } - - - /** - * Set up the metadata element to return. - * - * @param element result object - */ - public void setElement(ConnectorTypeElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ConnectorReportResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ConnectorTypeResponse that = (ConnectorTypeResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/ConnectorTypesResponse.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/ConnectorTypesResponse.java deleted file mode 100644 index 18d1e07ad25..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/ConnectorTypesResponse.java +++ /dev/null @@ -1,146 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.ConnectorTypeElement; - -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ConnectorTypesResponse is a response object for passing back a list of connector type objects. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ConnectorTypesResponse extends DataManagerOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public ConnectorTypesResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ConnectorTypesResponse(ConnectorTypesResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return elementList; - } - } - - - /** - * Set up the list of metadata elements to return. - * - * @param elementList result object - */ - public void setElementList(List elementList) - { - this.elementList = elementList; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ConnectorTypesResponse{" + - "element=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ConnectorTypesResponse that = (ConnectorTypesResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/DataContainerResponse.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/DataContainerResponse.java deleted file mode 100644 index 4d78a9796d3..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/DataContainerResponse.java +++ /dev/null @@ -1,135 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.DataContainerElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * DataContainerResponse is a response object for passing back a single data container - * element or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class DataContainerResponse extends DataManagerOMASAPIResponse -{ - private DataContainerElement element = null; - - - /** - * Default constructor - */ - public DataContainerResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public DataContainerResponse(DataContainerResponse template) - { - super(template); - - if (template != null) - { - element = template.getElement(); - } - } - - - /** - * Return the metadata element. - * - * @return result object - */ - public DataContainerElement getElement() - { - return element; - } - - - /** - * Set up the metadata element to return. - * - * @param element result object - */ - public void setElement(DataContainerElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "DataContainerResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - DataContainerResponse that = (DataContainerResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/DataContainersResponse.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/DataContainersResponse.java deleted file mode 100644 index 89fa48e8511..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/DataContainersResponse.java +++ /dev/null @@ -1,147 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.DataContainerElement; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * DataContainersResponse is a response object for passing back a a list of data containers - * or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class DataContainersResponse extends DataManagerOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public DataContainersResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public DataContainersResponse(DataContainersResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elementList); - } - } - - - /** - * Set up the metadata element to return. - * - * @param elementList result object - */ - public void setElementList(List elementList) - { - this.elementList = elementList; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "DataContainersResponse{" + - "elementList=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - DataContainersResponse that = (DataContainersResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/DataFieldRequestBody.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/DataFieldRequestBody.java deleted file mode 100644 index f44bc77dca3..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/DataFieldRequestBody.java +++ /dev/null @@ -1,189 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.rest; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.properties.DataFieldProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * DataFieldRequestBody describes the properties of the data field plus the optional identifiers for an - * owning software server capability. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class DataFieldRequestBody extends DataFieldProperties -{ - private String externalSourceGUID = null; - private String externalSourceName = null; - - - /** - * Default constructor - */ - public DataFieldRequestBody() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public DataFieldRequestBody(DataFieldRequestBody template) - { - super(template); - - if (template != null) - { - externalSourceGUID = template.getExternalSourceGUID(); - externalSourceName = template.getExternalSourceName(); - } - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public DataFieldRequestBody(DataFieldProperties template) - { - super(template); - } - - - /** - * Return the unique identifier of the software server capability entity that represented the external source - null for local. - * - * @return string guid - */ - public String getExternalSourceGUID() - { - return externalSourceGUID; - } - - - /** - * Set up the unique identifier of the software server capability entity that represented the external source - null for local. - * - * @param externalSourceGUID string guid - */ - public void setExternalSourceGUID(String externalSourceGUID) - { - this.externalSourceGUID = externalSourceGUID; - } - - - /** - * Return the unique name of the software server capability entity that represented the external source. - * - * @return string name - */ - public String getExternalSourceName() - { - return externalSourceName; - } - - - /** - * Set up the unique name of the software server capability entity that represented the external source. - * - * @param externalSourceName string name - */ - public void setExternalSourceName(String externalSourceName) - { - this.externalSourceName = externalSourceName; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "DataFieldRequestBody{" + - "externalSourceGUID='" + externalSourceGUID + '\'' + - ", externalSourceName='" + externalSourceName + '\'' + - ", elementPosition=" + getElementPosition() + - ", minCardinality=" + getMinCardinality() + - ", maxCardinality=" + getMaxCardinality() + - ", allowsDuplicateValues=" + getAllowsDuplicateValues() + - ", orderedValues=" + getOrderedValues() + - ", sortOrder=" + getSortOrder() + - ", minimumLength=" + getMinimumLength() + - ", length=" + getLength() + - ", precision=" + getPrecision() + - ", isNullable=" + getIsNullable() + - ", defaultValueOverride='" + getDefaultValueOverride() + '\'' + - ", nativeJavaClass='" + getNativeJavaClass() + '\'' + - ", aliases=" + getAliases() + - ", dataType='" + getDataType() + '\'' + - ", defaultValue='" + getDefaultValue() + '\'' + - ", fixedValue='" + getFixedValue() + '\'' + - ", externalTypeGUID='" + getExternalTypeGUID() + '\'' + - ", validValuesSetGUID='" + getValidValuesSetGUID() + '\'' + - ", isDeprecated=" + getIsDeprecated() + - ", displayName='" + getDisplayName() + '\'' + - ", description='" + getDescription() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - DataFieldRequestBody that = (DataFieldRequestBody) objectToCompare; - return Objects.equals(externalSourceGUID, that.externalSourceGUID) && - Objects.equals(externalSourceName, that.externalSourceName); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), externalSourceGUID, externalSourceName); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/DataFieldResponse.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/DataFieldResponse.java deleted file mode 100644 index 0d82451ff99..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/DataFieldResponse.java +++ /dev/null @@ -1,135 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.DataFieldElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * DataFieldResponse is a response object for passing back a single data field - * element or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class DataFieldResponse extends DataManagerOMASAPIResponse -{ - private DataFieldElement element = null; - - - /** - * Default constructor - */ - public DataFieldResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public DataFieldResponse(DataFieldResponse template) - { - super(template); - - if (template != null) - { - element = template.getElement(); - } - } - - - /** - * Return the metadata element. - * - * @return result object - */ - public DataFieldElement getElement() - { - return element; - } - - - /** - * Set up the metadata element to return. - * - * @param element result object - */ - public void setElement(DataFieldElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "DataFieldResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - DataFieldResponse that = (DataFieldResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/DataFieldsResponse.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/DataFieldsResponse.java deleted file mode 100644 index e291f78aec7..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/DataFieldsResponse.java +++ /dev/null @@ -1,147 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.DataFieldElement; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * DataFieldsResponse is a response object for passing back a a list of data fields - * or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class DataFieldsResponse extends DataManagerOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public DataFieldsResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public DataFieldsResponse(DataFieldsResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elementList); - } - } - - - /** - * Set up the metadata element to return. - * - * @param elementList result object - */ - public void setElementList(List elementList) - { - this.elementList = elementList; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "DataFieldsResponse{" + - "elementList=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - DataFieldsResponse that = (DataFieldsResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/DataFileRequestBody.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/DataFileRequestBody.java deleted file mode 100644 index d40319cd5af..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/DataFileRequestBody.java +++ /dev/null @@ -1,204 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.rest; - -import com.fasterxml.jackson.annotation.*; -import org.odpi.openmetadata.accessservices.datamanager.properties.DataFileProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * DataFileRequestBody carries the parameters for creating a new file asset. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class DataFileRequestBody extends DataFileProperties -{ - private String externalSourceGUID = null; - private String externalSourceName = null; - private String connectorProviderClassName = null; - - - /** - * Default constructor - */ - public DataFileRequestBody() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public DataFileRequestBody(DataFileRequestBody template) - { - super(template); - - if (template != null) - { - externalSourceGUID = template.getExternalSourceGUID(); - externalSourceName = template.getExternalSourceName(); - connectorProviderClassName = template.getConnectorProviderClassName(); - } - } - - - /** - * Copy/clone constructor for main properties - * - * @param template object to copy - */ - public DataFileRequestBody(DataFileProperties template) - { - super(template); - } - - - /** - * Return the unique identifier of the software server capability entity that represented the external source - null for local. - * - * @return string guid - */ - public String getExternalSourceGUID() - { - return externalSourceGUID; - } - - - /** - * Set up the unique identifier of the software server capability entity that represented the external source - null for local. - * - * @param externalSourceGUID string guid - */ - public void setExternalSourceGUID(String externalSourceGUID) - { - this.externalSourceGUID = externalSourceGUID; - } - - - /** - * Return the unique name of the software server capability entity that represented the external source. - * - * @return string name - */ - public String getExternalSourceName() - { - return externalSourceName; - } - - - /** - * Set up the unique name of the software server capability entity that represented the external source. - * - * @param externalSourceName string name - */ - public void setExternalSourceName(String externalSourceName) - { - this.externalSourceName = externalSourceName; - } - - - /** - * Return the fully qualified class name of the connector provider for this type of file. If null is - * passed, the server uses the default file connector. - * - * @return string name - */ - public String getConnectorProviderClassName() - { - return connectorProviderClassName; - } - - - /** - * Set up the fully qualified class name of the connector provider for this type of file. If null is - * passed, the server uses the default file connector. - * - * @param connectorProviderClassName string name - */ - public void setConnectorProviderClassName(String connectorProviderClassName) - { - this.connectorProviderClassName = connectorProviderClassName; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "DataFileRequestBody{" + - "externalSourceGUID='" + externalSourceGUID + '\'' + - ", externalSourceName='" + externalSourceName + '\'' + - ", connectorProviderClassName='" + connectorProviderClassName + '\'' + - ", fileType='" + getFileType() + '\'' + - ", deployedImplementationType='" + getDeployedImplementationType() + '\'' + - ", pathName='" + getPathName() + '\'' + - ", createTime=" + getCreateTime() + - ", modifiedTime=" + getModifiedTime() + - ", encodingType='" + getEncodingType() + '\'' + - ", encodingLanguage='" + getEncodingLanguage() + '\'' + - ", encodingDescription='" + getEncodingDescription() + '\'' + - ", encodingProperties=" + getEncodingProperties() + - ", name='" + getName() + '\'' + - ", versionIdentifier='" + getVersionIdentifier() + '\'' + - ", description='" + getDescription() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - DataFileRequestBody that = (DataFileRequestBody) objectToCompare; - return Objects.equals(externalSourceGUID, that.externalSourceGUID) && - Objects.equals(externalSourceName, that.externalSourceName) && - Objects.equals(connectorProviderClassName, that.connectorProviderClassName); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), externalSourceGUID, externalSourceName, connectorProviderClassName); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/DataFileResponse.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/DataFileResponse.java deleted file mode 100644 index 19c41e5f78d..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/DataFileResponse.java +++ /dev/null @@ -1,137 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.DataFileElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * DataFileResponse is the response structure used on the OMAS REST API calls that return the properties - * for a file. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class DataFileResponse extends DataManagerOMASAPIResponse -{ - private DataFileElement dataFile = null; - - - /** - * Default constructor - */ - public DataFileResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public DataFileResponse(DataFileResponse template) - { - super(template); - - if (template != null) - { - this.dataFile = template.getDataFile(); - } - } - - - /** - * Return the file result. - * - * @return bean - */ - public DataFileElement getDataFile() - { - return dataFile; - } - - - /** - * Set up the file result. - * - * @param dataFile bean - */ - public void setDataFile(DataFileElement dataFile) - { - this.dataFile = dataFile; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "DataFileResponse{" + - "datafile=" + dataFile + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof DataFileResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - DataFileResponse that = (DataFileResponse) objectToCompare; - return Objects.equals(dataFile, that.dataFile); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(dataFile); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/DataFilesResponse.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/DataFilesResponse.java deleted file mode 100644 index 8fdb558de50..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/DataFilesResponse.java +++ /dev/null @@ -1,148 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.DataFileElement; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.DatabaseViewElement; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * DataFilesResponse is a response object for passing back a a list of database views - * or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class DataFilesResponse extends DataManagerOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public DataFilesResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public DataFilesResponse(DataFilesResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elementList); - } - } - - - /** - * Set up the metadata element to return. - * - * @param elementList result object - */ - public void setElementList(List elementList) - { - this.elementList = elementList; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "DataFilesResponse{" + - "elementList=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - DataFilesResponse that = (DataFilesResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/DataFolderRequestBody.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/DataFolderRequestBody.java deleted file mode 100644 index 5a550035411..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/DataFolderRequestBody.java +++ /dev/null @@ -1,205 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.properties.FileFolderProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * DataFileRequestBody carries the parameters for creating a new file asset. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class DataFolderRequestBody extends FileFolderProperties -{ - private String externalSourceGUID = null; - private String externalSourceName = null; - private String connectorProviderClassName = null; - - - /** - * Default constructor - */ - public DataFolderRequestBody() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public DataFolderRequestBody(DataFolderRequestBody template) - { - super(template); - - if (template != null) - { - externalSourceGUID = template.getExternalSourceGUID(); - externalSourceName = template.getExternalSourceName(); - connectorProviderClassName = template.getConnectorProviderClassName(); - } - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public DataFolderRequestBody(FileFolderProperties template) - { - super(template); - } - - - /** - * Return the unique identifier of the software server capability entity that represented the external source - null for local. - * - * @return string guid - */ - public String getExternalSourceGUID() - { - return externalSourceGUID; - } - - - /** - * Set up the unique identifier of the software server capability entity that represented the external source - null for local. - * - * @param externalSourceGUID string guid - */ - public void setExternalSourceGUID(String externalSourceGUID) - { - this.externalSourceGUID = externalSourceGUID; - } - - - /** - * Return the unique name of the software server capability entity that represented the external source. - * - * @return string name - */ - public String getExternalSourceName() - { - return externalSourceName; - } - - - /** - * Set up the unique name of the software server capability entity that represented the external source. - * - * @param externalSourceName string name - */ - public void setExternalSourceName(String externalSourceName) - { - this.externalSourceName = externalSourceName; - } - - - - /** - * Return the fully qualified class name of the connector provider for this type of file. If null is - * passed, the server uses the default file connector. - * - * @return string name - */ - public String getConnectorProviderClassName() - { - return connectorProviderClassName; - } - - - /** - * Set up the fully qualified class name of the connector provider for this type of file. If null is - * passed, the server uses the default file connector. - * - * @param connectorProviderClassName string name - */ - public void setConnectorProviderClassName(String connectorProviderClassName) - { - this.connectorProviderClassName = connectorProviderClassName; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "DataFolderRequestBody{" + - "externalSourceGUID='" + externalSourceGUID + '\'' + - ", externalSourceName='" + externalSourceName + '\'' + - ", connectorProviderClassName='" + connectorProviderClassName + '\'' + - ", deployedImplementationType='" + getDeployedImplementationType() + '\'' + - ", pathName='" + getPathName() + '\'' + - ", createTime=" + getCreateTime() + - ", modifiedTime=" + getModifiedTime() + - ", encodingType='" + getEncodingType() + '\'' + - ", encodingLanguage='" + getEncodingLanguage() + '\'' + - ", encodingDescription='" + getEncodingDescription() + '\'' + - ", encodingProperties=" + getEncodingProperties() + - ", name='" + getName() + '\'' + - ", versionIdentifier='" + getVersionIdentifier() + '\'' + - ", description='" + getDescription() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - DataFolderRequestBody that = (DataFolderRequestBody) objectToCompare; - return Objects.equals(externalSourceGUID, that.externalSourceGUID) && - Objects.equals(externalSourceName, that.externalSourceName) && - Objects.equals(connectorProviderClassName, that.connectorProviderClassName); } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), externalSourceGUID, externalSourceName, connectorProviderClassName); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/DataManagerOMASAPIRequestBody.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/DataManagerOMASAPIRequestBody.java deleted file mode 100644 index 133d9d85a5b..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/DataManagerOMASAPIRequestBody.java +++ /dev/null @@ -1,57 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.rest; - -import com.fasterxml.jackson.annotation.*; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * DataManagerOMASAPIRequestBody provides a common header for Data Manager OMAS request bodies for its REST API. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes({ - @JsonSubTypes.Type(value = DataFileRequestBody.class, name = "DataFileRequestBody"), - @JsonSubTypes.Type(value = FileSystemRequestBody.class, name = "FileSystemRequestBody"), - @JsonSubTypes.Type(value = PathNameRequestBody.class, name = "PathNameRequestBody") - - }) -public abstract class DataManagerOMASAPIRequestBody -{ - /** - * Default constructor - */ - public DataManagerOMASAPIRequestBody() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public DataManagerOMASAPIRequestBody(DataManagerOMASAPIRequestBody template) - { - } - - - /** - * JSON-like toString - * - * @return string containing the class name - */ - @Override - public String toString() - { - return "DataManagerOMASAPIRequestBody{}"; - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/DatabaseColumnResponse.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/DatabaseColumnResponse.java deleted file mode 100644 index 826d4b59e6c..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/DatabaseColumnResponse.java +++ /dev/null @@ -1,135 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.DatabaseColumnElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * DatabaseColumnResponse is a response object for passing back a single database column - * element or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class DatabaseColumnResponse extends DataManagerOMASAPIResponse -{ - private DatabaseColumnElement element = null; - - - /** - * Default constructor - */ - public DatabaseColumnResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public DatabaseColumnResponse(DatabaseColumnResponse template) - { - super(template); - - if (template != null) - { - element = template.getElement(); - } - } - - - /** - * Return the metadata element. - * - * @return result object - */ - public DatabaseColumnElement getElement() - { - return element; - } - - - /** - * Set up the metadata element to return. - * - * @param element result object - */ - public void setElement(DatabaseColumnElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "DatabaseColumnResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - DatabaseColumnResponse that = (DatabaseColumnResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/DatabaseColumnsResponse.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/DatabaseColumnsResponse.java deleted file mode 100644 index b883fb6cfd4..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/DatabaseColumnsResponse.java +++ /dev/null @@ -1,147 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.DatabaseColumnElement; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * DatabaseColumnsResponse is a response object for passing back a a list of database columns - * or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class DatabaseColumnsResponse extends DataManagerOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public DatabaseColumnsResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public DatabaseColumnsResponse(DatabaseColumnsResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elementList); - } - } - - - /** - * Set up the metadata element to return. - * - * @param elementList result object - */ - public void setElementList(List elementList) - { - this.elementList = elementList; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "DatabaseColumnsResponse{" + - "elementList=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - DatabaseColumnsResponse that = (DatabaseColumnsResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/DatabaseResponse.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/DatabaseResponse.java deleted file mode 100644 index 5afcecbad68..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/DatabaseResponse.java +++ /dev/null @@ -1,135 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.DatabaseElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * DatabaseResponse is a response object for passing back a single database - * element or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class DatabaseResponse extends DataManagerOMASAPIResponse -{ - private DatabaseElement element = null; - - - /** - * Default constructor - */ - public DatabaseResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public DatabaseResponse(DatabaseResponse template) - { - super(template); - - if (template != null) - { - element = template.getElement(); - } - } - - - /** - * Return the metadata element. - * - * @return result object - */ - public DatabaseElement getElement() - { - return element; - } - - - /** - * Set up the metadata element to return. - * - * @param element result object - */ - public void setElement(DatabaseElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "DatabaseResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - DatabaseResponse that = (DatabaseResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/DatabaseSchemaResponse.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/DatabaseSchemaResponse.java deleted file mode 100644 index bc34deceb18..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/DatabaseSchemaResponse.java +++ /dev/null @@ -1,135 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.DatabaseSchemaElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * DatabaseSchemaResponse is a response object for passing back a single database schema - * element or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class DatabaseSchemaResponse extends DataManagerOMASAPIResponse -{ - private DatabaseSchemaElement element = null; - - - /** - * Default constructor - */ - public DatabaseSchemaResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public DatabaseSchemaResponse(DatabaseSchemaResponse template) - { - super(template); - - if (template != null) - { - element = template.getElement(); - } - } - - - /** - * Return the metadata element. - * - * @return result object - */ - public DatabaseSchemaElement getElement() - { - return element; - } - - - /** - * Set up the metadata element to return. - * - * @param element result object - */ - public void setElement(DatabaseSchemaElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "DatabaseSchemaResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - DatabaseSchemaResponse that = (DatabaseSchemaResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/DatabaseSchemasResponse.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/DatabaseSchemasResponse.java deleted file mode 100644 index 5eac62c054b..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/DatabaseSchemasResponse.java +++ /dev/null @@ -1,147 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.DatabaseSchemaElement; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * DatabaseSchemasResponse is a response object for passing back a a list of database schemas - * or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class DatabaseSchemasResponse extends DataManagerOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public DatabaseSchemasResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public DatabaseSchemasResponse(DatabaseSchemasResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elementList); - } - } - - - /** - * Set up the metadata element to return. - * - * @param elementList result object - */ - public void setElementList(List elementList) - { - this.elementList = elementList; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "DatabaseSchemasResponse{" + - "elementList=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - DatabaseSchemasResponse that = (DatabaseSchemasResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/DatabaseTableResponse.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/DatabaseTableResponse.java deleted file mode 100644 index 8ed76b4d7c4..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/DatabaseTableResponse.java +++ /dev/null @@ -1,135 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.DatabaseTableElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * DatabaseTableResponse is a response object for passing back a single database table - * element or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class DatabaseTableResponse extends DataManagerOMASAPIResponse -{ - private DatabaseTableElement element = null; - - - /** - * Default constructor - */ - public DatabaseTableResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public DatabaseTableResponse(DatabaseTableResponse template) - { - super(template); - - if (template != null) - { - element = template.getElement(); - } - } - - - /** - * Return the metadata element. - * - * @return result object - */ - public DatabaseTableElement getElement() - { - return element; - } - - - /** - * Set up the metadata element to return. - * - * @param element result object - */ - public void setElement(DatabaseTableElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "DatabaseTableResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - DatabaseTableResponse that = (DatabaseTableResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/DatabaseTablesResponse.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/DatabaseTablesResponse.java deleted file mode 100644 index acb08bf9a26..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/DatabaseTablesResponse.java +++ /dev/null @@ -1,147 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.DatabaseTableElement; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * DatabaseTablesResponse is a response object for passing back a a list of database tables - * or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class DatabaseTablesResponse extends DataManagerOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public DatabaseTablesResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public DatabaseTablesResponse(DatabaseTablesResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elementList); - } - } - - - /** - * Set up the metadata element to return. - * - * @param elementList result object - */ - public void setElementList(List elementList) - { - this.elementList = elementList; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "DatabaseTablesResponse{" + - "elementList=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - DatabaseTablesResponse that = (DatabaseTablesResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/DatabaseViewResponse.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/DatabaseViewResponse.java deleted file mode 100644 index 1ef433a68e3..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/DatabaseViewResponse.java +++ /dev/null @@ -1,135 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.DatabaseViewElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * DatabaseViewResponse is a response object for passing back a single database view - * element or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class DatabaseViewResponse extends DataManagerOMASAPIResponse -{ - private DatabaseViewElement element = null; - - - /** - * Default constructor - */ - public DatabaseViewResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public DatabaseViewResponse(DatabaseViewResponse template) - { - super(template); - - if (template != null) - { - element = template.getElement(); - } - } - - - /** - * Return the metadata element. - * - * @return result object - */ - public DatabaseViewElement getElement() - { - return element; - } - - - /** - * Set up the metadata element to return. - * - * @param element result object - */ - public void setElement(DatabaseViewElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "DatabaseViewResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - DatabaseViewResponse that = (DatabaseViewResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/DatabaseViewsResponse.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/DatabaseViewsResponse.java deleted file mode 100644 index b08208e69aa..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/DatabaseViewsResponse.java +++ /dev/null @@ -1,147 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.DatabaseViewElement; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * DatabaseViewsResponse is a response object for passing back a a list of database views - * or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class DatabaseViewsResponse extends DataManagerOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public DatabaseViewsResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public DatabaseViewsResponse(DatabaseViewsResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elementList); - } - } - - - /** - * Set up the metadata element to return. - * - * @param elementList result object - */ - public void setElementList(List elementList) - { - this.elementList = elementList; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "DatabaseViewsResponse{" + - "elementList=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - DatabaseViewsResponse that = (DatabaseViewsResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/DatabasesResponse.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/DatabasesResponse.java deleted file mode 100644 index 11db0fd5b6d..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/DatabasesResponse.java +++ /dev/null @@ -1,147 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.DatabaseElement; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * DatabasesResponse is a response object for passing back a a list of databases - * or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class DatabasesResponse extends DataManagerOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public DatabasesResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public DatabasesResponse(DatabasesResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elementList); - } - } - - - /** - * Set up the metadata element to return. - * - * @param elementList result object - */ - public void setElementList(List elementList) - { - this.elementList = elementList; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "DatabasesResponse{" + - "elementList=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - DatabasesResponse that = (DatabasesResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/ElementStubResponse.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/ElementStubResponse.java deleted file mode 100644 index f21cb04fbf6..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/ElementStubResponse.java +++ /dev/null @@ -1,135 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ElementStubResponse is a response object for passing back the header of a Referenceable - * element or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ElementStubResponse extends DataManagerOMASAPIResponse -{ - private ElementStub element = null; - - - /** - * Default constructor - */ - public ElementStubResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ElementStubResponse(ElementStubResponse template) - { - super(template); - - if (template != null) - { - element = template.getElement(); - } - } - - - /** - * Return the metadata element. - * - * @return result object - */ - public ElementStub getElement() - { - return element; - } - - - /** - * Set up the metadata element to return. - * - * @param element result object - */ - public void setElement(ElementStub element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ElementStubResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ElementStubResponse that = (ElementStubResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/EmbeddedConnectionRequestBody.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/EmbeddedConnectionRequestBody.java deleted file mode 100644 index e3960b432d6..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/EmbeddedConnectionRequestBody.java +++ /dev/null @@ -1,242 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.rest; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * The EmbeddedConnectionRequestBody is used within a VirtualConnection to link to the embedded connections. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class EmbeddedConnectionRequestBody -{ - /* - * Attributes of an embedded connection - */ - protected int position = 0; - protected String displayName = null; - protected Map arguments = null; - - /* - * data manager - */ - private String externalSourceGUID = null; - private String externalSourceName = null; - - - /** - * Default constructor - */ - public EmbeddedConnectionRequestBody() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template element to copy - */ - public EmbeddedConnectionRequestBody(EmbeddedConnectionRequestBody template) - { - if (template != null) - { - position = template.getPosition(); - displayName = template.getDisplayName(); - arguments = template.getArguments(); - externalSourceGUID = template.getExternalSourceGUID(); - externalSourceName = template.getExternalSourceName(); - } - } - - - /** - * Return the position that this connector is in the list of embedded connectors. - * - * @return int - */ - public int getPosition() - { - return position; - } - - - /** - * Set up the position that this connector is in the list of embedded connectors. - * - * @param position int - */ - public void setPosition(int position) - { - this.position = position; - } - - - /** - * Return the printable name of the embedded connection. - * - * @return String name - */ - public String getDisplayName() - { - return displayName; - } - - - /** - * Set up the printable name of the embedded connection. - * - * @param displayName String name - */ - public void setDisplayName(String displayName) - { - this.displayName = displayName; - } - - - /** - * Return the arguments for the embedded connection. - * - * @return property map - */ - public Map getArguments() - { - if (arguments == null) - { - return null; - } - else if (arguments.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(arguments); - } - } - - - /** - * Set up the arguments for the embedded connection. - * - * @param arguments property map - */ - public void setArguments(Map arguments) - { - this.arguments = arguments; - } - - - - /** - * Return the unique identifier of the software server capability entity that represented the external source - null for local. - * - * @return string guid - */ - public String getExternalSourceGUID() - { - return externalSourceGUID; - } - - - /** - * Set up the unique identifier of the software server capability entity that represented the external source - null for local. - * - * @param externalSourceGUID string guid - */ - public void setExternalSourceGUID(String externalSourceGUID) - { - this.externalSourceGUID = externalSourceGUID; - } - - - /** - * Return the unique name of the software server capability entity that represented the external source. - * - * @return string name - */ - public String getExternalSourceName() - { - return externalSourceName; - } - - - /** - * Set up the unique name of the software server capability entity that represented the external source. - * - * @param externalSourceName string name - */ - public void setExternalSourceName(String externalSourceName) - { - this.externalSourceName = externalSourceName; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "EmbeddedConnectionRequestBody{" + - "position=" + position + - ", displayName='" + displayName + '\'' + - ", arguments=" + arguments + - ", externalSourceGUID='" + externalSourceGUID + '\'' + - ", externalSourceName='" + externalSourceName + '\'' + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - EmbeddedConnectionRequestBody that = (EmbeddedConnectionRequestBody) objectToCompare; - return position == that.position && - Objects.equals(displayName, that.displayName) && - Objects.equals(arguments, that.arguments) && - Objects.equals(externalSourceGUID, that.externalSourceGUID) && - Objects.equals(externalSourceName, that.externalSourceName); - } - - - /** - * Create a hash code for this element type. - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(position, displayName, arguments, externalSourceGUID, externalSourceName); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/EndpointRequestBody.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/EndpointRequestBody.java deleted file mode 100644 index 90497d4b819..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/EndpointRequestBody.java +++ /dev/null @@ -1,170 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.properties.EndpointProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * EndpointRequestBody carries the parameters for describing an endpoint. - * The external source identifiers are used if the endpoint was created using the external source identifiers. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class EndpointRequestBody extends EndpointProperties -{ - private String externalSourceGUID = null; - private String externalSourceName = null; - - - /** - * Default constructor - */ - public EndpointRequestBody() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public EndpointRequestBody(EndpointRequestBody template) - { - super(template); - - if (template != null) - { - externalSourceGUID = template.getExternalSourceGUID(); - externalSourceName = template.getExternalSourceName(); - } - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public EndpointRequestBody(EndpointProperties template) - { - super(template); - } - - - /** - * Return the unique identifier of the software server capability entity that represented the external source - null for local. - * - * @return string guid - */ - public String getExternalSourceGUID() - { - return externalSourceGUID; - } - - - /** - * Set up the unique identifier of the software server capability entity that represented the external source - null for local. - * - * @param externalSourceGUID string guid - */ - public void setExternalSourceGUID(String externalSourceGUID) - { - this.externalSourceGUID = externalSourceGUID; - } - - - /** - * Return the unique name of the software server capability entity that represented the external source. - * - * @return string name - */ - public String getExternalSourceName() - { - return externalSourceName; - } - - - /** - * Set up the unique name of the software server capability entity that represented the external source. - * - * @param externalSourceName string name - */ - public void setExternalSourceName(String externalSourceName) - { - this.externalSourceName = externalSourceName; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "EndpointRequestBody{" + - "externalSourceGUID='" + externalSourceGUID + '\'' + - ", externalSourceName='" + externalSourceName + '\'' + - ", displayName='" + getDisplayName() + '\'' + - ", description='" + getDescription() + '\'' + - ", address='" + getAddress() + '\'' + - ", protocol='" + getProtocol() + '\'' + - ", encryptionMethod='" + getEncryptionMethod() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - EndpointRequestBody that = (EndpointRequestBody) objectToCompare; - return Objects.equals(externalSourceGUID, that.externalSourceGUID) && - Objects.equals(externalSourceName, that.externalSourceName); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), externalSourceGUID, externalSourceName); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/EndpointResponse.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/EndpointResponse.java deleted file mode 100644 index 00221ac8f1a..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/EndpointResponse.java +++ /dev/null @@ -1,134 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.EndpointElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * EndpointResponse is a response object for passing back a single endpoint object. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class EndpointResponse extends DataManagerOMASAPIResponse -{ - private EndpointElement element = null; - - - /** - * Default constructor - */ - public EndpointResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public EndpointResponse(EndpointResponse template) - { - super(template); - - if (template != null) - { - element = template.getElement(); - } - } - - - /** - * Return the metadata element. - * - * @return result object - */ - public EndpointElement getElement() - { - return element; - } - - - /** - * Set up the metadata element to return. - * - * @param element result object - */ - public void setElement(EndpointElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "EndpointResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - EndpointResponse that = (EndpointResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/EndpointsResponse.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/EndpointsResponse.java deleted file mode 100644 index 0bf5d9593ac..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/EndpointsResponse.java +++ /dev/null @@ -1,146 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.EndpointElement; - -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * EndpointsResponse is a response object for passing back a list of endpoint objects. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class EndpointsResponse extends DataManagerOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public EndpointsResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public EndpointsResponse(EndpointsResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return elementList; - } - } - - - /** - * Set up the list of metadata elements to return. - * - * @param elementList result object - */ - public void setElementList(List elementList) - { - this.elementList = elementList; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "EndpointsResponse{" + - "element=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - EndpointsResponse that = (EndpointsResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/EnumSchemaTypeRequestBody.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/EnumSchemaTypeRequestBody.java deleted file mode 100644 index f3671133f62..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/EnumSchemaTypeRequestBody.java +++ /dev/null @@ -1,179 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.rest; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.properties.EnumSchemaTypeProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * EnumSchemaTypeRequestBody describes the properties of the schema type plus the optional identifiers for an - * owning software server capability. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class EnumSchemaTypeRequestBody extends EnumSchemaTypeProperties -{ - private String externalSourceGUID = null; - private String externalSourceName = null; - - - /** - * Default constructor - */ - public EnumSchemaTypeRequestBody() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public EnumSchemaTypeRequestBody(EnumSchemaTypeRequestBody template) - { - super(template); - - if (template != null) - { - externalSourceGUID = template.getExternalSourceGUID(); - externalSourceName = template.getExternalSourceName(); - } - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public EnumSchemaTypeRequestBody(EnumSchemaTypeProperties template) - { - super(template); - } - - - /** - * Return the unique identifier of the software server capability entity that represented the external source - null for local. - * - * @return string guid - */ - public String getExternalSourceGUID() - { - return externalSourceGUID; - } - - - /** - * Set up the unique identifier of the software server capability entity that represented the external source - null for local. - * - * @param externalSourceGUID string guid - */ - public void setExternalSourceGUID(String externalSourceGUID) - { - this.externalSourceGUID = externalSourceGUID; - } - - - /** - * Return the unique name of the software server capability entity that represented the external source. - * - * @return string name - */ - public String getExternalSourceName() - { - return externalSourceName; - } - - - /** - * Set up the unique name of the software server capability entity that represented the external source. - * - * @param externalSourceName string name - */ - public void setExternalSourceName(String externalSourceName) - { - this.externalSourceName = externalSourceName; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "EnumSchemaTypeRequestBody{" + - "externalSourceGUID='" + externalSourceGUID + '\'' + - ", externalSourceName='" + externalSourceName + '\'' + - ", validValueSetGUID='" + getValidValueSetGUID() + '\'' + - ", dataType='" + getDataType() + '\'' + - ", defaultValue='" + getDefaultValue() + '\'' + - ", versionNumber='" + getVersionNumber() + '\'' + - ", author='" + getAuthor() + '\'' + - ", usage='" + getUsage() + '\'' + - ", encodingStandard='" + getEncodingStandard() + '\'' + - ", namespace='" + getNamespace() + '\'' + - ", isDeprecated=" + getIsDeprecated() + - ", displayName='" + getDisplayName() + '\'' + - ", description='" + getDescription() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - EnumSchemaTypeRequestBody that = (EnumSchemaTypeRequestBody) objectToCompare; - return Objects.equals(externalSourceGUID, that.externalSourceGUID) && - Objects.equals(externalSourceName, that.externalSourceName); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), externalSourceGUID, externalSourceName); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/EventTypeResponse.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/EventTypeResponse.java deleted file mode 100644 index 3ec3557ffa4..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/EventTypeResponse.java +++ /dev/null @@ -1,135 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.EventTypeElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * EventTypeResponse is a response object for passing back a single EventType - * element or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class EventTypeResponse extends DataManagerOMASAPIResponse -{ - private EventTypeElement element = null; - - - /** - * Default constructor - */ - public EventTypeResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public EventTypeResponse(EventTypeResponse template) - { - super(template); - - if (template != null) - { - element = template.getElement(); - } - } - - - /** - * Return the metadata element. - * - * @return result object - */ - public EventTypeElement getElement() - { - return element; - } - - - /** - * Set up the metadata element to return. - * - * @param element result object - */ - public void setElement(EventTypeElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "EventTypeResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - EventTypeResponse that = (EventTypeResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/EventTypesResponse.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/EventTypesResponse.java deleted file mode 100644 index 34ea1acaaf9..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/EventTypesResponse.java +++ /dev/null @@ -1,147 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.EventTypeElement; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * EventTypesResponse is a response object for passing back a a list of EventTypes - * or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class EventTypesResponse extends DataManagerOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public EventTypesResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public EventTypesResponse(EventTypesResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elementList); - } - } - - - /** - * Set up the metadata element to return. - * - * @param elementList result object - */ - public void setElementList(List elementList) - { - this.elementList = elementList; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "EventTypesResponse{" + - "elementList=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - EventTypesResponse that = (EventTypesResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/ExternalReferenceRequestBody.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/ExternalReferenceRequestBody.java deleted file mode 100644 index 1f40378c467..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/ExternalReferenceRequestBody.java +++ /dev/null @@ -1,148 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.rest; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.properties.ExternalReferenceProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * ExternalReferenceRequestBody describes the properties of the external reference plus the optional identifiers for an - * owning element. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ExternalReferenceRequestBody extends ExternalReferenceProperties -{ - private String anchorGUID = null; - - - - /** - * Default constructor - */ - public ExternalReferenceRequestBody() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public ExternalReferenceRequestBody(ExternalReferenceRequestBody template) - { - super(template); - - if (template != null) - { - anchorGUID = template.getAnchorGUID(); - } - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public ExternalReferenceRequestBody(ExternalReferenceProperties template) - { - super(template); - } - - - /** - * Return the unique identifier of the element that this is to be attached to. - * - * @return string guid - */ - public String getAnchorGUID() - { - return anchorGUID; - } - - - /** - * Set up the unique identifier of the element that this is to be attached to. - * - * @param anchorGUID string guid - */ - public void setAnchorGUID(String anchorGUID) - { - this.anchorGUID = anchorGUID; - } - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ExternalReferenceRequestBody{" + - "anchorGUID='" + anchorGUID + '\'' + - ", linkId='" + getLinkId() + '\'' + - ", linkDescription='" + getLinkDescription() + '\'' + - ", resourceId='" + getResourceId() + '\'' + - ", resourceDisplayName='" + getResourceDisplayName() + '\'' + - ", resourceDescription='" + getResourceDescription() + '\'' + - ", resourceURL='" + getResourceURL() + '\'' + - ", resourceVersion='" + getResourceVersion() + '\'' + - ", owningOrganization='" + getOwningOrganization() + '\'' + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - ", additionalProperties=" + getAdditionalProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ExternalReferenceRequestBody that = (ExternalReferenceRequestBody) objectToCompare; - return Objects.equals(anchorGUID, that.anchorGUID); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), anchorGUID); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/ExternalReferenceResponse.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/ExternalReferenceResponse.java deleted file mode 100644 index 98494e78dba..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/ExternalReferenceResponse.java +++ /dev/null @@ -1,135 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.ExternalReferenceElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ExternalReferenceResponse is a response object for passing back a single external reference - * element or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ExternalReferenceResponse extends DataManagerOMASAPIResponse -{ - private ExternalReferenceElement element = null; - - - /** - * Default constructor - */ - public ExternalReferenceResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ExternalReferenceResponse(ExternalReferenceResponse template) - { - super(template); - - if (template != null) - { - element = template.getElement(); - } - } - - - /** - * Return the metadata element. - * - * @return result object - */ - public ExternalReferenceElement getElement() - { - return element; - } - - - /** - * Set up the metadata element to return. - * - * @param element result object - */ - public void setElement(ExternalReferenceElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ExternalReferenceResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ExternalReferenceResponse that = (ExternalReferenceResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/ExternalReferencesResponse.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/ExternalReferencesResponse.java deleted file mode 100644 index 4e6c0c2a854..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/ExternalReferencesResponse.java +++ /dev/null @@ -1,147 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.ExternalReferenceElement; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ExternalReferencesResponse is a response object for passing back a a list of external references - * or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ExternalReferencesResponse extends DataManagerOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public ExternalReferencesResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ExternalReferencesResponse(ExternalReferencesResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elementList); - } - } - - - /** - * Set up the metadata element to return. - * - * @param elementList result object - */ - public void setElementList(List elementList) - { - this.elementList = elementList; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ExternalReferencesResponse{" + - "elementList=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ExternalReferencesResponse that = (ExternalReferencesResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/ExternalSourceRequestBody.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/ExternalSourceRequestBody.java deleted file mode 100644 index 1c46d625a6a..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/ExternalSourceRequestBody.java +++ /dev/null @@ -1,143 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ExternalSourceRequestBody carries the parameters for marking an asset or schema as external. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ExternalSourceRequestBody extends DataManagerOMASAPIRequestBody -{ - private String externalSourceGUID = null; - private String externalSourceName = null; - - - /** - * Default constructor - */ - public ExternalSourceRequestBody() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ExternalSourceRequestBody(ExternalSourceRequestBody template) - { - super(template); - - if (template != null) - { - externalSourceGUID = template.getExternalSourceGUID(); - externalSourceName = template.getExternalSourceName(); - } - } - - - /** - * Return the unique identifier of the software server capability entity that represented the external source - null for local. - * - * @return string guid - */ - public String getExternalSourceGUID() - { - return externalSourceGUID; - } - - - /** - * Set up the unique identifier of the software server capability entity that represented the external source - null for local. - * - * @param externalSourceGUID string guid - */ - public void setExternalSourceGUID(String externalSourceGUID) - { - this.externalSourceGUID = externalSourceGUID; - } - - - /** - * Return the unique name of the software server capability entity that represented the external source. - * - * @return string name - */ - public String getExternalSourceName() - { - return externalSourceName; - } - - - /** - * Set up the unique name of the software server capability entity that represented the external source. - * - * @param externalSourceName string name - */ - public void setExternalSourceName(String externalSourceName) - { - this.externalSourceName = externalSourceName; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ExternalSourceRequestBody{" + - "externalSourceGUID='" + externalSourceGUID + '\'' + - ", externalSourceName='" + externalSourceName + '\'' + - '}'; - } - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ExternalSourceRequestBody that = (ExternalSourceRequestBody) objectToCompare; - return Objects.equals(externalSourceGUID, that.externalSourceGUID) && - Objects.equals(externalSourceName, that.externalSourceName); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), externalSourceGUID, externalSourceName); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/FileFolderResponse.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/FileFolderResponse.java deleted file mode 100644 index 3c1e6c88dd6..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/FileFolderResponse.java +++ /dev/null @@ -1,137 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.FileFolderElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * FileFolderResponse is the response structure used on the OMAS REST API calls that return the properties - * for a folder. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class FileFolderResponse extends DataManagerOMASAPIResponse -{ - private FileFolderElement folder = null; - - - /** - * Default constructor - */ - public FileFolderResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public FileFolderResponse(FileFolderResponse template) - { - super(template); - - if (template != null) - { - this.folder = template.getFolder(); - } - } - - - /** - * Return the folder result. - * - * @return bean - */ - public FileFolderElement getFolder() - { - return folder; - } - - - /** - * Set up the folder result. - * - * @param folder bean - */ - public void setFolder(FileFolderElement folder) - { - this.folder = folder; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "FileFolderResponse{" + - "folder=" + folder + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof FileFolderResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - FileFolderResponse that = (FileFolderResponse) objectToCompare; - return Objects.equals(folder, that.folder); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(folder); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/FileFoldersResponse.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/FileFoldersResponse.java deleted file mode 100644 index 9c043c2fac5..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/FileFoldersResponse.java +++ /dev/null @@ -1,147 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.FileFolderElement; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * FileFoldersResponse is a response object for passing back a a list of database views - * or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class FileFoldersResponse extends DataManagerOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public FileFoldersResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public FileFoldersResponse(FileFoldersResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elementList); - } - } - - - /** - * Set up the metadata element to return. - * - * @param elementList result object - */ - public void setElementList(List elementList) - { - this.elementList = elementList; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "FileFoldersResponse{" + - "elementList=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - FileFoldersResponse that = (FileFoldersResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/FileSystemResponse.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/FileSystemResponse.java deleted file mode 100644 index f691b680a68..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/FileSystemResponse.java +++ /dev/null @@ -1,137 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.FileSystemElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * FileSystemResponse is the response structure used on the OMAS REST API calls that return the properties - * for a file system. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class FileSystemResponse extends DataManagerOMASAPIResponse -{ - private FileSystemElement fileSystem = null; - - - /** - * Default constructor - */ - public FileSystemResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public FileSystemResponse(FileSystemResponse template) - { - super(template); - - if (template != null) - { - this.fileSystem = template.getFileSystem(); - } - } - - - /** - * Return the fileSystem result. - * - * @return bean - */ - public FileSystemElement getFileSystem() - { - return fileSystem; - } - - - /** - * Set up the fileSystem result. - * - * @param fileSystem bean - */ - public void setFileSystem(FileSystemElement fileSystem) - { - this.fileSystem = fileSystem; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "FileSystemResponse{" + - "fileSystem=" + fileSystem + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof FileSystemResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - FileSystemResponse that = (FileSystemResponse) objectToCompare; - return Objects.equals(fileSystem, that.fileSystem); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(fileSystem); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/FormResponse.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/FormResponse.java deleted file mode 100644 index 6f5e4e6c93c..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/FormResponse.java +++ /dev/null @@ -1,135 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.FormElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * FormResponse is a response object for passing back a single form - * element or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class FormResponse extends DataManagerOMASAPIResponse -{ - private FormElement element = null; - - - /** - * Default constructor - */ - public FormResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public FormResponse(FormResponse template) - { - super(template); - - if (template != null) - { - element = template.getElement(); - } - } - - - /** - * Return the metadata element. - * - * @return result object - */ - public FormElement getElement() - { - return element; - } - - - /** - * Set up the metadata element to return. - * - * @param element result object - */ - public void setElement(FormElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "FormResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - FormResponse that = (FormResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/FormsResponse.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/FormsResponse.java deleted file mode 100644 index 745198f10cb..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/FormsResponse.java +++ /dev/null @@ -1,147 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.FormElement; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * FormsResponse is a response object for passing back a a list of forms - * or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class FormsResponse extends DataManagerOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public FormsResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public FormsResponse(FormsResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elementList); - } - } - - - /** - * Set up the metadata element to return. - * - * @param elementList result object - */ - public void setElementList(List elementList) - { - this.elementList = elementList; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "FormsResponse{" + - "elementList=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - FormsResponse that = (FormsResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/MetadataSourceRequestBody.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/MetadataSourceRequestBody.java deleted file mode 100644 index 07b6c48b402..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/MetadataSourceRequestBody.java +++ /dev/null @@ -1,143 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * MetadataSourceRequestBody carries the parameters for marking an asset or schema as external. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class MetadataSourceRequestBody extends DataManagerOMASAPIRequestBody -{ - private String externalSourceGUID = null; - private String externalSourceName = null; - - - /** - * Default constructor - */ - public MetadataSourceRequestBody() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public MetadataSourceRequestBody(MetadataSourceRequestBody template) - { - super(template); - - if (template != null) - { - externalSourceGUID = template.getExternalSourceGUID(); - externalSourceName = template.getExternalSourceName(); - } - } - - - /** - * Return the unique identifier of the software server capability entity that represented the external source - null for local. - * - * @return string guid - */ - public String getExternalSourceGUID() - { - return externalSourceGUID; - } - - - /** - * Set up the unique identifier of the software server capability entity that represented the external source - null for local. - * - * @param externalSourceGUID string guid - */ - public void setExternalSourceGUID(String externalSourceGUID) - { - this.externalSourceGUID = externalSourceGUID; - } - - - /** - * Return the unique name of the software server capability entity that represented the external source. - * - * @return string name - */ - public String getExternalSourceName() - { - return externalSourceName; - } - - - /** - * Set up the unique name of the software server capability entity that represented the external source. - * - * @param externalSourceName string name - */ - public void setExternalSourceName(String externalSourceName) - { - this.externalSourceName = externalSourceName; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "MetadataSourceRequestBody{" + - "externalSourceGUID='" + externalSourceGUID + '\'' + - ", externalSourceName='" + externalSourceName + '\'' + - '}'; - } - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - MetadataSourceRequestBody that = (MetadataSourceRequestBody) objectToCompare; - return Objects.equals(externalSourceGUID, that.externalSourceGUID) && - Objects.equals(externalSourceName, that.externalSourceName); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), externalSourceGUID, externalSourceName); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/PathNameRequestBody.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/PathNameRequestBody.java deleted file mode 100644 index f26c3c7bc52..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/PathNameRequestBody.java +++ /dev/null @@ -1,117 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * PathNameRequestBody carries the parameters for creating a new FileFolder asset. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class PathNameRequestBody extends MetadataSourceRequestBody -{ - private String fullPath = null; - - - /** - * Default constructor - */ - public PathNameRequestBody() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public PathNameRequestBody(PathNameRequestBody template) - { - super(template); - - if (template != null) - { - fullPath = template.getFullPath(); - } - } - - - /** - * Return the full path of the file - this should be unique. - * - * @return string name - */ - public String getFullPath() - { - return fullPath; - } - - - /** - * Set up the full path of the file - this should be unique. - * - * @param fullPath string name - */ - public void setFullPath(String fullPath) - { - this.fullPath = fullPath; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "PathNameRequestBody{" + - ", fullPath='" + fullPath + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - PathNameRequestBody that = (PathNameRequestBody) objectToCompare; - return Objects.equals(getFullPath(), that.getFullPath()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(getFullPath()); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/QueriesResponse.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/QueriesResponse.java deleted file mode 100644 index 78360cdb133..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/QueriesResponse.java +++ /dev/null @@ -1,147 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.QueryElement; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * QueriesResponse is a response object for passing back a a list of queries - * or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class QueriesResponse extends DataManagerOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public QueriesResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public QueriesResponse(QueriesResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elementList); - } - } - - - /** - * Set up the metadata element to return. - * - * @param elementList result object - */ - public void setElementList(List elementList) - { - this.elementList = elementList; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "QueriesResponse{" + - "elementList=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - QueriesResponse that = (QueriesResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/QueryResponse.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/QueryResponse.java deleted file mode 100644 index 32e6886829c..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/QueryResponse.java +++ /dev/null @@ -1,135 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.QueryElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * QueryResponse is a response object for passing back a single query - * element or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class QueryResponse extends DataManagerOMASAPIResponse -{ - private QueryElement element = null; - - - /** - * Default constructor - */ - public QueryResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public QueryResponse(QueryResponse template) - { - super(template); - - if (template != null) - { - element = template.getElement(); - } - } - - - /** - * Return the metadata element. - * - * @return result object - */ - public QueryElement getElement() - { - return element; - } - - - /** - * Set up the metadata element to return. - * - * @param element result object - */ - public void setElement(QueryElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "QueryResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - QueryResponse that = (QueryResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/ReferenceableRequestBody.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/ReferenceableRequestBody.java deleted file mode 100644 index 44c1dd53655..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/ReferenceableRequestBody.java +++ /dev/null @@ -1,152 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.rest; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.properties.ReferenceableProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * ReferenceableRequestBody describes the request body used when working with referenceables. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ReferenceableRequestBody extends ExternalSourceRequestBody -{ - private String parentGUID = null; - private ReferenceableProperties properties = null; - - - /** - * Default constructor - */ - public ReferenceableRequestBody() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public ReferenceableRequestBody(ReferenceableRequestBody template) - { - super(template); - - if (template != null) - { - parentGUID = template.getParentGUID(); - properties = template.getProperties(); - } - } - - - /** - * Return the properties for the relationship. - * - * @return properties object - */ - public ReferenceableProperties getProperties() - { - return properties; - } - - - /** - * Set up the properties for the relationship. - * - * @param properties properties object - */ - public void setProperties(ReferenceableProperties properties) - { - this.properties = properties; - } - - - /** - * Return an optional parent GUID to attach the new element to. - * - * @return guid - */ - public String getParentGUID() - { - return parentGUID; - } - - - /** - * Set up an optional parent GUID to attach the new element to. - * - * @param parentGUID guid - */ - public void setParentGUID(String parentGUID) - { - this.parentGUID = parentGUID; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ReferenceableRequestBody{" + - "externalSourceGUID='" + getExternalSourceGUID() + '\'' + - ", externalSourceName='" + getExternalSourceName() + '\'' + - ", anchorGUID='" + parentGUID + '\'' + - ", properties=" + properties + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (! (objectToCompare instanceof ReferenceableRequestBody)) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - ReferenceableRequestBody that = (ReferenceableRequestBody) objectToCompare; - return Objects.equals(parentGUID, that.parentGUID) && Objects.equals(properties, that.properties); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), parentGUID, properties); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/RelatedElementListResponse.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/RelatedElementListResponse.java deleted file mode 100644 index 245b3afe674..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/RelatedElementListResponse.java +++ /dev/null @@ -1,146 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.RelatedElement; - -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * RelatedElementListResponse is a response object for passing back a list of relatedElement objects. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class RelatedElementListResponse extends DataManagerOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public RelatedElementListResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public RelatedElementListResponse(RelatedElementListResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return elementList; - } - } - - - /** - * Set up the list of metadata elements to return. - * - * @param elements result object - */ - public void setElementList(List elements) - { - this.elementList = elements; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "RelatedElementListResponse{" + - "element=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - RelatedElementListResponse that = (RelatedElementListResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/RelationshipElementResponse.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/RelationshipElementResponse.java deleted file mode 100644 index 30d8b5e56ed..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/RelationshipElementResponse.java +++ /dev/null @@ -1,138 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.RelationshipElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * RelationshipElementResponse is the response structure used on the OMAS REST API calls that return the properties - * for a relationship. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class RelationshipElementResponse extends DataManagerOMASAPIResponse -{ - - private RelationshipElement element = null; - - - /** - * Default constructor - */ - public RelationshipElementResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public RelationshipElementResponse(RelationshipElementResponse template) - { - super(template); - - if (template != null) - { - this.element = template.getElement(); - } - } - - - /** - * Return the element result. - * - * @return bean - */ - public RelationshipElement getElement() - { - return element; - } - - - /** - * Set up the element result. - * - * @param element bean - */ - public void setElement(RelationshipElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "RelationshipElementResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof RelationshipElementResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - RelationshipElementResponse that = (RelationshipElementResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(element); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/RelationshipElementsResponse.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/RelationshipElementsResponse.java deleted file mode 100644 index 98617f0b2e7..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/RelationshipElementsResponse.java +++ /dev/null @@ -1,148 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.RelationshipElement; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * RelationshipElementsResponse is a response object for passing back a list of relationships - * or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class RelationshipElementsResponse extends DataManagerOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public RelationshipElementsResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public RelationshipElementsResponse(RelationshipElementsResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elementList); - } - } - - - /** - * Set up the metadata element to return. - * - * @param elementList result object - */ - public void setElementList(List elementList) - { - this.elementList = elementList; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "RelationshipElementsResponse{" + - "elementList=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - RelationshipElementsResponse that = (RelationshipElementsResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/RelationshipRequestBody.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/RelationshipRequestBody.java deleted file mode 100644 index fea30daf694..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/RelationshipRequestBody.java +++ /dev/null @@ -1,127 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.rest; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.properties.RelationshipProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * RelationshipRequestBody describes the request body used when linking elements together. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class RelationshipRequestBody extends ExternalSourceRequestBody -{ - private RelationshipProperties properties = null; - - - /** - * Default constructor - */ - public RelationshipRequestBody() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public RelationshipRequestBody(RelationshipRequestBody template) - { - super(template); - - if (template != null) - { - properties = template.getProperties(); - } - } - - - /** - * Return the properties for the relationship. - * - * @return properties object - */ - public RelationshipProperties getProperties() - { - return properties; - } - - - /** - * Set up the properties for the relationship. - * - * @param properties properties object - */ - public void setProperties(RelationshipProperties properties) - { - this.properties = properties; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "RelationshipRequestBody{" + - "externalSourceGUID='" + getExternalSourceGUID() + '\'' + - ", externalSourceName='" + getExternalSourceName() + '\'' + - ", properties=" + properties + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - RelationshipRequestBody that = (RelationshipRequestBody) objectToCompare; - return Objects.equals(getProperties(), that.getProperties()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), properties); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/ReportResponse.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/ReportResponse.java deleted file mode 100644 index 21fd5a1e327..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/ReportResponse.java +++ /dev/null @@ -1,135 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.ReportElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ReportResponse is a response object for passing back a single report - * element or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ReportResponse extends DataManagerOMASAPIResponse -{ - private ReportElement element = null; - - - /** - * Default constructor - */ - public ReportResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ReportResponse(ReportResponse template) - { - super(template); - - if (template != null) - { - element = template.getElement(); - } - } - - - /** - * Return the metadata element. - * - * @return result object - */ - public ReportElement getElement() - { - return element; - } - - - /** - * Set up the metadata element to return. - * - * @param element result object - */ - public void setElement(ReportElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ReportResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ReportResponse that = (ReportResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/ReportsResponse.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/ReportsResponse.java deleted file mode 100644 index 4651838641c..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/ReportsResponse.java +++ /dev/null @@ -1,147 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.ReportElement; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ReportsResponse is a response object for passing back a a list of reports - * or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ReportsResponse extends DataManagerOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public ReportsResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ReportsResponse(ReportsResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elementList); - } - } - - - /** - * Set up the metadata element to return. - * - * @param elementList result object - */ - public void setElementList(List elementList) - { - this.elementList = elementList; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ReportsResponse{" + - "elementList=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ReportsResponse that = (ReportsResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/SchemaAttributeRequestBody.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/SchemaAttributeRequestBody.java deleted file mode 100644 index 87288ad1592..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/SchemaAttributeRequestBody.java +++ /dev/null @@ -1,189 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.rest; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.properties.SchemaAttributeProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * SchemaAttributeRequestBody describes the properties of the schema attribute plus the optional identifiers for an - * owning software server capability. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class SchemaAttributeRequestBody extends SchemaAttributeProperties -{ - private String externalSourceGUID = null; - private String externalSourceName = null; - - - /** - * Default constructor - */ - public SchemaAttributeRequestBody() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public SchemaAttributeRequestBody(SchemaAttributeRequestBody template) - { - super(template); - - if (template != null) - { - externalSourceGUID = template.getExternalSourceGUID(); - externalSourceName = template.getExternalSourceName(); - } - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public SchemaAttributeRequestBody(SchemaAttributeProperties template) - { - super(template); - } - - - /** - * Return the unique identifier of the software server capability entity that represented the external source - null for local. - * - * @return string guid - */ - public String getExternalSourceGUID() - { - return externalSourceGUID; - } - - - /** - * Set up the unique identifier of the software server capability entity that represented the external source - null for local. - * - * @param externalSourceGUID string guid - */ - public void setExternalSourceGUID(String externalSourceGUID) - { - this.externalSourceGUID = externalSourceGUID; - } - - - /** - * Return the unique name of the software server capability entity that represented the external source. - * - * @return string name - */ - public String getExternalSourceName() - { - return externalSourceName; - } - - - /** - * Set up the unique name of the software server capability entity that represented the external source. - * - * @param externalSourceName string name - */ - public void setExternalSourceName(String externalSourceName) - { - this.externalSourceName = externalSourceName; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "SchemaAttributeRequestBody{" + - "externalSourceGUID='" + externalSourceGUID + '\'' + - ", externalSourceName='" + externalSourceName + '\'' + - ", elementPosition=" + getElementPosition() + - ", minCardinality=" + getMinCardinality() + - ", maxCardinality=" + getMaxCardinality() + - ", allowsDuplicateValues=" + getAllowsDuplicateValues() + - ", orderedValues=" + getOrderedValues() + - ", sortOrder=" + getSortOrder() + - ", minimumLength=" + getMinimumLength() + - ", length=" + getLength() + - ", precision=" + getPrecision() + - ", isNullable=" + getIsNullable() + - ", defaultValueOverride='" + getDefaultValueOverride() + '\'' + - ", nativeJavaClass='" + getNativeJavaClass() + '\'' + - ", aliases=" + getAliases() + - ", dataType='" + getDataType() + '\'' + - ", defaultValue='" + getDefaultValue() + '\'' + - ", fixedValue='" + getFixedValue() + '\'' + - ", externalTypeGUID='" + getExternalTypeGUID() + '\'' + - ", validValuesSetGUID='" + getValidValuesSetGUID() + '\'' + - ", isDeprecated=" + getIsDeprecated() + - ", displayName='" + getDisplayName() + '\'' + - ", description='" + getDescription() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - SchemaAttributeRequestBody that = (SchemaAttributeRequestBody) objectToCompare; - return Objects.equals(externalSourceGUID, that.externalSourceGUID) && - Objects.equals(externalSourceName, that.externalSourceName); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), externalSourceGUID, externalSourceName); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/SchemaAttributeResponse.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/SchemaAttributeResponse.java deleted file mode 100644 index c977e1d25a0..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/SchemaAttributeResponse.java +++ /dev/null @@ -1,135 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.SchemaAttributeElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * SchemaAttributeResponse is a response object for passing back a single schema attribute - * element or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class SchemaAttributeResponse extends DataManagerOMASAPIResponse -{ - private SchemaAttributeElement element = null; - - - /** - * Default constructor - */ - public SchemaAttributeResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public SchemaAttributeResponse(SchemaAttributeResponse template) - { - super(template); - - if (template != null) - { - element = template.getElement(); - } - } - - - /** - * Return the metadata element. - * - * @return result object - */ - public SchemaAttributeElement getElement() - { - return element; - } - - - /** - * Set up the metadata element to return. - * - * @param element result object - */ - public void setElement(SchemaAttributeElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "SchemaAttributeResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - SchemaAttributeResponse that = (SchemaAttributeResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/SchemaAttributesResponse.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/SchemaAttributesResponse.java deleted file mode 100644 index 3dd017ad281..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/SchemaAttributesResponse.java +++ /dev/null @@ -1,147 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.SchemaAttributeElement; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * SchemaAttributesResponse is a response object for passing back a a list of schema attributes - * or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class SchemaAttributesResponse extends DataManagerOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public SchemaAttributesResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public SchemaAttributesResponse(SchemaAttributesResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elementList); - } - } - - - /** - * Set up the metadata element to return. - * - * @param elementList result object - */ - public void setElementList(List elementList) - { - this.elementList = elementList; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "SchemaAttributesResponse{" + - "elementList=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - SchemaAttributesResponse that = (SchemaAttributesResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/SchemaTypeResponse.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/SchemaTypeResponse.java deleted file mode 100644 index 8957b42e250..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/SchemaTypeResponse.java +++ /dev/null @@ -1,135 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.SchemaTypeElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * SchemaTypeResponse is a response object for passing back a single topic - * element or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class SchemaTypeResponse extends DataManagerOMASAPIResponse -{ - private SchemaTypeElement element = null; - - - /** - * Default constructor - */ - public SchemaTypeResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public SchemaTypeResponse(SchemaTypeResponse template) - { - super(template); - - if (template != null) - { - element = template.getElement(); - } - } - - - /** - * Return the metadata element. - * - * @return result object - */ - public SchemaTypeElement getElement() - { - return element; - } - - - /** - * Set up the metadata element to return. - * - * @param element result object - */ - public void setElement(SchemaTypeElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "SchemaTypeResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - SchemaTypeResponse that = (SchemaTypeResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/SchemaTypesResponse.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/SchemaTypesResponse.java deleted file mode 100644 index 3bd09232c42..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/SchemaTypesResponse.java +++ /dev/null @@ -1,147 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.SchemaTypeElement; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * SchemaTypesResponse is a response object for passing back a a list of schema types - * or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class SchemaTypesResponse extends DataManagerOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public SchemaTypesResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public SchemaTypesResponse(SchemaTypesResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elementList); - } - } - - - /** - * Set up the metadata element to return. - * - * @param elementList result object - */ - public void setElementList(List elementList) - { - this.elementList = elementList; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "SchemaTypesResponse{" + - "elementList=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - SchemaTypesResponse that = (SchemaTypesResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/SoftwareCapabilityRequestBody.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/SoftwareCapabilityRequestBody.java deleted file mode 100644 index 97dbeba4ae9..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/SoftwareCapabilityRequestBody.java +++ /dev/null @@ -1,172 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.rest; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.properties.SoftwareCapabilitiesProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * SoftwareCapabilityRequestBody describes the basic properties of a software server capability. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class SoftwareCapabilityRequestBody extends SoftwareCapabilitiesProperties -{ - private String externalSourceGUID = null; - private String externalSourceName = null; - - /** - * Default constructor - */ - public SoftwareCapabilityRequestBody() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public SoftwareCapabilityRequestBody(SoftwareCapabilityRequestBody template) - { - super(template); - - if (template != null) - { - externalSourceGUID = template.getExternalSourceGUID(); - externalSourceName = template.getExternalSourceName(); - } - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public SoftwareCapabilityRequestBody(SoftwareCapabilitiesProperties template) - { - super(template); - } - - - /** - * Return the unique identifier of the software server capability entity that represented the external source - null for local. - * - * @return string guid - */ - public String getExternalSourceGUID() - { - return externalSourceGUID; - } - - - /** - * Set up the unique identifier of the software server capability entity that represented the external source - null for local. - * - * @param externalSourceGUID string guid - */ - public void setExternalSourceGUID(String externalSourceGUID) - { - this.externalSourceGUID = externalSourceGUID; - } - - - /** - * Return the unique name of the software server capability entity that represented the external source. - * - * @return string name - */ - public String getExternalSourceName() - { - return externalSourceName; - } - - - /** - * Set up the unique name of the software server capability entity that represented the external source. - * - * @param externalSourceName string name - */ - public void setExternalSourceName(String externalSourceName) - { - this.externalSourceName = externalSourceName; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "SoftwareCapabilityRequestBody{" + - "externalSourceGUID='" + externalSourceGUID + '\'' + - ", externalSourceName='" + externalSourceName + '\'' + - ", displayName='" + getDisplayName() + '\'' + - ", description='" + getDescription() + '\'' + - ", typeDescription='" + getDeployedImplementationType() + '\'' + - ", version='" + getVersion() + '\'' + - ", patchLevel='" + getPatchLevel() + '\'' + - ", source='" + getSource() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - SoftwareCapabilityRequestBody that = (SoftwareCapabilityRequestBody) objectToCompare; - return Objects.equals(externalSourceGUID, that.externalSourceGUID) && - Objects.equals(externalSourceName, that.externalSourceName); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), externalSourceGUID, externalSourceName); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/TopicResponse.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/TopicResponse.java deleted file mode 100644 index 5ae516e8f1a..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/TopicResponse.java +++ /dev/null @@ -1,135 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.TopicElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * TopicResponse is a response object for passing back a single topic - * element or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class TopicResponse extends DataManagerOMASAPIResponse -{ - private TopicElement element = null; - - - /** - * Default constructor - */ - public TopicResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public TopicResponse(TopicResponse template) - { - super(template); - - if (template != null) - { - element = template.getElement(); - } - } - - - /** - * Return the metadata element. - * - * @return result object - */ - public TopicElement getElement() - { - return element; - } - - - /** - * Set up the metadata element to return. - * - * @param element result object - */ - public void setElement(TopicElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "TopicResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - TopicResponse that = (TopicResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/TopicsResponse.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/TopicsResponse.java deleted file mode 100644 index 634db394d4b..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/TopicsResponse.java +++ /dev/null @@ -1,147 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.TopicElement; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * TopicsResponse is a response object for passing back a a list of topics - * or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class TopicsResponse extends DataManagerOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public TopicsResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public TopicsResponse(TopicsResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elementList); - } - } - - - /** - * Set up the metadata element to return. - * - * @param elementList result object - */ - public void setElementList(List elementList) - { - this.elementList = elementList; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "TopicsResponse{" + - "elementList=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - TopicsResponse that = (TopicsResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/ValidValueListResponse.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/ValidValueListResponse.java deleted file mode 100644 index df5abdf0b42..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/ValidValueListResponse.java +++ /dev/null @@ -1,146 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.ValidValueElement; - -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ValidValueListResponse is a response object for passing back a list of valid value objects. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ValidValueListResponse extends DataManagerOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public ValidValueListResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ValidValueListResponse(ValidValueListResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return elementList; - } - } - - - /** - * Set up the list of metadata elements to return. - * - * @param elementList result object - */ - public void setElementList(List elementList) - { - this.elementList = elementList; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ValidValueListResponse{" + - "element=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ValidValueListResponse that = (ValidValueListResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/ValidValueResponse.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/ValidValueResponse.java deleted file mode 100644 index 291dd96ef2c..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/ValidValueResponse.java +++ /dev/null @@ -1,134 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.ValidValueElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ValidValueResponse is a response object for passing back a single valid value object. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ValidValueResponse extends DataManagerOMASAPIResponse -{ - private ValidValueElement element = null; - - - /** - * Default constructor - */ - public ValidValueResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ValidValueResponse(ValidValueResponse template) - { - super(template); - - if (template != null) - { - element = template.getElement(); - } - } - - - /** - * Return the metadata element. - * - * @return result object - */ - public ValidValueElement getElement() - { - return element; - } - - - /** - * Set up the metadata element to return. - * - * @param element result object - */ - public void setElement(ValidValueElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ValidValueResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ValidValueResponse that = (ValidValueResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/ValidValueSetsResponse.java b/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/ValidValueSetsResponse.java deleted file mode 100644 index cae2c2edb6c..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/ValidValueSetsResponse.java +++ /dev/null @@ -1,147 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.datamanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.ValidValueSetElement; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ValidValueSetsResponse is a response object for passing back a a list of valid value sets - * or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ValidValueSetsResponse extends DataManagerOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public ValidValueSetsResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ValidValueSetsResponse(ValidValueSetsResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elementList); - } - } - - - /** - * Set up the metadata element to return. - * - * @param elementList result object - */ - public void setElementList(List elementList) - { - this.elementList = elementList; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ValidValueSetsResponse{" + - "elementList=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ValidValueSetsResponse that = (ValidValueSetsResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-client/build.gradle b/open-metadata-implementation/access-services/data-manager/data-manager-client/build.gradle index 658f23b9e2b..eccf23ffadc 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-client/build.gradle +++ b/open-metadata-implementation/access-services/data-manager/data-manager-client/build.gradle @@ -14,6 +14,7 @@ dependencies { implementation project(':open-metadata-implementation:admin-services:admin-services-api') implementation project(':open-metadata-implementation:repository-services:repository-services-apis') implementation project(':open-metadata-implementation:common-services:ffdc-services') + implementation project(':open-metadata-implementation:frameworks:open-metadata-framework') implementation project(':open-metadata-implementation:frameworks:open-connector-framework') implementation project(':open-metadata-implementation:frameworks:open-integration-framework') implementation project(':open-metadata-implementation:frameworks:governance-action-framework') diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-client/src/main/java/org/odpi/openmetadata/accessservices/datamanager/client/APIManagerClient.java b/open-metadata-implementation/access-services/data-manager/data-manager-client/src/main/java/org/odpi/openmetadata/accessservices/datamanager/client/APIManagerClient.java index 98c4ec54062..4fbf993d3a2 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-client/src/main/java/org/odpi/openmetadata/accessservices/datamanager/client/APIManagerClient.java +++ b/open-metadata-implementation/access-services/data-manager/data-manager-client/src/main/java/org/odpi/openmetadata/accessservices/datamanager/client/APIManagerClient.java @@ -5,16 +5,18 @@ import org.odpi.openmetadata.accessservices.datamanager.api.APIManagerInterface; import org.odpi.openmetadata.accessservices.datamanager.client.rest.DataManagerRESTClient; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.*; -import org.odpi.openmetadata.accessservices.datamanager.properties.*; -import org.odpi.openmetadata.accessservices.datamanager.rest.*; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; +import org.odpi.openmetadata.accessservices.datamanager.properties.TemplateProperties; +import org.odpi.openmetadata.accessservices.datamanager.rest.TemplateRequestBody; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.apis.*; +import org.odpi.openmetadata.frameworks.openmetadata.enums.APIParameterListType; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.SchemaAttributeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.apis.*; import java.util.ArrayList; import java.util.HashMap; @@ -488,7 +490,7 @@ public List findAPIs(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -537,7 +539,7 @@ public List getAPIsByName(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -585,7 +587,7 @@ public List getAPIsForAPIManager(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -629,7 +631,7 @@ public List getAPIsForEndpoint(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -914,14 +916,14 @@ public List findAPIOperations(String userId, requestBody.setSearchStringParameterName(searchStringParameterName); APIOperationsResponse restResult = restClient.callAPIOperationsPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - startFrom, - validatedPageSize); - - return restResult.getElementList(); + urlTemplate, + requestBody, + serverName, + userId, + startFrom, + validatedPageSize); + + return restResult.getElements(); } @@ -966,7 +968,7 @@ public List getOperationsForAPI(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -1015,7 +1017,7 @@ public List getAPIOperationsByName(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -1081,7 +1083,7 @@ public String createAPIParameterList(String userId, String apiManagerGUID, String apiManagerName, String apiOperationGUID, - APIParameterListType parameterListType, + APIParameterListType parameterListType, APIParameterListProperties properties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException @@ -1321,7 +1323,7 @@ public List findAPIParameterLists(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -1364,7 +1366,7 @@ public List getParameterListsForAPIOperation(String use startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -1413,7 +1415,7 @@ public List getAPIParameterListsByName(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -1444,10 +1446,10 @@ public APIParameterListElement getAPIParameterListByGUID(String userId, final String urlTemplate = serverPlatformURLRoot + apiURLTemplatePrefix + "/api-operations/api-parameter-lists/{2}"; APIParameterListResponse restResult = restClient.callAPIParameterListGetRESTCall(methodName, - urlTemplate, - serverName, - userId, - guid); + urlTemplate, + serverName, + userId, + guid); return restResult.getElement(); } diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-client/src/main/java/org/odpi/openmetadata/accessservices/datamanager/client/ConnectionManagerClient.java b/open-metadata-implementation/access-services/data-manager/data-manager-client/src/main/java/org/odpi/openmetadata/accessservices/datamanager/client/ConnectionManagerClient.java index 7889fc075db..d11146fe7f1 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-client/src/main/java/org/odpi/openmetadata/accessservices/datamanager/client/ConnectionManagerClient.java +++ b/open-metadata-implementation/access-services/data-manager/data-manager-client/src/main/java/org/odpi/openmetadata/accessservices/datamanager/client/ConnectionManagerClient.java @@ -4,19 +4,16 @@ import org.odpi.openmetadata.accessservices.datamanager.api.ConnectionManagerInterface; import org.odpi.openmetadata.accessservices.datamanager.client.rest.DataManagerRESTClient; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.ConnectionElement; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.EndpointElement; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.ConnectorTypeElement; -import org.odpi.openmetadata.accessservices.datamanager.properties.*; -import org.odpi.openmetadata.accessservices.datamanager.rest.*; +import org.odpi.openmetadata.accessservices.datamanager.properties.TemplateProperties; +import org.odpi.openmetadata.accessservices.datamanager.rest.TemplateRequestBody; import org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.*; import java.util.List; import java.util.Map; @@ -368,7 +365,7 @@ public void setupConnectorType(String userId, final String urlTemplate = serverPlatformURLRoot + connectionURLTemplatePrefix + "/{2}/connector-types/{3}"; - MetadataSourceRequestBody requestBody = new MetadataSourceRequestBody(); + ExternalSourceRequestBody requestBody = new ExternalSourceRequestBody(); requestBody.setExternalSourceGUID(dataManagerGUID); requestBody.setExternalSourceName(dataManagerName); @@ -415,7 +412,7 @@ public void clearConnectorType(String userId, final String urlTemplate = serverPlatformURLRoot + connectionURLTemplatePrefix + "/{2}/connector-types/{3}/delete"; - MetadataSourceRequestBody requestBody = new MetadataSourceRequestBody(); + ExternalSourceRequestBody requestBody = new ExternalSourceRequestBody(); requestBody.setExternalSourceGUID(dataManagerGUID); requestBody.setExternalSourceName(dataManagerName); @@ -462,7 +459,7 @@ public void setupEndpoint(String userId, final String urlTemplate = serverPlatformURLRoot + connectionURLTemplatePrefix + "/{2}/endpoints/{3}"; - MetadataSourceRequestBody requestBody = new MetadataSourceRequestBody(); + ExternalSourceRequestBody requestBody = new ExternalSourceRequestBody(); requestBody.setExternalSourceGUID(dataManagerGUID); requestBody.setExternalSourceName(dataManagerName); @@ -509,7 +506,7 @@ public void clearEndpoint(String userId, final String urlTemplate = serverPlatformURLRoot + connectionURLTemplatePrefix + "/{2}/endpoints/{3}/delete"; - MetadataSourceRequestBody requestBody = new MetadataSourceRequestBody(); + ExternalSourceRequestBody requestBody = new ExternalSourceRequestBody(); requestBody.setExternalSourceGUID(dataManagerGUID); requestBody.setExternalSourceName(dataManagerName); @@ -612,7 +609,7 @@ public void clearEmbeddedConnection(String userId, final String urlTemplate = serverPlatformURLRoot + connectionURLTemplatePrefix + "/{2}/embedded-connections/{3}/delete}"; - MetadataSourceRequestBody requestBody = new MetadataSourceRequestBody(); + ExternalSourceRequestBody requestBody = new ExternalSourceRequestBody(); requestBody.setExternalSourceGUID(dataManagerGUID); requestBody.setExternalSourceName(dataManagerName); @@ -803,15 +800,15 @@ public List findConnections(String userId, requestBody.setSearchString(searchString); requestBody.setSearchStringParameterName(searchStringParameterName); - ConnectionsResponse restResult = restClient.callMyConnectionsPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - startFrom, - validatedPageSize); + ConnectionsResponse restResult = restClient.callConnectionsPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + startFrom, + validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -852,15 +849,15 @@ public List getConnectionsByName(String userId, requestBody.setName(name); requestBody.setNamePropertyName(nameParameterName); - ConnectionsResponse restResult = restClient.callMyConnectionsPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - startFrom, - validatedPageSize); + ConnectionsResponse restResult = restClient.callConnectionsPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + startFrom, + validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -890,11 +887,11 @@ public ConnectionElement getConnectionByGUID(String userId, final String urlTemplate = serverPlatformURLRoot + connectionURLTemplatePrefix + "/{2}"; - ConnectionResponse restResult = restClient.callMyConnectionGetRESTCall(methodName, - urlTemplate, - serverName, - userId, - connectionGUID); + ConnectionResponse restResult = restClient.callConnectionGetRESTCall(methodName, + urlTemplate, + serverName, + userId, + connectionGUID); return restResult.getElement(); } @@ -1141,15 +1138,15 @@ public List findEndpoints(String userId, requestBody.setSearchString(searchString); requestBody.setSearchStringParameterName(searchStringParameterName); - EndpointsResponse restResult = restClient.callMyEndpointsPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - startFrom, - validatedPageSize); + EndpointsResponse restResult = restClient.callEndpointsPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + startFrom, + validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -1190,15 +1187,15 @@ public List getEndpointsByName(String userId, requestBody.setName(name); requestBody.setNamePropertyName(nameParameterName); - EndpointsResponse restResult = restClient.callMyEndpointsPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - startFrom, - validatedPageSize); + EndpointsResponse restResult = restClient.callEndpointsPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + startFrom, + validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -1228,11 +1225,11 @@ public EndpointElement getEndpointByGUID(String userId, final String urlTemplate = serverPlatformURLRoot + endpointURLTemplatePrefix + "/{2}"; - EndpointResponse restResult = restClient.callMyEndpointGetRESTCall(methodName, - urlTemplate, - serverName, - userId, - endpointGUID); + EndpointResponse restResult = restClient.callEndpointGetRESTCall(methodName, + urlTemplate, + serverName, + userId, + endpointGUID); return restResult.getElement(); } @@ -1275,15 +1272,15 @@ public List findConnectorTypes(String userId, requestBody.setSearchString(searchString); requestBody.setSearchStringParameterName(searchStringParameterName); - ConnectorTypesResponse restResult = restClient.callMyConnectorTypesPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - startFrom, - validatedPageSize); + ConnectorTypesResponse restResult = restClient.callConnectorTypesPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + startFrom, + validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -1325,15 +1322,15 @@ public List getConnectorTypesByName(String userId, requestBody.setName(name); requestBody.setNamePropertyName(nameParameterName); - ConnectorTypesResponse restResult = restClient.callMyConnectorTypesPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - startFrom, - validatedPageSize); + ConnectorTypesResponse restResult = restClient.callConnectorTypesPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + startFrom, + validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -1363,11 +1360,11 @@ public ConnectorTypeElement getConnectorTypeByGUID(String userId, final String urlTemplate = serverPlatformURLRoot + connectorTypeURLTemplatePrefix + "/{2}"; - ConnectorTypeResponse restResult = restClient.callMyConnectorTypeGetRESTCall(methodName, - urlTemplate, - serverName, - userId, - connectorTypeGUID); + ConnectorTypeResponse restResult = restClient.callConnectorTypeGetRESTCall(methodName, + urlTemplate, + serverName, + userId, + connectorTypeGUID); return restResult.getElement(); } diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-client/src/main/java/org/odpi/openmetadata/accessservices/datamanager/client/DataManagerBaseClient.java b/open-metadata-implementation/access-services/data-manager/data-manager-client/src/main/java/org/odpi/openmetadata/accessservices/datamanager/client/DataManagerBaseClient.java index 85569cf1d7c..30adc909be7 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-client/src/main/java/org/odpi/openmetadata/accessservices/datamanager/client/DataManagerBaseClient.java +++ b/open-metadata-implementation/access-services/data-manager/data-manager-client/src/main/java/org/odpi/openmetadata/accessservices/datamanager/client/DataManagerBaseClient.java @@ -2,24 +2,19 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.datamanager.client; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.RelatedElement; -import org.odpi.openmetadata.accessservices.datamanager.properties.ClassificationProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.ReferenceableProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.RelationshipProperties; import org.odpi.openmetadata.accessservices.datamanager.properties.TemplateProperties; -import org.odpi.openmetadata.accessservices.datamanager.rest.ClassificationRequestBody; -import org.odpi.openmetadata.accessservices.datamanager.rest.ExternalSourceRequestBody; -import org.odpi.openmetadata.accessservices.datamanager.rest.ReferenceableRequestBody; -import org.odpi.openmetadata.accessservices.datamanager.rest.RelatedElementListResponse; -import org.odpi.openmetadata.accessservices.datamanager.rest.RelationshipRequestBody; import org.odpi.openmetadata.accessservices.datamanager.rest.TemplateRequestBody; import org.odpi.openmetadata.accessservices.datamanager.client.rest.DataManagerRESTClient; import org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.RelatedElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ClassificationProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ReferenceableProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; import java.util.List; @@ -776,15 +771,15 @@ List getRelatedElements(String userId, invalidParameterHandler.validateUserId(userId, methodName); invalidParameterHandler.validateGUID(startingElementGUID, startingElementGUIDParameterName, methodName); - RelatedElementListResponse restResult = restClient.callRelatedElementListGetRESTCall(methodName, - urlTemplate, - serverName, - userId, - startingElementGUID, - Integer.toString(startFrom), - Integer.toString(pageSize)); + RelatedElementsResponse restResult = restClient.callRelatedElementsGetRESTCall(methodName, + urlTemplate, + serverName, + userId, + startingElementGUID, + Integer.toString(startFrom), + Integer.toString(pageSize)); - return restResult.getElementList(); + return restResult.getElements(); } diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-client/src/main/java/org/odpi/openmetadata/accessservices/datamanager/client/DatabaseManagerClient.java b/open-metadata-implementation/access-services/data-manager/data-manager-client/src/main/java/org/odpi/openmetadata/accessservices/datamanager/client/DatabaseManagerClient.java index 8d2a0770da3..6246c0a700f 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-client/src/main/java/org/odpi/openmetadata/accessservices/datamanager/client/DatabaseManagerClient.java +++ b/open-metadata-implementation/access-services/data-manager/data-manager-client/src/main/java/org/odpi/openmetadata/accessservices/datamanager/client/DatabaseManagerClient.java @@ -5,15 +5,15 @@ import org.odpi.openmetadata.accessservices.datamanager.api.DatabaseManagerInterface; import org.odpi.openmetadata.accessservices.datamanager.client.rest.DataManagerRESTClient; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.*; -import org.odpi.openmetadata.accessservices.datamanager.properties.*; -import org.odpi.openmetadata.accessservices.datamanager.rest.*; -import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; +import org.odpi.openmetadata.accessservices.datamanager.properties.TemplateProperties; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.databases.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.databases.*; import java.util.List; @@ -353,7 +353,7 @@ public List findDatabases(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -402,7 +402,7 @@ public List getDatabasesByName(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -454,7 +454,7 @@ public List getDatabasesForDatabaseManager(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -741,7 +741,7 @@ public List findDatabaseSchemas(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -784,7 +784,7 @@ public List getSchemasForDatabase(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -833,7 +833,7 @@ public List getDatabaseSchemasByName(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -1162,7 +1162,7 @@ public List findDatabaseTables(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -1232,7 +1232,7 @@ public List getTablesForDatabaseAsset(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -1281,7 +1281,7 @@ public List getDatabaseTablesByName(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -1543,7 +1543,7 @@ public List findDatabaseViews(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -1613,7 +1613,7 @@ public List getViewsForDatabaseAsset(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -1662,7 +1662,7 @@ public List getDatabaseViewsByName(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -1900,7 +1900,7 @@ public List findDatabaseColumns(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -1943,7 +1943,7 @@ public List getColumnsForDatabaseTable(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -1992,7 +1992,7 @@ public List getDatabaseColumnsByName(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-client/src/main/java/org/odpi/openmetadata/accessservices/datamanager/client/DisplayApplicationClient.java b/open-metadata-implementation/access-services/data-manager/data-manager-client/src/main/java/org/odpi/openmetadata/accessservices/datamanager/client/DisplayApplicationClient.java index 4e79a7ad94d..22f0a2d39a1 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-client/src/main/java/org/odpi/openmetadata/accessservices/datamanager/client/DisplayApplicationClient.java +++ b/open-metadata-implementation/access-services/data-manager/data-manager-client/src/main/java/org/odpi/openmetadata/accessservices/datamanager/client/DisplayApplicationClient.java @@ -5,17 +5,18 @@ import org.odpi.openmetadata.accessservices.datamanager.api.DisplayApplicationInterface; import org.odpi.openmetadata.accessservices.datamanager.client.rest.DataManagerRESTClient; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.*; -import org.odpi.openmetadata.accessservices.datamanager.properties.*; -import org.odpi.openmetadata.accessservices.datamanager.rest.*; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; +import org.odpi.openmetadata.accessservices.datamanager.properties.TemplateProperties; +import org.odpi.openmetadata.accessservices.datamanager.rest.TemplateRequestBody; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.display.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.display.DataContainerProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.display.DataFieldProperties; + import java.util.ArrayList; import java.util.List; @@ -450,7 +451,7 @@ public List findForms(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -499,7 +500,7 @@ public List getFormsByName(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -548,7 +549,7 @@ public List getFormsForApplication(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -911,7 +912,7 @@ public List findReports(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -960,7 +961,7 @@ public List getReportsByName(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -1009,7 +1010,7 @@ public List getReportsForApplication(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -1372,7 +1373,7 @@ public List findQueries(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -1421,7 +1422,7 @@ public List getQueriesByName(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -1470,7 +1471,7 @@ public List getQueriesForApplication(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -1782,7 +1783,7 @@ public List findDataContainers(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -1825,7 +1826,7 @@ public List getDataContainersForElement(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -1884,7 +1885,7 @@ public List getDataContainerByName(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-client/src/main/java/org/odpi/openmetadata/accessservices/datamanager/client/EventBrokerClient.java b/open-metadata-implementation/access-services/data-manager/data-manager-client/src/main/java/org/odpi/openmetadata/accessservices/datamanager/client/EventBrokerClient.java index 746fcdb9125..938d712bd5d 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-client/src/main/java/org/odpi/openmetadata/accessservices/datamanager/client/EventBrokerClient.java +++ b/open-metadata-implementation/access-services/data-manager/data-manager-client/src/main/java/org/odpi/openmetadata/accessservices/datamanager/client/EventBrokerClient.java @@ -5,16 +5,16 @@ import org.odpi.openmetadata.accessservices.datamanager.api.EventBrokerInterface; import org.odpi.openmetadata.accessservices.datamanager.client.rest.DataManagerRESTClient; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.*; -import org.odpi.openmetadata.accessservices.datamanager.properties.*; -import org.odpi.openmetadata.accessservices.datamanager.rest.*; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; +import org.odpi.openmetadata.accessservices.datamanager.properties.TemplateProperties; +import org.odpi.openmetadata.accessservices.datamanager.rest.TemplateRequestBody; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.topics.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.events.*; import java.util.List; @@ -446,7 +446,7 @@ public List findTopics(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -495,7 +495,7 @@ public List getTopicsByName(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -544,7 +544,7 @@ public List getTopicsForEventBroker(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -836,7 +836,7 @@ public List findEventTypes(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -880,7 +880,7 @@ public List getEventTypesForEventSet(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -923,7 +923,7 @@ public List getEventTypesForTopic(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -972,7 +972,7 @@ public List getEventTypesByName(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-client/src/main/java/org/odpi/openmetadata/accessservices/datamanager/client/ExternalReferenceManagerClient.java b/open-metadata-implementation/access-services/data-manager/data-manager-client/src/main/java/org/odpi/openmetadata/accessservices/datamanager/client/ExternalReferenceManagerClient.java index ab00fa9c521..5fc263e6eb3 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-client/src/main/java/org/odpi/openmetadata/accessservices/datamanager/client/ExternalReferenceManagerClient.java +++ b/open-metadata-implementation/access-services/data-manager/data-manager-client/src/main/java/org/odpi/openmetadata/accessservices/datamanager/client/ExternalReferenceManagerClient.java @@ -4,21 +4,14 @@ import org.odpi.openmetadata.accessservices.datamanager.api.ExternalReferenceManagerInterface; import org.odpi.openmetadata.accessservices.datamanager.client.rest.DataManagerRESTClient; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.ExternalReferenceElement; -import org.odpi.openmetadata.accessservices.datamanager.properties.ExternalReferenceProperties; -import org.odpi.openmetadata.accessservices.datamanager.rest.ExternalReferenceLinkRequestBody; -import org.odpi.openmetadata.accessservices.datamanager.rest.ExternalReferenceRequestBody; -import org.odpi.openmetadata.accessservices.datamanager.rest.ExternalReferenceResponse; -import org.odpi.openmetadata.accessservices.datamanager.rest.ExternalReferencesResponse; import org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.NullRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ExternalReferenceElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.externalreferences.ExternalReferenceProperties; import java.util.List; @@ -208,15 +201,16 @@ public String createExternalReference(String userId, invalidParameterHandler.validateUserId(userId, methodName); invalidParameterHandler.validateGUID(anchorGUID, parentElementGUIDParameterName, methodName); invalidParameterHandler.validateObject(properties, propertiesParameterName, methodName); - invalidParameterHandler.validateName(properties.getResourceId(), qualifiedNameParameterName, methodName); + invalidParameterHandler.validateName(properties.getQualifiedName(), qualifiedNameParameterName, methodName); final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix; - ExternalReferenceRequestBody requestBody = new ExternalReferenceRequestBody(properties); + LinkedExternalReferenceRequestBody requestBody = new LinkedExternalReferenceRequestBody(); requestBody.setAnchorGUID(anchorGUID); requestBody.setLinkId(linkId); requestBody.setLinkDescription(linkDescription); + requestBody.setProperties(properties); GUIDResponse restResult = restClient.callGUIDPostRESTCall(methodName, urlTemplate, @@ -467,7 +461,7 @@ public List findExternalReferencesById(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -515,7 +509,7 @@ public List findExternalReferencesByURL(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -559,7 +553,7 @@ public List retrieveAttachedExternalReferences(String startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } } diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-client/src/main/java/org/odpi/openmetadata/accessservices/datamanager/client/FilesAndFoldersClient.java b/open-metadata-implementation/access-services/data-manager/data-manager-client/src/main/java/org/odpi/openmetadata/accessservices/datamanager/client/FilesAndFoldersClient.java index 6174d7e18b8..8cf46e24b62 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-client/src/main/java/org/odpi/openmetadata/accessservices/datamanager/client/FilesAndFoldersClient.java +++ b/open-metadata-implementation/access-services/data-manager/data-manager-client/src/main/java/org/odpi/openmetadata/accessservices/datamanager/client/FilesAndFoldersClient.java @@ -5,15 +5,17 @@ import org.odpi.openmetadata.accessservices.datamanager.api.FilesAndFoldersInterface; import org.odpi.openmetadata.accessservices.datamanager.client.rest.DataManagerRESTClient; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.DataFileElement; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.FileFolderElement; import org.odpi.openmetadata.accessservices.datamanager.properties.*; -import org.odpi.openmetadata.accessservices.datamanager.rest.*; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDListResponse; +import org.odpi.openmetadata.accessservices.datamanager.rest.TemplateRequestBody; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.DataFileElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.FileFolderElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.filesandfolders.*; import java.util.List; @@ -164,7 +166,7 @@ public List createNestedFolders(String userId, requestBody.setExternalSourceGUID(fileManagerCapabilityGUID); requestBody.setExternalSourceName(fileManagerCapabilityName); - requestBody.setFullPath(pathName); + requestBody.setPathName(pathName); GUIDListResponse restResult = restClient.callGUIDListPostRESTCall(methodName, urlTemplate, @@ -209,7 +211,7 @@ public void attachTopLevelFolder(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/{2}/folders/{3}/attach"; - MetadataSourceRequestBody requestBody = new MetadataSourceRequestBody(); + ExternalSourceRequestBody requestBody = new ExternalSourceRequestBody(); requestBody.setExternalSourceGUID(fileManagerCapabilityGUID); requestBody.setExternalSourceName(fileManagerCapabilityName); @@ -255,7 +257,7 @@ public void detachTopLevelFolder(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/{2}/folders/{3}/detach"; - MetadataSourceRequestBody requestBody = new MetadataSourceRequestBody(); + ExternalSourceRequestBody requestBody = new ExternalSourceRequestBody(); requestBody.setExternalSourceGUID(fileManagerCapabilityGUID); requestBody.setExternalSourceName(fileManagerCapabilityName); @@ -540,7 +542,7 @@ public void deleteDataFileFromCatalog(String userId, requestBody.setExternalSourceGUID(fileManagerCapabilityGUID); requestBody.setExternalSourceName(fileManagerCapabilityName); - requestBody.setFullPath(fullPathname); + requestBody.setPathName(fullPathname); restClient.callVoidPostRESTCall(methodName, urlTemplate, @@ -793,7 +795,7 @@ public void deleteDataFolderFromCatalog(String userId, requestBody.setExternalSourceGUID(fileManagerCapabilityGUID); requestBody.setExternalSourceName(fileManagerCapabilityName); - requestBody.setFullPath(fullPathname); + requestBody.setPathName(fullPathname); restClient.callVoidPostRESTCall(methodName, urlTemplate, @@ -837,7 +839,7 @@ public void attachDataFileAssetToFolder(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/folders/{4}/data-files/{5}/attach"; - MetadataSourceRequestBody requestBody = new MetadataSourceRequestBody(); + ExternalSourceRequestBody requestBody = new ExternalSourceRequestBody(); requestBody.setExternalSourceGUID(fileManagerCapabilityGUID); requestBody.setExternalSourceName(fileManagerCapabilityName); @@ -885,7 +887,7 @@ public void detachDataFileAssetFromFolder(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/folders/{4}/data-files/{5}/detach"; - MetadataSourceRequestBody requestBody = new MetadataSourceRequestBody(); + ExternalSourceRequestBody requestBody = new ExternalSourceRequestBody(); requestBody.setExternalSourceGUID(fileManagerCapabilityGUID); requestBody.setExternalSourceName(fileManagerCapabilityName); @@ -932,7 +934,7 @@ public void moveDataFileInCatalog(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/folders/{4}/data-files/{5}/move-to"; - MetadataSourceRequestBody requestBody = new MetadataSourceRequestBody(); + ExternalSourceRequestBody requestBody = new ExternalSourceRequestBody(); requestBody.setExternalSourceGUID(fileManagerCapabilityGUID); requestBody.setExternalSourceName(fileManagerCapabilityName); @@ -979,7 +981,7 @@ public void moveDataFolderInCatalog(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/folders/{4}/data-folders/{5}/move-to"; - MetadataSourceRequestBody requestBody = new MetadataSourceRequestBody(); + ExternalSourceRequestBody requestBody = new ExternalSourceRequestBody(); requestBody.setExternalSourceGUID(fileManagerCapabilityGUID); requestBody.setExternalSourceName(fileManagerCapabilityName); @@ -1057,7 +1059,7 @@ public FileFolderElement getFolderByPathName(String userId, PathNameRequestBody requestBody = new PathNameRequestBody(); - requestBody.setFullPath(pathName); + requestBody.setPathName(pathName); FileFolderResponse restResult = restClient.callFileFolderPostRESTCall(methodName, urlTemplate, @@ -1108,7 +1110,7 @@ public List getTopLevelFolders(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -1152,7 +1154,7 @@ public List getNestedFolders(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -1195,7 +1197,7 @@ public List getTopLevelDataFiles(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -1239,7 +1241,7 @@ public List getFolderFiles(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -1307,7 +1309,7 @@ public DataFileElement getFileByPathName(String userId, PathNameRequestBody requestBody = new PathNameRequestBody(); - requestBody.setFullPath(pathName); + requestBody.setPathName(pathName); DataFileResponse restResult = restClient.callDataFilePostRESTCall(methodName, urlTemplate, @@ -1354,7 +1356,7 @@ public List getFilesByPathName(String userId, PathNameRequestBody requestBody = new PathNameRequestBody(); - requestBody.setFullPath(pathName); + requestBody.setPathName(pathName); DataFilesResponse restResult = restClient.callDataFilesPostRESTCall(methodName, urlTemplate, @@ -1365,7 +1367,7 @@ public List getFilesByPathName(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -1403,7 +1405,7 @@ public List findFilesByPathName(String userId, PathNameRequestBody requestBody = new PathNameRequestBody(); - requestBody.setFullPath(pathName); + requestBody.setPathName(pathName); DataFilesResponse restResult = restClient.callDataFilesPostRESTCall(methodName, urlTemplate, @@ -1414,6 +1416,6 @@ public List findFilesByPathName(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } } diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-client/src/main/java/org/odpi/openmetadata/accessservices/datamanager/client/MetadataSourceClient.java b/open-metadata-implementation/access-services/data-manager/data-manager-client/src/main/java/org/odpi/openmetadata/accessservices/datamanager/client/MetadataSourceClient.java index 27e3d4f8e60..915057bcbab 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-client/src/main/java/org/odpi/openmetadata/accessservices/datamanager/client/MetadataSourceClient.java +++ b/open-metadata-implementation/access-services/data-manager/data-manager-client/src/main/java/org/odpi/openmetadata/accessservices/datamanager/client/MetadataSourceClient.java @@ -5,14 +5,13 @@ import org.odpi.openmetadata.accessservices.datamanager.api.MetadataSourceInterface; import org.odpi.openmetadata.accessservices.datamanager.client.rest.DataManagerRESTClient; -import org.odpi.openmetadata.accessservices.datamanager.properties.*; import org.odpi.openmetadata.accessservices.datamanager.rest.*; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities.*; /** @@ -186,9 +185,9 @@ public String createAPIManager(String userId, public String createDatabaseManager(String userId, String externalSourceGUID, String externalSourceName, - DatabaseManagerProperties databaseManagerProperties) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException + DatabaseManagerProperties databaseManagerProperties) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException { final String methodName = "createDatabaseManager"; final String propertiesParameterName = "databaseManagerProperties"; diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-client/src/main/java/org/odpi/openmetadata/accessservices/datamanager/client/SchemaManagerClient.java b/open-metadata-implementation/access-services/data-manager/data-manager-client/src/main/java/org/odpi/openmetadata/accessservices/datamanager/client/SchemaManagerClient.java index 3cb4ee49391..8adb02368fd 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-client/src/main/java/org/odpi/openmetadata/accessservices/datamanager/client/SchemaManagerClient.java +++ b/open-metadata-implementation/access-services/data-manager/data-manager-client/src/main/java/org/odpi/openmetadata/accessservices/datamanager/client/SchemaManagerClient.java @@ -5,18 +5,16 @@ import org.odpi.openmetadata.accessservices.datamanager.api.SchemaManagerInterface; import org.odpi.openmetadata.accessservices.datamanager.client.rest.DataManagerRESTClient; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.*; -import org.odpi.openmetadata.accessservices.datamanager.properties.*; -import org.odpi.openmetadata.accessservices.datamanager.rest.*; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.NullRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; +import org.odpi.openmetadata.accessservices.datamanager.properties.TemplateProperties; +import org.odpi.openmetadata.accessservices.datamanager.rest.TemplateRequestBody; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.*; import java.util.List; @@ -24,7 +22,6 @@ /** * SchemaManagerClient defines the common methods for managing SchemaTypes and SchemaAttributes. It is incorporated in the * EventBrokerClient, DisplayApplicationClient, FilesAndFoldersClient and the APIManagerClient. - * * SchemaAttributes describe the data fields of the schema. If a schema attribute's type is simple (that is * primitive, literal, enum or external) its details are passed with the schema attribute. Complex schema types (such as Maps, * Choices) are constructed first and then their identifiers are attached to the schema attribute. @@ -352,7 +349,7 @@ public List getValidValueSetByName(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -401,7 +398,7 @@ public List findValidValueSet(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -856,7 +853,7 @@ public List findSchemaType(String userId, requestBody.setSearchString(searchString); requestBody.setSearchStringParameterName(searchStringParameterName); - SchemaTypesResponse restResult = restClient.callSchemaTypesPostRESTCall(methodName, + SchemaTypeElementsResponse restResult = restClient.callSchemaTypesPostRESTCall(methodName, urlTemplate, requestBody, serverName, @@ -865,7 +862,7 @@ public List findSchemaType(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -961,7 +958,7 @@ public List getSchemaTypeByName(String userId, requestBody.setName(name); requestBody.setNamePropertyName(nameParameterName); - SchemaTypesResponse restResult = restClient.callSchemaTypesPostRESTCall(methodName, + SchemaTypeElementsResponse restResult = restClient.callSchemaTypesPostRESTCall(methodName, urlTemplate, requestBody, serverName, @@ -970,7 +967,7 @@ public List getSchemaTypeByName(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -1412,7 +1409,7 @@ public List findSchemaAttributes(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -1456,7 +1453,7 @@ public List getNestedAttributes(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -1515,7 +1512,7 @@ public List getSchemaAttributesByName(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-client/src/main/java/org/odpi/openmetadata/accessservices/datamanager/client/ValidValueManagement.java b/open-metadata-implementation/access-services/data-manager/data-manager-client/src/main/java/org/odpi/openmetadata/accessservices/datamanager/client/ValidValueManagement.java index 2abe7419d79..5a82f951438 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-client/src/main/java/org/odpi/openmetadata/accessservices/datamanager/client/ValidValueManagement.java +++ b/open-metadata-implementation/access-services/data-manager/data-manager-client/src/main/java/org/odpi/openmetadata/accessservices/datamanager/client/ValidValueManagement.java @@ -4,21 +4,13 @@ import org.odpi.openmetadata.accessservices.datamanager.api.ValidValueManagementInterface; import org.odpi.openmetadata.accessservices.datamanager.client.rest.DataManagerRESTClient; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.RelatedElement; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.ValidValueElement; -import org.odpi.openmetadata.accessservices.datamanager.properties.ReferenceValueAssignmentProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.ValidValueAssignmentProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.ValidValueMembershipProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.ValidValueProperties; -import org.odpi.openmetadata.accessservices.datamanager.rest.RelatedElementListResponse; -import org.odpi.openmetadata.accessservices.datamanager.rest.ValidValueListResponse; -import org.odpi.openmetadata.accessservices.datamanager.rest.ValidValueResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues.*; import java.util.List; @@ -477,7 +469,7 @@ public List findValidValues(String userId, requestBody.setSearchString(searchString); requestBody.setSearchStringParameterName(searchStringParameterName); - ValidValueListResponse restResult = restClient.callValidValueListPostRESTCall(methodName, + ValidValuesResponse restResult = restClient.callValidValueListPostRESTCall(methodName, urlTemplate, requestBody, serverName, @@ -485,7 +477,7 @@ public List findValidValues(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -526,7 +518,7 @@ public List getValidValuesByName(String userId, requestBody.setName(name); requestBody.setNamePropertyName(nameParameterName); - ValidValueListResponse restResult = restClient.callValidValueListPostRESTCall(methodName, + ValidValuesResponse restResult = restClient.callValidValueListPostRESTCall(methodName, urlTemplate, requestBody, serverName, @@ -534,7 +526,7 @@ public List getValidValuesByName(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -565,14 +557,14 @@ public List getAllValidValues(String userId, final String urlTemplate = serverPlatformURLRoot + validValueURLTemplatePrefix + "?startFrom={2}&pageSize={3}"; - ValidValueListResponse restResult = restClient.callValidValueListGetRESTCall(methodName, + ValidValuesResponse restResult = restClient.callValidValueListGetRESTCall(methodName, urlTemplate, serverName, userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -606,7 +598,7 @@ public List getValidValueSetMembers(String userId, final String urlTemplate = serverPlatformURLRoot + validValueURLTemplatePrefix + "/members/{2}?startFrom={3}&pageSize={4}"; - ValidValueListResponse restResult = restClient.callValidValueListGetRESTCall(methodName, + ValidValuesResponse restResult = restClient.callValidValueListGetRESTCall(methodName, urlTemplate, serverName, userId, @@ -614,7 +606,7 @@ public List getValidValueSetMembers(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -647,7 +639,7 @@ public List getSetsForValidValue(String userId, final String urlTemplate = serverPlatformURLRoot + validValueURLTemplatePrefix + "/sets/{2}?startFrom={3}&pageSize={4}"; - ValidValueListResponse restResult = restClient.callValidValueListGetRESTCall(methodName, + ValidValuesResponse restResult = restClient.callValidValueListGetRESTCall(methodName, urlTemplate, serverName, userId, @@ -655,7 +647,7 @@ public List getSetsForValidValue(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -727,15 +719,15 @@ public List getConsumersOfValidValue(String userId, final String urlTemplate = serverPlatformURLRoot + validValueURLTemplatePrefix + "/{2}/consumers?startFrom={3}&pageSize={4}"; - RelatedElementListResponse restResult = restClient.callRelatedElementListGetRESTCall(methodName, - urlTemplate, - serverName, - userId, - validValueGUID, - startFrom, - validatedPageSize); + RelatedElementsResponse restResult = restClient.callRelatedElementsGetRESTCall(methodName, + urlTemplate, + serverName, + userId, + validValueGUID, + startFrom, + validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -768,14 +760,14 @@ public List getReferenceValues(String userId, final String urlTemplate = serverPlatformURLRoot + validValueURLTemplatePrefix + "/by-reference-value-tags/{2}?startFrom={3}&pageSize={4}"; - ValidValueListResponse restResult = restClient.callValidValueListGetRESTCall(methodName, + ValidValuesResponse restResult = restClient.callValidValueListGetRESTCall(methodName, urlTemplate, serverName, userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -811,15 +803,15 @@ public List getAssigneesOfReferenceValue(String userId, final String urlTemplate = serverPlatformURLRoot + validValueURLTemplatePrefix + "/{2}/by-reference-value-tag-assignees?startFrom={3}&pageSize={4}"; - RelatedElementListResponse restResult = restClient.callRelatedElementListGetRESTCall(methodName, - urlTemplate, - serverName, - userId, - validValueGUID, - startFrom, - validatedPageSize); + RelatedElementsResponse restResult = restClient.callRelatedElementsGetRESTCall(methodName, + urlTemplate, + serverName, + userId, + validValueGUID, + startFrom, + validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-client/src/main/java/org/odpi/openmetadata/accessservices/datamanager/client/rest/DataManagerRESTClient.java b/open-metadata-implementation/access-services/data-manager/data-manager-client/src/main/java/org/odpi/openmetadata/accessservices/datamanager/client/rest/DataManagerRESTClient.java index fd05633ca99..4357d385348 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-client/src/main/java/org/odpi/openmetadata/accessservices/datamanager/client/rest/DataManagerRESTClient.java +++ b/open-metadata-implementation/access-services/data-manager/data-manager-client/src/main/java/org/odpi/openmetadata/accessservices/datamanager/client/rest/DataManagerRESTClient.java @@ -3,7 +3,7 @@ package org.odpi.openmetadata.accessservices.datamanager.client.rest; -import org.odpi.openmetadata.accessservices.datamanager.rest.*; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.client.OCFRESTClient; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; @@ -88,2018 +88,4 @@ public DataManagerRESTClient(String serverName, super(serverName, serverPlatformURLRoot, userId, password); } - - - /** - * Issue a GET REST call that returns a ConnectionResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return ConnectionResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public ConnectionResponse callMyConnectionGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ConnectionResponse restResult = this.callGetRESTCall(methodName, ConnectionResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a ConnectionsResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return ConnectionsResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public ConnectionsResponse callMyConnectionsGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ConnectionsResponse restResult = this.callGetRESTCall(methodName, ConnectionsResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a POST REST call that returns a ConnectionsResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. - * @param requestBody object that passes additional parameters - * @param params a list of parameters that are slotted into the url template. - * - * @return ConnectionsResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public ConnectionsResponse callMyConnectionsPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ConnectionsResponse restResult = this.callPostRESTCall(methodName, ConnectionsResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a ConnectorReportResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return ConnectorReportResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public ConnectorTypeResponse callMyConnectorTypeGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ConnectorTypeResponse restResult = this.callGetRESTCall(methodName, ConnectorTypeResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a ConnectorTypesResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return ConnectorTypesResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public ConnectorTypesResponse callMyConnectorTypesGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ConnectorTypesResponse restResult = this.callGetRESTCall(methodName, ConnectorTypesResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a POST REST call that returns a ConnectorTypesResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. - * @param requestBody object that passes additional parameters - * @param params a list of parameters that are slotted into the url template. - * - * @return ConnectorTypesResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public ConnectorTypesResponse callMyConnectorTypesPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ConnectorTypesResponse restResult = this.callPostRESTCall(methodName, ConnectorTypesResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a EndpointResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return EndpointResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public EndpointResponse callMyEndpointGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - EndpointResponse restResult = this.callGetRESTCall(methodName, EndpointResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a EndpointsResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return EndpointsResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public EndpointsResponse callMyEndpointsGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - EndpointsResponse restResult = this.callGetRESTCall(methodName, EndpointsResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - - /** - * Issue a POST REST call that returns a EndpointsResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. - * @param requestBody object that passes additional parameters - * @param params a list of parameters that are slotted into the url template. - * - * @return EndpointsResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public EndpointsResponse callMyEndpointsPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - EndpointsResponse restResult = this.callPostRESTCall(methodName, EndpointsResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a ExternalReferenceResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return ExternalReferenceResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public ExternalReferenceResponse callExternalReferenceGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ExternalReferenceResponse restResult = this.callGetRESTCall(methodName, ExternalReferenceResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a ExternalReferencesResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return ExternalReferencesResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public ExternalReferencesResponse callExternalReferencesGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ExternalReferencesResponse restResult = this.callGetRESTCall(methodName, ExternalReferencesResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - - /** - * Issue a POST REST call that returns a ExternalReferencesResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. - * @param requestBody object that passes additional parameters - * @param params a list of parameters that are slotted into the url template. - * - * @return ExternalReferencesResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public ExternalReferencesResponse callExternalReferencesPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ExternalReferencesResponse restResult = this.callPostRESTCall(methodName, ExternalReferencesResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a DatabaseColumnResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public DatabaseColumnResponse callDatabaseColumnGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - DatabaseColumnResponse restResult = this.callGetRESTCall(methodName, DatabaseColumnResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a DatabaseColumnsResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public DatabaseColumnsResponse callDatabaseColumnsGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - DatabaseColumnsResponse restResult = this.callGetRESTCall(methodName, DatabaseColumnsResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a POST REST call that returns a DatabaseColumnsResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. - * @param requestBody object that passes additional parameters - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public DatabaseColumnsResponse callDatabaseColumnsPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - DatabaseColumnsResponse restResult = this.callPostRESTCall(methodName, DatabaseColumnsResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a DatabaseResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public DatabaseResponse callDatabaseGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - DatabaseResponse restResult = this.callGetRESTCall(methodName, DatabaseResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a DatabasesResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public DatabasesResponse callDatabasesGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - DatabasesResponse restResult = this.callGetRESTCall(methodName, DatabasesResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a DatabasesResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. - * @param requestBody object that passes additional parameters - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public DatabasesResponse callDatabasesPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - DatabasesResponse restResult = this.callPostRESTCall(methodName, DatabasesResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a DatabaseSchemaResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public DatabaseSchemaResponse callDatabaseSchemaGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - DatabaseSchemaResponse restResult = this.callGetRESTCall(methodName, DatabaseSchemaResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a DatabaseSchemasResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public DatabaseSchemasResponse callDatabaseSchemasGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - DatabaseSchemasResponse restResult = this.callGetRESTCall(methodName, DatabaseSchemasResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a POST REST call that returns a DatabaseSchemasResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. - * @param requestBody object that passes additional parameters - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public DatabaseSchemasResponse callDatabaseSchemasPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - DatabaseSchemasResponse restResult = this.callPostRESTCall(methodName, DatabaseSchemasResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a DatabaseTableResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public DatabaseTableResponse callDatabaseTableGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - DatabaseTableResponse restResult = this.callGetRESTCall(methodName, DatabaseTableResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a DatabaseTablesResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public DatabaseTablesResponse callDatabaseTablesGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - DatabaseTablesResponse restResult = this.callGetRESTCall(methodName, DatabaseTablesResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a POST REST call that returns a DatabaseTablesResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. - * @param requestBody object that passes additional parameters - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public DatabaseTablesResponse callDatabaseTablesPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - DatabaseTablesResponse restResult = this.callPostRESTCall(methodName, DatabaseTablesResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a DatabaseViewResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public DatabaseViewResponse callDatabaseViewGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - DatabaseViewResponse restResult = this.callGetRESTCall(methodName, DatabaseViewResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a DatabaseViewsResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public DatabaseViewsResponse callDatabaseViewsGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - DatabaseViewsResponse restResult = this.callGetRESTCall(methodName, DatabaseViewsResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a POST REST call that returns a DatabaseViewsResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. - * @param requestBody object that passes additional parameters - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public DatabaseViewsResponse callDatabaseViewsPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - DatabaseViewsResponse restResult = this.callPostRESTCall(methodName, DatabaseViewsResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a DataContainerResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public DataContainerResponse callDataContainerGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - DataContainerResponse restResult = this.callGetRESTCall(methodName,DataContainerResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a DataContainersResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public DataContainersResponse callDataContainersGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - DataContainersResponse restResult = this.callGetRESTCall(methodName, DataContainersResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - - /** - * Issue a POST REST call that returns a DataContainersResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. - * @param requestBody object that passes additional parameters - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public DataContainersResponse callDataContainersPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - DataContainersResponse restResult = this.callPostRESTCall(methodName, DataContainersResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a DataFileResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public DataFileResponse callDataFileGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - DataFileResponse restResult = this.callGetRESTCall(methodName, DataFileResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a POST REST call that returns a DataFileResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. - * @param requestBody object that passes additional parameters - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public DataFileResponse callDataFilePostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - DataFileResponse restResult = this.callPostRESTCall(methodName, DataFileResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a DataFilesResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public DataFilesResponse callDataFilesGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - DataFilesResponse restResult = this.callGetRESTCall(methodName, DataFilesResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a POST REST call that returns a DataFilesResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. - * @param requestBody object that passes additional parameters - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public DataFilesResponse callDataFilesPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - DataFilesResponse restResult = this.callPostRESTCall(methodName, DataFilesResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a FileFolderResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public FileFolderResponse callFileFolderGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - FileFolderResponse restResult = this.callGetRESTCall(methodName, FileFolderResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a POST REST call that returns a FileFolderResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. - * @param requestBody object that passes additional parameters - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public FileFolderResponse callFileFolderPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - FileFolderResponse restResult = this.callPostRESTCall(methodName, FileFolderResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a FileFoldersResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public FileFoldersResponse callFileFoldersGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - FileFoldersResponse restResult = this.callGetRESTCall(methodName, FileFoldersResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a FormResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public FormResponse callFormGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - FormResponse restResult = this.callGetRESTCall(methodName, FormResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a FormsResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public FormsResponse callFormsGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - FormsResponse restResult = this.callGetRESTCall(methodName, FormsResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a POST REST call that returns a FormsResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. - * @param requestBody object that passes additional parameters - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public FormsResponse callFormsPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - FormsResponse restResult = this.callPostRESTCall(methodName, FormsResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a QueryResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public QueryResponse callQueryGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - QueryResponse restResult = this.callGetRESTCall(methodName, QueryResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a QueriesResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public QueriesResponse callQueriesGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - QueriesResponse restResult = this.callGetRESTCall(methodName, QueriesResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - - /** - * Issue a POST REST call that returns a QueriesResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. - * @param requestBody object that passes additional parameters - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public QueriesResponse callQueriesPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - QueriesResponse restResult = this.callPostRESTCall(methodName, QueriesResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - - /** - * Issue a GET REST call that returns a ReportResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public ReportResponse callReportGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ReportResponse restResult = this.callGetRESTCall(methodName, ReportResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a ReportsResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public ReportsResponse callReportsGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ReportsResponse restResult = this.callGetRESTCall(methodName, ReportsResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - - /** - * Issue a POST REST call that returns a ReportsResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. - * @param requestBody object that passes additional parameters - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public ReportsResponse callReportsPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ReportsResponse restResult = this.callPostRESTCall(methodName, ReportsResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a TopicResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public TopicResponse callTopicGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - TopicResponse restResult = this.callGetRESTCall(methodName, TopicResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a TopicsResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public TopicsResponse callTopicsGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - TopicsResponse restResult = this.callGetRESTCall(methodName, TopicsResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a POST REST call that returns a TopicsResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. - * @param requestBody object that passes additional parameters - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public TopicsResponse callTopicsPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - TopicsResponse restResult = this.callPostRESTCall(methodName, TopicsResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a EventTypeResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public EventTypeResponse callEventTypeGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - EventTypeResponse restResult = this.callGetRESTCall(methodName, EventTypeResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a EventTypesResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public EventTypesResponse callEventTypesGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - EventTypesResponse restResult = this.callGetRESTCall(methodName, EventTypesResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - - /** - * Issue a POST REST call that returns a EventTypesResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. - * @param requestBody object that passes additional parameters - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public EventTypesResponse callEventTypesPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - EventTypesResponse restResult = this.callPostRESTCall(methodName, EventTypesResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a APIResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public APIResponse callAPIGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - APIResponse restResult = this.callGetRESTCall(methodName, APIResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a APIsResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public APIsResponse callAPIsGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - APIsResponse restResult = this.callGetRESTCall(methodName, APIsResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - - /** - * Issue a POST REST call that returns a APIsResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. - * @param requestBody request body for the request. - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public APIsResponse callAPIsPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - APIsResponse restResult = this.callPostRESTCall(methodName, APIsResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a APIOperationResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public APIOperationResponse callAPIOperationGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - APIOperationResponse restResult = this.callGetRESTCall(methodName, APIOperationResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a APIOperationsResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public APIOperationsResponse callAPIOperationsGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - APIOperationsResponse restResult = this.callGetRESTCall(methodName, APIOperationsResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - - /** - * Issue a POST REST call that returns a APIOperationsResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. - * @param requestBody request body for the request. - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public APIOperationsResponse callAPIOperationsPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - APIOperationsResponse restResult = this.callPostRESTCall(methodName, APIOperationsResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a APIParameterListResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public APIParameterListResponse callAPIParameterListGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - APIParameterListResponse restResult = this.callGetRESTCall(methodName, APIParameterListResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a APIParameterListsResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public APIParameterListsResponse callAPIParameterListsGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - APIParameterListsResponse restResult = this.callGetRESTCall(methodName, APIParameterListsResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - - /** - * Issue a GET REST call that returns a APIParameterListsResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. - * @param requestBody request body for the request. - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public APIParameterListsResponse callAPIParameterListsPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - APIParameterListsResponse restResult = this.callPostRESTCall(methodName, APIParameterListsResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a POST REST call that returns a SchemaAttributeResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. - * @param requestBody object that passes additional parameters - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public SchemaAttributeResponse callSchemaAttributePostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - SchemaAttributeResponse restResult = this.callPostRESTCall(methodName, SchemaAttributeResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a POST REST call that returns a SchemaAttributesResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. - * @param requestBody object that passes additional parameters - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public SchemaAttributesResponse callSchemaAttributesPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - SchemaAttributesResponse restResult = this.callPostRESTCall(methodName, SchemaAttributesResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a SchemaAttributeResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public SchemaAttributeResponse callSchemaAttributeGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - SchemaAttributeResponse restResult = this.callGetRESTCall(methodName, SchemaAttributeResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a SchemaAttributesResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public SchemaAttributesResponse callSchemaAttributesGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - SchemaAttributesResponse restResult = this.callGetRESTCall(methodName, SchemaAttributesResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a POST REST call that returns a SchemaTypeResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. - * @param requestBody object that passes additional parameters - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public SchemaTypeResponse callSchemaTypePostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - SchemaTypeResponse restResult = this.callPostRESTCall(methodName, SchemaTypeResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a SchemaTypeResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public SchemaTypeResponse callSchemaTypeGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - SchemaTypeResponse restResult = this.callGetRESTCall(methodName, SchemaTypeResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a SchemaTypesResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public SchemaTypesResponse callSchemaTypesGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - SchemaTypesResponse restResult = this.callGetRESTCall(methodName, SchemaTypesResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - - /** - * Issue a POST REST call that returns a SchemaTypesResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. - * @param requestBody object that passes additional parameters - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public SchemaTypesResponse callSchemaTypesPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - SchemaTypesResponse restResult = this.callPostRESTCall(methodName, SchemaTypesResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a POST REST call that returns a ValidValueSetsResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. - * @param requestBody object that passes additional parameters - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public ValidValueSetsResponse callValidValueSetsPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ValidValueSetsResponse restResult = this.callGetRESTCall(methodName, ValidValueSetsResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a ElementStubResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public ElementStubResponse callElementStubGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ElementStubResponse restResult = this.callGetRESTCall(methodName, ElementStubResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - - /** - * Issue a GET REST call that returns a RelatedElementListResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate REST API call URL template with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public RelatedElementListResponse callRelatedElementListGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - RelatedElementListResponse restResult = this.callGetRESTCall(methodName, RelatedElementListResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a ValidValueElement in a response object. - * - * @param methodName name of the method being called. - * @param urlTemplate REST API call URL template with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException something went wrong with the REST call stack. - */ - public ValidValueResponse callValidValueGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ValidValueResponse restResult = this.callGetRESTCall(methodName, ValidValueResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a list of ValidValueElements in a response object. - * - * @param methodName name of the method being called - * @param urlTemplate REST API call URL template with place-holders for the parameters - * @param params a list of parameters that are slotted into the url template - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException something went wrong with the REST call stack. - */ - public ValidValueListResponse callValidValueListGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ValidValueListResponse restResult = this.callGetRESTCall(methodName, ValidValueListResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a list of ValidValueElements in a response object. - * - * @param methodName name of the method being called - * @param urlTemplate REST API call URL template with place-holders for the parameters - * @param requestBody request body for the request - * @param params a list of parameters that are slotted into the url template - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException something went wrong with the REST call stack. - */ - public ValidValueListResponse callValidValueListPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ValidValueListResponse restResult = this.callPostRESTCall(methodName, ValidValueListResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } } diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/ConnectionConverter.java b/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/ConnectionConverter.java deleted file mode 100644 index acd33d8256b..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/ConnectionConverter.java +++ /dev/null @@ -1,155 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.converters; - -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.ConnectionElement; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.EmbeddedConnection; -import org.odpi.openmetadata.accessservices.datamanager.properties.ConnectionProperties; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; -import java.util.ArrayList; -import java.util.List; - -/** - * ConnectionConverter transfers the relevant properties from some Open Metadata Repository Services (OMRS) - * EntityDetail and Relationship objects into a Connection bean (or a VirtualConnection bean). - */ -public class ConnectionConverter extends DataManagerOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public ConnectionConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - /** - * Using the supplied instances, return a new instance of the bean. It is used for beans such as - * a connection bean which made up of 3 entities (Connection, ConnectorType and Endpoint) plus the - * relationships between them. The relationships may be omitted if they do not have an properties. - * - * @param beanClass name of the class to create - * @param primaryEntity entity that is the root of the collection of entities that make up the - * content of the bean - * @param supplementaryEntities entities connected to the primary entity by the relationships - * @param relationships relationships linking the entities - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - @SuppressWarnings(value = "unchecked") - public B getNewComplexBean(Class beanClass, - EntityDetail primaryEntity, - List supplementaryEntities, - List relationships, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof ConnectionElement bean) - { - ConnectionProperties connectionProperties = new ConnectionProperties(); - - if (primaryEntity != null) - { - bean.setElementHeader(this.getMetadataElementHeader(beanClass, primaryEntity, methodName)); - - /* - * The initial set of values come from the entity. - */ - InstanceProperties instanceProperties = new InstanceProperties(primaryEntity.getProperties()); - - connectionProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); - connectionProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); - connectionProperties.setDisplayName(this.removeDisplayName(instanceProperties)); - connectionProperties.setDescription(this.removeDescription(instanceProperties)); - connectionProperties.setSecuredProperties(this.removeSecuredProperties(instanceProperties)); - connectionProperties.setConfigurationProperties(this.removeConfigurationProperties(instanceProperties)); - connectionProperties.setUserId(this.removeUserId(instanceProperties)); - connectionProperties.setClearPassword(this.removeClearPassword(instanceProperties)); - connectionProperties.setEncryptedPassword(this.removeEncryptedPassword(instanceProperties)); - /* - * Any remaining properties are returned in the extended properties. They are - * assumed to be defined in a subtype. - */ - connectionProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); - connectionProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - - bean.setConnectionProperties(connectionProperties); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - - if (relationships != null) - { - List embeddedConnections = new ArrayList<>(); - - for (Relationship relationship : relationships) - { - if ((relationship != null) && (relationship.getType() != null)) - { - if (repositoryHelper.isTypeOf(serviceName, relationship.getType().getTypeDefName(), OpenMetadataType.EMBEDDED_CONNECTION_TYPE_NAME)) - { - EmbeddedConnection embeddedConnection = new EmbeddedConnection(); - - InstanceProperties relationshipProperties = relationship.getProperties(); - - embeddedConnection.setPosition(this.getPosition(relationshipProperties)); - embeddedConnection.setDisplayName(this.getDisplayName(relationshipProperties)); - embeddedConnection.setArguments(this.getArguments(relationshipProperties)); - - embeddedConnection.setEmbeddedConnection(getElementStub(beanClass, relationship.getEntityTwoProxy(), methodName)); - - embeddedConnections.add(embeddedConnection); - } - else if (repositoryHelper.isTypeOf(serviceName, relationship.getType().getTypeDefName(), OpenMetadataType.CONNECTION_CONNECTOR_TYPE_TYPE_NAME)) - { - bean.setConnectorType(getElementStub(beanClass, relationship.getEntityTwoProxy(), methodName)); - } - else if (repositoryHelper.isTypeOf(serviceName, relationship.getType().getTypeDefName(), OpenMetadataType.CONNECTION_ENDPOINT_TYPE_NAME)) - { - bean.setEndpoint(getElementStub(beanClass, relationship.getEntityOneProxy(), methodName)); - } - } - } - - if (! embeddedConnections.isEmpty()) - { - bean.setEmbeddedConnections(embeddedConnections); - } - } - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/ConnectorTypeConverter.java b/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/ConnectorTypeConverter.java deleted file mode 100644 index efc9e0f4535..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/ConnectorTypeConverter.java +++ /dev/null @@ -1,135 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.converters; - -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.ConnectorTypeElement; -import org.odpi.openmetadata.accessservices.datamanager.properties.ConnectorTypeProperties; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; - -/** - * ConnectorTypeConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) - * EntityDetail object into a ConnectorTypeElement bean. - */ -public class ConnectorTypeConverter extends DataManagerOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity/relationship objects - * @param serviceName name of this component - * @param serverName local server name - */ - public ConnectorTypeConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof ConnectorTypeElement bean) - { - ConnectorTypeProperties connectorTypeProperties = new ConnectorTypeProperties(); - - if (entity != null) - { - bean.setElementHeader(this.getMetadataElementHeader(beanClass, entity, methodName)); - - /* - * The initial set of values come from the entity. - */ - InstanceProperties instanceProperties = new InstanceProperties(entity.getProperties()); - - connectorTypeProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); - connectorTypeProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); - connectorTypeProperties.setDisplayName(this.removeDisplayName(instanceProperties)); - connectorTypeProperties.setDescription(this.removeDescription(instanceProperties)); - connectorTypeProperties.setSupportedAssetTypeName(this.removeSupportedAssetTypeName(instanceProperties)); - connectorTypeProperties.setExpectedDataFormat(this.removeExpectedDataFormat(instanceProperties)); - connectorTypeProperties.setConnectorProviderClassName(this.removeConnectorProviderClassName(instanceProperties)); - connectorTypeProperties.setConnectorFrameworkName(this.removeConnectorFrameworkName(instanceProperties)); - connectorTypeProperties.setConnectorInterfaceLanguage(this.removeConnectorInterfaceLanguage(instanceProperties)); - connectorTypeProperties.setConnectorInterfaces(this.removeConnectorInterfaces(instanceProperties)); - connectorTypeProperties.setTargetTechnologySource(this.removeTargetTechnologySource(instanceProperties)); - connectorTypeProperties.setTargetTechnologyName(this.removeTargetTechnologyName(instanceProperties)); - connectorTypeProperties.setTargetTechnologyInterfaces(this.removeTargetTechnologyInterfaces(instanceProperties)); - connectorTypeProperties.setTargetTechnologyVersions(this.removeTargetTechnologyVersions(instanceProperties)); - connectorTypeProperties.setRecognizedAdditionalProperties(this.removeRecognizedAdditionalProperties(instanceProperties)); - connectorTypeProperties.setRecognizedSecuredProperties(this.removeRecognizedSecuredProperties(instanceProperties)); - connectorTypeProperties.setRecognizedConfigurationProperties(this.removeRecognizedConfigurationProperties(instanceProperties)); - - /* - * Any remaining properties are returned in the extended properties. They are - * assumed to be defined in a subtype. - */ - connectorTypeProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); - connectorTypeProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - - bean.setConnectorTypeProperties(connectorTypeProperties); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - Relationship relationship, - String methodName) throws PropertyServerException - { - return getNewBean(beanClass, entity, methodName); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/DataFileConverter.java b/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/DataFileConverter.java deleted file mode 100644 index b1565560c6d..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/DataFileConverter.java +++ /dev/null @@ -1,138 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.converters; - -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.DataFileElement; -import org.odpi.openmetadata.accessservices.datamanager.properties.DataFileProperties; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; - -/** - * DataFileConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) - * EntityDetail object into a DataFileElement bean. - */ -public class DataFileConverter extends DataManagerOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity/relationship objects - * @param serviceName name of this component - * @param serverName local server name - */ - public DataFileConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof DataFileElement bean) - { - DataFileProperties dataFileProperties = new DataFileProperties(); - - if (entity != null) - { - bean.setElementHeader(this.getMetadataElementHeader(beanClass, entity, methodName)); - - /* - * The initial set of values come from the entity. - */ - InstanceProperties instanceProperties = new InstanceProperties(entity.getProperties()); - - dataFileProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); - dataFileProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); - dataFileProperties.setName(this.removeName(instanceProperties)); - dataFileProperties.setVersionIdentifier(this.removeVersionIdentifier(instanceProperties)); - dataFileProperties.setDescription(this.removeDescription(instanceProperties)); - dataFileProperties.setPathName(this.removePathName(instanceProperties)); - dataFileProperties.setCreateTime(this.removeStoreCreateTime(instanceProperties)); - dataFileProperties.setModifiedTime(this.removeStoreUpdateTime(instanceProperties)); - dataFileProperties.setDeployedImplementationType(this.removeDeployedImplementationType(instanceProperties)); - dataFileProperties.setFileName(this.removeFileName(instanceProperties)); - dataFileProperties.setFileType(this.removeFileType(instanceProperties)); - dataFileProperties.setFileExtension(this.removeFileExtension(instanceProperties)); - - /* - * Any remaining properties are returned in the extended properties. They are - * assumed to be defined in a subtype. - */ - dataFileProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); - dataFileProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - - instanceProperties = super.getClassificationProperties(OpenMetadataType.DATA_ASSET_ENCODING_CLASSIFICATION.typeName, entity); - - dataFileProperties.setEncodingType(this.getDataStoreEncodingType(instanceProperties)); - dataFileProperties.setEncodingLanguage(this.getDataStoreEncodingLanguage(instanceProperties)); - dataFileProperties.setEncodingDescription(this.getDataStoreEncodingDescription(instanceProperties)); - dataFileProperties.setEncodingProperties(this.getEncodingProperties(instanceProperties)); - - bean.setDataFileProperties(dataFileProperties); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - Relationship relationship, - String methodName) throws PropertyServerException - { - return getNewBean(beanClass, entity, methodName); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/DataManagerOMASConverter.java b/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/DataManagerOMASConverter.java deleted file mode 100644 index ada52cb2956..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/DataManagerOMASConverter.java +++ /dev/null @@ -1,243 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.converters; - -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.*; -import org.odpi.openmetadata.accessservices.datamanager.properties.*; -import org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericConverter; -import org.odpi.openmetadata.frameworks.openmetadata.enums.DataItemSortOrder; -import org.odpi.openmetadata.frameworks.openmetadata.enums.KeyPattern; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.*; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - - -/** - * DataManagerOMASConverter provides the generic methods for the Data Manager beans converters. Generic classes - * have limited knowledge of the classes these are working on and this means creating a new instance of a - * class from within a generic is a little involved. This class provides the generic method for creating - * and initializing a Data Manager bean. - */ -public class DataManagerOMASConverter extends OpenMetadataAPIGenericConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName name of this server - */ - public DataManagerOMASConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super (repositoryHelper, serviceName, serverName); - } - - - /*=============================== - * Methods to fill out headers and enums - */ - - - /** - * Extract and delete the sortOrder property from the supplied instance properties. - * - * @param instanceProperties properties from entity - * @return DataItemSortOrder enum - */ - DataItemSortOrder removeSortOrder(InstanceProperties instanceProperties) - { - final String methodName = "removeSortOrder"; - - if (instanceProperties != null) - { - int ordinal = repositoryHelper.removeEnumPropertyOrdinal(serviceName, - OpenMetadataProperty.SORT_ORDER.name, - instanceProperties, - methodName); - - for (DataItemSortOrder dataItemSortOrder : DataItemSortOrder.values()) - { - if (dataItemSortOrder.getOrdinal() == ordinal) - { - return dataItemSortOrder; - } - } - } - - return null; - } - - - /** - * Extract and delete the KeyPattern property from the supplied instance properties. - * - * @param instanceProperties properties from entity - * @return KeyPattern enum - */ - KeyPattern removeKeyPattern(InstanceProperties instanceProperties) - { - final String methodName = "removeKeyPattern"; - - if (instanceProperties != null) - { - int ordinal = repositoryHelper.removeEnumPropertyOrdinal(serviceName, - OpenMetadataProperty.KEY_PATTERN.name, - instanceProperties, - methodName); - - for (KeyPattern keyPattern : KeyPattern.values()) - { - if (keyPattern.getOrdinal() == ordinal) - { - return keyPattern; - } - } - } - - return null; - } - - - /** - * Set up the properties that can be extracted form the schema type. - * - * @param schemaAttributeEntity entity to unpack - * @param schemaTypeElement schema type properties - * @param properties output column properties - */ - void setUpSchemaAttribute(EntityDetail schemaAttributeEntity, - SchemaTypeElement schemaTypeElement, - SchemaAttributeProperties properties) - { - /* - * The initial set of values come from the entity. - */ - InstanceProperties instanceProperties = new InstanceProperties(schemaAttributeEntity.getProperties()); - - properties.setQualifiedName(this.removeQualifiedName(instanceProperties)); - properties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); - properties.setDisplayName(this.removeDisplayName(instanceProperties)); - properties.setDescription(this.removeDescription(instanceProperties)); - - properties.setElementPosition(this.removePosition(instanceProperties)); - properties.setMinCardinality(this.removeMinCardinality(instanceProperties)); - properties.setMaxCardinality(this.removeMaxCardinality(instanceProperties)); - properties.setAllowsDuplicateValues(this.removeAllowsDuplicateValues(instanceProperties)); - properties.setOrderedValues(this.removeOrderedValues(instanceProperties)); - properties.setDefaultValueOverride(this.removeDefaultValueOverride(instanceProperties)); - properties.setSortOrder(this.removeSortOrder(instanceProperties)); - properties.setMinimumLength(this.removeMinimumLength(instanceProperties)); - properties.setLength(this.removeLength(instanceProperties)); - properties.setPrecision(this.removePrecision(instanceProperties)); - properties.setSignificantDigits(this.removeSignificantDigits(instanceProperties)); - properties.setIsNullable(this.removeIsNullable(instanceProperties)); - properties.setNativeJavaClass(this.removeNativeClass(instanceProperties)); - properties.setAliases(this.removeAliases(instanceProperties)); - - /* - * Any remaining properties are returned in the extended properties. They are assumed to be defined in a subtype. - */ - properties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - - if (schemaTypeElement != null) - { - this.addSchemaTypeToAttribute(schemaTypeElement, properties); - } - } - - - /** - * Set up the properties that can be extracted form the schema type. - * - * @param schemaTypeElement schema type properties - * @param attributeProperties output column properties - */ - void addSchemaTypeToAttribute(SchemaTypeElement schemaTypeElement, - SchemaAttributeProperties attributeProperties) - { - SchemaTypeProperties schemaTypeProperties = schemaTypeElement.getSchemaTypeProperties(); - - if (schemaTypeProperties instanceof PrimitiveSchemaTypeProperties) - { - attributeProperties.setDataType(((PrimitiveSchemaTypeProperties) schemaTypeProperties).getDataType()); - attributeProperties.setDefaultValue(((PrimitiveSchemaTypeProperties) schemaTypeProperties).getDefaultValue()); - } - else if (schemaTypeProperties instanceof LiteralSchemaTypeProperties) - { - attributeProperties.setDataType(((LiteralSchemaTypeProperties) schemaTypeProperties).getDataType()); - attributeProperties.setFixedValue(((LiteralSchemaTypeProperties) schemaTypeProperties).getFixedValue()); - } - else if (schemaTypeProperties instanceof EnumSchemaTypeProperties) - { - attributeProperties.setDataType(((EnumSchemaTypeProperties) schemaTypeProperties).getDataType()); - attributeProperties.setDefaultValue(((EnumSchemaTypeProperties) schemaTypeProperties).getDefaultValue()); - attributeProperties.setValidValuesSetGUID(((EnumSchemaTypeProperties) schemaTypeProperties).getValidValueSetGUID()); - } - else if (schemaTypeProperties instanceof ExternalSchemaTypeProperties) - { - attributeProperties.setDataType(((ExternalSchemaTypeProperties) schemaTypeProperties).getDataType()); - - SchemaTypeElement externalSchemaType = schemaTypeElement.getExternalSchemaType(); - attributeProperties.setExternalTypeGUID(externalSchemaType.getElementHeader().getGUID()); - } - } - - - /** - * Using the supplied instances, return a new instance of a relatedElement bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - public RelatedElement getRelatedElement(Class beanClass, - EntityDetail entity, - Relationship relationship, - String methodName) throws PropertyServerException - { - RelatedElement relatedElement = new RelatedElement(); - - relatedElement.setRelationshipHeader(this.getMetadataElementHeader(beanClass, relationship, null, methodName)); - - if (relationship != null) - { - InstanceProperties instanceProperties = new InstanceProperties(relationship.getProperties()); - - RelationshipProperties relationshipProperties = new RelationshipProperties(); - - relationshipProperties.setEffectiveFrom(instanceProperties.getEffectiveFromTime()); - relationshipProperties.setEffectiveTo(instanceProperties.getEffectiveToTime()); - relationshipProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - - relatedElement.setRelationshipProperties(relationshipProperties); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.RELATIONSHIP_DEF, methodName); - } - - - if (entity != null) - { - ElementStub elementStub = this.getElementStub(beanClass, entity, methodName); - - relatedElement.setRelatedElement(elementStub); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - - return relatedElement; - } - -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/ElementStubConverter.java b/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/ElementStubConverter.java deleted file mode 100644 index 5281c3d8071..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/ElementStubConverter.java +++ /dev/null @@ -1,221 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.converters; - - -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityProxy; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; -import java.util.ArrayList; -import java.util.List; - - -/** - * ElementStubConverter provides common methods for transferring relevant properties from an Open Metadata Repository Services (OMRS) - * EntityProxy object into an ElementStub bean. - */ -public class ElementStubConverter extends DataManagerOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public ElementStubConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entityProxy and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entityProxy entityProxy containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @SuppressWarnings(value = "unchecked") - private B getNewBean(Class beanClass, - EntityProxy entityProxy, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof ElementStub) - { - returnBean = (B)super.getElementStub(beanClass, entityProxy, methodName); - - return returnBean; - } - - return null; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an relationship and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param relationship relationship containing the properties - * @param useEnd1 should the - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - public B getNewBean(Class beanClass, - Relationship relationship, - boolean useEnd1, - String methodName) throws PropertyServerException - { - if (relationship != null) - { - if (useEnd1) - { - return getNewBean(beanClass, relationship.getEntityOneProxy(), methodName); - } - else - { - return getNewBean(beanClass, relationship.getEntityTwoProxy(), methodName); - } - } - - return null; - } - - - /** - * Using the supplied instances, return list of new instances of the bean. - * - * @param beanClass name of the class to create - * @param relationships list of relationships containing the properties - * @param useEnd1 should the - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - public List getNewBeans(Class beanClass, - List relationships, - boolean useEnd1, - String methodName) throws PropertyServerException - { - if (relationships != null) - { - List beans = new ArrayList<>(); - - for (Relationship relationship : relationships) - { - if (relationship != null) - { - B bean = getNewBean(beanClass, relationship, useEnd1, methodName); - - if (bean != null) - { - beans.add(bean); - } - } - } - - if (! beans.isEmpty()) - { - return beans; - } - } - - return null; - } - - - - /** - * Using the supplied entity, return a new instance of the bean. This is used for most beans that have - * a one to one correspondence with the repository instances. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param methodName calling method - * @return bean populated with properties from the entity supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @SuppressWarnings(value = "unchecked") - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - EntityProxy entityProxy = repositoryHelper.getNewEntityProxy(serviceName, entity); - - if (returnBean instanceof ElementStub) - { - returnBean = (B)super.getElementStub(beanClass, entityProxy, methodName); - - return returnBean; - } - - return null; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - catch (Exception error) - { - super.handleBadEntity(beanClass.getName(), entity, methodName); - } - - return null; - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @SuppressWarnings(value = "unused") - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - Relationship relationship, - String methodName) throws PropertyServerException - { - return this.getNewBean(beanClass, entity, methodName); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/EndpointConverter.java b/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/EndpointConverter.java deleted file mode 100644 index d5cff7cb29f..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/EndpointConverter.java +++ /dev/null @@ -1,126 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.converters; - -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.EndpointElement; -import org.odpi.openmetadata.accessservices.datamanager.properties.EndpointProperties; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; - -/** - * EndpointConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) - * EntityDetail object into a EndpointElement bean. - */ -public class EndpointConverter extends DataManagerOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity/relationship objects - * @param serviceName name of this component - * @param serverName local server name - */ - public EndpointConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof EndpointElement bean) - { - EndpointProperties endpointProperties = new EndpointProperties(); - - if (entity != null) - { - bean.setElementHeader(this.getMetadataElementHeader(beanClass, entity, methodName)); - - /* - * The initial set of values come from the entity. - */ - InstanceProperties instanceProperties = new InstanceProperties(entity.getProperties()); - - endpointProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); - endpointProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); - endpointProperties.setDisplayName(this.removeName(instanceProperties)); - endpointProperties.setDescription(this.removeDescription(instanceProperties)); - endpointProperties.setAddress(this.removeNetworkAddress(instanceProperties)); - endpointProperties.setProtocol(this.removeProtocol(instanceProperties)); - endpointProperties.setEncryptionMethod(this.removeEncryptionMethod(instanceProperties)); - - - /* - * Any remaining properties are returned in the extended properties. They are - * assumed to be defined in a subtype. - */ - endpointProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); - endpointProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - - bean.setEndpointProperties(endpointProperties); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - Relationship relationship, - String methodName) throws PropertyServerException - { - return getNewBean(beanClass, entity, methodName); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/FileFolderConverter.java b/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/FileFolderConverter.java deleted file mode 100644 index c71bbb1bc77..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/FileFolderConverter.java +++ /dev/null @@ -1,136 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.converters; - -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.FileFolderElement; -import org.odpi.openmetadata.accessservices.datamanager.properties.FileFolderProperties; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; - -/** - * FileFolderConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) - * EntityDetail object into a FileFolderElement bean. - */ -public class FileFolderConverter extends DataManagerOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity/relationship objects - * @param serviceName name of this component - * @param serverName local server name - */ - public FileFolderConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof FileFolderElement bean) - { - FileFolderProperties fileFolderProperties = new FileFolderProperties(); - - if (entity != null) - { - bean.setElementHeader(this.getMetadataElementHeader(beanClass, entity, methodName)); - - /* - * The initial set of values come from the entity. - */ - InstanceProperties instanceProperties = new InstanceProperties(entity.getProperties()); - - fileFolderProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); - fileFolderProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); - fileFolderProperties.setName(this.removeName(instanceProperties)); - fileFolderProperties.setVersionIdentifier(this.removeVersionIdentifier(instanceProperties)); - fileFolderProperties.setDescription(this.removeDescription(instanceProperties)); - fileFolderProperties.setPathName(this.removePathName(instanceProperties)); - fileFolderProperties.setCreateTime(this.removeStoreCreateTime(instanceProperties)); - fileFolderProperties.setModifiedTime(this.removeStoreUpdateTime(instanceProperties)); - - - /* - * Any remaining properties are returned in the extended properties. They are - * assumed to be defined in a subtype. - */ - fileFolderProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); - fileFolderProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - - - instanceProperties = super.getClassificationProperties(OpenMetadataType.DATA_ASSET_ENCODING_CLASSIFICATION.typeName, entity); - - fileFolderProperties.setEncodingType(this.getDataStoreEncodingType(instanceProperties)); - fileFolderProperties.setEncodingLanguage(this.getDataStoreEncodingLanguage(instanceProperties)); - fileFolderProperties.setEncodingDescription(this.getDataStoreEncodingDescription(instanceProperties)); - fileFolderProperties.setEncodingProperties(this.getEncodingProperties(instanceProperties)); - - bean.setFileFolderProperties(fileFolderProperties); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - Relationship relationship, - String methodName) throws PropertyServerException - { - return getNewBean(beanClass, entity, methodName); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/FileSystemConverter.java b/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/FileSystemConverter.java deleted file mode 100644 index 0233fc74209..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/FileSystemConverter.java +++ /dev/null @@ -1,132 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.converters; - -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.FileSystemElement; -import org.odpi.openmetadata.accessservices.datamanager.properties.FileSystemProperties; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; - -/** - * FileSystemConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) - * EntityDetail object into a FileSystemElement bean. - */ -public class FileSystemConverter extends DataManagerOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public FileSystemConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof FileSystemElement bean) - { - FileSystemProperties fileSystemProperties = new FileSystemProperties(); - - if (entity != null) - { - bean.setElementHeader(this.getMetadataElementHeader(beanClass, entity, methodName)); - - /* - * The initial set of values come from the entity. - */ - InstanceProperties instanceProperties = new InstanceProperties(entity.getProperties()); - - fileSystemProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); - fileSystemProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); - fileSystemProperties.setDisplayName(this.removeName(instanceProperties)); - fileSystemProperties.setDescription(this.removeDescription(instanceProperties)); - fileSystemProperties.setDeployedImplementationType(this.removeCapabilityType(instanceProperties)); - fileSystemProperties.setVersion(this.removeCapabilityVersion(instanceProperties)); - fileSystemProperties.setPatchLevel(this.removePatchLevel(instanceProperties)); - fileSystemProperties.setSource(this.removeSource(instanceProperties)); - - /* - * Any remaining properties are returned in the extended properties. They are - * assumed to be defined in a subtype. - */ - fileSystemProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); - fileSystemProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - - instanceProperties = super.getClassificationProperties(OpenMetadataType.FILE_SYSTEM_CLASSIFICATION_TYPE_NAME, entity); - - fileSystemProperties.setFormat(this.getFormat(instanceProperties)); - fileSystemProperties.setEncryption(this.getEncryption(instanceProperties)); - - bean.setFileSystemProperties(fileSystemProperties); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - Relationship relationship, - String methodName) throws PropertyServerException - { - return getNewBean(beanClass, entity, methodName); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/RelatedElementConverter.java b/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/RelatedElementConverter.java deleted file mode 100644 index 052c9ffb4e0..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/RelatedElementConverter.java +++ /dev/null @@ -1,61 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.converters; - - -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - - -/** - * RelatedElementConverter generates a RelatedElement from a relationship and attached entity - */ -public class RelatedElementConverter extends DataManagerOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public RelatedElementConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - @SuppressWarnings(value="unchecked") - public B getNewBean(Class beanClass, - EntityDetail entity, - Relationship relationship, - String methodName) throws PropertyServerException - { - try - { - return (B)this.getRelatedElement(beanClass, entity, relationship, methodName); - } - catch (ClassCastException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/SchemaAttributeConverter.java b/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/SchemaAttributeConverter.java deleted file mode 100644 index 50c782c6f80..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/SchemaAttributeConverter.java +++ /dev/null @@ -1,100 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.converters; - -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.SchemaAttributeElement; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.SchemaTypeElement; -import org.odpi.openmetadata.accessservices.datamanager.properties.SchemaAttributeProperties; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; -import java.util.List; - -/** - * SchemaAttributeConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) - * EntityDetail object into a SchemaAttributeElement bean. - */ -public class SchemaAttributeConverter extends DataManagerOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public SchemaAttributeConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - /** - * Extract the properties from the schema attribute entity. Each API creates a specialization of this method for its beans. - * - * @param beanClass name of the class to create - * @param schemaAttributeEntity entity containing the properties for the main schema attribute - * @param typeClass name of type used to describe the schema type - * @param schemaType bean containing the properties of the schema type - this is filled out by the schema type converter - * @param schemaAttributeRelationships relationships containing the links to other schema attributes - * @param methodName calling method - * @param bean type used to create the schema type - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewSchemaAttributeBean(Class beanClass, - EntityDetail schemaAttributeEntity, - Class typeClass, - T schemaType, - List schemaAttributeRelationships, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - if (returnBean instanceof SchemaAttributeElement bean) - { - SchemaAttributeProperties properties = new SchemaAttributeProperties(); - - if (schemaAttributeEntity != null) - { - SchemaTypeElement schemaTypeElement = null; - - if (schemaType instanceof SchemaTypeElement) - { - schemaTypeElement = (SchemaTypeElement) schemaType; - } - - bean.setElementHeader(this.getMetadataElementHeader(beanClass, schemaAttributeEntity, methodName)); - super.setUpSchemaAttribute(schemaAttributeEntity, schemaTypeElement, properties); - - properties.setTypeName(bean.getElementHeader().getType().getTypeName()); - - bean.setProperties(properties); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/SchemaTypeConverter.java b/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/SchemaTypeConverter.java deleted file mode 100644 index aff62f5e3f7..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/SchemaTypeConverter.java +++ /dev/null @@ -1,422 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.converters; - -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.SchemaTypeElement; -import org.odpi.openmetadata.accessservices.datamanager.properties.*; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Classification; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceHeader; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; -import java.util.ArrayList; -import java.util.List; - - -/** - * SchemaTypeConverter provides common methods for transferring relevant properties from an Open Metadata Repository Services (OMRS) - * EntityDetail object into a bean that inherits from SchemaTypeElement. - */ -public class SchemaTypeConverter extends DataManagerOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public SchemaTypeConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - /** - * Return the converted bean. This is a special method used for schema types since they are stored - * as a collection of instances. For external schema types and map elements, both the GUID and the bean are returned to - * allow the consuming OMAS to choose whether it is returning GUIDs of the linked to schema or the schema type bean itself. - * - * @param beanClass name of the class to create - * @param schemaRootHeader header of the schema element that holds the root information - * @param schemaTypeTypeName name of type of the schema type to create - * @param instanceProperties properties describing the schema type - * @param schemaRootClassifications classifications from the schema root entity - * @param attributeCount number of attributes (for a complex schema type) - * @param validValueSetGUID unique identifier of the set of valid values (for an enum schema type) - * @param externalSchemaTypeGUID unique identifier of the external schema type - * @param externalSchemaType unique identifier for the properties of the schema type that is shared by multiple attributes/assets - * @param mapFromSchemaTypeGUID unique identifier of the mapFrom schema type - * @param mapFromSchemaType bean containing the properties of the schema type that is part of a map definition - * @param mapToSchemaTypeGUID unique identifier of the mapTo schema type - * @param mapToSchemaType bean containing the properties of the schema type that is part of a map definition - * @param schemaTypeOptionGUIDs list of unique identifiers for schema types that could be the type for this attribute - * @param schemaTypeOptions list of schema types that could be the type for this attribute - * @param queryTargetRelationships list of relationships to schema types that contain data values used to derive the schema type value(s) - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewSchemaTypeBean(Class beanClass, - InstanceHeader schemaRootHeader, - String schemaTypeTypeName, - InstanceProperties instanceProperties, - List schemaRootClassifications, - int attributeCount, - String validValueSetGUID, - String externalSchemaTypeGUID, - B externalSchemaType, - String mapFromSchemaTypeGUID, - B mapFromSchemaType, - String mapToSchemaTypeGUID, - B mapToSchemaType, - List schemaTypeOptionGUIDs, - List schemaTypeOptions, - List queryTargetRelationships, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof SchemaTypeElement) - { - if ((schemaRootHeader != null) && (instanceProperties != null)) - { - /* - * The schema type has different subtypes. - */ - SchemaTypeElement bean = (SchemaTypeElement)returnBean; - - bean.setElementHeader(this.getMetadataElementHeader(beanClass, schemaRootHeader, schemaRootClassifications, methodName)); - - /* - * This next piece of logic sorts out which type of schema properties to create. - */ - - if (repositoryHelper.isTypeOf(serviceName, schemaTypeTypeName, OpenMetadataType.PRIMITIVE_SCHEMA_TYPE_TYPE_NAME)) - { - bean.setSchemaTypeProperties(this.getPrimitiveSchemaType(instanceProperties)); - } - else if (repositoryHelper.isTypeOf(serviceName, schemaTypeTypeName, OpenMetadataType.LITERAL_SCHEMA_TYPE_TYPE_NAME)) - { - bean.setSchemaTypeProperties(this.getLiteralSchemaType(instanceProperties)); - } - else if (repositoryHelper.isTypeOf(serviceName, schemaTypeTypeName, OpenMetadataType.COMPLEX_SCHEMA_TYPE_TYPE_NAME)) - { - bean.setSchemaTypeProperties(this.getComplexSchemaType(instanceProperties)); - } - else if (repositoryHelper.isTypeOf(serviceName, schemaTypeTypeName, OpenMetadataType.LITERAL_SCHEMA_TYPE_TYPE_NAME)) - { - bean.setSchemaTypeProperties(this.getEnumSchemaType(instanceProperties, validValueSetGUID)); - } - else if (repositoryHelper.isTypeOf(serviceName, schemaTypeTypeName, OpenMetadataType.MAP_SCHEMA_TYPE_TYPE_NAME)) - { - bean.setSchemaTypeProperties(this.getMapSchemaType(instanceProperties)); - } - else if (repositoryHelper.isTypeOf(serviceName, schemaTypeTypeName, OpenMetadataType.SCHEMA_TYPE_CHOICE_TYPE_NAME)) - { - bean.setSchemaTypeProperties(this.getSchemaTypeChoice(instanceProperties)); - } - else if (repositoryHelper.isTypeOf(serviceName, schemaTypeTypeName, OpenMetadataType.EXTERNAL_SCHEMA_TYPE_TYPE_NAME)) - { - bean.setSchemaTypeProperties(this.getExternalSchemaType(instanceProperties)); - } - else - { - /* - * This will throw an exception - */ - super.validateInstanceType(OpenMetadataType.SCHEMA_TYPE_TYPE_NAME, - beanClass.getName(), - schemaTypeTypeName, - methodName); - } - - bean.setAttributeCount(attributeCount); - bean.setMapFromElement((SchemaTypeElement)mapFromSchemaType); - bean.setMapToElement((SchemaTypeElement)mapToSchemaType); - bean.setExternalSchemaType((SchemaTypeElement)externalSchemaType); - - if ((schemaTypeOptions != null) && (! schemaTypeOptions.isEmpty())) - { - List schemaTypeOptionBeans = new ArrayList<>(); - - for (B optionBean : schemaTypeOptions) - { - if (optionBean != null) - { - schemaTypeOptionBeans.add((SchemaTypeElement) optionBean); - } - } - - if (! schemaTypeOptionBeans.isEmpty()) - { - bean.setSchemaOptions(schemaTypeOptionBeans); - } - } - - InstanceProperties classificationProperties = - super.getClassificationProperties(OpenMetadataType.CALCULATED_VALUE_CLASSIFICATION_TYPE_NAME, - schemaRootClassifications); - - bean.setFormula(this.getFormula(classificationProperties)); - bean.setFormulaType(this.getFormulaType(classificationProperties)); - - if (queryTargetRelationships != null) - { - List queryTargets = new ArrayList<>(); - - for (Relationship relationship : queryTargetRelationships) - { - if ((relationship != null) && (relationship.getEntityTwoProxy() != null)) - { - DerivedSchemaTypeQueryTargetProperties queryTargetProperties = new DerivedSchemaTypeQueryTargetProperties(); - - queryTargetProperties.setQueryId(this.getQueryId(relationship.getProperties())); - queryTargetProperties.setQuery(this.getQuery(relationship.getProperties())); - queryTargetProperties.setQueryTargetGUID(relationship.getEntityTwoProxy().getGUID()); - - queryTargets.add(queryTargetProperties); - } - else - { - handleBadRelationship(beanClass.getName(), relationship, methodName); - } - } - if (! queryTargets.isEmpty()) - { - bean.setQueries(queryTargets); - } - } - - return returnBean; - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - } - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - /** - * Return the converted bean. - * - * @param instanceProperties properties describing the schema type - * @return bean populated with properties from the instance properties supplied - */ - private SchemaTypeProperties getLiteralSchemaType(InstanceProperties instanceProperties) - { - LiteralSchemaTypeProperties schemaType = new LiteralSchemaTypeProperties(); - - InstanceProperties propertiesCopy = new InstanceProperties(instanceProperties); - - updateBasicSchemaTypeProperties(schemaType, propertiesCopy); - - schemaType.setDataType(this.removeDataType(propertiesCopy)); - schemaType.setFixedValue(this.removeFixedValue(propertiesCopy)); - - /* - * Any remaining properties are returned in the extended properties. They are - * assumed to be defined in a subtype. - */ - schemaType.setExtendedProperties(this.getRemainingExtendedProperties(propertiesCopy)); - - return schemaType; - } - - - - /** - * Return the converted bean. - * - * @param instanceProperties properties describing the schema type - * @return bean populated with properties from the instance properties supplied - */ - private SchemaTypeProperties getPrimitiveSchemaType(InstanceProperties instanceProperties) - { - PrimitiveSchemaTypeProperties schemaType = new PrimitiveSchemaTypeProperties(); - - InstanceProperties propertiesCopy = new InstanceProperties(instanceProperties); - - updateBasicSchemaTypeProperties(schemaType, propertiesCopy); - - schemaType.setDataType(this.removeDataType(propertiesCopy)); - schemaType.setDefaultValue(this.removeDefaultValue(propertiesCopy)); - - /* - * Any remaining properties are returned in the extended properties. They are - * assumed to be defined in a subtype. - */ - schemaType.setExtendedProperties(this.getRemainingExtendedProperties(propertiesCopy)); - - return schemaType; - } - - - /** - * Return the converted bean. - * - * @param instanceProperties properties describing the schema type - * @return bean populated with properties from the instance properties supplied - */ - private SchemaTypeProperties getComplexSchemaType(InstanceProperties instanceProperties) - { - ComplexSchemaTypeProperties schemaType = new ComplexSchemaTypeProperties(); - - InstanceProperties propertiesCopy = new InstanceProperties(instanceProperties); - - updateBasicSchemaTypeProperties(schemaType, propertiesCopy); - - /* - * Any remaining properties are returned in the extended properties. They are - * assumed to be defined in a subtype. - */ - schemaType.setExtendedProperties(this.getRemainingExtendedProperties(propertiesCopy)); - - return schemaType; - } - - - /** - * Return the converted bean. - * - * @param instanceProperties properties describing the schema type - * @param validValueSetGUID unique identifier of the set of valid values (for an enum schema type) - * @return bean populated with properties from the instance properties supplied - */ - private SchemaTypeProperties getEnumSchemaType(InstanceProperties instanceProperties, - String validValueSetGUID) - { - EnumSchemaTypeProperties schemaType = new EnumSchemaTypeProperties(); - - InstanceProperties propertiesCopy = new InstanceProperties(instanceProperties); - - updateBasicSchemaTypeProperties(schemaType, propertiesCopy); - - schemaType.setDataType(this.removeDataType(propertiesCopy)); - schemaType.setDefaultValue(this.removeDefaultValue(propertiesCopy)); - schemaType.setValidValueSetGUID(validValueSetGUID); - - /* - * Any remaining properties are returned in the extended properties. They are - * assumed to be defined in a subtype. - */ - schemaType.setExtendedProperties(this.getRemainingExtendedProperties(propertiesCopy)); - - return schemaType; - } - - - /** - * Return the converted bean. - * - * @param instanceProperties properties describing the schema type - * @return bean populated with properties from the instance properties supplied - */ - private SchemaTypeProperties getSchemaTypeChoice(InstanceProperties instanceProperties) - { - SchemaTypeChoiceProperties schemaType = new SchemaTypeChoiceProperties(); - - InstanceProperties propertiesCopy = new InstanceProperties(instanceProperties); - - updateBasicSchemaTypeProperties(schemaType, propertiesCopy); - - /* - * Any remaining properties are returned in the extended properties. They are - * assumed to be defined in a subtype. - */ - schemaType.setExtendedProperties(this.getRemainingExtendedProperties(propertiesCopy)); - - return schemaType; - } - - - /** - * Return the converted bean. - * - * @param instanceProperties properties describing the schema type - * @return bean populated with properties from the instance properties supplied - */ - private SchemaTypeProperties getExternalSchemaType(InstanceProperties instanceProperties) - { - ExternalSchemaTypeProperties schemaType = new ExternalSchemaTypeProperties(); - - InstanceProperties propertiesCopy = new InstanceProperties(instanceProperties); - - updateBasicSchemaTypeProperties(schemaType, propertiesCopy); - - /* - * Any remaining properties are returned in the extended properties. They are - * assumed to be defined in a subtype. - */ - schemaType.setExtendedProperties(this.getRemainingExtendedProperties(propertiesCopy)); - - return schemaType; - } - - - /** - * Return the converted bean. - * - * @param instanceProperties properties describing the schema type - * @return bean populated with properties from the instance properties supplied - */ - private SchemaTypeProperties getMapSchemaType(InstanceProperties instanceProperties) - { - MapSchemaTypeProperties schemaType = new MapSchemaTypeProperties(); - - InstanceProperties propertiesCopy = new InstanceProperties(instanceProperties); - - updateBasicSchemaTypeProperties(schemaType, propertiesCopy); - - /* - * Any remaining properties are returned in the extended properties. They are - * assumed to be defined in a subtype. - */ - schemaType.setExtendedProperties(this.getRemainingExtendedProperties(propertiesCopy)); - - return schemaType; - } - - - /** - * Set up the properties found in every schema type. - * - * @param bean bean to fill - * @param instanceProperties properties from the entity - */ - private void updateBasicSchemaTypeProperties(SchemaTypeProperties bean, - InstanceProperties instanceProperties) - { - bean.setQualifiedName(this.removeQualifiedName(instanceProperties)); - bean.setDisplayName(this.removeDisplayName(instanceProperties)); - bean.setDescription(this.removeDescription(instanceProperties)); - bean.setIsDeprecated(this.removeIsDeprecated(instanceProperties)); - bean.setVersionNumber(this.removeVersionNumber(instanceProperties)); - bean.setAuthor(this.removeAuthor(instanceProperties)); - bean.setUsage(this.removeUsage(instanceProperties)); - bean.setEncodingStandard(this.removeEncodingStandard(instanceProperties)); - bean.setNamespace(this.removeNamespace(instanceProperties)); - bean.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/ValidValueConverter.java b/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/ValidValueConverter.java deleted file mode 100644 index 486ce580b79..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/ValidValueConverter.java +++ /dev/null @@ -1,144 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.converters; - - -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.ValidValueElement; -import org.odpi.openmetadata.accessservices.datamanager.properties.ValidValueProperties; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; - - -/** - * ValidValueConverter generates an ValidValueElement bean from an ValidValueProperties entity. - */ -public class ValidValueConverter extends DataManagerOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public ValidValueConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - - /** - * Using the supplied entity, return a new instance of the bean. This is used for most beans that have - * a one to one correspondence with the repository instances. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof ValidValueElement bean) - { - ValidValueProperties validValueProperties = new ValidValueProperties(); - - bean.setElementHeader(super.getMetadataElementHeader(beanClass, entity, methodName)); - - InstanceProperties instanceProperties; - - /* - * The initial set of values come from the entity. - */ - if (entity != null) - { - instanceProperties = new InstanceProperties(entity.getProperties()); - - validValueProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); - validValueProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); - validValueProperties.setDisplayName(this.removeName(instanceProperties)); - validValueProperties.setDescription(this.removeDescription(instanceProperties)); - validValueProperties.setCategory(this.removeCategory(instanceProperties)); - validValueProperties.setUsage(this.removeUsage(instanceProperties)); - validValueProperties.setScope(this.removeScope(instanceProperties)); - validValueProperties.setPreferredValue(this.removePreferredValue(instanceProperties)); - validValueProperties.setDataType(this.removeDataType(instanceProperties)); - validValueProperties.setIsDeprecated(this.removeIsDeprecated(instanceProperties)); - validValueProperties.setIsCaseSensitive(this.removeIsCaseSensitive(instanceProperties)); - - validValueProperties.setEffectiveFrom(instanceProperties.getEffectiveFromTime()); - validValueProperties.setEffectiveTo(instanceProperties.getEffectiveToTime()); - - /* - * Any remaining properties are returned in the extended properties. They are - * assumed to be defined in a subtype. - */ - validValueProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); - validValueProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - - bean.setValidValueProperties(validValueProperties); - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - public B getNewBean(Class beanClass, - EntityDetail entity, - Relationship relationship, - String methodName) throws PropertyServerException - { - B returnBean = this.getNewBean(beanClass, entity, methodName); - - if (returnBean instanceof ValidValueElement) - { - ValidValueElement bean = (ValidValueElement) returnBean; - - bean.setRelatedElement(super.getRelatedElement(beanClass, entity, relationship, methodName)); - } - - return returnBean; - } -} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/package-info.java b/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/package-info.java deleted file mode 100644 index 728103b7e1c..00000000000 --- a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/package-info.java +++ /dev/null @@ -1,8 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -/** - * Provides the converters that take beans from the repository services (eg entities and relationships) - * and converts them into Asset Manager OMAS beans to return to the caller. - */ -package org.odpi.openmetadata.accessservices.datamanager.converters; diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/listener/DataManagerOMRSTopicListener.java b/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/listener/DataManagerOMRSTopicListener.java index edbebfbaab5..8e8e81b9990 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/listener/DataManagerOMRSTopicListener.java +++ b/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/listener/DataManagerOMRSTopicListener.java @@ -2,7 +2,7 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.datamanager.listener; -import org.odpi.openmetadata.accessservices.datamanager.converters.DataManagerOMASConverter; +import org.odpi.openmetadata.commonservices.generichandlers.DataManagerOMASConverter; import org.odpi.openmetadata.accessservices.datamanager.events.DataManagerOutboundEventType; import org.odpi.openmetadata.accessservices.datamanager.ffdc.DataManagerAuditCode; import org.odpi.openmetadata.accessservices.datamanager.outtopic.DataManagerOutTopicPublisher; @@ -12,7 +12,7 @@ import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementStub; import org.odpi.openmetadata.repositoryservices.connectors.omrstopic.OMRSTopicListenerBase; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Classification; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/outtopic/DataManagerOutTopicPublisher.java b/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/outtopic/DataManagerOutTopicPublisher.java index 52dd07ac4a4..1b2088eae0f 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/outtopic/DataManagerOutTopicPublisher.java +++ b/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/outtopic/DataManagerOutTopicPublisher.java @@ -8,7 +8,7 @@ import org.odpi.openmetadata.accessservices.datamanager.events.DataManagerOutboundEventType; import org.odpi.openmetadata.accessservices.datamanager.ffdc.DataManagerAuditCode; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementStub; /** * DataManagerOutTopicPublisher is responsible for sending events on the Data Manager OMAS's out topic. diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/APIManagerRESTServices.java b/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/APIManagerRESTServices.java index 2ebc7f134f7..ef4a829ac24 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/APIManagerRESTServices.java +++ b/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/APIManagerRESTServices.java @@ -3,23 +3,20 @@ package org.odpi.openmetadata.accessservices.datamanager.server; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.APIElement; - -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.APIOperationElement; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.APIParameterListElement; -import org.odpi.openmetadata.accessservices.datamanager.properties.APIOperationProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.APIParameterListProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.APIParameterListType; -import org.odpi.openmetadata.accessservices.datamanager.properties.APIProperties; + +import org.odpi.openmetadata.accessservices.datamanager.rest.TemplateRequestBody; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.APIElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.APIOperationElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.APIParameterListElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.apis.APIOperationProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.apis.APIParameterListProperties; +import org.odpi.openmetadata.frameworks.openmetadata.enums.APIParameterListType; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.apis.APIProperties; import org.odpi.openmetadata.accessservices.datamanager.rest.*; import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.NullRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; import org.odpi.openmetadata.commonservices.generichandlers.AssetHandler; import org.odpi.openmetadata.commonservices.generichandlers.APIOperationHandler; import org.odpi.openmetadata.commonservices.generichandlers.APIParameterListHandler; @@ -109,8 +106,9 @@ public GUIDResponse createAPI(String serverName, handler.getExternalSourceID(apiManagerIsHome, requestBody.getExternalSourceName()), requestBody.getQualifiedName(), requestBody.getName(), + requestBody.getResourceName(), requestBody.getVersionIdentifier(), - requestBody.getDescription(), + requestBody.getResourceDescription(), requestBody.getDeployedImplementationType(), requestBody.getAdditionalProperties(), typeName, @@ -352,8 +350,9 @@ public VoidResponse updateAPI(String serverName, apiGUIDParameterName, requestBody.getQualifiedName(), requestBody.getName(), + requestBody.getResourceName(), requestBody.getVersionIdentifier(), - requestBody.getDescription(), + requestBody.getResourceDescription(), requestBody.getDeployedImplementationType(), requestBody.getAdditionalProperties(), typeName, @@ -619,7 +618,7 @@ public APIsResponse findAPIs(String serverName, /* * Set up the vendor properties in the results before setting the results in the response object. */ - response.setElementList(this.setUpVendorProperties(userId, apiElements, handler, methodName)); + response.setElements(this.setUpVendorProperties(userId, apiElements, handler, methodName)); } else { @@ -691,7 +690,7 @@ public APIsResponse getAPIsByName(String serverName, /* * Set up the vendor properties before adding results to response */ - response.setElementList(setUpVendorProperties(userId, apiElements, handler, methodName)); + response.setElements(setUpVendorProperties(userId, apiElements, handler, methodName)); } else { @@ -766,7 +765,7 @@ public APIsResponse getAPIsForAPIManager(String serverName, /* * Set up the vendor properties before adding results to response */ - response.setElementList(setUpVendorProperties(userId, apiElements, handler, methodName)); + response.setElements(setUpVendorProperties(userId, apiElements, handler, methodName)); } catch (Exception error) { @@ -833,7 +832,7 @@ public APIsResponse getAPIsByEndpoint(String serverName, /* * Set up the vendor properties before adding results to response */ - response.setElementList(setUpVendorProperties(userId, apiElements, handler, methodName)); + response.setElements(setUpVendorProperties(userId, apiElements, handler, methodName)); } catch (Exception error) { @@ -1257,7 +1256,7 @@ public APIOperationsResponse findAPIOperations(String serverNam /* * Set up the vendor properties before adding results to response */ - response.setElementList(setUpVendorProperties(userId, elements, handler, methodName)); + response.setElements(setUpVendorProperties(userId, elements, handler, methodName)); } else { @@ -1322,7 +1321,7 @@ public APIOperationsResponse getAPIOperationsForAPI(String serverName, /* * Set up the vendor properties before adding results to response */ - response.setElementList(setUpVendorProperties(userId, elements, handler, methodName)); + response.setElements(setUpVendorProperties(userId, elements, handler, methodName)); } catch (Exception error) { @@ -1385,7 +1384,7 @@ public APIOperationsResponse getAPIOperationsByName(String serverName, /* * Set up the vendor properties before adding results to response */ - response.setElementList(setUpVendorProperties(userId, elements, handler, methodName)); + response.setElements(setUpVendorProperties(userId, elements, handler, methodName)); } else { @@ -1840,7 +1839,7 @@ public APIParameterListsResponse findAPIParameterLists(String s /* * Set up the vendor properties before adding results to response */ - response.setElementList(setUpVendorProperties(userId, elements, handler, methodName)); + response.setElements(setUpVendorProperties(userId, elements, handler, methodName)); } else { @@ -1905,7 +1904,7 @@ public APIParameterListsResponse getAPIParameterListsForOperation(String serverN /* * Set up the vendor properties before adding results to response */ - response.setElementList(setUpVendorProperties(userId, elements, handler, methodName)); + response.setElements(setUpVendorProperties(userId, elements, handler, methodName)); } catch (Exception error) { @@ -1968,7 +1967,7 @@ public APIParameterListsResponse getAPIParameterListsByName(String serv /* * Set up the vendor properties before adding results to response */ - response.setElementList(setUpVendorProperties(userId, elements, handler, methodName)); + response.setElements(setUpVendorProperties(userId, elements, handler, methodName)); } else { diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/ConnectionRESTServices.java b/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/ConnectionRESTServices.java index a91bfd67da7..41b06a78da1 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/ConnectionRESTServices.java +++ b/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/ConnectionRESTServices.java @@ -3,13 +3,9 @@ package org.odpi.openmetadata.accessservices.datamanager.server; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.ConnectorTypeElement; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.EndpointElement; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.ConnectionElement; -import org.odpi.openmetadata.accessservices.datamanager.properties.ConnectorTypeProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.EndpointProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.ConnectionProperties; -import org.odpi.openmetadata.accessservices.datamanager.rest.*; + +import org.odpi.openmetadata.accessservices.datamanager.rest.TemplateRequestBody; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; @@ -25,6 +21,12 @@ import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ConnectionElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ConnectorTypeElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.EndpointElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.ConnectionProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.ConnectorTypeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.EndpointProperties; import org.slf4j.LoggerFactory; import java.util.Date; @@ -316,7 +318,7 @@ public VoidResponse setupConnectorType(String serverName, String userId, String connectionGUID, String connectorTypeGUID, - MetadataSourceRequestBody requestBody) + ExternalSourceRequestBody requestBody) { final String methodName = "setupConnectorType"; final String connectionGUIDParameterName = "connectionGUID"; @@ -383,7 +385,7 @@ public VoidResponse clearConnectorType(String serverName, String userId, String connectionGUID, String connectorTypeGUID, - MetadataSourceRequestBody requestBody) + ExternalSourceRequestBody requestBody) { final String methodName = "clearConnectorType"; final String connectionGUIDParameterName = "connectionGUID"; @@ -448,7 +450,7 @@ public VoidResponse setupEndpoint(String serverName, String userId, String connectionGUID, String endpointGUID, - MetadataSourceRequestBody requestBody) + ExternalSourceRequestBody requestBody) { final String methodName = "setupEndpoint"; final String connectionGUIDParameterName = "connectionGUID"; @@ -515,7 +517,7 @@ public VoidResponse clearEndpoint(String serverName, String userId, String connectionGUID, String endpointGUID, - MetadataSourceRequestBody requestBody) + ExternalSourceRequestBody requestBody) { final String methodName = "clearEndpoint"; final String connectionGUIDParameterName = "connectionGUID"; @@ -651,7 +653,7 @@ public VoidResponse clearEmbeddedConnection(String serverName String userId, String connectionGUID, String embeddedConnectionGUID, - MetadataSourceRequestBody requestBody) + ExternalSourceRequestBody requestBody) { final String methodName = "clearEmbeddedConnection"; final String connectionGUIDParameterName = "connectionGUID"; @@ -785,7 +787,7 @@ public VoidResponse clearAssetConnection(String serverName, String userId, String assetGUID, String connectionGUID, - MetadataSourceRequestBody requestBody) + ExternalSourceRequestBody requestBody) { final String methodName = "clearAssetConnection"; final String connectionGUIDParameterName = "connectionGUID"; @@ -849,7 +851,7 @@ public VoidResponse clearAssetConnection(String serverName, public VoidResponse removeConnection(String serverName, String userId, String connectionGUID, - MetadataSourceRequestBody requestBody) + ExternalSourceRequestBody requestBody) { final String methodName = "removeConnection"; final String connectionGUIDParameterName = "connectionGUID"; @@ -940,7 +942,7 @@ public ConnectionsResponse findConnections(String serverName, new Date(), methodName); - response.setElementList(setUpVendorProperties(userId, connections, handler, methodName)); + response.setElements(setUpVendorProperties(userId, connections, handler, methodName)); } else { @@ -1005,7 +1007,7 @@ public ConnectionsResponse getConnectionsByName(String serverName, new Date(), methodName); - response.setElementList(setUpVendorProperties(userId, connections, handler, methodName)); + response.setElements(setUpVendorProperties(userId, connections, handler, methodName)); } else { @@ -1115,8 +1117,8 @@ public GUIDResponse createEndpoint(String serverName, requestBody.getExternalSourceName(), null, requestBody.getQualifiedName(), - requestBody.getDisplayName(), - requestBody.getDescription(), + requestBody.getName(), + requestBody.getResourceDescription(), requestBody.getAddress(), requestBody.getProtocol(), requestBody.getEncryptionMethod(), @@ -1256,8 +1258,8 @@ public VoidResponse updateEndpoint(String serverName, endpointGUID, endpointGUIDParameterName, requestBody.getQualifiedName(), - requestBody.getDisplayName(), - requestBody.getDescription(), + requestBody.getName(), + requestBody.getResourceDescription(), requestBody.getAddress(), requestBody.getProtocol(), requestBody.getEncryptionMethod(), @@ -1315,7 +1317,7 @@ public VoidResponse updateEndpoint(String serverName, public VoidResponse removeEndpoint(String serverName, String userId, String endpointGUID, - MetadataSourceRequestBody requestBody) + ExternalSourceRequestBody requestBody) { final String methodName = "removeEndpoint"; final String endpointGUIDParameterName = "endpointGUID"; @@ -1406,7 +1408,7 @@ public EndpointsResponse findEndpoints(String serverName, new Date(), methodName); - response.setElementList(setUpVendorProperties(userId, elements, handler, methodName)); + response.setElements(setUpVendorProperties(userId, elements, handler, methodName)); } else { @@ -1472,7 +1474,7 @@ public EndpointsResponse getEndpointsByName(String serverName, new Date(), methodName); - response.setElementList(setUpVendorProperties(userId, elements, handler, methodName)); + response.setElements(setUpVendorProperties(userId, elements, handler, methodName)); } else { @@ -1595,7 +1597,7 @@ public ConnectorTypesResponse findConnectorTypes(String serverN new Date(), methodName); - response.setElementList(setUpVendorProperties(userId, elements, handler, methodName)); + response.setElements(setUpVendorProperties(userId, elements, handler, methodName)); } else { @@ -1660,7 +1662,7 @@ public ConnectorTypesResponse getConnectorTypesByName(String serverName new Date(), methodName); - response.setElementList(setUpVendorProperties(userId, elements, handler, methodName)); + response.setElements(setUpVendorProperties(userId, elements, handler, methodName)); } else { diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/DataManagerInstanceHandler.java b/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/DataManagerInstanceHandler.java index bde10145301..84a3fcb52e5 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/DataManagerInstanceHandler.java +++ b/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/DataManagerInstanceHandler.java @@ -2,15 +2,22 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.datamanager.server; -import org.odpi.openmetadata.accessservices.datamanager.converters.ElementStubConverter; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.*; import org.odpi.openmetadata.adminservices.configuration.registration.AccessServiceDescription; import org.odpi.openmetadata.commonservices.generichandlers.*; import org.odpi.openmetadata.commonservices.multitenant.OMASServiceInstanceHandler; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ConnectionElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ConnectorTypeElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.EndpointElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.FileSystemElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.RelatedElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.SchemaAttributeElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.SchemaTypeElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.SoftwareCapabilityElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ValidValueElement; class DataManagerInstanceHandler extends OMASServiceInstanceHandler @@ -98,15 +105,15 @@ SoftwareCapabilityHandler getSoftwareServerCapability * @throws PropertyServerException error in the requested server */ RelationalDataHandler getRelationalDataHandler(String userId, - String serverName, - String serviceOperationName) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException + DatabaseSchemaElement, + DatabaseTableElement, + DatabaseViewElement, + DatabaseColumnElement, + SchemaTypeElement> getRelationalDataHandler(String userId, + String serverName, + String serviceOperationName) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException { DataManagerServicesInstance instance = (DataManagerServicesInstance)super.getServerServiceInstance(userId, serverName, diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/DataManagerRESTServices.java b/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/DataManagerRESTServices.java index 94f05b1acff..145293ff9f2 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/DataManagerRESTServices.java +++ b/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/DataManagerRESTServices.java @@ -2,15 +2,11 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.datamanager.server; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.SoftwareCapabilityElement; -import org.odpi.openmetadata.accessservices.datamanager.rest.*; import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; - -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.ConnectionResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.SoftwareCapabilityElement; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.commonservices.generichandlers.SoftwareCapabilityHandler; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; @@ -52,16 +48,16 @@ public DataManagerRESTServices() * UserNotAuthorizedException user not authorized to issue this request or * PropertyServerException problem retrieving the discovery engine definition. */ - public ConnectionResponse getOutTopicConnection(String serverName, - String userId, - String callerId) + public OCFConnectionResponse getOutTopicConnection(String serverName, + String userId, + String callerId) { final String methodName = "getOutTopicConnection"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - ConnectionResponse response = new ConnectionResponse(); - AuditLog auditLog = null; + OCFConnectionResponse response = new OCFConnectionResponse(); + AuditLog auditLog = null; try { @@ -117,8 +113,8 @@ public GUIDResponse createFileSystemInCatalog(String serverName requestBody.getExternalSourceGUID(), requestBody.getExternalSourceName(), requestBody.getQualifiedName(), - requestBody.getDisplayName(), - requestBody.getDescription(), + requestBody.getResourceName(), + requestBody.getResourceDescription(), requestBody.getDeployedImplementationType(), requestBody.getVersion(), requestBody.getPatchLevel(), @@ -185,8 +181,8 @@ public GUIDResponse createFileManagerInCatalog(String serverNam OpenMetadataType.DATA_MANAGER.typeName, OpenMetadataType.FILE_MANAGER_CLASSIFICATION_TYPE_NAME, requestBody.getQualifiedName(), - requestBody.getDisplayName(), - requestBody.getDescription(), + requestBody.getResourceName(), + requestBody.getResourceDescription(), requestBody.getDeployedImplementationType(), requestBody.getVersion(), requestBody.getPatchLevel(), @@ -249,8 +245,8 @@ public GUIDResponse createDatabaseManagerInCatalog(String se OpenMetadataType.DATABASE_MANAGER.typeName, null, requestBody.getQualifiedName(), - requestBody.getDisplayName(), - requestBody.getDescription(), + requestBody.getResourceName(), + requestBody.getResourceDescription(), requestBody.getDeployedImplementationType(), requestBody.getVersion(), requestBody.getPatchLevel(), @@ -313,8 +309,8 @@ public GUIDResponse createAPIManagerInCatalog(String serverName, OpenMetadataType.API_MANAGER.typeName, null, requestBody.getQualifiedName(), - requestBody.getDisplayName(), - requestBody.getDescription(), + requestBody.getResourceName(), + requestBody.getResourceDescription(), requestBody.getDeployedImplementationType(), requestBody.getVersion(), requestBody.getPatchLevel(), @@ -376,8 +372,8 @@ public GUIDResponse createEventBrokerInCatalog(String serverName OpenMetadataType.EVENT_BROKER.typeName, null, requestBody.getQualifiedName(), - requestBody.getDisplayName(), - requestBody.getDescription(), + requestBody.getResourceName(), + requestBody.getResourceDescription(), requestBody.getDeployedImplementationType(), requestBody.getVersion(), requestBody.getPatchLevel(), @@ -439,8 +435,8 @@ public GUIDResponse createApplicationInCatalog(String serverName OpenMetadataType.APPLICATION.typeName, null, requestBody.getQualifiedName(), - requestBody.getDisplayName(), - requestBody.getDescription(), + requestBody.getResourceName(), + requestBody.getResourceDescription(), requestBody.getDeployedImplementationType(), requestBody.getVersion(), requestBody.getPatchLevel(), @@ -502,8 +498,8 @@ public GUIDResponse createDataProcessingEngineInCatalog(String OpenMetadataType.ENGINE.typeName, null, requestBody.getQualifiedName(), - requestBody.getDisplayName(), - requestBody.getDescription(), + requestBody.getResourceName(), + requestBody.getResourceDescription(), requestBody.getDeployedImplementationType(), requestBody.getVersion(), requestBody.getPatchLevel(), diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/DataManagerServicesInstance.java b/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/DataManagerServicesInstance.java index 93dd18957d6..7bab1c7d7db 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/DataManagerServicesInstance.java +++ b/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/DataManagerServicesInstance.java @@ -3,10 +3,7 @@ package org.odpi.openmetadata.accessservices.datamanager.server; import org.odpi.openmetadata.accessservices.datamanager.connectors.outtopic.DataManagerOutTopicClientProvider; -import org.odpi.openmetadata.accessservices.datamanager.converters.*; -import org.odpi.openmetadata.accessservices.datamanager.converters.ConnectionConverter; import org.odpi.openmetadata.accessservices.datamanager.ffdc.DataManagerErrorCode; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.*; import org.odpi.openmetadata.adminservices.configuration.registration.AccessServiceDescription; import org.odpi.openmetadata.commonservices.generichandlers.*; import org.odpi.openmetadata.commonservices.multitenant.OMASServiceInstance; @@ -14,7 +11,7 @@ import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryConnector; import java.util.List; @@ -35,9 +32,9 @@ public class DataManagerServicesInstance extends OMASServiceInstance DatabaseTableElement, DatabaseViewElement, DatabaseColumnElement, - SchemaTypeElement> relationalDataHandler; + SchemaTypeElement> relationalDataHandler; private final FilesAndFoldersHandler filesAndFoldersHandler; private final AssetHandler topicHandler; diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/DatabaseManagerRESTServices.java b/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/DatabaseManagerRESTServices.java index a8cbbe9e650..1af08e0cb3f 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/DatabaseManagerRESTServices.java +++ b/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/DatabaseManagerRESTServices.java @@ -3,20 +3,17 @@ package org.odpi.openmetadata.accessservices.datamanager.server; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.*; -import org.odpi.openmetadata.accessservices.datamanager.properties.*; -import org.odpi.openmetadata.accessservices.datamanager.rest.*; +import org.odpi.openmetadata.accessservices.datamanager.rest.TemplateRequestBody; import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.odpi.openmetadata.commonservices.generichandlers.RelationalDataHandler; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; -import org.odpi.openmetadata.frameworks.openmetadata.enums.DataItemSortOrder; -import org.odpi.openmetadata.frameworks.openmetadata.enums.KeyPattern; +import org.odpi.openmetadata.frameworks.openmetadata.enums.*; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.databases.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.databases.*; import org.slf4j.LoggerFactory; import java.util.Date; @@ -91,8 +88,9 @@ public GUIDResponse createDatabase(String serverName, requestBody.getExternalSourceName(), databaseProperties.getQualifiedName(), databaseProperties.getName(), + databaseProperties.getResourceName(), databaseProperties.getVersionIdentifier(), - databaseProperties.getDescription(), + databaseProperties.getResourceDescription(), databaseProperties.getPathName(), databaseProperties.getCreateTime(), databaseProperties.getModifiedTime(), @@ -255,8 +253,9 @@ public VoidResponse updateDatabase(String serverName, databaseGUID, databaseProperties.getQualifiedName(), databaseProperties.getName(), + databaseProperties.getResourceName(), databaseProperties.getVersionIdentifier(), - databaseProperties.getDescription(), + databaseProperties.getResourceDescription(), databaseProperties.getPathName(), databaseProperties.getCreateTime(), databaseProperties.getModifiedTime(), @@ -537,7 +536,7 @@ public DatabasesResponse findDatabases(String serverName, new Date(), methodName); - response.setElementList(databaseAssets); + response.setElements(databaseAssets); } else { @@ -605,7 +604,7 @@ public DatabasesResponse getDatabasesByName(String serverName, new Date(), methodName); - response.setElementList(databaseAssets); + response.setElements(databaseAssets); } else { @@ -673,7 +672,7 @@ public DatabasesResponse getDatabasesForDatabaseManager(String serverName, new Date(), methodName); - response.setElementList(databaseAssets); + response.setElements(databaseAssets); } catch (Exception error) { @@ -788,8 +787,9 @@ public GUIDResponse createDatabaseSchema(String serverName, requestBody.getParentGUID(), databaseSchemaProperties.getQualifiedName(), databaseSchemaProperties.getName(), + databaseSchemaProperties.getResourceName(), databaseSchemaProperties.getVersionIdentifier(), - databaseSchemaProperties.getDescription(), + databaseSchemaProperties.getResourceDescription(), databaseSchemaProperties.getDeployedImplementationType(), databaseSchemaProperties.getAdditionalProperties(), databaseSchemaProperties.getTypeName(), @@ -943,8 +943,9 @@ public VoidResponse updateDatabaseSchema(String serverName, databaseSchemaGUID, databaseSchemaProperties.getQualifiedName(), databaseSchemaProperties.getName(), + databaseSchemaProperties.getResourceName(), databaseSchemaProperties.getVersionIdentifier(), - databaseSchemaProperties.getDescription(), + databaseSchemaProperties.getResourceDescription(), databaseSchemaProperties.getDeployedImplementationType(), databaseSchemaProperties.getAdditionalProperties(), databaseSchemaProperties.getTypeName(), @@ -1215,7 +1216,7 @@ public DatabaseSchemasResponse findDatabaseSchemas(String ser new Date(), methodName); - response.setElementList(databaseSchemaAssets); + response.setElements(databaseSchemaAssets); } else { @@ -1280,7 +1281,7 @@ public DatabaseSchemasResponse getSchemasForDatabase(String serverName, new Date(), methodName); - response.setElementList(databaseSchemaAssets); + response.setElements(databaseSchemaAssets); } catch (Exception error) { @@ -1343,7 +1344,7 @@ public DatabaseSchemasResponse getDatabaseSchemasByName(String server new Date(), methodName); - response.setElementList(databaseSchemaAssets); + response.setElements(databaseSchemaAssets); } else { @@ -2009,7 +2010,7 @@ public DatabaseTablesResponse findDatabaseTables(String serve new Date(), methodName); - response.setElementList(databaseTableAttributes); + response.setElements(databaseTableAttributes); } else { @@ -2076,7 +2077,7 @@ public DatabaseTablesResponse getTablesForDatabaseAsset(String serverName, new Date(), methodName); - response.setElementList(databaseTableAttributes); + response.setElements(databaseTableAttributes); } catch (Exception error) { @@ -2139,7 +2140,7 @@ public DatabaseTablesResponse getDatabaseTablesByName(String serverNa new Date(), methodName); - response.setElementList(databaseTableAttributes); + response.setElements(databaseTableAttributes); } else { @@ -2654,7 +2655,7 @@ public DatabaseViewsResponse findDatabaseViews(String serverN new Date(), methodName); - response.setElementList(databaseViewAttributes); + response.setElements(databaseViewAttributes); } else { @@ -2721,7 +2722,7 @@ public DatabaseViewsResponse getViewsForDatabaseAsset(String serverName, new Date(), methodName); - response.setElementList(databaseViewAttributes); + response.setElements(databaseViewAttributes); } catch (Exception error) { @@ -2786,7 +2787,7 @@ public DatabaseViewsResponse getDatabaseViewsByName(String serverName new Date(), methodName); - response.setElementList(databaseViewAttributes); + response.setElements(databaseViewAttributes); } else { @@ -3314,7 +3315,7 @@ public DatabaseColumnsResponse findDatabaseColumns(String ser new Date(), methodName); - response.setElementList(databaseColumnAttributes); + response.setElements(databaseColumnAttributes); } else { @@ -3379,7 +3380,7 @@ public DatabaseColumnsResponse getColumnsForDatabaseTable(String serverName, new Date(), methodName); - response.setElementList(databaseColumnAttributes); + response.setElements(databaseColumnAttributes); } catch (Exception error) { @@ -3442,7 +3443,7 @@ public DatabaseColumnsResponse getDatabaseColumnsByName(String server new Date(), methodName); - response.setElementList(databaseColumnAttributes); + response.setElements(databaseColumnAttributes); } else { diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/DisplayApplicationRESTServices.java b/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/DisplayApplicationRESTServices.java index c79b489ed41..c17dd32386f 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/DisplayApplicationRESTServices.java +++ b/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/DisplayApplicationRESTServices.java @@ -3,22 +3,17 @@ package org.odpi.openmetadata.accessservices.datamanager.server; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.*; -import org.odpi.openmetadata.accessservices.datamanager.properties.DataContainerProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.QueryProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.ReportProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.FormProperties; -import org.odpi.openmetadata.accessservices.datamanager.rest.*; +import org.odpi.openmetadata.accessservices.datamanager.rest.TemplateRequestBody; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; +import org.odpi.openmetadata.commonservices.generichandlers.*; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.display.DataContainerProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.display.QueryProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.display.ReportProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.display.FormProperties; import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.NullRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; -import org.odpi.openmetadata.commonservices.generichandlers.AssetHandler; -import org.odpi.openmetadata.commonservices.generichandlers.DisplayDataContainerHandler; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; @@ -106,8 +101,9 @@ public GUIDResponse createForm(String serverName, handler.getExternalSourceID(applicationIsHome, requestBody.getExternalSourceName()), requestBody.getQualifiedName(), requestBody.getName(), + requestBody.getResourceName(), requestBody.getVersionIdentifier(), - requestBody.getDescription(), + requestBody.getResourceDescription(), requestBody.getDeployedImplementationType(), requestBody.getAdditionalProperties(), typeName, @@ -305,8 +301,9 @@ public VoidResponse updateForm(String serverName, formGUIDParameterName, requestBody.getQualifiedName(), requestBody.getName(), + requestBody.getResourceName(), requestBody.getVersionIdentifier(), - requestBody.getDescription(), + requestBody.getResourceDescription(), requestBody.getDeployedImplementationType(), requestBody.getAdditionalProperties(), typeName, @@ -553,7 +550,7 @@ public FormsResponse findForms(String serverName, new Date(), methodName); - response.setElementList(setUpFormVendorProperties(userId, formAssets, handler, methodName)); + response.setElements(setUpFormVendorProperties(userId, formAssets, handler, methodName)); } else { @@ -620,7 +617,7 @@ public FormsResponse getFormsByName(String serverName, new Date(), methodName); - response.setElementList(setUpFormVendorProperties(userId, formAssets, handler, methodName)); + response.setElements(setUpFormVendorProperties(userId, formAssets, handler, methodName)); } else { @@ -692,7 +689,7 @@ public FormsResponse getFormsForApplication(String serverName, new Date(), methodName); - response.setElementList(setUpFormVendorProperties(userId, formAssets, handler, methodName)); + response.setElements(setUpFormVendorProperties(userId, formAssets, handler, methodName)); } catch (Exception error) { @@ -846,8 +843,9 @@ public GUIDResponse createReport(String serverName, handler.getExternalSourceID(applicationIsHome, requestBody.getExternalSourceName()), requestBody.getQualifiedName(), requestBody.getName(), + requestBody.getResourceName(), requestBody.getVersionIdentifier(), - requestBody.getDescription(), + requestBody.getResourceDescription(), requestBody.getDeployedImplementationType(), requestBody.getAdditionalProperties(), typeName, @@ -1103,8 +1101,9 @@ public VoidResponse updateReport(String serverName, reportGUIDParameterName, requestBody.getQualifiedName(), requestBody.getName(), + requestBody.getResourceName(), requestBody.getVersionIdentifier(), - requestBody.getDescription(), + requestBody.getResourceDescription(), requestBody.getDeployedImplementationType(), requestBody.getAdditionalProperties(), typeName, @@ -1351,7 +1350,7 @@ public ReportsResponse findReports(String serverName, new Date(), methodName); - response.setElementList(setUpReportVendorProperties(userId, reportAssets, handler, methodName)); + response.setElements(setUpReportVendorProperties(userId, reportAssets, handler, methodName)); } else { @@ -1418,7 +1417,7 @@ public ReportsResponse getReportsByName(String serverName, new Date(), methodName); - response.setElementList(setUpReportVendorProperties(userId, reportAssets, handler, methodName)); + response.setElements(setUpReportVendorProperties(userId, reportAssets, handler, methodName)); } else { @@ -1490,7 +1489,7 @@ public ReportsResponse getReportsForApplication(String serverName, new Date(), methodName); - response.setElementList(setUpReportVendorProperties(userId, reportAssets, handler, methodName)); + response.setElements(setUpReportVendorProperties(userId, reportAssets, handler, methodName)); } catch (Exception error) { @@ -1602,8 +1601,9 @@ public GUIDResponse createQuery(String serverName, handler.getExternalSourceID(applicationIsHome, requestBody.getExternalSourceName()), requestBody.getQualifiedName(), requestBody.getName(), + requestBody.getResourceName(), requestBody.getVersionIdentifier(), - requestBody.getDescription(), + requestBody.getResourceDescription(), requestBody.getDeployedImplementationType(), requestBody.getAdditionalProperties(), typeName, @@ -1817,8 +1817,9 @@ public VoidResponse updateQuery(String serverName, queryGUIDParameterName, requestBody.getQualifiedName(), requestBody.getName(), + requestBody.getResourceName(), requestBody.getVersionIdentifier(), - requestBody.getDescription(), + requestBody.getResourceDescription(), requestBody.getDeployedImplementationType(), requestBody.getAdditionalProperties(), typeName, @@ -2062,7 +2063,7 @@ public QueriesResponse findQueries(String serverName, new Date(), methodName); - response.setElementList(setUpQueryVendorProperties(userId, queryAssets, handler, methodName)); + response.setElements(setUpQueryVendorProperties(userId, queryAssets, handler, methodName)); } else { @@ -2129,7 +2130,7 @@ public QueriesResponse getQueriesByName(String serverName, new Date(), methodName); - response.setElementList(setUpQueryVendorProperties(userId, queryAssets, handler, methodName)); + response.setElements(setUpQueryVendorProperties(userId, queryAssets, handler, methodName)); } else { @@ -2201,7 +2202,7 @@ public QueriesResponse getQueriesForApplication(String serverName, new Date(), methodName); - response.setElementList(setUpQueryVendorProperties(userId, queryAssets, handler, methodName)); + response.setElements(setUpQueryVendorProperties(userId, queryAssets, handler, methodName)); } catch (Exception error) { @@ -2657,7 +2658,7 @@ public DataContainersResponse findDataContainers(String serverN new Date(), methodName); - response.setElementList(setUpVendorProperties(userId, elements, handler, methodName)); + response.setElements(setUpVendorProperties(userId, elements, handler, methodName)); } else { @@ -2721,7 +2722,7 @@ public DataContainersResponse getDataContainersForParent(String serverName, new Date(), methodName); - response.setElementList(setUpVendorProperties(userId, elements, handler, methodName)); + response.setElements(setUpVendorProperties(userId, elements, handler, methodName)); } catch (Exception error) { @@ -2781,7 +2782,7 @@ public DataContainersResponse getDataContainersByName(String serverName new Date(), methodName); - response.setElementList(setUpVendorProperties(userId, elements, handler, methodName)); + response.setElements(setUpVendorProperties(userId, elements, handler, methodName)); } else { diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/EventBrokerRESTServices.java b/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/EventBrokerRESTServices.java index 7802509dba7..aad3cc05bcc 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/EventBrokerRESTServices.java +++ b/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/EventBrokerRESTServices.java @@ -3,20 +3,15 @@ package org.odpi.openmetadata.accessservices.datamanager.server; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.*; -import org.odpi.openmetadata.accessservices.datamanager.properties.EventTypeProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.TopicProperties; -import org.odpi.openmetadata.accessservices.datamanager.rest.*; +import org.odpi.openmetadata.accessservices.datamanager.rest.TemplateRequestBody; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.events.EventTypeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.topics.TopicProperties; import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.NullRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; -import org.odpi.openmetadata.commonservices.generichandlers.AssetHandler; -import org.odpi.openmetadata.commonservices.generichandlers.EventTypeHandler; +import org.odpi.openmetadata.commonservices.generichandlers.*; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; @@ -130,8 +125,9 @@ public GUIDResponse createTopic(String serverName, requestBody.getExternalSourceName(), requestBody.getQualifiedName(), requestBody.getName(), + requestBody.getResourceName(), requestBody.getVersionIdentifier(), - requestBody.getDescription(), + requestBody.getResourceDescription(), requestBody.getDeployedImplementationType(), requestBody.getAdditionalProperties(), typeName, @@ -171,8 +167,9 @@ public GUIDResponse createTopic(String serverName, null, requestBody.getQualifiedName(), requestBody.getName(), + requestBody.getResourceName(), requestBody.getVersionIdentifier(), - requestBody.getDescription(), + requestBody.getResourceDescription(), requestBody.getDeployedImplementationType(), requestBody.getAdditionalProperties(), typeName, @@ -407,8 +404,9 @@ public VoidResponse updateTopic(String serverName, topicGUIDParameterName, requestBody.getQualifiedName(), requestBody.getName(), + requestBody.getResourceName(), requestBody.getVersionIdentifier(), - requestBody.getDescription(), + requestBody.getResourceDescription(), requestBody.getDeployedImplementationType(), requestBody.getAdditionalProperties(), typeName, @@ -659,7 +657,7 @@ public TopicsResponse findTopics(String serverName, new Date(), methodName); - response.setElementList(setUpVendorProperties(userId, topicAssets, handler, methodName)); + response.setElements(setUpVendorProperties(userId, topicAssets, handler, methodName)); } else { @@ -726,7 +724,7 @@ public TopicsResponse getTopicsByName(String serverName, new Date(), methodName); - response.setElementList(setUpVendorProperties(userId, topicAssets, handler, methodName)); + response.setElements(setUpVendorProperties(userId, topicAssets, handler, methodName)); } else { @@ -798,7 +796,7 @@ public TopicsResponse getTopicsForEventBroker(String serverName, new Date(), methodName); - response.setElementList(setUpVendorProperties(userId, topicAssets, handler, methodName)); + response.setElements(setUpVendorProperties(userId, topicAssets, handler, methodName)); } catch (Exception error) { @@ -1214,7 +1212,7 @@ public EventTypesResponse findEventTypes(String serverName, methodName); setUpVendorProperties(userId, eventTypes, handler, methodName); - response.setElementList(eventTypes); + response.setElements(eventTypes); } else { @@ -1278,7 +1276,7 @@ public EventTypesResponse getEventTypesForEventSet(String serverName, methodName); setUpVendorProperties(userId, eventTypes, handler, methodName); - response.setElementList(eventTypes); + response.setElements(eventTypes); } catch (Exception error) { @@ -1336,7 +1334,7 @@ public EventTypesResponse getEventTypesForTopic(String serverName, methodName); setUpVendorProperties(userId, eventTypes, handler, methodName); - response.setElementList(eventTypes); + response.setElements(eventTypes); } catch (Exception error) { @@ -1397,7 +1395,7 @@ public EventTypesResponse getEventTypesByName(String serverName, methodName); setUpVendorProperties(userId, eventTypes, handler, methodName); - response.setElementList(eventTypes); + response.setElements(eventTypes); } else { diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/FilesRESTServices.java b/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/FilesRESTServices.java index a2e27b1fac5..2a65cdc5964 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/FilesRESTServices.java +++ b/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/FilesRESTServices.java @@ -3,16 +3,15 @@ package org.odpi.openmetadata.accessservices.datamanager.server; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.*; -import org.odpi.openmetadata.accessservices.datamanager.rest.*; +import org.odpi.openmetadata.accessservices.datamanager.rest.TemplateRequestBody; import org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler; import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDListResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.odpi.openmetadata.commonservices.generichandlers.*; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; import org.slf4j.LoggerFactory; import java.util.Date; @@ -83,7 +82,7 @@ public GUIDListResponse createFolderStructureInCatalog(String serve requestBody.getExternalSourceGUID(), requestBody.getExternalSourceName(), parentGUID, - requestBody.getFullPath(), + requestBody.getPathName(), null, null, false, @@ -120,7 +119,7 @@ public VoidResponse attachFolderToFileSystem(String serverNam String userId, String fileSystemGUID, String folderGUID, - MetadataSourceRequestBody requestBody) + ExternalSourceRequestBody requestBody) { final String methodName = "attachFolderToFileSystem"; final String fileSystemGUIDParameterName = "fileSystemGUID"; @@ -288,8 +287,9 @@ public GUIDListResponse addDataFileToCatalog(String serverName, requestBody.getExternalSourceName(), requestBody.getQualifiedName(), requestBody.getName(), + requestBody.getResourceName(), requestBody.getVersionIdentifier(), - requestBody.getDescription(), + requestBody.getResourceDescription(), pathName, requestBody.getCreateTime(), requestBody.getModifiedTime(), @@ -446,8 +446,9 @@ public VoidResponse updateDataFileInCatalog(String serverName, isMergeUpdate, requestBody.getQualifiedName(), requestBody.getName(), + requestBody.getResourceName(), requestBody.getVersionIdentifier(), - requestBody.getDescription(), + requestBody.getResourceDescription(), requestBody.getCreateTime(), requestBody.getModifiedTime(), requestBody.getEncodingType(), @@ -651,8 +652,9 @@ public GUIDListResponse addDataFolderAssetToCatalog(String server requestBody.getQualifiedName(), requestBody.getPathName(), requestBody.getName(), + requestBody.getResourceName(), requestBody.getVersionIdentifier(), - requestBody.getDescription(), + requestBody.getResourceDescription(), requestBody.getDeployedImplementationType(), requestBody.getCreateTime(), requestBody.getModifiedTime(), @@ -800,8 +802,9 @@ public VoidResponse updateDataFolderInCatalog(String serverName, isMergeUpdate, requestBody.getPathName(), requestBody.getName(), + requestBody.getResourceName(), requestBody.getVersionIdentifier(), - requestBody.getDescription(), + requestBody.getResourceDescription(), requestBody.getCreateTime(), requestBody.getModifiedTime(), requestBody.getEncodingType(), @@ -1282,7 +1285,7 @@ public FileSystemResponse getFileSystemByGUID(String serverName, false, new Date(), methodName); - response.setFileSystem(element); + response.setElement(element); } catch (Exception error) { @@ -1334,7 +1337,7 @@ public FileSystemResponse getFileSystemByUniqueName(String serverName, new Date(), methodName); - response.setFileSystem(element); + response.setElement(element); } catch (Exception error) { @@ -1481,7 +1484,7 @@ public FileFolderResponse getFolderByPathName(String serverName, instanceHandler.getFilesAndFoldersHandler(userId, serverName, methodName); FileFolderElement fileFolder = handler.getFolderByPathName(userId, - requestBody.getFullPath(), + requestBody.getPathName(), false, false, new Date(), @@ -1648,15 +1651,15 @@ public DataFilesResponse getFolderFiles(String serverName, FilesAndFoldersHandler handler = instanceHandler.getFilesAndFoldersHandler(userId, serverName, methodName); - response.setElementList(handler.getFolderFiles(userId, - folderGUID, - guidParameterName, - startingFrom, - maxPageSize, - false, - false, - new Date(), - methodName)); + response.setElements(handler.getFolderFiles(userId, + folderGUID, + guidParameterName, + startingFrom, + maxPageSize, + false, + false, + new Date(), + methodName)); } catch (Exception error) { @@ -1754,7 +1757,7 @@ public DataFileResponse getDataFileByPathName(String serverName, instanceHandler.getFilesAndFoldersHandler(userId, serverName, methodName); DataFileElement dataFile = handler.getDataFileByPathName(userId, - requestBody.getFullPath(), + requestBody.getPathName(), nameParameterName, false, false, @@ -1815,7 +1818,7 @@ public DataFilesResponse getDataFilesByPathName(String serverName, instanceHandler.getFilesAndFoldersHandler(userId, serverName, methodName); List dataFiles = handler.findDataFilesByPathName(userId, - requestBody.getFullPath(), + requestBody.getPathName(), nameParameterName, startingFrom, maxPageSize, @@ -1824,7 +1827,7 @@ public DataFilesResponse getDataFilesByPathName(String serverName, new Date(), methodName); - response.setElementList(dataFiles); + response.setElements(dataFiles); } } catch (Exception error) @@ -1876,7 +1879,7 @@ public DataFilesResponse findDataFilesByPathName(String serverName, instanceHandler.getFilesAndFoldersHandler(userId, serverName, methodName); List dataFiles = handler.findDataFilesByName(userId, - requestBody.getFullPath(), + requestBody.getPathName(), nameParameterName, startingFrom, maxPageSize, @@ -1885,7 +1888,7 @@ public DataFilesResponse findDataFilesByPathName(String serverName, new Date(), methodName); - response.setElementList(dataFiles); + response.setElements(dataFiles); } } catch (Exception error) diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/SchemaManagerRESTServices.java b/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/SchemaManagerRESTServices.java index cc5ea8cb1c6..2326ef138cf 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/SchemaManagerRESTServices.java +++ b/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/SchemaManagerRESTServices.java @@ -4,32 +4,23 @@ package org.odpi.openmetadata.accessservices.datamanager.server; -import org.odpi.openmetadata.accessservices.datamanager.converters.ElementStubConverter; import org.odpi.openmetadata.accessservices.datamanager.ffdc.DataManagerErrorCode; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.SchemaAttributeElement; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.SchemaTypeElement; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.ValidValueSetElement; -import org.odpi.openmetadata.accessservices.datamanager.properties.SchemaAttributeProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.SchemaTypeProperties; -import org.odpi.openmetadata.accessservices.datamanager.rest.*; +import org.odpi.openmetadata.accessservices.datamanager.rest.TemplateRequestBody; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; import org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler; import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; -import org.odpi.openmetadata.commonservices.generichandlers.SchemaAttributeHandler; -import org.odpi.openmetadata.commonservices.generichandlers.SchemaTypeHandler; -import org.odpi.openmetadata.commonservices.generichandlers.ValidValuesHandler; -import org.odpi.openmetadata.commonservices.generichandlers.SchemaAttributeBuilder; +import org.odpi.openmetadata.commonservices.generichandlers.*; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementStub; import org.odpi.openmetadata.frameworks.openmetadata.enums.DataItemSortOrder; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.SchemaAttributeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.SchemaTypeProperties; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; @@ -348,16 +339,16 @@ public ValidValueSetsResponse getValidValueSetByName(String serverName, { ValidValuesHandler handler = instanceHandler.getValidValuesSetHandler(userId, serverName, methodName); - response.setElementList(handler.getValidValueByName(userId, - requestBody.getName(), - nameParameterName, - startFrom, - pageSize, - false, - false, - instanceHandler.getSupportedZones(userId, serverName, methodName), - new Date(), - methodName)); + response.setElements(handler.getValidValueByName(userId, + requestBody.getName(), + nameParameterName, + startFrom, + pageSize, + false, + false, + instanceHandler.getSupportedZones(userId, serverName, methodName), + new Date(), + methodName)); } else { @@ -412,16 +403,16 @@ public ValidValueSetsResponse findValidValueSet(String serverNa { ValidValuesHandler handler = instanceHandler.getValidValuesSetHandler(userId, serverName, methodName); - response.setElementList(handler.findValidValues(userId, - requestBody.getSearchString(), - searchStringParameterName, - startFrom, - pageSize, - false, - false, - instanceHandler.getSupportedZones(userId, serverName, methodName), - new Date(), - methodName)); + response.setElements(handler.findValidValues(userId, + requestBody.getSearchString(), + searchStringParameterName, + startFrom, + pageSize, + false, + false, + instanceHandler.getSupportedZones(userId, serverName, methodName), + new Date(), + methodName)); } else { @@ -1182,7 +1173,7 @@ public SchemaTypesResponse findSchemaType(String serverName, new Date(), methodName); - response.setElementList(setUpVendorProperties(userId, results, handler, methodName)); + response.setElements(setUpVendorProperties(userId, results, handler, methodName)); } else { @@ -1300,7 +1291,7 @@ public SchemaTypesResponse getSchemaTypeByName(String serverName, new Date(), methodName); - response.setElementList(setUpVendorProperties(userId, results, handler, methodName)); + response.setElements(setUpVendorProperties(userId, results, handler, methodName)); } else { @@ -2026,7 +2017,7 @@ public SchemaAttributesResponse findSchemaAttributes(String ser new Date(), methodName); - response.setElementList(setUpVendorProperties(userId, results, handler, methodName)); + response.setElements(setUpVendorProperties(userId, results, handler, methodName)); } } catch (Exception error) @@ -2086,7 +2077,7 @@ public SchemaAttributesResponse getNestedAttributes(String serverName, new Date(), methodName); - response.setElementList(setUpVendorProperties(userId, results, handler, methodName)); + response.setElements(setUpVendorProperties(userId, results, handler, methodName)); } catch (Exception error) { @@ -2155,7 +2146,7 @@ public SchemaAttributesResponse getSchemaAttributesByName(String server new Date(), methodName); - response.setElementList(setUpVendorProperties(userId, results, handler, methodName)); + response.setElements(setUpVendorProperties(userId, results, handler, methodName)); } } else @@ -2682,7 +2673,7 @@ private SchemaAttributeElement setUpVendorProperties(String if (element != null) { - SchemaAttributeProperties properties = element.getProperties(); + SchemaAttributeProperties properties = element.getSchemaAttributeProperties(); properties.setVendorProperties(handler.getVendorProperties(userId, element.getElementHeader().getGUID(), diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/ValidValuesRESTServices.java b/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/ValidValuesRESTServices.java index 1b641ca5692..b8ca61f5f04 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/ValidValuesRESTServices.java +++ b/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/ValidValuesRESTServices.java @@ -2,31 +2,17 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.datamanager.server; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.RelatedElement; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.ValidValueElement; -import org.odpi.openmetadata.accessservices.datamanager.properties.ReferenceValueAssignmentProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.ValidValueAssignmentProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.ValidValueMembershipProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.ValidValueProperties; -import org.odpi.openmetadata.accessservices.datamanager.rest.ExternalSourceRequestBody; -import org.odpi.openmetadata.accessservices.datamanager.rest.ReferenceableRequestBody; -import org.odpi.openmetadata.accessservices.datamanager.rest.RelatedElementListResponse; -import org.odpi.openmetadata.accessservices.datamanager.rest.RelationshipRequestBody; -import org.odpi.openmetadata.accessservices.datamanager.rest.ValidValueListResponse; -import org.odpi.openmetadata.accessservices.datamanager.rest.ValidValueResponse; import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; -import org.odpi.openmetadata.commonservices.generichandlers.ReferenceableHandler; -import org.odpi.openmetadata.commonservices.generichandlers.ValidValuesHandler; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; +import org.odpi.openmetadata.commonservices.generichandlers.*; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues.*; import org.slf4j.LoggerFactory; import java.util.Date; @@ -768,7 +754,7 @@ public VoidResponse removeValidValue(String serverName, * UserNotAuthorizedException the user is not authorized to issue this request or * PropertyServerException there is a problem reported in the open metadata server(s) */ - public ValidValueListResponse findValidValues(String serverName, + public ValidValuesResponse findValidValues(String serverName, String userId, SearchStringRequestBody requestBody, int startFrom, @@ -779,7 +765,7 @@ public ValidValueListResponse findValidValues(String serverName RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - ValidValueListResponse response = new ValidValueListResponse(); + ValidValuesResponse response = new ValidValuesResponse(); AuditLog auditLog = null; try @@ -801,7 +787,7 @@ public ValidValueListResponse findValidValues(String serverName new Date(), methodName); - response.setElementList(setUpVendorProperties(userId, validValues, handler, methodName)); + response.setElements(setUpVendorProperties(userId, validValues, handler, methodName)); } else { @@ -834,7 +820,7 @@ public ValidValueListResponse findValidValues(String serverName * UserNotAuthorizedException the user is not authorized to issue this request or * PropertyServerException there is a problem reported in the open metadata server(s) */ - public ValidValueListResponse getValidValuesByName(String serverName, + public ValidValuesResponse getValidValuesByName(String serverName, String userId, NameRequestBody requestBody, int startFrom, @@ -845,7 +831,7 @@ public ValidValueListResponse getValidValuesByName(String serverName, RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - ValidValueListResponse response = new ValidValueListResponse(); + ValidValuesResponse response = new ValidValuesResponse(); AuditLog auditLog = null; try @@ -867,7 +853,7 @@ public ValidValueListResponse getValidValuesByName(String serverName, new Date(), methodName); - response.setElementList(setUpVendorProperties(userId, validValues, handler, methodName)); + response.setElements(setUpVendorProperties(userId, validValues, handler, methodName)); } else { @@ -899,7 +885,7 @@ public ValidValueListResponse getValidValuesByName(String serverName, * PropertyServerException problem accessing property server * UserNotAuthorizedException security access problem */ - public ValidValueListResponse getValidValueSetMembers(String serverName, + public ValidValuesResponse getValidValueSetMembers(String serverName, String userId, String validValueSetGUID, int startFrom, @@ -910,7 +896,7 @@ public ValidValueListResponse getValidValueSetMembers(String serverName RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - ValidValueListResponse response = new ValidValueListResponse(); + ValidValuesResponse response = new ValidValuesResponse(); AuditLog auditLog = null; try @@ -919,7 +905,7 @@ public ValidValueListResponse getValidValueSetMembers(String serverName auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - response.setElementList(handler.getValidValueSetMembers(userId, + response.setElements(handler.getValidValueSetMembers(userId, validValueSetGUID, guidParameterName, startFrom, @@ -954,7 +940,7 @@ public ValidValueListResponse getValidValueSetMembers(String serverName * PropertyServerException problem accessing property server * UserNotAuthorizedException security access problem */ - public ValidValueListResponse getSetsForValidValue(String serverName, + public ValidValuesResponse getSetsForValidValue(String serverName, String userId, String validValueGUID, int startFrom, @@ -965,7 +951,7 @@ public ValidValueListResponse getSetsForValidValue(String serverName, RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - ValidValueListResponse response = new ValidValueListResponse(); + ValidValuesResponse response = new ValidValuesResponse(); AuditLog auditLog = null; try @@ -974,7 +960,7 @@ public ValidValueListResponse getSetsForValidValue(String serverName, auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - response.setElementList(handler.getSetsForValidValue(userId, + response.setElements(handler.getSetsForValidValue(userId, validValueGUID, guidParameterName, startFrom, @@ -1062,7 +1048,7 @@ public ValidValueResponse getValidValuesForConsumer(String serverName, * PropertyServerException problem accessing property server * UserNotAuthorizedException security access problem */ - public RelatedElementListResponse getConsumersOfValidValue(String serverName, + public RelatedElementsResponse getConsumersOfValidValue(String serverName, String userId, String validValueGUID, int startFrom, @@ -1073,7 +1059,7 @@ public RelatedElementListResponse getConsumersOfValidValue(String serve RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - RelatedElementListResponse response = new RelatedElementListResponse(); + RelatedElementsResponse response = new RelatedElementsResponse(); AuditLog auditLog = null; try @@ -1082,7 +1068,7 @@ public RelatedElementListResponse getConsumersOfValidValue(String serve auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - response.setElementList(handler.getValidValueConsumers(userId, + response.setElements(handler.getValidValueConsumers(userId, validValueGUID, guidParameterName, startFrom, @@ -1116,7 +1102,7 @@ public RelatedElementListResponse getConsumersOfValidValue(String serve * UserNotAuthorizedException the user is not authorized to issue this request or * PropertyServerException there is a problem reported in the open metadata server(s) */ - public ValidValueListResponse getReferenceValues(String serverName, + public ValidValuesResponse getReferenceValues(String serverName, String userId, String elementGUID, int startFrom, @@ -1127,7 +1113,7 @@ public ValidValueListResponse getReferenceValues(String serverName, RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - ValidValueListResponse response = new ValidValueListResponse(); + ValidValuesResponse response = new ValidValuesResponse(); AuditLog auditLog = null; try @@ -1147,7 +1133,7 @@ public ValidValueListResponse getReferenceValues(String serverName, new Date(), methodName); - response.setElementList(setUpVendorProperties(userId, validValue, handler, methodName)); + response.setElements(setUpVendorProperties(userId, validValue, handler, methodName)); } catch (Exception error) { @@ -1174,7 +1160,7 @@ public ValidValueListResponse getReferenceValues(String serverName, * PropertyServerException problem accessing property server * UserNotAuthorizedException security access problem */ - public RelatedElementListResponse getAssigneesOfReferenceValue(String serverName, + public RelatedElementsResponse getAssigneesOfReferenceValue(String serverName, String userId, String validValueGUID, int startFrom, @@ -1185,7 +1171,7 @@ public RelatedElementListResponse getAssigneesOfReferenceValue(String s RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - RelatedElementListResponse response = new RelatedElementListResponse(); + RelatedElementsResponse response = new RelatedElementsResponse(); AuditLog auditLog = null; try @@ -1194,7 +1180,7 @@ public RelatedElementListResponse getAssigneesOfReferenceValue(String s auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - response.setElementList(handler.getReferenceValueAssignees(userId, + response.setElements(handler.getReferenceValueAssignees(userId, validValueGUID, guidParameterName, startFrom, @@ -1228,7 +1214,7 @@ public RelatedElementListResponse getAssigneesOfReferenceValue(String s * UserNotAuthorizedException the user is not authorized to issue this request or * PropertyServerException there is a problem reported in the open metadata server(s) */ - public ValidValueListResponse getAllValidValues(String serverName, + public ValidValuesResponse getAllValidValues(String serverName, String userId, int startFrom, int pageSize) @@ -1237,7 +1223,7 @@ public ValidValueListResponse getAllValidValues(String serverName, RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - ValidValueListResponse response = new ValidValueListResponse(); + ValidValuesResponse response = new ValidValuesResponse(); AuditLog auditLog = null; try @@ -1255,7 +1241,7 @@ public ValidValueListResponse getAllValidValues(String serverName, new Date(), methodName); - response.setElementList(setUpVendorProperties(userId, validValues, handler, methodName)); + response.setElements(setUpVendorProperties(userId, validValues, handler, methodName)); } catch (Exception error) { diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-spring/build.gradle b/open-metadata-implementation/access-services/data-manager/data-manager-spring/build.gradle index 45980e0f18c..635d84c33a1 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-spring/build.gradle +++ b/open-metadata-implementation/access-services/data-manager/data-manager-spring/build.gradle @@ -8,6 +8,7 @@ dependencies { implementation project(':open-metadata-implementation:access-services:data-manager:data-manager-server') implementation project(':open-metadata-implementation:access-services:data-manager:data-manager-api') implementation project(':open-metadata-implementation:common-services:ffdc-services') + implementation project(':open-metadata-implementation:frameworks:open-metadata-framework') implementation 'org.springframework:spring-web' implementation 'io.swagger.core.v3:swagger-annotations' compileOnly 'com.fasterxml.jackson.core:jackson-annotations' diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-spring/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/spring/APIManagerResource.java b/open-metadata-implementation/access-services/data-manager/data-manager-spring/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/spring/APIManagerResource.java index 3c1f4af8175..ca481969729 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-spring/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/spring/APIManagerResource.java +++ b/open-metadata-implementation/access-services/data-manager/data-manager-spring/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/spring/APIManagerResource.java @@ -5,14 +5,10 @@ import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.accessservices.datamanager.properties.APIParameterListType; -import org.odpi.openmetadata.accessservices.datamanager.rest.*; +import org.odpi.openmetadata.accessservices.datamanager.rest.TemplateRequestBody; import org.odpi.openmetadata.accessservices.datamanager.server.APIManagerRESTServices; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.NullRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; +import org.odpi.openmetadata.frameworks.openmetadata.enums.APIParameterListType; import org.springframework.web.bind.annotation.*; diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-spring/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/spring/ConnectionManagerResource.java b/open-metadata-implementation/access-services/data-manager/data-manager-spring/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/spring/ConnectionManagerResource.java index 97d7eb26747..ba827ec8509 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-spring/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/spring/ConnectionManagerResource.java +++ b/open-metadata-implementation/access-services/data-manager/data-manager-spring/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/spring/ConnectionManagerResource.java @@ -5,12 +5,9 @@ import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.accessservices.datamanager.rest.*; +import org.odpi.openmetadata.accessservices.datamanager.rest.TemplateRequestBody; import org.odpi.openmetadata.accessservices.datamanager.server.ConnectionRESTServices; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.springframework.web.bind.annotation.*; @@ -137,7 +134,7 @@ public VoidResponse setupConnectorType(@PathVariable String s @PathVariable String userId, @PathVariable String connectionGUID, @PathVariable String connectorTypeGUID, - @RequestBody MetadataSourceRequestBody requestBody) + @RequestBody ExternalSourceRequestBody requestBody) { return restAPI.setupConnectorType(serverName, userId, connectionGUID, connectorTypeGUID, requestBody); } @@ -163,7 +160,7 @@ public VoidResponse clearConnectorType(@PathVariable String s @PathVariable String userId, @PathVariable String connectionGUID, @PathVariable String connectorTypeGUID, - @RequestBody MetadataSourceRequestBody requestBody) + @RequestBody ExternalSourceRequestBody requestBody) { return restAPI.clearConnectorType(serverName, userId, connectionGUID, connectorTypeGUID, requestBody); } @@ -189,7 +186,7 @@ public VoidResponse setupEndpoint(@PathVariable String server @PathVariable String userId, @PathVariable String connectionGUID, @PathVariable String endpointGUID, - @RequestBody MetadataSourceRequestBody requestBody) + @RequestBody ExternalSourceRequestBody requestBody) { return restAPI.setupEndpoint(serverName, userId, connectionGUID, endpointGUID, requestBody); } @@ -215,7 +212,7 @@ public VoidResponse clearEndpoint(@PathVariable String server @PathVariable String userId, @PathVariable String connectionGUID, @PathVariable String endpointGUID, - @RequestBody MetadataSourceRequestBody requestBody) + @RequestBody ExternalSourceRequestBody requestBody) { return restAPI.clearEndpoint(serverName, userId, connectionGUID, endpointGUID, requestBody); } @@ -267,7 +264,7 @@ public VoidResponse clearEmbeddedConnection(@PathVariable String @PathVariable String userId, @PathVariable String connectionGUID, @PathVariable String embeddedConnectionGUID, - @RequestBody MetadataSourceRequestBody requestBody) + @RequestBody ExternalSourceRequestBody requestBody) { return restAPI.clearEmbeddedConnection(serverName, userId, connectionGUID, embeddedConnectionGUID, requestBody); } @@ -319,7 +316,7 @@ public VoidResponse clearAssetConnection(@PathVariable String @PathVariable String userId, @PathVariable String assetGUID, @PathVariable String connectionGUID, - @RequestBody MetadataSourceRequestBody requestBody) + @RequestBody ExternalSourceRequestBody requestBody) { return restAPI.clearAssetConnection(serverName, userId, assetGUID, connectionGUID, requestBody); } @@ -344,7 +341,7 @@ public VoidResponse clearAssetConnection(@PathVariable String public VoidResponse removeConnection(@PathVariable String serverName, @PathVariable String userId, @PathVariable String connectionGUID, - @RequestBody MetadataSourceRequestBody requestBody) + @RequestBody ExternalSourceRequestBody requestBody) { return restAPI.removeConnection(serverName, userId, connectionGUID, requestBody); } @@ -523,7 +520,7 @@ public VoidResponse updateEndpoint(@PathVariable String serverName, public VoidResponse removeEndpoint(@PathVariable String serverName, @PathVariable String userId, @PathVariable String endpointGUID, - @RequestBody MetadataSourceRequestBody requestBody) + @RequestBody ExternalSourceRequestBody requestBody) { return restAPI.removeEndpoint(serverName, userId, endpointGUID, requestBody); } diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-spring/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/spring/DataManagerOMASResource.java b/open-metadata-implementation/access-services/data-manager/data-manager-spring/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/spring/DataManagerOMASResource.java index fcb213f3ffd..61063a9bd0d 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-spring/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/spring/DataManagerOMASResource.java +++ b/open-metadata-implementation/access-services/data-manager/data-manager-spring/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/spring/DataManagerOMASResource.java @@ -4,11 +4,8 @@ import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.accessservices.datamanager.rest.*; import org.odpi.openmetadata.accessservices.datamanager.server.DataManagerRESTServices; -import org.odpi.openmetadata.commonservices.ffdc.rest.ConnectionResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.springframework.web.bind.annotation.*; /** @@ -50,9 +47,9 @@ public DataManagerOMASResource() */ @GetMapping(path = "/topics/out-topic-connection/{callerId}") - public ConnectionResponse getOutTopicConnection(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String callerId) + public OCFConnectionResponse getOutTopicConnection(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String callerId) { return restAPI.getOutTopicConnection(serverName, userId, callerId); } diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-spring/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/spring/DataManagerValidValuesResource.java b/open-metadata-implementation/access-services/data-manager/data-manager-spring/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/spring/DataManagerValidValuesResource.java index 2ca30dbd2e0..c10010815cf 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-spring/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/spring/DataManagerValidValuesResource.java +++ b/open-metadata-implementation/access-services/data-manager/data-manager-spring/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/spring/DataManagerValidValuesResource.java @@ -4,17 +4,8 @@ import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.accessservices.datamanager.rest.ExternalSourceRequestBody; -import org.odpi.openmetadata.accessservices.datamanager.rest.ReferenceableRequestBody; -import org.odpi.openmetadata.accessservices.datamanager.rest.RelatedElementListResponse; -import org.odpi.openmetadata.accessservices.datamanager.rest.RelationshipRequestBody; -import org.odpi.openmetadata.accessservices.datamanager.rest.ValidValueListResponse; -import org.odpi.openmetadata.accessservices.datamanager.rest.ValidValueResponse; import org.odpi.openmetadata.accessservices.datamanager.server.ValidValuesRESTServices; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; @@ -299,7 +290,7 @@ public VoidResponse removeValidValue(@PathVariable String ser */ @PostMapping(path = "/valid-values/by-search-string") - public ValidValueListResponse findValidValues(@PathVariable String serverName, + public ValidValuesResponse findValidValues(@PathVariable String serverName, @PathVariable String userId, @RequestParam int startFrom, @RequestParam int pageSize, @@ -326,7 +317,7 @@ public ValidValueListResponse findValidValues(@PathVariable String */ @PostMapping(path = "/valid-values/by-name") - public ValidValueListResponse getValidValuesByName(@PathVariable String serverName, + public ValidValuesResponse getValidValuesByName(@PathVariable String serverName, @PathVariable String userId, @RequestParam int startFrom, @RequestParam int pageSize, @@ -353,7 +344,7 @@ public ValidValueListResponse getValidValuesByName(@PathVariable String */ @GetMapping(path = "/valid-values/members/{validValueSetGUID}") - public ValidValueListResponse getValidValueSetMembers(@PathVariable String serverName, + public ValidValuesResponse getValidValueSetMembers(@PathVariable String serverName, @PathVariable String userId, @PathVariable String validValueSetGUID, @RequestParam int startFrom, @@ -380,7 +371,7 @@ public ValidValueListResponse getValidValueSetMembers(@PathVariable String serve */ @GetMapping(path = "/valid-values/sets/{validValueGUID}") - public ValidValueListResponse getSetsForValidValue(@PathVariable String serverName, + public ValidValuesResponse getSetsForValidValue(@PathVariable String serverName, @PathVariable String userId, @PathVariable String validValueGUID, @RequestParam int startFrom, @@ -430,7 +421,7 @@ public ValidValueResponse getValidValuesForConsumer(@PathVariable String serverN */ @GetMapping(path = "/valid-values/{validValueGUID}/consumers") - public RelatedElementListResponse getConsumersOfValidValue(@PathVariable String serverName, + public RelatedElementsResponse getConsumersOfValidValue(@PathVariable String serverName, @PathVariable String userId, @PathVariable String validValueGUID, @RequestParam int startFrom, @@ -456,7 +447,7 @@ public RelatedElementListResponse getConsumersOfValidValue(@PathVariable String */ @GetMapping(path = "/valid-values/by-reference-value-tags/{elementGUID}") - public ValidValueListResponse getReferenceValues(@PathVariable String serverName, + public ValidValuesResponse getReferenceValues(@PathVariable String serverName, @PathVariable String userId, @PathVariable String elementGUID, @RequestParam int startFrom, @@ -483,7 +474,7 @@ public ValidValueListResponse getReferenceValues(@PathVariable String serverName */ @GetMapping(path = "/valid-values/{validValueGUID}/by-reference-value-tag-assignees") - public RelatedElementListResponse getAssigneesOfReferenceValue(@PathVariable String serverName, + public RelatedElementsResponse getAssigneesOfReferenceValue(@PathVariable String serverName, @PathVariable String userId, @PathVariable String validValueGUID, @RequestParam int startFrom, @@ -509,7 +500,7 @@ public RelatedElementListResponse getAssigneesOfReferenceValue(@PathVariable Str */ @GetMapping(path = "/valid-values") - public ValidValueListResponse getAllValidValues(@PathVariable String serverName, + public ValidValuesResponse getAllValidValues(@PathVariable String serverName, @PathVariable String userId, @RequestParam int startFrom, @RequestParam int pageSize) diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-spring/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/spring/DatabaseManagerResource.java b/open-metadata-implementation/access-services/data-manager/data-manager-spring/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/spring/DatabaseManagerResource.java index f4fa150359e..7a28c856a72 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-spring/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/spring/DatabaseManagerResource.java +++ b/open-metadata-implementation/access-services/data-manager/data-manager-spring/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/spring/DatabaseManagerResource.java @@ -6,12 +6,9 @@ import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.accessservices.datamanager.rest.*; +import org.odpi.openmetadata.accessservices.datamanager.rest.TemplateRequestBody; import org.odpi.openmetadata.accessservices.datamanager.server.DatabaseManagerRESTServices; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.springframework.web.bind.annotation.*; diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-spring/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/spring/DisplayApplicationResource.java b/open-metadata-implementation/access-services/data-manager/data-manager-spring/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/spring/DisplayApplicationResource.java index 649e03704e5..4e78d45b9ba 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-spring/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/spring/DisplayApplicationResource.java +++ b/open-metadata-implementation/access-services/data-manager/data-manager-spring/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/spring/DisplayApplicationResource.java @@ -5,13 +5,9 @@ import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.accessservices.datamanager.rest.*; +import org.odpi.openmetadata.accessservices.datamanager.rest.TemplateRequestBody; import org.odpi.openmetadata.accessservices.datamanager.server.DisplayApplicationRESTServices; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.NullRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.springframework.web.bind.annotation.*; diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-spring/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/spring/EventBrokerResource.java b/open-metadata-implementation/access-services/data-manager/data-manager-spring/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/spring/EventBrokerResource.java index 9b831fe35e3..0bbc3e99dba 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-spring/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/spring/EventBrokerResource.java +++ b/open-metadata-implementation/access-services/data-manager/data-manager-spring/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/spring/EventBrokerResource.java @@ -5,13 +5,9 @@ import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.accessservices.datamanager.rest.*; +import org.odpi.openmetadata.accessservices.datamanager.rest.TemplateRequestBody; import org.odpi.openmetadata.accessservices.datamanager.server.EventBrokerRESTServices; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.NullRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.springframework.web.bind.annotation.*; @@ -63,7 +59,7 @@ public EventBrokerResource() public GUIDResponse createTopic(@PathVariable String serverName, @PathVariable String userId, @RequestParam boolean eventBrokerIsHome, - @RequestBody TopicRequestBody requestBody) + @RequestBody TopicRequestBody requestBody) { return restAPI.createTopic(serverName, userId, eventBrokerIsHome, requestBody); } diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-spring/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/spring/FilesResource.java b/open-metadata-implementation/access-services/data-manager/data-manager-spring/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/spring/FilesResource.java index 1b259b121a8..62157ddbcaa 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-spring/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/spring/FilesResource.java +++ b/open-metadata-implementation/access-services/data-manager/data-manager-spring/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/spring/FilesResource.java @@ -6,9 +6,9 @@ import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.tags.Tag; import org.odpi.openmetadata.accessservices.datamanager.rest.*; +import org.odpi.openmetadata.accessservices.datamanager.rest.TemplateRequestBody; import org.odpi.openmetadata.accessservices.datamanager.server.FilesRESTServices; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDListResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.springframework.web.bind.annotation.*; /** @@ -56,7 +56,7 @@ public FilesResource() public GUIDListResponse createFolderStructureInCatalog(@PathVariable String serverName, @PathVariable String userId, @PathVariable String parentGUID, - @RequestBody PathNameRequestBody requestBody) + @RequestBody PathNameRequestBody requestBody) { return restAPI.createFolderStructureInCatalog(serverName, userId, parentGUID, requestBody); } @@ -82,7 +82,7 @@ public VoidResponse attachFolderToFileSystem(@PathVariable Stri @PathVariable String userId, @PathVariable String fileSystemGUID, @PathVariable String folderGUID, - @RequestBody(required = false) MetadataSourceRequestBody requestBody) + @RequestBody(required = false) ExternalSourceRequestBody requestBody) { return restAPI.attachFolderToFileSystem(serverName, userId, fileSystemGUID, folderGUID, requestBody); } diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-spring/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/spring/SchemaManagerResource.java b/open-metadata-implementation/access-services/data-manager/data-manager-spring/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/spring/SchemaManagerResource.java index 2e901a9cc0a..0b497c72429 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-spring/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/spring/SchemaManagerResource.java +++ b/open-metadata-implementation/access-services/data-manager/data-manager-spring/src/main/java/org/odpi/openmetadata/accessservices/datamanager/server/spring/SchemaManagerResource.java @@ -6,12 +6,9 @@ import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.accessservices.datamanager.rest.*; +import org.odpi.openmetadata.accessservices.datamanager.rest.TemplateRequestBody; import org.odpi.openmetadata.accessservices.datamanager.server.SchemaManagerRESTServices; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.springframework.web.bind.annotation.*; @@ -59,7 +56,7 @@ public SchemaManagerResource() public GUIDResponse createPrimitiveSchemaType(@PathVariable String serverName, @PathVariable String userId, - @RequestBody PrimitiveSchemaTypeRequestBody requestBody) + @RequestBody PrimitiveSchemaTypeRequestBody requestBody) { return restAPI.createPrimitiveSchemaType(serverName, userId, requestBody); } diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-topic-connectors/build.gradle b/open-metadata-implementation/access-services/data-manager/data-manager-topic-connectors/build.gradle index 5c8d378eadf..7b719e4e500 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-topic-connectors/build.gradle +++ b/open-metadata-implementation/access-services/data-manager/data-manager-topic-connectors/build.gradle @@ -6,6 +6,7 @@ dependencies { implementation project(':open-metadata-implementation:frameworks:audit-log-framework') + implementation project(':open-metadata-implementation:frameworks:open-metadata-framework') implementation project(':open-metadata-implementation:frameworks:open-connector-framework') implementation project(':open-metadata-implementation:repository-services:repository-services-apis') implementation project(':open-metadata-implementation:access-services:data-manager:data-manager-api') diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/api/ManageCollections.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/api/ManageCollections.java index 0398568250b..0d965f1ed83 100644 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/api/ManageCollections.java +++ b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/api/ManageCollections.java @@ -3,12 +3,12 @@ package org.odpi.openmetadata.accessservices.digitalarchitecture.api; -import org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements.CollectionElement; -import org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements.CollectionMember; + import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; import org.odpi.openmetadata.frameworks.openmetadata.enums.OrderBy; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; import java.util.List; import java.util.Map; diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/api/ManageConnections.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/api/ManageConnections.java index 4fed3126b87..ef11e644161 100644 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/api/ManageConnections.java +++ b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/api/ManageConnections.java @@ -3,17 +3,12 @@ package org.odpi.openmetadata.accessservices.digitalarchitecture.api; - -import org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements.ConnectionElement; -import org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements.ConnectorTypeElement; -import org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements.EndpointElement; -import org.odpi.openmetadata.accessservices.digitalarchitecture.properties.ConnectionProperties; -import org.odpi.openmetadata.accessservices.digitalarchitecture.properties.ConnectorTypeProperties; -import org.odpi.openmetadata.accessservices.digitalarchitecture.properties.EndpointProperties; import org.odpi.openmetadata.accessservices.digitalarchitecture.properties.TemplateProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.*; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; import java.util.List; import java.util.Map; diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/api/ManageLocations.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/api/ManageLocations.java index 2a3cff9f55c..5fe33017649 100644 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/api/ManageLocations.java +++ b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/api/ManageLocations.java @@ -2,12 +2,12 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.digitalarchitecture.api; -import org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements.LocationElement; -import org.odpi.openmetadata.accessservices.digitalarchitecture.properties.LocationProperties; import org.odpi.openmetadata.accessservices.digitalarchitecture.properties.TemplateProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.LocationElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.locations.LocationProperties; import java.util.List; diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/api/ManageReferenceData.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/api/ManageReferenceData.java index b9b28de5bfd..03c7a2ae84d 100644 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/api/ManageReferenceData.java +++ b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/api/ManageReferenceData.java @@ -2,8 +2,8 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.digitalarchitecture.api; -import org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements.*; -import org.odpi.openmetadata.accessservices.digitalarchitecture.properties.ReferenceValueAssignmentProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues.ReferenceValueAssignmentProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; @@ -15,7 +15,6 @@ * ManageReferenceData provides the API operations to create and maintain lists of valid * value definitions grouped into a valid value set. Both valid value definitions and valid value sets have * the same attributes and so inherit from ValidValue where all the attributes are defined. - * * A set is just grouping of valid values. Valid value definitions and set can be nested many times in other * valid value sets. */ diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/api/ManageSubjectAreas.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/api/ManageSubjectAreas.java index f8554194bd6..620ad385119 100644 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/api/ManageSubjectAreas.java +++ b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/api/ManageSubjectAreas.java @@ -2,12 +2,12 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.digitalarchitecture.api; -import org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements.SubjectAreaElement; -import org.odpi.openmetadata.accessservices.digitalarchitecture.properties.SubjectAreaClassificationProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.SubjectAreaElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.SubjectAreaClassificationProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementStub; import java.util.List; diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/api/ManageTemplates.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/api/ManageTemplates.java index 2285085861b..7b99a4e3a4e 100644 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/api/ManageTemplates.java +++ b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/api/ManageTemplates.java @@ -5,7 +5,7 @@ import org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements.TemplateElement; -import org.odpi.openmetadata.accessservices.digitalarchitecture.properties.TemplateClassificationProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.templates.TemplateClassificationProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/events/DigitalArchitectureOutTopicEvent.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/events/DigitalArchitectureOutTopicEvent.java index 32c3f197dff..4701024ed3c 100644 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/events/DigitalArchitectureOutTopicEvent.java +++ b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/events/DigitalArchitectureOutTopicEvent.java @@ -5,7 +5,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; import java.util.Date; import java.util.Map; diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/metadataelements/CollectionElement.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/metadataelements/CollectionElement.java deleted file mode 100644 index 092c6ae8315..00000000000 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/metadataelements/CollectionElement.java +++ /dev/null @@ -1,175 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.digitalarchitecture.properties.CollectionProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * CollectionElement contains the properties and header for a collection retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class CollectionElement implements MetadataElement -{ - private ElementHeader elementHeader = null; - private CollectionProperties properties = null; - private RelatedElement relatedElement = null; - - - /** - * Default constructor - */ - public CollectionElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public CollectionElement(CollectionElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - properties = template.getProperties(); - relatedElement = template.getRelatedElement(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - @Override - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the properties of the collection. - * - * @return properties - */ - public CollectionProperties getProperties() - { - return properties; - } - - - /** - * Set up the collection properties. - * - * @param properties properties - */ - public void setProperties(CollectionProperties properties) - { - this.properties = properties; - } - - - /** - * Return details of the relationship used to retrieve this element. - * Will be null if the element was retrieved directly rather than via a relationship. - * - * @return list of element stubs - */ - public RelatedElement getRelatedElement() - { - return relatedElement; - } - - - /** - * Set up details of the relationship used to retrieve this element. - * Will be null if the element was retrieved directly rather than via a relationship. - * - * @param relatedElement relationship details - */ - public void setRelatedElement(RelatedElement relatedElement) - { - this.relatedElement = relatedElement; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "CollectionElement{" + - "elementHeader=" + elementHeader + - ", properties=" + properties + - ", relatedElement=" + relatedElement + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - CollectionElement that = (CollectionElement) objectToCompare; - return Objects.equals(elementHeader, that.elementHeader) && - Objects.equals(properties, that.properties) && - Objects.equals(relatedElement, that.relatedElement); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementHeader, properties, relatedElement); - } -} diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/metadataelements/CollectionMember.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/metadataelements/CollectionMember.java deleted file mode 100644 index e9ae474de4e..00000000000 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/metadataelements/CollectionMember.java +++ /dev/null @@ -1,222 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.digitalarchitecture.properties.ReferenceableProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -import java.util.Date; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * CollectionMember describes a member of a collection. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class CollectionMember implements MetadataElement -{ - private ElementHeader elementHeader = null; - - private Date dateAddedToCollection = null; - private String membershipRationale = null; - private ReferenceableProperties properties = null; - - - /** - * Default constructor - */ - public CollectionMember() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public CollectionMember(CollectionMember template) - { - if (template != null) - { - this.elementHeader = template.getElementHeader(); - this.dateAddedToCollection = template.getDateAddedToCollection(); - this.membershipRationale = template.getMembershipRationale(); - this.properties = template.getProperties(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - @Override - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the date that the asset was added to this collection. - * - * @return date - */ - public Date getDateAddedToCollection() - { - if (dateAddedToCollection == null) - { - return null; - } - else - { - return new Date(dateAddedToCollection.getTime()); - } - } - - - /** - * Set up the date that the asset was added to this collection. - * - * @param dateAddedToCollection date - */ - public void setDateAddedToCollection(Date dateAddedToCollection) - { - this.dateAddedToCollection = dateAddedToCollection; - } - - - /** - * Return the rationale or role of the asset in this collection. - * - * @return text - */ - public String getMembershipRationale() - { - return membershipRationale; - } - - - /** - * Set up the rationale or role of the asset in this collection. - * - * @param membershipRationale text - */ - public void setMembershipRationale(String membershipRationale) - { - this.membershipRationale = membershipRationale; - } - - - /** - * Return the properties of the element. - * - * @return properties - */ - public ReferenceableProperties getProperties() - { - return properties; - } - - - /** - * Set up the properties of the element. - * - * @param properties properties - */ - public void setProperties(ReferenceableProperties properties) - { - this.properties = properties; - } - - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "CollectionMember{" + - "elementHeader=" + elementHeader + - ", dateAddedToCollection=" + dateAddedToCollection + - ", membershipRationale='" + membershipRationale + '\'' + - ", properties=" + properties + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (! (objectToCompare instanceof CollectionMember)) - { - return false; - } - - CollectionMember that = (CollectionMember) objectToCompare; - - if (elementHeader != null ? ! elementHeader.equals(that.elementHeader) : that.elementHeader != null) - { - return false; - } - if (dateAddedToCollection != null ? ! dateAddedToCollection.equals(that.dateAddedToCollection) : that.dateAddedToCollection != null) - { - return false; - } - if (membershipRationale != null ? ! membershipRationale.equals(that.membershipRationale) : that.membershipRationale != null) - { - return false; - } - return properties != null ? properties.equals(that.properties) : that.properties == null; - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - int result = elementHeader != null ? elementHeader.hashCode() : 0; - result = 31 * result + (dateAddedToCollection != null ? dateAddedToCollection.hashCode() : 0); - result = 31 * result + (membershipRationale != null ? membershipRationale.hashCode() : 0); - result = 31 * result + (properties != null ? properties.hashCode() : 0); - return result; - } -} diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/metadataelements/ConnectionElement.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/metadataelements/ConnectionElement.java deleted file mode 100644 index 6a0f35737ef..00000000000 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/metadataelements/ConnectionElement.java +++ /dev/null @@ -1,238 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.digitalarchitecture.properties.ConnectionProperties; - -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; - -/** - * ConnectionElement contains the properties and header for a connection retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ConnectionElement implements MetadataElement -{ - private ConnectionProperties connectionProperties = null; - private ElementHeader elementHeader = null; - private ElementStub connectorType = null; - private ElementStub endpoint = null; - private List embeddedConnections = null; - - - /** - * Default constructor - */ - public ConnectionElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ConnectionElement(ConnectionElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - connectionProperties = template.getConnectionProperties(); - connectorType = template.getConnectorType(); - endpoint = template.getEndpoint(); - embeddedConnections = template.getEmbeddedConnections(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - @Override - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the properties for the connection. - * - * @return asset properties (using appropriate subclass) - */ - public ConnectionProperties getConnectionProperties() - { - return connectionProperties; - } - - - /** - * Set up the properties for the connection. - * - * @param connectionProperties asset properties - */ - public void setConnectionProperties(ConnectionProperties connectionProperties) - { - this.connectionProperties = connectionProperties; - } - - - /** - * Set up the connector type properties for this Connection. - * - * @param connectorType ConnectorType properties object - */ - public void setConnectorType(ElementStub connectorType) - { - this.connectorType = connectorType; - } - - - /** - * Returns a copy of the properties for this connection's connector type. - * A null means there is no connection type. - * - * @return connector type for the connection - */ - public ElementStub getConnectorType() - { - return connectorType; - } - - - /** - * Set up the endpoint properties for this Connection. - * - * @param endpoint Endpoint properties object - */ - public void setEndpoint(ElementStub endpoint) - { - this.endpoint = endpoint; - } - - - /** - * Returns a copy of the properties for this connection's endpoint. - * Null means no endpoint information available. - * - * @return endpoint for the connection - */ - public ElementStub getEndpoint() - { - return endpoint; - } - - - /** - * Return the list of embedded connections for this virtual connection. - * - * @return list of EmbeddedConnection objects - */ - public List getEmbeddedConnections() - { - if (embeddedConnections == null) - { - return null; - } - else if (embeddedConnections.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(embeddedConnections); - } - } - - - /** - * Set up the list of embedded connections for this virtual connection. - * - * @param embeddedConnections list of EmbeddedConnection objects - */ - public void setEmbeddedConnections(List embeddedConnections) - { - this.embeddedConnections = embeddedConnections; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ConnectionElement{" + - "connectionProperties=" + connectionProperties + - ", elementHeader=" + elementHeader + - ", connectorType=" + connectorType + - ", endpoint=" + endpoint + - ", embeddedConnections=" + embeddedConnections + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ConnectionElement that = (ConnectionElement) objectToCompare; - return Objects.equals(getConnectionProperties(), that.getConnectionProperties()) && - Objects.equals(getElementHeader(), that.getElementHeader()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementHeader, connectionProperties); - } -} diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/metadataelements/ConnectorTypeElement.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/metadataelements/ConnectorTypeElement.java deleted file mode 100644 index 31051e4559f..00000000000 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/metadataelements/ConnectorTypeElement.java +++ /dev/null @@ -1,148 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.digitalarchitecture.properties.ConnectorTypeProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * ConnectorTypeElement contains the properties and header for a connector type retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ConnectorTypeElement implements MetadataElement -{ - private ConnectorTypeProperties connectorTypeProperties = null; - private ElementHeader elementHeader = null; - - - /** - * Default constructor - */ - public ConnectorTypeElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ConnectorTypeElement(ConnectorTypeElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - connectorTypeProperties = template.getConnectorTypeProperties(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - @Override - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - - /** - * Return the properties for the connector type. - * - * @return asset properties (using appropriate subclass) - */ - public ConnectorTypeProperties getConnectorTypeProperties() - { - return connectorTypeProperties; - } - - - /** - * Set up the properties for the connector type. - * - * @param connectorTypeProperties asset properties - */ - public void setConnectorTypeProperties(ConnectorTypeProperties connectorTypeProperties) - { - this.connectorTypeProperties = connectorTypeProperties; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ConnectorTypeElement{" + - "connectorTypeProperties=" + connectorTypeProperties + - ", elementHeader=" + elementHeader + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ConnectorTypeElement that = (ConnectorTypeElement) objectToCompare; - return Objects.equals(getConnectorTypeProperties(), that.getConnectorTypeProperties()) && - Objects.equals(getElementHeader(), that.getElementHeader()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementHeader, connectorTypeProperties); - } -} diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/metadataelements/EmbeddedConnection.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/metadataelements/EmbeddedConnection.java deleted file mode 100644 index b26ddd7b921..00000000000 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/metadataelements/EmbeddedConnection.java +++ /dev/null @@ -1,212 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; - -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * The EmbeddedConnection is used within a VirtualConnection to link to the embedded connections. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class EmbeddedConnection -{ - /* - * Attributes of an embedded connection - */ - protected int position = 0; - protected String displayName = null; - protected Map arguments = null; - protected ElementStub embeddedConnection = null; - - - /** - * Default constructor - */ - public EmbeddedConnection() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template element to copy - */ - public EmbeddedConnection(EmbeddedConnection template) - { - if (template != null) - { - position = template.getPosition(); - displayName = template.getDisplayName(); - arguments = template.getArguments(); - embeddedConnection = template.getEmbeddedConnection(); - } - } - - - /** - * Return the position that this connector is in the list of embedded connectors. - * - * @return int - */ - public int getPosition() - { - return position; - } - - - /** - * Set up the position that this connector is in the list of embedded connectors. - * - * @param position int - */ - public void setPosition(int position) - { - this.position = position; - } - - - /** - * Return the printable name of the embedded connection. - * - * @return String name - */ - public String getDisplayName() - { - return displayName; - } - - - /** - * Set up the printable name of the embedded connection. - * - * @param displayName String name - */ - public void setDisplayName(String displayName) - { - this.displayName = displayName; - } - - - /** - * Return the arguments for the embedded connection. - * - * @return property map - */ - public Map getArguments() - { - if (arguments == null) - { - return null; - } - else if (arguments.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(arguments); - } - } - - - /** - * Set up the arguments for the embedded connection. - * - * @param arguments property map - */ - public void setArguments(Map arguments) - { - this.arguments = arguments; - } - - - /** - * Return the embedded connection. - * - * @return header of Connection object. - */ - public ElementStub getEmbeddedConnection() - { - return embeddedConnection; - } - - - /** - * Set up the embedded connection - * - * @param embeddedConnection header of Connection object - */ - public void setEmbeddedConnection(ElementStub embeddedConnection) - { - this.embeddedConnection = embeddedConnection; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "EmbeddedConnection{" + - "position=" + position + - ", displayName='" + displayName + '\'' + - ", arguments=" + arguments + - ", embeddedConnection=" + embeddedConnection + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - EmbeddedConnection that = (EmbeddedConnection) objectToCompare; - return position == that.position && - Objects.equals(displayName, that.displayName) && - Objects.equals(arguments, that.arguments) && - Objects.equals(embeddedConnection, that.embeddedConnection); - } - - - /** - * Create a hash code for this element type. - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(position, displayName, arguments, embeddedConnection); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/metadataelements/EndpointElement.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/metadataelements/EndpointElement.java deleted file mode 100644 index 8494c71a646..00000000000 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/metadataelements/EndpointElement.java +++ /dev/null @@ -1,147 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.digitalarchitecture.properties.EndpointProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * EndpointElement contains the properties and header for an endpoint retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class EndpointElement implements MetadataElement -{ - private EndpointProperties endpointProperties = null; - private ElementHeader elementHeader = null; - - - /** - * Default constructor - */ - public EndpointElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public EndpointElement(EndpointElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - endpointProperties = template.getEndpointProperties(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - @Override - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the properties for the endpoint. - * - * @return asset properties (using appropriate subclass) - */ - public EndpointProperties getEndpointProperties() - { - return endpointProperties; - } - - - /** - * Set up the properties for the endpoint. - * - * @param endpointProperties asset properties - */ - public void setEndpointProperties(EndpointProperties endpointProperties) - { - this.endpointProperties = endpointProperties; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "EndpointElement{" + - "endpointProperties=" + endpointProperties + - ", elementHeader=" + elementHeader + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - EndpointElement that = (EndpointElement) objectToCompare; - return Objects.equals(getEndpointProperties(), that.getEndpointProperties()) && - Objects.equals(getElementHeader(), that.getElementHeader()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementHeader, endpointProperties); - } -} diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/metadataelements/LocationElement.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/metadataelements/LocationElement.java deleted file mode 100644 index 6acba6bb0be..00000000000 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/metadataelements/LocationElement.java +++ /dev/null @@ -1,151 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.digitalarchitecture.properties.LocationProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * LocationElement contains the properties and header for a location definition retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class LocationElement implements MetadataElement -{ - private ElementHeader elementHeader = null; - private LocationProperties locationProperties = null; - - - /** - * Default constructor - */ - public LocationElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public LocationElement(LocationElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - locationProperties = template.getLocationProperties(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - @Override - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the properties for the location definition. - * - * @return properties bean - */ - public LocationProperties getLocationProperties() - { - return locationProperties; - } - - - /** - * Set up the properties for the location definition. - * - * @param locationProperties properties bean - */ - public void setLocationProperties(LocationProperties locationProperties) - { - this.locationProperties = locationProperties; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "LocationElement{" + - "elementHeader=" + elementHeader + - ", locationProperties=" + locationProperties + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - LocationElement that = (LocationElement) objectToCompare; - return Objects.equals(elementHeader, that.elementHeader) && - Objects.equals(locationProperties, that.locationProperties); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementHeader, locationProperties); - } -} diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/metadataelements/MetadataElement.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/metadataelements/MetadataElement.java deleted file mode 100644 index bc19a5384d9..00000000000 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/metadataelements/MetadataElement.java +++ /dev/null @@ -1,27 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * MetadataElement is the common interface for all metadata elements. It adds the header information that is stored with the properties. - * This includes detains of its unique identifier, type and origin. - */ -public interface MetadataElement -{ - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - ElementHeader getElementHeader(); - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - void setElementHeader(ElementHeader elementHeader); -} diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/metadataelements/ReferenceDataAssetElement.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/metadataelements/ReferenceDataAssetElement.java deleted file mode 100644 index 36db919ed94..00000000000 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/metadataelements/ReferenceDataAssetElement.java +++ /dev/null @@ -1,151 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.digitalarchitecture.properties.ReferenceDataAssetProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * ReferenceDataAssetElement contains the properties and header for a reference data asset retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ReferenceDataAssetElement implements MetadataElement -{ - private ElementHeader elementHeader = null; - private ReferenceDataAssetProperties referenceDataAssetProperties = null; - - - /** - * Default constructor - */ - public ReferenceDataAssetElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ReferenceDataAssetElement(ReferenceDataAssetElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - referenceDataAssetProperties = template.getReferenceDataAssetProperties(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - @Override - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the properties for the reference data asset. - * - * @return properties bean - */ - public ReferenceDataAssetProperties getReferenceDataAssetProperties() - { - return referenceDataAssetProperties; - } - - - /** - * Set up the properties for the reference data asset. - * - * @param referenceDataAssetProperties properties bean - */ - public void setReferenceDataAssetProperties(ReferenceDataAssetProperties referenceDataAssetProperties) - { - this.referenceDataAssetProperties = referenceDataAssetProperties; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ReferenceDataAssetElement{" + - "elementHeader=" + elementHeader + - ", referenceDataAssetProperties=" + referenceDataAssetProperties + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ReferenceDataAssetElement that = (ReferenceDataAssetElement) objectToCompare; - return Objects.equals(elementHeader, that.elementHeader) && - Objects.equals(referenceDataAssetProperties, that.referenceDataAssetProperties); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementHeader, referenceDataAssetProperties); - } -} diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/metadataelements/ReferenceValueAssignmentDefinitionElement.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/metadataelements/ReferenceValueAssignmentDefinitionElement.java deleted file mode 100644 index d94b77ff082..00000000000 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/metadataelements/ReferenceValueAssignmentDefinitionElement.java +++ /dev/null @@ -1,126 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.digitalarchitecture.properties.ReferenceValueAssignmentProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ReferenceValueAssignmentDefinitionElement describes a valid value that is being used as a tag/classifier - * for a referenceable. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ReferenceValueAssignmentDefinitionElement extends ReferenceValueAssignmentProperties -{ - private ValidValueElement validValueElement = null; - - /** - * Default constructor - */ - public ReferenceValueAssignmentDefinitionElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ReferenceValueAssignmentDefinitionElement(ReferenceValueAssignmentDefinitionElement template) - { - super(template); - - if (template != null) - { - validValueElement = template.getValidValueElement(); - } - } - - - /** - * Return the valid value bean (may be a definition or a set). - * - * @return bean - */ - public ValidValueElement getValidValueElement() - { - return validValueElement; - } - - - /** - * Set up the valid value bean (maybe a definition or a set). - * - * @param validValueElement bean - */ - public void setValidValueElement(ValidValueElement validValueElement) - { - this.validValueElement = validValueElement; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ReferenceValueAssignmentDefinitionElement{" + - "validValueElement=" + validValueElement + - ", confidence=" + getConfidence() + - ", steward='" + getSteward() + '\'' + - ", notes='" + getNotes() + '\'' + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ReferenceValueAssignmentDefinitionElement that = (ReferenceValueAssignmentDefinitionElement) objectToCompare; - return Objects.equals(validValueElement, that.validValueElement); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), validValueElement); - } -} diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/metadataelements/ReferenceValueAssignmentItemElement.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/metadataelements/ReferenceValueAssignmentItemElement.java deleted file mode 100644 index 0f341d0eb01..00000000000 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/metadataelements/ReferenceValueAssignmentItemElement.java +++ /dev/null @@ -1,127 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.digitalarchitecture.properties.ReferenceValueAssignmentProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ReferenceValueAssignmentItemElement describes a Referenceable that is using a valid values set/definition - * as a tag/classifier. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ReferenceValueAssignmentItemElement extends ReferenceValueAssignmentProperties -{ - private ReferenceableElement assignedItem = null; - - - /** - * Default constructor - */ - public ReferenceValueAssignmentItemElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ReferenceValueAssignmentItemElement(ReferenceValueAssignmentItemElement template) - { - super(template); - - if (template != null) - { - assignedItem = template.getAssignedItem(); - } - } - - - /** - * Return the referenceable bean - * - * @return bean - */ - public ReferenceableElement getAssignedItem() - { - return assignedItem; - } - - - /** - * Set up the referenceable bean - * - * @param assignedItem bean - */ - public void setAssignedItem(ReferenceableElement assignedItem) - { - this.assignedItem = assignedItem; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ReferenceValueAssignmentItemElement{" + - "consumer=" + assignedItem + - ", confidence=" + getConfidence() + - ", steward='" + getSteward() + '\'' + - ", notes='" + getNotes() + '\'' + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ReferenceValueAssignmentItemElement that = (ReferenceValueAssignmentItemElement) objectToCompare; - return Objects.equals(assignedItem, that.assignedItem); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), assignedItem); - } -} diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/metadataelements/ReferenceableElement.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/metadataelements/ReferenceableElement.java deleted file mode 100644 index 8a2332c8d05..00000000000 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/metadataelements/ReferenceableElement.java +++ /dev/null @@ -1,151 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.digitalarchitecture.properties.ReferenceableProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * ReferenceableElement contains the properties and header for a referenceable entity retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ReferenceableElement implements MetadataElement -{ - private ElementHeader elementHeader = null; - private ReferenceableProperties referenceableProperties = null; - - - /** - * Default constructor - */ - public ReferenceableElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ReferenceableElement(ReferenceableElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - referenceableProperties = template.getReferenceableProperties(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - @Override - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the properties for the referenceable. - * - * @return properties bean - */ - public ReferenceableProperties getReferenceableProperties() - { - return referenceableProperties; - } - - - /** - * Set up the properties for the referenceable. - * - * @param referenceableProperties properties bean - */ - public void setReferenceableProperties(ReferenceableProperties referenceableProperties) - { - this.referenceableProperties = referenceableProperties; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ReferenceableElement{" + - "elementHeader=" + elementHeader + - ", referenceableProperties=" + referenceableProperties + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ReferenceableElement that = (ReferenceableElement) objectToCompare; - return Objects.equals(elementHeader, that.elementHeader) && - Objects.equals(referenceableProperties, that.referenceableProperties); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementHeader, referenceableProperties); - } -} diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/metadataelements/RelatedElement.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/metadataelements/RelatedElement.java deleted file mode 100644 index 9e09d216726..00000000000 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/metadataelements/RelatedElement.java +++ /dev/null @@ -1,172 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.digitalarchitecture.properties.RelationshipProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * RelatedElement contains the properties and header for a relationship retrieved from the metadata repository along with the stub - * of the related element. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class RelatedElement -{ - private ElementHeader relationshipHeader = null; - private RelationshipProperties relationshipProperties = null; - private ElementStub relatedElement = null; - - /** - * Default constructor - */ - public RelatedElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public RelatedElement(RelatedElement template) - { - if (template != null) - { - relationshipHeader = template.getRelationshipHeader(); - relationshipProperties = template.getRelationshipProperties(); - relatedElement = template.getRelatedElement(); - } - } - - - /** - * Return the element header associated with the relationship. - * - * @return element header object - */ - public ElementHeader getRelationshipHeader() - { - return relationshipHeader; - } - - - /** - * Set up the element header associated with the relationship. - * - * @param relationshipHeader element header object - */ - public void setRelationshipHeader(ElementHeader relationshipHeader) - { - this.relationshipHeader = relationshipHeader; - } - - - /** - * Return details of the relationship - * - * @return relationship properties - */ - public RelationshipProperties getRelationshipProperties() - { - return relationshipProperties; - } - - - /** - * Set up relationship properties - * - * @param relationshipProperties relationship properties - */ - public void setRelationshipProperties(RelationshipProperties relationshipProperties) - { - this.relationshipProperties = relationshipProperties; - } - - - /** - * Return the element header associated with end 1 of the relationship. - * - * @return element stub object - */ - public ElementStub getRelatedElement() - { - return relatedElement; - } - - - /** - * Set up the element header associated with end 1 of the relationship. - * - * @param relatedElement element stub object - */ - public void setRelatedElement(ElementStub relatedElement) - { - this.relatedElement = relatedElement; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "RelatedElement{" + - "relationshipHeader=" + relationshipHeader + - ", relationshipProperties=" + relationshipProperties + - ", relatedElement=" + relatedElement + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - RelatedElement that = (RelatedElement) objectToCompare; - return Objects.equals(getRelationshipHeader(), that.getRelationshipHeader()) && - Objects.equals(getRelationshipProperties(), that.getRelationshipProperties()) && - Objects.equals(getRelatedElement(), that.getRelatedElement()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), relationshipHeader, relationshipProperties, relatedElement); - } -} diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/metadataelements/SubjectAreaElement.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/metadataelements/SubjectAreaElement.java deleted file mode 100644 index a8f63831191..00000000000 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/metadataelements/SubjectAreaElement.java +++ /dev/null @@ -1,227 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.digitalarchitecture.properties.SubjectAreaProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; - -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * SubjectAreaElement is the bean used to return a subject area definition stored in the open metadata repositories. - * It includes links to related subject areas and the governance definitions associated with the subject areas. - * More information about the governance definitions can be retrieved through the Governance Program OMAS. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class SubjectAreaElement implements MetadataElement -{ - private ElementHeader elementHeader = null; - private SubjectAreaProperties properties = null; - private String parentSubjectAreaGUID = null; - private List nestedSubjectAreaGUIDs = null; - private List associatedGovernanceDefinitions = null; - - - /** - * Default constructor - */ - public SubjectAreaElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public SubjectAreaElement(SubjectAreaElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - properties = template.getProperties(); - parentSubjectAreaGUID = template.getParentSubjectAreaGUID(); - nestedSubjectAreaGUIDs = template.getNestedSubjectAreaGUIDs(); - associatedGovernanceDefinitions = template.getAssociatedGovernanceDefinitions(); } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the properties of the subject area. - * - * @return properties bean - */ - public SubjectAreaProperties getProperties() - { - return properties; - } - - - /** - * Set up the properties of the subject area. - * - * @param properties properties bean - */ - public void setProperties(SubjectAreaProperties properties) - { - this.properties = properties; - } - - - /** - * Return the unique identifier of the subject area that this zone inherits governance definitions from. - * - * @return string guid - */ - public String getParentSubjectAreaGUID() - { - return parentSubjectAreaGUID; - } - - - /** - * Set up the unique identifier of the subject area that this zone inherits governance definitions from. - * - * @param parentSubjectAreaGUID string guid - */ - public void setParentSubjectAreaGUID(String parentSubjectAreaGUID) - { - this.parentSubjectAreaGUID = parentSubjectAreaGUID; - } - - - /** - * Return the list of unique identifiers of the subject areas that inherit governance definitions from this zone. - * - * @return list of string guids - */ - public List getNestedSubjectAreaGUIDs() - { - return nestedSubjectAreaGUIDs; - } - - - /** - * Set up the list of unique identifiers of the subject areas that inherit governance definitions from this zone. - * - * @param nestedSubjectAreaGUIDs list of string guids - */ - public void setNestedSubjectAreaGUIDs(List nestedSubjectAreaGUIDs) - { - this.nestedSubjectAreaGUIDs = nestedSubjectAreaGUIDs; - } - - - /** - * Return the list of the governance definitions that control assets in this zone. - * - * @return list of definitions - */ - public List getAssociatedGovernanceDefinitions() - { - return associatedGovernanceDefinitions; - } - - - /** - * Set up the list of the governance definitions that control assets in this zone. - * - * @param associatedGovernanceDefinitions list of definitions - */ - public void setAssociatedGovernanceDefinitions(List associatedGovernanceDefinitions) - { - this.associatedGovernanceDefinitions = associatedGovernanceDefinitions; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "SubjectAreaElement{" + - "elementHeader=" + elementHeader + - ", properties=" + properties + - ", parentSubjectAreaGUID='" + parentSubjectAreaGUID + '\'' + - ", nestedSubjectAreaGUIDs=" + nestedSubjectAreaGUIDs + - ", associatedGovernanceDefinitions=" + associatedGovernanceDefinitions + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (! (objectToCompare instanceof SubjectAreaElement)) - { - return false; - } - SubjectAreaElement that = (SubjectAreaElement) objectToCompare; - return Objects.equals(elementHeader, that.elementHeader) && - Objects.equals(properties, that.properties) && - Objects.equals(parentSubjectAreaGUID, that.parentSubjectAreaGUID) && - Objects.equals(nestedSubjectAreaGUIDs, that.nestedSubjectAreaGUIDs) && - Objects.equals(associatedGovernanceDefinitions, that.associatedGovernanceDefinitions); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementHeader, properties); - } -} diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/metadataelements/TemplateElement.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/metadataelements/TemplateElement.java index 71c5117feac..6ee8bd5384f 100644 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/metadataelements/TemplateElement.java +++ b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/metadataelements/TemplateElement.java @@ -6,7 +6,6 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; import org.odpi.openmetadata.frameworks.governanceaction.properties.OpenMetadataElement; import java.util.List; diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/metadataelements/ValidValueElement.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/metadataelements/ValidValueElement.java deleted file mode 100644 index 1fc9dffc301..00000000000 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/metadataelements/ValidValueElement.java +++ /dev/null @@ -1,196 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.digitalarchitecture.properties.ValidValueProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * ValidValueElement contains the properties and header for a valid value definition or set entity retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ValidValueElement implements MetadataElement -{ - private ElementHeader elementHeader = null; - private ValidValueProperties validValueProperties = null; - private String setGUID = null; - private boolean isDefaultValue = false; - - - /** - * Default constructor - */ - public ValidValueElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ValidValueElement(ValidValueElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - validValueProperties = template.getValidValueProperties(); - setGUID = template.setGUID; - isDefaultValue = getIsDefaultValue(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - @Override - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the properties for the valid value definition or set. - * - * @return properties bean - */ - public ValidValueProperties getValidValueProperties() - { - return validValueProperties; - } - - - /** - * Set up the properties for the valid value definition or set. - * - * @param validValueProperties properties bean - */ - public void setValidValueProperties(ValidValueProperties validValueProperties) - { - this.validValueProperties = validValueProperties; - } - - - /** - * Return the set unique identifier if the valid value is retrieved via a set. - * - * @return string identifier - */ - public String getSetGUID() - { - return setGUID; - } - - - /** - * Set up the set unique identifier if the valid value is retrieved via a set. - * - * @param setGUID string identifier - */ - public void setSetGUID(String setGUID) - { - this.setGUID = setGUID; - } - - - /** - * Return whether this valid value is the default of the setGUID (if supplied) - * @return flag - */ - public boolean getIsDefaultValue() - { - return isDefaultValue; - } - - - /** - * Set up whether this valid value is the default of the setGUID (if supplied). - * - * @param defaultValue flag - */ - public void setIsDefaultValue(boolean defaultValue) - { - isDefaultValue = defaultValue; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ValidValueElement{" + - "elementHeader=" + elementHeader + - ", validValueProperties=" + validValueProperties + - ", setGUID='" + setGUID + '\'' + - ", isDefaultValue=" + isDefaultValue + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ValidValueElement that = (ValidValueElement) objectToCompare; - return isDefaultValue == that.isDefaultValue && Objects.equals(elementHeader, that.elementHeader) && Objects.equals( - validValueProperties, that.validValueProperties) && Objects.equals(setGUID, that.setGUID); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementHeader, validValueProperties, setGUID, isDefaultValue); - } -} diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/properties/ClassificationProperties.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/properties/ClassificationProperties.java deleted file mode 100644 index 3c7d8043967..00000000000 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/properties/ClassificationProperties.java +++ /dev/null @@ -1,194 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalarchitecture.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; - -import java.util.Date; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ClassificationProperties provides the base class for classification items. This provides extended properties with the ability to - * set effectivity dates. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes( - { - @JsonSubTypes.Type(value = SubjectAreaClassificationProperties.class, name = "SubjectAreaClassificationProperties"), - }) -public class ClassificationProperties -{ - private Date effectiveFrom = null; - private Date effectiveTo = null; - - private Map extendedProperties = null; - - - /** - * Default constructor - */ - public ClassificationProperties() - { - super(); - } - - - /** - * Copy/clone constructor. Retrieve values from the supplied template - * - * @param template element to copy - */ - public ClassificationProperties(ClassificationProperties template) - { - if (template != null) - { - effectiveFrom = template.getEffectiveFrom(); - effectiveTo = template.getEffectiveTo(); - extendedProperties = template.getExtendedProperties(); - } - } - - - /** - * Return the date/time that this element is effective from (null means effective from the epoch). - * - * @return date object - */ - public Date getEffectiveFrom() - { - return effectiveFrom; - } - - - /** - * Set up the date/time that this element is effective from (null means effective from the epoch). - * - * @param effectiveFrom date object - */ - public void setEffectiveFrom(Date effectiveFrom) - { - this.effectiveFrom = effectiveFrom; - } - - - /** - * Return the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @return date object - */ - public Date getEffectiveTo() - { - return effectiveTo; - } - - - /** - * Set the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @param effectiveTo date object - */ - public void setEffectiveTo(Date effectiveTo) - { - this.effectiveTo = effectiveTo; - } - - - /** - * Return the properties that have been defined for a subtype of this object that are not supported explicitly - * by this bean. - * - * @return property map - */ - public Map getExtendedProperties() - { - if (extendedProperties == null) - { - return null; - } - else if (extendedProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(extendedProperties); - } - } - - - /** - * Set up the properties that have been defined for a subtype of this object that are not supported explicitly - * by this bean. - * - * @param extendedProperties property map - */ - public void setExtendedProperties(Map extendedProperties) - { - this.extendedProperties = extendedProperties; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "ClassificationProperties{" + - "effectiveFrom=" + effectiveFrom + - ", effectiveTo=" + effectiveTo + - ", extendedProperties=" + extendedProperties + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ClassificationProperties that = (ClassificationProperties) objectToCompare; - return Objects.equals(effectiveFrom, that.effectiveFrom) && - Objects.equals(effectiveTo, that.effectiveTo); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(effectiveFrom, effectiveTo); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/properties/CollectionMemberStatus.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/properties/CollectionMemberStatus.java deleted file mode 100644 index 563f723c935..00000000000 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/properties/CollectionMemberStatus.java +++ /dev/null @@ -1,151 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalarchitecture.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * CollectionMemberStatus specifies the the status of the member in a collection. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public enum CollectionMemberStatus -{ - /** - * The status of the member is not known or not specified. This is the default value. - */ - UNKNOWN (0, 0, "Unknown", "The status of the member is not known or not specified. This is the default value."), - - /** - * The member was added by a discovery process. - */ - DISCOVERED (1, 1, "Discovered", "The member was added by a discovery process."), - - /** - * The member was proposed by a consumer. - */ - PROPOSED (2, 2, "Proposed", "The member was proposed by a consumer."), - - /** - * The member was imported from another system. - */ - IMPORTED (3, 3, "Imported", "The member was imported from another system."), - - /** - * The member has been validated by a custodian/steward/approver and can be trusted. - */ - VALIDATED (4, 4, "Validated", "The member has been validated by a custodian/steward/approver and can be trusted."), - - /** - * The membership has been deprecated. Consider stopping using it. - */ - DEPRECATED (5, 5, "Deprecated", "The membership has been deprecated. Consider stopping using it."), - - /** - * The membership is obsolete and should not be used. - */ - OBSOLETE (6, 6, "Obsolete", "The membership is obsolete and should not be used."), - - /** - * The membership has a different status not covered by the open metadata types. - */ - OTHER (99, 99, "Other", "The membership has a different status not covered by the open metadata types."); - - private static final String ENUM_TYPE_GUID = "a3bdb2ac-c28e-4e5a-8ab7-76aa01038832"; - private static final String ENUM_TYPE_NAME = "MembershipStatus"; - - private final int openTypeOrdinal; - - private final int ordinal; - private final String name; - private final String description; - - - /** - * Default constructor for the enumeration. - * - * @param ordinal numerical representation of the enumeration - * @param openTypeOrdinal code number from the equivalent Enum Type - * @param name default string name of the enumeration - * @param description default string description of the enumeration - */ - CollectionMemberStatus(int ordinal, - int openTypeOrdinal, - String name, - String description) - { - this.ordinal = ordinal; - this.openTypeOrdinal = openTypeOrdinal; - this.name = name; - this.description = description; - } - - - /** - * Return the numeric representation of the enumeration. - * - * @return int ordinal - */ - public int getOrdinal() { return ordinal; } - - - /** - * Return the default name of the enumeration. - * - * @return String name - */ - public String getName() { return name; } - - - /** - * Return the default description of the enumeration. - * - * @return String description - */ - public String getDescription() { return description; } - - - /** - * Return the code for this enum that comes from the Open Metadata Type that this enum represents. - * - * @return int code number - */ - public int getOpenTypeOrdinal() - { - return openTypeOrdinal; - } - - - /** - * Return the unique identifier for the open metadata enum type that this enum class represents. - * - * @return string guid - */ - public String getOpenTypeGUID() { return ENUM_TYPE_GUID; } - - - /** - * Return the unique name for the open metadata enum type that this enum class represents. - * - * @return string name - */ - public String getOpenTypeName() { return ENUM_TYPE_NAME; } - - - /** - * toString() JSON-style - * - * @return string description - */ - @Override - public String toString() - { - return "CollectionMemberStatus : " + name; - } -} diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/properties/CollectionMembershipProperties.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/properties/CollectionMembershipProperties.java deleted file mode 100644 index 83bd2b66ed0..00000000000 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/properties/CollectionMembershipProperties.java +++ /dev/null @@ -1,392 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalarchitecture.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * CollectionMember describes a member of a collection. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class CollectionMembershipProperties extends RelationshipProperties -{ - private String membershipRationale = null; - private String createdBy = null; - private String expression = null; - private int confidence = 0; - private CollectionMemberStatus status = null; - private String userDefinedStatus = null; - private String steward = null; - private String stewardTypeName = null; - private String stewardPropertyName = null; - private String source = null; - private String notes = null; - - - - /** - * Default constructor - */ - public CollectionMembershipProperties() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public CollectionMembershipProperties(CollectionMembershipProperties template) - { - super(template); - - if (template != null) - { - membershipRationale = template.getMembershipRationale(); - createdBy = template.getCreatedBy(); - confidence = template.getConfidence(); - expression = template.getExpression(); - status = template.getStatus(); - userDefinedStatus = template.getUserDefinedStatus(); - source = template.getSource(); - steward = template.getSteward(); - stewardTypeName = template.getStewardTypeName(); - stewardPropertyName = template.getStewardPropertyName(); - notes = template.getNotes(); - } - } - - - /** - * Return the rationale or role of the asset in this collection. - * - * @return text - */ - public String getMembershipRationale() - { - return membershipRationale; - } - - - /** - * Set up the rationale or role of the asset in this collection. - * - * @param membershipRationale text - */ - public void setMembershipRationale(String membershipRationale) - { - this.membershipRationale = membershipRationale; - } - - - /** - * Return the identifier of the person/process that created this membership. The userId of the creator - * is automatically captured. This field can be used to add additional information about the creator. - * For example, this could be the identifier of a process instance that created the membership relationship. - * - * @return string - */ - public String getCreatedBy() - { - return createdBy; - } - - - /** - * Set up the identifier of the person/process that created this membership. The userId of the creator - * is automatically captured. This field can be used to add additional information about the creator. - * For example, this could be the identifier of a process instance that created the membership relationship. - * - * @param createdBy string - */ - public void setCreatedBy(String createdBy) - { - this.createdBy = createdBy; - } - - - /** - * Return the expression used to determine the membership. This is used by automated processes that are determining - * membership through one or more matching algorithms. This string helps the steward understand the type of match made. - * - * @return string - */ - public String getExpression() - { - return expression; - } - - /** - * Set up the expression used to determine the membership. This is used by automated processes that are determining - * membership through one or more matching algorithms. This string helps the steward understand the type of match made. - * - * @param expression string - */ - public void setExpression(String expression) - { - this.expression = expression; - } - - - /** - * Return the confidence level (0-100) that the matching is correct. - * - * @return int - */ - public int getConfidence() - { - return confidence; - } - - - /** - * Set up the confidence level (0-100) that the matching is correct. - * - * @param confidence int - */ - public void setConfidence(int confidence) - { - this.confidence = confidence; - } - - - /** - * Return the status of the membership in the collection. - * - * @return enum - */ - public CollectionMemberStatus getStatus() - { - return status; - } - - - /** - * Set up the status of the membership in the collection. - * - * @param status enum - */ - public void setStatus(CollectionMemberStatus status) - { - this.status = status; - } - - - /** - * Return the status of the membership in the collection. This status is controlled by the local deployment. - * - * @return string - */ - public String getUserDefinedStatus() - { - return userDefinedStatus; - } - - - /** - * Set up the status of the membership in the collection. This status is controlled by the local deployment. - * - * @param userDefinedStatus string - */ - public void setUserDefinedStatus(String userDefinedStatus) - { - this.userDefinedStatus = userDefinedStatus; - } - - - /** - * Return the source of information that determined the membership. - * - * @return string - */ - public String getSource() - { - return source; - } - - - /** - * Set up the source of information that determined the membership. - * - * @param source string - */ - public void setSource(String source) - { - this.source = source; - } - - - /** - * Returns the id of the steward responsible for the mapping. - * - * @return String id - */ - public String getSteward() - { - return steward; - } - - - /** - * Set up the id of the steward responsible for the mapping. - * - * @param steward String id - */ - public void setSteward(String steward) - { - this.steward = steward; - } - - - /** - * Return the type of element that describes the steward. - * - * @return type name - */ - public String getStewardTypeName() - { - return stewardTypeName; - } - - - /** - * Set up the type of element that describes the steward. - * - * @param stewardTypeName type name - */ - public void setStewardTypeName(String stewardTypeName) - { - this.stewardTypeName = stewardTypeName; - } - - - /** - * Return the name of the property that holds the steward's identifier. - * - * @return property name - */ - public String getStewardPropertyName() - { - return stewardPropertyName; - } - - - /** - * Set up the name of the property that holds the steward's identifier. - * - * @param stewardPropertyName property name - */ - public void setStewardPropertyName(String stewardPropertyName) - { - this.stewardPropertyName = stewardPropertyName; - } - - - /** - * Return the additional values associated with the symbolic name. - * - * @return string text - */ - public String getNotes() - { - return notes; - } - - - /** - * Set up the additional values associated with the symbolic name. - * - * @param notes string text - */ - public void setNotes(String notes) - { - this.notes = notes; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "CollectionMembershipProperties{" + - "membershipRationale='" + membershipRationale + '\'' + - ", createdBy='" + createdBy + '\'' + - ", expression='" + expression + '\'' + - ", confidence=" + confidence + - ", status=" + status + - ", userDefinedStatus='" + userDefinedStatus + '\'' + - ", steward='" + steward + '\'' + - ", stewardTypeName='" + stewardTypeName + '\'' + - ", stewardPropertyName='" + stewardPropertyName + '\'' + - ", source='" + source + '\'' + - ", notes='" + notes + '\'' + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - CollectionMembershipProperties that = (CollectionMembershipProperties) objectToCompare; - return confidence == that.confidence && - Objects.equals(membershipRationale, that.membershipRationale) - && Objects.equals(createdBy, that.createdBy) && - Objects.equals(expression, that.expression) && - status == that.status && - Objects.equals(userDefinedStatus, that.userDefinedStatus) - && Objects.equals(steward, that.steward) && - Objects.equals(stewardTypeName, that.stewardTypeName) && - Objects.equals(stewardPropertyName, that.stewardPropertyName) && - Objects.equals(source, that.source) && - Objects.equals(notes, that.notes); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), membershipRationale, createdBy, expression, confidence, status, userDefinedStatus, steward, - stewardTypeName, stewardPropertyName, source, notes); - } -} diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/properties/CollectionProperties.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/properties/CollectionProperties.java deleted file mode 100644 index e4c562c1bed..00000000000 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/properties/CollectionProperties.java +++ /dev/null @@ -1,233 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalarchitecture.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.openmetadata.enums.OrderBy; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * CollectionProperties describes the core properties of a collection. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class CollectionProperties extends ReferenceableProperties -{ - private String name = null; - private String description = null; - private String collectionType = null; - private OrderBy collectionOrder = null; - private String orderByPropertyName = null; - - - /** - * Default constructor - */ - public CollectionProperties() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public CollectionProperties(CollectionProperties template) - { - super(template); - - if (template != null) - { - this.name = template.getName(); - this.description = template.getDescription(); - this.collectionType = template.getCollectionType(); - this.collectionOrder = template.getCollectionOrder(); - this.orderByPropertyName = template.getOrderByPropertyName(); - } - } - - - /** - * Return the name of the collection. - * - * @return string name - */ - public String getName() - { - return name; - } - - - /** - * Set up the name of the collection. - * - * @param name string name - */ - public void setName(String name) - { - this.name = name; - } - - - /** - * Return the description of the collection. - * - * @return text - */ - public String getDescription() - { - return description; - } - - - /** - * Set up the description of the collection. - * - * @param description text - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * Return a descriptive name for the collection's type. - * - * @return string name - */ - public String getCollectionType() - { - return collectionType; - } - - - /** - * Set up a descriptive name for the collection's type. - * - * @param collectionType string name - */ - public void setCollectionType(String collectionType) - { - this.collectionType = collectionType; - } - - - /** - * Return the property to use to determine the order that assets are returned. - * - * @return OrderBy enum - */ - public OrderBy getCollectionOrder() - { - return collectionOrder; - } - - - /** - * Set up the property to use to determine the order that assets are returned. - * - * @param collectionOrder OrderBy enum - */ - public void setCollectionOrder(OrderBy collectionOrder) - { - this.collectionOrder = collectionOrder; - } - - - /** - * Return the property name for OrderBy.OTHER. - * - * @return string property name - */ - public String getOrderByPropertyName() - { - return orderByPropertyName; - } - - - /** - * Set up the property name for OrderBy.OTHER. - * - * @param orderByPropertyName string property name - */ - public void setOrderByPropertyName(String orderByPropertyName) - { - this.orderByPropertyName = orderByPropertyName; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "CollectionProperties{" + - "name='" + name + '\'' + - ", description='" + description + '\'' + - ", collectionType='" + collectionType + '\'' + - ", collectionOrdering=" + collectionOrder + - ", orderPropertyName='" + orderByPropertyName + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - CollectionProperties that = (CollectionProperties) objectToCompare; - return getCollectionOrder() == that.getCollectionOrder() && - Objects.equals(getName(), that.getName()) && - Objects.equals(getDescription(), that.getDescription()) && - Objects.equals(getCollectionType(), that.getCollectionType()) && - Objects.equals(getOrderByPropertyName(), that.getOrderByPropertyName()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), getName(), getDescription(), getCollectionType(), getCollectionOrder(), getOrderByPropertyName()); - } -} diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/properties/CollectionStatus.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/properties/CollectionStatus.java deleted file mode 100644 index ed89bca831c..00000000000 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/properties/CollectionStatus.java +++ /dev/null @@ -1,102 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalarchitecture.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * CollectionStatus specifies which subset of a collection should be returned. The relationship - * that links a member into a collection has an start and end date (called the effective dates). The - * Community Profile OMAS uses the CollectionStatus and the effective dates to determine which members to return. - *
      - *
    • ACTIVE - all the collection members with a current effective dates. This is the default.
    • - *
    • PAST - all the collection members that have effective dates in the past.
    • - *
    • FUTURE - all the collection members that become effective in the future.
    • - *
    • ALL - all the collection members linked to the collection irrespective of their effective dates.
    • - *
    - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public enum CollectionStatus -{ - /** - * All the collection members with a current effective dates (default). - */ - ACTIVE (0, "Active", "All the collection members with a current effective dates (default)."), - - /** - * All the collection members that have effective dates in the past. - */ - PAST (1, "Past", "All the collection members that have effective dates in the past."), - - /** - * All the collection members that become effective in the future. - */ - FUTURE (2, "Future", "All the collection members that become effective in the future."), - - /** - * All the collection members linked to the collection irrespective of their effective dates. - */ - ALL (99, "All", "All the collection members linked to the collection irrespective of their effective dates."); - - private final int ordinal; - private final String name; - private final String description; - - - /** - * Default constructor for the enumeration. - * - * @param ordinal numerical representation of the enumeration - * @param name default string name of the enumeration - * @param description default string description of the enumeration - */ - CollectionStatus(int ordinal, String name, String description) - { - this.ordinal = ordinal; - this.name = name; - this.description = description; - } - - - /** - * Return the numeric representation of the enumeration. - * - * @return int ordinal - */ - public int getOrdinal() { return ordinal; } - - - /** - * Return the default name of the enumeration. - * - * @return String name - */ - public String getName() { return name; } - - - /** - * Return the default description of the enumeration. - * - * @return String description - */ - public String getDescription() { return description; } - - - /** - * toString() JSON-style - * - * @return string description - */ - @Override - public String toString() - { - return "CollectionStatus : " + name; - } -} diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/properties/ConnectionProperties.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/properties/ConnectionProperties.java deleted file mode 100644 index 4622a643d28..00000000000 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/properties/ConnectionProperties.java +++ /dev/null @@ -1,379 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalarchitecture.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * The connection is an object that contains the properties needed to create and initialise a connector to access a - * specific data assets. - * - * The properties for a connection are defined in model 0201. They include the following options for connector name: - *
      - *
    • - * guid - Globally unique identifier for the connection. - *
    • - *
    • - * url - URL of the connection definition in the metadata repository. - * This URL can be stored as a property in another entity to create an explicit link to this connection. - *
    • - *
    • - * qualifiedName - The official (unique) name for the connection. - * This is often defined by the IT systems management organization and should be used (when available) on - * audit logs and error messages. The qualifiedName is defined in the 0010 model as part of Referenceable. - *
    • - *
    • - * displayName - A consumable name for the connection. Often a shortened form of the qualifiedName for use - * on user interfaces and messages. The displayName should be only be used for audit logs and error messages - * if the qualifiedName is not set. - *
    • - *
    - * - * Either the guid, qualifiedName or displayName can be used to specify the name for a connection. - * - * Other properties for the connection include: - *
      - *
    • - * type - information about the TypeDef for Connection - *
    • - *
    • - * description - A full description of the connection covering details of the assets it connects to - * along with usage and version information. - *
    • - *
    • - * additionalProperties - Any additional properties associated with the connection. - *
    • - *
    • - * configurationProperties - properties for configuring the connector. - *
    • - *
    • - * securedProperties - Protected properties for secure log on by connector to back end server. These - * are protected properties that can only be retrieved by privileged connector code. - *
    • - *
    • - * userId - name or URI or connecting user. - *
    • - *
    • - * encryptedPassword - password for the userId - needs decrypting by connector before use. - *
    • - *
    • - * clearPassword - password for userId - ready to use. - *
    • - *
    • - * connectorType - Properties that describe the connector type for the connector. - *
    • - *
    • - * endpoint - Properties that describe the server endpoint where the connector will retrieve the assets. - *
    • - *
    • - * assetSummary - short description of the connected asset (if any). - *
    • - *
    - * - * The connection class is simply used to cache the properties for an connection. - * It is used by other classes to exchange this information between a metadata repository and a consumer. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ConnectionProperties extends ReferenceableProperties -{ - /* - * Attributes of a connector - */ - private String displayName = null; - private String description = null; - private String userId = null; - private String encryptedPassword = null; - private String clearPassword = null; - private Map configurationProperties = null; - private Map securedProperties = null; - - - /** - * Default constructor sets the Connection properties to null. - */ - public ConnectionProperties() - { - super(); - } - - - /** - * Copy/clone Constructor to return a copy of a connection object. - * - * @param template Connection to copy - */ - public ConnectionProperties(ConnectionProperties template) - { - super(template); - - if (template != null) - { - displayName = template.getDisplayName(); - description = template.getDescription(); - userId = template.getUserId(); - clearPassword = template.getClearPassword(); - encryptedPassword = template.getEncryptedPassword(); - configurationProperties = template.getConfigurationProperties(); - securedProperties = template.getSecuredProperties(); - } - } - - - /** - * Returns the stored display name property for the connection. - * Null means that no displayName is available. - * - * @return displayName - */ - public String getDisplayName() { return displayName; } - - - /** - * Set up the display name for UIs and reports. - * - * @param displayName String name - */ - public void setDisplayName(String displayName) - { - this.displayName = displayName; - } - - - /** - * Set up description of the element. - * - * @param description String - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * Returns the stored description property for the connection. - * If no description is provided then null is returned. - * - * @return description - */ - public String getDescription() - { - return description; - } - - - /** - * Return the userId to use on this connection. - * - * @return string - */ - public String getUserId() - { - return userId; - } - - - /** - * Set up the userId to use on this connection. - * - * @param userId string - */ - public void setUserId(String userId) - { - this.userId = userId; - } - - - /** - * Return an encrypted password. The caller is responsible for decrypting it. - * - * @return string - */ - public String getEncryptedPassword() - { - return encryptedPassword; - } - - - /** - * Set up an encrypted password. - * - * @param encryptedPassword string - */ - public void setEncryptedPassword(String encryptedPassword) - { - this.encryptedPassword = encryptedPassword; - } - - - /** - * Return an unencrypted password. - * - * @return string - */ - public String getClearPassword() - { - return clearPassword; - } - - - /** - * Set up an unencrypted password. - * - * @param clearPassword string - */ - public void setClearPassword(String clearPassword) - { - this.clearPassword = clearPassword; - } - - - /** - * Set up the configuration properties for this Connection. - * - * @param configurationProperties properties that contain additional configuration information for the connector. - */ - public void setConfigurationProperties(Map configurationProperties) - { - this.configurationProperties = configurationProperties; - } - - - /** - * Return a copy of the configuration properties. Null means no secured properties are available. - * - * @return secured properties typically user credentials for the connection - */ - public Map getConfigurationProperties() - { - if (configurationProperties == null) - { - return null; - } - else if (configurationProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(configurationProperties); - } - } - - - /** - * Set up the secured properties for this Connection. - * - * @param securedProperties properties that contain secret information such as log on information. - */ - public void setSecuredProperties(Map securedProperties) - { - this.securedProperties = securedProperties; - } - - - /** - * Return a copy of the secured properties. Null means no secured properties are available. - * - * @return secured properties typically user credentials for the connection - */ - public Map getSecuredProperties() - { - if (securedProperties == null) - { - return null; - } - else if (securedProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(securedProperties); - } - } - - - /** - * Standard toString method. Note SecuredProperties and other credential type properties are not displayed. - * This is deliberate because there is no knowing where the string will be printed. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "ConnectionProperties{" + - "displayName='" + displayName + '\'' + - ", description='" + description + '\'' + - ", userId='" + userId + '\'' + - ", encryptedPassword='" + encryptedPassword + '\'' + - ", clearPassword='" + clearPassword + '\'' + - ", configurationProperties=" + configurationProperties + - ", securedProperties=" + securedProperties + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ConnectionProperties that = (ConnectionProperties) objectToCompare; - return Objects.equals(getDisplayName(), that.getDisplayName()) && - Objects.equals(getDescription(), that.getDescription()) && - Objects.equals(getUserId(), that.getUserId()) && - Objects.equals(getEncryptedPassword(), that.getEncryptedPassword()) && - Objects.equals(getClearPassword(), that.getClearPassword()) && - Objects.equals(getConfigurationProperties(), that.getConfigurationProperties()) && - Objects.equals(getSecuredProperties(), that.getSecuredProperties()); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), getDisplayName(), getDescription(), - getUserId(), getEncryptedPassword(), getClearPassword(), getSecuredProperties(), - getConfigurationProperties()); - } -} diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/properties/ConnectorTypeProperties.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/properties/ConnectorTypeProperties.java deleted file mode 100644 index a11adc53d51..00000000000 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/properties/ConnectorTypeProperties.java +++ /dev/null @@ -1,617 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalarchitecture.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementOrigin; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementType; - -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * The ConnectorTypeProperties describe the implementation details of a particular type of connector. - * The properties for a connector type are defined in model 0201. - * They include: - * - *
      - *
    • - * guid - Globally unique identifier for the connector type. - *
    • - *
    • - * qualifiedName - The official (unique) name for the connector type. This is often defined by the IT - * systems management organization and should be used (when available) on audit logs and error messages. - *
    • - *
    • - * displayName - A consumable name for the connector type. Often a shortened form of the qualifiedName for use - * on user interfaces and messages. The displayName should be only be used for audit logs and error messages - * if the qualifiedName is not set. - *
    • - *
    • - * description - A full description of the connector type covering details of the assets it connects to - * along with usage and versioning information. - *
    • - *
    • - * supportedAssetTypeName - the type of asset that the connector implementation supports. - *
    • - *
    • - * expectedDataFormat - the format of the data that the connector supports - null for "any". - *
    • - *
    • - * connectorProviderClassName - The connector provider is the factory for a particular type of connector. - * This property defines the class name for the connector provider that the Connector Broker should use to request - * new connector instances. - *
    • - *
    • - * connectorFrameworkName - name of the connector framework that the connector implements - default Open Connector Framework (OCF). - *
    • - *
    • - * connectorInterfaceLanguage - the language that the connector is implemented in - default Java. - *
    • - *
    • - * connectorInterfaces - list of interfaces that the connector supports. - *
    • - *
    • - * targetTechnologySource - the organization that supplies the target technology that the connector implementation connects to. - *
    • - *
    • - * targetTechnologyName - the name of the target technology that the connector implementation connects to. - *
    • - *
    • - * targetTechnologyInterfaces - the names of the interfaces in the target technology that the connector calls. - *
    • - *
    • - * targetTechnologyVersions - the versions of the target technology that the connector supports. - *
    • - *
    • - * recognizedAdditionalProperties - these are the Connection additional properties recognized by the connector implementation - *
    • - *
    • - * recognizedConfigurationProperties - these are the Connection configuration properties recognized by the connector implementation - *
    • - *
    • - * recognizedSecuredProperties - these are the Connection secured properties recognized by the connector implementation - *
    • - *
    • - * additionalProperties - Any additional properties that the connector provider needs to know in order to - * create connector instances. - *
    • - *
    - * - * The connectorTypeProperties class is simply used to cache the properties for an connector type. - * It is used by other classes to exchange this information between a metadata repository and a consumer. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ConnectorTypeProperties extends ReferenceableProperties -{ - /* - * Attributes of a connector type - */ - private String displayName = null; - private String description = null; - private String supportedAssetTypeName = null; - private String expectedDataFormat = null; - private String connectorProviderClassName = null; - private String connectorFrameworkName = null; - private String connectorInterfaceLanguage = null; - private List connectorInterfaces = null; - private String targetTechnologySource = null; - private String targetTechnologyName = null; - private List targetTechnologyInterfaces = null; - private List targetTechnologyVersions = null; - private List recognizedAdditionalProperties = null; - private List recognizedConfigurationProperties = null; - private List recognizedSecuredProperties = null; - - - - /** - * Default constructor - */ - public ConnectorTypeProperties() - { - super(); - } - - - /** - * Copy/clone constructor for a connectorType that is not connected to an asset (either directly or indirectly). - * - * @param template template object to copy. - */ - public ConnectorTypeProperties(ConnectorTypeProperties template) - { - super(template); - - if (template != null) - { - displayName = template.getDisplayName(); - description = template.getDescription(); - supportedAssetTypeName = template.getSupportedAssetTypeName(); - expectedDataFormat = template.getExpectedDataFormat(); - connectorProviderClassName = template.getConnectorProviderClassName(); - connectorFrameworkName = template.getConnectorFrameworkName(); - connectorInterfaceLanguage = template.getConnectorInterfaceLanguage(); - connectorInterfaces = template.getConnectorInterfaces(); - targetTechnologySource = template.getTargetTechnologySource(); - targetTechnologyName = template.getTargetTechnologyName(); - targetTechnologyInterfaces = template.getTargetTechnologyInterfaces(); - targetTechnologyVersions = template.getTargetTechnologyVersions(); - recognizedAdditionalProperties = template.getRecognizedAdditionalProperties(); - recognizedConfigurationProperties = template.getRecognizedConfigurationProperties(); - recognizedSecuredProperties = template.getRecognizedSecuredProperties(); - } - } - - /** - * Set up the display name for UIs and reports. - * - * @param displayName String name - */ - public void setDisplayName(String displayName) - { - this.displayName = displayName; - } - - - /** - * Returns the stored display name property for the connector type. - * If no display name is available then null is returned. - * - * @return displayName - */ - public String getDisplayName() - { - return displayName; - } - - - /** - * Set up description of the element. - * - * @param description String - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * Returns the stored description property for the connector type. - * If no description is available then null is returned. - * - * @return description - */ - public String getDescription() - { - return description; - } - - - /** - * Return the type of asset that the connector implementation supports. - * - * @return string name - */ - public String getSupportedAssetTypeName() - { - return supportedAssetTypeName; - } - - - /** - * Set up the type of asset that the connector implementation supports. - * - * @param supportedAssetTypeName string name - */ - public void setSupportedAssetTypeName(String supportedAssetTypeName) - { - this.supportedAssetTypeName = supportedAssetTypeName; - } - - - /** - * Return the format of the data that the connector supports - null for "any". - * - * @return string name - */ - public String getExpectedDataFormat() - { - return expectedDataFormat; - } - - - /** - * Set up the format of the data that the connector supports - null for "any". - * - * @param expectedDataFormat string name - */ - public void setExpectedDataFormat(String expectedDataFormat) - { - this.expectedDataFormat = expectedDataFormat; - } - - - /** - * The name of the connector provider class name. - * - * @param connectorProviderClassName String class name - */ - public void setConnectorProviderClassName(String connectorProviderClassName) - { - this.connectorProviderClassName = connectorProviderClassName; - } - - - /** - * Returns the stored connectorProviderClassName property for the connector type. - * If no connectorProviderClassName is available then null is returned. - * - * @return connectorProviderClassName class name (including package name) - */ - public String getConnectorProviderClassName() - { - return connectorProviderClassName; - } - - - /** - * Return name of the connector framework that the connector implements - default Open Connector Framework (OCF). - * - * @return string name - */ - public String getConnectorFrameworkName() - { - return connectorFrameworkName; - } - - - /** - * Set up name of the connector framework that the connector implements - default Open Connector Framework (OCF). - * - * @param connectorFrameworkName string name - */ - public void setConnectorFrameworkName(String connectorFrameworkName) - { - this.connectorFrameworkName = connectorFrameworkName; - } - - - /** - * Return the language that the connector is implemented in - default Java. - * - * @return string name - */ - public String getConnectorInterfaceLanguage() - { - return connectorInterfaceLanguage; - } - - - /** - * Set up the language that the connector is implemented in - default Java. - * - * @param connectorInterfaceLanguage string name - */ - public void setConnectorInterfaceLanguage(String connectorInterfaceLanguage) - { - this.connectorInterfaceLanguage = connectorInterfaceLanguage; - } - - - /** - * Return list of interfaces that the connector supports. - * - * @return list of names - */ - public List getConnectorInterfaces() - { - return connectorInterfaces; - } - - - /** - * Set up list of interfaces that the connector supports. - * - * @param connectorInterfaces list of names - */ - public void setConnectorInterfaces(List connectorInterfaces) - { - this.connectorInterfaces = connectorInterfaces; - } - - - /** - * Return the name of the organization that supplies the target technology that the connector implementation connects to. - * - * @return string name - */ - public String getTargetTechnologySource() - { - return targetTechnologySource; - } - - - /** - * Set up the name of the organization that supplies the target technology that the connector implementation connects to. - * - * @param targetTechnologySource list of names - */ - public void setTargetTechnologySource(String targetTechnologySource) - { - this.targetTechnologySource = targetTechnologySource; - } - - - /** - * Return the name of the target technology that the connector implementation connects to. - * - * @return string name - */ - public String getTargetTechnologyName() - { - return targetTechnologyName; - } - - - /** - * Set up the name of the target technology that the connector implementation connects to. - * - * @param targetTechnologyName string name - */ - public void setTargetTechnologyName(String targetTechnologyName) - { - this.targetTechnologyName = targetTechnologyName; - } - - - /** - * Return the names of the interfaces in the target technology that the connector calls. - * - * @return list of interface names - */ - public List getTargetTechnologyInterfaces() - { - return targetTechnologyInterfaces; - } - - - /** - * Set up the names of the interfaces in the target technology that the connector calls. - * - * @param targetTechnologyInterfaces list of interface names - */ - public void setTargetTechnologyInterfaces(List targetTechnologyInterfaces) - { - this.targetTechnologyInterfaces = targetTechnologyInterfaces; - } - - - /** - * Return the versions of the target technology that the connector supports. - * - * @return list of version identifiers - */ - public List getTargetTechnologyVersions() - { - return targetTechnologyVersions; - } - - - /** - * Set up the versions of the target technology that the connector supports. - * - * @param targetTechnologyVersions list of version identifiers - */ - public void setTargetTechnologyVersions(List targetTechnologyVersions) - { - this.targetTechnologyVersions = targetTechnologyVersions; - } - - - /** - * Set up the list of property names that this connector/connector provider implementation looks for - * in the Connection object's additionalProperties. - * - * @param recognizedAdditionalProperties list of property names - */ - public void setRecognizedAdditionalProperties(List recognizedAdditionalProperties) - { - this.recognizedAdditionalProperties = recognizedAdditionalProperties; - } - - - /** - * Return the list of property names that this connector/connector provider implementation looks for - * in the Connection object's additionalProperties. - * - * @return list of property names - */ - public List getRecognizedAdditionalProperties() - { - if (recognizedAdditionalProperties == null) - { - return null; - } - else if (recognizedAdditionalProperties.isEmpty()) - { - return null; - } - else - { - return recognizedAdditionalProperties; - } - } - - - /** - * Set up the list of property names that this connector/connector provider implementation looks for - * in the Connection object's configurationProperties. - * - * @param recognizedConfigurationProperties list of property names - */ - public void setRecognizedConfigurationProperties(List recognizedConfigurationProperties) - { - - this.recognizedConfigurationProperties = recognizedConfigurationProperties; - } - - - /** - * Return the list of property names that this connector/connector provider implementation looks for - * in the Connection object's configurationProperties. - * - * @return list of property names - */ - public List getRecognizedConfigurationProperties() - { - if (recognizedConfigurationProperties == null) - { - return null; - } - else if (recognizedConfigurationProperties.isEmpty()) - { - return null; - } - else - { - return recognizedConfigurationProperties; - } - } - - - /** - * Set up the list of property names that this connector/connector provider implementation looks for - * in the Connection object's securedProperties. - * - * @param recognizedSecuredProperties list of property names - */ - public void setRecognizedSecuredProperties(List recognizedSecuredProperties) - { - this.recognizedSecuredProperties = recognizedSecuredProperties; - } - - - /** - * Return the list of property names that this connector/connector provider implementation looks for - * in the Connection object's securedProperties. - * - * @return list of property names - */ - public List getRecognizedSecuredProperties() - { - if (recognizedSecuredProperties == null) - { - return null; - } - else if (recognizedSecuredProperties.isEmpty()) - { - return null; - } - else - { - return recognizedSecuredProperties; - } - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - - - @Override - public String toString() - { - return "ConnectorTypeProperties{" + - "displayName='" + displayName + '\'' + - ", description='" + description + '\'' + - ", supportedAssetTypeName='" + supportedAssetTypeName + '\'' + - ", expectedDataFormat='" + expectedDataFormat + '\'' + - ", connectorProviderClassName='" + connectorProviderClassName + '\'' + - ", connectorFrameworkName='" + connectorFrameworkName + '\'' + - ", connectorInterfaceLanguage='" + connectorInterfaceLanguage + '\'' + - ", connectorInterfaces=" + connectorInterfaces + - ", targetTechnologySource='" + targetTechnologySource + '\'' + - ", targetTechnologyName='" + targetTechnologyName + '\'' + - ", targetTechnologyInterfaces=" + targetTechnologyInterfaces + - ", targetTechnologyVersions=" + targetTechnologyVersions + - ", recognizedAdditionalProperties=" + recognizedAdditionalProperties + - ", recognizedConfigurationProperties=" + recognizedConfigurationProperties + - ", recognizedSecuredProperties=" + recognizedSecuredProperties + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - ConnectorTypeProperties that = (ConnectorTypeProperties) objectToCompare; - return Objects.equals(displayName, that.displayName) && - Objects.equals(description, that.description) && - Objects.equals(supportedAssetTypeName, that.supportedAssetTypeName) && - Objects.equals(expectedDataFormat, that.expectedDataFormat) && - Objects.equals(connectorProviderClassName, that.connectorProviderClassName) && - Objects.equals(connectorFrameworkName, that.connectorFrameworkName) && - Objects.equals(connectorInterfaceLanguage, that.connectorInterfaceLanguage) && - Objects.equals(connectorInterfaces, that.connectorInterfaces) && - Objects.equals(targetTechnologySource, that.targetTechnologySource) && - Objects.equals(targetTechnologyName, that.targetTechnologyName) && - Objects.equals(targetTechnologyInterfaces, that.targetTechnologyInterfaces) && - Objects.equals(targetTechnologyVersions, that.targetTechnologyVersions) && - Objects.equals(recognizedAdditionalProperties, that.recognizedAdditionalProperties) && - Objects.equals(recognizedConfigurationProperties, that.recognizedConfigurationProperties) && - Objects.equals(recognizedSecuredProperties, that.recognizedSecuredProperties); - } - - - /** - * Hash of properties - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), displayName, description, supportedAssetTypeName, expectedDataFormat, connectorProviderClassName, - connectorFrameworkName, connectorInterfaceLanguage, connectorInterfaces, targetTechnologySource, targetTechnologyName, - targetTechnologyInterfaces, targetTechnologyVersions, recognizedAdditionalProperties, recognizedConfigurationProperties, - recognizedSecuredProperties); - } -} diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/properties/EndpointProperties.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/properties/EndpointProperties.java deleted file mode 100644 index cdcd9e82404..00000000000 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/properties/EndpointProperties.java +++ /dev/null @@ -1,239 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.digitalarchitecture.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * EndpointProperties describes the properties of a server endpoint. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class EndpointProperties extends ReferenceableProperties -{ - private String resourceName = null; - private String resourceDescription = null; - private String address = null; - private String protocol = null; - private String encryptionMethod = null; - - - /** - * Default constructor - */ - public EndpointProperties() - { - super(); - } - - - /** - * Copy/clone constructor for an Endpoint. - * - * @param template template object to copy. - */ - public EndpointProperties(EndpointProperties template) - { - super(template); - - if (template != null) - { - resourceName = template.getResourceName(); - resourceDescription = template.getResourceDescription(); - address = template.getAddress(); - protocol = template.getProtocol(); - encryptionMethod = template.getEncryptionMethod(); - } - } - - - /** - * Set up the technical name for the endpoint. - * - * @param resourceName String name - */ - public void setResourceName(String resourceName) - { - this.resourceName = resourceName; - } - - - /** - * Returns the stored technical name property for the endpoint. - * If no technical name is available then null is returned. - * - * @return String name - */ - public String getResourceName() - { - return resourceName; - } - - - /** - * Set up the technical description of the endpoint. - * - * @param resourceDescription String - */ - public void setResourceDescription(String resourceDescription) - { - this.resourceDescription = resourceDescription; - } - - - /** - * Return the technical description for the endpoint. - * - * @return String technicalDescription - */ - public String getResourceDescription() - { - return resourceDescription; - } - - - /** - * Set up the network address of the endpoint. - * - * @param address String resource name - */ - public void setAddress(String address) - { - this.address = address; - } - - - /** - * Returns the stored address property for the endpoint. - * If no network address is available then null is returned. - * - * @return address - */ - public String getAddress() - { - return address; - } - - - /** - * Set up the protocol to use for this Endpoint - * - * @param protocol String protocol name - */ - public void setProtocol(String protocol) - { - this.protocol = protocol; - } - - - /** - * Returns the stored protocol property for the endpoint. - * If no protocol is available then null is returned. - * - * @return protocol - */ - public String getProtocol() - { - return protocol; - } - - - /** - * Set up the encryption method used on this Endpoint. - * - * @param encryptionMethod String name - */ - public void setEncryptionMethod(String encryptionMethod) - { - this.encryptionMethod = encryptionMethod; - } - - - /** - * Returns the stored encryptionMethod property for the endpoint. This is an open type allowing the information - * needed to work with a specific encryption mechanism used by the endpoint to be defined. - * If no encryptionMethod property is available (typically because this is an unencrypted endpoint) - * then null is returned. - * - * @return encryption method information - */ - public String getEncryptionMethod() - { - return encryptionMethod; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "EndpointProperties{" + - "resourceName='" + resourceName + '\'' + - ", resourceDescription='" + resourceDescription + '\'' + - ", address='" + address + '\'' + - ", protocol='" + protocol + '\'' + - ", encryptionMethod='" + encryptionMethod + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - EndpointProperties that = (EndpointProperties) objectToCompare; - return Objects.equals(resourceName, that.resourceName) && - Objects.equals(resourceDescription, that.resourceDescription) && - Objects.equals(address, that.address) && - Objects.equals(protocol, that.protocol) && - Objects.equals(encryptionMethod, that.encryptionMethod); - } - - - /** - * Create a hash code for this element type. - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), resourceName, resourceDescription, address, protocol, encryptionMethod); - } -} diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/properties/LocationProperties.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/properties/LocationProperties.java deleted file mode 100644 index 1d02913b6bc..00000000000 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/properties/LocationProperties.java +++ /dev/null @@ -1,182 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.digitalarchitecture.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * LocationProperties is a class for representing a generic location. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class LocationProperties extends ReferenceableProperties -{ - private String identifier = null; - private String displayName = null; - private String description = null; - - - /** - * Default constructor - */ - public LocationProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public LocationProperties(LocationProperties template) - { - super(template); - - if (template != null) - { - identifier = template.getIdentifier(); - displayName = template.getDisplayName(); - description = template.getDescription(); - } - } - - - - /** - * Return the code value or symbol used to identify the location - typically unique. - * - * @return string identifier - */ - public String getIdentifier() - { - return identifier; - } - - - /** - * Set up the code value or symbol used to identify the location - typically unique. - * - * @param identifier string identifier - */ - public void setIdentifier(String identifier) - { - this.identifier = identifier; - } - - - /** - * Return a human memorable name for the location. - * - * @return string name - */ - public String getDisplayName() - { - return displayName; - } - - - /** - * Set up a human memorable name for the location. - * - * @param displayName string name - */ - public void setDisplayName(String displayName) - { - this.displayName = displayName; - } - - - /** - * Return the description of the location. - * - * @return string text - */ - public String getDescription() - { - return description; - } - - - /** - * Set up the description of the location. - * - * @param description string text - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "LocationProperties{" + - "identifier='" + identifier + '\'' + - ", displayName='" + displayName + '\'' + - ", description='" + description + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - LocationProperties that = (LocationProperties) objectToCompare; - return Objects.equals(identifier, that.identifier) && - Objects.equals(displayName, that.displayName) && - Objects.equals(description, that.description); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), identifier, displayName, description); - } -} diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/properties/MeaningProperties.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/properties/MeaningProperties.java deleted file mode 100644 index e6a220ceb01..00000000000 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/properties/MeaningProperties.java +++ /dev/null @@ -1,268 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalarchitecture.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * Meaning is a cut-down summary of a glossary term to aid in understanding the content - * of an element. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class MeaningProperties extends ReferenceableProperties -{ - /* - * Attributes of a meaning object definition - */ - private String displayName = null; - private String description = null; - private String summary = null; - private String examples = null; - private String abbreviation = null; - private String usage = null; - - - /** - * Default constructor - */ - public MeaningProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template element to copy - */ - public MeaningProperties(MeaningProperties template) - { - /* - * Save the parent asset description. - */ - super(template); - - if (template != null) - { - this.displayName = template.getDisplayName(); - this.summary = template.getSummary(); - this.description = template.getDescription(); - this.examples = template.getExamples(); - this.abbreviation = template.getAbbreviation(); - this.usage = template.getUsage(); - } - } - - - /** - * Return the display name for this term (normally a shortened form of the qualified name). - * - * @return string name - */ - public String getDisplayName() - { - return displayName; - } - - - /** - * Set up the display name for this term (normally a shortened form of the qualified name). - * - * @param displayName string name - */ - public void setDisplayName(String displayName) - { - this.displayName = displayName; - } - - - /** - * Return a short summary of the meaning of the term - used for summary lists of terms. - * - * @return string description - */ - public String getSummary() - { - return summary; - } - - - /** - * Set up a short summary of the meaning of the term - used for summary lists of terms. - * - * @param summary string description - */ - public void setSummary(String summary) - { - this.summary = summary; - } - - - /** - * Return the detailed description of the term's meaning. This would be used where the term is the primary - * information being displayed. - * - * @return string description - */ - public String getDescription() - { - return description; - } - - - /** - * Set up the detailed description of the term's meaning. This would be used where the term is the primary - * information being displayed. - * - * @param description string description - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * Return example sentences that include this term. - * - * @return string examples - */ - public String getExamples() - { - return examples; - } - - - /** - * Set up example sentences that include this term. - * - * @param examples string examples - */ - public void setExamples(String examples) - { - this.examples = examples; - } - - - /** - * Return the abbreviation for this term (or null). - * - * @return string abbreviation - */ - public String getAbbreviation() - { - return abbreviation; - } - - - /** - * Set up the abbreviation for this term (or null). - * - * @param abbreviation string abbreviation - */ - public void setAbbreviation(String abbreviation) - { - this.abbreviation = abbreviation; - } - - - /** - * Return instructions for how and when this term should be used. - * - * @return string usage instructions - */ - public String getUsage() - { - return usage; - } - - - /** - * Set up instructions for how and when this term should be used. - * - * @param usage string usage instructions - */ - public void setUsage(String usage) - { - this.usage = usage; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "MeaningProperties{" + - "displayName='" + displayName + '\'' + - ", description='" + description + '\'' + - ", summary='" + summary + '\'' + - ", examples='" + examples + '\'' + - ", abbreviation='" + abbreviation + '\'' + - ", usage='" + usage + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - MeaningProperties that = (MeaningProperties) objectToCompare; - return Objects.equals(getDisplayName(), that.getDisplayName()) && - Objects.equals(getSummary(), that.getSummary()) && - Objects.equals(getDescription(), that.getDescription()) && - Objects.equals(getExamples(), that.getExamples()) && - Objects.equals(getAbbreviation(), that.getAbbreviation()) && - Objects.equals(getUsage(), that.getUsage()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), getDisplayName(), getSummary(), getDescription(), getExamples(), - getAbbreviation(), getUsage()); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/properties/ReferenceDataAssetProperties.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/properties/ReferenceDataAssetProperties.java deleted file mode 100644 index 90ba6f4344f..00000000000 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/properties/ReferenceDataAssetProperties.java +++ /dev/null @@ -1,157 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.digitalarchitecture.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.*; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ReferenceDataAssetProperties is a java bean used to create assets associated with the digital architecture. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ReferenceDataAssetProperties extends ReferenceableProperties -{ - private String name = null; - private String description = null; - - - /** - * Default constructor - */ - public ReferenceDataAssetProperties() - { - } - - - /** - * Copy/clone constructor. Note, this is a deep copy - * - * @param template object to copy - */ - public ReferenceDataAssetProperties(ReferenceDataAssetProperties template) - { - super(template); - - if (template != null) - { - name = template.getName(); - description = template.getDescription(); - } - } - - - /** - * Returns the stored display name property for the asset. - * If no display name is available then null is returned. - * - * @return String name - */ - public String getName() - { - return name; - } - - - /** - * Set up the stored display name property for the asset. - * - * @param name String name - */ - public void setName(String name) - { - this.name = name; - } - - - /** - * Returns the stored description property for the asset. - * If no description is provided then null is returned. - * - * @return description String text - */ - public String getDescription() - { - return description; - } - - - /** - * Set up the stored description property associated with the asset. - * - * @param description String text - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "ReferenceDataAssetProperties{" + - "displayName='" + name + '\'' + - ", description='" + description + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ReferenceDataAssetProperties that = (ReferenceDataAssetProperties) objectToCompare; - return Objects.equals(name, that.name) && - Objects.equals(description, that.description); - } - - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), name, description); - } -} diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/properties/ReferenceValueAssignmentProperties.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/properties/ReferenceValueAssignmentProperties.java deleted file mode 100644 index 014390e987d..00000000000 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/properties/ReferenceValueAssignmentProperties.java +++ /dev/null @@ -1,257 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.digitalarchitecture.properties; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ReferenceValueAssignmentProperties is a java bean used to create a link between a valid value and a referenceable item - * to enable the valid value to be used as a semiformal tag/classifier. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ReferenceValueAssignmentProperties extends RelationshipProperties -{ - private String attributeName = null; - private int confidence = 0; - private String steward = null; - private String stewardTypeName = null; - private String stewardPropertyName = null; - private String notes = null; - - - /** - * Default constructor - */ - public ReferenceValueAssignmentProperties() - { - } - - - /** - * Copy/clone constructor. Note, this is a deep copy - * - * @param template object to copy - */ - public ReferenceValueAssignmentProperties(ReferenceValueAssignmentProperties template) - { - super (template); - - if (template != null) - { - attributeName = template.getAttributeName(); - confidence = template.getConfidence(); - steward = template.getSteward(); - stewardTypeName = template.getStewardTypeName(); - stewardPropertyName = template.getStewardPropertyName(); - notes = template.getNotes(); - } - } - - - /** - * Return the name of the attribute that this reference data value represents. - * - * @return string - */ - public String getAttributeName() - { - return attributeName; - } - - - /** - * Set up the name of the attribute that this reference data value represents. - * - * @param attributeName string - */ - public void setAttributeName(String attributeName) - { - this.attributeName = attributeName; - } - - - /** - * Return the confidence level (0-100) that the mapping is correct. - * - * @return int - */ - public int getConfidence() - { - return confidence; - } - - - /** - * Set up the confidence level (0-100) that the mapping is correct. - * - * @param confidence int - */ - public void setConfidence(int confidence) - { - this.confidence = confidence; - } - - - /** - * Returns the id of the steward responsible for the mapping. - * - * @return String id - */ - public String getSteward() - { - return steward; - } - - - /** - * Set up the id of the steward responsible for the mapping. - * - * @param steward String id - */ - public void setSteward(String steward) - { - this.steward = steward; - } - - - /** - * Return the type of element that describes the steward. - * - * @return type name - */ - public String getStewardTypeName() - { - return stewardTypeName; - } - - - /** - * Set up the type of element that describes the steward. - * - * @param stewardTypeName type name - */ - public void setStewardTypeName(String stewardTypeName) - { - this.stewardTypeName = stewardTypeName; - } - - - /** - * Return the name of the property that holds the steward's identifier. - * - * @return property name - */ - public String getStewardPropertyName() - { - return stewardPropertyName; - } - - - /** - * Set up the name of the property that holds the steward's identifier. - * - * @param stewardPropertyName property name - */ - public void setStewardPropertyName(String stewardPropertyName) - { - this.stewardPropertyName = stewardPropertyName; - } - - - /** - * Return the additional values associated with the symbolic name. - * - * @return string text - */ - public String getNotes() - { - return notes; - } - - - /** - * Set up the additional values associated with the symbolic name. - * - * @param notes string text - */ - public void setNotes(String notes) - { - this.notes = notes; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "ReferenceValueAssignmentProperties{" + - "confidence=" + confidence + - ", attributeName='" + attributeName + '\'' + - ", steward='" + steward + '\'' + - ", stewardTypeName='" + stewardTypeName + '\'' + - ", stewardPropertyName='" + stewardPropertyName + '\'' + - ", notes='" + notes + '\'' + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - ReferenceValueAssignmentProperties that = (ReferenceValueAssignmentProperties) objectToCompare; - return confidence == that.confidence && - Objects.equals(attributeName, that.attributeName) && - Objects.equals(steward, that.steward) && - Objects.equals(stewardTypeName, that.stewardTypeName) && - Objects.equals(stewardPropertyName, that.stewardPropertyName) && - Objects.equals(notes, that.notes); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), confidence, steward, stewardTypeName, stewardPropertyName, notes); - } -} diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/properties/ReferenceableProperties.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/properties/ReferenceableProperties.java deleted file mode 100644 index 1e00c41f2e6..00000000000 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/properties/ReferenceableProperties.java +++ /dev/null @@ -1,287 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalarchitecture.properties; - -import com.fasterxml.jackson.annotation.*; - -import java.util.*; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * Many open metadata entities are referenceable. It means that they have a qualified name and additional - * properties. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes( - { - @JsonSubTypes.Type(value = ValidValueProperties.class, name = "ValidValueProperties"), - @JsonSubTypes.Type(value = ReferenceDataAssetProperties.class, name = "ReferenceDataAssetProperties"), - @JsonSubTypes.Type(value = CollectionProperties.class, name = "CollectionProperties"), - @JsonSubTypes.Type(value = ConnectionProperties.class, name = "ConnectionProperties"), - @JsonSubTypes.Type(value = ConnectorTypeProperties.class, name = "ConnectorTypeProperties"), - @JsonSubTypes.Type(value = LocationProperties.class, name = "LocationProperties"), - @JsonSubTypes.Type(value = EndpointProperties.class, name = "EndpointProperties"), - @JsonSubTypes.Type(value = MeaningProperties.class, name = "MeaningProperties") - }) -public class ReferenceableProperties -{ - private String qualifiedName = null; - private Map additionalProperties = null; - - private Date effectiveFrom = null; - private Date effectiveTo = null; - - private String typeName = null; - private Map extendedProperties = null; - - /** - * Default constructor - */ - public ReferenceableProperties() - { - super(); - } - - - /** - * Copy/clone constructor. Retrieves the values from the supplied template - * - * @param template element to copy - */ - public ReferenceableProperties(ReferenceableProperties template) - { - if (template != null) - { - qualifiedName = template.getQualifiedName(); - additionalProperties = template.getAdditionalProperties(); - - effectiveFrom = template.getEffectiveFrom(); - effectiveTo = template.getEffectiveTo(); - - typeName = template.getTypeName(); - extendedProperties = template.getExtendedProperties(); - } - } - - - /** - * Set up the fully qualified name. - * - * @param qualifiedName String name - */ - public void setQualifiedName(String qualifiedName) - { - this.qualifiedName = qualifiedName; - } - - - /** - * Returns the stored qualified name property for the metadata entity. - * If no qualified name is available then the empty string is returned. - * - * @return qualifiedName - */ - public String getQualifiedName() - { - return qualifiedName; - } - - - /** - * Set up additional properties. - * - * @param additionalProperties Additional properties object - */ - public void setAdditionalProperties(Map additionalProperties) - { - this.additionalProperties = additionalProperties; - } - - - /** - * Return a copy of the additional properties. Null means no additional properties are available. - * - * @return AdditionalProperties - */ - public Map getAdditionalProperties() - { - if (additionalProperties == null) - { - return null; - } - else if (additionalProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(additionalProperties); - } - } - - - /** - * Return the date/time that this element is effective from (null means effective from the epoch). - * - * @return date object - */ - public Date getEffectiveFrom() - { - return effectiveFrom; - } - - - /** - * Set up the date/time that this element is effective from (null means effective from the epoch). - * - * @param effectiveFrom date object - */ - public void setEffectiveFrom(Date effectiveFrom) - { - this.effectiveFrom = effectiveFrom; - } - - - /** - * Return the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @return date object - */ - public Date getEffectiveTo() - { - return effectiveTo; - } - - - /** - * Set the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @param effectiveTo date object - */ - public void setEffectiveTo(Date effectiveTo) - { - this.effectiveTo = effectiveTo; - } - - - /** - * Return the name of the open metadata type for this metadata element. - * - * @return string name - */ - public String getTypeName() - { - return typeName; - } - - - /** - * Set up the name of the open metadata type for this element. - * - * @param typeName string name - */ - public void setTypeName(String typeName) - { - this.typeName = typeName; - } - - - /** - * Return the properties that have been defined for a subtype of this object that are not supported explicitly - * by this bean. - * - * @return property map - */ - public Map getExtendedProperties() - { - if (extendedProperties == null) - { - return null; - } - else if (extendedProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(extendedProperties); - } - } - - - /** - * Set up the properties that have been defined for a subtype of this object that are not supported explicitly - * by this bean. - * - * @param extendedProperties property map - */ - public void setExtendedProperties(Map extendedProperties) - { - this.extendedProperties = extendedProperties; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "ReferenceableProperties{" + - "qualifiedName='" + qualifiedName + '\'' + - ", additionalProperties=" + additionalProperties + - ", effectiveFrom=" + effectiveFrom + - ", effectiveTo=" + effectiveTo + - ", typeName='" + typeName + '\'' + - ", extendedProperties=" + extendedProperties + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ReferenceableProperties that = (ReferenceableProperties) objectToCompare; - return Objects.equals(qualifiedName, that.qualifiedName) && - Objects.equals(additionalProperties, that.additionalProperties) && - Objects.equals(effectiveFrom, that.effectiveFrom) && - Objects.equals(effectiveTo, that.effectiveTo) && - Objects.equals(typeName, that.typeName) && - Objects.equals(extendedProperties, that.extendedProperties); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(qualifiedName, additionalProperties, effectiveFrom, effectiveTo, typeName, extendedProperties); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/properties/RelationshipProperties.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/properties/RelationshipProperties.java deleted file mode 100644 index 6f52ce7e18d..00000000000 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/properties/RelationshipProperties.java +++ /dev/null @@ -1,198 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalarchitecture.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; - -import java.util.Date; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * RelationshipProperties provides the base class for relationships items. This provides extended properties with the ability to - * set effectivity dates. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes( - { - @JsonSubTypes.Type(value = ReferenceValueAssignmentProperties.class, name = "ReferenceValueAssignmentProperties"), - @JsonSubTypes.Type(value = ValidValueAssignmentProperties.class, name = "ValidValueAssignmentProperties"), - @JsonSubTypes.Type(value = ValidValueMembershipProperties.class, name = "ValidValueMembershipProperties"), - @JsonSubTypes.Type(value = ValidValuesMappingProperties.class, name = "ValidValuesMappingProperties"), - @JsonSubTypes.Type(value = ValidValuesImplProperties.class, name = "ValidValuesImplProperties"), - }) -public class RelationshipProperties -{ - private Date effectiveFrom = null; - private Date effectiveTo = null; - - private Map extendedProperties = null; - - - /** - * Default constructor - */ - public RelationshipProperties() - { - super(); - } - - - /** - * Copy/clone constructor. Retrieve values from the supplied template - * - * @param template element to copy - */ - public RelationshipProperties(RelationshipProperties template) - { - if (template != null) - { - effectiveFrom = template.getEffectiveFrom(); - effectiveTo = template.getEffectiveTo(); - extendedProperties = template.getExtendedProperties(); - } - } - - - /** - * Return the date/time that this element is effective from (null means effective from the epoch). - * - * @return date object - */ - public Date getEffectiveFrom() - { - return effectiveFrom; - } - - - /** - * Set up the date/time that this element is effective from (null means effective from the epoch). - * - * @param effectiveFrom date object - */ - public void setEffectiveFrom(Date effectiveFrom) - { - this.effectiveFrom = effectiveFrom; - } - - - /** - * Return the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @return date object - */ - public Date getEffectiveTo() - { - return effectiveTo; - } - - - /** - * Set the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @param effectiveTo date object - */ - public void setEffectiveTo(Date effectiveTo) - { - this.effectiveTo = effectiveTo; - } - - - /** - * Return the properties that have been defined for a subtype of this object that are not supported explicitly - * by this bean. - * - * @return property map - */ - public Map getExtendedProperties() - { - if (extendedProperties == null) - { - return null; - } - else if (extendedProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(extendedProperties); - } - } - - - /** - * Set up the properties that have been defined for a subtype of this object that are not supported explicitly - * by this bean. - * - * @param extendedProperties property map - */ - public void setExtendedProperties(Map extendedProperties) - { - this.extendedProperties = extendedProperties; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "RelationshipProperties{" + - "effectiveFrom=" + effectiveFrom + - ", effectiveTo=" + effectiveTo + - ", extendedProperties=" + extendedProperties + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - RelationshipProperties that = (RelationshipProperties) objectToCompare; - return Objects.equals(effectiveFrom, that.effectiveFrom) && - Objects.equals(effectiveTo, that.effectiveTo); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(effectiveFrom, effectiveTo); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/properties/SubjectAreaClassificationProperties.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/properties/SubjectAreaClassificationProperties.java deleted file mode 100644 index 5f70def4b31..00000000000 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/properties/SubjectAreaClassificationProperties.java +++ /dev/null @@ -1,116 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalarchitecture.properties; - -import java.util.Objects; - -/** - * A subject area defines a group of definitions for governing assets related to a specific topic. The subject area definition defines - * how the assets related to the topic should be managed. - */ -public class SubjectAreaClassificationProperties extends ClassificationProperties -{ - private String subjectAreaName = null; - - - /** - * Default constructor - */ - public SubjectAreaClassificationProperties() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public SubjectAreaClassificationProperties(SubjectAreaClassificationProperties template) - { - super(template); - - if (template != null) - { - this.subjectAreaName = template.getSubjectAreaName(); - } - } - - - /** - * Return the name of the subject area - this is added to the SubjectArea classification. - * - * @return string name - */ - public String getSubjectAreaName() - { - return subjectAreaName; - } - - - /** - * Set up the name of the subject area - this is added to the SubjectArea classification. - * - * @param subjectAreaName string name - */ - public void setSubjectAreaName(String subjectAreaName) - { - this.subjectAreaName = subjectAreaName; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "SubjectAreaClassificationProperties{" + - "effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", extendedProperties=" + getExtendedProperties() + - ", subjectAreaName='" + subjectAreaName + '\'' + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (! (objectToCompare instanceof SubjectAreaClassificationProperties)) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - SubjectAreaClassificationProperties that = (SubjectAreaClassificationProperties) objectToCompare; - return Objects.equals(subjectAreaName, that.subjectAreaName); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), getSubjectAreaName()); - } -} diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/properties/SubjectAreaProperties.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/properties/SubjectAreaProperties.java deleted file mode 100644 index fcb6e1c153a..00000000000 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/properties/SubjectAreaProperties.java +++ /dev/null @@ -1,249 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalarchitecture.properties; - -import java.util.Objects; - -/** - * A subject area defines a group of definitions for governing assets related to a specific topic. The subject area definition defines - * how the assets related to the topic should be managed. - */ -public class SubjectAreaProperties extends ReferenceableProperties -{ - private String subjectAreaName = null; - private String displayName = null; - private String description = null; - private String usage = null; - private String scope = null; - private int domainIdentifier = 0; - - - /** - * Default constructor - */ - public SubjectAreaProperties() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public SubjectAreaProperties(SubjectAreaProperties template) - { - super(template); - - if (template != null) - { - this.subjectAreaName = template.getSubjectAreaName(); - this.displayName = template.getDisplayName(); - this.description = template.getDescription(); - this.usage = template.getUsage(); - this.scope = template.getScope(); - this.domainIdentifier = template.getDomainIdentifier(); - } - } - - - /** - * Return the name of the subject area - this is added to the SubjectArea classification. - * - * @return string name - */ - public String getSubjectAreaName() - { - return subjectAreaName; - } - - - /** - * Set up the name of the subject area - this is added to the SubjectArea classification. - * - * @param subjectAreaName string name - */ - public void setSubjectAreaName(String subjectAreaName) - { - this.subjectAreaName = subjectAreaName; - } - - - /** - * Return the short name for the governance zone. - * - * @return string name - */ - public String getDisplayName() - { - return displayName; - } - - - /** - * Set up the short name for the governance zone. - * - * @param displayName string name - */ - public void setDisplayName(String displayName) - { - this.displayName = displayName; - } - - - /** - * Return the description for the governance zone - * - * @return text - */ - public String getDescription() - { - return description; - } - - - /** - * Set up the description of the governance zone - * - * @param description text - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * Return details of the usage of this subject area. - * - * @return text - */ - public String getUsage() - { - return usage; - } - - - /** - * Set up the details of the usage of this subject area. - * - * @param usage text - */ - public void setUsage(String usage) - { - this.usage = usage; - } - - - /** - * Return the definition of the scope of this subject area - * - * @return scope definition - */ - public String getScope() - { - return scope; - } - - - /** - * Set up the scope definition - * - * @param scope string definition - */ - public void setScope(String scope) - { - this.scope = scope; - } - - - /** - * Return the identifier of the governance domain that this subject area is managed by. - * - * @return int identifier - */ - public int getDomainIdentifier() - { - return domainIdentifier; - } - - - /** - * Set up the identifier of the governance domain that this subject area is managed by. - * - * @param domainIdentifier int identifier - */ - public void setDomainIdentifier(int domainIdentifier) - { - this.domainIdentifier = domainIdentifier; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "SubjectAreaProperties{" + - "qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - ", subjectAreaName='" + subjectAreaName + '\'' + - ", displayName='" + displayName + '\'' + - ", description='" + description + '\'' + - ", usage='" + usage + '\'' + - ", scope='" + scope + '\'' + - ", domainIdentifier=" + domainIdentifier + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - SubjectAreaProperties that = (SubjectAreaProperties) objectToCompare; - return domainIdentifier == that.domainIdentifier && - Objects.equals(subjectAreaName, that.subjectAreaName) && - Objects.equals(displayName, that.displayName) && - Objects.equals(description, that.description) && - Objects.equals(usage, that.usage) && - Objects.equals(scope, that.scope); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), getSubjectAreaName(), getDisplayName(), getDescription(), getUsage(), getScope(), getDomainIdentifier()); - } -} diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/properties/ValidValueAssignmentProperties.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/properties/ValidValueAssignmentProperties.java deleted file mode 100644 index df73e3118b2..00000000000 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/properties/ValidValueAssignmentProperties.java +++ /dev/null @@ -1,121 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalarchitecture.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ValidValueAssignmentProperties describes the properties between a referenceable and its valid values. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ValidValueAssignmentProperties extends RelationshipProperties -{ - private boolean strictRequirement = true; - - - /** - * Default constructor - */ - public ValidValueAssignmentProperties() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ValidValueAssignmentProperties(ValidValueAssignmentProperties template) - { - super(template); - - if (template != null) - { - strictRequirement = template.getStrictRequirement(); - } - } - - - /** - * Return the strict requirement flag. - * - * @return boolean - */ - public boolean getStrictRequirement() - { - return strictRequirement; - } - - - /** - * Set up the strict requirement flag. - * - * @param strictRequirement string type name - */ - public void setStrictRequirement(boolean strictRequirement) - { - this.strictRequirement = strictRequirement; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - - @Override - public String toString() - { - return "ValidValueAssignmentProperties{" + - "effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", extendedProperties=" + getExtendedProperties() + - ", strictRequirement=" + strictRequirement + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ValidValueAssignmentProperties that = (ValidValueAssignmentProperties) objectToCompare; - return strictRequirement == that.strictRequirement; - } - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(strictRequirement); - } -} diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/properties/ValidValueMembershipProperties.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/properties/ValidValueMembershipProperties.java deleted file mode 100644 index cfe9cfc197d..00000000000 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/properties/ValidValueMembershipProperties.java +++ /dev/null @@ -1,126 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalarchitecture.properties; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ValidValueMembershipProperties provides a flag to indicate if this value is the default value for the set. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ValidValueMembershipProperties extends RelationshipProperties -{ - boolean isDefaultValue = false; - - /** - * Default constructor - */ - public ValidValueMembershipProperties() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ValidValueMembershipProperties(ValidValueMembershipProperties template) - { - super(template); - - if (template != null) - { - this.isDefaultValue = template.getDefaultValue(); - } - } - - - /** - * Return whether it is a default value. - * - * @return flag - */ - public boolean getDefaultValue() - { - return isDefaultValue; - } - - - /** - * Set up whether it is a default value. - * - * @param defaultValue flag - */ - public void setDefaultValue(boolean defaultValue) - { - this.isDefaultValue = defaultValue; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ValidValueMembershipProperties{" + - "effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", extendedProperties=" + getExtendedProperties() + - ", isDefaultValue=" + isDefaultValue + - ", defaultValue=" + getDefaultValue() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - ValidValueMembershipProperties that = (ValidValueMembershipProperties) objectToCompare; - return isDefaultValue == that.isDefaultValue; - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), isDefaultValue); - } -} diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/properties/ValidValueProperties.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/properties/ValidValueProperties.java deleted file mode 100644 index f62706d55aa..00000000000 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/properties/ValidValueProperties.java +++ /dev/null @@ -1,335 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalarchitecture.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ValidValueProperties provides the common super class for ValidValueSet and ValidValueDefinition. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ValidValueProperties extends ReferenceableProperties -{ - private String displayName = null; - private String description = null; - private String usage = null; - private String scope = null; - private String category = null; - private String preferredValue = null; - private String dataType = null; - private boolean isDeprecated = false; - private boolean isCaseSensitive = false; - - - /** - * Constructor - */ - public ValidValueProperties() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ValidValueProperties(ValidValueProperties template) - { - super(template); - - if (template != null) - { - displayName = template.getDisplayName(); - description = template.getDescription(); - usage = template.getUsage(); - scope = template.getScope(); - category = template.getCategory(); - preferredValue = template.getPreferredValue(); - dataType = template.getDataType(); - isDeprecated = template.getIsDeprecated(); - isCaseSensitive = template.getIsCaseSensitive(); - } - } - - - /** - * Returns the stored display name property for the valid value. - * If no display name is available then null is returned. - * - * @return String name - */ - public String getDisplayName() - { - return displayName; - } - - - /** - * Set up the stored display name property for the valid value. - * - * @param displayName String name - */ - public void setDisplayName(String displayName) - { - this.displayName = displayName; - } - - - /** - * Returns the stored description property for the valid value. - * If no description is provided then null is returned. - * - * @return description String text - */ - public String getDescription() - { - return description; - } - - - /** - * Set up the stored description property associated with the valid value. - * - * @param description String text - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * Return the description of how this valid value should be used. - * - * @return String text - */ - public String getUsage() - { - return usage; - } - - - /** - * Set up the description of how this valid value should be used. - * - * @param usage String text - */ - public void setUsage(String usage) - { - this.usage = usage; - } - - - /** - * Return the scope of values that this valid value covers (normally used with sets) - * - * @return String text - */ - public String getScope() - { - return scope; - } - - - /** - * Set up the scope of values that this valid value covers (normally used with sets) - * - * @param scope String text - */ - public void setScope(String scope) - { - this.scope = scope; - } - - - /** - * Return the category of reference data. - * - * @return string name - */ - public String getCategory() - { - return category; - } - - - /** - * Set up the category of reference data. - * - * @param category string name - */ - public void setCategory(String category) - { - this.category = category; - } - - - /** - * Return the preferred values to use in implementations (normally used with definitions) - * - * @return String value - */ - public String getPreferredValue() - { - return preferredValue; - } - - - /** - * Set up the preferred values to use in implementations (normally used with definitions) - * - * @param preferredValue String value - */ - public void setPreferredValue(String preferredValue) - { - this.preferredValue = preferredValue; - } - - - /** - * Returns the data type of the preferred value. - * - * @return string - */ - public String getDataType() - { - return dataType; - } - - - /** - * Set up the data type of the preferred value. - * - * @param dataType string - */ - public void setDataType(String dataType) - { - this.dataType = dataType; - } - - - /** - * Is the valid value deprecated? - * - * @return boolean flag - */ - public boolean getIsDeprecated() - { - return isDeprecated; - } - - - /** - * Set whether the valid value is deprecated or not. Default is false. - * - * @param deprecated boolean flag - */ - public void setIsDeprecated(boolean deprecated) - { - isDeprecated = deprecated; - } - - - /** - * Return whether this valid value is case-sensitive, or will match irrespective of case. - * - * @return boolean flag - */ - public boolean getIsCaseSensitive() - { - return isCaseSensitive; - } - - - /** - * Set up whether this valid value is case-sensitive, or will match irrespective of case. - * - * @param caseSensitive boolean flag - */ - public void setIsCaseSensitive(boolean caseSensitive) - { - isCaseSensitive = caseSensitive; - } - - - /** - * Generate a string containing the properties. - * - * @return string value - */ - @Override - public String toString() - { - return "ValidValueProperties{" + - "displayName='" + displayName + '\'' + - ", description='" + description + '\'' + - ", usage='" + usage + '\'' + - ", scope='" + scope + '\'' + - ", category='" + category + '\'' + - ", preferredValue='" + preferredValue + '\'' + - ", dataType='" + dataType + '\'' + - ", isDeprecated=" + isDeprecated + - ", isCaseSensitive=" + isCaseSensitive + - ", typeName='" + getTypeName() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ValidValueProperties that = (ValidValueProperties) objectToCompare; - return Objects.equals(displayName, that.displayName) && - Objects.equals(description, that.description) && - Objects.equals(usage, that.usage) && - Objects.equals(scope, that.scope) && - Objects.equals(category, that.category) && - Objects.equals(isDeprecated, that.isDeprecated) && - Objects.equals(isCaseSensitive, that.isCaseSensitive) && - Objects.equals(preferredValue, that.preferredValue) && - Objects.equals(dataType, that.dataType); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), displayName, description, usage, scope, category, preferredValue, dataType, isDeprecated, isCaseSensitive); - } -} diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/ConnectionResponse.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/ConnectionResponse.java deleted file mode 100644 index aef20b3e164..00000000000 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/ConnectionResponse.java +++ /dev/null @@ -1,134 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.digitalarchitecture.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements.ConnectionElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ConnectionResponse is a response object for passing back a single connection object. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ConnectionResponse extends DigitalArchitectureOMASAPIResponse -{ - private ConnectionElement element = null; - - - /** - * Default constructor - */ - public ConnectionResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ConnectionResponse(ConnectionResponse template) - { - super(template); - - if (template != null) - { - element = template.getElement(); - } - } - - - /** - * Return the metadata element. - * - * @return result object - */ - public ConnectionElement getElement() - { - return element; - } - - - /** - * Set up the metadata element to return. - * - * @param element result object - */ - public void setElement(ConnectionElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ConnectionResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ConnectionResponse that = (ConnectionResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/ConnectionsResponse.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/ConnectionsResponse.java deleted file mode 100644 index d80a49aecca..00000000000 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/ConnectionsResponse.java +++ /dev/null @@ -1,146 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.digitalarchitecture.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements.ConnectionElement; - -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ConnectionsResponse is a response object for passing back a list of connection objects. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ConnectionsResponse extends DigitalArchitectureOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public ConnectionsResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ConnectionsResponse(ConnectionsResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return elementList; - } - } - - - /** - * Set up the list of metadata elements to return. - * - * @param elementList result object - */ - public void setElementList(List elementList) - { - this.elementList = elementList; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ConnectionsResponse{" + - "element=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ConnectionsResponse that = (ConnectionsResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/ConnectorTypeResponse.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/ConnectorTypeResponse.java deleted file mode 100644 index 1775354ae09..00000000000 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/ConnectorTypeResponse.java +++ /dev/null @@ -1,134 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.digitalarchitecture.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements.ConnectorTypeElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ConnectorReportResponse is a response object for passing back a single connector type object. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ConnectorTypeResponse extends DigitalArchitectureOMASAPIResponse -{ - private ConnectorTypeElement element = null; - - - /** - * Default constructor - */ - public ConnectorTypeResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ConnectorTypeResponse(ConnectorTypeResponse template) - { - super(template); - - if (template != null) - { - element = template.getElement(); - } - } - - - /** - * Return the metadata element. - * - * @return result object - */ - public ConnectorTypeElement getElement() - { - return element; - } - - - /** - * Set up the metadata element to return. - * - * @param element result object - */ - public void setElement(ConnectorTypeElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ConnectorTypeResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ConnectorTypeResponse that = (ConnectorTypeResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/ConnectorTypesResponse.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/ConnectorTypesResponse.java deleted file mode 100644 index a44988395b9..00000000000 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/ConnectorTypesResponse.java +++ /dev/null @@ -1,146 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.digitalarchitecture.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements.ConnectorTypeElement; - -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ConnectorTypesResponse is a response object for passing back a list of connector type objects. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ConnectorTypesResponse extends DigitalArchitectureOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public ConnectorTypesResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ConnectorTypesResponse(ConnectorTypesResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return elementList; - } - } - - - /** - * Set up the list of metadata elements to return. - * - * @param elementList result object - */ - public void setElementList(List elementList) - { - this.elementList = elementList; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ConnectorTypesResponse{" + - "element=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ConnectorTypesResponse that = (ConnectorTypesResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/DigitalArchitectureOMASAPIResponse.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/DigitalArchitectureOMASAPIResponse.java deleted file mode 100644 index 53c2b3df6a9..00000000000 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/DigitalArchitectureOMASAPIResponse.java +++ /dev/null @@ -1,79 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalarchitecture.rest; - -import com.fasterxml.jackson.annotation.*; -import org.odpi.openmetadata.commonservices.ffdc.rest.FFDCResponseBase; - -import java.util.Arrays; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * DigitalArchitectureOMASAPIResponse provides a common header for Digital Architecture OMAS managed rest to its REST API. - * It manages information about exceptions. If no exception has been raised exceptionClassName is null. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes( - { - @JsonSubTypes.Type(value = ReferenceValueAssignmentDefinitionsResponse.class, name = "ReferenceValueAssignmentDefinitionsResponse"), - @JsonSubTypes.Type(value = ReferenceValueAssignmentItemsResponse.class, name = "ReferenceValueAssignmentItemsResponse"), - @JsonSubTypes.Type(value = ValidValueAssignmentConsumersResponse.class, name = "ValidValueAssignmentConsumersResponse"), - @JsonSubTypes.Type(value = ValidValueAssignmentDefinitionsResponse.class, name = "ValidValueAssignmentDefinitionsResponse"), - @JsonSubTypes.Type(value = ValidValueMappingsResponse.class, name = "ValidValueMappingsResponse"), - @JsonSubTypes.Type(value = ValidValueResponse.class, name = "ValidValueResponse"), - @JsonSubTypes.Type(value = ValidValuesImplAssetsResponse.class, name = "ValidValuesImplAssetsResponse"), - @JsonSubTypes.Type(value = ValidValuesImplDefinitionsResponse.class, name = "ValidValuesImplDefinitionsResponse"), - @JsonSubTypes.Type(value = ValidValuesMappingsResponse.class, name = "ValidValuesMappingsResponse"), - @JsonSubTypes.Type(value = ValidValuesResponse.class, name = "ValidValuesResponse"), - - }) -public abstract class DigitalArchitectureOMASAPIResponse extends FFDCResponseBase -{ - /** - * Default constructor - */ - public DigitalArchitectureOMASAPIResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public DigitalArchitectureOMASAPIResponse(DigitalArchitectureOMASAPIResponse template) - { - super(template); - } - - - /** - * JSON-like toString - * - * @return string containing the property names and values - */ - @Override - public String toString() - { - return "DigitalArchitectureOMASAPIResponse{" + - "exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } -} diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/EmbeddedConnectionRequestBody.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/EmbeddedConnectionRequestBody.java deleted file mode 100644 index a1cc9a8aeae..00000000000 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/EmbeddedConnectionRequestBody.java +++ /dev/null @@ -1,187 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalarchitecture.rest; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * The EmbeddedConnection is used within a VirtualConnection to link to the embedded connections. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class EmbeddedConnectionRequestBody -{ - /* - * Attributes of an embedded connection - */ - protected int position = 0; - protected String displayName = null; - protected Map arguments = null; - - - /** - * Default constructor - */ - public EmbeddedConnectionRequestBody() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template element to copy - */ - public EmbeddedConnectionRequestBody(EmbeddedConnectionRequestBody template) - { - if (template != null) - { - position = template.getPosition(); - displayName = template.getDisplayName(); - arguments = template.getArguments(); - } - } - - - /** - * Return the position that this connector is in the list of embedded connectors. - * - * @return int - */ - public int getPosition() - { - return position; - } - - - /** - * Set up the position that this connector is in the list of embedded connectors. - * - * @param position int - */ - public void setPosition(int position) - { - this.position = position; - } - - - /** - * Return the printable name of the embedded connection. - * - * @return String name - */ - public String getDisplayName() - { - return displayName; - } - - - /** - * Set up the printable name of the embedded connection. - * - * @param displayName String name - */ - public void setDisplayName(String displayName) - { - this.displayName = displayName; - } - - - /** - * Return the arguments for the embedded connection. - * - * @return property map - */ - public Map getArguments() - { - if (arguments == null) - { - return null; - } - else if (arguments.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(arguments); - } - } - - - /** - * Set up the arguments for the embedded connection. - * - * @param arguments property map - */ - public void setArguments(Map arguments) - { - this.arguments = arguments; - } - - - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "EmbeddedConnection{" + - "position=" + position + - ", displayName='" + displayName + '\'' + - ", arguments=" + arguments + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - EmbeddedConnectionRequestBody that = (EmbeddedConnectionRequestBody) objectToCompare; - return position == that.position && - Objects.equals(displayName, that.displayName) && - Objects.equals(arguments, that.arguments); - } - - - /** - * Create a hash code for this element type. - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(position, displayName, arguments); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/EndpointResponse.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/EndpointResponse.java deleted file mode 100644 index 87a3f918a13..00000000000 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/EndpointResponse.java +++ /dev/null @@ -1,134 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.digitalarchitecture.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements.EndpointElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * EndpointResponse is a response object for passing back a single endpoint object. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class EndpointResponse extends DigitalArchitectureOMASAPIResponse -{ - private EndpointElement element = null; - - - /** - * Default constructor - */ - public EndpointResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public EndpointResponse(EndpointResponse template) - { - super(template); - - if (template != null) - { - element = template.getElement(); - } - } - - - /** - * Return the metadata element. - * - * @return result object - */ - public EndpointElement getElement() - { - return element; - } - - - /** - * Set up the metadata element to return. - * - * @param element result object - */ - public void setElement(EndpointElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "EndpointResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - EndpointResponse that = (EndpointResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/EndpointsResponse.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/EndpointsResponse.java deleted file mode 100644 index ec2061a32da..00000000000 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/EndpointsResponse.java +++ /dev/null @@ -1,146 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.digitalarchitecture.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements.EndpointElement; - -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * EndpointsResponse is a response object for passing back a list of endpoint objects. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class EndpointsResponse extends DigitalArchitectureOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public EndpointsResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public EndpointsResponse(EndpointsResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return elementList; - } - } - - - /** - * Set up the list of metadata elements to return. - * - * @param elementList result object - */ - public void setElementList(List elementList) - { - this.elementList = elementList; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "EndpointsResponse{" + - "element=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - EndpointsResponse that = (EndpointsResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/LocationResponse.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/LocationResponse.java deleted file mode 100644 index ad98e276e31..00000000000 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/LocationResponse.java +++ /dev/null @@ -1,134 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.digitalarchitecture.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements.LocationElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * LocationResponse is a response object for passing back a single location object. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class LocationResponse extends DigitalArchitectureOMASAPIResponse -{ - private LocationElement element = null; - - - /** - * Default constructor - */ - public LocationResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public LocationResponse(LocationResponse template) - { - super(template); - - if (template != null) - { - element = template.getElement(); - } - } - - - /** - * Return the metadata element. - * - * @return result object - */ - public LocationElement getElement() - { - return element; - } - - - /** - * Set up the metadata element to return. - * - * @param element result object - */ - public void setElement(LocationElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "LocationResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - LocationResponse that = (LocationResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/LocationsResponse.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/LocationsResponse.java deleted file mode 100644 index b189f3d1bfe..00000000000 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/LocationsResponse.java +++ /dev/null @@ -1,146 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.digitalarchitecture.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements.LocationElement; - -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * LocationsResponse is a response object for passing back a list of location objects. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class LocationsResponse extends DigitalArchitectureOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public LocationsResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public LocationsResponse(LocationsResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return elementList; - } - } - - - /** - * Set up the list of metadata elements to return. - * - * @param elementList result object - */ - public void setElementList(List elementList) - { - this.elementList = elementList; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "LocationsResponse{" + - "element=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - LocationsResponse that = (LocationsResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/ReferenceValueAssignmentDefinitionsResponse.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/ReferenceValueAssignmentDefinitionsResponse.java deleted file mode 100644 index e09916cae15..00000000000 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/ReferenceValueAssignmentDefinitionsResponse.java +++ /dev/null @@ -1,146 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.digitalarchitecture.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements.ReferenceValueAssignmentDefinitionElement; - -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ReferenceValueAssignmentDefinitionsResponse is a response object for passing back a list of elements. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ReferenceValueAssignmentDefinitionsResponse extends DigitalArchitectureOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public ReferenceValueAssignmentDefinitionsResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ReferenceValueAssignmentDefinitionsResponse(ReferenceValueAssignmentDefinitionsResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the metadata element. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return elementList; - } - } - - - /** - * Set up the metadata element to return. - * - * @param elementList result object - */ - public void setElementList(List elementList) - { - this.elementList = elementList; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ReferenceValueAssignmentDefinitionsResponse{" + - "element=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ReferenceValueAssignmentDefinitionsResponse that = (ReferenceValueAssignmentDefinitionsResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/ReferenceValueAssignmentItemsResponse.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/ReferenceValueAssignmentItemsResponse.java deleted file mode 100644 index 917dea1ec09..00000000000 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/ReferenceValueAssignmentItemsResponse.java +++ /dev/null @@ -1,146 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.digitalarchitecture.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements.ReferenceValueAssignmentItemElement; - -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ReferenceValueAssignmentItemsResponse is a response object for passing back a list of elements. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ReferenceValueAssignmentItemsResponse extends DigitalArchitectureOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public ReferenceValueAssignmentItemsResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ReferenceValueAssignmentItemsResponse(ReferenceValueAssignmentItemsResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the metadata element. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return elementList; - } - } - - - /** - * Set up the metadata element to return. - * - * @param elementList result object - */ - public void setElementList(List elementList) - { - this.elementList = elementList; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ReferenceValueAssignmentItemsResponse{" + - "element=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ReferenceValueAssignmentItemsResponse that = (ReferenceValueAssignmentItemsResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/ValidValueAssignmentConsumersResponse.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/ValidValueAssignmentConsumersResponse.java deleted file mode 100644 index 70997d09754..00000000000 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/ValidValueAssignmentConsumersResponse.java +++ /dev/null @@ -1,146 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.digitalarchitecture.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements.ValidValueAssignmentConsumerElement; - -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ValidValueAssignmentConsumersResponse is a response object for passing back a list of elements. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ValidValueAssignmentConsumersResponse extends DigitalArchitectureOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public ValidValueAssignmentConsumersResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ValidValueAssignmentConsumersResponse(ValidValueAssignmentConsumersResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the metadata element. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return elementList; - } - } - - - /** - * Set up the metadata element to return. - * - * @param elementList result object - */ - public void setElementList(List elementList) - { - this.elementList = elementList; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ValidValueAssignmentConsumersResponse{" + - "element=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ValidValueAssignmentConsumersResponse that = (ValidValueAssignmentConsumersResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/ValidValueAssignmentDefinitionsResponse.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/ValidValueAssignmentDefinitionsResponse.java deleted file mode 100644 index 675978dfd61..00000000000 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/ValidValueAssignmentDefinitionsResponse.java +++ /dev/null @@ -1,146 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.digitalarchitecture.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements.ValidValueAssignmentDefinitionElement; - -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ValidValueAssignmentDefinitionsResponse is a response object for passing back a list of elements. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ValidValueAssignmentDefinitionsResponse extends DigitalArchitectureOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public ValidValueAssignmentDefinitionsResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ValidValueAssignmentDefinitionsResponse(ValidValueAssignmentDefinitionsResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the metadata element. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return elementList; - } - } - - - /** - * Set up the metadata element to return. - * - * @param elementList result object - */ - public void setElementList(List elementList) - { - this.elementList = elementList; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ValidValueAssignmentDefinitionsResponse{" + - "element=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ValidValueAssignmentDefinitionsResponse that = (ValidValueAssignmentDefinitionsResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/ValidValueMappingsResponse.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/ValidValueMappingsResponse.java deleted file mode 100644 index 074e3ef4268..00000000000 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/ValidValueMappingsResponse.java +++ /dev/null @@ -1,146 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.digitalarchitecture.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements.ValidValueMappingElement; - -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ValidValueMappingsResponse is a response object for passing back a list of valid value mappings. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ValidValueMappingsResponse extends DigitalArchitectureOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public ValidValueMappingsResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ValidValueMappingsResponse(ValidValueMappingsResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the metadata element. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return elementList; - } - } - - - /** - * Set up the metadata element to return. - * - * @param elementList result object - */ - public void setElementList(List elementList) - { - this.elementList = elementList; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ValidValuesMappingsResponse{" + - "element=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ValidValueMappingsResponse that = (ValidValueMappingsResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/ValidValueResponse.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/ValidValueResponse.java deleted file mode 100644 index e9c0d800042..00000000000 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/ValidValueResponse.java +++ /dev/null @@ -1,134 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.digitalarchitecture.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements.ValidValueElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ValidValueResponse is a response object for passing back a single valid value object. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ValidValueResponse extends DigitalArchitectureOMASAPIResponse -{ - private ValidValueElement element = null; - - - /** - * Default constructor - */ - public ValidValueResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ValidValueResponse(ValidValueResponse template) - { - super(template); - - if (template != null) - { - element = template.getElement(); - } - } - - - /** - * Return the metadata element. - * - * @return result object - */ - public ValidValueElement getElement() - { - return element; - } - - - /** - * Set up the metadata element to return. - * - * @param element result object - */ - public void setElement(ValidValueElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ValidValueResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ValidValueResponse that = (ValidValueResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/ValidValuesImplAssetsResponse.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/ValidValuesImplAssetsResponse.java deleted file mode 100644 index df40919ee89..00000000000 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/ValidValuesImplAssetsResponse.java +++ /dev/null @@ -1,147 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.digitalarchitecture.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements.ValidValueImplAssetElement; - -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ValidValuesImplAssetsResponse is a response object for passing back a list of assets (reference data sets) - * that use the valid value in their implementation. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ValidValuesImplAssetsResponse extends DigitalArchitectureOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public ValidValuesImplAssetsResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ValidValuesImplAssetsResponse(ValidValuesImplAssetsResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the metadata element. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return elementList; - } - } - - - /** - * Set up the metadata element to return. - * - * @param elementList result object - */ - public void setElementList(List elementList) - { - this.elementList = elementList; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ValidValuesImplAssetsResponse{" + - "element=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ValidValuesImplAssetsResponse that = (ValidValuesImplAssetsResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/ValidValuesImplDefinitionsResponse.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/ValidValuesImplDefinitionsResponse.java deleted file mode 100644 index 39b968fd2fb..00000000000 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/ValidValuesImplDefinitionsResponse.java +++ /dev/null @@ -1,146 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.digitalarchitecture.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements.ValidValueImplDefinitionElement; - -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ValidValuesImplDefinitionsResponse is a response object for passing back a list of elements. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ValidValuesImplDefinitionsResponse extends DigitalArchitectureOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public ValidValuesImplDefinitionsResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ValidValuesImplDefinitionsResponse(ValidValuesImplDefinitionsResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the metadata element. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return elementList; - } - } - - - /** - * Set up the metadata element to return. - * - * @param elementList result object - */ - public void setElementList(List elementList) - { - this.elementList = elementList; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ValidValuesImplDefinitionsResponse{" + - "element=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ValidValuesImplDefinitionsResponse that = (ValidValuesImplDefinitionsResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/ValidValuesMappingsResponse.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/ValidValuesMappingsResponse.java deleted file mode 100644 index a719291927c..00000000000 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/ValidValuesMappingsResponse.java +++ /dev/null @@ -1,146 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.digitalarchitecture.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements.ValidValuesMappingElement; - -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ValidValuesMappingsResponse is a response object for passing back a list of valid value mappings. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ValidValuesMappingsResponse extends DigitalArchitectureOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public ValidValuesMappingsResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ValidValuesMappingsResponse(ValidValuesMappingsResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the metadata element. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return elementList; - } - } - - - /** - * Set up the metadata element to return. - * - * @param elementList result object - */ - public void setElementList(List elementList) - { - this.elementList = elementList; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ValidValuesMappingsResponse{" + - "element=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ValidValuesMappingsResponse that = (ValidValuesMappingsResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/ValidValuesResponse.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/ValidValuesResponse.java deleted file mode 100644 index 51301eed22b..00000000000 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/ValidValuesResponse.java +++ /dev/null @@ -1,146 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.digitalarchitecture.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements.ValidValueElement; - -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ValidValuesResponse is a response object for passing back a list of valid value objects. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ValidValuesResponse extends DigitalArchitectureOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public ValidValuesResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ValidValuesResponse(ValidValuesResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return elementList; - } - } - - - /** - * Set up the list of metadata elements to return. - * - * @param elementList result object - */ - public void setElementList(List elementList) - { - this.elementList = elementList; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ValidValuesResponse{" + - "element=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ValidValuesResponse that = (ValidValuesResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/package-info.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/package-info.java deleted file mode 100644 index 3813a49de90..00000000000 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/package-info.java +++ /dev/null @@ -1,12 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -/** - * This package defines the beans used to build the REST request and response payloads. - * - * REST APIs can pass parameters in their URLs (called path variables) as well has having a RequestBody bean - * for additional, more complex, or optional parameters. Responses are returned in response beans. - * - * The response beans encode the return type of the method as well as any exceptions and associated messages. - */ -package org.odpi.openmetadata.accessservices.digitalarchitecture.rest; diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/test/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/MockAPIResponse.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/test/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/MockAPIResponse.java deleted file mode 100644 index 0ba3b486db9..00000000000 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/test/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/MockAPIResponse.java +++ /dev/null @@ -1,29 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalarchitecture.rest; - -/** - * MockAPIResponse enables the overridden methods of DigitalArchitectureOMASAPIResponse to be tested. - */ -public class MockAPIResponse extends DigitalArchitectureOMASAPIResponse -{ - private static final long serialVersionUID = 1L; - - /** - * Default constructor - */ - public MockAPIResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to clone - */ - public MockAPIResponse(MockAPIResponse template) - { - super(template); - } -} diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/test/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/OMASAPIResponseTest.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/test/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/OMASAPIResponseTest.java deleted file mode 100644 index 9ddd77cacf7..00000000000 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/test/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/OMASAPIResponseTest.java +++ /dev/null @@ -1,21 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalarchitecture.rest; - -import org.testng.annotations.Test; - -import static org.testng.Assert.assertTrue; - -/** - * Test the overridden methods of DigitalArchitectureOMASAPIResponse - */ -public class OMASAPIResponseTest -{ - @Test public void TestToString() - { - MockAPIResponse testObject = new MockAPIResponse(); - - assertTrue(testObject.toString().contains("DigitalArchitectureOMASAPIResponse")); - assertTrue(new MockAPIResponse(testObject).toString().contains("DigitalArchitectureOMASAPIResponse")); - } -} diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-client/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/client/ConnectionManager.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-client/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/client/ConnectionManager.java index c22be9286aa..7d97498ac43 100644 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-client/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/client/ConnectionManager.java +++ b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-client/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/client/ConnectionManager.java @@ -4,22 +4,14 @@ import org.odpi.openmetadata.accessservices.digitalarchitecture.api.ManageConnections; import org.odpi.openmetadata.accessservices.digitalarchitecture.client.rest.DigitalArchitectureRESTClient; -import org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements.ConnectionElement; -import org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements.EndpointElement; -import org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements.ConnectorTypeElement; -import org.odpi.openmetadata.accessservices.digitalarchitecture.properties.ConnectionProperties; -import org.odpi.openmetadata.accessservices.digitalarchitecture.properties.EndpointProperties; -import org.odpi.openmetadata.accessservices.digitalarchitecture.properties.ConnectorTypeProperties; import org.odpi.openmetadata.accessservices.digitalarchitecture.properties.TemplateProperties; -import org.odpi.openmetadata.accessservices.digitalarchitecture.rest.*; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.StringRequestBody; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.*; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; import java.util.List; import java.util.Map; @@ -671,7 +663,7 @@ public List findConnections(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -720,7 +712,7 @@ public List getConnectionsByName(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -966,7 +958,7 @@ public List findEndpoints(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -1015,7 +1007,7 @@ public List getEndpointsByName(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -1255,7 +1247,7 @@ public List findConnectorTypes(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -1304,7 +1296,7 @@ public List getConnectorTypesByName(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -1334,11 +1326,11 @@ public ConnectorTypeElement getConnectorTypeByGUID(String userId, final String urlTemplate = serverPlatformURLRoot + "/servers/{0}/open-metadata/access-services/digital-architecture/users/{1}/connector-types/{2}"; - ConnectorTypeResponse restResult = restClient.callMyConnectorTypeGetRESTCall(methodName, - urlTemplate, - serverName, - userId, - connectorTypeGUID); + ConnectorTypeResponse restResult = restClient.callConnectorTypeGetRESTCall(methodName, + urlTemplate, + serverName, + userId, + connectorTypeGUID); return restResult.getElement(); } } diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-client/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/client/LocationManager.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-client/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/client/LocationManager.java index 50c5ff4a3b5..b8746435cf1 100644 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-client/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/client/LocationManager.java +++ b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-client/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/client/LocationManager.java @@ -4,16 +4,14 @@ import org.odpi.openmetadata.accessservices.digitalarchitecture.api.ManageLocations; import org.odpi.openmetadata.accessservices.digitalarchitecture.client.rest.DigitalArchitectureRESTClient; -import org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements.*; -import org.odpi.openmetadata.accessservices.digitalarchitecture.properties.*; -import org.odpi.openmetadata.accessservices.digitalarchitecture.rest.*; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; +import org.odpi.openmetadata.accessservices.digitalarchitecture.properties.TemplateProperties; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.LocationElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.locations.LocationProperties; import java.util.List; @@ -714,7 +712,7 @@ public List findLocations(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -763,7 +761,7 @@ public List getLocationsByName(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-client/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/client/ReferenceDataManager.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-client/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/client/ReferenceDataManager.java index acf0fad5ad4..acc21f67fcc 100644 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-client/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/client/ReferenceDataManager.java +++ b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-client/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/client/ReferenceDataManager.java @@ -4,16 +4,17 @@ import org.odpi.openmetadata.accessservices.digitalarchitecture.api.ManageReferenceData; import org.odpi.openmetadata.accessservices.digitalarchitecture.client.rest.DigitalArchitectureRESTClient; -import org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements.*; -import org.odpi.openmetadata.accessservices.digitalarchitecture.properties.*; -import org.odpi.openmetadata.accessservices.digitalarchitecture.rest.*; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues.ReferenceValueAssignmentProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues.ValidValueAssignmentProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues.ValidValuesImplProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues.ValidValuesMappingProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues.ValidValueProperties; import java.util.List; @@ -956,7 +957,7 @@ public List getValidValueByName(String userId, startFrom, pageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -1006,7 +1007,7 @@ public List findValidValues(String userId, startFrom, pageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -1048,7 +1049,7 @@ public List getValidValueSetMembers(String userId, validValueSetGUID, startFrom, pageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -1090,7 +1091,7 @@ public List getSetsForValidValue(String userId, validValueGUID, startFrom, pageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -1133,7 +1134,7 @@ public List getValidValuesAssignmentConsume validValueGUID, startFrom, pageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -1176,7 +1177,7 @@ public List getValidValuesAssignmentDefin referenceableGUID, startFrom, pageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -1219,7 +1220,7 @@ public List getValidValuesImplementationAssets(Strin validValueGUID, startFrom, pageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -1263,7 +1264,7 @@ public List getValidValuesImplementationDefinit assetGUID, startFrom, pageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -1307,7 +1308,7 @@ public List getValidValueMappings(String userId, validValueGUID, startFrom, pageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -1352,7 +1353,7 @@ public List getValidValuesMappings(String userI validValueGUID, startFrom, pageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -1396,7 +1397,7 @@ public List getReferenceValueAssignedItems( validValueGUID, startFrom, pageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -1440,6 +1441,6 @@ public List getReferenceValueAssignme referenceableGUID, startFrom, pageSize); - return restResult.getElementList(); + return restResult.getElements(); } } diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-client/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/client/TemplateManager.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-client/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/client/TemplateManager.java index a69ebb74065..8d1ad9f2116 100644 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-client/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/client/TemplateManager.java +++ b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-client/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/client/TemplateManager.java @@ -7,7 +7,7 @@ import org.odpi.openmetadata.accessservices.digitalarchitecture.api.ManageTemplates; import org.odpi.openmetadata.accessservices.digitalarchitecture.client.rest.DigitalArchitectureRESTClient; import org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements.TemplateElement; -import org.odpi.openmetadata.accessservices.digitalarchitecture.properties.TemplateClassificationProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.templates.TemplateClassificationProperties; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-client/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/client/rest/DigitalArchitectureRESTClient.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-client/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/client/rest/DigitalArchitectureRESTClient.java index 0a9b231c2fa..8960d24ea3c 100644 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-client/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/client/rest/DigitalArchitectureRESTClient.java +++ b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-client/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/client/rest/DigitalArchitectureRESTClient.java @@ -2,12 +2,9 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.digitalarchitecture.client.rest; -import org.odpi.openmetadata.accessservices.digitalarchitecture.rest.*; -import org.odpi.openmetadata.commonservices.ffdc.rest.FFDCRESTClient; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; /** @@ -89,554 +86,4 @@ public DigitalArchitectureRESTClient(String serverName, } - /** - * Issue a GET REST call that returns a LocationResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return LocationResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public LocationResponse callLocationGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - LocationResponse restResult = this.callGetRESTCall(methodName, LocationResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a POST REST call that returns a LocationsResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param requestBody properties describing the valid value definition/set - * @param params a list of parameters that are slotted into the url template. - * - * @return LocationsResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public LocationsResponse callLocationsPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - LocationsResponse restResult = this.callPostRESTCall(methodName, LocationsResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a ConnectionResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return ConnectionResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public ConnectionResponse callConnectionGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ConnectionResponse restResult = this.callGetRESTCall(methodName, ConnectionResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a POST REST call that returns a ConnectionsResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return ConnectionsResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public ConnectionsResponse callConnectionsGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ConnectionsResponse restResult = this.callGetRESTCall(methodName, ConnectionsResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - - /** - * Issue a POST REST call that returns a ConnectionsResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param requestBody properties describing the valid value definition/set - * @param params a list of parameters that are slotted into the url template. - * - * @return ConnectionsResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public ConnectionsResponse callConnectionsPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ConnectionsResponse restResult = this.callPostRESTCall(methodName, ConnectionsResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a ConnectorReportResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return ConnectorReportResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public ConnectorTypeResponse callMyConnectorTypeGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ConnectorTypeResponse restResult = this.callGetRESTCall(methodName, ConnectorTypeResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a POST REST call that returns a ConnectorTypesResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param requestBody properties describing the valid value definition/set - * @param params a list of parameters that are slotted into the url template. - * - * @return ConnectorTypesResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public ConnectorTypesResponse callConnectorTypesPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ConnectorTypesResponse restResult = this.callPostRESTCall(methodName, ConnectorTypesResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a EndpointResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return EndpointResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public EndpointResponse callEndpointGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - EndpointResponse restResult = this.callGetRESTCall(methodName, EndpointResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a POST REST call that returns a EndpointsResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param requestBody properties describing the valid value definition/set - * @param params a list of parameters that are slotted into the url template. - * - * @return EndpointsResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public EndpointsResponse callEndpointsPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - EndpointsResponse restResult = this.callPostRESTCall(methodName, EndpointsResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a ValidValuesResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return ValidValueResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public ValidValueResponse callValidValueGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ValidValueResponse restResult = this.callGetRESTCall(methodName, ValidValueResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a ValidValuesResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return ValidValuesResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public ValidValuesResponse callValidValuesGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ValidValuesResponse restResult = this.callGetRESTCall(methodName, ValidValuesResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a POST REST call that returns a ValidValuesResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param requestBody properties describing the valid value definition/set - * @param params a list of parameters that are slotted into the url template. - * - * @return ValidValuesResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public ValidValuesResponse callValidValuesPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ValidValuesResponse restResult = this.callPostRESTCall(methodName, ValidValuesResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a ValidValueAssignmentConsumersResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return ValidValueAssignmentConsumersResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public ValidValueAssignmentConsumersResponse callValidValueAssignmentConsumersGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ValidValueAssignmentConsumersResponse restResult = this.callGetRESTCall(methodName, - ValidValueAssignmentConsumersResponse.class, - urlTemplate, - params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a ValidValueAssignmentDefinitionsResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return ValidValueAssignmentConsumersResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public ValidValueAssignmentDefinitionsResponse callValidValueAssignmentDefinitionsGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ValidValueAssignmentDefinitionsResponse restResult = this.callGetRESTCall(methodName, - ValidValueAssignmentDefinitionsResponse.class, - urlTemplate, - params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a ValidValuesImplAssetsResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return ValidValuesImplAssetsResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException something went wrong with the REST call stack. - */ - public ValidValuesImplAssetsResponse callValidValuesImplAssetsGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ValidValuesImplAssetsResponse restResult = this.callGetRESTCall(methodName, ValidValuesImplAssetsResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a ValidValuesImplDefinitionsResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return ValidValuesImplAssetsResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException something went wrong with the REST call stack. - */ - public ValidValuesImplDefinitionsResponse callValidValuesImplDefinitionsGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ValidValuesImplDefinitionsResponse restResult = this.callGetRESTCall(methodName, - ValidValuesImplDefinitionsResponse.class, - urlTemplate, - params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a ReferenceValueAssignmentDefinitionsResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return ValidValuesImplAssetsResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException something went wrong with the REST call stack. - */ - public ReferenceValueAssignmentDefinitionsResponse callReferenceValueAssignmentDefinitionsGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ReferenceValueAssignmentDefinitionsResponse restResult = this.callGetRESTCall(methodName, - ReferenceValueAssignmentDefinitionsResponse.class, - urlTemplate, - params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a ReferenceValueAssignmentItemsResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return ValidValuesImplAssetsResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException something went wrong with the REST call stack. - */ - public ReferenceValueAssignmentItemsResponse callReferenceValueAssignmentItemsGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ReferenceValueAssignmentItemsResponse restResult = this.callGetRESTCall(methodName, - ReferenceValueAssignmentItemsResponse.class, - urlTemplate, - params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a ValidValueMappingsResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return ValidValuesImplAssetsResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException something went wrong with the REST call stack. - */ - public ValidValueMappingsResponse callValidValueMappingsGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ValidValueMappingsResponse restResult = this.callGetRESTCall(methodName, - ValidValueMappingsResponse.class, - urlTemplate, - params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a ValidValueMappingsResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return ValidValuesImplAssetsResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException something went wrong with the REST call stack. - */ - public ValidValuesMappingsResponse callValidValuesMappingsGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ValidValuesMappingsResponse restResult = this.callGetRESTCall(methodName, - ValidValuesMappingsResponse.class, - urlTemplate, - params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } } diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/converters/ConnectionConverter.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/converters/ConnectionConverter.java deleted file mode 100644 index 7060351e389..00000000000 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/converters/ConnectionConverter.java +++ /dev/null @@ -1,156 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalarchitecture.converters; - -import org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements.ConnectionElement; -import org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements.EmbeddedConnection; -import org.odpi.openmetadata.accessservices.digitalarchitecture.properties.ConnectionProperties; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; -import java.util.ArrayList; -import java.util.List; - -/** - * ConnectionConverter transfers the relevant properties from some Open Metadata Repository Services (OMRS) - * EntityDetail and Relationship objects into a Connection bean (or a VirtualConnection bean). - */ -public class ConnectionConverter extends DigitalArchitectureOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public ConnectionConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - /** - * Using the supplied instances, return a new instance of the bean. It is used for beans such as - * a connection bean which made up of 3 entities (Connection, ConnectorType and Endpoint) plus the - * relationships between them. The relationships may be omitted if they do not have an properties. - * - * @param beanClass name of the class to create - * @param primaryEntity entity that is the root of the collection of entities that make up the - * content of the bean - * @param supplementaryEntities entities connected to the primary entity by the relationships - * @param relationships relationships linking the entities - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - @SuppressWarnings(value = "unchecked") - public B getNewComplexBean(Class beanClass, - EntityDetail primaryEntity, - List supplementaryEntities, - List relationships, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof ConnectionElement) - { - ConnectionElement bean = (ConnectionElement) returnBean; - ConnectionProperties connectionProperties = new ConnectionProperties(); - - if (primaryEntity != null) - { - bean.setElementHeader(this.getMetadataElementHeader(beanClass, primaryEntity, methodName)); - - /* - * The initial set of values come from the entity. - */ - InstanceProperties instanceProperties = new InstanceProperties(primaryEntity.getProperties()); - - connectionProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); - connectionProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); - connectionProperties.setDisplayName(this.removeDisplayName(instanceProperties)); - connectionProperties.setDescription(this.removeDescription(instanceProperties)); - connectionProperties.setSecuredProperties(this.removeSecuredProperties(instanceProperties)); - connectionProperties.setConfigurationProperties(this.removeConfigurationProperties(instanceProperties)); - connectionProperties.setUserId(this.removeUserId(instanceProperties)); - connectionProperties.setClearPassword(this.removeClearPassword(instanceProperties)); - connectionProperties.setEncryptedPassword(this.removeEncryptedPassword(instanceProperties)); - /* - * Any remaining properties are returned in the extended properties. They are - * assumed to be defined in a subtype. - */ - connectionProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); - connectionProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - - bean.setConnectionProperties(connectionProperties); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - - if (relationships != null) - { - List embeddedConnections = new ArrayList<>(); - - for (Relationship relationship : relationships) - { - if ((relationship != null) && (relationship.getType() != null)) - { - if (repositoryHelper.isTypeOf(serviceName, relationship.getType().getTypeDefName(), OpenMetadataType.EMBEDDED_CONNECTION_TYPE_NAME)) - { - EmbeddedConnection embeddedConnection = new EmbeddedConnection(); - - InstanceProperties relationshipProperties = relationship.getProperties(); - - embeddedConnection.setPosition(this.getPosition(relationshipProperties)); - embeddedConnection.setDisplayName(this.getDisplayName(relationshipProperties)); - embeddedConnection.setArguments(this.getArguments(relationshipProperties)); - - embeddedConnection.setEmbeddedConnection(getElementStub(beanClass, relationship.getEntityTwoProxy(), methodName)); - - embeddedConnections.add(embeddedConnection); - } - else if (repositoryHelper.isTypeOf(serviceName, relationship.getType().getTypeDefName(), OpenMetadataType.CONNECTION_CONNECTOR_TYPE_TYPE_NAME)) - { - bean.setConnectorType(getElementStub(beanClass, relationship.getEntityTwoProxy(), methodName)); - } - else if (repositoryHelper.isTypeOf(serviceName, relationship.getType().getTypeDefName(), OpenMetadataType.CONNECTION_ENDPOINT_TYPE_NAME)) - { - bean.setEndpoint(getElementStub(beanClass, relationship.getEntityOneProxy(), methodName)); - } - } - } - - if (! embeddedConnections.isEmpty()) - { - bean.setEmbeddedConnections(embeddedConnections); - } - } - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } -} diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/converters/ConnectorTypeConverter.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/converters/ConnectorTypeConverter.java deleted file mode 100644 index 0a57d0a62ab..00000000000 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/converters/ConnectorTypeConverter.java +++ /dev/null @@ -1,136 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalarchitecture.converters; - -import org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements.ConnectorTypeElement; -import org.odpi.openmetadata.accessservices.digitalarchitecture.properties.ConnectorTypeProperties; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; - -/** - * ConnectorTypeConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) - * EntityDetail object into a ConnectorTypeElement bean. - */ -public class ConnectorTypeConverter extends DigitalArchitectureOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity/relationship objects - * @param serviceName name of this component - * @param serverName local server name - */ - public ConnectorTypeConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof ConnectorTypeElement) - { - ConnectorTypeElement bean = (ConnectorTypeElement) returnBean; - ConnectorTypeProperties connectorTypeProperties = new ConnectorTypeProperties(); - - if (entity != null) - { - bean.setElementHeader(this.getMetadataElementHeader(beanClass, entity, methodName)); - - /* - * The initial set of values come from the entity. - */ - InstanceProperties instanceProperties = new InstanceProperties(entity.getProperties()); - - connectorTypeProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); - connectorTypeProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); - connectorTypeProperties.setDisplayName(this.removeDisplayName(instanceProperties)); - connectorTypeProperties.setDescription(this.removeDescription(instanceProperties)); - connectorTypeProperties.setSupportedAssetTypeName(this.removeSupportedAssetTypeName(instanceProperties)); - connectorTypeProperties.setExpectedDataFormat(this.removeExpectedDataFormat(instanceProperties)); - connectorTypeProperties.setConnectorProviderClassName(this.removeConnectorProviderClassName(instanceProperties)); - connectorTypeProperties.setConnectorFrameworkName(this.removeConnectorFrameworkName(instanceProperties)); - connectorTypeProperties.setConnectorInterfaceLanguage(this.removeConnectorInterfaceLanguage(instanceProperties)); - connectorTypeProperties.setConnectorInterfaces(this.removeConnectorInterfaces(instanceProperties)); - connectorTypeProperties.setTargetTechnologySource(this.removeTargetTechnologySource(instanceProperties)); - connectorTypeProperties.setTargetTechnologyName(this.removeTargetTechnologyName(instanceProperties)); - connectorTypeProperties.setTargetTechnologyInterfaces(this.removeTargetTechnologyInterfaces(instanceProperties)); - connectorTypeProperties.setTargetTechnologyVersions(this.removeTargetTechnologyVersions(instanceProperties)); - connectorTypeProperties.setRecognizedAdditionalProperties(this.removeRecognizedAdditionalProperties(instanceProperties)); - connectorTypeProperties.setRecognizedSecuredProperties(this.removeRecognizedSecuredProperties(instanceProperties)); - connectorTypeProperties.setRecognizedConfigurationProperties(this.removeRecognizedConfigurationProperties(instanceProperties)); - - /* - * Any remaining properties are returned in the extended properties. They are - * assumed to be defined in a subtype. - */ - connectorTypeProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); - connectorTypeProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - - bean.setConnectorTypeProperties(connectorTypeProperties); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - Relationship relationship, - String methodName) throws PropertyServerException - { - return getNewBean(beanClass, entity, methodName); - } -} diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/converters/DigitalArchitectureOMASConverter.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/converters/DigitalArchitectureOMASConverter.java deleted file mode 100644 index 57e26f93de4..00000000000 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/converters/DigitalArchitectureOMASConverter.java +++ /dev/null @@ -1,31 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalarchitecture.converters; - -import org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericConverter; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - - - -/** - * DigitalArchitectureOMASConverter provides the generic methods for the Data Manager beans converters. Generic classes - * have limited knowledge of the classes these are working on and this means creating a new instance of a - * class from within a generic is a little involved. This class provides the generic method for creating - * and initializing a Data Manager bean. - */ -public abstract class DigitalArchitectureOMASConverter extends OpenMetadataAPIGenericConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName name of this server - */ - public DigitalArchitectureOMASConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super (repositoryHelper, serviceName, serverName); - } -} diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/converters/ElementHeaderConverter.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/converters/ElementHeaderConverter.java deleted file mode 100644 index 30972ec2d6d..00000000000 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/converters/ElementHeaderConverter.java +++ /dev/null @@ -1,100 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalarchitecture.converters; - -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; - -/** - * ElementHeaderConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) - * EntityDetail object into a ElementHeader bean. - */ -public class ElementHeaderConverter extends DigitalArchitectureOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity/relationship objects - * @param serviceName name of this component - * @param serverName local server name - */ - public ElementHeaderConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @SuppressWarnings(value = "unchecked") - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof ElementHeader) - { - if (entity != null) - { - returnBean = (B) this.getMetadataElementHeader(beanClass, entity,entity.getClassifications(), methodName); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - Relationship relationship, - String methodName) throws PropertyServerException - { - return getNewBean(beanClass, entity, methodName); - } -} diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/converters/EndpointConverter.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/converters/EndpointConverter.java deleted file mode 100644 index d5edb88ccd0..00000000000 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/converters/EndpointConverter.java +++ /dev/null @@ -1,127 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalarchitecture.converters; - -import org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements.EndpointElement; -import org.odpi.openmetadata.accessservices.digitalarchitecture.properties.EndpointProperties; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; - -/** - * EndpointConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) - * EntityDetail object into a EndpointElement bean. - */ -public class EndpointConverter extends DigitalArchitectureOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity/relationship objects - * @param serviceName name of this component - * @param serverName local server name - */ - public EndpointConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof EndpointElement) - { - EndpointElement bean = (EndpointElement) returnBean; - EndpointProperties endpointProperties = new EndpointProperties(); - - if (entity != null) - { - bean.setElementHeader(this.getMetadataElementHeader(beanClass, entity, methodName)); - - /* - * The initial set of values come from the entity. - */ - InstanceProperties instanceProperties = new InstanceProperties(entity.getProperties()); - - endpointProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); - endpointProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); - endpointProperties.setResourceName(this.removeName(instanceProperties)); - endpointProperties.setResourceDescription(this.removeDescription(instanceProperties)); - endpointProperties.setAddress(this.removeNetworkAddress(instanceProperties)); - endpointProperties.setProtocol(this.removeProtocol(instanceProperties)); - endpointProperties.setEncryptionMethod(this.removeEncryptionMethod(instanceProperties)); - - - /* - * Any remaining properties are returned in the extended properties. They are - * assumed to be defined in a subtype. - */ - endpointProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); - endpointProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - - bean.setEndpointProperties(endpointProperties); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - Relationship relationship, - String methodName) throws PropertyServerException - { - return getNewBean(beanClass, entity, methodName); - } -} diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/converters/LocationConverter.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/converters/LocationConverter.java deleted file mode 100644 index 5ef3b9ceff5..00000000000 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/converters/LocationConverter.java +++ /dev/null @@ -1,158 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalarchitecture.converters; - -import org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements.LocationElement; -import org.odpi.openmetadata.accessservices.digitalarchitecture.properties.LocationProperties; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; - - -/** - * LocationConverter provides common methods for transferring relevant properties from an Open Metadata Repository Services (OMRS) - * EntityDetail object into a bean that inherits from LocationElement. - */ -public class LocationConverter extends DigitalArchitectureOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public LocationConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - Relationship relationship, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof LocationElement) - { - this.updateSimpleMetadataElement(beanClass, (LocationElement) returnBean, entity, methodName); - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof LocationElement) - { - this.updateSimpleMetadataElement(beanClass, ( LocationElement) returnBean, entity, methodName); - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - /** - * Extract the properties from the entity. Each concrete DataManager OMAS converter implements this method. - * The top level fills in the header - * - * @param beanClass name of the class to create - * @param bean output bean - * @param entity entity containing the properties - * @param methodName calling method - * @throws PropertyServerException there is a problem instantiating the bean - */ - void updateSimpleMetadataElement(Class beanClass, - LocationElement bean, - EntityDetail entity, - String methodName) throws PropertyServerException - { - if (entity != null) - { - bean.setElementHeader(this.getMetadataElementHeader(beanClass, entity, methodName)); - LocationProperties locationProperties = new LocationProperties(); - - InstanceProperties instanceProperties = new InstanceProperties(entity.getProperties()); - - locationProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); - locationProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); - locationProperties.setIdentifier(this.removeIdentifier(instanceProperties)); - locationProperties.setDisplayName(this.removeDisplayName(instanceProperties)); - locationProperties.setDescription(this.removeDescription(instanceProperties)); - - /* - * Any remaining properties are returned in the extended properties. They are - * assumed to be defined in a subtype. - */ - locationProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); - locationProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - - bean.setLocationProperties(locationProperties); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - } -} diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/converters/ReferenceDataAssetConverter.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/converters/ReferenceDataAssetConverter.java deleted file mode 100644 index 4c654aa5618..00000000000 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/converters/ReferenceDataAssetConverter.java +++ /dev/null @@ -1,163 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalarchitecture.converters; - -import org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements.ReferenceDataAssetElement; -import org.odpi.openmetadata.accessservices.digitalarchitecture.properties.ReferenceDataAssetProperties; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.*; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; - - -/** - * ReferenceDataAssetConverter provides common methods for transferring relevant properties from an Open Metadata Repository Services (OMRS) - * EntityDetail object into a bean that inherits from AssetProperties. - */ -public class ReferenceDataAssetConverter extends DigitalArchitectureOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public ReferenceDataAssetConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - Relationship relationship, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof ReferenceDataAssetElement) - { - ReferenceDataAssetElement bean = (ReferenceDataAssetElement) returnBean; - - this.updateSimpleMetadataElement(beanClass, bean, entity, methodName); - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof ReferenceDataAssetElement) - { - ReferenceDataAssetElement bean = (ReferenceDataAssetElement) returnBean; - - this.updateSimpleMetadataElement(beanClass, bean, entity, methodName); - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - /** - * Extract the properties from the entity. Each concrete DataManager OMAS converter implements this method. - * The top level fills in the header - * - * @param beanClass name of the class to create - * @param bean output bean - * @param entity entity containing the properties - * @param methodName calling method - * @throws PropertyServerException there is a problem instantiating the bean - */ - void updateSimpleMetadataElement(Class beanClass, - ReferenceDataAssetElement bean, - EntityDetail entity, - String methodName) throws PropertyServerException - { - if (entity != null) - { - bean.setElementHeader(this.getMetadataElementHeader(beanClass, entity, methodName)); - ReferenceDataAssetProperties referenceDataAssetProperties = new ReferenceDataAssetProperties(); - - /* - * The initial set of values come from the entity. - */ - InstanceProperties instanceProperties = new InstanceProperties(entity.getProperties()); - - referenceDataAssetProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); - referenceDataAssetProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); - referenceDataAssetProperties.setName(this.removeName(instanceProperties)); - referenceDataAssetProperties.setDescription(this.removeDescription(instanceProperties)); - - /* - * Any remaining properties are returned in the extended properties. They are - * assumed to be defined in a subtype. - */ - referenceDataAssetProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); - referenceDataAssetProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - - bean.setReferenceDataAssetProperties(referenceDataAssetProperties); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - } -} diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/converters/ReferenceValueAssignmentDefinitionConverter.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/converters/ReferenceValueAssignmentDefinitionConverter.java deleted file mode 100644 index 56b6f54cc9d..00000000000 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/converters/ReferenceValueAssignmentDefinitionConverter.java +++ /dev/null @@ -1,97 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalarchitecture.converters; - -import org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements.ReferenceValueAssignmentDefinitionElement; -import org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements.ValidValueElement; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; - - -/** - * ReferenceValueAssignmentDefinitionConverter provides common methods for transferring relevant properties from an Open Metadata Repository Services - * (OMRS) Relationship and linked EntityDetail object into a bean that inherits from ReferenceValueAssignmentDefinitionElement. - */ -public class ReferenceValueAssignmentDefinitionConverter extends ValidValueConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public ReferenceValueAssignmentDefinitionConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - Relationship relationship, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof ReferenceValueAssignmentDefinitionElement) - { - ReferenceValueAssignmentDefinitionElement bean = (ReferenceValueAssignmentDefinitionElement) returnBean; - ValidValueElement definition = new ValidValueElement(); - - super.updateSimpleMetadataElement(beanClass, definition, entity, methodName); - - bean.setValidValueElement(definition); - - if (relationship != null) - { - InstanceProperties instanceProperties = relationship.getProperties(); - - bean.setAttributeName(this.getAttributeName(instanceProperties)); - bean.setConfidence(this.getConfidence(instanceProperties)); - bean.setSteward(this.getSteward(instanceProperties)); - bean.setStewardTypeName(this.getStewardTypeName(instanceProperties)); - bean.setStewardPropertyName(this.getStewardPropertyName(instanceProperties)); - bean.setNotes(this.getNotes(instanceProperties)); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.RELATIONSHIP_DEF, methodName); - } - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } -} diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/converters/ReferenceValueAssignmentItemConverter.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/converters/ReferenceValueAssignmentItemConverter.java deleted file mode 100644 index f461f12f8cb..00000000000 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/converters/ReferenceValueAssignmentItemConverter.java +++ /dev/null @@ -1,118 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalarchitecture.converters; - -import org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements.ReferenceValueAssignmentItemElement; -import org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements.ReferenceableElement; -import org.odpi.openmetadata.accessservices.digitalarchitecture.properties.ReferenceableProperties; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; - - -/** - * ReferenceValueAssignmentItemConverter provides common methods for transferring relevant properties from an Open Metadata Repository Services (OMRS) - * Relationship and linked EntityDetail object into a bean that inherits from ReferenceValueAssignmentItemElement. - */ -public class ReferenceValueAssignmentItemConverter extends DigitalArchitectureOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public ReferenceValueAssignmentItemConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - Relationship relationship, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof ReferenceValueAssignmentItemElement) - { - ReferenceValueAssignmentItemElement bean = (ReferenceValueAssignmentItemElement) returnBean; - ReferenceableElement assignedItem = new ReferenceableElement(); - ReferenceableProperties referenceableProperties = new ReferenceableProperties(); - - if (entity != null) - { - assignedItem.setElementHeader(this.getMetadataElementHeader(beanClass, entity, methodName)); - - /* - * The initial set of values come from the entity. - */ - InstanceProperties instanceProperties = new InstanceProperties(entity.getProperties()); - - referenceableProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); - referenceableProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); - - /* - * Any remaining properties are returned in the extended properties. They are - * assumed to be defined in a subtype. - */ - referenceableProperties.setTypeName(assignedItem.getElementHeader().getType().getTypeName()); - referenceableProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - - assignedItem.setReferenceableProperties(referenceableProperties); - bean.setAssignedItem(assignedItem); - - if (relationship != null) - { - instanceProperties = relationship.getProperties(); - - bean.setAttributeName(this.getAttributeName(instanceProperties)); - bean.setConfidence(this.getConfidence(instanceProperties)); - bean.setSteward(this.getSteward(instanceProperties)); - bean.setStewardTypeName(this.getStewardTypeName(instanceProperties)); - bean.setStewardPropertyName(this.getStewardPropertyName(instanceProperties)); - bean.setNotes(this.getNotes(instanceProperties)); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.RELATIONSHIP_DEF, methodName); - } - } - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } -} diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/converters/ValidValueConverter.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/converters/ValidValueConverter.java deleted file mode 100644 index 92062488b7e..00000000000 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/converters/ValidValueConverter.java +++ /dev/null @@ -1,174 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalarchitecture.converters; - -import org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements.ValidValueElement; -import org.odpi.openmetadata.accessservices.digitalarchitecture.properties.ValidValueProperties; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.*; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; - - -/** - * ValidValueConverter provides common methods for transferring relevant properties from an Open Metadata Repository Services (OMRS) - * EntityDetail object into a bean that inherits from ValidValueElement. - */ -public class ValidValueConverter extends DigitalArchitectureOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public ValidValueConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - Relationship relationship, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof ValidValueElement) - { - ValidValueElement bean = (ValidValueElement) returnBean; - this.updateSimpleMetadataElement(beanClass, bean, entity, methodName); - - if (relationship != null) - { - if (repositoryHelper.isTypeOf(serviceName, relationship.getType().getTypeDefName(), OpenMetadataType.VALID_VALUE_MEMBER_RELATIONSHIP.typeName)) - { - bean.setSetGUID(relationship.getEntityOneProxy().getGUID()); - bean.setIsDefaultValue(this.removeIsDefaultValue(relationship.getProperties())); - } - } - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof ValidValueElement) - { - this.updateSimpleMetadataElement(beanClass, (ValidValueElement) returnBean, entity, methodName); - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - /** - * Extract the properties from the entity. Each concrete DataManager OMAS converter implements this method. - * The top level fills in the header - * - * @param beanClass name of the class to create - * @param bean output bean - * @param entity entity containing the properties - * @param methodName calling method - * @throws PropertyServerException there is a problem instantiating the bean - */ - void updateSimpleMetadataElement(Class beanClass, - ValidValueElement bean, - EntityDetail entity, - String methodName) throws PropertyServerException - { - if (entity != null) - { - bean.setElementHeader(this.getMetadataElementHeader(beanClass, entity, methodName)); - ValidValueProperties validValueProperties = new ValidValueProperties(); - - InstanceProperties instanceProperties = new InstanceProperties(entity.getProperties()); - - validValueProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); - validValueProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); - validValueProperties.setDisplayName(this.removeName(instanceProperties)); - validValueProperties.setDescription(this.removeDescription(instanceProperties)); - validValueProperties.setCategory(this.removeCategory(instanceProperties)); - validValueProperties.setUsage(this.removeUsage(instanceProperties)); - validValueProperties.setScope(this.removeScope(instanceProperties)); - validValueProperties.setPreferredValue(this.removePreferredValue(instanceProperties)); - validValueProperties.setDataType(this.removeDataType(instanceProperties)); - validValueProperties.setIsDeprecated(this.removeIsDeprecated(instanceProperties)); - validValueProperties.setIsCaseSensitive(this.removeIsCaseSensitive(instanceProperties)); - - /* - * Any remaining properties are returned in the extended properties. They are - * assumed to be defined in a subtype. - */ - validValueProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); - validValueProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - - bean.setValidValueProperties(validValueProperties); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - } -} diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/converters/package-info.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/converters/package-info.java deleted file mode 100644 index 9e49ebcfeaf..00000000000 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/converters/package-info.java +++ /dev/null @@ -1,8 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -/** - * Provides the converters that take beans from the repository services (eg entities and relationships) - * and converts them into Digital Architecture OMAS beans to return to the caller. - */ -package org.odpi.openmetadata.accessservices.digitalarchitecture.converters; diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/outtopic/DigitalArchitectureOMRSTopicListener.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/outtopic/DigitalArchitectureOMRSTopicListener.java index 76b02c10f05..47f0fa0c63d 100644 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/outtopic/DigitalArchitectureOMRSTopicListener.java +++ b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/outtopic/DigitalArchitectureOMRSTopicListener.java @@ -6,7 +6,7 @@ import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.commonservices.generichandlers.ReferenceableHandler; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; import org.odpi.openmetadata.repositoryservices.connectors.omrstopic.OMRSTopicListenerBase; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Classification; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/outtopic/DigitalArchitectureOutTopicPublisher.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/outtopic/DigitalArchitectureOutTopicPublisher.java index bade6f43a07..bb39cef6306 100644 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/outtopic/DigitalArchitectureOutTopicPublisher.java +++ b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/outtopic/DigitalArchitectureOutTopicPublisher.java @@ -4,12 +4,12 @@ package org.odpi.openmetadata.accessservices.digitalarchitecture.outtopic; import org.odpi.openmetadata.accessservices.digitalarchitecture.connectors.outtopic.DigitalArchitectureOutTopicServerConnector; -import org.odpi.openmetadata.accessservices.digitalarchitecture.converters.ElementHeaderConverter; import org.odpi.openmetadata.accessservices.digitalarchitecture.events.DigitalArchitectureEventType; import org.odpi.openmetadata.accessservices.digitalarchitecture.events.DigitalArchitectureOutTopicEvent; import org.odpi.openmetadata.accessservices.digitalarchitecture.ffdc.DigitalArchitectureAuditCode; +import org.odpi.openmetadata.commonservices.generichandlers.ElementHeaderConverter; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Classification; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/server/ConnectionRESTServices.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/server/ConnectionRESTServices.java index d0cb65da4df..e1aa21c5783 100644 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/server/ConnectionRESTServices.java +++ b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/server/ConnectionRESTServices.java @@ -2,16 +2,8 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.digitalarchitecture.server; -import org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements.ConnectionElement; -import org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements.EndpointElement; -import org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements.ConnectorTypeElement; -import org.odpi.openmetadata.accessservices.digitalarchitecture.properties.ConnectionProperties; -import org.odpi.openmetadata.accessservices.digitalarchitecture.properties.EndpointProperties; -import org.odpi.openmetadata.accessservices.digitalarchitecture.properties.ConnectorTypeProperties; + import org.odpi.openmetadata.accessservices.digitalarchitecture.properties.TemplateProperties; -import org.odpi.openmetadata.accessservices.digitalarchitecture.rest.*; -import org.odpi.openmetadata.accessservices.digitalarchitecture.rest.ConnectionResponse; -import org.odpi.openmetadata.accessservices.digitalarchitecture.rest.ConnectorTypeResponse; import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; @@ -20,6 +12,8 @@ import org.odpi.openmetadata.commonservices.generichandlers.EndpointHandler; import org.odpi.openmetadata.commonservices.generichandlers.ConnectorTypeHandler; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.*; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; import org.slf4j.LoggerFactory; import java.util.Date; @@ -901,7 +895,7 @@ public ConnectionsResponse findConnections(String serverName, false, new Date(), methodName); - response.setElementList(connections); + response.setElements(connections); } } catch (Exception error) @@ -960,7 +954,7 @@ public ConnectionsResponse getConnectionsByName(String serverName, false, new Date(), methodName); - response.setElementList(connections); + response.setElements(connections); } } catch (Exception error) @@ -1066,7 +1060,7 @@ public GUIDResponse createEndpoint(String serverName, null, null, endpointProperties.getQualifiedName(), - endpointProperties.getResourceName(), + endpointProperties.getName(), endpointProperties.getResourceDescription(), endpointProperties.getAddress(), endpointProperties.getProtocol(), @@ -1197,7 +1191,7 @@ public VoidResponse updateEndpoint(String serverName, endpointGUID, guidParameter, endpointProperties.getQualifiedName(), - endpointProperties.getResourceName(), + endpointProperties.getName(), endpointProperties.getResourceDescription(), endpointProperties.getAddress(), endpointProperties.getProtocol(), @@ -1327,7 +1321,7 @@ public EndpointsResponse findEndpoints(String serverName, false, new Date(), methodName); - response.setElementList(endpoints); + response.setElements(endpoints); } } catch (Exception error) @@ -1386,7 +1380,7 @@ public EndpointsResponse getEndpointsByName(String serverName, false, new Date(), methodName); - response.setElementList(endpoints); + response.setElements(endpoints); } } catch (Exception error) @@ -1771,7 +1765,7 @@ public ConnectorTypesResponse findConnectorTypes(String serverN false, new Date(), methodName); - response.setElementList(connectorTypes); + response.setElements(connectorTypes); } } catch (Exception error) @@ -1830,7 +1824,7 @@ public ConnectorTypesResponse getConnectorTypesByName(String serverName false, new Date(), methodName); - response.setElementList(connectorTypes); + response.setElements(connectorTypes); } } catch (Exception error) diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/server/DigitalArchitectureInstanceHandler.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/server/DigitalArchitectureInstanceHandler.java index 1fe4a1b048d..6fdb26a6082 100644 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/server/DigitalArchitectureInstanceHandler.java +++ b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/server/DigitalArchitectureInstanceHandler.java @@ -2,7 +2,7 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.digitalarchitecture.server; -import org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements.*; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; import org.odpi.openmetadata.adminservices.configuration.registration.AccessServiceDescription; import org.odpi.openmetadata.commonservices.generichandlers.*; import org.odpi.openmetadata.commonservices.multitenant.OMASServiceInstanceHandler; @@ -40,11 +40,11 @@ class DigitalArchitectureInstanceHandler extends OMASServiceInstanceHandler * @throws UserNotAuthorizedException user does not have access to the requested server * @throws PropertyServerException error in the requested server */ - AssetHandler getAssetHandler(String userId, - String serverName, - String serviceOperationName) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException + AssetHandler getAssetHandler(String userId, + String serverName, + String serviceOperationName) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException { DigitalArchitectureServicesInstance instance = (DigitalArchitectureServicesInstance)super.getServerServiceInstance(userId, serverName, diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/server/DigitalArchitectureServicesInstance.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/server/DigitalArchitectureServicesInstance.java index 8bc1da389a1..33cdd67a0b8 100644 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/server/DigitalArchitectureServicesInstance.java +++ b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/server/DigitalArchitectureServicesInstance.java @@ -2,18 +2,19 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.digitalarchitecture.server; -import org.odpi.openmetadata.accessservices.digitalarchitecture.converters.ConnectionConverter; -import org.odpi.openmetadata.accessservices.digitalarchitecture.converters.ReferenceDataAssetConverter; -import org.odpi.openmetadata.accessservices.digitalarchitecture.converters.*; +import org.odpi.openmetadata.commonservices.generichandlers.ConnectionConverter; +import org.odpi.openmetadata.commonservices.generichandlers.ConnectorTypeConverter; +import org.odpi.openmetadata.commonservices.generichandlers.EndpointConverter; +import org.odpi.openmetadata.commonservices.generichandlers.LocationConverter; import org.odpi.openmetadata.accessservices.digitalarchitecture.ffdc.DigitalArchitectureErrorCode; -import org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements.*; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; import org.odpi.openmetadata.adminservices.configuration.registration.AccessServiceDescription; import org.odpi.openmetadata.commonservices.generichandlers.*; import org.odpi.openmetadata.commonservices.multitenant.OMASServiceInstance; import org.odpi.openmetadata.commonservices.multitenant.ffdc.exceptions.NewInstanceException; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryConnector; import java.util.List; @@ -28,7 +29,7 @@ public class DigitalArchitectureServicesInstance extends OMASServiceInstance private final ReferenceableHandler referenceableHandler; - private final AssetHandler assetHandler; + private final AssetHandler assetHandler; private final ConnectionHandler connectionHandler; private final ConnectorTypeHandler connectorTypeHandler; @@ -51,8 +52,8 @@ public class DigitalArchitectureServicesInstance extends OMASServiceInstance * @param repositoryConnector link to the repository responsible for servicing the REST calls. * @param supportedZones list of zones that DigitalArchitecture is allowed to serve Assets from. * @param auditLog destination for audit log events. - * @param defaultZones list of zones that DataManager sets up in new Asset instances. - * @param publishZones list of zones that DataManager sets up in published Asset instances. + * @param defaultZones list of zones that Digital Architecture sets up in new Asset instances. + * @param publishZones list of zones that Digital Architecture sets up in published Asset instances. * @param localServerUserId userId used for server initiated actions * @param maxPageSize maximum number of results that can be returned on a single call * @throws NewInstanceException a problem occurred during initialization @@ -98,8 +99,8 @@ public DigitalArchitectureServicesInstance(OMRSRepositoryConnector repositoryCon publishZones, auditLog); - this.assetHandler = new AssetHandler<>(new ReferenceDataAssetConverter<>(repositoryHelper, serviceName, serverName), - ReferenceDataAssetElement.class, + this.assetHandler = new AssetHandler<>(new AssetConverter<>(repositoryHelper, serviceName, serverName), + AssetElement.class, serviceName, serverName, invalidParameterHandler, @@ -221,7 +222,7 @@ public ReferenceableHandler getReferenceableHandler() throws Prop * @return handler object * @throws PropertyServerException the instance has not been initialized successfully */ - AssetHandler getAssetHandler() throws PropertyServerException + AssetHandler getAssetHandler() throws PropertyServerException { final String methodName = "getAssetHandler"; diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/server/LocationRESTServices.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/server/LocationRESTServices.java index 84e2f7f8407..0fd4c76a963 100644 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/server/LocationRESTServices.java +++ b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/server/LocationRESTServices.java @@ -2,14 +2,14 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.digitalarchitecture.server; -import org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements.*; -import org.odpi.openmetadata.accessservices.digitalarchitecture.properties.*; -import org.odpi.openmetadata.accessservices.digitalarchitecture.rest.*; +import org.odpi.openmetadata.accessservices.digitalarchitecture.properties.TemplateProperties; import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.odpi.openmetadata.commonservices.generichandlers.LocationHandler; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.LocationElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.locations.LocationProperties; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; @@ -922,7 +922,7 @@ public LocationsResponse findLocations(String serverName, false, new Date(), methodName); - response.setElementList(locations); + response.setElements(locations); } } catch (Exception error) @@ -992,7 +992,7 @@ public LocationsResponse getLocationsByName(String serverName, pageSize, new Date(), methodName); - response.setElementList(locations); + response.setElements(locations); } } catch (Exception error) diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/server/ReferenceDataRESTServices.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/server/ReferenceDataRESTServices.java index 41ff6ce5e5f..cc1cf3b46cd 100644 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/server/ReferenceDataRESTServices.java +++ b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/server/ReferenceDataRESTServices.java @@ -2,9 +2,6 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.digitalarchitecture.server; -import org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements.*; -import org.odpi.openmetadata.accessservices.digitalarchitecture.properties.*; -import org.odpi.openmetadata.accessservices.digitalarchitecture.rest.*; import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; @@ -12,6 +9,8 @@ import org.odpi.openmetadata.commonservices.generichandlers.AssetHandler; import org.odpi.openmetadata.commonservices.generichandlers.ReferenceDataHandler; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues.*; import org.slf4j.LoggerFactory; import java.util.ArrayList; @@ -591,7 +590,7 @@ public VoidResponse classifyAssetAsReferenceData(String serverName, { auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - AssetHandler handler = instanceHandler.getAssetHandler(userId, serverName, methodName); + AssetHandler handler = instanceHandler.getAssetHandler(userId, serverName, methodName); handler.classifyAssetAsReferenceData(userId, assetGUID, @@ -704,7 +703,7 @@ public VoidResponse declassifyAssetAsReferenceData(String serverName, { auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - AssetHandler handler = instanceHandler.getAssetHandler(userId, serverName, methodName); + AssetHandler handler = instanceHandler.getAssetHandler(userId, serverName, methodName); handler.declassifyAssetAsReferenceData(userId, assetGUID, @@ -1257,7 +1256,7 @@ public ValidValuesResponse getValidValueByName(String serverName, instanceHandler.getSupportedZones(userId, serverName, methodName), new Date(), methodName); - response.setElementList(validValues); + response.setElements(validValues); } } catch (Exception error) @@ -1324,7 +1323,7 @@ public ValidValuesResponse findValidValues(String serverName, instanceHandler.getSupportedZones(userId, serverName, methodName), new Date(), methodName); - response.setElementList(validValues); + response.setElements(validValues); } } catch (Exception error) @@ -1388,7 +1387,7 @@ public ValidValuesResponse getValidValueSetMembers(String serverName, instanceHandler.getSupportedZones(userId, serverName, methodName), new Date(), methodName); - response.setElementList(validValues); + response.setElements(validValues); } catch (Exception error) { @@ -1451,7 +1450,7 @@ public ValidValuesResponse getSetsForValidValue(String serverName, instanceHandler.getSupportedZones(userId, serverName, methodName), new Date(), methodName); - response.setElementList(validValues); + response.setElements(validValues); } catch (Exception error) { @@ -1517,7 +1516,7 @@ public ValidValueAssignmentConsumersResponse getValidValuesAssignmentConsumers(S new Date(), methodName); - response.setElementList(validValueConsumers); + response.setElements(validValueConsumers); } catch (Exception error) { @@ -1581,7 +1580,7 @@ public ValidValueAssignmentDefinitionsResponse getValidValuesAssignmentDefinitio new Date(), methodName); - response.setElementList(validValueAssignmentDefinitions); + response.setElements(validValueAssignmentDefinitions); } catch (Exception error) { @@ -1645,7 +1644,7 @@ public ValidValuesImplAssetsResponse getValidValuesImplementationAssets(String new Date(), methodName); - response.setElementList(validValueImplAssetElements); + response.setElements(validValueImplAssetElements); } catch (Exception error) { @@ -1710,7 +1709,7 @@ public ValidValuesImplDefinitionsResponse getValidValuesImplementationDefinition new Date(), methodName); - response.setElementList(definitions); + response.setElements(definitions); } catch (Exception error) @@ -1775,7 +1774,7 @@ public ValidValueMappingsResponse getValidValueMappings(String serverName, new Date(), methodName); - response.setElementList(validValuesMappings); + response.setElements(validValuesMappings); } catch (Exception error) @@ -1879,7 +1878,7 @@ public ValidValuesMappingsResponse getValidValuesMappings(String serverName, if (! elements.isEmpty()) { - response.setElementList(elements); + response.setElements(elements); } } } @@ -1947,7 +1946,7 @@ public ReferenceValueAssignmentItemsResponse getReferenceValueAssignedItems(Stri new Date(), methodName); - response.setElementList(assignedItems); + response.setElements(assignedItems); } catch (Exception error) @@ -2011,7 +2010,7 @@ public ReferenceValueAssignmentDefinitionsResponse getReferenceValueAssignments( new Date(), methodName); - response.setElementList(referenceValueAssignments); + response.setElements(referenceValueAssignments); } catch (Exception error) diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-spring/build.gradle b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-spring/build.gradle index 5dcdb72de9e..c6fc780bcbf 100644 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-spring/build.gradle +++ b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-spring/build.gradle @@ -9,6 +9,7 @@ dependencies { implementation 'org.springframework:spring-web' implementation project(':open-metadata-implementation:access-services:digital-architecture:digital-architecture-api') implementation project(':open-metadata-implementation:common-services:ffdc-services') + implementation project(':open-metadata-implementation:frameworks:open-metadata-framework') implementation 'io.swagger.core.v3:swagger-annotations' compileOnly 'com.fasterxml.jackson.core:jackson-annotations' diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-spring/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/server/spring/DigitalArchitectureResource.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-spring/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/server/spring/DigitalArchitectureResource.java index 80f7c5f1a63..aba72d0561e 100644 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-spring/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/server/spring/DigitalArchitectureResource.java +++ b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-spring/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/server/spring/DigitalArchitectureResource.java @@ -4,10 +4,13 @@ import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.accessservices.digitalarchitecture.properties.*; -import org.odpi.openmetadata.accessservices.digitalarchitecture.rest.*; import org.odpi.openmetadata.accessservices.digitalarchitecture.server.ReferenceDataRESTServices; import org.odpi.openmetadata.commonservices.ffdc.rest.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues.ReferenceValueAssignmentProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues.ValidValueAssignmentProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues.ValidValuesImplProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues.ValidValuesMappingProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues.ValidValueProperties; import org.springframework.web.bind.annotation.*; diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-spring/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/server/spring/LocationResource.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-spring/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/server/spring/LocationResource.java index 97abbb7b8ae..9509da91582 100644 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-spring/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/server/spring/LocationResource.java +++ b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-spring/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/server/spring/LocationResource.java @@ -4,10 +4,10 @@ import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.accessservices.digitalarchitecture.properties.*; -import org.odpi.openmetadata.accessservices.digitalarchitecture.rest.*; +import org.odpi.openmetadata.accessservices.digitalarchitecture.properties.TemplateProperties; import org.odpi.openmetadata.accessservices.digitalarchitecture.server.LocationRESTServices; import org.odpi.openmetadata.commonservices.ffdc.rest.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.locations.LocationProperties; import org.springframework.web.bind.annotation.*; /** diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-spring/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/server/spring/ManageConnectionsResource.java b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-spring/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/server/spring/ManageConnectionsResource.java index 250c0cbf18f..66e19308bc0 100644 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-spring/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/server/spring/ManageConnectionsResource.java +++ b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-spring/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/server/spring/ManageConnectionsResource.java @@ -4,10 +4,8 @@ import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.accessservices.digitalarchitecture.properties.*; -import org.odpi.openmetadata.accessservices.digitalarchitecture.rest.*; -import org.odpi.openmetadata.accessservices.digitalarchitecture.rest.ConnectionResponse; -import org.odpi.openmetadata.accessservices.digitalarchitecture.rest.ConnectorTypeResponse; +import org.odpi.openmetadata.accessservices.digitalarchitecture.properties.TemplateProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.*; import org.odpi.openmetadata.accessservices.digitalarchitecture.server.ConnectionRESTServices; import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.springframework.web.bind.annotation.*; @@ -58,7 +56,7 @@ public ManageConnectionsResource() public GUIDResponse createConnection(@PathVariable String serverName, @PathVariable String userId, - @RequestBody ConnectionProperties requestBody) + @RequestBody ConnectionProperties requestBody) { return restAPI.createConnection(serverName, userId, requestBody); } @@ -82,7 +80,7 @@ public GUIDResponse createConnection(@PathVariable String serverNa public GUIDResponse createConnectionFromTemplate(@PathVariable String serverName, @PathVariable String userId, @PathVariable String templateGUID, - @RequestBody TemplateProperties templateProperties) + @RequestBody TemplateProperties templateProperties) { return restAPI.createConnectionFromTemplate(serverName, userId, templateGUID, templateProperties); } @@ -290,7 +288,7 @@ public VoidResponse setupAssetConnection(@PathVariable String serverN @PathVariable String userId, @PathVariable String assetGUID, @PathVariable String connectionGUID, - @PathVariable StringRequestBody requestBody) + @RequestBody StringRequestBody requestBody) { return restAPI.setupAssetConnection(serverName, userId, assetGUID, connectionGUID, requestBody); } @@ -432,7 +430,7 @@ public ConnectionResponse getConnectionByGUID(@PathVariable String serverName, /** - * Create a new metadata element to represent a endpoint. Classifications can be added later to define the + * Create a new metadata element to represent an endpoint. Classifications can be added later to define the * type of endpoint. * * @param serverName name of calling server @@ -454,7 +452,7 @@ public GUIDResponse createEndpoint(@PathVariable String serverName, /** - * Create a new metadata element to represent a endpoint using an existing metadata element as a template. + * Create a new metadata element to represent an endpoint using an existing metadata element as a template. * The template defines additional classifications and relationships that should be added to the new endpoint. * * @param serverName name of calling server diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-topic-connectors/build.gradle b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-topic-connectors/build.gradle index f2ae92b5dc5..e6239dfb36f 100644 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-topic-connectors/build.gradle +++ b/open-metadata-implementation/access-services/digital-architecture/digital-architecture-topic-connectors/build.gradle @@ -6,6 +6,7 @@ dependencies { implementation project(':open-metadata-implementation:frameworks:audit-log-framework') + implementation project(':open-metadata-implementation:frameworks:open-metadata-framework') implementation project(':open-metadata-implementation:frameworks:open-connector-framework') implementation project(':open-metadata-implementation:repository-services:repository-services-apis') implementation project(':open-metadata-implementation:access-services:digital-architecture:digital-architecture-api') diff --git a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/api/BusinessCapabilityManagement.java b/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/api/BusinessCapabilityManagement.java index 92c5cb7b151..bf7f69607dd 100644 --- a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/api/BusinessCapabilityManagement.java +++ b/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/api/BusinessCapabilityManagement.java @@ -2,11 +2,11 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.digitalservice.api; -import org.odpi.openmetadata.accessservices.digitalservice.metadataelements.BusinessCapabilityElement; -import org.odpi.openmetadata.accessservices.digitalservice.metadataelements.RelatedElement; -import org.odpi.openmetadata.accessservices.digitalservice.properties.BusinessCapabilityProperties; -import org.odpi.openmetadata.accessservices.digitalservice.properties.DigitalSupportProperties; -import org.odpi.openmetadata.accessservices.digitalservice.properties.OrganizationalCapabilityProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.BusinessCapabilityElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.RelatedElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.digitalbusiness.BusinessCapabilityProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.digitalbusiness.DigitalSupportProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.digitalbusiness.OrganizationalCapabilityProperties; import org.odpi.openmetadata.accessservices.digitalservice.properties.TemplateProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; diff --git a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/api/CollectionsInterface.java b/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/api/CollectionsInterface.java index 8ef327419ac..ee3371fb3b5 100644 --- a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/api/CollectionsInterface.java +++ b/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/api/CollectionsInterface.java @@ -2,14 +2,16 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.digitalservice.api; - -import org.odpi.openmetadata.accessservices.digitalservice.metadataelements.CollectionElement; -import org.odpi.openmetadata.accessservices.digitalservice.metadataelements.CollectionMember; -import org.odpi.openmetadata.accessservices.digitalservice.properties.*; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; import org.odpi.openmetadata.frameworks.governanceaction.search.ElementProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.CollectionElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.CollectionMember; +import org.odpi.openmetadata.frameworks.openmetadata.properties.collections.CollectionMembershipProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.collections.CollectionProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.digitalbusiness.DigitalProductProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.resources.ResourceListProperties; import java.util.Date; import java.util.List; diff --git a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/api/DigitalRolesInterface.java b/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/api/DigitalRolesInterface.java index 89337e6dcd7..c1a8f60f167 100644 --- a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/api/DigitalRolesInterface.java +++ b/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/api/DigitalRolesInterface.java @@ -4,12 +4,12 @@ -import org.odpi.openmetadata.accessservices.digitalservice.metadataelements.AgreementRoleAppointee; -import org.odpi.openmetadata.accessservices.digitalservice.metadataelements.PersonRoleAppointee; -import org.odpi.openmetadata.accessservices.digitalservice.metadataelements.PersonRoleElement; -import org.odpi.openmetadata.accessservices.digitalservice.metadataelements.PersonRoleHistory; -import org.odpi.openmetadata.accessservices.digitalservice.properties.AgreementRoleProperties; -import org.odpi.openmetadata.accessservices.digitalservice.properties.PersonRoleProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.AgreementRoleAppointee; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.PersonRoleAppointee; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.PersonRoleElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.PersonRoleHistory; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.PersonRoleProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.digitalbusiness.AgreementRoleProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; diff --git a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/api/DigitalServicesInterface.java b/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/api/DigitalServicesInterface.java index b0245641e27..a84c2f8c85a 100644 --- a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/api/DigitalServicesInterface.java +++ b/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/api/DigitalServicesInterface.java @@ -2,11 +2,11 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.digitalservice.api; -import org.odpi.openmetadata.accessservices.digitalservice.metadataelements.DigitalServiceElement; -import org.odpi.openmetadata.accessservices.digitalservice.metadataelements.RelatedElement; -import org.odpi.openmetadata.accessservices.digitalservice.properties.DigitalServiceProperties; -import org.odpi.openmetadata.accessservices.digitalservice.properties.DigitalServiceStatus; -import org.odpi.openmetadata.accessservices.digitalservice.properties.DigitalServiceDependencyProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.DigitalServiceElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.RelatedElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.digitalbusiness.DigitalServiceProperties; +import org.odpi.openmetadata.frameworks.openmetadata.enums.DigitalServiceStatus; +import org.odpi.openmetadata.frameworks.openmetadata.properties.digitalbusiness.DigitalServiceDependencyProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; @@ -186,9 +186,9 @@ void clearDigitalServiceOperator(String userId, * @throws PropertyServerException there is a problem reported in the open metadata server(s) */ List findDigitalServices(String userId, - String searchString, - int startFrom, - int pageSize) throws InvalidParameterException, + String searchString, + int startFrom, + int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException; diff --git a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/events/DigitalServiceOutboundEvent.java b/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/events/DigitalServiceOutboundEvent.java index 2e42cb23855..c7d5e526cdc 100644 --- a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/events/DigitalServiceOutboundEvent.java +++ b/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/events/DigitalServiceOutboundEvent.java @@ -5,7 +5,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementStub; import java.util.Objects; diff --git a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/metadataelements/Appointee.java b/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/metadataelements/Appointee.java deleted file mode 100644 index 425c0e58843..00000000000 --- a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/metadataelements/Appointee.java +++ /dev/null @@ -1,209 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalservice.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -import java.util.Date; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * GovernanceAppointee describes an individual's appointment as - * a governance officer or to a specific governance role. It includes their personal details along with the - * start and end date of their appointment. The elementHeader is from the - * PersonRoleAppointment relationship. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class Appointee implements MetadataElement -{ - private ElementHeader elementHeader = null; - private ProfileElement profile = null; - private Date startDate = null; - private Date endDate = null; - - - /** - * Default constructor - */ - public Appointee() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public Appointee(Appointee template) - { - if (template != null) - { - this.elementHeader = template.getElementHeader(); - this.profile = template.getProfile(); - this.startDate = template.getStartDate(); - this.endDate = template.getEndDate(); - } - } - - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - @Override - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the profile information for the individual. - * - * @return personal profile object - */ - public ProfileElement getProfile() - { - if (profile == null) - { - return null; - } - else - { - return profile; - } - } - - - /** - * Set up the profile information for the individual. - * - * @param profile personal profile object - */ - public void setProfile(ProfileElement profile) - { - this.profile = profile; - } - - - /** - * Return the start date of the appointment. - * - * @return date - */ - public Date getStartDate() - { - return startDate; - } - - - /** - * Set the start date of the appointment. - * - * @param startDate date - */ - public void setStartDate(Date startDate) - { - this.startDate = startDate; - } - - - /** - * Return the end date of the appointment. - * - * @return end date - null means open-ended appointment - */ - public Date getEndDate() - { - return endDate; - - } - - - /** - * Set up the start date of the appointment. - * - * @param endDate date - null means open-ended appointment - */ - public void setEndDate(Date endDate) - { - this.endDate = endDate; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "GovernanceAppointee{" + - "elementHeader=" + elementHeader + - ", profile=" + profile + - ", startDate=" + startDate + - ", endDate=" + endDate + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - Appointee that = (Appointee) objectToCompare; - return Objects.equals(getElementHeader(), that.getElementHeader()) && - Objects.equals(getProfile(), that.getProfile()) && - Objects.equals(getStartDate(), that.getStartDate()) && - Objects.equals(getEndDate(), that.getEndDate()); - } - - - /** - * Hash code for this object - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(getProfile(), getElementHeader(), getStartDate(), getEndDate()); - } -} diff --git a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/metadataelements/CollectionElement.java b/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/metadataelements/CollectionElement.java deleted file mode 100644 index 144fec90aa7..00000000000 --- a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/metadataelements/CollectionElement.java +++ /dev/null @@ -1,175 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.digitalservice.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.digitalservice.properties.CollectionProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * CollectionElement contains the properties and header for a collection retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class CollectionElement implements MetadataElement -{ - private ElementHeader elementHeader = null; - private CollectionProperties properties = null; - private RelatedElement relatedElement = null; - - - /** - * Default constructor - */ - public CollectionElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public CollectionElement(CollectionElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - properties = template.getProperties(); - relatedElement = template.getRelatedElement(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - @Override - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the properties of the collection. - * - * @return properties - */ - public CollectionProperties getProperties() - { - return properties; - } - - - /** - * Set up the collection properties. - * - * @param properties properties - */ - public void setProperties(CollectionProperties properties) - { - this.properties = properties; - } - - - /** - * Return details of the relationship used to retrieve this element. - * Will be null if the element was retrieved directly rather than via a relationship. - * - * @return list of element stubs - */ - public RelatedElement getRelatedElement() - { - return relatedElement; - } - - - /** - * Set up details of the relationship used to retrieve this element. - * Will be null if the element was retrieved directly rather than via a relationship. - * - * @param relatedElement relationship details - */ - public void setRelatedElement(RelatedElement relatedElement) - { - this.relatedElement = relatedElement; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "CollectionElement{" + - "elementHeader=" + elementHeader + - ", properties=" + properties + - ", relatedElement=" + relatedElement + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - CollectionElement that = (CollectionElement) objectToCompare; - return Objects.equals(elementHeader, that.elementHeader) && - Objects.equals(properties, that.properties) && - Objects.equals(relatedElement, that.relatedElement); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementHeader, properties, relatedElement); - } -} diff --git a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/metadataelements/CollectionMember.java b/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/metadataelements/CollectionMember.java deleted file mode 100644 index 1da34ebf4d7..00000000000 --- a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/metadataelements/CollectionMember.java +++ /dev/null @@ -1,173 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalservice.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.digitalservice.properties.CollectionMembershipProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * CollectionMember describes a member of a collection. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class CollectionMember implements MetadataElement -{ - private ElementHeader elementHeader = null; - private CollectionMembershipProperties membershipProperties = null; - private ElementStub member = null; - - - /** - * Default constructor - */ - public CollectionMember() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public CollectionMember(CollectionMember template) - { - if (template != null) - { - this.elementHeader = template.getElementHeader(); - this.membershipProperties = template.getMembershipProperties(); - this.member = template.getMember(); - } - } - - - /** - * Return the element header associated with the relationship. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the relationship. - * - * @param elementHeader element header object - */ - @Override - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the properties from the membership relationship. - * - * @return membership properties - */ - public CollectionMembershipProperties getMembershipProperties() - { - return membershipProperties; - } - - - /** - * Set up the properties from the membership relationship. - * - * @param membershipProperties membership properties - */ - public void setMembershipProperties(CollectionMembershipProperties membershipProperties) - { - this.membershipProperties = membershipProperties; - } - - - /** - * Return the properties of the member. - * - * @return member properties - */ - public ElementStub getMember() - { - return member; - } - - - /** - * Set up the properties of the member. - * - * @param member properties - */ - public void setMember(ElementStub member) - { - this.member = member; - } - - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "CollectionMember{" + - "elementHeader=" + elementHeader + - ", membershipProperties=" + membershipProperties + - ", member=" + member + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (! (objectToCompare instanceof CollectionMember that)) - { - return false; - } - return Objects.equals(elementHeader, that.elementHeader) && - Objects.equals(membershipProperties, that.membershipProperties) && - Objects.equals(member, that.member); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(elementHeader, membershipProperties, member); - } -} diff --git a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/metadataelements/ContactMethodElement.java b/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/metadataelements/ContactMethodElement.java deleted file mode 100644 index 4e0ebf7822c..00000000000 --- a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/metadataelements/ContactMethodElement.java +++ /dev/null @@ -1,147 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.digitalservice.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.digitalservice.properties.ContactMethodProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ContactMethodElement contains the properties and header for a contract method retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ContactMethodElement implements MetadataElement -{ - private ElementHeader elementHeader = null; - private ContactMethodProperties properties = null; - - - /** - * Default constructor - */ - public ContactMethodElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ContactMethodElement(ContactMethodElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - properties = template.getProperties(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - @Override - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the properties of the contact method. - * - * @return properties - */ - public ContactMethodProperties getProperties() - { - return properties; - } - - - /** - * Set up the contract method properties. - * - * @param properties properties - */ - public void setProperties(ContactMethodProperties properties) - { - this.properties = properties; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ContactMethodElement{" + - "elementHeader=" + elementHeader + - ", properties=" + properties + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ContactMethodElement that = (ContactMethodElement) objectToCompare; - return Objects.equals(elementHeader, that.elementHeader) && - Objects.equals(properties, that.properties); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementHeader, properties); - } -} diff --git a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/metadataelements/MetadataElement.java b/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/metadataelements/MetadataElement.java deleted file mode 100644 index c2f340a8db2..00000000000 --- a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/metadataelements/MetadataElement.java +++ /dev/null @@ -1,28 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.digitalservice.metadataelements; - -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * MetadataElement is the common interface for all metadata elements. It adds the header information that is stored with the properties. - * This includes detains of its unique identifier, type and origin. - */ -public interface MetadataElement -{ - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - ElementHeader getElementHeader(); - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - void setElementHeader(ElementHeader elementHeader); -} diff --git a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/metadataelements/PersonRoleAppointee.java b/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/metadataelements/PersonRoleAppointee.java deleted file mode 100644 index cd8ba226716..00000000000 --- a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/metadataelements/PersonRoleAppointee.java +++ /dev/null @@ -1,157 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.digitalservice.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; - -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * PersonRoleAppointee is the bean used to return a role and current appointee(s). - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes({ - @JsonSubTypes.Type(value = PersonRoleHistory.class, name = "PersonRoleHistory"), - @JsonSubTypes.Type(value = AgreementRoleAppointee.class, name = "AgreementRoleAppointee"), - }) -public class PersonRoleAppointee extends PersonRoleElement -{ - private List currentAppointees = null; - - - /** - * Default constructor - */ - public PersonRoleAppointee() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public PersonRoleAppointee(PersonRoleAppointee template) - { - super(template); - - if (template != null) - { - currentAppointees = template.getCurrentAppointees(); - } - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public PersonRoleAppointee(PersonRoleElement template) - { - super(template); - } - - - /** - * Return information about the person appointed to the governance role. - * - * @return list of GovernanceAppointee objects - */ - public List getCurrentAppointees() - { - if (currentAppointees == null) - { - return null; - } - else if (currentAppointees.isEmpty()) - { - return null; - } - - return currentAppointees; - } - - - /** - * Set up the information about the person appointed to the governance role. - * - * @param currentAppointees list of GovernanceAppointee objects - */ - public void setCurrentAppointees(List currentAppointees) - { - this.currentAppointees = currentAppointees; - } - - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "PersonRoleAppointee{" + - "currentAppointees=" + currentAppointees + - ", elementHeader=" + getElementHeader() + - ", properties=" + getProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - PersonRoleAppointee that = (PersonRoleAppointee) objectToCompare; - return Objects.equals(currentAppointees, that.currentAppointees); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), currentAppointees); - } -} diff --git a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/metadataelements/PersonRoleElement.java b/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/metadataelements/PersonRoleElement.java deleted file mode 100644 index efb8336865c..00000000000 --- a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/metadataelements/PersonRoleElement.java +++ /dev/null @@ -1,147 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.digitalservice.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.digitalservice.properties.PersonRoleProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * PersonalRoleElement contains the properties and header for a person role assigned to a profile retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class PersonRoleElement implements MetadataElement -{ - private ElementHeader elementHeader = null; - private PersonRoleProperties properties = null; - - - /** - * Default constructor - */ - public PersonRoleElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public PersonRoleElement(PersonRoleElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - properties = template.getProperties(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param header element header object - */ - @Override - public void setElementHeader(ElementHeader header) - { - this.elementHeader = header; - } - - - /** - * Return the properties of the role. - * - * @return properties - */ - public PersonRoleProperties getProperties() - { - return properties; - } - - - /** - * Set up the role properties. - * - * @param properties properties - */ - public void setProperties(PersonRoleProperties properties) - { - this.properties = properties; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "PersonRoleElement{" + - "elementHeader=" + elementHeader + - ", properties=" + properties + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - PersonRoleElement that = (PersonRoleElement) objectToCompare; - return Objects.equals(elementHeader, that.elementHeader) && - Objects.equals(properties, that.properties); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementHeader, properties); - } -} diff --git a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/metadataelements/ProfileElement.java b/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/metadataelements/ProfileElement.java deleted file mode 100644 index 62793b1bf3e..00000000000 --- a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/metadataelements/ProfileElement.java +++ /dev/null @@ -1,221 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.digitalservice.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.digitalservice.properties.ActorProfileProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ProfileElement contains the properties and header for a profile of a person, team, engine or organization - * retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ProfileElement implements MetadataElement -{ - private ElementHeader elementHeader = null; - private ActorProfileProperties profileProperties = null; - private List userIdentities = null; - private List contactMethods = null; - - - /** - * Default constructor - */ - public ProfileElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ProfileElement(ProfileElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - profileProperties = template.getProfileProperties(); - userIdentities = template.getUserIdentities(); - contactMethods = template.getContactMethods(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - @Override - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the properties of the profile. - * - * @return properties - */ - public ActorProfileProperties getProfileProperties() - { - return profileProperties; - } - - - /** - * Set up the profile properties. - * - * @param profileProperties properties - */ - public void setProfileProperties(ActorProfileProperties profileProperties) - { - this.profileProperties = profileProperties; - } - - - /** - * Return the list of user identities associated with the personal profile. - * - * @return list or null - */ - public List getUserIdentities() - { - if (userIdentities == null) - { - return null; - } - else if (userIdentities.isEmpty()) - { - return null; - } - - return userIdentities; - } - - - /** - * Set up the list of user identities associated with the personal profile. - * - * @param userIdentities list or null - */ - public void setUserIdentities(List userIdentities) - { - this.userIdentities = userIdentities; - } - - - /** - * Return the list of contact methods for the individual. - * - * @return list or null - */ - public List getContactMethods() - { - if (contactMethods == null) - { - return null; - } - - if (contactMethods.isEmpty()) - { - return null; - } - - return contactMethods; - } - - - /** - * Set up the list of contact methods for the individual. - * - * @param contactMethods list or null - */ - public void setContactMethods(List contactMethods) - { - this.contactMethods = contactMethods; - } - - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ProfileElement{" + - "elementHeader=" + elementHeader + - ", profileProperties=" + profileProperties + - ", userIdentities=" + userIdentities + - ", contactMethods=" + contactMethods + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ProfileElement that = (ProfileElement) objectToCompare; - return Objects.equals(elementHeader, that.elementHeader) && - Objects.equals(profileProperties, that.profileProperties) && - Objects.equals(userIdentities, that.userIdentities) && - Objects.equals(contactMethods, that.contactMethods); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(elementHeader, profileProperties, userIdentities, contactMethods); - } -} diff --git a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/metadataelements/RelatedElement.java b/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/metadataelements/RelatedElement.java deleted file mode 100644 index e4a54c32f5f..00000000000 --- a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/metadataelements/RelatedElement.java +++ /dev/null @@ -1,172 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.digitalservice.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.digitalservice.properties.RelationshipProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * RelatedElement contains the properties and header for a relationship retrieved from the metadata repository along with the stub - * of the related element. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class RelatedElement -{ - private ElementHeader relationshipHeader = null; - private RelationshipProperties relationshipProperties = null; - private ElementStub relatedElement = null; - - /** - * Default constructor - */ - public RelatedElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public RelatedElement(RelatedElement template) - { - if (template != null) - { - relationshipHeader = template.getRelationshipHeader(); - relationshipProperties = template.getRelationshipProperties(); - relatedElement = template.getRelatedElement(); - } - } - - - /** - * Return the element header associated with the relationship. - * - * @return element header object - */ - public ElementHeader getRelationshipHeader() - { - return relationshipHeader; - } - - - /** - * Set up the element header associated with the relationship. - * - * @param relationshipHeader element header object - */ - public void setRelationshipHeader(ElementHeader relationshipHeader) - { - this.relationshipHeader = relationshipHeader; - } - - - /** - * Return details of the relationship - * - * @return relationship properties - */ - public RelationshipProperties getRelationshipProperties() - { - return relationshipProperties; - } - - - /** - * Set up relationship properties - * - * @param relationshipProperties relationship properties - */ - public void setRelationshipProperties(RelationshipProperties relationshipProperties) - { - this.relationshipProperties = relationshipProperties; - } - - - /** - * Return the element header associated with end 1 of the relationship. - * - * @return element stub object - */ - public ElementStub getRelatedElement() - { - return relatedElement; - } - - - /** - * Set up the element header associated with end 1 of the relationship. - * - * @param relatedElement element stub object - */ - public void setRelatedElement(ElementStub relatedElement) - { - this.relatedElement = relatedElement; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "RelatedElement{" + - "relationshipHeader=" + relationshipHeader + - ", relationshipProperties=" + relationshipProperties + - ", relatedElement=" + relatedElement + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - RelatedElement that = (RelatedElement) objectToCompare; - return Objects.equals(getRelationshipHeader(), that.getRelationshipHeader()) && - Objects.equals(getRelationshipProperties(), that.getRelationshipProperties()) && - Objects.equals(getRelatedElement(), that.getRelatedElement()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), relationshipHeader, relationshipProperties, relatedElement); - } -} diff --git a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/metadataelements/TeamProfileElement.java b/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/metadataelements/TeamProfileElement.java deleted file mode 100644 index 203aac0503b..00000000000 --- a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/metadataelements/TeamProfileElement.java +++ /dev/null @@ -1,211 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.digitalservice.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.digitalservice.properties.TeamProfileProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; - -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * TeamProfileElement contains the properties and header for a team profile retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class TeamProfileElement implements MetadataElement -{ - private ElementHeader elementHeader = null; - private TeamProfileProperties properties = null; - private ElementStub superTeam = null; - private List subTeams = null; - - /** - * Default constructor - */ - public TeamProfileElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public TeamProfileElement(TeamProfileElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - properties = template.getProperties(); - superTeam = template.getSuperTeam(); - subTeams = template.getSubTeams(); - } - } - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - @Override - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the properties from the team profile. - * - * @return properties - */ - public TeamProfileProperties getProperties() - { - return properties; - } - - - /** - * Set up the properties from the team profile. - * - * @param properties properties - */ - public void setProperties(TeamProfileProperties properties) - { - this.properties = properties; - } - - - /** - * Return the unique identifier (guid) of the team that this team reports to - null means top level team. - * - * @return description of linked profile - */ - public ElementStub getSuperTeam() - { - return superTeam; - } - - - /** - * Set up the unique identifier (guid) of the team that this team reports to - null means top level team. - * - * @param superTeam description of linked profile - */ - public void setSuperTeam(ElementStub superTeam) - { - this.superTeam = superTeam; - } - - - /** - * Return the list of unique identifiers (guids) for the teams that report to this team. - * - * @return list of descriptions of linked profiles - */ - public List getSubTeams() - { - if (subTeams == null) - { - return null; - } - else if (subTeams.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(subTeams); - } - } - - - /** - * Set up the list of unique identifiers (guids) for the teams that report to this team. - * - * @param subTeams list of descriptions of linked profiles - */ - public void setSubTeams(List subTeams) - { - this.subTeams = subTeams; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "TeamProfileElement{" + - "elementHeader=" + elementHeader + - ", properties=" + properties + - ", superTeam='" + superTeam + '\'' + - ", subTeams=" + subTeams + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - TeamProfileElement that = (TeamProfileElement) objectToCompare; - return Objects.equals(elementHeader, that.elementHeader) && - Objects.equals(properties, that.properties) && - Objects.equals(superTeam, that.superTeam) && - Objects.equals(subTeams, that.subTeams); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(elementHeader, properties, superTeam, subTeams); - } -} diff --git a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/metadataelements/UserIdentityElement.java b/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/metadataelements/UserIdentityElement.java deleted file mode 100644 index 48823f37899..00000000000 --- a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/metadataelements/UserIdentityElement.java +++ /dev/null @@ -1,147 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.digitalservice.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.digitalservice.properties.UserIdentityProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * UserIdentityElement contains the properties and header for a user identity retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class UserIdentityElement implements MetadataElement -{ - private ElementHeader elementHeader = null; - private UserIdentityProperties properties = null; - - - /** - * Default constructor - */ - public UserIdentityElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public UserIdentityElement(UserIdentityElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - properties = template.getProperties(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - @Override - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the properties of the userId. - * - * @return properties - */ - public UserIdentityProperties getProperties() - { - return properties; - } - - - /** - * Set up the userId properties. - * - * @param properties properties - */ - public void setProperties(UserIdentityProperties properties) - { - this.properties = properties; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "UserIdentityElement{" + - "elementHeader=" + elementHeader + - ", properties=" + properties + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - UserIdentityElement that = (UserIdentityElement) objectToCompare; - return Objects.equals(elementHeader, that.elementHeader) && - Objects.equals(properties, that.properties); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementHeader, properties); - } -} diff --git a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/metadataelements/package-info.java b/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/metadataelements/package-info.java deleted file mode 100644 index e2ce3a19273..00000000000 --- a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/metadataelements/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -/** - * Metadata elements retrieved from the open metadata repositories. - */ -package org.odpi.openmetadata.accessservices.digitalservice.metadataelements; diff --git a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/ActorProfileProperties.java b/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/ActorProfileProperties.java deleted file mode 100644 index 40d733c043c..00000000000 --- a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/ActorProfileProperties.java +++ /dev/null @@ -1,165 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalservice.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * The ActorProfileProperties describes the common properties of a Personal Profile, IT Profile and Team Profile. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes( - { - @JsonSubTypes.Type(value = TeamProfileProperties.class, name = "TeamProfileProperties"), - }) - -public class ActorProfileProperties extends ReferenceableProperties -{ - private String knownName = null; - private String description = null; - - - /** - * Default Constructor - */ - public ActorProfileProperties() - { - super(); - } - - - /** - * Copy/clone Constructor - the resulting object. - * - * @param template object being copied - */ - public ActorProfileProperties(ActorProfileProperties template) - { - super (template); - - if (template != null) - { - this.knownName = template.getKnownName(); - this.description = template.getDescription(); - } - } - - - /** - * Return the name that the person/automated agent/team is known as. - * - * @return string name - */ - public String getKnownName() - { - return knownName; - } - - - /** - * Set up the name that the person/automated agent/team is known as. - * - * @param knownName string name - */ - public void setKnownName(String knownName) - { - this.knownName = knownName; - } - - - /** - * Return description of the person/automated agent/team. - * - * @return text - */ - public String getDescription() - { - return description; - } - - - /** - * Set up description of the person/automated agent/team. - * - * @param description text - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "ActorProfileProperties{" + - "knownName='" + knownName + '\'' + - ", description='" + description + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ActorProfileProperties that = (ActorProfileProperties) objectToCompare; - return Objects.equals(knownName, that.knownName) && - Objects.equals(description, that.description); - } - - - /** - * Just use the GUID for the hash code as it should be unique. - * - * @return int code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), knownName, description); - } -} diff --git a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/CertificationTypeProperties.java b/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/CertificationTypeProperties.java deleted file mode 100644 index 5cd43ab8926..00000000000 --- a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/CertificationTypeProperties.java +++ /dev/null @@ -1,139 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalservice.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * Many regulations and industry bodies define certifications that can confirm a level of support, capability - * or competence in an aspect of a digital organization's operation. Having certifications may be - * necessary to operating legally or may be a business advantage. The certifications awarded can be captured - * in the metadata repository to enable both use and management of the certification process. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class CertificationTypeProperties extends GovernanceDefinitionProperties -{ - private String details = null; - - - /** - * Default Constructor - */ - public CertificationTypeProperties() - { - } - - - /** - * Copy/Clone Constructor - * - * @param template object to copy - */ - public CertificationTypeProperties(CertificationTypeProperties template) - { - super(template); - - if (template != null) - { - this.details = template.getDetails(); - } - } - - - /** - * Return the specific details of the certification. - * - * @return string description - */ - public String getDetails() - { - return details; - } - - - /** - * Set up the specific details of the certification. - * - * @param details string description - */ - public void setDetails(String details) - { - this.details = details; - } - - - /** - * JSON-style toString - * - * @return string containing the properties and their values - */ - @Override - public String toString() - { - return "CertificationTypeProperties{" + - "details='" + details + '\'' + - ", title='" + getTitle() + '\'' + - ", summary='" + getSummary() + '\'' + - ", description='" + getDescription() + '\'' + - ", scope='" + getScope() + '\'' + - ", domainIdentifier=" + getDomainIdentifier() + - ", priority='" + getPriority() + '\'' + - ", implications=" + getImplications() + - ", outcomes=" + getOutcomes() + - ", results=" + getResults() + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - CertificationTypeProperties that = (CertificationTypeProperties) objectToCompare; - return Objects.equals(details, that.details); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), details); - } -} diff --git a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/ClassificationProperties.java b/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/ClassificationProperties.java deleted file mode 100644 index 585590c18ef..00000000000 --- a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/ClassificationProperties.java +++ /dev/null @@ -1,194 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalservice.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; - -import java.util.Date; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ClassificationProperties provides the base class for classification items. This provides extended properties with the ability to - * set effectivity dates. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes( - { - @JsonSubTypes.Type(value = DigitalProductProperties.class, name = "DigitalProductProperties"), - }) -public class ClassificationProperties -{ - private Date effectiveFrom = null; - private Date effectiveTo = null; - - private Map extendedProperties = null; - - - /** - * Default constructor - */ - public ClassificationProperties() - { - super(); - } - - - /** - * Copy/clone constructor. Retrieve values from the supplied template - * - * @param template element to copy - */ - public ClassificationProperties(ClassificationProperties template) - { - if (template != null) - { - effectiveFrom = template.getEffectiveFrom(); - effectiveTo = template.getEffectiveTo(); - extendedProperties = template.getExtendedProperties(); - } - } - - - /** - * Return the date/time that this element is effective from (null means effective from the epoch). - * - * @return date object - */ - public Date getEffectiveFrom() - { - return effectiveFrom; - } - - - /** - * Set up the date/time that this element is effective from (null means effective from the epoch). - * - * @param effectiveFrom date object - */ - public void setEffectiveFrom(Date effectiveFrom) - { - this.effectiveFrom = effectiveFrom; - } - - - /** - * Return the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @return date object - */ - public Date getEffectiveTo() - { - return effectiveTo; - } - - - /** - * Set the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @param effectiveTo date object - */ - public void setEffectiveTo(Date effectiveTo) - { - this.effectiveTo = effectiveTo; - } - - - /** - * Return the properties that have been defined for a subtype of this object that are not supported explicitly - * by this bean. - * - * @return property map - */ - public Map getExtendedProperties() - { - if (extendedProperties == null) - { - return null; - } - else if (extendedProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(extendedProperties); - } - } - - - /** - * Set up the properties that have been defined for a subtype of this object that are not supported explicitly - * by this bean. - * - * @param extendedProperties property map - */ - public void setExtendedProperties(Map extendedProperties) - { - this.extendedProperties = extendedProperties; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "ClassificationProperties{" + - "effectiveFrom=" + effectiveFrom + - ", effectiveTo=" + effectiveTo + - ", extendedProperties=" + extendedProperties + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ClassificationProperties that = (ClassificationProperties) objectToCompare; - return Objects.equals(effectiveFrom, that.effectiveFrom) && - Objects.equals(effectiveTo, that.effectiveTo); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(effectiveFrom, effectiveTo); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/CollectionMembershipProperties.java b/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/CollectionMembershipProperties.java deleted file mode 100644 index 1ffd4aeb8ea..00000000000 --- a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/CollectionMembershipProperties.java +++ /dev/null @@ -1,393 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalservice.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.openmetadata.enums.CollectionMemberStatus; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * CollectionMember describes a member of a collection. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class CollectionMembershipProperties extends RelationshipProperties -{ - private String membershipRationale = null; - private String createdBy = null; - private String expression = null; - private int confidence = 0; - private CollectionMemberStatus status = null; - private String userDefinedStatus = null; - private String steward = null; - private String stewardTypeName = null; - private String stewardPropertyName = null; - private String source = null; - private String notes = null; - - - - /** - * Default constructor - */ - public CollectionMembershipProperties() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public CollectionMembershipProperties(CollectionMembershipProperties template) - { - super(template); - - if (template != null) - { - membershipRationale = template.getMembershipRationale(); - createdBy = template.getCreatedBy(); - confidence = template.getConfidence(); - expression = template.getExpression(); - status = template.getStatus(); - userDefinedStatus = template.getUserDefinedStatus(); - source = template.getSource(); - steward = template.getSteward(); - stewardTypeName = template.getStewardTypeName(); - stewardPropertyName = template.getStewardPropertyName(); - notes = template.getNotes(); - } - } - - - /** - * Return the rationale or role of the asset in this collection. - * - * @return text - */ - public String getMembershipRationale() - { - return membershipRationale; - } - - - /** - * Set up the rationale or role of the asset in this collection. - * - * @param membershipRationale text - */ - public void setMembershipRationale(String membershipRationale) - { - this.membershipRationale = membershipRationale; - } - - - /** - * Return the identifier of the person/process that created this membership. The userId of the creator - * is automatically captured. This field can be used to add additional information about the creator. - * For example, this could be the identifier of a process instance that created the membership relationship. - * - * @return string - */ - public String getCreatedBy() - { - return createdBy; - } - - - /** - * Set up the identifier of the person/process that created this membership. The userId of the creator - * is automatically captured. This field can be used to add additional information about the creator. - * For example, this could be the identifier of a process instance that created the membership relationship. - * - * @param createdBy string - */ - public void setCreatedBy(String createdBy) - { - this.createdBy = createdBy; - } - - - /** - * Return the expression used to determine the membership. This is used by automated processes that are determining - * membership through one or more matching algorithms. This string helps the steward understand the type of match made. - * - * @return string - */ - public String getExpression() - { - return expression; - } - - /** - * Set up the expression used to determine the membership. This is used by automated processes that are determining - * membership through one or more matching algorithms. This string helps the steward understand the type of match made. - * - * @param expression string - */ - public void setExpression(String expression) - { - this.expression = expression; - } - - - /** - * Return the confidence level (0-100) that the matching is correct. - * - * @return int - */ - public int getConfidence() - { - return confidence; - } - - - /** - * Set up the confidence level (0-100) that the matching is correct. - * - * @param confidence int - */ - public void setConfidence(int confidence) - { - this.confidence = confidence; - } - - - /** - * Return the status of the membership in the collection. - * - * @return enum - */ - public CollectionMemberStatus getStatus() - { - return status; - } - - - /** - * Set up the status of the membership in the collection. - * - * @param status enum - */ - public void setStatus(CollectionMemberStatus status) - { - this.status = status; - } - - - /** - * Return the status of the membership in the collection. This status is controlled by the local deployment. - * - * @return string - */ - public String getUserDefinedStatus() - { - return userDefinedStatus; - } - - - /** - * Set up the status of the membership in the collection. This status is controlled by the local deployment. - * - * @param userDefinedStatus string - */ - public void setUserDefinedStatus(String userDefinedStatus) - { - this.userDefinedStatus = userDefinedStatus; - } - - - /** - * Return the source of information that determined the membership. - * - * @return string - */ - public String getSource() - { - return source; - } - - - /** - * Set up the source of information that determined the membership. - * - * @param source string - */ - public void setSource(String source) - { - this.source = source; - } - - - /** - * Returns the id of the steward responsible for the mapping. - * - * @return String id - */ - public String getSteward() - { - return steward; - } - - - /** - * Set up the id of the steward responsible for the mapping. - * - * @param steward String id - */ - public void setSteward(String steward) - { - this.steward = steward; - } - - - /** - * Return the type of element that describes the steward. - * - * @return type name - */ - public String getStewardTypeName() - { - return stewardTypeName; - } - - - /** - * Set up the type of element that describes the steward. - * - * @param stewardTypeName type name - */ - public void setStewardTypeName(String stewardTypeName) - { - this.stewardTypeName = stewardTypeName; - } - - - /** - * Return the name of the property that holds the steward's identifier. - * - * @return property name - */ - public String getStewardPropertyName() - { - return stewardPropertyName; - } - - - /** - * Set up the name of the property that holds the steward's identifier. - * - * @param stewardPropertyName property name - */ - public void setStewardPropertyName(String stewardPropertyName) - { - this.stewardPropertyName = stewardPropertyName; - } - - - /** - * Return the additional values associated with the symbolic name. - * - * @return string text - */ - public String getNotes() - { - return notes; - } - - - /** - * Set up the additional values associated with the symbolic name. - * - * @param notes string text - */ - public void setNotes(String notes) - { - this.notes = notes; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "CollectionMembershipProperties{" + - "membershipRationale='" + membershipRationale + '\'' + - ", createdBy='" + createdBy + '\'' + - ", expression='" + expression + '\'' + - ", confidence=" + confidence + - ", status=" + status + - ", userDefinedStatus='" + userDefinedStatus + '\'' + - ", steward='" + steward + '\'' + - ", stewardTypeName='" + stewardTypeName + '\'' + - ", stewardPropertyName='" + stewardPropertyName + '\'' + - ", source='" + source + '\'' + - ", notes='" + notes + '\'' + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - CollectionMembershipProperties that = (CollectionMembershipProperties) objectToCompare; - return confidence == that.confidence && - Objects.equals(membershipRationale, that.membershipRationale) - && Objects.equals(createdBy, that.createdBy) && - Objects.equals(expression, that.expression) && - status == that.status && - Objects.equals(userDefinedStatus, that.userDefinedStatus) - && Objects.equals(steward, that.steward) && - Objects.equals(stewardTypeName, that.stewardTypeName) && - Objects.equals(stewardPropertyName, that.stewardPropertyName) && - Objects.equals(source, that.source) && - Objects.equals(notes, that.notes); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), membershipRationale, createdBy, expression, confidence, status, userDefinedStatus, steward, - stewardTypeName, stewardPropertyName, source, notes); - } -} diff --git a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/CollectionProperties.java b/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/CollectionProperties.java deleted file mode 100644 index 6afa60f25f1..00000000000 --- a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/CollectionProperties.java +++ /dev/null @@ -1,233 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalservice.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.openmetadata.enums.OrderBy; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * CollectionProperties describes the core properties of a collection. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class CollectionProperties extends ReferenceableProperties -{ - private String name = null; - private String description = null; - private String collectionType = null; - private OrderBy collectionOrder = null; - private String orderByPropertyName = null; - - - /** - * Default constructor - */ - public CollectionProperties() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public CollectionProperties(CollectionProperties template) - { - super(template); - - if (template != null) - { - this.name = template.getName(); - this.description = template.getDescription(); - this.collectionType = template.getCollectionType(); - this.collectionOrder = template.getCollectionOrder(); - this.orderByPropertyName = template.getOrderByPropertyName(); - } - } - - - /** - * Return the name of the collection. - * - * @return string name - */ - public String getName() - { - return name; - } - - - /** - * Set up the name of the collection. - * - * @param name string name - */ - public void setName(String name) - { - this.name = name; - } - - - /** - * Return the description of the collection. - * - * @return text - */ - public String getDescription() - { - return description; - } - - - /** - * Set up the description of the collection. - * - * @param description text - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * Return a descriptive name for the collection's type. - * - * @return string name - */ - public String getCollectionType() - { - return collectionType; - } - - - /** - * Set up a descriptive name for the collection's type. - * - * @param collectionType string name - */ - public void setCollectionType(String collectionType) - { - this.collectionType = collectionType; - } - - - /** - * Return the property to use to determine the order that assets are returned. - * - * @return OrderBy enum - */ - public OrderBy getCollectionOrder() - { - return collectionOrder; - } - - - /** - * Set up the property to use to determine the order that assets are returned. - * - * @param collectionOrder OrderBy enum - */ - public void setCollectionOrder(OrderBy collectionOrder) - { - this.collectionOrder = collectionOrder; - } - - - /** - * Return the property name for OrderBy.OTHER. - * - * @return string property name - */ - public String getOrderByPropertyName() - { - return orderByPropertyName; - } - - - /** - * Set up the property name for OrderBy.OTHER. - * - * @param orderByPropertyName string property name - */ - public void setOrderByPropertyName(String orderByPropertyName) - { - this.orderByPropertyName = orderByPropertyName; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "CollectionProperties{" + - "name='" + name + '\'' + - ", description='" + description + '\'' + - ", collectionType='" + collectionType + '\'' + - ", collectionOrdering=" + collectionOrder + - ", orderPropertyName='" + orderByPropertyName + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - CollectionProperties that = (CollectionProperties) objectToCompare; - return getCollectionOrder() == that.getCollectionOrder() && - Objects.equals(getName(), that.getName()) && - Objects.equals(getDescription(), that.getDescription()) && - Objects.equals(getCollectionType(), that.getCollectionType()) && - Objects.equals(getOrderByPropertyName(), that.getOrderByPropertyName()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), getName(), getDescription(), getCollectionType(), getCollectionOrder(), getOrderByPropertyName()); - } -} diff --git a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/CollectionStatus.java b/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/CollectionStatus.java deleted file mode 100644 index 04443185cdf..00000000000 --- a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/CollectionStatus.java +++ /dev/null @@ -1,103 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalservice.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * CollectionStatus specifies which subset of a collection should be returned. The relationship - * that links a member into a collection has an start and end date (called the effective dates). The - * Community Profile OMAS uses the CollectionStatus and the effective dates to determine which members to return. - *
      - *
    • ACTIVE - all the collection members with a current effective dates. This is the default.
    • - *
    • PAST - all the collection members that have effective dates in the past.
    • - *
    • FUTURE - all the collection members that become effective in the future.
    • - *
    • ALL - all the collection members linked to the collection irrespective of their effective dates.
    • - *
    - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public enum CollectionStatus -{ - /** - * All the collection members with a current effective dates (default). - */ - ACTIVE (0, "Active", "All the collection members with a current effective dates (default)."), - - /** - * All the collection members that have effective dates in the past. - */ - PAST (1, "Past", "All the collection members that have effective dates in the past."), - - /** - * All the collection members that become effective in the future. - */ - FUTURE (2, "Future", "All the collection members that become effective in the future."), - - /** - * All the collection members linked to the collection irrespective of their effective dates. - */ - ALL (99, "All", "All the collection members linked to the collection irrespective of their effective dates."); - - - private final int ordinal; - private final String name; - private final String description; - - - /** - * Default constructor for the enumeration. - * - * @param ordinal numerical representation of the enumeration - * @param name default string name of the enumeration - * @param description default string description of the enumeration - */ - CollectionStatus(int ordinal, String name, String description) - { - this.ordinal = ordinal; - this.name = name; - this.description = description; - } - - - /** - * Return the numeric representation of the enumeration. - * - * @return int ordinal - */ - public int getOrdinal() { return ordinal; } - - - /** - * Return the default name of the enumeration. - * - * @return String name - */ - public String getName() { return name; } - - - /** - * Return the default description of the enumeration. - * - * @return String description - */ - public String getDescription() { return description; } - - - /** - * toString() JSON-style - * - * @return string description - */ - @Override - public String toString() - { - return "CollectionStatus : " + name; - } -} diff --git a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/ContactMethodProperties.java b/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/ContactMethodProperties.java deleted file mode 100644 index 7135e7962bf..00000000000 --- a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/ContactMethodProperties.java +++ /dev/null @@ -1,338 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalservice.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Date; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ContactMethodProperties describes a single mechanism that can be used to contact an individual. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ContactMethodProperties -{ - private String name = null; - private String contactType = null; - - private ContactMethodType contactMethodType = null; - private String contactMethodService = null; - private String contactMethodValue = null; - - private Date effectiveFrom = null; - private Date effectiveTo = null; - - private String typeName = null; - private Map extendedProperties = null; - - - /** - * Default constructor - */ - public ContactMethodProperties() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ContactMethodProperties(ContactMethodProperties template) - { - if (template != null) - { - contactMethodType = template.getContactMethodType(); - contactMethodService = template.getContactMethodService(); - contactMethodValue = template.getContactMethodValue(); - effectiveFrom = template.getEffectiveFrom(); - effectiveTo = template.getEffectiveTo(); - typeName = template.getTypeName(); - extendedProperties = template.getExtendedProperties(); - } - } - - - /** - * Return the name to give this contact method (imagine a list of contact methods). - * - * @return string - */ - public String getName() - { - return name; - } - - - /** - * Set up the name to give this contact method (imagine a list of contact methods). - * - * @param name string - */ - public void setName(String name) - { - this.name = name; - } - - - /** - * Return the type of contact - is it related to work or personal etc. - * - * @return string type name - often controlled by a valid value set - */ - public String getContactType() - { - return contactType; - } - - - /** - * Set up the type of contact - is it related to work or personal etc. - * - * @param contactType string type name - often controlled by a valid value set - */ - public void setContactType(String contactType) - { - this.contactType = contactType; - } - - - /** - * Return the type of the contact method. - * - * @return contact method type enum - */ - public ContactMethodType getContactMethodType() - { - return contactMethodType; - } - - - /** - * Set up the type of the contact method. - * - * @param contactMethodType contact method type enum - */ - public void setContactMethodType(ContactMethodType contactMethodType) - { - this.contactMethodType = contactMethodType; - } - - - /** - * Return the URL of the service used to contact the individual. - * - * @return service URL - */ - public String getContactMethodService() - { - return contactMethodService; - } - - - /** - * Set up theURL of the service used to contact the individual. - * - * @param contactMethodService service URL - */ - public void setContactMethodService(String contactMethodService) - { - this.contactMethodService = contactMethodService; - } - - - /** - * Return the account name or similar value used to direct the message to the individual. - * - * @return value string - */ - public String getContactMethodValue() - { - return contactMethodValue; - } - - - /** - * Set up the account name or similar value used to direct the message to the individual. - * - * @param contactMethodValue value string - */ - public void setContactMethodValue(String contactMethodValue) - { - this.contactMethodValue = contactMethodValue; - } - - - - /** - * Return the date/time that this element is effective from (null means effective from the epoch). - * - * @return date object - */ - public Date getEffectiveFrom() - { - return effectiveFrom; - } - - - /** - * Set up the date/time that this element is effective from (null means effective from the epoch). - * - * @param effectiveFrom date object - */ - public void setEffectiveFrom(Date effectiveFrom) - { - this.effectiveFrom = effectiveFrom; - } - - - /** - * Return the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @return date object - */ - public Date getEffectiveTo() - { - return effectiveTo; - } - - - /** - * Set the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @param effectiveTo date object - */ - public void setEffectiveTo(Date effectiveTo) - { - this.effectiveTo = effectiveTo; - } - - - /** - * Return the name of the open metadata type for this metadata element. - * - * @return string name - */ - public String getTypeName() - { - return typeName; - } - - - /** - * Set up the name of the open metadata type for this element. - * - * @param typeName string name - */ - public void setTypeName(String typeName) - { - this.typeName = typeName; - } - - - /** - * Return the properties that have been defined for a subtype of this object that are not supported explicitly - * by this bean. - * - * @return property map - */ - public Map getExtendedProperties() - { - if (extendedProperties == null) - { - return null; - } - else if (extendedProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(extendedProperties); - } - } - - - /** - * Set up the properties that have been defined for a subtype of this object that are not supported explicitly - * by this bean. - * - * @param extendedProperties property map - */ - public void setExtendedProperties(Map extendedProperties) - { - this.extendedProperties = extendedProperties; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "ContactMethodProperties{" + - "type=" + contactMethodType + - ", service='" + contactMethodService + '\'' + - ", value='" + contactMethodValue + '\'' + - ", effectiveFrom=" + effectiveFrom + - ", effectiveTo=" + effectiveTo + - ", typeName='" + typeName + '\'' + - ", extendedProperties=" + extendedProperties + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ContactMethodProperties that = (ContactMethodProperties) objectToCompare; - return contactMethodType == that.contactMethodType && - Objects.equals(contactMethodService, that.contactMethodService) && - Objects.equals(contactMethodValue, that.contactMethodValue) && - Objects.equals(effectiveFrom, that.effectiveFrom) && - Objects.equals(effectiveTo, that.effectiveTo) && - Objects.equals(typeName, that.typeName) && - Objects.equals(extendedProperties, that.extendedProperties); - } - - - /** - * Hash code for this object - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(contactMethodType, contactMethodService, contactMethodValue, effectiveFrom, effectiveTo, typeName, extendedProperties); - } -} diff --git a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/ContactMethodType.java b/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/ContactMethodType.java deleted file mode 100644 index 2519003a0d8..00000000000 --- a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/ContactMethodType.java +++ /dev/null @@ -1,150 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalservice.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ContactMethodType specifies the contact mechanism to use to contact an individual. - *
      - *
    • EMAIL
    • - *
    • PHONE
    • - *
    • CHAT
    • - *
    • PROFILE
    • - *
    • ACCOUNT
    • - *
    • OTHER
    • - *
    - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public enum ContactMethodType -{ - /** - * Send email. - */ - EMAIL (0, 0, "Email", "Send email."), - - /** - * Call by phone. - */ - PHONE (1, 1, "Phone", "Call by phone."), - - /** - * Send chat message. - */ - CHAT (2, 2, "Chat", "Send chat message."), - - /** - * Send comment to personal profile. - */ - PROFILE (3, 3, "Profile", "Send comment to personal profile."), - - /** - * Send comment to a social media account. - */ - ACCOUNT (4, 4, "Account", "Send comment to a social media account."), - - /** - * Another contact mechanism. - */ - OTHER (99,99, "Other", "Another contact mechanism."); - - - private static final String ENUM_TYPE_GUID = "30e7d8cd-df01-46e8-9247-a24c5650910d"; - private static final String ENUM_TYPE_NAME = "ContactMethodType"; - - private final int openTypeOrdinal; - - private final int ordinal; - private final String name; - private final String description; - - - /** - * Constructor to set up the instance of this enum. - * - * @param ordinal code number - * @param openTypeOrdinal code number from the equivalent Enum Type - * @param name default name - * @param description default description - */ - ContactMethodType(int ordinal, - int openTypeOrdinal, - String name, - String description) - { - this.ordinal = ordinal; - this.openTypeOrdinal = openTypeOrdinal; - this.name = name; - this.description = description; - } - - - /** - * Return the code for this enum that comes from the Open Metadata Type that this enum represents. - * - * @return int code number - */ - public int getOpenTypeOrdinal() - { - return openTypeOrdinal; - } - - - /** - * Return the unique identifier for the open metadata enum type that this enum class represents. - * - * @return string guid - */ - public String getOpenTypeGUID() { return ENUM_TYPE_GUID; } - - - /** - * Return the unique name for the open metadata enum type that this enum class represents. - * - * @return string name - */ - public String getOpenTypeName() { return ENUM_TYPE_NAME; } - - - /** - * Return the numeric representation of the enumeration. - * - * @return int ordinal - */ - public int getOrdinal() { return ordinal; } - - - /** - * Return the default name of the enumeration. - * - * @return String name - */ - public String getName() { return name; } - - - /** - * Return the default description of the enumeration. - * - * @return String description - */ - public String getDescription() { return description; } - - - /** - * toString() JSON-style - * - * @return string description - */ - @Override - public String toString() - { - return "ContactMethodType : " + name; - } -} diff --git a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/DigitalSubscriptionProperties.java b/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/DigitalSubscriptionProperties.java deleted file mode 100644 index 10ea5dd1560..00000000000 --- a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/DigitalSubscriptionProperties.java +++ /dev/null @@ -1,160 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalservice.properties; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * DigitalSubscriptionProperties describes the agreement between a subscriber to one or more digital products. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class DigitalSubscriptionProperties extends AgreementProperties -{ - private String supportLevel = null; - private Map serviceLevels = null; - - - /** - * Default constructor - */ - public DigitalSubscriptionProperties() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public DigitalSubscriptionProperties(DigitalSubscriptionProperties template) - { - super(template); - - if (template != null) - { - this.supportLevel = template.getSupportLevel(); - this.serviceLevels = template.getServiceLevels(); - } - } - - - /** - * Return the level of support offered in this subscription. - * - * @return string - */ - public String getSupportLevel() - { - return supportLevel; - } - - - /** - * Set up the level of support offered in this subscription. - * - * @param supportLevel string - */ - public void setSupportLevel(String supportLevel) - { - this.supportLevel = supportLevel; - } - - - /** - * Return the map of service levels agreed in this subscription. - * - * @return map - */ - public Map getServiceLevels() - { - return serviceLevels; - } - - - /** - * Set up the map of service levels agreed in this subscription. - * - * @param serviceLevels int - */ - public void setServiceLevels(Map serviceLevels) - { - this.serviceLevels = serviceLevels; - } - - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "DigitalSubscriptionProperties{" + - "displayName='" + getDisplayName() + '\'' + - ", description='" + getDescription() + '\'' + - ", agreementType='" + getAgreementType() + '\'' + - ", supportLevel='" + supportLevel + '\'' + - ", serviceLevels=" + serviceLevels + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - DigitalSubscriptionProperties that = (DigitalSubscriptionProperties) objectToCompare; - return getSupportLevel() == that.getSupportLevel() && - getServiceLevels() == that.getServiceLevels(); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), getSupportLevel(), getServiceLevels()); - } -} diff --git a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/GovernanceDefinitionProperties.java b/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/GovernanceDefinitionProperties.java deleted file mode 100644 index 7d375433466..00000000000 --- a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/GovernanceDefinitionProperties.java +++ /dev/null @@ -1,397 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalservice.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; - - -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * GovernanceDefinitionProperties provides the base class for many of the definitions that define the data strategy - * and governance program. It includes many of the common fields: - * - *
      - *
    • Document Id
    • - *
    • Title
    • - *
    • Summary
    • - *
    • Description
    • - *
    • Scope
    • - *
    • Domain Identifier
    • - *
    • Status
    • - *
    • Priority
    • - *
    • Implications
    • - *
    • Outcomes
    • - *
    • Results
    • - *
    • AdditionalProperties
    • - *
    - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes( - { - @JsonSubTypes.Type(value = LicenseTypeProperties.class, name = "LicenseTypeProperties"), - @JsonSubTypes.Type(value = CertificationTypeProperties.class, name = "CertificationTypeProperties"), - }) -public class GovernanceDefinitionProperties extends ReferenceableProperties -{ - private String title = null; - private String summary = null; - private String description = null; - private String scope = null; - private int domainIdentifier = 0; - private String priority = null; - private List implications = null; - private List outcomes = null; - private List results = null; - - - - /** - * Default Constructor - */ - public GovernanceDefinitionProperties() - { - super(); - } - - - /** - * Copy/clone Constructor - * - * @param template object being copied - */ - public GovernanceDefinitionProperties(GovernanceDefinitionProperties template) - { - super(template); - - if (template != null) - { - this.title = template.getTitle(); - this.summary = template.getSummary(); - this.description = template.getDescription(); - this.scope = template.getScope(); - this.domainIdentifier = template.getDomainIdentifier(); - this.priority = template.getPriority(); - this.implications = template.getImplications(); - this.outcomes = template.getOutcomes(); - this.results = template.getResults(); - } - } - - - /** - * Return the title associated with this governance definition. - * - * @return String title - */ - public String getTitle() - { - return title; - } - - - /** - * Set up the title associated with this governance definition. - * - * @param title String title - */ - public void setTitle(String title) - { - this.title = title; - } - - - - /** - * Return the summary for this governance definition. This should cover its essence. Think of it as - * the executive summary. - * - * @return String short description - */ - public String getSummary() - { - return summary; - } - - - /** - * Set up the summary of the governance definition. This should cover its essence. Think of it as - * the executive summary. - * - * @param summary String description - */ - public void setSummary(String summary) - { - this.summary = summary; - } - - - /** - * Return the full description of the governance definition. - * - * @return String description - */ - public String getDescription() - { - return description; - } - - - /** - * Set up the full description of the governance definition. - * - * @param description String description - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * Return the organizational scope that this governance definition applies to. - * - * @return String organization, department or team name - */ - public String getScope() - { - return scope; - } - - - /** - * Set up the organizational scope that this governance definition applies to. - * - * @param scope String organization, department or team name - */ - public void setScope(String scope) - { - this.scope = scope; - } - - - /** - * Return the identifier of the governance domain that this definition belongs to (0=all). - * - * @return int - */ - public int getDomainIdentifier() - { - return domainIdentifier; - } - - - /** - * Set up the identifier of the governance domain that this definition belongs to (0=all). - * - * @param domainIdentifier int - */ - public void setDomainIdentifier(int domainIdentifier) - { - this.domainIdentifier = domainIdentifier; - } - - - /** - * Return the priority of the governance definition. This may be something like high, medium or low, - * or maybe a time frame or more detailed explanation. - * - * @return String priority - */ - public String getPriority() - { - return priority; - } - - - /** - * Set up the priority of this governance definition. This may be something like high, medium or low, - * or maybe a time frame or more detailed explanation. - * - * @param priority String priority - */ - public void setPriority(String priority) - { - this.priority = priority; - } - - - /** - * Return the list of implications for the organization that this governance definition brings. - * This is often the first enumeration of the changes that that need to be implemented to bring - * the governance definition into effect. - * - * @return list of descriptions - */ - public List getImplications() - { - return implications; - } - - - /** - * Set up the list of implications for the organization that this governance definition brings. - * This is often the first enumeration of the changes that that need to be implemented to bring - * the governance definition into effect. - * - * @param implications list of descriptions - */ - public void setImplications(List implications) - { - this.implications = implications; - } - - - /** - * Return the list of expected outcomes from implementing this governance definition. - * - * @return list of outcome descriptions - */ - public List getOutcomes() - { - if (outcomes == null) - { - return null; - } - else if (outcomes.isEmpty()) - { - return null; - } - else - { - return outcomes; - } - } - - - /** - * Set up the list of expected outcomes from implementing this governance definition. - * - * @param outcomes list of descriptions of outcomes - */ - public void setOutcomes(List outcomes) - { - this.outcomes = outcomes; - } - - - /** - * Return the list of actual results from implementing this governance definition. - * - * @return list of result descriptions - */ - public List getResults() - { - if (outcomes == null) - { - return null; - } - else if (outcomes.isEmpty()) - { - return null; - } - else - { - return outcomes; - } - } - - - /** - * Set up the list of actual results from implementing this governance definition. - * - * @param results list of description of results - */ - public void setResults(List results) - { - this.results = results; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "GovernanceDefinitionProperties{" + - "title='" + title + '\'' + - ", summary='" + summary + '\'' + - ", description='" + description + '\'' + - ", scope='" + scope + '\'' + - ", domainIdentifier=" + domainIdentifier + - ", priority='" + priority + '\'' + - ", implications=" + implications + - ", outcomes=" + outcomes + - ", results=" + results + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (! (objectToCompare instanceof GovernanceDefinitionProperties)) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - GovernanceDefinitionProperties that = (GovernanceDefinitionProperties) objectToCompare; - return domainIdentifier == that.domainIdentifier && - Objects.equals(title, that.title) && - Objects.equals(summary, that.summary) && - Objects.equals(description, that.description) && - Objects.equals(scope, that.scope) && - Objects.equals(priority, that.priority) && - Objects.equals(implications, that.implications) && - Objects.equals(outcomes, that.outcomes) && - Objects.equals(results, that.results); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), title, summary, description, scope, domainIdentifier, priority, implications, outcomes, results); - } -} diff --git a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/LicenseProperties.java b/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/LicenseProperties.java deleted file mode 100644 index e6b3687c730..00000000000 --- a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/LicenseProperties.java +++ /dev/null @@ -1,545 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalservice.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Date; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * LicenseProperties describe the details of a license that shows that an element is licensed with a particular license type. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class LicenseProperties extends RelationshipProperties -{ - private String licenseId = null; - private Date startDate = null; - private Date endDate = null; - private String conditions = null; - private String licensedBy = null; - private String licensedByTypeName = null; - private String licensedByPropertyName = null; - private String custodian = null; - private String custodianTypeName = null; - private String custodianPropertyName = null; - private String licensee = null; - private String licenseeTypeName = null; - private String licenseePropertyName = null; - private Map entitlements = null; - private Map restrictions = null; - private Map obligations = null; - private String notes = null; - - - /** - * Default Constructor - */ - public LicenseProperties() - { - } - - - /** - * Copy/clone Constructor - the resulting object. - * - * @param template object being copied - */ - public LicenseProperties(LicenseProperties template) - { - super(template); - - if (template != null) - { - this.licenseId = template.getLicenseId(); - this.startDate = template.getStartDate(); - this.endDate = template.getEndDate(); - this.conditions = template.getConditions(); - this.licensedBy = template.getLicensedBy(); - this.licensedByTypeName = template.getLicensedByTypeName(); - this.licensedByPropertyName = template.getLicensedByPropertyName(); - this.custodian = template.getCustodian(); - this.custodianTypeName = template.getCustodianTypeName(); - this.custodianPropertyName = template.getCustodianPropertyName(); - this.licensee = template.getLicensee(); - this.licenseeTypeName = template.getLicenseeTypeName(); - this.licenseePropertyName = template.getLicenseePropertyName(); - this.entitlements = template.getEntitlements(); - this.restrictions = template.getRestrictions(); - this.obligations = template.getObligations(); - this.notes = template.getNotes(); - } - } - - - /** - * Return the unique identifier of the license. This value comes from the license authority. - * - * @return string - */ - public String getLicenseId() - { - return licenseId; - } - - - /** - * Set up the unique identifier of the license. This value comes from the license authority. - * - * @param licenseId string - */ - public void setLicenseId(String licenseId) - { - this.licenseId = licenseId; - } - - - /** - * Return the date/time that this license is valid from. - * - * @return date/time - */ - public Date getStartDate() - { - return startDate; - } - - - /** - * Set up the date/time that this license is valid from. - * - * @param startDate date/time - */ - public void setStartDate(Date startDate) - { - this.startDate = startDate; - } - - - /** - * Return the date/time that this license is no longer valid. - * - * @return date/time - */ - public Date getEndDate() - { - return endDate; - } - - - /** - * Set up the date/time that this license is no longer valid. - * - * @param endDate date/time - */ - public void setEndDate(Date endDate) - { - this.endDate = endDate; - } - - - /** - * Return any conditions or endorsements to this license. - * - * @return string text - */ - public String getConditions() - { - return conditions; - } - - - /** - * Set up any conditions or endorsements to this license. - * - * @param conditions string text - */ - public void setConditions(String conditions) - { - this.conditions = conditions; - } - - - /** - * Return the name of the person in the license authority that granted this license. - * - * @return string name/id - */ - public String getLicensedBy() - { - return licensedBy; - } - - - /** - * Set up the name of the person in the license authority that granted this license. - * - * @param licensedBy string name/id - */ - public void setLicensedBy(String licensedBy) - { - this.licensedBy = licensedBy; - } - - - /** - * Return the name of the type of the element supplying the licensedBy property. - * - * @return string type name - */ - public String getLicensedByTypeName() - { - return licensedByTypeName; - } - - - /** - * Set up the name of the type of the element supplying the licensedBy property. - * - * @param licensedByTypeName string type name - */ - public void setLicensedByTypeName(String licensedByTypeName) - { - this.licensedByTypeName = licensedByTypeName; - } - - - /** - * Return the name of the property from the element supplying the licensedBy property. - * - * @return string property name - */ - public String getLicensedByPropertyName() - { - return licensedByPropertyName; - } - - - /** - * Set up the name of the property from the element supplying the licensedBy property. - * - * @param licensedByPropertyName string property name - */ - public void setLicensedByPropertyName(String licensedByPropertyName) - { - this.licensedByPropertyName = licensedByPropertyName; - } - - - /** - * Return the person/team responsible for ensuring that the license conditions are adhered to. - * - * @return string name/id - */ - public String getCustodian() - { - return custodian; - } - - - /** - * Set up the person/team responsible for ensuring that the license conditions are adhered to. - * - * @param custodian string name/id - */ - public void setCustodian(String custodian) - { - this.custodian = custodian; - } - - - /** - * Return the name of the type of the element supplying the custodian property. - * - * @return string type name - */ - public String getCustodianTypeName() - { - return custodianTypeName; - } - - - /** - * Set up the name of the type of the element supplying the custodian property. - * - * @param custodianTypeName string type name - */ - public void setCustodianTypeName(String custodianTypeName) - { - this.custodianTypeName = custodianTypeName; - } - - - /** - * Return the name of the property from the element supplying the custodian property. - * - * @return string property name - */ - public String getCustodianPropertyName() - { - return custodianPropertyName; - } - - - /** - * Set up the name of the property from the element supplying the custodian property. - * - * @param custodianPropertyName string property name - */ - public void setCustodianPropertyName(String custodianPropertyName) - { - this.custodianPropertyName = custodianPropertyName; - } - - - /** - * Return the person/team that received the license. - * - * @return string name/id - */ - public String getLicensee() - { - return licensee; - } - - - /** - * Set up the person/team that received the license. - * - * @param licensee string name/id - */ - public void setLicensee(String licensee) - { - this.licensee = licensee; - } - - - /** - * Return the name of the type of the element supplying the licensee property. - * - * @return string type name - */ - public String getLicenseeTypeName() - { - return licenseeTypeName; - } - - - /** - * Set up the name of the type of the element supplying the licensee property. - * - * @param licenseeTypeName string type name - */ - public void setLicenseeTypeName(String licenseeTypeName) - { - this.licenseeTypeName = licenseeTypeName; - } - - - /** - * Return the name of the property from the element supplying the licensee property. - * - * @return string property name - */ - public String getLicenseePropertyName() - { - return licenseePropertyName; - } - - - /** - * Set up the name of the property from the element supplying the licensee property. - * - * @param licenseePropertyName string property name - */ - public void setLicenseePropertyName(String licenseePropertyName) - { - this.licenseePropertyName = licenseePropertyName; - } - - - /** - * Return the entitlements granted by the license. - * - * @return name value pairs - */ - public Map getEntitlements() - { - return entitlements; - } - - - /** - * Set up the entitlements granted by the license. - * - * @param entitlements name value pairs - */ - public void setEntitlements(Map entitlements) - { - this.entitlements = entitlements; - } - - - /** - * Return the restrictions imposed by the license. - * - * @return name value pairs - */ - public Map getRestrictions() - { - return restrictions; - } - - - /** - * Set up the restrictions imposed by the license. - * - * @param restrictions name value pairs - */ - public void setRestrictions(Map restrictions) - { - this.restrictions = restrictions; - } - - - /** - * Return the obligations stipulated by the license. - * - * @return name value pairs - */ - public Map getObligations() - { - return obligations; - } - - - /** - * Set up the obligations stipulated by the license. - * - * @param obligations name value pairs - */ - public void setObligations(Map obligations) - { - this.obligations = obligations; - } - - - /** - * Return any notes associated with the license. - * - * @return string text - */ - public String getNotes() - { - return notes; - } - - - /** - * Set up any notes associated with the license. - * - * @param notes string text - */ - public void setNotes(String notes) - { - this.notes = notes; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "LicenseProperties{" + - "licenseId='" + licenseId + '\'' + - ", startDate=" + startDate + - ", endDate=" + endDate + - ", conditions='" + conditions + '\'' + - ", licensedBy='" + licensedBy + '\'' + - ", licensedByTypeName='" + licensedByTypeName + '\'' + - ", licensedByPropertyName='" + licensedByPropertyName + '\'' + - ", custodian='" + custodian + '\'' + - ", custodianTypeName='" + custodianTypeName + '\'' + - ", custodianPropertyName='" + custodianPropertyName + '\'' + - ", licensee='" + licensee + '\'' + - ", licenseeTypeName='" + licenseeTypeName + '\'' + - ", licenseePropertyName='" + licenseePropertyName + '\'' + - ", entitlements=" + entitlements + - ", restrictions=" + restrictions + - ", obligations=" + obligations + - ", notes='" + notes + '\'' + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (! (objectToCompare instanceof LicenseProperties)) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - LicenseProperties that = (LicenseProperties) objectToCompare; - return Objects.equals(licenseId, that.licenseId) && - Objects.equals(startDate, that.startDate) && - Objects.equals(endDate, that.endDate) && - Objects.equals(conditions, that.conditions) && - Objects.equals(licensedBy, that.licensedBy) && - Objects.equals(licensedByTypeName, that.licensedByTypeName) && - Objects.equals(licensedByPropertyName, that.licensedByPropertyName) && - Objects.equals(custodian, that.custodian) && - Objects.equals(custodianTypeName, that.custodianTypeName) && - Objects.equals(custodianPropertyName, that.custodianPropertyName) && - Objects.equals(licensee, that.licensee) && - Objects.equals(licenseeTypeName, that.licenseeTypeName) && - Objects.equals(licenseePropertyName, that.licenseePropertyName) && - Objects.equals(entitlements, that.entitlements) && - Objects.equals(restrictions, that.restrictions) && - Objects.equals(obligations, that.obligations) && - Objects.equals(notes, that.notes); - } - - - /** - * Just use the GUID for the hash code as it should be unique. - * - * @return int code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), licenseId, startDate, endDate, conditions, licensedBy, licensedByTypeName, licensedByPropertyName, - custodian, custodianTypeName, custodianPropertyName, licensee, licenseeTypeName, licenseePropertyName, - obligations, restrictions, entitlements, notes); - } -} diff --git a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/LicenseTypeProperties.java b/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/LicenseTypeProperties.java deleted file mode 100644 index 907d0b52af8..00000000000 --- a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/LicenseTypeProperties.java +++ /dev/null @@ -1,138 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalservice.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * LicenseTypeProperties defines a license that the organization recognizes and has governance - * definitions to support it. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class LicenseTypeProperties extends GovernanceDefinitionProperties -{ - private String details = null; - - - /** - * Default Constructor - */ - public LicenseTypeProperties() - { - } - - - /** - * Copy/Clone Constructor - * - * @param template object to copy - */ - public LicenseTypeProperties(LicenseTypeProperties template) - { - super(template); - - if (template != null) - { - this.details = template.getDetails(); - } - } - - - /** - * Return the specific details of the license. - * - * @return string description - */ - public String getDetails() - { - return details; - } - - - /** - * Set up the specific details of the license. - * - * @param details string description - */ - public void setDetails(String details) - { - this.details = details; - } - - - /** - * JSON-style toString - * - * @return string containing the properties and their values - */ - @Override - public String toString() - { - return "LicenseTypeProperties{" + - "title='" + getTitle() + '\'' + - ", summary='" + getSummary() + '\'' + - ", description='" + getDescription() + '\'' + - ", scope='" + getScope() + '\'' + - ", domainIdentifier=" + getDomainIdentifier() + - ", priority='" + getPriority() + '\'' + - ", implications=" + getImplications() + - ", outcomes=" + getOutcomes() + - ", results=" + getResults() + - ", details='" + details + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - LicenseTypeProperties that = (LicenseTypeProperties) objectToCompare; - return Objects.equals(details, that.details); - } - - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), details); - } -} diff --git a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/PersonRoleProperties.java b/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/PersonRoleProperties.java deleted file mode 100644 index c9ede88e5bf..00000000000 --- a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/PersonRoleProperties.java +++ /dev/null @@ -1,164 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalservice.properties; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * PersonRoleProperties covers a role that has been defined in an organization. One of more people - * can be assigned to a role. The optional headCount determines the maximum number of people that should be - * appointed (open metadata does not enforce this level but sends a notification if the headCount - * level is breached.) It also returns how many people are currently appointed to the role. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class PersonRoleProperties extends PersonalRoleProperties -{ - private boolean headCountLimitSet = false; - private int headCount = 0; - - - /** - * Default constructor - */ - public PersonRoleProperties() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public PersonRoleProperties(PersonRoleProperties template) - { - super(template); - - if (template != null) - { - this.headCountLimitSet = template.getHeadCountLimitSet(); - this.headCount = template.getHeadCount(); - } - } - - - /** - * Return the indicator whether the head count limit is set for a person role. - * - * @return boolean flag - */ - public boolean getHeadCountLimitSet() - { - return headCountLimitSet; - } - - - /** - * Set up the indicator whether the head count limit is set for a person role. - * - * @param headCountLimitSet boolean flag - */ - public void setHeadCountLimitSet(boolean headCountLimitSet) - { - this.headCountLimitSet = headCountLimitSet; - } - - - /** - * Return the head count limit (or zero if not set). - * - * @return int - */ - public int getHeadCount() - { - return headCount; - } - - - /** - * Set up the head count limit (or zero if not set). - * - * @param headCount int - */ - public void setHeadCount(int headCount) - { - this.headCount = headCount; - } - - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "PersonRoleProperties{" + - "headCountLimitSet=" + headCountLimitSet + - ", headCount=" + headCount + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", roleId='" + getRoleId() + '\'' + - ", scope='" + getScope() + '\'' + - ", title='" + getTitle() + '\'' + - ", description='" + getDescription() + '\'' + - ", domainIdentifier=" + getDomainIdentifier() + - ", additionalProperties=" + getAdditionalProperties() + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - PersonRoleProperties that = (PersonRoleProperties) objectToCompare; - return getHeadCountLimitSet() == that.getHeadCountLimitSet() && - getHeadCount() == that.getHeadCount(); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), getHeadCountLimitSet(), getHeadCount()); - } -} diff --git a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/PersonalRoleProperties.java b/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/PersonalRoleProperties.java deleted file mode 100644 index 6fc9f382ba5..00000000000 --- a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/PersonalRoleProperties.java +++ /dev/null @@ -1,244 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.digitalservice.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * PersonalRoleProperties provides a structure for describe a role assigned to a person. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes( - { - @JsonSubTypes.Type(value = PersonRoleProperties.class, name = "PersonRoleProperties"), - }) -public class PersonalRoleProperties extends ReferenceableProperties -{ - private String roleId = null; /* identifier */ - private String scope = null; /* scope */ - private String title = null; /* name */ - private String description = null; /* description */ - - private int domainIdentifier = 0; /* Zero means not specific to a governance domain */ - - - /** - * Default constructor - */ - public PersonalRoleProperties() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public PersonalRoleProperties(PersonalRoleProperties template) - { - super (template); - - if (template != null) - { - this.roleId = template.getRoleId(); - this.scope = template.getScope(); - this.title = template.getTitle(); - this.description = template.getDescription(); - this.domainIdentifier = template.getDomainIdentifier(); - } - } - - - /** - * Return the unique identifier for this job role/appointment typically from an HR system. - * - * @return unique identifier - */ - public String getRoleId() - { - return roleId; - } - - - /** - * Set up the unique identifier for this job role/appointment. - * - * @param roleId unique identifier - */ - public void setRoleId(String roleId) - { - this.roleId = roleId; - } - - - - /** - * Return the context in which the person is appointed. This may be an organizational scope, - * location, or scope of assets. - * - * @return string description - */ - public String getScope() - { - return scope; - } - - - /** - * Set up the context in which the person is appointed. This may be an organizational scope, - * location, or scope of assets. - * - * @param scope string description - */ - public void setScope(String scope) - { - this.scope = scope; - } - - - /** - * Return the job role title. - * - * @return string name - */ - public String getTitle() - { - return title; - } - - - /** - * Set up the job role title. - * - * @param title string name - */ - public void setTitle(String title) - { - this.title = title; - } - - - /** - * Return the description of the job role. - * - * @return string description - */ - public String getDescription() - { - return description; - } - - - /** - * Set up the description of the job role. - * - * @param description string description - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * Return the identifier of the governance domain that this role belongs to. Zero means that the - * role is not specific to any domain. - * - * @return int - */ - public int getDomainIdentifier() - { - return domainIdentifier; - } - - - /** - * Set up the identifier of the governance domain that this role belongs to. Zero means that the - * role is not specific to any domain. - * - * @param domainIdentifier int - */ - public void setDomainIdentifier(int domainIdentifier) - { - this.domainIdentifier = domainIdentifier; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "PersonalRoleProperties{" + - "roleId='" + roleId + '\'' + - ", scope='" + scope + '\'' + - ", title='" + title + '\'' + - ", description='" + description + '\'' + - ", domainIdentifier=" + domainIdentifier + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (! (objectToCompare instanceof PersonalRoleProperties)) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - PersonalRoleProperties that = (PersonalRoleProperties) objectToCompare; - return domainIdentifier == that.domainIdentifier && Objects.equals(roleId, that.roleId) && - Objects.equals(scope, that.scope) && Objects.equals(title, that.title) && Objects.equals(description, that.description); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), roleId, scope, title, description, domainIdentifier); - } -} diff --git a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/ReferenceableProperties.java b/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/ReferenceableProperties.java deleted file mode 100644 index 14db7142d02..00000000000 --- a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/ReferenceableProperties.java +++ /dev/null @@ -1,293 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalservice.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; - -import java.util.Date; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * Many open metadata entities are referenceable. It means that they have a qualified name and additional - * properties. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes( - { - @JsonSubTypes.Type(value = ActorProfileProperties.class, name = "ActorProfileProperties"), - @JsonSubTypes.Type(value = AgreementProperties.class, name = "AgreementProperties"), - @JsonSubTypes.Type(value = BusinessCapabilityProperties.class, name = "BusinessCapabilityProperties"), - @JsonSubTypes.Type(value = CollectionProperties.class, name = "CollectionProperties"), - @JsonSubTypes.Type(value = DigitalServiceProperties.class, name = "DigitalServiceProperties"), - @JsonSubTypes.Type(value = GovernanceDefinitionProperties.class, name = "GovernanceDefinitionProperties"), - @JsonSubTypes.Type(value = SolutionComponentProperties.class, name = "SolutionComponentProperties"), - }) -public class ReferenceableProperties -{ - private String qualifiedName = null; - private Map additionalProperties = null; - - private Date effectiveFrom = null; - private Date effectiveTo = null; - - private String typeName = null; - private Map extendedProperties = null; - - /** - * Default constructor - */ - public ReferenceableProperties() - { - super(); - } - - - /** - * Copy/clone constructor. Retrieves values from the supplied template - * - * @param template element to copy - */ - public ReferenceableProperties(ReferenceableProperties template) - { - if (template != null) - { - qualifiedName = template.getQualifiedName(); - additionalProperties = template.getAdditionalProperties(); - - effectiveFrom = template.getEffectiveFrom(); - effectiveTo = template.getEffectiveTo(); - - typeName = template.getTypeName(); - extendedProperties = template.getExtendedProperties(); - } - } - - - /** - * Set up the fully qualified name. - * - * @param qualifiedName String name - */ - public void setQualifiedName(String qualifiedName) - { - this.qualifiedName = qualifiedName; - } - - - /** - * Returns the stored qualified name property for the metadata entity. - * If no qualified name is available then the empty string is returned. - * - * @return qualifiedName - */ - public String getQualifiedName() - { - return qualifiedName; - } - - - /** - * Set up additional properties. - * - * @param additionalProperties Additional properties object - */ - public void setAdditionalProperties(Map additionalProperties) - { - this.additionalProperties = additionalProperties; - } - - - /** - * Return a copy of the additional properties. Null means no additional properties are available. - * - * @return AdditionalProperties - */ - public Map getAdditionalProperties() - { - if (additionalProperties == null) - { - return null; - } - else if (additionalProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(additionalProperties); - } - } - - - /** - * Return the date/time that this element is effective from (null means effective from the epoch). - * - * @return date object - */ - public Date getEffectiveFrom() - { - return effectiveFrom; - } - - - /** - * Set up the date/time that this element is effective from (null means effective from the epoch). - * - * @param effectiveFrom date object - */ - public void setEffectiveFrom(Date effectiveFrom) - { - this.effectiveFrom = effectiveFrom; - } - - - /** - * Return the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @return date object - */ - public Date getEffectiveTo() - { - return effectiveTo; - } - - - /** - * Set the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @param effectiveTo date object - */ - public void setEffectiveTo(Date effectiveTo) - { - this.effectiveTo = effectiveTo; - } - - - /** - * Return the name of the open metadata type for this metadata element. - * - * @return string name - */ - public String getTypeName() - { - return typeName; - } - - - /** - * Set up the name of the open metadata type for this element. - * - * @param typeName string name - */ - public void setTypeName(String typeName) - { - this.typeName = typeName; - } - - - /** - * Return the properties that have been defined for a subtype of this object that are not supported explicitly - * by this bean. - * - * @return property map - */ - public Map getExtendedProperties() - { - if (extendedProperties == null) - { - return null; - } - else if (extendedProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(extendedProperties); - } - } - - - /** - * Set up the properties that have been defined for a subtype of this object that are not supported explicitly - * by this bean. - * - * @param extendedProperties property map - */ - public void setExtendedProperties(Map extendedProperties) - { - this.extendedProperties = extendedProperties; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "ReferenceableProperties{" + - "qualifiedName='" + qualifiedName + '\'' + - ", additionalProperties=" + additionalProperties + - ", effectiveFrom=" + effectiveFrom + - ", effectiveTo=" + effectiveTo + - ", typeName='" + typeName + '\'' + - ", extendedProperties=" + extendedProperties + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ReferenceableProperties that = (ReferenceableProperties) objectToCompare; - return Objects.equals(qualifiedName, that.qualifiedName) && - Objects.equals(additionalProperties, that.additionalProperties) && - Objects.equals(effectiveFrom, that.effectiveFrom) && - Objects.equals(effectiveTo, that.effectiveTo) && - Objects.equals(typeName, that.typeName) && - Objects.equals(extendedProperties, that.extendedProperties); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(qualifiedName, additionalProperties, effectiveFrom, effectiveTo, typeName, extendedProperties); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/RelationshipProperties.java b/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/RelationshipProperties.java deleted file mode 100644 index 37487fd89cd..00000000000 --- a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/RelationshipProperties.java +++ /dev/null @@ -1,197 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalservice.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; - -import java.util.Date; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * RelationshipProperties provides the base class for relationships items. This provides extended properties with the ability to - * set effectivity dates. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes( - { - @JsonSubTypes.Type(value = AgreementRoleProperties.class, name = "AgreementRoleProperties"), - @JsonSubTypes.Type(value = DigitalSupportProperties.class, name = "DigitalSupportProperties"), - @JsonSubTypes.Type(value = DigitalServiceDependencyProperties.class, name = "DigitalServiceDependencyProperties"), - @JsonSubTypes.Type(value = OrganizationalCapabilityProperties.class, name = "OrganizationalCapabilityProperties"), - }) -public class RelationshipProperties -{ - private Date effectiveFrom = null; - private Date effectiveTo = null; - - private Map extendedProperties = null; - - - /** - * Default constructor - */ - public RelationshipProperties() - { - super(); - } - - - /** - * Copy/clone constructor. Retrieve values from the supplied template - * - * @param template element to copy - */ - public RelationshipProperties(RelationshipProperties template) - { - if (template != null) - { - effectiveFrom = template.getEffectiveFrom(); - effectiveTo = template.getEffectiveTo(); - extendedProperties = template.getExtendedProperties(); - } - } - - - /** - * Return the date/time that this element is effective from (null means effective from the epoch). - * - * @return date object - */ - public Date getEffectiveFrom() - { - return effectiveFrom; - } - - - /** - * Set up the date/time that this element is effective from (null means effective from the epoch). - * - * @param effectiveFrom date object - */ - public void setEffectiveFrom(Date effectiveFrom) - { - this.effectiveFrom = effectiveFrom; - } - - - /** - * Return the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @return date object - */ - public Date getEffectiveTo() - { - return effectiveTo; - } - - - /** - * Set the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @param effectiveTo date object - */ - public void setEffectiveTo(Date effectiveTo) - { - this.effectiveTo = effectiveTo; - } - - - /** - * Return the properties that have been defined for a subtype of this object that are not supported explicitly - * by this bean. - * - * @return property map - */ - public Map getExtendedProperties() - { - if (extendedProperties == null) - { - return null; - } - else if (extendedProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(extendedProperties); - } - } - - - /** - * Set up the properties that have been defined for a subtype of this object that are not supported explicitly - * by this bean. - * - * @param extendedProperties property map - */ - public void setExtendedProperties(Map extendedProperties) - { - this.extendedProperties = extendedProperties; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "RelationshipProperties{" + - "effectiveFrom=" + effectiveFrom + - ", effectiveTo=" + effectiveTo + - ", extendedProperties=" + extendedProperties + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - RelationshipProperties that = (RelationshipProperties) objectToCompare; - return Objects.equals(effectiveFrom, that.effectiveFrom) && - Objects.equals(effectiveTo, that.effectiveTo); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(effectiveFrom, effectiveTo); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/ResourceListProperties.java b/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/ResourceListProperties.java deleted file mode 100644 index 656a8c04343..00000000000 --- a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/ResourceListProperties.java +++ /dev/null @@ -1,202 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalservice.properties; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ResourceListProperties provides a details of why an element providing resources (such as a community) has been attached to an initiative - * such as a governance domain. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ResourceListProperties extends RelationshipProperties -{ - String resourceUse = null; - String resourceUseDescription = null; - Map resourceUseProperties = null; - boolean watchResource = false; - - /** - * Default constructor - */ - public ResourceListProperties() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ResourceListProperties(ResourceListProperties template) - { - super(template); - - if (template != null) - { - this.resourceUse = template.getResourceUse(); - this.resourceUseDescription = template.getResourceUseDescription(); - this.resourceUseProperties = template.getResourceUseProperties(); - this.watchResource = template.getWatchResource(); - } - } - - - /** - * Return the identifier that describes the type of resource use. (Use ResourceUse enum in GAF). - * - * @return string - */ - public String getResourceUse() - { - return resourceUse; - } - - - /** - * Set up identifier that describes the type of resource use. (Use ResourceUse enum in GAF). - * - * @param resourceUse string - */ - public void setResourceUse(String resourceUse) - { - this.resourceUse = resourceUse; - } - - - /** - * Return the description of how the resource is used, or why it is useful. - * - * @return string - */ - public String getResourceUseDescription() - { - return resourceUseDescription; - } - - - /** - * Set up the description of how the resource is used, or why it is useful. - * - * @param resourceUseDescription string - */ - public void setResourceUseDescription(String resourceUseDescription) - { - this.resourceUseDescription = resourceUseDescription; - } - - - /** - * Return any additional properties that explains how to use the resource. - * - * @return map - */ - public Map getResourceUseProperties() - { - return resourceUseProperties; - } - - - /** - * Set up any additional properties that explains how to use the resource. - * - * @param resourceUseProperties map - */ - public void setResourceUseProperties(Map resourceUseProperties) - { - this.resourceUseProperties = resourceUseProperties; - } - - - /** - * Return whether changes to the resource result in notifications to the initiative. - * - * @return flag - */ - public boolean getWatchResource() - { - return watchResource; - } - - - /** - * Set up whether changes to the resource result in notifications to the initiative. - * - * @param watchResource flag - */ - public void setWatchResource(boolean watchResource) - { - this.watchResource = watchResource; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ResourceListProperties{" + - "resourceUse='" + resourceUse + '\'' + - "resourceUseDescription='" + resourceUseDescription + '\'' + - "resourceUseProperties='" + resourceUseProperties + '\'' + - ", watchResource=" + watchResource + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - ResourceListProperties that = (ResourceListProperties) objectToCompare; - return watchResource == that.watchResource && - Objects.equals(resourceUse, that.resourceUse) && - Objects.equals(resourceUseDescription, that.resourceUseDescription) && - Objects.equals(resourceUseProperties, that.resourceUseProperties); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), resourceUse, resourceUseDescription, resourceUseProperties, watchResource); - } -} diff --git a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/TeamProfileProperties.java b/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/TeamProfileProperties.java deleted file mode 100644 index bd7b3c3b9ee..00000000000 --- a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/TeamProfileProperties.java +++ /dev/null @@ -1,155 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalservice.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * The TeamProfileProperties describes an team of people. Information about the - * team is stored as a Team entity in the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class TeamProfileProperties extends ActorProfileProperties -{ - private String teamType = null; - private String identifier = null; - - - /** - * Default Constructor - */ - public TeamProfileProperties() - { - super(); - } - - - /** - * Copy/clone Constructor - the resulting object. - * - * @param template object being copied - */ - public TeamProfileProperties(TeamProfileProperties template) - { - super (template); - - if (template != null) - { - this.teamType = template.getTeamType(); - } - } - - - /** - * Return the type of team. - * - * @return string name - */ - public String getTeamType() - { - return teamType; - } - - - /** - * Set up the type of team. - * - * @param teamType string name - */ - public void setTeamType(String teamType) - { - this.teamType = teamType; - } - - - /** - * Return the code that uniquely identifies the team. - * - * @return string code - */ - public String getIdentifier() - { - return identifier; - } - - - /** - * Set up the code that uniquely identifies the team. - * - * @param identifier string code - */ - public void setIdentifier(String identifier) - { - this.identifier = identifier; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "TeamProfileProperties{" + - "teamType='" + teamType + '\'' + - ", knownName='" + getKnownName() + '\'' + - ", description='" + getDescription() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - TeamProfileProperties that = (TeamProfileProperties) objectToCompare; - return Objects.equals(teamType, that.teamType); - } - - - /** - * Just use the GUID for the hash code as it should be unique. - * - * @return int code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), teamType); - } -} diff --git a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/UserIdentityProperties.java b/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/UserIdentityProperties.java deleted file mode 100644 index 1bf17188569..00000000000 --- a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/UserIdentityProperties.java +++ /dev/null @@ -1,152 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalservice.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * UserIdentityProperties describes an element that is linked to a single userId. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class UserIdentityProperties extends ReferenceableProperties -{ - private String userId = null; - private String distinguishedName = null; - - - /** - * Default constructor - */ - public UserIdentityProperties() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public UserIdentityProperties(UserIdentityProperties template) - { - super(template); - - if (template != null) - { - this.userId = template.getUserId(); - this.distinguishedName = template.getDistinguishedName(); - } - } - - - /** - * Return the identifier of the user's account - * - * @return string - */ - public String getUserId() - { - return userId; - } - - - /** - * Return the identifier of the user's account. - * - * @param userId string - */ - public void setUserId(String userId) - { - this.userId = userId; - } - - - /** - * Return the unique name in LDAP. - * - * @return string name - */ - public String getDistinguishedName() - { - return distinguishedName; - } - - - /** - * Set up the unique name in LDAP. - * - * @param distinguishedName string name - */ - public void setDistinguishedName(String distinguishedName) - { - this.distinguishedName = distinguishedName; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "UserIdentityProperties{" + - "qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - ", userId='" + userId + '\'' + - ", distinguishedName='" + distinguishedName + '\'' + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - UserIdentityProperties that = (UserIdentityProperties) objectToCompare; - return Objects.equals(userId, that.userId) && - Objects.equals(distinguishedName, that.distinguishedName); - } - - - /** - * Just use the GUID for the hash code as it should be unique. - * - * @return int code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), userId, distinguishedName); - } -} diff --git a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/rest/ClassificationRequestBody.java b/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/rest/ClassificationRequestBody.java deleted file mode 100644 index f66e4707d3b..00000000000 --- a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/rest/ClassificationRequestBody.java +++ /dev/null @@ -1,127 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalservice.rest; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.digitalservice.properties.ClassificationProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * ClassificationRequestBody describes the request body used when attaching classification to elements. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ClassificationRequestBody extends ExternalSourceRequestBody -{ - private ClassificationProperties properties = null; - - - /** - * Default constructor - */ - public ClassificationRequestBody() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public ClassificationRequestBody(ClassificationRequestBody template) - { - super(template); - - if (template != null) - { - properties = template.getProperties(); - } - } - - - /** - * Return the properties for the classification. - * - * @return properties object - */ - public ClassificationProperties getProperties() - { - return properties; - } - - - /** - * Set up the properties for the classification. - * - * @param properties properties object - */ - public void setProperties(ClassificationProperties properties) - { - this.properties = properties; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ClassificationRequestBody{" + - "externalSourceGUID='" + getExternalSourceGUID() + '\'' + - ", externalSourceName='" + getExternalSourceName() + '\'' + - ", properties=" + properties + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ClassificationRequestBody that = (ClassificationRequestBody) objectToCompare; - return Objects.equals(getProperties(), that.getProperties()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), properties); - } -} diff --git a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/rest/DigitalServiceListResponse.java b/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/rest/DigitalServiceListResponse.java deleted file mode 100644 index 8f787c9df12..00000000000 --- a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/rest/DigitalServiceListResponse.java +++ /dev/null @@ -1,146 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.digitalservice.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.digitalservice.metadataelements.DigitalServiceElement; - -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * DigitalServiceListResponse is a response object for passing back a list of digital service elements. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class DigitalServiceListResponse extends DigitalServiceOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public DigitalServiceListResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public DigitalServiceListResponse(DigitalServiceListResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return elementList; - } - } - - - /** - * Set up the list of metadata elements to return. - * - * @param elements result object - */ - public void setElementList(List elements) - { - this.elementList = elements; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "DigitalServiceListResponse{" + - "element=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - DigitalServiceListResponse that = (DigitalServiceListResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/rest/DigitalServiceOMASAPIRequestBody.java b/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/rest/DigitalServiceOMASAPIRequestBody.java deleted file mode 100644 index 854011d0b54..00000000000 --- a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/rest/DigitalServiceOMASAPIRequestBody.java +++ /dev/null @@ -1,53 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.digitalservice.rest; - -import com.fasterxml.jackson.annotation.*; -import org.odpi.openmetadata.accessservices.digitalservice.properties.DigitalServiceProperties; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * DigitalServiceOMASAPIRequestBody provides a common header for DigitalServiceProperties OMAS request bodies for its REST API. - * - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonSubTypes( - { - @JsonSubTypes.Type(value = DigitalServiceProperties.class, name = "DigitalServiceProperties") - }) -public abstract class DigitalServiceOMASAPIRequestBody -{ - /** - * Default constructor - */ - public DigitalServiceOMASAPIRequestBody() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public DigitalServiceOMASAPIRequestBody(DigitalServiceOMASAPIRequestBody template) - { - } - - - /** - * {@inheritDoc} - * - * JSON-like toString - */ - @Override - public String toString() - { - return "DigitalServiceOMASAPIRequestBody{}"; - } -} diff --git a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/rest/DigitalServiceOMASAPIResponse.java b/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/rest/DigitalServiceOMASAPIResponse.java deleted file mode 100644 index 41b98b7967a..00000000000 --- a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/rest/DigitalServiceOMASAPIResponse.java +++ /dev/null @@ -1,63 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.digitalservice.rest; - -import com.fasterxml.jackson.annotation.*; -import org.odpi.openmetadata.commonservices.ffdc.rest.FFDCResponseBase; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * DigitalServiceOMASAPIResponse provides a common header for DigitalServiceProperties OMAS managed rest to its REST API. - * It manages information about exceptions. If no exception has been raised exceptionClassName is null. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes - ({ - }) -public abstract class DigitalServiceOMASAPIResponse extends FFDCResponseBase -{ - /** - * Default constructor - */ - public DigitalServiceOMASAPIResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public DigitalServiceOMASAPIResponse(DigitalServiceOMASAPIResponse template) - { - super(template); - } - - - /** - * {@inheritDoc} - * - * JSON-like toString - */ - @Override - public String toString() - { - return "DevOpsOMASAPIResponse{" + - "relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } -} diff --git a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/rest/DigitalServiceResponse.java b/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/rest/DigitalServiceResponse.java deleted file mode 100644 index d220d036453..00000000000 --- a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/rest/DigitalServiceResponse.java +++ /dev/null @@ -1,134 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.digitalservice.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.digitalservice.metadataelements.DigitalServiceElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ValidValueResponse is a response object for passing back a single digital service object. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class DigitalServiceResponse extends DigitalServiceOMASAPIResponse -{ - private DigitalServiceElement element = null; - - - /** - * Default constructor - */ - public DigitalServiceResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public DigitalServiceResponse(DigitalServiceResponse template) - { - super(template); - - if (template != null) - { - element = template.getElement(); - } - } - - - /** - * Return the metadata element. - * - * @return result object - */ - public DigitalServiceElement getElement() - { - return element; - } - - - /** - * Set up the metadata element to return. - * - * @param element result object - */ - public void setElement(DigitalServiceElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "DigitalServiceResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - DigitalServiceResponse that = (DigitalServiceResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/rest/ExternalSourceRequestBody.java b/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/rest/ExternalSourceRequestBody.java deleted file mode 100644 index cc7494798ac..00000000000 --- a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/rest/ExternalSourceRequestBody.java +++ /dev/null @@ -1,143 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalservice.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ExternalSourceRequestBody carries the parameters for marking an asset or schema as external. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ExternalSourceRequestBody extends DigitalServiceOMASAPIRequestBody -{ - private String externalSourceGUID = null; - private String externalSourceName = null; - - - /** - * Default constructor - */ - public ExternalSourceRequestBody() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ExternalSourceRequestBody(ExternalSourceRequestBody template) - { - super(template); - - if (template != null) - { - externalSourceGUID = template.getExternalSourceGUID(); - externalSourceName = template.getExternalSourceName(); - } - } - - - /** - * Return the unique identifier of the software server capability entity that represented the external source - null for local. - * - * @return string guid - */ - public String getExternalSourceGUID() - { - return externalSourceGUID; - } - - - /** - * Set up the unique identifier of the software server capability entity that represented the external source - null for local. - * - * @param externalSourceGUID string guid - */ - public void setExternalSourceGUID(String externalSourceGUID) - { - this.externalSourceGUID = externalSourceGUID; - } - - - /** - * Return the unique name of the software server capability entity that represented the external source. - * - * @return string name - */ - public String getExternalSourceName() - { - return externalSourceName; - } - - - /** - * Set up the unique name of the software server capability entity that represented the external source. - * - * @param externalSourceName string name - */ - public void setExternalSourceName(String externalSourceName) - { - this.externalSourceName = externalSourceName; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ExternalSourceRequestBody{" + - "externalSourceGUID='" + externalSourceGUID + '\'' + - ", externalSourceName='" + externalSourceName + '\'' + - '}'; - } - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ExternalSourceRequestBody that = (ExternalSourceRequestBody) objectToCompare; - return Objects.equals(externalSourceGUID, that.externalSourceGUID) && - Objects.equals(externalSourceName, that.externalSourceName); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), externalSourceGUID, externalSourceName); - } -} diff --git a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/rest/ReferenceableRequestBody.java b/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/rest/ReferenceableRequestBody.java deleted file mode 100644 index b54c0a45d01..00000000000 --- a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/rest/ReferenceableRequestBody.java +++ /dev/null @@ -1,152 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalservice.rest; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.digitalservice.properties.ReferenceableProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * ReferenceableRequestBody describes the request body used when working with referenceables. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ReferenceableRequestBody extends ExternalSourceRequestBody -{ - private String parentGUID = null; - private ReferenceableProperties properties = null; - - - /** - * Default constructor - */ - public ReferenceableRequestBody() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public ReferenceableRequestBody(ReferenceableRequestBody template) - { - super(template); - - if (template != null) - { - parentGUID = template.getParentGUID(); - properties = template.getProperties(); - } - } - - - /** - * Return the properties for the relationship. - * - * @return properties object - */ - public ReferenceableProperties getProperties() - { - return properties; - } - - - /** - * Set up the properties for the relationship. - * - * @param properties properties object - */ - public void setProperties(ReferenceableProperties properties) - { - this.properties = properties; - } - - - /** - * Return an optional anchor GUID to attach the new element to. - * - * @return guid - */ - public String getParentGUID() - { - return parentGUID; - } - - - /** - * Set up an optional anchor GUID to attach the new element to. - * - * @param parentGUID guid - */ - public void setParentGUID(String parentGUID) - { - this.parentGUID = parentGUID; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ReferenceableRequestBody{" + - "externalSourceGUID='" + getExternalSourceGUID() + '\'' + - ", externalSourceName='" + getExternalSourceName() + '\'' + - ", anchorGUID='" + parentGUID + '\'' + - ", properties=" + properties + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (! (objectToCompare instanceof ReferenceableRequestBody)) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - ReferenceableRequestBody that = (ReferenceableRequestBody) objectToCompare; - return Objects.equals(parentGUID, that.parentGUID) && Objects.equals(properties, that.properties); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), parentGUID, properties); - } -} diff --git a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/rest/RelatedElementListResponse.java b/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/rest/RelatedElementListResponse.java deleted file mode 100644 index 6138f5bfe45..00000000000 --- a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/rest/RelatedElementListResponse.java +++ /dev/null @@ -1,146 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.digitalservice.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.digitalservice.metadataelements.RelatedElement; - -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * RelatedElementListResponse is a response object for passing back a list of relatedElement objects. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class RelatedElementListResponse extends DigitalServiceOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public RelatedElementListResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public RelatedElementListResponse(RelatedElementListResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return elementList; - } - } - - - /** - * Set up the list of metadata elements to return. - * - * @param elements result object - */ - public void setElementList(List elements) - { - this.elementList = elements; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "RelatedElementListResponse{" + - "element=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - RelatedElementListResponse that = (RelatedElementListResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/rest/RelationshipRequestBody.java b/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/rest/RelationshipRequestBody.java deleted file mode 100644 index b33a20bc530..00000000000 --- a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/rest/RelationshipRequestBody.java +++ /dev/null @@ -1,127 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalservice.rest; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.digitalservice.properties.RelationshipProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * RelationshipRequestBody describes the request body used when linking elements together. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class RelationshipRequestBody extends ExternalSourceRequestBody -{ - private RelationshipProperties properties = null; - - - /** - * Default constructor - */ - public RelationshipRequestBody() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public RelationshipRequestBody(RelationshipRequestBody template) - { - super(template); - - if (template != null) - { - properties = template.getProperties(); - } - } - - - /** - * Return the properties for the relationship. - * - * @return properties object - */ - public RelationshipProperties getProperties() - { - return properties; - } - - - /** - * Set up the properties for the relationship. - * - * @param properties properties object - */ - public void setProperties(RelationshipProperties properties) - { - this.properties = properties; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "RelationshipRequestBody{" + - "externalSourceGUID='" + getExternalSourceGUID() + '\'' + - ", externalSourceName='" + getExternalSourceName() + '\'' + - ", properties=" + properties + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - RelationshipRequestBody that = (RelationshipRequestBody) objectToCompare; - return Objects.equals(getProperties(), that.getProperties()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), properties); - } -} diff --git a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/rest/package-info.java b/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/rest/package-info.java deleted file mode 100644 index bba04829c36..00000000000 --- a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/rest/package-info.java +++ /dev/null @@ -1,12 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -/** - * This package defines the beans used to build the REST request and response payloads. - * - * REST APIs can pass parameters in their URLs (called path variables) as well has having a RequestBody bean - * for additional, more complex, or optional parameters. Responses are returned in response beans. - * - * The response beans encode the return type of the method as well as any exceptions and associated messages. - */ -package org.odpi.openmetadata.accessservices.digitalservice.rest; diff --git a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/test/java/org/odpi/openmetadata/accessservices/digitalservice/properties/DigitalServicePropertiesTest.java b/open-metadata-implementation/access-services/digital-service/digital-service-api/src/test/java/org/odpi/openmetadata/accessservices/digitalservice/properties/DigitalServicePropertiesTest.java index 7375a6a8add..c16de003453 100644 --- a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/test/java/org/odpi/openmetadata/accessservices/digitalservice/properties/DigitalServicePropertiesTest.java +++ b/open-metadata-implementation/access-services/digital-service/digital-service-api/src/test/java/org/odpi/openmetadata/accessservices/digitalservice/properties/DigitalServicePropertiesTest.java @@ -3,6 +3,7 @@ package org.odpi.openmetadata.accessservices.digitalservice.properties; import com.fasterxml.jackson.databind.ObjectMapper; +import org.odpi.openmetadata.frameworks.openmetadata.properties.digitalbusiness.DigitalServiceProperties; import org.testng.annotations.Test; import static org.testng.Assert.assertFalse; diff --git a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/test/java/org/odpi/openmetadata/accessservices/digitalservice/rest/MockAPIResponse.java b/open-metadata-implementation/access-services/digital-service/digital-service-api/src/test/java/org/odpi/openmetadata/accessservices/digitalservice/rest/MockAPIResponse.java deleted file mode 100644 index 3cf659c061e..00000000000 --- a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/test/java/org/odpi/openmetadata/accessservices/digitalservice/rest/MockAPIResponse.java +++ /dev/null @@ -1,27 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalservice.rest; - -/** - * MockAPIResponse enables the overridden methods of DevOpsOMASAPIResponse to be tested. - */ -public class MockAPIResponse extends DigitalServiceOMASAPIResponse -{ - /** - * Default constructor - */ - public MockAPIResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to clone - */ - public MockAPIResponse(MockAPIResponse template) - { - super(template); - } -} diff --git a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/test/java/org/odpi/openmetadata/accessservices/digitalservice/rest/OMASAPIResponseTest.java b/open-metadata-implementation/access-services/digital-service/digital-service-api/src/test/java/org/odpi/openmetadata/accessservices/digitalservice/rest/OMASAPIResponseTest.java deleted file mode 100644 index 8b0e798b75d..00000000000 --- a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/test/java/org/odpi/openmetadata/accessservices/digitalservice/rest/OMASAPIResponseTest.java +++ /dev/null @@ -1,21 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalservice.rest; - -import org.testng.annotations.Test; - -import static org.testng.Assert.assertTrue; - -/** - * Test the overridden methods of DevOpsOMASAPIResponse - */ -public class OMASAPIResponseTest -{ - @Test public void TestToString() - { - MockAPIResponse testObject = new MockAPIResponse(); - - assertTrue(testObject.toString().contains("DevOpsOMASAPIResponse")); - assertTrue(new MockAPIResponse(testObject).toString().contains("DevOpsOMASAPIResponse")); - } -} diff --git a/open-metadata-implementation/access-services/digital-service/digital-service-client/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/client/CollectionsClient.java b/open-metadata-implementation/access-services/digital-service/digital-service-client/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/client/CollectionsClient.java index 4003cf423f4..157f0d82e6c 100644 --- a/open-metadata-implementation/access-services/digital-service/digital-service-client/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/client/CollectionsClient.java +++ b/open-metadata-implementation/access-services/digital-service/digital-service-client/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/client/CollectionsClient.java @@ -3,18 +3,22 @@ package org.odpi.openmetadata.accessservices.digitalservice.client; import org.odpi.openmetadata.accessservices.digitalservice.api.CollectionsInterface; -import org.odpi.openmetadata.accessservices.digitalservice.client.converters.CollectionConverter; -import org.odpi.openmetadata.accessservices.digitalservice.client.converters.CollectionMemberConverter; -import org.odpi.openmetadata.accessservices.digitalservice.metadataelements.CollectionElement; -import org.odpi.openmetadata.accessservices.digitalservice.metadataelements.CollectionMember; -import org.odpi.openmetadata.accessservices.digitalservice.properties.*; import org.odpi.openmetadata.adminservices.configuration.registration.AccessServiceDescription; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStatus; +import org.odpi.openmetadata.frameworks.governanceaction.converters.CollectionConverter; +import org.odpi.openmetadata.frameworks.governanceaction.converters.CollectionMemberConverter; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ElementStatus; import org.odpi.openmetadata.frameworks.openmetadata.enums.CollectionMemberStatus; import org.odpi.openmetadata.frameworks.openmetadata.enums.OrderBy; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.CollectionElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.CollectionMember; +import org.odpi.openmetadata.frameworks.openmetadata.properties.collections.CollectionFolderProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.collections.CollectionMembershipProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.collections.CollectionProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.digitalbusiness.DigitalProductProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.resources.ResourceListProperties; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.frameworks.governanceaction.properties.OpenMetadataElement; @@ -38,7 +42,7 @@ */ public class CollectionsClient extends DigitalServiceBaseClient implements CollectionsInterface { - final private CollectionConverter collectionConverter; + final private CollectionConverter collectionConverter; final private Class collectionBeanClass = CollectionElement.class; final private CollectionMemberConverter collectionMemberConverter; @@ -504,15 +508,20 @@ public String createCollection(String userId, { initialClassifications = new HashMap<>(); - ElementProperties classificationProperties = propertyHelper.addStringProperty(null, - OpenMetadataProperty.ORDER_BY_PROPERTY_NAME.name, - properties.getOrderByPropertyName()); - if (properties.getCollectionOrder() != null) + ElementProperties classificationProperties = null; + + if (properties instanceof CollectionFolderProperties collectionFolderProperties) { - classificationProperties = propertyHelper.addEnumProperty(classificationProperties, - OpenMetadataProperty.COLLECTION_ORDER.name, - OrderBy.getOpenTypeName(), - properties.getCollectionOrder().getName()); + classificationProperties = propertyHelper.addStringProperty(null, + OpenMetadataProperty.ORDER_BY_PROPERTY_NAME.name, + collectionFolderProperties.getOrderByPropertyName()); + if (collectionFolderProperties.getCollectionOrder() != null) + { + classificationProperties = propertyHelper.addEnumProperty(classificationProperties, + OpenMetadataProperty.COLLECTION_ORDER.name, + OrderBy.getOpenTypeName(), + collectionFolderProperties.getCollectionOrder().getName()); + } } initialClassifications.put(OpenMetadataType.FOLDER.typeName, classificationProperties); diff --git a/open-metadata-implementation/access-services/digital-service/digital-service-client/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/client/converters/CollectionConverter.java b/open-metadata-implementation/access-services/digital-service/digital-service-client/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/client/converters/CollectionConverter.java deleted file mode 100644 index f260a07e7ce..00000000000 --- a/open-metadata-implementation/access-services/digital-service/digital-service-client/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/client/converters/CollectionConverter.java +++ /dev/null @@ -1,209 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalservice.client.converters; - -import org.odpi.openmetadata.accessservices.digitalservice.metadataelements.CollectionElement; -import org.odpi.openmetadata.accessservices.digitalservice.properties.CollectionProperties; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.governanceaction.properties.OpenMetadataElement; -import org.odpi.openmetadata.frameworks.governanceaction.properties.OpenMetadataRelationship; -import org.odpi.openmetadata.frameworks.governanceaction.properties.RelatedMetadataElement; -import org.odpi.openmetadata.frameworks.governanceaction.search.ElementProperties; -import org.odpi.openmetadata.frameworks.governanceaction.search.PropertyHelper; - -import java.lang.reflect.InvocationTargetException; - - -/** - * CollectionConverter generates a CollectionElement from a Collection entity - */ -public class CollectionConverter extends DigitalServiceConverterBase -{ - /** - * Constructor - * - * @param propertyHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public CollectionConverter(PropertyHelper propertyHelper, - String serviceName, - String serverName) - { - super(propertyHelper, serviceName, serverName); - } - - - /** - * Using the supplied openMetadataElement, return a new instance of the bean. This is used for most beans that have - * a one to one correspondence with the repository instances. - * - * @param beanClass name of the class to create - * @param openMetadataElement openMetadataElement containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - OpenMetadataElement openMetadataElement, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof CollectionElement bean) - { - CollectionProperties collectionProperties = new CollectionProperties(); - - bean.setElementHeader(super.getMetadataElementHeader(beanClass, openMetadataElement, methodName)); - - ElementProperties elementProperties; - - /* - * The initial set of values come from the openMetadataElement. - */ - if (openMetadataElement != null) - { - elementProperties = new ElementProperties(openMetadataElement.getElementProperties()); - - collectionProperties.setQualifiedName(this.removeQualifiedName(elementProperties)); - collectionProperties.setAdditionalProperties(this.removeAdditionalProperties(elementProperties)); - collectionProperties.setName(this.removeName(elementProperties)); - collectionProperties.setDescription(this.removeDescription(elementProperties)); - collectionProperties.setCollectionType(this.removeCollectionType(elementProperties)); - collectionProperties.setEffectiveFrom(openMetadataElement.getEffectiveFromTime()); - collectionProperties.setEffectiveTo(openMetadataElement.getEffectiveToTime()); - - /* - * Any remaining properties are returned in the extended properties. They are - * assumed to be defined in a subtype. - */ - collectionProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); - collectionProperties.setExtendedProperties(this.getRemainingExtendedProperties(elementProperties)); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), OpenMetadataElement.class.getName(), methodName); - } - - bean.setProperties(collectionProperties); - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - - /** - * Using the supplied openMetadataElement, return a new instance of the bean. This is used for most beans that have - * a one to one correspondence with the repository instances. - * - * @param beanClass name of the class to create - * @param relatedMetadataElement the properties of an open metadata element plus details of the relationship used to navigate to it - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - RelatedMetadataElement relatedMetadataElement, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof CollectionElement bean) - { - CollectionProperties collectionProperties = new CollectionProperties(); - OpenMetadataElement openMetadataElement = relatedMetadataElement.getElement(); - - bean.setElementHeader(super.getMetadataElementHeader(beanClass, openMetadataElement, methodName)); - - ElementProperties elementProperties; - - /* - * The initial set of values come from the openMetadataElement. - */ - if (openMetadataElement != null) - { - elementProperties = new ElementProperties(openMetadataElement.getElementProperties()); - - collectionProperties.setQualifiedName(this.removeQualifiedName(elementProperties)); - collectionProperties.setAdditionalProperties(this.removeAdditionalProperties(elementProperties)); - collectionProperties.setName(this.removeName(elementProperties)); - collectionProperties.setDescription(this.removeDescription(elementProperties)); - collectionProperties.setCollectionType(this.removeCollectionType(elementProperties)); - collectionProperties.setEffectiveFrom(openMetadataElement.getEffectiveFromTime()); - collectionProperties.setEffectiveTo(openMetadataElement.getEffectiveToTime()); - - /* - * Any remaining properties are returned in the extended properties. They are - * assumed to be defined in a subtype. - */ - collectionProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); - collectionProperties.setExtendedProperties(this.getRemainingExtendedProperties(elementProperties)); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), OpenMetadataElement.class.getName(), methodName); - } - - bean.setProperties(collectionProperties); - - bean.setRelatedElement(super.getRelatedElement(beanClass, relatedMetadataElement, methodName)); - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an element and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param element element containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @SuppressWarnings(value = "unused") - public B getNewBean(Class beanClass, - OpenMetadataElement element, - OpenMetadataRelationship relationship, - String methodName) throws PropertyServerException - { - B returnBean = this.getNewBean(beanClass, element, methodName); - - if (returnBean instanceof CollectionElement bean) - { - bean.setRelatedElement(super.getRelatedElement(beanClass, element, relationship, methodName)); - } - - return returnBean; - } -} diff --git a/open-metadata-implementation/access-services/digital-service/digital-service-client/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/client/converters/CollectionMemberConverter.java b/open-metadata-implementation/access-services/digital-service/digital-service-client/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/client/converters/CollectionMemberConverter.java deleted file mode 100644 index 565ffe6f492..00000000000 --- a/open-metadata-implementation/access-services/digital-service/digital-service-client/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/client/converters/CollectionMemberConverter.java +++ /dev/null @@ -1,138 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalservice.client.converters; - -import org.odpi.openmetadata.accessservices.digitalservice.metadataelements.CollectionMember; -import org.odpi.openmetadata.frameworks.openmetadata.enums.CollectionMemberStatus; -import org.odpi.openmetadata.accessservices.digitalservice.properties.CollectionMembershipProperties; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; -import org.odpi.openmetadata.frameworks.governanceaction.properties.RelatedMetadataElement; -import org.odpi.openmetadata.frameworks.governanceaction.search.ElementProperties; -import org.odpi.openmetadata.frameworks.governanceaction.search.PropertyHelper; - -import java.lang.reflect.InvocationTargetException; - - -/** - * CollectionMemberConverter generates a CollectionMember bean from a RelatedMetadataElement. - */ -public class CollectionMemberConverter extends DigitalServiceConverterBase -{ - /** - * Constructor - * - * @param propertyHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public CollectionMemberConverter(PropertyHelper propertyHelper, - String serviceName, - String serverName) - { - super(propertyHelper, serviceName, serverName); - } - - - /** - * Using the supplied openMetadataElement, return a new instance of the bean. This is used for most beans that have - * a one to one correspondence with the repository instances. - * - * @param beanClass name of the class to create - * @param relatedMetadataElement the properties of an open metadata element plus details of the relationship used to navigate to it - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - RelatedMetadataElement relatedMetadataElement, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof CollectionMember bean) - { - CollectionMembershipProperties membershipProperties = new CollectionMembershipProperties(); - - bean.setElementHeader(super.getMetadataElementHeader(beanClass, - relatedMetadataElement, - relatedMetadataElement.getRelationshipGUID(), - null, - methodName)); - - /* - * The initial set of values come from the relationship properties. - */ - if (relatedMetadataElement.getRelationshipProperties() != null) - { - ElementProperties elementProperties = new ElementProperties(relatedMetadataElement.getRelationshipProperties()); - - membershipProperties.setMembershipRationale(this.removeMembershipRationale(elementProperties)); - membershipProperties.setCreatedBy(this.removeCreatedBy(elementProperties)); - membershipProperties.setExpression(this.removeExpression(elementProperties)); - membershipProperties.setConfidence(this.removeConfidence(elementProperties)); - membershipProperties.setSteward(this.removeSteward(elementProperties)); - membershipProperties.setStewardTypeName(this.removeStewardTypeName(elementProperties)); - membershipProperties.setStewardPropertyName(this.removeStewardPropertyName(elementProperties)); - membershipProperties.setSource(this.removeSource(elementProperties)); - membershipProperties.setNotes(this.removeNotes(elementProperties)); - membershipProperties.setStatus(this.removeCollectionMemberStatus(elementProperties)); - membershipProperties.setEffectiveFrom(relatedMetadataElement.getEffectiveFromTime()); - membershipProperties.setEffectiveTo(relatedMetadataElement.getEffectiveToTime()); - - /* - * Any remaining properties are returned in the extended properties. They are - * assumed to be defined in a subtype. - */ - membershipProperties.setExtendedProperties(this.getRemainingExtendedProperties(elementProperties)); - } - - bean.setMember(super.getElementStub(beanClass, relatedMetadataElement.getElement(), methodName)); - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - /** - * Extract and delete the CollectionMemberStatus property from the supplied element properties. - * - * @param elementProperties properties from entity - * @return KeyPattern enum - */ - CollectionMemberStatus removeCollectionMemberStatus(ElementProperties elementProperties) - { - final String methodName = "removeCollectionMemberStatus"; - - if (elementProperties != null) - { - String retrievedProperty = propertyHelper.removeEnumProperty(serviceName, - OpenMetadataProperty.MEMBERSHIP_STATUS.name, - elementProperties, - methodName); - - for (CollectionMemberStatus status : CollectionMemberStatus.values()) - { - if (status.getName().equals(retrievedProperty)) - { - return status; - } - } - } - - return null; - } -} diff --git a/open-metadata-implementation/access-services/digital-service/digital-service-client/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/client/converters/DigitalServiceConverterBase.java b/open-metadata-implementation/access-services/digital-service/digital-service-client/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/client/converters/DigitalServiceConverterBase.java deleted file mode 100644 index 427270f3ff6..00000000000 --- a/open-metadata-implementation/access-services/digital-service/digital-service-client/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/client/converters/DigitalServiceConverterBase.java +++ /dev/null @@ -1,127 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalservice.client.converters; - -import org.odpi.openmetadata.accessservices.digitalservice.metadataelements.RelatedElement; -import org.odpi.openmetadata.accessservices.digitalservice.properties.RelationshipProperties; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; -import org.odpi.openmetadata.frameworks.governanceaction.converters.OpenMetadataConverterBase; -import org.odpi.openmetadata.frameworks.governanceaction.properties.OpenMetadataElement; -import org.odpi.openmetadata.frameworks.governanceaction.properties.RelatedMetadataElement; -import org.odpi.openmetadata.frameworks.governanceaction.properties.OpenMetadataRelationship; -import org.odpi.openmetadata.frameworks.governanceaction.search.ElementProperties; -import org.odpi.openmetadata.frameworks.governanceaction.search.PropertyHelper; - -/** - * Provide base converter functions for the Digital Service OMAS. - * - * @param bean class - */ -public abstract class DigitalServiceConverterBase extends OpenMetadataConverterBase -{ - /** - * Constructor - * - * @param propertyHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public DigitalServiceConverterBase(PropertyHelper propertyHelper, - String serviceName, - String serverName) - { - super(propertyHelper, serviceName, serverName); - } - - - /** - * Using the supplied instances, return a new instance of a relatedElement bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param element entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - public RelatedElement getRelatedElement(Class beanClass, - OpenMetadataElement element, - OpenMetadataRelationship relationship, - String methodName) throws PropertyServerException - { - RelatedElement relatedElement = new RelatedElement(); - - relatedElement.setRelationshipHeader(this.getMetadataElementHeader(beanClass, relationship, relationship.getRelationshipGUID(), null, methodName)); - - if (relationship != null) - { - ElementProperties instanceProperties = new ElementProperties(relationship.getRelationshipProperties()); - - RelationshipProperties relationshipProperties = new RelationshipProperties(); - - relationshipProperties.setEffectiveFrom(relationship.getEffectiveFromTime()); - relationshipProperties.setEffectiveTo(relationship.getEffectiveToTime()); - relationshipProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - - relatedElement.setRelationshipProperties(relationshipProperties); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), OpenMetadataRelationship.class.getName(), methodName); - } - - if (element != null) - { - ElementStub elementStub = this.getElementStub(beanClass, element, methodName); - - relatedElement.setRelatedElement(elementStub); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), OpenMetadataElement.class.getName(), methodName); - } - - return relatedElement; - } - - - /** - * Using the supplied instances, return a new instance of a relatedElement bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param relatedMetadataElement results containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - public RelatedElement getRelatedElement(Class beanClass, - RelatedMetadataElement relatedMetadataElement, - String methodName) throws PropertyServerException - { - RelatedElement relatedElement = new RelatedElement(); - - relatedElement.setRelationshipHeader(this.getMetadataElementHeader(beanClass, relatedMetadataElement, relatedMetadataElement.getRelationshipGUID(), null, methodName)); - - if (relatedMetadataElement != null) - { - ElementProperties instanceProperties = new ElementProperties(relatedMetadataElement.getRelationshipProperties()); - - RelationshipProperties relationshipProperties = new RelationshipProperties(); - - relationshipProperties.setEffectiveFrom(relatedMetadataElement.getEffectiveFromTime()); - relationshipProperties.setEffectiveTo(relatedMetadataElement.getEffectiveToTime()); - relationshipProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - - relatedElement.setRelationshipProperties(relationshipProperties); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), OpenMetadataRelationship.class.getName(), methodName); - } - - return relatedElement; - } -} diff --git a/open-metadata-implementation/access-services/digital-service/digital-service-client/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/client/converters/package-info.java b/open-metadata-implementation/access-services/digital-service/digital-service-client/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/client/converters/package-info.java deleted file mode 100644 index 2b583e61479..00000000000 --- a/open-metadata-implementation/access-services/digital-service/digital-service-client/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/client/converters/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -/** - * The converters take Open Metadata Store elements and convert them to Digital Service OMAS beans. - */ -package org.odpi.openmetadata.accessservices.digitalservice.client.converters; \ No newline at end of file diff --git a/open-metadata-implementation/access-services/digital-service/digital-service-client/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/client/rest/DigitalServiceRESTClient.java b/open-metadata-implementation/access-services/digital-service/digital-service-client/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/client/rest/DigitalServiceRESTClient.java index fb3149f045b..cf32860d1ac 100644 --- a/open-metadata-implementation/access-services/digital-service/digital-service-client/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/client/rest/DigitalServiceRESTClient.java +++ b/open-metadata-implementation/access-services/digital-service/digital-service-client/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/client/rest/DigitalServiceRESTClient.java @@ -3,7 +3,8 @@ package org.odpi.openmetadata.accessservices.digitalservice.client.rest; -import org.odpi.openmetadata.accessservices.digitalservice.rest.*; +import org.odpi.openmetadata.commonservices.ffdc.rest.DigitalServiceResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.DigitalServicesResponse; import org.odpi.openmetadata.commonservices.ffdc.rest.FFDCRESTClient; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; @@ -89,106 +90,4 @@ public DigitalServiceRESTClient(String serverName, } - /** - * Issue a GET REST call that returns a RelatedElementListResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate REST API call URL template with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public RelatedElementListResponse callRelatedElementListGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - RelatedElementListResponse restResult = this.callGetRESTCall(methodName, RelatedElementListResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a DigitalServiceElement in a response object. - * - * @param methodName name of the method being called. - * @param urlTemplate REST API call URL template with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException something went wrong with the REST call stack. - */ - public DigitalServiceResponse callDigitalServiceGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - DigitalServiceResponse restResult = this.callGetRESTCall(methodName, DigitalServiceResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a list of DigitalServiceElements in a response object. - * - * @param methodName name of the method being called - * @param urlTemplate REST API call URL template with place-holders for the parameters - * @param params a list of parameters that are slotted into the url template - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException something went wrong with the REST call stack. - */ - public DigitalServiceListResponse callDigitalServiceListGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - DigitalServiceListResponse restResult = this.callGetRESTCall(methodName, DigitalServiceListResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a list of DigitalServiceElements in a response object. - * - * @param methodName name of the method being called - * @param urlTemplate REST API call URL template with place-holders for the parameters - * @param requestBody request body for the request - * @param params a list of parameters that are slotted into the url template - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException something went wrong with the REST call stack. - */ - public DigitalServiceListResponse callDigitalServiceListPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - DigitalServiceListResponse restResult = this.callPostRESTCall(methodName, DigitalServiceListResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } } diff --git a/open-metadata-implementation/access-services/digital-service/digital-service-server/build.gradle b/open-metadata-implementation/access-services/digital-service/digital-service-server/build.gradle index 756a0233a54..6d31e34c85d 100644 --- a/open-metadata-implementation/access-services/digital-service/digital-service-server/build.gradle +++ b/open-metadata-implementation/access-services/digital-service/digital-service-server/build.gradle @@ -7,6 +7,7 @@ dependencies { implementation project(':open-metadata-implementation:access-services:digital-service:digital-service-api') implementation project(':open-metadata-implementation:common-services:repository-handler') + implementation project(':open-metadata-implementation:frameworks:open-metadata-framework') implementation project(':open-metadata-implementation:frameworks:open-connector-framework') implementation project(':open-metadata-implementation:common-services:ffdc-services') implementation project(':open-metadata-implementation:repository-services:repository-services-apis') diff --git a/open-metadata-implementation/access-services/digital-service/digital-service-server/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/handlers/DigitalServiceEntityHandler.java b/open-metadata-implementation/access-services/digital-service/digital-service-server/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/handlers/DigitalServiceEntityHandler.java index f3f2dae07b2..d40317aeb89 100644 --- a/open-metadata-implementation/access-services/digital-service/digital-service-server/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/handlers/DigitalServiceEntityHandler.java +++ b/open-metadata-implementation/access-services/digital-service/digital-service-server/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/handlers/DigitalServiceEntityHandler.java @@ -4,13 +4,13 @@ import org.odpi.openmetadata.accessservices.digitalservice.builders.DigitalServiceBuilder; import org.odpi.openmetadata.accessservices.digitalservice.mappers.DigitalServiceMapper; -import org.odpi.openmetadata.accessservices.digitalservice.properties.DigitalServiceProperties; import org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler; import org.odpi.openmetadata.commonservices.repositoryhandler.RepositoryHandler; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; +import org.odpi.openmetadata.frameworks.openmetadata.properties.digitalbusiness.DigitalServiceProperties; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceStatus; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; @@ -48,8 +48,8 @@ public DigitalServiceEntityHandler(OMRSRepositoryHelper repositoryHelper, Reposi * @throws InvalidParameterException the invalid parameter exception * @throws UserNotAuthorizedException user not authorized */ - public String createDigitalServiceEntity(String userId, - String serverName, + public String createDigitalServiceEntity(String userId, + String serverName, DigitalServiceProperties digitalServiceProperties) throws PropertyServerException, UserNotAuthorizedException, InvalidParameterException diff --git a/open-metadata-implementation/access-services/digital-service/digital-service-server/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/server/DigitalServiceRESTServices.java b/open-metadata-implementation/access-services/digital-service/digital-service-server/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/server/DigitalServiceRESTServices.java index 7529a5d9a19..c725b6f4079 100644 --- a/open-metadata-implementation/access-services/digital-service/digital-service-server/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/server/DigitalServiceRESTServices.java +++ b/open-metadata-implementation/access-services/digital-service/digital-service-server/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/server/DigitalServiceRESTServices.java @@ -4,13 +4,13 @@ import org.odpi.openmetadata.accessservices.digitalservice.handlers.DigitalServiceEntityHandler; -import org.odpi.openmetadata.accessservices.digitalservice.properties.DigitalServiceProperties; -import org.odpi.openmetadata.accessservices.digitalservice.rest.ReferenceableRequestBody; import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.ReferenceableRequestBody; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; +import org.odpi.openmetadata.frameworks.openmetadata.properties.digitalbusiness.DigitalServiceProperties; import org.slf4j.LoggerFactory; @@ -21,11 +21,11 @@ */ public class DigitalServiceRESTServices { - private static DigitalServiceInstanceHandler instanceHandler = new DigitalServiceInstanceHandler(); + private static final DigitalServiceInstanceHandler instanceHandler = new DigitalServiceInstanceHandler(); - private static RESTCallLogger restCallLogger = new RESTCallLogger(LoggerFactory.getLogger(DigitalServiceRESTServices.class), + private static final RESTCallLogger restCallLogger = new RESTCallLogger(LoggerFactory.getLogger(DigitalServiceRESTServices.class), instanceHandler.getServiceName()); - private RESTExceptionHandler restExceptionHandler = new RESTExceptionHandler(); + private final RESTExceptionHandler restExceptionHandler = new RESTExceptionHandler(); diff --git a/open-metadata-implementation/access-services/digital-service/digital-service-spring/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/spring/DigitalServiceResource.java b/open-metadata-implementation/access-services/digital-service/digital-service-spring/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/spring/DigitalServiceResource.java index 312af4c2e88..fa13e3970a2 100644 --- a/open-metadata-implementation/access-services/digital-service/digital-service-spring/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/spring/DigitalServiceResource.java +++ b/open-metadata-implementation/access-services/digital-service/digital-service-spring/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/spring/DigitalServiceResource.java @@ -2,13 +2,13 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.digitalservice.spring; -import org.odpi.openmetadata.accessservices.digitalservice.rest.ReferenceableRequestBody; import org.odpi.openmetadata.accessservices.digitalservice.server.DigitalServiceRESTServices; import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.tags.Tag; +import org.odpi.openmetadata.commonservices.ffdc.rest.ReferenceableRequestBody; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; diff --git a/open-metadata-implementation/access-services/governance-engine/governance-engine-api/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/metadataelements/GovernanceActionElement.java b/open-metadata-implementation/access-services/governance-engine/governance-engine-api/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/metadataelements/GovernanceActionElement.java index 671a9f54e1a..ed13a3ea125 100644 --- a/open-metadata-implementation/access-services/governance-engine/governance-engine-api/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/metadataelements/GovernanceActionElement.java +++ b/open-metadata-implementation/access-services/governance-engine/governance-engine-api/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/metadataelements/GovernanceActionElement.java @@ -7,7 +7,7 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import org.odpi.openmetadata.accessservices.governanceengine.properties.ReferenceableProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; import org.odpi.openmetadata.frameworks.governanceaction.properties.ActionTargetElement; import org.odpi.openmetadata.frameworks.governanceaction.properties.GovernanceActionStatus; import org.odpi.openmetadata.frameworks.governanceaction.properties.RelatedEngineActionElement; diff --git a/open-metadata-implementation/access-services/governance-engine/governance-engine-api/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/metadataelements/GovernanceActionTypeElement.java b/open-metadata-implementation/access-services/governance-engine/governance-engine-api/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/metadataelements/GovernanceActionTypeElement.java index 020d8d50052..3d6de361819 100644 --- a/open-metadata-implementation/access-services/governance-engine/governance-engine-api/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/metadataelements/GovernanceActionTypeElement.java +++ b/open-metadata-implementation/access-services/governance-engine/governance-engine-api/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/metadataelements/GovernanceActionTypeElement.java @@ -7,7 +7,7 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import org.odpi.openmetadata.accessservices.governanceengine.properties.GovernanceActionTypeProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; import java.util.Objects; diff --git a/open-metadata-implementation/access-services/governance-engine/governance-engine-api/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/metadataelements/GovernanceEngineElement.java b/open-metadata-implementation/access-services/governance-engine/governance-engine-api/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/metadataelements/GovernanceEngineElement.java index f41021e692b..b6f4ee4d182 100644 --- a/open-metadata-implementation/access-services/governance-engine/governance-engine-api/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/metadataelements/GovernanceEngineElement.java +++ b/open-metadata-implementation/access-services/governance-engine/governance-engine-api/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/metadataelements/GovernanceEngineElement.java @@ -7,7 +7,7 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import org.odpi.openmetadata.accessservices.governanceengine.properties.GovernanceEngineProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; import java.util.Objects; diff --git a/open-metadata-implementation/access-services/governance-engine/governance-engine-api/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/metadataelements/GovernanceServiceElement.java b/open-metadata-implementation/access-services/governance-engine/governance-engine-api/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/metadataelements/GovernanceServiceElement.java index c157a9bf426..f6fd3a842c6 100644 --- a/open-metadata-implementation/access-services/governance-engine/governance-engine-api/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/metadataelements/GovernanceServiceElement.java +++ b/open-metadata-implementation/access-services/governance-engine/governance-engine-api/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/metadataelements/GovernanceServiceElement.java @@ -7,7 +7,7 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import org.odpi.openmetadata.accessservices.governanceengine.properties.GovernanceServiceProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; import java.util.Objects; diff --git a/open-metadata-implementation/access-services/governance-engine/governance-engine-api/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/metadataelements/IntegrationConnectorElement.java b/open-metadata-implementation/access-services/governance-engine/governance-engine-api/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/metadataelements/IntegrationConnectorElement.java index d171c1ae0d2..6b3faebf002 100644 --- a/open-metadata-implementation/access-services/governance-engine/governance-engine-api/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/metadataelements/IntegrationConnectorElement.java +++ b/open-metadata-implementation/access-services/governance-engine/governance-engine-api/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/metadataelements/IntegrationConnectorElement.java @@ -7,7 +7,7 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import org.odpi.openmetadata.accessservices.governanceengine.properties.IntegrationConnectorProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; import org.odpi.openmetadata.frameworks.governanceaction.properties.CatalogTarget; import java.util.List; diff --git a/open-metadata-implementation/access-services/governance-engine/governance-engine-api/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/metadataelements/IntegrationGroupElement.java b/open-metadata-implementation/access-services/governance-engine/governance-engine-api/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/metadataelements/IntegrationGroupElement.java index 0d4faaa9a68..6a3c7670381 100644 --- a/open-metadata-implementation/access-services/governance-engine/governance-engine-api/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/metadataelements/IntegrationGroupElement.java +++ b/open-metadata-implementation/access-services/governance-engine/governance-engine-api/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/metadataelements/IntegrationGroupElement.java @@ -7,7 +7,7 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import org.odpi.openmetadata.accessservices.governanceengine.properties.IntegrationGroupProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; import java.util.Objects; diff --git a/open-metadata-implementation/access-services/governance-engine/governance-engine-api/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/metadataelements/MetadataElement.java b/open-metadata-implementation/access-services/governance-engine/governance-engine-api/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/metadataelements/MetadataElement.java index 7aa92db66d9..d74a7b81271 100644 --- a/open-metadata-implementation/access-services/governance-engine/governance-engine-api/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/metadataelements/MetadataElement.java +++ b/open-metadata-implementation/access-services/governance-engine/governance-engine-api/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/metadataelements/MetadataElement.java @@ -4,7 +4,7 @@ package org.odpi.openmetadata.accessservices.governanceengine.metadataelements; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; /** * MetadataElement is the common interface for all metadata elements. It adds the header information that is stored with the properties. diff --git a/open-metadata-implementation/access-services/governance-engine/governance-engine-api/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/metadataelements/RegisteredGovernanceServiceElement.java b/open-metadata-implementation/access-services/governance-engine/governance-engine-api/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/metadataelements/RegisteredGovernanceServiceElement.java index 6c9ba2d7f43..a9893fd6eff 100644 --- a/open-metadata-implementation/access-services/governance-engine/governance-engine-api/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/metadataelements/RegisteredGovernanceServiceElement.java +++ b/open-metadata-implementation/access-services/governance-engine/governance-engine-api/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/metadataelements/RegisteredGovernanceServiceElement.java @@ -6,9 +6,8 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.governanceengine.properties.GovernanceServiceProperties; import org.odpi.openmetadata.accessservices.governanceengine.properties.RegisteredGovernanceService; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; import java.util.Objects; diff --git a/open-metadata-implementation/access-services/governance-engine/governance-engine-api/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/rest/ElementHeaderResponse.java b/open-metadata-implementation/access-services/governance-engine/governance-engine-api/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/rest/ElementHeaderResponse.java index 75cc15e7c54..69a29ae4e17 100644 --- a/open-metadata-implementation/access-services/governance-engine/governance-engine-api/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/rest/ElementHeaderResponse.java +++ b/open-metadata-implementation/access-services/governance-engine/governance-engine-api/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/rest/ElementHeaderResponse.java @@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; import java.util.Arrays; import java.util.Objects; diff --git a/open-metadata-implementation/access-services/governance-engine/governance-engine-api/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/rest/ElementHeadersResponse.java b/open-metadata-implementation/access-services/governance-engine/governance-engine-api/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/rest/ElementHeadersResponse.java index 15fbffd57a3..491ed2d3630 100644 --- a/open-metadata-implementation/access-services/governance-engine/governance-engine-api/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/rest/ElementHeadersResponse.java +++ b/open-metadata-implementation/access-services/governance-engine/governance-engine-api/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/rest/ElementHeadersResponse.java @@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; import java.util.ArrayList; import java.util.Arrays; diff --git a/open-metadata-implementation/access-services/governance-engine/governance-engine-api/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/rest/FindRequestBody.java b/open-metadata-implementation/access-services/governance-engine/governance-engine-api/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/rest/FindRequestBody.java index b8a04654194..12b87e26d4b 100644 --- a/open-metadata-implementation/access-services/governance-engine/governance-engine-api/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/rest/FindRequestBody.java +++ b/open-metadata-implementation/access-services/governance-engine/governance-engine-api/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/rest/FindRequestBody.java @@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStatus; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ElementStatus; import org.odpi.openmetadata.frameworks.governanceaction.search.SearchClassifications; import org.odpi.openmetadata.frameworks.governanceaction.search.SearchProperties; import org.odpi.openmetadata.frameworks.governanceaction.search.SequencingOrder; diff --git a/open-metadata-implementation/access-services/governance-engine/governance-engine-api/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/rest/UpdateStatusRequestBody.java b/open-metadata-implementation/access-services/governance-engine/governance-engine-api/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/rest/UpdateStatusRequestBody.java index d397191ef45..d57c9a25d46 100644 --- a/open-metadata-implementation/access-services/governance-engine/governance-engine-api/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/rest/UpdateStatusRequestBody.java +++ b/open-metadata-implementation/access-services/governance-engine/governance-engine-api/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/rest/UpdateStatusRequestBody.java @@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStatus; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ElementStatus; import java.util.Objects; diff --git a/open-metadata-implementation/access-services/governance-engine/governance-engine-client/build.gradle b/open-metadata-implementation/access-services/governance-engine/governance-engine-client/build.gradle index 23e5b135266..94b3c561f2d 100644 --- a/open-metadata-implementation/access-services/governance-engine/governance-engine-client/build.gradle +++ b/open-metadata-implementation/access-services/governance-engine/governance-engine-client/build.gradle @@ -18,6 +18,7 @@ dependencies { implementation project(':open-metadata-implementation:common-services:ffdc-services') implementation project(':open-metadata-implementation:repository-services:repository-services-apis') implementation project(':open-metadata-implementation:admin-services:admin-services-api') + implementation project(':open-metadata-implementation:frameworks:open-metadata-framework') implementation project(':open-metadata-implementation:frameworks:open-connector-framework') implementation project(':open-metadata-implementation:frameworks:open-integration-framework') implementation project(':open-metadata-implementation:frameworks:governance-action-framework') diff --git a/open-metadata-implementation/access-services/governance-engine/governance-engine-server/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/converters/CatalogTargetConverter.java b/open-metadata-implementation/access-services/governance-engine/governance-engine-server/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/converters/CatalogTargetConverter.java index 777876eece1..835ca9add5f 100644 --- a/open-metadata-implementation/access-services/governance-engine/governance-engine-server/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/converters/CatalogTargetConverter.java +++ b/open-metadata-implementation/access-services/governance-engine/governance-engine-server/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/converters/CatalogTargetConverter.java @@ -2,7 +2,7 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.governanceengine.converters; -import org.odpi.openmetadata.commonservices.generichandlers.OCFConverter; +import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.openmetadata.enums.DeleteMethod; import org.odpi.openmetadata.frameworks.openmetadata.enums.PermittedSynchronization; @@ -20,7 +20,7 @@ * CatalogTargetConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) Relationship object into a * CatalogTarget bean. */ -public class CatalogTargetConverter extends OCFConverter +public class CatalogTargetConverter extends OMFConverter { /** * Constructor captures the repository content needed to create the endpoint object. diff --git a/open-metadata-implementation/access-services/governance-engine/governance-engine-server/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/converters/RelatedElementsConverter.java b/open-metadata-implementation/access-services/governance-engine/governance-engine-server/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/converters/RelatedElementsConverter.java index 638bcc0de2d..bfae604f272 100644 --- a/open-metadata-implementation/access-services/governance-engine/governance-engine-server/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/converters/RelatedElementsConverter.java +++ b/open-metadata-implementation/access-services/governance-engine/governance-engine-server/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/converters/RelatedElementsConverter.java @@ -3,7 +3,7 @@ package org.odpi.openmetadata.accessservices.governanceengine.converters; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementStub; import org.odpi.openmetadata.frameworks.governanceaction.properties.OpenMetadataRelationship; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityProxy; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; diff --git a/open-metadata-implementation/access-services/governance-engine/governance-engine-server/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/handlers/GovernanceConfigurationHandler.java b/open-metadata-implementation/access-services/governance-engine/governance-engine-server/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/handlers/GovernanceConfigurationHandler.java index 7c56b9d1d89..2296e83214f 100644 --- a/open-metadata-implementation/access-services/governance-engine/governance-engine-server/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/handlers/GovernanceConfigurationHandler.java +++ b/open-metadata-implementation/access-services/governance-engine/governance-engine-server/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/handlers/GovernanceConfigurationHandler.java @@ -145,7 +145,7 @@ public GovernanceConfigurationHandler(String service publishZones, auditLog); - this.connectionHandler = new ConnectionHandler<>(new ConnectionConverter<>(repositoryHelper, serviceName, serverName), + this.connectionHandler = new ConnectionHandler<>(new OCFConnectionConverter<>(repositoryHelper, serviceName, serverName), Connection.class, serviceName, serverName, @@ -728,6 +728,7 @@ public void updateGovernanceService(String userId, guidParameter, qualifiedName, displayName, + displayName, versionIdentifier, description, deployedImplementationType, @@ -1830,6 +1831,7 @@ public void updateIntegrationConnector(String userId, guidParameter, qualifiedName, name, + name, versionIdentifier, description, deployedImplementationType, diff --git a/open-metadata-implementation/access-services/governance-engine/governance-engine-server/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/outtopic/GovernanceEngineOMRSTopicListener.java b/open-metadata-implementation/access-services/governance-engine/governance-engine-server/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/outtopic/GovernanceEngineOMRSTopicListener.java index e90ef8bf12b..df3964018b8 100644 --- a/open-metadata-implementation/access-services/governance-engine/governance-engine-server/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/outtopic/GovernanceEngineOMRSTopicListener.java +++ b/open-metadata-implementation/access-services/governance-engine/governance-engine-server/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/outtopic/GovernanceEngineOMRSTopicListener.java @@ -6,11 +6,13 @@ import org.odpi.openmetadata.accessservices.governanceengine.converters.GovernanceEngineOMASConverter; import org.odpi.openmetadata.accessservices.governanceengine.ffdc.GovernanceEngineAuditCode; import org.odpi.openmetadata.frameworks.governanceaction.properties.OpenMetadataRelationship; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ElementOriginCategory; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ElementStatus; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; import org.odpi.openmetadata.frameworkservices.gaf.handlers.MetadataElementHandler; import org.odpi.openmetadata.accessservices.governanceengine.metadataelements.MetadataElement; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.*; import org.odpi.openmetadata.frameworks.governanceaction.events.WatchdogClassificationEvent; import org.odpi.openmetadata.frameworks.governanceaction.events.WatchdogEventType; import org.odpi.openmetadata.frameworks.governanceaction.events.WatchdogMetadataElementEvent; diff --git a/open-metadata-implementation/access-services/governance-engine/governance-engine-server/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/server/GovernanceActionProcessRESTServices.java b/open-metadata-implementation/access-services/governance-engine/governance-engine-server/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/server/GovernanceActionProcessRESTServices.java index fda9c5ac2b3..fc5c0de34d2 100644 --- a/open-metadata-implementation/access-services/governance-engine/governance-engine-server/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/server/GovernanceActionProcessRESTServices.java +++ b/open-metadata-implementation/access-services/governance-engine/governance-engine-server/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/server/GovernanceActionProcessRESTServices.java @@ -20,7 +20,7 @@ import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.governanceaction.properties.GovernanceActionProcessElement; import org.odpi.openmetadata.frameworks.governanceaction.properties.GovernanceActionProcessProperties; -import org.odpi.openmetadata.frameworks.governanceaction.properties.ProcessStatus; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ProcessStatus; import org.odpi.openmetadata.frameworkservices.gaf.rest.NewGovernanceActionProcessRequestBody; import org.odpi.openmetadata.frameworkservices.gaf.rest.UpdateGovernanceActionProcessRequestBody; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceStatus; diff --git a/open-metadata-implementation/access-services/governance-engine/governance-engine-server/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/server/GovernanceEngineRESTServices.java b/open-metadata-implementation/access-services/governance-engine/governance-engine-server/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/server/GovernanceEngineRESTServices.java index 08d2524f5a5..0a6b10d8171 100644 --- a/open-metadata-implementation/access-services/governance-engine/governance-engine-server/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/server/GovernanceEngineRESTServices.java +++ b/open-metadata-implementation/access-services/governance-engine/governance-engine-server/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/server/GovernanceEngineRESTServices.java @@ -8,7 +8,7 @@ import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; -import org.odpi.openmetadata.commonservices.ffdc.rest.ConnectionResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.OCFConnectionResponse; import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; import org.odpi.openmetadata.commonservices.ffdc.rest.NullRequestBody; import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; @@ -55,16 +55,16 @@ public GovernanceEngineRESTServices() * UserNotAuthorizedException user not authorized to issue this request or * PropertyServerException problem retrieving the governance engine definition. */ - public ConnectionResponse getOutTopicConnection(String serverName, - String userId, - String callerId) + public OCFConnectionResponse getOutTopicConnection(String serverName, + String userId, + String callerId) { final String methodName = "getOutTopicConnection"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - ConnectionResponse response = new ConnectionResponse(); - AuditLog auditLog = null; + OCFConnectionResponse response = new OCFConnectionResponse(); + AuditLog auditLog = null; try { diff --git a/open-metadata-implementation/access-services/governance-engine/governance-engine-spring/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/server/spring/GovernanceActionResource.java b/open-metadata-implementation/access-services/governance-engine/governance-engine-spring/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/server/spring/GovernanceActionResource.java index c826c71bbd5..2dc87c36492 100644 --- a/open-metadata-implementation/access-services/governance-engine/governance-engine-spring/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/server/spring/GovernanceActionResource.java +++ b/open-metadata-implementation/access-services/governance-engine/governance-engine-spring/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/server/spring/GovernanceActionResource.java @@ -8,7 +8,6 @@ import org.odpi.openmetadata.accessservices.governanceengine.rest.GovernanceActionElementsResponse; import org.odpi.openmetadata.accessservices.governanceengine.rest.StatusRequestBody; import org.odpi.openmetadata.accessservices.governanceengine.server.GovernanceEngineRESTServices; -import org.odpi.openmetadata.commonservices.ffdc.rest.ConnectionResponse; import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; import org.odpi.openmetadata.commonservices.ffdc.rest.NullRequestBody; import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; diff --git a/open-metadata-implementation/access-services/governance-engine/governance-engine-spring/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/server/spring/GovernanceEngineOMASResource.java b/open-metadata-implementation/access-services/governance-engine/governance-engine-spring/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/server/spring/GovernanceEngineOMASResource.java index cbe54e66c7d..963819f77ef 100644 --- a/open-metadata-implementation/access-services/governance-engine/governance-engine-spring/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/server/spring/GovernanceEngineOMASResource.java +++ b/open-metadata-implementation/access-services/governance-engine/governance-engine-spring/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/server/spring/GovernanceEngineOMASResource.java @@ -5,9 +5,6 @@ import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.accessservices.governanceengine.rest.GovernanceActionElementResponse; -import org.odpi.openmetadata.accessservices.governanceengine.rest.GovernanceActionElementsResponse; -import org.odpi.openmetadata.accessservices.governanceengine.rest.StatusRequestBody; import org.odpi.openmetadata.accessservices.governanceengine.server.GovernanceEngineRESTServices; import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.springframework.web.bind.annotation.*; @@ -47,9 +44,9 @@ public class GovernanceEngineOMASResource externalDocs=@ExternalDocumentation(description="Further Information", url="https://egeria-project.org/concepts/out-topic/")) - public ConnectionResponse getOutTopicConnection(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String callerId) + public OCFConnectionResponse getOutTopicConnection(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String callerId) { return restAPI.getOutTopicConnection(serverName, userId, callerId); } diff --git a/open-metadata-implementation/access-services/governance-engine/governance-engine-topic-connectors/build.gradle b/open-metadata-implementation/access-services/governance-engine/governance-engine-topic-connectors/build.gradle index 2f731894685..fea641f2b34 100644 --- a/open-metadata-implementation/access-services/governance-engine/governance-engine-topic-connectors/build.gradle +++ b/open-metadata-implementation/access-services/governance-engine/governance-engine-topic-connectors/build.gradle @@ -6,6 +6,7 @@ dependencies { implementation project(':open-metadata-implementation:frameworks:audit-log-framework') + implementation project(':open-metadata-implementation:frameworks:open-metadata-framework') implementation project(':open-metadata-implementation:frameworks:open-connector-framework') implementation project(':open-metadata-implementation:frameworks:governance-action-framework') implementation project(':open-metadata-implementation:repository-services:repository-services-apis') diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/api/CertificationManagementInterface.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/api/CertificationManagementInterface.java index 13de7c5e1d7..67bb51386dc 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/api/CertificationManagementInterface.java +++ b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/api/CertificationManagementInterface.java @@ -2,14 +2,12 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.governanceprogram.api; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.CertificationTypeElement; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.RelatedElement; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.CertificationProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.CertificationTypeProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceDefinitionStatus; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.enums.GovernanceDefinitionStatus; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.*; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; import java.util.List; diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/api/ExternalReferencesInterface.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/api/ExternalReferencesInterface.java index b0be59b53a8..befd1be868a 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/api/ExternalReferencesInterface.java +++ b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/api/ExternalReferencesInterface.java @@ -3,13 +3,13 @@ package org.odpi.openmetadata.accessservices.governanceprogram.api; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.ExternalReferenceElement; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.RelatedElement; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.ExternalReferenceLinkProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.ExternalReferenceProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ExternalReferenceElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.RelatedElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.externalreferences.ExternalReferenceLinkProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.externalreferences.ExternalReferenceProperties; import java.util.List; diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/api/GovernanceClassificationLevelInterface.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/api/GovernanceClassificationLevelInterface.java index 1ed9a524412..7f7ecf9fe20 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/api/GovernanceClassificationLevelInterface.java +++ b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/api/GovernanceClassificationLevelInterface.java @@ -3,10 +3,10 @@ package org.odpi.openmetadata.accessservices.governanceprogram.api; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceLevelIdentifierElement; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceLevelIdentifierSetElement; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceLevelIdentifierProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceLevelIdentifierSetProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.GovernanceLevelIdentifierElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.GovernanceLevelIdentifierSetElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.GovernanceLevelIdentifierProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.GovernanceLevelIdentifierSetProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/api/GovernanceDefinitionsInterface.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/api/GovernanceDefinitionsInterface.java index 3b7354e4da3..d7e165d1082 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/api/GovernanceDefinitionsInterface.java +++ b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/api/GovernanceDefinitionsInterface.java @@ -2,10 +2,9 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.governanceprogram.api; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceDefinitionProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceDefinitionStatus; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.PeerDefinitionProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.SupportingDefinitionProperties; +import org.odpi.openmetadata.frameworks.openmetadata.enums.GovernanceDefinitionStatus; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.*; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; @@ -81,9 +80,9 @@ public interface GovernanceDefinitionsInterface */ String createGovernanceDefinition(String userId, GovernanceDefinitionProperties properties, - GovernanceDefinitionStatus initialStatus) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException; + GovernanceDefinitionStatus initialStatus) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException; /** * Update an existing governance definition. diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/api/GovernanceDomainInterface.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/api/GovernanceDomainInterface.java index 88e06c2482d..1f54e9156f7 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/api/GovernanceDomainInterface.java +++ b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/api/GovernanceDomainInterface.java @@ -2,10 +2,10 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.governanceprogram.api; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceDomainElement; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceDomainSetElement; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceDomainProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceDomainSetProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.GovernanceDomainElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.GovernanceDomainSetElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.GovernanceDomainProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.GovernanceDomainSetProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/api/GovernanceMetricsInterface.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/api/GovernanceMetricsInterface.java index 04540c4a826..0b169da2511 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/api/GovernanceMetricsInterface.java +++ b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/api/GovernanceMetricsInterface.java @@ -3,13 +3,13 @@ package org.odpi.openmetadata.accessservices.governanceprogram.api; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceMetricElement; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceDefinitionMetricProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceExpectationsProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceMeasurementsDataSetProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceMeasurementsProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceMetricProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceResultsProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.GovernanceMetricElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.GovernanceDefinitionMetricProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.GovernanceExpectationsProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.GovernanceMeasurementsDataSetProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.GovernanceMeasurementsProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.GovernanceMetricProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.GovernanceResultsProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/api/GovernanceProgramReviewInterface.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/api/GovernanceProgramReviewInterface.java index 50ce604792a..26175e2f215 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/api/GovernanceProgramReviewInterface.java +++ b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/api/GovernanceProgramReviewInterface.java @@ -2,11 +2,13 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.governanceprogram.api; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.*; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.GovernanceDefinitionElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.GovernanceDefinitionGraph; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.GovernanceMetricImplementation; import java.util.List; diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/api/GovernanceRolesInterface.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/api/GovernanceRolesInterface.java index f226e309c35..0d24a5405f0 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/api/GovernanceRolesInterface.java +++ b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/api/GovernanceRolesInterface.java @@ -3,10 +3,10 @@ package org.odpi.openmetadata.accessservices.governanceprogram.api; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceRoleAppointee; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceRoleHistory; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceRoleElement; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceRoleProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.GovernanceRoleAppointee; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.GovernanceRoleHistory; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.GovernanceRoleElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.GovernanceRoleProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/api/GovernanceStatusLevelInterface.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/api/GovernanceStatusLevelInterface.java index d70344bea68..e9bf02f2b49 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/api/GovernanceStatusLevelInterface.java +++ b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/api/GovernanceStatusLevelInterface.java @@ -3,10 +3,10 @@ package org.odpi.openmetadata.accessservices.governanceprogram.api; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceStatusIdentifierElement; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceStatusIdentifierSetElement; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceStatusIdentifierProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceStatusIdentifierSetProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.GovernanceStatusIdentifierElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.GovernanceStatusIdentifierSetElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.GovernanceStatusIdentifierProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.GovernanceStatusIdentifierSetProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/api/GovernanceZonesInterface.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/api/GovernanceZonesInterface.java index 68ac0531faa..74e7b689f09 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/api/GovernanceZonesInterface.java +++ b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/api/GovernanceZonesInterface.java @@ -3,15 +3,14 @@ package org.odpi.openmetadata.accessservices.governanceprogram.api; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceZoneDefinition; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceZoneElement; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceZoneProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.GovernanceZoneDefinition; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.GovernanceZoneElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.GovernanceZoneProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; import java.util.List; -import java.util.Map; /** * The GovernanceZonesInterface is used by the governance team to define the zones where the assets diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/api/RelatedElementsManagementInterface.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/api/RelatedElementsManagementInterface.java index 5afa564b94c..d120711aa7f 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/api/RelatedElementsManagementInterface.java +++ b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/api/RelatedElementsManagementInterface.java @@ -2,16 +2,14 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.governanceprogram.api; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceDefinitionElement; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceRoleElement; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.RelatedElement; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.AssignmentScopeProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.RelationshipProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.ResourceListProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.StakeholderProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.AssignmentScopeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.projects.StakeholderProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.resources.ResourceListProperties; import java.util.List; diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/api/RightsManagementInterface.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/api/RightsManagementInterface.java index 1aa0e52c0e7..6f3f0a9d99c 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/api/RightsManagementInterface.java +++ b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/api/RightsManagementInterface.java @@ -2,15 +2,15 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.governanceprogram.api; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.LicenseElement; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.LicenseTypeElement; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.RelatedElement; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceDefinitionStatus; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.LicenseProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.LicenseTypeProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.enums.GovernanceDefinitionStatus; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.LicenseElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.LicenseTypeElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.RelatedElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.LicenseProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.LicenseTypeProperties; import java.util.List; @@ -37,7 +37,7 @@ public interface RightsManagementInterface * @throws UserNotAuthorizedException security access problem */ String createLicenseType(String userId, - LicenseTypeProperties properties, + LicenseTypeProperties properties, GovernanceDefinitionStatus initialStatus) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException; diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/api/SubjectAreasInterface.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/api/SubjectAreasInterface.java index ff91bb0f625..21764d62de8 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/api/SubjectAreasInterface.java +++ b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/api/SubjectAreasInterface.java @@ -3,15 +3,13 @@ package org.odpi.openmetadata.accessservices.governanceprogram.api; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.RelatedElement; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.SubjectAreaDefinition; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.SubjectAreaElement; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.SubjectAreaClassificationProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.SubjectAreaProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.SubjectAreaDefinition; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.SubjectAreaClassificationProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.SubjectAreaProperties; import java.util.List; @@ -200,8 +198,8 @@ SubjectAreaDefinition getSubjectAreaDefinitionByGUID(String userId, void addSubjectAreaMemberClassification(String userId, String elementGUID, SubjectAreaClassificationProperties properties) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException; + UserNotAuthorizedException, + PropertyServerException; /** diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/AssetElement.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/AssetElement.java deleted file mode 100644 index 2cdf38ff971..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/AssetElement.java +++ /dev/null @@ -1,167 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.metadataelements; - -import com.fasterxml.jackson.annotation.*; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.AssetProperties; - -import java.util.*; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * Asset holds asset properties that are used for displaying details of - * an asset in summary lists or hover text. It includes the following properties: - *
      - *
    • qualifiedName - The official (unique) name for the asset. This is often defined by the IT systems - * management organization and should be used (when available) on audit logs and error messages. - * (qualifiedName from Referenceable - model 0010)
    • - *
    • displayName - A consumable name for the asset. Often a shortened form of the assetQualifiedName - * for use on user interfaces and messages. The assetDisplayName should only be used for audit logs and error - * messages if the assetQualifiedName is not set. (Sourced from attribute name within Asset - model 0010)
    • - *
    • shortDescription - short description about the asset. - * (Sourced from assetSummary within ConnectionsToAsset - model 0205)
    • - *
    • description - full description of the asset. - * (Sourced from attribute description within Asset - model 0010)
    • - *
    • owner - name of the person or organization that owns the asset. - * (Sourced from attribute owner within Asset - model 0010)
    • - *
    • ownerCategory - type of the person or organization that owns the asset. - * (Sourced from classification AssetOwnership attached to Asset - model 0445)
    • - *
    • zoneMembership - name of the person or organization that owns the asset. - * (Sourced from classification AssetZoneMemberShip attached to Asset - model 0424)
    • - *
    • origin - origin identifiers describing the source of the asset. - * (Sourced from classification AssetOrigin attached to Asset - model 0440)
    • - *
    • classifications - list of all classifications assigned to the asset
    • - *
    • extendedProperties - list of properties assigned to the asset from the Asset subclasses
    • - *
    • additionalProperties - list of properties assigned to the asset as additional properties
    • - *
    - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class AssetElement implements MetadataElement -{ - private ElementHeader elementHeader = null; - private AssetProperties properties = null; - - - /** - * Default constructor - */ - public AssetElement() - { - } - - - /** - * Copy/clone constructor. Note, this is a deep copy - * - * @param template object to copy - */ - public AssetElement(AssetElement template) - { - if (template != null) - { - this.elementHeader = template.getElementHeader(); - this.properties = template.getProperties(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - @Override - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the description of the asset. - * - * @return list of external references - */ - public AssetProperties getProperties() - { - return properties; - } - - - /** - * Set up the description of the asset. - * - * @param properties of external references - */ - public void setProperties(AssetProperties properties) - { - this.properties = properties; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "AssetElement{" + - "elementHeader=" + elementHeader + - ", properties=" + properties + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - AssetElement that = (AssetElement) objectToCompare; - return Objects.equals(elementHeader, that.elementHeader) && - Objects.equals(properties, that.properties); - } - - - /** - * Hash of properties - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), properties, elementHeader); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/CertificationElement.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/CertificationElement.java deleted file mode 100644 index 34453835d96..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/CertificationElement.java +++ /dev/null @@ -1,198 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.governanceprogram.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.CertificationProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.RelationshipProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * CertificationElement contains the properties and header for a certification for an element. - * It includes the details of the specific element's certification and details of the certification type. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class CertificationElement -{ - private ElementHeader certificationHeader = null; - private RelationshipProperties certificationProperties = null; - private ElementHeader certificationTypeHeader = null; - private CertificationProperties certificationTypeProperties = null; - - /** - * Default constructor - */ - public CertificationElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public CertificationElement(CertificationElement template) - { - if (template != null) - { - certificationHeader = template.getCertificationHeader(); - certificationProperties = template.getCertificationProperties(); - certificationTypeHeader = template.getCertificationTypeHeader(); - certificationTypeProperties = template.getCertificationTypeProperties(); - } - } - - - /** - * Return the element header associated with the relationship. - * - * @return element header object - */ - public ElementHeader getCertificationHeader() - { - return certificationHeader; - } - - - /** - * Set up the element header associated with the relationship. - * - * @param certificationHeader element header object - */ - public void setCertificationHeader(ElementHeader certificationHeader) - { - this.certificationHeader = certificationHeader; - } - - - /** - * Return details of the relationship - * - * @return relationship properties - */ - public RelationshipProperties getCertificationProperties() - { - return certificationProperties; - } - - - /** - * Set up relationship properties - * - * @param certificationProperties relationship properties - */ - public void setCertificationProperties(RelationshipProperties certificationProperties) - { - this.certificationProperties = certificationProperties; - } - - - /** - * Return the element header associated with end 2 of the relationship (certification type). - * - * @return element stub object - */ - public ElementHeader getCertificationTypeHeader() - { - return certificationTypeHeader; - } - - - /** - * Set up the element header associated with end 2 of the relationship (certification type). - * - * @param certificationTypeHeader element stub object - */ - public void setCertificationTypeHeader(ElementHeader certificationTypeHeader) - { - this.certificationTypeHeader = certificationTypeHeader; - } - - - /** - * Return the properties of the certification type. - * - * @return properties - */ - public CertificationProperties getCertificationTypeProperties() - { - return certificationTypeProperties; - } - - - /** - * Set up the properties of the certification type. - * - * @param certificationTypeProperties properties - */ - public void setCertificationTypeProperties(CertificationProperties certificationTypeProperties) - { - this.certificationTypeProperties = certificationTypeProperties; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "CertificationElement{" + - "certificationHeader=" + certificationHeader + - ", relationshipProperties=" + certificationProperties + - ", certificationTypeHeader=" + certificationTypeHeader + - ", certificationTypeProperties=" + certificationTypeProperties + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (! (objectToCompare instanceof CertificationElement)) - { - return false; - } - CertificationElement that = (CertificationElement) objectToCompare; - return Objects.equals(certificationHeader, that.certificationHeader) && - Objects.equals(certificationProperties, that.certificationProperties) && - Objects.equals(certificationTypeHeader, that.certificationTypeHeader) && - Objects.equals(certificationTypeProperties, that.certificationTypeProperties); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), certificationHeader, certificationProperties, certificationTypeHeader, certificationTypeProperties); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/CertificationTypeElement.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/CertificationTypeElement.java deleted file mode 100644 index 68c07596c3c..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/CertificationTypeElement.java +++ /dev/null @@ -1,175 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.governanceprogram.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.CertificationTypeProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * CertificationTypeElement contains the properties and header for a certification type retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class CertificationTypeElement implements MetadataElement -{ - private ElementHeader elementHeader = null; - private CertificationTypeProperties properties = null; - private RelatedElement relatedElement = null; - - - /** - * Default constructor - */ - public CertificationTypeElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public CertificationTypeElement(CertificationTypeElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - properties = template.getProperties(); - relatedElement = template.getRelatedElement(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - @Override - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the properties of the certification type. - * - * @return properties - */ - public CertificationTypeProperties getProperties() - { - return properties; - } - - - /** - * Set up the certification type properties. - * - * @param properties properties - */ - public void setProperties(CertificationTypeProperties properties) - { - this.properties = properties; - } - - - /** - * Return details of the relationship used to retrieve this element. - * Will be null if the element was retrieved directly rather than via a relationship. - * - * @return list of element stubs - */ - public RelatedElement getRelatedElement() - { - return relatedElement; - } - - - /** - * Set up details of the relationship used to retrieve this element. - * Will be null if the element was retrieved directly rather than via a relationship. - * - * @param relatedElement relationship details - */ - public void setRelatedElement(RelatedElement relatedElement) - { - this.relatedElement = relatedElement; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "CertificationTypeElement{" + - "elementHeader=" + elementHeader + - ", properties=" + properties + - ", relatedElement=" + relatedElement + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - CertificationTypeElement that = (CertificationTypeElement) objectToCompare; - return Objects.equals(elementHeader, that.elementHeader) && - Objects.equals(properties, that.properties) && - Objects.equals(relatedElement, that.relatedElement); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementHeader, properties, relatedElement); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/ContactMethodElement.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/ContactMethodElement.java deleted file mode 100644 index d951a0a6af3..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/ContactMethodElement.java +++ /dev/null @@ -1,147 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.governanceprogram.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.ContactMethodProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ContactMethodElement contains the properties and header for a contract method retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ContactMethodElement implements MetadataElement -{ - private ElementHeader elementHeader = null; - private ContactMethodProperties properties = null; - - - /** - * Default constructor - */ - public ContactMethodElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ContactMethodElement(ContactMethodElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - properties = template.getProperties(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - @Override - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the properties of the contact method. - * - * @return properties - */ - public ContactMethodProperties getProperties() - { - return properties; - } - - - /** - * Set up the contract method properties. - * - * @param properties properties - */ - public void setProperties(ContactMethodProperties properties) - { - this.properties = properties; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ContactMethodElement{" + - "elementHeader=" + elementHeader + - ", properties=" + properties + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ContactMethodElement that = (ContactMethodElement) objectToCompare; - return Objects.equals(elementHeader, that.elementHeader) && - Objects.equals(properties, that.properties); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementHeader, properties); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/ExternalReferenceElement.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/ExternalReferenceElement.java deleted file mode 100644 index b7da5610e1e..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/ExternalReferenceElement.java +++ /dev/null @@ -1,141 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.metadataelements; - -import com.fasterxml.jackson.annotation.*; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.ExternalReferenceProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - - -/** - * ExternalReferenceElement stores information about a link to an external resource that is relevant to this element. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ExternalReferenceElement implements MetadataElement -{ - private ElementHeader elementHeader = null; - private ExternalReferenceProperties properties = null; - - /** - * Default Constructor - */ - public ExternalReferenceElement() - { - } - - - /** - * Copy/clone Constructor - the resulting object. - * - * @param template object being copied - */ - public ExternalReferenceElement(ExternalReferenceElement template) - { - if (template != null) - { - this.elementHeader = template.getElementHeader(); - this.properties = template.getProperties(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the link to external documentation that are relevant to this element. - * - * @return list of external references - */ - public ExternalReferenceProperties getProperties() - { - return properties; - } - - - /** - * Set up the list of links to external documentation that are relevant to this element. - * - * @param properties of external references - */ - public void setProperties(ExternalReferenceProperties properties) - { - this.properties = properties; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "ExternalReferenceElement{" + - "elementHeader=" + elementHeader + - ", properties=" + properties + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ExternalReferenceElement that = (ExternalReferenceElement) objectToCompare; - return Objects.equals(elementHeader, that.elementHeader) && - Objects.equals(properties, that.properties); - } - - - /** - * Hash of properties - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), properties, elementHeader); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/GovernanceDefinitionElement.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/GovernanceDefinitionElement.java deleted file mode 100644 index d8ed98d3bde..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/GovernanceDefinitionElement.java +++ /dev/null @@ -1,182 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.governanceprogram.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceDefinitionProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -import org.odpi.openmetadata.accessservices.governanceprogram.properties.LicenseTypeProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.SecurityGroupProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * GovernanceDefinitionElement is the superclass used to return the common properties of a governance definition stored in the - * open metadata repositories. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonSubTypes( - { - @JsonSubTypes.Type(value = GovernanceDefinitionGraph.class, name = "GovernanceDefinitionGraph") - }) -public class GovernanceDefinitionElement implements MetadataElement -{ - private ElementHeader elementHeader = null; - private GovernanceDefinitionProperties properties = null; - private RelatedElement relatedElement = null; - - - /** - * Default constructor - */ - public GovernanceDefinitionElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public GovernanceDefinitionElement(GovernanceDefinitionElement template) - { - if (template != null) - { - this.elementHeader = template.getElementHeader(); - this.properties = template.getProperties(); - relatedElement = template.getRelatedElement(); - } - } - - - /** - * Return details of the relationship used to retrieve this element. - * Will be null if the element was retrieved directly rather than via a relationship. - * - * @return list of element stubs - */ - public RelatedElement getRelatedElement() - { - return relatedElement; - } - - - /** - * Set up details of the relationship used to retrieve this element. - * Will be null if the element was retrieved directly rather than via a relationship. - * - * @param relatedElement relationship details - */ - public void setRelatedElement(RelatedElement relatedElement) - { - this.relatedElement = relatedElement; - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the requested governance definition. - * - * @return properties bean - */ - public GovernanceDefinitionProperties getProperties() - { - return properties; - } - - - /** - * Set up the requested governance definition. - * - * @param properties properties bean - */ - public void setProperties(GovernanceDefinitionProperties properties) - { - this.properties = properties; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "GovernanceDefinitionElement{" + - "elementHeader=" + elementHeader + - ", properties=" + properties + - ", relatedElement=" + relatedElement + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - GovernanceDefinitionElement that = (GovernanceDefinitionElement) objectToCompare; - return Objects.equals(elementHeader, that.elementHeader) && - Objects.equals(properties, that.properties) && - Objects.equals(relatedElement, that.relatedElement); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementHeader, properties, relatedElement); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/LicenseElement.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/LicenseElement.java deleted file mode 100644 index 2a31523fbe3..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/LicenseElement.java +++ /dev/null @@ -1,198 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.governanceprogram.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.LicenseProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.RelationshipProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * LicenseElement contains the properties and header for a license for an element. - * It includes the details of the specific element's license and details of the license type. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class LicenseElement -{ - private ElementHeader licenseHeader = null; - private RelationshipProperties licenseProperties = null; - private ElementHeader licenseTypeHeader = null; - private LicenseProperties licenseTypeProperties = null; - - /** - * Default constructor - */ - public LicenseElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public LicenseElement(LicenseElement template) - { - if (template != null) - { - licenseHeader = template.getLicenseHeader(); - licenseProperties = template.getLicenseProperties(); - licenseTypeHeader = template.getLicenseTypeHeader(); - licenseTypeProperties = template.getLicenseTypeProperties(); - } - } - - - /** - * Return the element header associated with the relationship. - * - * @return element header object - */ - public ElementHeader getLicenseHeader() - { - return licenseHeader; - } - - - /** - * Set up the element header associated with the relationship. - * - * @param licenseHeader element header object - */ - public void setLicenseHeader(ElementHeader licenseHeader) - { - this.licenseHeader = licenseHeader; - } - - - /** - * Return details of the relationship - * - * @return relationship properties - */ - public RelationshipProperties getLicenseProperties() - { - return licenseProperties; - } - - - /** - * Set up relationship properties - * - * @param licenseProperties relationship properties - */ - public void setLicenseProperties(RelationshipProperties licenseProperties) - { - this.licenseProperties = licenseProperties; - } - - - /** - * Return the element header associated with end 2 of the relationship (license type). - * - * @return element stub object - */ - public ElementHeader getLicenseTypeHeader() - { - return licenseTypeHeader; - } - - - /** - * Set up the element header associated with end 2 of the relationship (license type). - * - * @param licenseTypeHeader element stub object - */ - public void setLicenseTypeHeader(ElementHeader licenseTypeHeader) - { - this.licenseTypeHeader = licenseTypeHeader; - } - - - /** - * Return the properties of the license type. - * - * @return properties - */ - public LicenseProperties getLicenseTypeProperties() - { - return licenseTypeProperties; - } - - - /** - * Set up the properties of the license type. - * - * @param licenseTypeProperties properties - */ - public void setLicenseTypeProperties(LicenseProperties licenseTypeProperties) - { - this.licenseTypeProperties = licenseTypeProperties; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "LicenseElement{" + - "licenseHeader=" + licenseHeader + - ", relationshipProperties=" + licenseProperties + - ", licenseTypeHeader=" + licenseTypeHeader + - ", licenseTypeProperties=" + licenseTypeProperties + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (! (objectToCompare instanceof LicenseElement)) - { - return false; - } - LicenseElement that = (LicenseElement) objectToCompare; - return Objects.equals(licenseHeader, that.licenseHeader) && - Objects.equals(licenseProperties, that.licenseProperties) && - Objects.equals(licenseTypeHeader, that.licenseTypeHeader) && - Objects.equals(licenseTypeProperties, that.licenseTypeProperties); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), licenseHeader, licenseProperties, licenseTypeHeader, licenseTypeProperties); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/LicenseTypeElement.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/LicenseTypeElement.java deleted file mode 100644 index 837ba3f105b..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/LicenseTypeElement.java +++ /dev/null @@ -1,175 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.governanceprogram.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.LicenseTypeProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * LicenseTypeElement contains the properties and header for a licence type retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class LicenseTypeElement implements MetadataElement -{ - private ElementHeader elementHeader = null; - private LicenseTypeProperties properties = null; - private RelatedElement relatedElement = null; - - - /** - * Default constructor - */ - public LicenseTypeElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public LicenseTypeElement(LicenseTypeElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - properties = template.getProperties(); - relatedElement = template.getRelatedElement(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - @Override - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the properties of the license type. - * - * @return properties - */ - public LicenseTypeProperties getProperties() - { - return properties; - } - - - /** - * Set up the license type properties. - * - * @param properties properties - */ - public void setProperties(LicenseTypeProperties properties) - { - this.properties = properties; - } - - - /** - * Return details of the relationship used to retrieve this element. - * Will be null if the element was retrieved directly rather than via a relationship. - * - * @return list of element stubs - */ - public RelatedElement getRelatedElement() - { - return relatedElement; - } - - - /** - * Set up details of the relationship used to retrieve this element. - * Will be null if the element was retrieved directly rather than via a relationship. - * - * @param relatedElement relationship details - */ - public void setRelatedElement(RelatedElement relatedElement) - { - this.relatedElement = relatedElement; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "LicenseTypeElement{" + - "elementHeader=" + elementHeader + - ", properties=" + properties + - ", relatedElement=" + relatedElement + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - LicenseTypeElement that = (LicenseTypeElement) objectToCompare; - return Objects.equals(elementHeader, that.elementHeader) && - Objects.equals(properties, that.properties) && - Objects.equals(relatedElement, that.relatedElement); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementHeader, properties, relatedElement); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/MetadataElement.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/MetadataElement.java deleted file mode 100644 index 8fddaab0767..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/MetadataElement.java +++ /dev/null @@ -1,27 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.governanceprogram.metadataelements; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * MetadataElement is the common interface for all metadata elements. It adds the header information that is stored with the properties. - * This includes detains of its unique identifier, type and origin. - */ -public interface MetadataElement -{ - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - ElementHeader getElementHeader(); - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - void setElementHeader(ElementHeader elementHeader); -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/PersonRoleElement.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/PersonRoleElement.java deleted file mode 100644 index 1b825634e68..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/PersonRoleElement.java +++ /dev/null @@ -1,145 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.governanceprogram.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.PersonRoleProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * PersonRoleElement is the bean used to return a person role description. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class PersonRoleElement implements MetadataElement -{ - private ElementHeader elementHeader = null; - private PersonRoleProperties role = null; - - - /** - * Default constructor - */ - public PersonRoleElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public PersonRoleElement(PersonRoleElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - role = template.getRole(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the description of the governance officer role. - * - * @return role description - */ - public PersonRoleProperties getRole() - { - return role; - } - - - /** - * Set up the description of the governance officer role. - * - * @param role role description - */ - public void setRole(PersonRoleProperties role) - { - this.role = role; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "PersonRoleElement{" + - "elementHeader=" + elementHeader + - ", role=" + role + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - PersonRoleElement that = (PersonRoleElement) objectToCompare; - return Objects.equals(elementHeader, that.elementHeader) && - Objects.equals(role, that.role); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementHeader, role); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/PersonalProfileElement.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/PersonalProfileElement.java deleted file mode 100644 index c0ffc81f636..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/PersonalProfileElement.java +++ /dev/null @@ -1,147 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.PersonalProfileProperties; - -import java.util.*; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - - -/** - * The PersonalProfileElement describes an individual who has (or will be) appointed to one of the - * governance roles defined in the governance program. Information about the personal profile is stored - * as a Person entity. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class PersonalProfileElement implements MetadataElement -{ - private ElementHeader elementHeader = null; - private PersonalProfileProperties profileProperties = null; - - - - /** - * Default Constructor - */ - public PersonalProfileElement() - { - } - - - /** - * Copy/clone Constructor - the resulting object. - * - * @param template object being copied - */ - public PersonalProfileElement(PersonalProfileElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - profileProperties = template.getProfileProperties(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the properties of the profile. - * - * @return properties - */ - public PersonalProfileProperties getProfileProperties() - { - return profileProperties; - } - - - /** - * Set up the profile properties. - * - * @param profileProperties properties - */ - public void setProfileProperties(PersonalProfileProperties profileProperties) - { - this.profileProperties = profileProperties; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "PersonalProfileElement{" + - "elementHeader=" + elementHeader + - ", profileProperties=" + profileProperties + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - PersonalProfileElement that = (PersonalProfileElement) objectToCompare; - return Objects.equals(elementHeader, that.elementHeader) && - Objects.equals(profileProperties, that.profileProperties); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(elementHeader, profileProperties); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/ProfileElement.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/ProfileElement.java deleted file mode 100644 index 2efa36c74a2..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/ProfileElement.java +++ /dev/null @@ -1,221 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.governanceprogram.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.ActorProfileProperties; - -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * ProfileElement contains the properties and header for a profile of a person, team, engine or organization - * retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ProfileElement implements MetadataElement -{ - private ElementHeader elementHeader = null; - private ActorProfileProperties profileProperties = null; - private List userIdentities = null; - private List contactMethods = null; - - - /** - * Default constructor - */ - public ProfileElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ProfileElement(ProfileElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - profileProperties = template.getProfileProperties(); - userIdentities = template.getUserIdentities(); - contactMethods = template.getContactMethods(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - @Override - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the properties of the profile. - * - * @return properties - */ - public ActorProfileProperties getProfileProperties() - { - return profileProperties; - } - - - /** - * Set up the profile properties. - * - * @param profileProperties properties - */ - public void setProfileProperties(ActorProfileProperties profileProperties) - { - this.profileProperties = profileProperties; - } - - - /** - * Return the list of user identities associated with the personal profile. - * - * @return list or null - */ - public List getUserIdentities() - { - if (userIdentities == null) - { - return null; - } - else if (userIdentities.isEmpty()) - { - return null; - } - - return userIdentities; - } - - - /** - * Set up the list of user identities associated with the personal profile. - * - * @param userIdentities list or null - */ - public void setUserIdentities(List userIdentities) - { - this.userIdentities = userIdentities; - } - - - /** - * Return the list of contact methods for the individual. - * - * @return list or null - */ - public List getContactMethods() - { - if (contactMethods == null) - { - return null; - } - - if (contactMethods.isEmpty()) - { - return null; - } - - return contactMethods; - } - - - /** - * Set up the list of contact methods for the individual. - * - * @param contactMethods list or null - */ - public void setContactMethods(List contactMethods) - { - this.contactMethods = contactMethods; - } - - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ProfileElement{" + - "elementHeader=" + elementHeader + - ", profileProperties=" + profileProperties + - ", userIdentities=" + userIdentities + - ", contactMethods=" + contactMethods + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ProfileElement that = (ProfileElement) objectToCompare; - return Objects.equals(elementHeader, that.elementHeader) && - Objects.equals(profileProperties, that.profileProperties) && - Objects.equals(userIdentities, that.userIdentities) && - Objects.equals(contactMethods, that.contactMethods); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(elementHeader, profileProperties, userIdentities, contactMethods); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/RelatedElement.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/RelatedElement.java deleted file mode 100644 index e6644fd1dca..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/RelatedElement.java +++ /dev/null @@ -1,172 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.governanceprogram.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.RelationshipProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * RelatedElement contains the properties and header for a relationship retrieved from the metadata repository along with the stub - * of the related element. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class RelatedElement -{ - private ElementHeader relationshipHeader = null; - private RelationshipProperties relationshipProperties = null; - private ElementStub relatedElement = null; - - /** - * Default constructor - */ - public RelatedElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public RelatedElement(RelatedElement template) - { - if (template != null) - { - relationshipHeader = template.getRelationshipHeader(); - relationshipProperties = template.getRelationshipProperties(); - relatedElement = template.getRelatedElement(); - } - } - - - /** - * Return the element header associated with the relationship. - * - * @return element header object - */ - public ElementHeader getRelationshipHeader() - { - return relationshipHeader; - } - - - /** - * Set up the element header associated with the relationship. - * - * @param relationshipHeader element header object - */ - public void setRelationshipHeader(ElementHeader relationshipHeader) - { - this.relationshipHeader = relationshipHeader; - } - - - /** - * Return details of the relationship - * - * @return relationship properties - */ - public RelationshipProperties getRelationshipProperties() - { - return relationshipProperties; - } - - - /** - * Set up relationship properties - * - * @param relationshipProperties relationship properties - */ - public void setRelationshipProperties(RelationshipProperties relationshipProperties) - { - this.relationshipProperties = relationshipProperties; - } - - - /** - * Return the element header associated with end 1 of the relationship. - * - * @return element stub object - */ - public ElementStub getRelatedElement() - { - return relatedElement; - } - - - /** - * Set up the element header associated with end 1 of the relationship. - * - * @param relatedElement element stub object - */ - public void setRelatedElement(ElementStub relatedElement) - { - this.relatedElement = relatedElement; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "RelatedElement{" + - "relationshipHeader=" + relationshipHeader + - ", relationshipProperties=" + relationshipProperties + - ", relatedElement=" + relatedElement + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - RelatedElement that = (RelatedElement) objectToCompare; - return Objects.equals(getRelationshipHeader(), that.getRelationshipHeader()) && - Objects.equals(getRelationshipProperties(), that.getRelationshipProperties()) && - Objects.equals(getRelatedElement(), that.getRelatedElement()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), relationshipHeader, relationshipProperties, relatedElement); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/SubjectAreaElement.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/SubjectAreaElement.java deleted file mode 100644 index 1a73f1388bb..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/SubjectAreaElement.java +++ /dev/null @@ -1,146 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.governanceprogram.metadataelements; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.SubjectAreaProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * SubjectAreaElement is the bean used to return a subject area definition stored in the open metadata repositories. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class SubjectAreaElement implements MetadataElement -{ - private ElementHeader elementHeader = null; - private SubjectAreaProperties properties = null; - - - /** - * Default constructor - */ - public SubjectAreaElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public SubjectAreaElement(SubjectAreaElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - properties = template.getProperties(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the properties of the subject area. - * - * @return properties bean - */ - public SubjectAreaProperties getProperties() - { - return properties; - } - - - /** - * Set up the properties of the subject area. - * - * @param properties properties bean - */ - public void setProperties(SubjectAreaProperties properties) - { - this.properties = properties; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "SubjectAreaElement{" + - "elementHeader=" + elementHeader + - ", properties=" + properties + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - SubjectAreaElement that = (SubjectAreaElement) objectToCompare; - return Objects.equals(elementHeader, that.elementHeader) && - Objects.equals(properties, that.properties); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementHeader, properties); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/UserIdentityElement.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/UserIdentityElement.java deleted file mode 100644 index a8b6438322d..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/UserIdentityElement.java +++ /dev/null @@ -1,147 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.governanceprogram.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.UserIdentityProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * UserIdentityElement contains the properties and header for a user identity retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class UserIdentityElement implements MetadataElement -{ - private ElementHeader elementHeader = null; - private UserIdentityProperties properties = null; - - - /** - * Default constructor - */ - public UserIdentityElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public UserIdentityElement(UserIdentityElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - properties = template.getProperties(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - @Override - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the properties of the userId. - * - * @return properties - */ - public UserIdentityProperties getProperties() - { - return properties; - } - - - /** - * Set up the userId properties. - * - * @param properties properties - */ - public void setProperties(UserIdentityProperties properties) - { - this.properties = properties; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "UserIdentityElement{" + - "elementHeader=" + elementHeader + - ", properties=" + properties + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - UserIdentityElement that = (UserIdentityElement) objectToCompare; - return Objects.equals(elementHeader, that.elementHeader) && - Objects.equals(properties, that.properties); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementHeader, properties); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/package-info.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/package-info.java deleted file mode 100644 index fc25f4baf2e..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/package-info.java +++ /dev/null @@ -1,6 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -/** - * The metadata elements describe metadata retrieved from the open metadata repositories. - */ -package org.odpi.openmetadata.accessservices.governanceprogram.metadataelements; diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/ActorProfileProperties.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/ActorProfileProperties.java deleted file mode 100644 index 93170e940d0..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/ActorProfileProperties.java +++ /dev/null @@ -1,160 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.properties; - -import com.fasterxml.jackson.annotation.*; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * The ActorProfileProperties describes the common properties of a Personal Profile, IT Profile and Team Profile. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes( - { - @JsonSubTypes.Type(value = ITProfileProperties.class, name = "ITProfileProperties"), - @JsonSubTypes.Type(value = PersonalProfileProperties.class, name = "PersonalProfileProperties"), - @JsonSubTypes.Type(value = TeamProfileProperties.class, name = "TeamProfileProperties") - }) -public class ActorProfileProperties extends ReferenceableProperties -{ - private String knownName = null; - private String description = null; - - - /** - * Default Constructor - */ - public ActorProfileProperties() - { - super(); - } - - - /** - * Copy/clone Constructor. - * - * @param template object being copied - */ - public ActorProfileProperties(ActorProfileProperties template) - { - super (template); - - if (template != null) - { - this.knownName = template.getKnownName(); - this.description = template.getDescription(); - } - } - - - /** - * Return the name that the person/automated agent/team is known as. - * - * @return string name - */ - public String getKnownName() - { - return knownName; - } - - - /** - * Set up the name that the person/automated agent/team is known as. - * - * @param knownName string name - */ - public void setKnownName(String knownName) - { - this.knownName = knownName; - } - - - /** - * Return description of the person/automated agent/team. - * - * @return text - */ - public String getDescription() - { - return description; - } - - - /** - * Set up description of the person/automated agent/team. - * - * @param description text - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "ActorProfileProperties{" + - "knownName='" + knownName + '\'' + - ", description='" + description + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ActorProfileProperties that = (ActorProfileProperties) objectToCompare; - return Objects.equals(knownName, that.knownName) && - Objects.equals(description, that.description); - } - - - /** - * Just use the GUID for the hash code as it should be unique. - * - * @return int code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), knownName, description); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/AssetProperties.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/AssetProperties.java deleted file mode 100644 index 5b79396ad84..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/AssetProperties.java +++ /dev/null @@ -1,193 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.governanceprogram.properties; - -import com.fasterxml.jackson.annotation.*; - -import java.util.*; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * AssetProperties is a java bean used to describe assets managed by the governance program. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class AssetProperties extends SupplementaryProperties -{ - private String resourceName = null; - private String versionIdentifier = null; - private String resourceDescription = null; - - /** - * Default constructor - */ - public AssetProperties() - { - } - - - /** - * Copy/clone constructor. Note, this is a deep copy - * - * @param template object to copy - */ - public AssetProperties(AssetProperties template) - { - super(template); - - if (template != null) - { - resourceName = template.getDisplayName(); - versionIdentifier = template.getVersionIdentifier(); - resourceDescription = template.getResourceDescription(); - } - } - - - /** - * Returns the name property for the resource as it is known by the supporting technology. - * If no technical name is available then null is returned. - * - * @return String name - */ - public String getResourceName() - { - return resourceName; - } - - - /** - * Set up the stored technical name property for the resource. - * - * @param resourceName String name - */ - public void setResourceName(String resourceName) - { - this.resourceName = resourceName; - } - - - /** - * Set up the version identifier of the resource. - * - * @return string version name - */ - public String getVersionIdentifier() - { - return versionIdentifier; - } - - - /** - * Set up the version identifier of the resource. - * - * @param versionIdentifier string version name - */ - public void setVersionIdentifier(String versionIdentifier) - { - this.versionIdentifier = versionIdentifier; - } - - - - /** - * Returns the stored technical description property for the asset. - * If no description is provided then null is returned. - * - * @return description String text - */ - public String getResourceDescription() - { - return resourceDescription; - } - - - /** - * Set up the stored technical description property associated with the asset. - * - * @param resourceDescription String text - */ - public void setResourceDescription(String resourceDescription) - { - this.resourceDescription = resourceDescription; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "AssetProperties{" + - "resourceName='" + resourceName + '\'' + - ", versionIdentifier='" + versionIdentifier + '\'' + - ", resourceDescription='" + resourceDescription + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - ", displayName='" + getDisplayName() + '\'' + - ", summary='" + getSummary() + '\'' + - ", description='" + getDescription() + '\'' + - ", abbreviation='" + getAbbreviation() + '\'' + - ", usage='" + getUsage() + '\'' + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (! (objectToCompare instanceof AssetProperties)) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - - AssetProperties that = (AssetProperties) objectToCompare; - - if (resourceName != null ? ! resourceName.equals(that.resourceName) : that.resourceName != null) - { - return false; - } - if (versionIdentifier != null ? ! versionIdentifier.equals(that.versionIdentifier) : that.versionIdentifier != null) - { - return false; - } - return resourceDescription != null ? resourceDescription.equals(that.resourceDescription) : that.resourceDescription == null; - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), resourceName, versionIdentifier, resourceDescription); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/AssignmentScopeProperties.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/AssignmentScopeProperties.java deleted file mode 100644 index 4007a1e888f..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/AssignmentScopeProperties.java +++ /dev/null @@ -1,150 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.properties; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * AssignmentScopeProperties provides a details of the scope of work/influence expected by the assigned actor(s). - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class AssignmentScopeProperties extends RelationshipProperties -{ - String assignmentType = null; - String description = null; - - /** - * Default constructor - */ - public AssignmentScopeProperties() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public AssignmentScopeProperties(AssignmentScopeProperties template) - { - super(template); - - if (template != null) - { - this.assignmentType = template.getAssignmentType(); - this.description = template.getDescription(); - } - } - - - /** - * Return the expectations with respect to the scope. - * - * @return type of assignment - */ - public String getAssignmentType() - { - return assignmentType; - } - - - /** - * Set up the expectations with respect to the scope. - * - * @param assignmentType type of assignment - */ - public void setAssignmentType(String assignmentType) - { - this.assignmentType = assignmentType; - } - - - /** - * Return additional descriptive text. - * - * @return text - */ - public String getDescription() - { - return description; - } - - - /** - * Set up additional descriptive text. - * - * @param description text - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "AssignmentScopeProperties{" + - "assignmentType='" + assignmentType + '\'' + - ", description='" + description + '\'' + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - AssignmentScopeProperties that = (AssignmentScopeProperties) objectToCompare; - return Objects.equals(assignmentType, that.assignmentType) && Objects.equals(description, that.description); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), assignmentType, description); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/CertificationProperties.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/CertificationProperties.java deleted file mode 100644 index 542dc6952d4..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/CertificationProperties.java +++ /dev/null @@ -1,463 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Date; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * CertificationProperties describe the details of a certificate that shows that an element is certified with a particular certification type. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class CertificationProperties extends RelationshipProperties -{ - private String certificateId = null; - private Date startDate = null; - private Date endDate = null; - private String conditions = null; - private String certifiedBy = null; - private String certifiedByTypeName = null; - private String certifiedByPropertyName = null; - private String custodian = null; - private String custodianTypeName = null; - private String custodianPropertyName = null; - private String recipient = null; - private String recipientTypeName = null; - private String recipientPropertyName = null; - private String notes = null; - - - /** - * Default Constructor - */ - public CertificationProperties() - { - } - - - /** - * Copy/clone Constructor - the resulting object. - * - * @param template object being copied - */ - public CertificationProperties(CertificationProperties template) - { - super(template); - - if (template != null) - { - this.certificateId = template.getCertificateId(); - this.startDate = template.getStartDate(); - this.endDate = template.getEndDate(); - this.conditions = template.getConditions(); - this.certifiedBy = template.getCertifiedBy(); - this.certifiedByTypeName = template.getCertifiedByTypeName(); - this.certifiedByPropertyName = template.getCertifiedByPropertyName(); - this.custodian = template.getCustodian(); - this.custodianTypeName = template.getCustodianTypeName(); - this.custodianPropertyName = template.getCustodianPropertyName(); - this.recipient = template.getRecipient(); - this.recipientTypeName = template.getRecipientTypeName(); - this.recipientPropertyName = template.getRecipientPropertyName(); - this.notes = template.getNotes(); - } - } - - - /** - * Return the unique identifier of the certificate. This value comes from the certificate authority. - * - * @return string - */ - public String getCertificateId() - { - return certificateId; - } - - - /** - * Set up the unique identifier of the certificate. This value comes from the certificate authority. - * - * @param certificateId string - */ - public void setCertificateId(String certificateId) - { - this.certificateId = certificateId; - } - - - /** - * Return the date/time that this certificate is valid from. - * - * @return date/time - */ - public Date getStartDate() - { - return startDate; - } - - - /** - * Set up the date/time that this certificate is valid from. - * - * @param startDate date/time - */ - public void setStartDate(Date startDate) - { - this.startDate = startDate; - } - - - /** - * Return the date/time that this certificate is no longer valid. - * - * @return date/time - */ - public Date getEndDate() - { - return endDate; - } - - - /** - * Set up the date/time that this certificate is no longer valid. - * - * @param endDate date/time - */ - public void setEndDate(Date endDate) - { - this.endDate = endDate; - } - - - /** - * Return any conditions or endorsements to this certificate. - * - * @return string text - */ - public String getConditions() - { - return conditions; - } - - - /** - * Set up any conditions or endorsements to this certificate. - * - * @param conditions string text - */ - public void setConditions(String conditions) - { - this.conditions = conditions; - } - - - /** - * Return the name of the person in the certification authority that granted this certificate. - * - * @return string name/id - */ - public String getCertifiedBy() - { - return certifiedBy; - } - - - /** - * Set up the name of the person in the certification authority that granted this certificate. - * - * @param certifiedBy string name/id - */ - public void setCertifiedBy(String certifiedBy) - { - this.certifiedBy = certifiedBy; - } - - - /** - * Return the name of the type of the element supplying the certifiedBy property. - * - * @return string type name - */ - public String getCertifiedByTypeName() - { - return certifiedByTypeName; - } - - - /** - * Set up the name of the type of the element supplying the certifiedBy property. - * - * @param certifiedByTypeName string type name - */ - public void setCertifiedByTypeName(String certifiedByTypeName) - { - this.certifiedByTypeName = certifiedByTypeName; - } - - - /** - * Return the name of the property from the element supplying the certifiedBy property. - * - * @return string property name - */ - public String getCertifiedByPropertyName() - { - return certifiedByPropertyName; - } - - - /** - * Set up the name of the property from the element supplying the certifiedBy property. - * - * @param certifiedByPropertyName string property name - */ - public void setCertifiedByPropertyName(String certifiedByPropertyName) - { - this.certifiedByPropertyName = certifiedByPropertyName; - } - - - - /** - * Return the person/team responsible for ensuring that the certificate conditions are adhered to. - * - * @return string name/id - */ - public String getCustodian() - { - return custodian; - } - - - /** - * Set up the person/team responsible for ensuring that the certificate conditions are adhered to. - * - * @param custodian string name/id - */ - public void setCustodian(String custodian) - { - this.custodian = custodian; - } - - - /** - * Return the name of the type of the element supplying the custodian property. - * - * @return string type name - */ - public String getCustodianTypeName() - { - return custodianTypeName; - } - - - /** - * Set up the name of the type of the element supplying the custodian property. - * - * @param custodianTypeName string type name - */ - public void setCustodianTypeName(String custodianTypeName) - { - this.custodianTypeName = custodianTypeName; - } - - - /** - * Return the name of the property from the element supplying the custodian property. - * - * @return string property name - */ - public String getCustodianPropertyName() - { - return custodianPropertyName; - } - - - /** - * Set up the name of the property from the element supplying the custodian property. - * - * @param custodianPropertyName string property name - */ - public void setCustodianPropertyName(String custodianPropertyName) - { - this.custodianPropertyName = custodianPropertyName; - } - - - /** - * Return the person/team that received the certification. - * - * @return string name/id - */ - public String getRecipient() - { - return recipient; - } - - - /** - * Set up the person/team that received the certification. - * - * @param recipient string name/id - */ - public void setRecipient(String recipient) - { - this.recipient = recipient; - } - - - /** - * Return the name of the type of the element supplying the recipient property. - * - * @return string type name - */ - public String getRecipientTypeName() - { - return recipientTypeName; - } - - - /** - * Set up the name of the type of the element supplying the recipient property. - * - * @param recipientTypeName string type name - */ - public void setRecipientTypeName(String recipientTypeName) - { - this.recipientTypeName = recipientTypeName; - } - - - /** - * Return the name of the property from the element supplying the recipient property. - * - * @return string property name - */ - public String getRecipientPropertyName() - { - return recipientPropertyName; - } - - - /** - * Set up the name of the property from the element supplying the recipient property. - * - * @param recipientPropertyName string property name - */ - public void setRecipientPropertyName(String recipientPropertyName) - { - this.recipientPropertyName = recipientPropertyName; - } - - - /** - * Return any notes associated with the certificate. - * - * @return string text - */ - public String getNotes() - { - return notes; - } - - - /** - * Set up any notes associated with the certificate. - * - * @param notes string text - */ - public void setNotes(String notes) - { - this.notes = notes; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "CertificationProperties{" + - "certificateId='" + certificateId + '\'' + - ", startDate=" + startDate + - ", endDate=" + endDate + - ", conditions='" + conditions + '\'' + - ", certifiedBy='" + certifiedBy + '\'' + - ", certifiedByTypeName='" + certifiedByTypeName + '\'' + - ", certifiedByPropertyName='" + certifiedByPropertyName + '\'' + - ", custodian='" + custodian + '\'' + - ", custodianTypeName='" + custodianTypeName + '\'' + - ", custodianPropertyName='" + custodianPropertyName + '\'' + - ", recipient='" + recipient + '\'' + - ", recipientTypeName='" + recipientTypeName + '\'' + - ", recipientPropertyName='" + recipientPropertyName + '\'' + - ", notes='" + notes + '\'' + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (! (objectToCompare instanceof CertificationProperties)) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - CertificationProperties that = (CertificationProperties) objectToCompare; - return Objects.equals(certificateId, that.certificateId) && Objects.equals(startDate, - that.startDate) && Objects.equals( - endDate, that.endDate) && Objects.equals(conditions, that.conditions) && Objects.equals(certifiedBy, - that.certifiedBy) && Objects.equals( - certifiedByTypeName, that.certifiedByTypeName) && Objects.equals(certifiedByPropertyName, - that.certifiedByPropertyName) && Objects.equals( - custodian, that.custodian) && Objects.equals(custodianTypeName, that.custodianTypeName) && Objects.equals( - custodianPropertyName, that.custodianPropertyName) && Objects.equals(recipient, that.recipient) && Objects.equals( - recipientTypeName, that.recipientTypeName) && Objects.equals(recipientPropertyName, - that.recipientPropertyName) && Objects.equals(notes, - that.notes); - } - - - /** - * Just use the GUID for the hash code as it should be unique. - * - * @return int code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), certificateId, startDate, endDate, conditions, certifiedBy, certifiedByTypeName, - certifiedByPropertyName, - custodian, custodianTypeName, custodianPropertyName, recipient, recipientTypeName, recipientPropertyName, notes); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/CertificationTypeProperties.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/CertificationTypeProperties.java deleted file mode 100644 index 7b2baab41f2..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/CertificationTypeProperties.java +++ /dev/null @@ -1,137 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * Many regulations and industry bodies define certifications that can confirm a level of support, capability - * or competence in an aspect of a digital organization's operation. Having certifications may be - * necessary to operating legally or may be a business advantage. The certifications awarded can be captured - * in the metadata repository to enable both use and management of the certification process. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class CertificationTypeProperties extends GovernanceDefinitionProperties -{ - private String details = null; - - - /** - * Default Constructor - */ - public CertificationTypeProperties() - { - } - - - /** - * Copy/Clone Constructor - * - * @param template object to copy - */ - public CertificationTypeProperties(CertificationTypeProperties template) - { - super(template); - - if (template != null) - { - this.details = template.getDetails(); - } - } - - - /** - * Return the specific details of the certification. - * - * @return string description - */ - public String getDetails() - { - return details; - } - - - /** - * Set up the specific details of the certification. - * - * @param details string description - */ - public void setDetails(String details) - { - this.details = details; - } - - - /** - * JSON-style toString - * - * @return string containing the properties and their values - */ - @Override - public String toString() - { - return "CertificationTypeProperties{" + - "details='" + details + '\'' + - ", typeName='" + getTypeName() + '\'' + - ", documentIdentifier='" + getDocumentIdentifier() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", extendedProperties=" + getExtendedProperties() + - ", title='" + getTitle() + '\'' + - ", summary='" + getSummary() + '\'' + - ", description='" + getDescription() + '\'' + - ", scope='" + getScope() + '\'' + - ", domainIdentifier=" + getDomainIdentifier() + - ", priority='" + getPriority() + '\'' + - ", implications=" + getImplications() + - ", outcomes=" + getOutcomes() + - ", results=" + getResults() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - CertificationTypeProperties that = (CertificationTypeProperties) objectToCompare; - return Objects.equals(details, that.details); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), details); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/ClassificationProperties.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/ClassificationProperties.java deleted file mode 100644 index 4f0d48736e5..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/ClassificationProperties.java +++ /dev/null @@ -1,196 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; - -import java.util.Date; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * RelationshipProperties provides the base class for relationships items. This provides extended properties with the ability to - * set effectivity dates. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes( - { - @JsonSubTypes.Type(value = GovernanceMeasurementsProperties.class, name = "GovernanceMeasurementsProperties"), - @JsonSubTypes.Type(value = GovernanceExpectationsProperties.class, name = "GovernanceExpectationsProperties"), - @JsonSubTypes.Type(value = GovernanceMeasurementsDataSetProperties.class, name = "GovernanceMeasurementsDataSetProperties"), - @JsonSubTypes.Type(value = SubjectAreaClassificationProperties.class, name = "SubjectAreaClassificationProperties"), - }) -public class ClassificationProperties -{ - private Date effectiveFrom = null; - private Date effectiveTo = null; - private Map extendedProperties = null; - - - /** - * Default constructor - */ - public ClassificationProperties() - { - super(); - } - - - /** - * Copy/clone constructor. Retrieve values from the supplied template - * - * @param template element to copy - */ - public ClassificationProperties(ClassificationProperties template) - { - if (template != null) - { - effectiveFrom = template.getEffectiveFrom(); - effectiveTo = template.getEffectiveTo(); - extendedProperties = template.getExtendedProperties(); - } - } - - - /** - * Return the date/time that this element is effective from (null means effective from the epoch). - * - * @return date object - */ - public Date getEffectiveFrom() - { - return effectiveFrom; - } - - - /** - * Set up the date/time that this element is effective from (null means effective from the epoch). - * - * @param effectiveFrom date object - */ - public void setEffectiveFrom(Date effectiveFrom) - { - this.effectiveFrom = effectiveFrom; - } - - - /** - * Return the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @return date object - */ - public Date getEffectiveTo() - { - return effectiveTo; - } - - - /** - * Set the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @param effectiveTo date object - */ - public void setEffectiveTo(Date effectiveTo) - { - this.effectiveTo = effectiveTo; - } - - - /** - * Return the properties that have been defined for a subtype of this object that are not supported explicitly - * by this bean. - * - * @return property map - */ - public Map getExtendedProperties() - { - if (extendedProperties == null) - { - return null; - } - else if (extendedProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(extendedProperties); - } - } - - - /** - * Set up the properties that have been defined for a subtype of this object that are not supported explicitly - * by this bean. - * - * @param extendedProperties property map - */ - public void setExtendedProperties(Map extendedProperties) - { - this.extendedProperties = extendedProperties; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "RelationshipProperties{" + - "effectiveFrom=" + effectiveFrom + - ", effectiveTo=" + effectiveTo + - ", extendedProperties=" + extendedProperties + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ClassificationProperties that = (ClassificationProperties) objectToCompare; - return Objects.equals(effectiveFrom, that.effectiveFrom) && - Objects.equals(effectiveTo, that.effectiveTo); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(effectiveFrom, effectiveTo); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/ContactMethodProperties.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/ContactMethodProperties.java deleted file mode 100644 index cfff40331b0..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/ContactMethodProperties.java +++ /dev/null @@ -1,339 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.openmetadata.enums.ContactMethodType; - -import java.util.Date; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ContactMethodProperties describes a single mechanism that can be used to contact an individual. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ContactMethodProperties -{ - private String name = null; - private String contactType = null; - - private ContactMethodType contactMethodType = null; - private String contactMethodService = null; - private String contactMethodValue = null; - - private Date effectiveFrom = null; - private Date effectiveTo = null; - - private String typeName = null; - private Map extendedProperties = null; - - - /** - * Default constructor - */ - public ContactMethodProperties() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ContactMethodProperties(ContactMethodProperties template) - { - if (template != null) - { - contactMethodType = template.getContactMethodType(); - contactMethodService = template.getContactMethodService(); - contactMethodValue = template.getContactMethodValue(); - effectiveFrom = template.getEffectiveFrom(); - effectiveTo = template.getEffectiveTo(); - typeName = template.getTypeName(); - extendedProperties = template.getExtendedProperties(); - } - } - - - /** - * Return the name to give this contact method (imagine a list of contact methods). - * - * @return string - */ - public String getName() - { - return name; - } - - - /** - * Set up the name to give this contact method (imagine a list of contact methods). - * - * @param name string - */ - public void setName(String name) - { - this.name = name; - } - - - /** - * Return the type of contact - is it related to work or personal etc. - * - * @return string type name - often controlled by a valid value set - */ - public String getContactType() - { - return contactType; - } - - - /** - * Set up the type of contact - is it related to work or personal etc. - * - * @param contactType string type name - often controlled by a valid value set - */ - public void setContactType(String contactType) - { - this.contactType = contactType; - } - - - /** - * Return the type of the contact method. - * - * @return contact method type enum - */ - public ContactMethodType getContactMethodType() - { - return contactMethodType; - } - - - /** - * Set up the type of the contact method. - * - * @param contactMethodType contact method type enum - */ - public void setContactMethodType(ContactMethodType contactMethodType) - { - this.contactMethodType = contactMethodType; - } - - - /** - * Return the URL of the service used to contact the individual. - * - * @return service URL - */ - public String getContactMethodService() - { - return contactMethodService; - } - - - /** - * Set up theURL of the service used to contact the individual. - * - * @param contactMethodService service URL - */ - public void setContactMethodService(String contactMethodService) - { - this.contactMethodService = contactMethodService; - } - - - /** - * Return the account name or similar value used to direct the message to the individual. - * - * @return value string - */ - public String getContactMethodValue() - { - return contactMethodValue; - } - - - /** - * Set up the account name or similar value used to direct the message to the individual. - * - * @param contactMethodValue value string - */ - public void setContactMethodValue(String contactMethodValue) - { - this.contactMethodValue = contactMethodValue; - } - - - - /** - * Return the date/time that this element is effective from (null means effective from the epoch). - * - * @return date object - */ - public Date getEffectiveFrom() - { - return effectiveFrom; - } - - - /** - * Set up the date/time that this element is effective from (null means effective from the epoch). - * - * @param effectiveFrom date object - */ - public void setEffectiveFrom(Date effectiveFrom) - { - this.effectiveFrom = effectiveFrom; - } - - - /** - * Return the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @return date object - */ - public Date getEffectiveTo() - { - return effectiveTo; - } - - - /** - * Set the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @param effectiveTo date object - */ - public void setEffectiveTo(Date effectiveTo) - { - this.effectiveTo = effectiveTo; - } - - - /** - * Return the name of the open metadata type for this metadata element. - * - * @return string name - */ - public String getTypeName() - { - return typeName; - } - - - /** - * Set up the name of the open metadata type for this element. - * - * @param typeName string name - */ - public void setTypeName(String typeName) - { - this.typeName = typeName; - } - - - /** - * Return the properties that have been defined for a subtype of this object that are not supported explicitly - * by this bean. - * - * @return property map - */ - public Map getExtendedProperties() - { - if (extendedProperties == null) - { - return null; - } - else if (extendedProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(extendedProperties); - } - } - - - /** - * Set up the properties that have been defined for a subtype of this object that are not supported explicitly - * by this bean. - * - * @param extendedProperties property map - */ - public void setExtendedProperties(Map extendedProperties) - { - this.extendedProperties = extendedProperties; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "ContactMethodProperties{" + - "type=" + contactMethodType + - ", service='" + contactMethodService + '\'' + - ", value='" + contactMethodValue + '\'' + - ", effectiveFrom=" + effectiveFrom + - ", effectiveTo=" + effectiveTo + - ", typeName='" + typeName + '\'' + - ", extendedProperties=" + extendedProperties + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ContactMethodProperties that = (ContactMethodProperties) objectToCompare; - return contactMethodType == that.contactMethodType && - Objects.equals(contactMethodService, that.contactMethodService) && - Objects.equals(contactMethodValue, that.contactMethodValue) && - Objects.equals(effectiveFrom, that.effectiveFrom) && - Objects.equals(effectiveTo, that.effectiveTo) && - Objects.equals(typeName, that.typeName) && - Objects.equals(extendedProperties, that.extendedProperties); - } - - - /** - * Hash code for this object - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(contactMethodType, contactMethodService, contactMethodValue, effectiveFrom, effectiveTo, typeName, extendedProperties); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/ExternalReferenceLinkProperties.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/ExternalReferenceLinkProperties.java deleted file mode 100644 index 1f00c2ad320..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/ExternalReferenceLinkProperties.java +++ /dev/null @@ -1,175 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ExternalReferenceLinkProperties provides a structure for the properties that link an external reference to an object. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ExternalReferenceLinkProperties extends RelationshipProperties -{ - private String linkId = null; - private String linkDescription = null; - private String pages = null; - - - /** - * Default constructor - */ - public ExternalReferenceLinkProperties() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ExternalReferenceLinkProperties(ExternalReferenceLinkProperties template) - { - super (template); - - if (template != null) - { - this.linkId = template.getLinkId(); - this.linkDescription = template.getLinkDescription(); - this.pages = template.getPages(); - } - } - - - /** - * Return the identifier that this reference is to be known as with respect to the linked object. - * - * @return String identifier - */ - public String getLinkId() - { - return linkId; - } - - - /** - * Set up the identifier that this reference is to be known as with respect to the linked object. - * - * @param linkId String identifier - */ - public void setLinkId(String linkId) - { - this.linkId = linkId; - } - - - /** - * Return the description of the external reference with respect to the linked object. - * - * @return string - */ - public String getLinkDescription() - { - return linkDescription; - } - - - /** - * Set up the description of the external reference with respect to the linked object. - * - * @param linkDescription string - */ - public void setLinkDescription(String linkDescription) - { - this.linkDescription = linkDescription; - } - - - /** - * Return the page range for the reference. - * - * @return string - */ - public String getPages() - { - return pages; - } - - - /** - * Set up the page range for the reference. - * - * @param pages string - */ - public void setPages(String pages) - { - this.pages = pages; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "ExternalReferenceLinkProperties{" + - "linkId='" + linkId + '\'' + - ", linkDescription='" + linkDescription + '\'' + - ", pages='" + pages + '\'' + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (! (objectToCompare instanceof ExternalReferenceLinkProperties)) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - ExternalReferenceLinkProperties that = (ExternalReferenceLinkProperties) objectToCompare; - return Objects.equals(linkId, that.linkId) && Objects.equals(linkDescription, that.linkDescription) - && Objects.equals(pages, that.pages); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), linkId, linkDescription, pages); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/ExternalReferenceProperties.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/ExternalReferenceProperties.java deleted file mode 100644 index eb64b363591..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/ExternalReferenceProperties.java +++ /dev/null @@ -1,269 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.*; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ExternalReferenceProperties stores information about an link to an external resource that is relevant to this element. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ExternalReferenceProperties extends ReferenceableProperties -{ - private String localReferenceId = null; - private String displayName = null; - private String linkDescription = null; - private String resourceDescription = null; - private String uri = null; - private String version = null; - private String organization = null; - - - /** - * Default constructor - */ - public ExternalReferenceProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template element to copy - */ - public ExternalReferenceProperties(ExternalReferenceProperties template) - { - super(template); - - if (template != null) - { - /* - * Copy the values from the supplied template. - */ - localReferenceId = template.getLocalReferenceId(); - linkDescription = template.getLinkDescription(); - displayName = template.getDisplayName(); - uri = template.getURI(); - resourceDescription = template.getResourceDescription(); - version = template.getVersion(); - organization = template.getOrganization(); - } - } - - - /** - * Return the identifier given to this reference (with respect to this governance definition). - * - * @return localReferenceId - */ - public String getLocalReferenceId() - { - return localReferenceId; - } - - - /** - * Set up the identifier given to this reference (with respect to this governance definition). - * - * @param localReferenceId String name - */ - public void setLocalReferenceId(String localReferenceId) - { - this.localReferenceId = localReferenceId; - } - - - /** - * Return the display name of this external reference. - * - * @return String display name. - */ - public String getDisplayName() { return displayName; } - - - /** - * Set up the display name of this external reference. - * - * @param displayName - string name - */ - public void setDisplayName(String displayName) - { - this.displayName = displayName; - } - - - /** - * Return the description of the reference (with respect to this governance definition). - * - * @return String link description. - */ - public String getLinkDescription() { return linkDescription; } - - - /** - * Set up the description of the reference (with respect to the governance definition this reference is linked to). - * - * @param linkDescription String description - */ - public void setLinkDescription(String linkDescription) - { - this.linkDescription = linkDescription; - } - - - /** - * Return the description of the resource that this external reference represents. - * - * @return String description - */ - public String getResourceDescription() { return resourceDescription; } - - - /** - * Set up the description of the resource that this external reference represents. - * - * @param resourceDescription String description - */ - public void setResourceDescription(String resourceDescription) - { - this.resourceDescription = resourceDescription; - } - - - /** - * Return the URI used to retrieve the resource that this external reference represents. - * - * @return String URI - */ - public String getURI() { return uri; } - - - /** - * Set up the URI used to retrieve the resource that this external reference represents. - * - * @param uri String URI - */ - public void setURI(String uri) - { - this.uri = uri; - } - - - - /** - * Return the version of the resource that this external reference represents. - * - * @return String version identifier - */ - public String getVersion() { return version; } - - - /** - * Set up the version of the resource that this external reference represents. - * - * @param version String identifier - */ - public void setVersion(String version) - { - this.version = version; - } - - - /** - * Return the name of the organization that owns the resource that this external reference represents. - * - * @return String organization name - */ - public String getOrganization() { return organization; } - - - /** - * Set up the name of the organization that owns the resource that this external reference represents. - * - * @param organization String name - */ - public void setOrganization(String organization) - { - this.organization = organization; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "ExternalReferenceProperties{" + - "localReferenceId='" + localReferenceId + '\'' + - ", displayName='" + displayName + '\'' + - ", linkDescription='" + linkDescription + '\'' + - ", resourceDescription='" + resourceDescription + '\'' + - ", uri='" + uri + '\'' + - ", version='" + version + '\'' + - ", organization='" + organization + '\'' + - ", URI='" + getURI() + '\'' + - ", typeName='" + getTypeName() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ExternalReferenceProperties that = (ExternalReferenceProperties) objectToCompare; - return Objects.equals(localReferenceId, that.localReferenceId) && - Objects.equals(displayName, that.displayName) && - Objects.equals(linkDescription, that.linkDescription) && - Objects.equals(resourceDescription, that.resourceDescription) && - Objects.equals(uri, that.uri) && - Objects.equals(version, that.version) && - Objects.equals(organization, that.organization); - } - - - /** - * Uses the guid to create a hashcode. - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(localReferenceId, displayName, linkDescription, resourceDescription, uri, version, organization); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/GovernanceDefinitionProperties.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/GovernanceDefinitionProperties.java deleted file mode 100644 index 0045b76d07a..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/GovernanceDefinitionProperties.java +++ /dev/null @@ -1,517 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.properties; - -import com.fasterxml.jackson.annotation.*; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * GovernanceDefinitionProperties provides the base class for many of the definitions that define the data strategy - * and governance program. It includes many of the common fields: - * - *
      - *
    • Document Id
    • - *
    • Title
    • - *
    • Summary
    • - *
    • Description
    • - *
    • Scope
    • - *
    • Domain Identifier
    • - *
    • Status
    • - *
    • Priority
    • - *
    • Implications
    • - *
    • Outcomes
    • - *
    • Results
    • - *
    • AdditionalProperties
    • - *
    - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes( - { - @JsonSubTypes.Type(value = LicenseTypeProperties.class, name = "LicenseTypeProperties"), - @JsonSubTypes.Type(value = CertificationTypeProperties.class, name = "CertificationTypeProperties"), - @JsonSubTypes.Type(value = SecurityGroupProperties.class, name = "SecurityGroupProperties") - }) -public class GovernanceDefinitionProperties -{ - private String documentIdentifier = null; - private Map additionalProperties = null; - - private String title = null; - private String summary = null; - private String description = null; - private String scope = null; - private int domainIdentifier = 0; - private String priority = null; - private List implications = null; - private List outcomes = null; - private List results = null; - - private String typeName = null; - private Map extendedProperties = null; - - - /** - * Default Constructor - */ - public GovernanceDefinitionProperties() - { - super(); - } - - - /** - * Copy/clone Constructor - * - * @param template object being copied - */ - public GovernanceDefinitionProperties(GovernanceDefinitionProperties template) - { - if (template != null) - { - this.documentIdentifier = template.getDocumentIdentifier(); - this.additionalProperties = template.getAdditionalProperties(); - this.title = template.getTitle(); - this.summary = template.getSummary(); - this.description = template.getDescription(); - this.scope = template.getScope(); - this.domainIdentifier = template.getDomainIdentifier(); - this.priority = template.getPriority(); - this.implications = template.getImplications(); - this.outcomes = template.getOutcomes(); - this.results = template.getResults(); - this.typeName = template.getTypeName(); - this.extendedProperties = template.getExtendedProperties(); - } - } - - - /** - * Return the open metadata type name of this object - this is used to create a subtype of - * the referenceable. Any properties associated with this subtype are passed as extended properties. - * - * @return string type name - */ - public String getTypeName() - { - return typeName; - } - - - /** - * Set up the open metadata type name of this object - this is used to create a subtype of - * the referenceable. Any properties associated with this subtype are passed as extended properties. - * - * @param typeName string type name - */ - public void setTypeName(String typeName) - { - this.typeName = typeName; - } - - - /** - * Returns the stored qualified name property for the metadata entity. - * If no qualified name is available then the empty string is returned. - * - * @return documentIdentifier - */ - public String getDocumentIdentifier() - { - return documentIdentifier; - } - - - /** - * Set up the fully qualified name. - * - * @param documentIdentifier String name - */ - public void setDocumentIdentifier(String documentIdentifier) - { - this.documentIdentifier = documentIdentifier; - } - - - /** - * Return a copy of the additional properties. Null means no additional properties are available. - * - * @return AdditionalProperties - */ - public Map getAdditionalProperties() - { - if (additionalProperties == null) - { - return null; - } - else if (additionalProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(additionalProperties); - } - } - - - /** - * Set up additional properties. - * - * @param additionalProperties Additional properties object - */ - public void setAdditionalProperties(Map additionalProperties) - { - this.additionalProperties = additionalProperties; - } - - - /** - * Return the properties that are defined for a subtype of referenceable but are not explicitly - * supported by the bean. - * - * @return map of properties - */ - public Map getExtendedProperties() - { - if (extendedProperties == null) - { - return null; - } - else if (extendedProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(extendedProperties); - } - } - - - /** - * Set up the properties that are defined for a subtype of referenceable but are not explicitly - * supported by the bean. - * - * @param extendedProperties map of properties - */ - public void setExtendedProperties(Map extendedProperties) - { - this.extendedProperties = extendedProperties; - } - - - - /** - * Return the title associated with this governance definition. - * - * @return String title - */ - public String getTitle() - { - return title; - } - - - /** - * Set up the title associated with this governance definition. - * - * @param title String title - */ - public void setTitle(String title) - { - this.title = title; - } - - - - /** - * Return the summary for this governance definition. This should cover its essence. Think of it as - * the executive summary. - * - * @return String short description - */ - public String getSummary() - { - return summary; - } - - - /** - * Set up the summary of the governance definition. This should cover its essence. Think of it as - * the executive summary. - * - * @param summary String description - */ - public void setSummary(String summary) - { - this.summary = summary; - } - - - /** - * Return the full description of the governance definition. - * - * @return String description - */ - public String getDescription() - { - return description; - } - - - /** - * Set up the full description of the governance definition. - * - * @param description String description - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * Return the organizational scope that this governance definition applies to. - * - * @return String organization, department or team name - */ - public String getScope() - { - return scope; - } - - - /** - * Set up the organizational scope that this governance definition applies to. - * - * @param scope String organization, department or team name - */ - public void setScope(String scope) - { - this.scope = scope; - } - - - /** - * Return the identifier of the governance domain that this definition belongs to (0=all). - * - * @return int - */ - public int getDomainIdentifier() - { - return domainIdentifier; - } - - - /** - * Set up the identifier of the governance domain that this definition belongs to (0=all). - * - * @param domainIdentifier int - */ - public void setDomainIdentifier(int domainIdentifier) - { - this.domainIdentifier = domainIdentifier; - } - - - /** - * Return the priority of the governance definition. This may be something like high, medium or low, - * or maybe a time frame or more detailed explanation. - * - * @return String priority - */ - public String getPriority() - { - return priority; - } - - - /** - * Set up the priority of this governance definition. This may be something like high, medium or low, - * or maybe a time frame or more detailed explanation. - * - * @param priority String priority - */ - public void setPriority(String priority) - { - this.priority = priority; - } - - - /** - * Return the list of implications for the organization that this governance definition brings. - * This is often the first enumeration of the changes that that need to be implemented to bring - * the governance definition into effect. - * - * @return list of descriptions - */ - public List getImplications() - { - return implications; - } - - - /** - * Set up the list of implications for the organization that this governance definition brings. - * This is often the first enumeration of the changes that that need to be implemented to bring - * the governance definition into effect. - * - * @param implications list of descriptions - */ - public void setImplications(List implications) - { - this.implications = implications; - } - - - /** - * Return the list of expected outcomes from implementing this governance definition. - * - * @return list of outcome descriptions - */ - public List getOutcomes() - { - if (outcomes == null) - { - return null; - } - else if (outcomes.isEmpty()) - { - return null; - } - else - { - return outcomes; - } - } - - - /** - * Set up the list of expected outcomes from implementing this governance definition. - * - * @param outcomes list of descriptions of outcomes - */ - public void setOutcomes(List outcomes) - { - this.outcomes = outcomes; - } - - - /** - * Return the list of actual results from implementing this governance definition. - * - * @return list of result descriptions - */ - public List getResults() - { - if (outcomes == null) - { - return null; - } - else if (outcomes.isEmpty()) - { - return null; - } - else - { - return outcomes; - } - } - - - /** - * Set up the list of actual results from implementing this governance definition. - * - * @param results list of description of results - */ - public void setResults(List results) - { - this.results = results; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "GovernanceDefinitionProperties{" + - "documentIdentifier='" + documentIdentifier + '\'' + - ", additionalProperties=" + additionalProperties + - ", title='" + title + '\'' + - ", summary='" + summary + '\'' + - ", description='" + description + '\'' + - ", scope='" + scope + '\'' + - ", domainIdentifier=" + domainIdentifier + - ", priority='" + priority + '\'' + - ", implications=" + implications + - ", outcomes=" + outcomes + - ", results=" + results + - ", typeName='" + typeName + '\'' + - ", extendedProperties=" + extendedProperties + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - GovernanceDefinitionProperties that = (GovernanceDefinitionProperties) objectToCompare; - return domainIdentifier == that.domainIdentifier && - Objects.equals(documentIdentifier, that.documentIdentifier) && - Objects.equals(additionalProperties, that.additionalProperties) && - Objects.equals(title, that.title) && - Objects.equals(summary, that.summary) && - Objects.equals(description, that.description) && - Objects.equals(scope, that.scope) && - Objects.equals(priority, that.priority) && - Objects.equals(implications, that.implications) && - Objects.equals(outcomes, that.outcomes) && - Objects.equals(results, that.results) && - Objects.equals(typeName, that.typeName) && - Objects.equals(extendedProperties, that.extendedProperties); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(documentIdentifier, additionalProperties, title, summary, description, scope, domainIdentifier, priority, - implications, outcomes, results, typeName, extendedProperties); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/GovernanceDefinitionStatus.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/GovernanceDefinitionStatus.java deleted file mode 100644 index 650f75a14b8..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/GovernanceDefinitionStatus.java +++ /dev/null @@ -1,108 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.properties; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * GovernanceDefinitionStatus indicates whether the definition is complete and operational or in a state that means - * it is either under development or obsolete. - *
      - *
    • DRAFT - The governance definition is still in development.
    • - *
    • PROPOSED - The governance definition is in review and not yet active.
    • - *
    • ACTIVE - The governance definition is approved and in use.
    • - *
    • DEPRECATED - The governance definition has been superseded.
    • - *
    • OTHER - The governance definition in a locally defined state.
    • - *
    - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public enum GovernanceDefinitionStatus -{ - /** - * Draft - The governance definition is still in development. - */ - DRAFT (0, "Draft", "The governance definition is still in development."), - - /** - * Proposed - The governance definition is in review and not yet active. - */ - PROPOSED (1, "Proposed", "The governance definition is in review and not yet active."), - - /** - * Active - The governance definition is approved and in use. - */ - ACTIVE (2, "Active", "The governance definition is approved and in use."), - - /** - * Deprecated - The governance definition has been superseded. - */ - DEPRECATED (3, "Deprecated", "The governance definition has been superseded."), - - /** - * Other - The governance definition in a locally defined state. - */ - OTHER (99, "Other", "The governance definition in a locally defined state."); - - private final int ordinal; - private final String name; - private final String description; - - - /** - * Default constructor for the enumeration. - * - * @param ordinal numerical representation of the enumeration - * @param name default string name of the instance provenance type - * @param description default string description of the instance provenance type - */ - GovernanceDefinitionStatus(int ordinal, String name, String description) - { - this.ordinal = ordinal; - this.name = name; - this.description = description; - } - - - /** - * Return the numeric representation of the instance provenance type. - * - * @return int ordinal - */ - public int getOrdinal() { return ordinal; } - - - /** - * Return the default name of the instance provenance type. - * - * @return String name - */ - public String getName() { return name; } - - - /** - * Return the default description of the instance provenance type. - * - * @return String description - */ - public String getDescription() { return description; } - - - /** - * toString() JSON-style - * - * @return string description - */ - @Override - public String toString() - { - return "GovernanceDefinitionStatus : " + name; - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/ITProfileProperties.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/ITProfileProperties.java deleted file mode 100644 index e98f2f20f47..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/ITProfileProperties.java +++ /dev/null @@ -1,58 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * The ITProfileProperties describes a automated agent that is taking governance action. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ITProfileProperties extends ActorProfileProperties -{ - /** - * Default Constructor - */ - public ITProfileProperties() - { - super(); - } - - - /** - * Copy/clone Constructor - the resulting object. - * - * @param template object being copied - */ - public ITProfileProperties(ITProfileProperties template) - { - super (template); - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "ITProfileProperties{" + - "knownName='" + getKnownName() + '\'' + - ", description='" + getDescription() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/LicenseProperties.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/LicenseProperties.java deleted file mode 100644 index e3134011eb9..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/LicenseProperties.java +++ /dev/null @@ -1,545 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Date; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * LicenseProperties describe the details of a license that shows that an element is licensed with a particular license type. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class LicenseProperties extends RelationshipProperties -{ - private String licenseId = null; - private Date startDate = null; - private Date endDate = null; - private String conditions = null; - private String licensedBy = null; - private String licensedByTypeName = null; - private String licensedByPropertyName = null; - private String custodian = null; - private String custodianTypeName = null; - private String custodianPropertyName = null; - private String licensee = null; - private String licenseeTypeName = null; - private String licenseePropertyName = null; - private Map entitlements = null; - private Map restrictions = null; - private Map obligations = null; - private String notes = null; - - - /** - * Default Constructor - */ - public LicenseProperties() - { - } - - - /** - * Copy/clone Constructor - the resulting object. - * - * @param template object being copied - */ - public LicenseProperties(LicenseProperties template) - { - super(template); - - if (template != null) - { - this.licenseId = template.getLicenseId(); - this.startDate = template.getStartDate(); - this.endDate = template.getEndDate(); - this.conditions = template.getConditions(); - this.licensedBy = template.getLicensedBy(); - this.licensedByTypeName = template.getLicensedByTypeName(); - this.licensedByPropertyName = template.getLicensedByPropertyName(); - this.custodian = template.getCustodian(); - this.custodianTypeName = template.getCustodianTypeName(); - this.custodianPropertyName = template.getCustodianPropertyName(); - this.licensee = template.getLicensee(); - this.licenseeTypeName = template.getLicenseeTypeName(); - this.licenseePropertyName = template.getLicenseePropertyName(); - this.entitlements = template.getEntitlements(); - this.restrictions = template.getRestrictions(); - this.obligations = template.getObligations(); - this.notes = template.getNotes(); - } - } - - - /** - * Return the unique identifier of the license. This value comes from the license authority. - * - * @return string - */ - public String getLicenseId() - { - return licenseId; - } - - - /** - * Set up the unique identifier of the license. This value comes from the license authority. - * - * @param licenseId string - */ - public void setLicenseId(String licenseId) - { - this.licenseId = licenseId; - } - - - /** - * Return the date/time that this license is valid from. - * - * @return date/time - */ - public Date getStartDate() - { - return startDate; - } - - - /** - * Set up the date/time that this license is valid from. - * - * @param startDate date/time - */ - public void setStartDate(Date startDate) - { - this.startDate = startDate; - } - - - /** - * Return the date/time that this license is no longer valid. - * - * @return date/time - */ - public Date getEndDate() - { - return endDate; - } - - - /** - * Set up the date/time that this license is no longer valid. - * - * @param endDate date/time - */ - public void setEndDate(Date endDate) - { - this.endDate = endDate; - } - - - /** - * Return any conditions or endorsements to this license. - * - * @return string text - */ - public String getConditions() - { - return conditions; - } - - - /** - * Set up any conditions or endorsements to this license. - * - * @param conditions string text - */ - public void setConditions(String conditions) - { - this.conditions = conditions; - } - - - /** - * Return the name of the person in the license authority that granted this license. - * - * @return string name/id - */ - public String getLicensedBy() - { - return licensedBy; - } - - - /** - * Set up the name of the person in the license authority that granted this license. - * - * @param licensedBy string name/id - */ - public void setLicensedBy(String licensedBy) - { - this.licensedBy = licensedBy; - } - - - /** - * Return the name of the type of the element supplying the licensedBy property. - * - * @return string type name - */ - public String getLicensedByTypeName() - { - return licensedByTypeName; - } - - - /** - * Set up the name of the type of the element supplying the licensedBy property. - * - * @param licensedByTypeName string type name - */ - public void setLicensedByTypeName(String licensedByTypeName) - { - this.licensedByTypeName = licensedByTypeName; - } - - - /** - * Return the name of the property from the element supplying the licensedBy property. - * - * @return string property name - */ - public String getLicensedByPropertyName() - { - return licensedByPropertyName; - } - - - /** - * Set up the name of the property from the element supplying the licensedBy property. - * - * @param licensedByPropertyName string property name - */ - public void setLicensedByPropertyName(String licensedByPropertyName) - { - this.licensedByPropertyName = licensedByPropertyName; - } - - - /** - * Return the person/team responsible for ensuring that the license conditions are adhered to. - * - * @return string name/id - */ - public String getCustodian() - { - return custodian; - } - - - /** - * Set up the person/team responsible for ensuring that the license conditions are adhered to. - * - * @param custodian string name/id - */ - public void setCustodian(String custodian) - { - this.custodian = custodian; - } - - - /** - * Return the name of the type of the element supplying the custodian property. - * - * @return string type name - */ - public String getCustodianTypeName() - { - return custodianTypeName; - } - - - /** - * Set up the name of the type of the element supplying the custodian property. - * - * @param custodianTypeName string type name - */ - public void setCustodianTypeName(String custodianTypeName) - { - this.custodianTypeName = custodianTypeName; - } - - - /** - * Return the name of the property from the element supplying the custodian property. - * - * @return string property name - */ - public String getCustodianPropertyName() - { - return custodianPropertyName; - } - - - /** - * Set up the name of the property from the element supplying the custodian property. - * - * @param custodianPropertyName string property name - */ - public void setCustodianPropertyName(String custodianPropertyName) - { - this.custodianPropertyName = custodianPropertyName; - } - - - /** - * Return the person/team that received the license. - * - * @return string name/id - */ - public String getLicensee() - { - return licensee; - } - - - /** - * Set up the person/team that received the license. - * - * @param licensee string name/id - */ - public void setLicensee(String licensee) - { - this.licensee = licensee; - } - - - /** - * Return the name of the type of the element supplying the licensee property. - * - * @return string type name - */ - public String getLicenseeTypeName() - { - return licenseeTypeName; - } - - - /** - * Set up the name of the type of the element supplying the licensee property. - * - * @param licenseeTypeName string type name - */ - public void setLicenseeTypeName(String licenseeTypeName) - { - this.licenseeTypeName = licenseeTypeName; - } - - - /** - * Return the name of the property from the element supplying the licensee property. - * - * @return string property name - */ - public String getLicenseePropertyName() - { - return licenseePropertyName; - } - - - /** - * Set up the name of the property from the element supplying the licensee property. - * - * @param licenseePropertyName string property name - */ - public void setLicenseePropertyName(String licenseePropertyName) - { - this.licenseePropertyName = licenseePropertyName; - } - - - /** - * Return the entitlements granted by the license. - * - * @return name value pairs - */ - public Map getEntitlements() - { - return entitlements; - } - - - /** - * Set up the entitlements granted by the license. - * - * @param entitlements name value pairs - */ - public void setEntitlements(Map entitlements) - { - this.entitlements = entitlements; - } - - - /** - * Return the restrictions imposed by the license. - * - * @return name value pairs - */ - public Map getRestrictions() - { - return restrictions; - } - - - /** - * Set up the restrictions imposed by the license. - * - * @param restrictions name value pairs - */ - public void setRestrictions(Map restrictions) - { - this.restrictions = restrictions; - } - - - /** - * Return the obligations stipulated by the license. - * - * @return name value pairs - */ - public Map getObligations() - { - return obligations; - } - - - /** - * Set up the obligations stipulated by the license. - * - * @param obligations name value pairs - */ - public void setObligations(Map obligations) - { - this.obligations = obligations; - } - - - /** - * Return any notes associated with the license. - * - * @return string text - */ - public String getNotes() - { - return notes; - } - - - /** - * Set up any notes associated with the license. - * - * @param notes string text - */ - public void setNotes(String notes) - { - this.notes = notes; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "LicenseProperties{" + - "licenseId='" + licenseId + '\'' + - ", startDate=" + startDate + - ", endDate=" + endDate + - ", conditions='" + conditions + '\'' + - ", licensedBy='" + licensedBy + '\'' + - ", licensedByTypeName='" + licensedByTypeName + '\'' + - ", licensedByPropertyName='" + licensedByPropertyName + '\'' + - ", custodian='" + custodian + '\'' + - ", custodianTypeName='" + custodianTypeName + '\'' + - ", custodianPropertyName='" + custodianPropertyName + '\'' + - ", licensee='" + licensee + '\'' + - ", licenseeTypeName='" + licenseeTypeName + '\'' + - ", licenseePropertyName='" + licenseePropertyName + '\'' + - ", entitlements=" + entitlements + - ", restrictions=" + restrictions + - ", obligations=" + obligations + - ", notes='" + notes + '\'' + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (! (objectToCompare instanceof LicenseProperties)) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - LicenseProperties that = (LicenseProperties) objectToCompare; - return Objects.equals(licenseId, that.licenseId) && - Objects.equals(startDate, that.startDate) && - Objects.equals(endDate, that.endDate) && - Objects.equals(conditions, that.conditions) && - Objects.equals(licensedBy, that.licensedBy) && - Objects.equals(licensedByTypeName, that.licensedByTypeName) && - Objects.equals(licensedByPropertyName, that.licensedByPropertyName) && - Objects.equals(custodian, that.custodian) && - Objects.equals(custodianTypeName, that.custodianTypeName) && - Objects.equals(custodianPropertyName, that.custodianPropertyName) && - Objects.equals(licensee, that.licensee) && - Objects.equals(licenseeTypeName, that.licenseeTypeName) && - Objects.equals(licenseePropertyName, that.licenseePropertyName) && - Objects.equals(entitlements, that.entitlements) && - Objects.equals(restrictions, that.restrictions) && - Objects.equals(obligations, that.obligations) && - Objects.equals(notes, that.notes); - } - - - /** - * Just use the GUID for the hash code as it should be unique. - * - * @return int code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), licenseId, startDate, endDate, conditions, licensedBy, licensedByTypeName, licensedByPropertyName, - custodian, custodianTypeName, custodianPropertyName, licensee, licenseeTypeName, licenseePropertyName, - obligations, restrictions, entitlements, notes); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/LicenseTypeProperties.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/LicenseTypeProperties.java deleted file mode 100644 index cdb6493b187..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/LicenseTypeProperties.java +++ /dev/null @@ -1,136 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * LicenseTypeProperties defines a license that the organization recognizes and has governance - * definitions to support it. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class LicenseTypeProperties extends GovernanceDefinitionProperties -{ - private String details = null; - - - /** - * Default Constructor - */ - public LicenseTypeProperties() - { - } - - - /** - * Copy/Clone Constructor - * - * @param template object to copy - */ - public LicenseTypeProperties(LicenseTypeProperties template) - { - super(template); - - if (template != null) - { - this.details = template.getDetails(); - } - } - - - /** - * Return the specific details of the license. - * - * @return string description - */ - public String getDetails() - { - return details; - } - - - /** - * Set up the specific details of the license. - * - * @param details string description - */ - public void setDetails(String details) - { - this.details = details; - } - - - /** - * JSON-style toString - * - * @return string containing the properties and their values - */ - @Override - public String toString() - { - return "LicenseTypeProperties{" + - "details='" + details + '\'' + - ", typeName='" + getTypeName() + '\'' + - ", documentIdentifier='" + getDocumentIdentifier() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", extendedProperties=" + getExtendedProperties() + - ", title='" + getTitle() + '\'' + - ", summary='" + getSummary() + '\'' + - ", description='" + getDescription() + '\'' + - ", scope='" + getScope() + '\'' + - ", domainIdentifier=" + getDomainIdentifier() + - ", priority='" + getPriority() + '\'' + - ", implications=" + getImplications() + - ", outcomes=" + getOutcomes() + - ", results=" + getResults() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - LicenseTypeProperties that = (LicenseTypeProperties) objectToCompare; - return Objects.equals(details, that.details); - } - - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), details); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/OrganizationProfileProperties.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/OrganizationProfileProperties.java deleted file mode 100644 index 203b22ca707..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/OrganizationProfileProperties.java +++ /dev/null @@ -1,59 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * OrganizationProfileProperties describes a top-level team in an organization. It adds no attributes, but is a marker for - * the top of a departmental structure. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class OrganizationProfileProperties extends TeamProfileProperties -{ - /** - * Default constructor - */ - public OrganizationProfileProperties() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public OrganizationProfileProperties(OrganizationProfileProperties template) - { - super(template); - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "OrganizationProfileProperties{" + - "teamType='" + getTeamType() + '\'' + - ", knownName='" + getKnownName() + '\'' + - ", description='" + getDescription() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/PersonRoleProperties.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/PersonRoleProperties.java deleted file mode 100644 index 63f16697294..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/PersonRoleProperties.java +++ /dev/null @@ -1,447 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.governanceprogram.properties; - -import com.fasterxml.jackson.annotation.*; - -import java.util.Date; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * PersonRoleProperties provides a structure for describe a role assigned to a person. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes( - { - @JsonSubTypes.Type(value = GovernanceRoleProperties.class, name = "GovernanceRoleProperties") - }) -public class PersonRoleProperties -{ - private String qualifiedName = null; /* qualifiedName */ - private String roleId = null; /* identifier */ - private String scope = null; /* scope */ - private String title = null; /* name */ - private String description = null; /* description */ - - private boolean headCountLimitSet = false; - private int headCount = 1; - - private Map additionalProperties = null; - - private Date effectiveFrom = null; - private Date effectiveTo = null; - - private String typeName = null; - private Map extendedProperties = null; - - - /** - * Default constructor - */ - public PersonRoleProperties() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public PersonRoleProperties(PersonRoleProperties template) - { - if (template != null) - { - this.qualifiedName = template.getQualifiedName(); - this.roleId = template.getRoleId(); - this.scope = template.getScope(); - this.title = template.getTitle(); - this.description = template.getDescription(); - this.headCount = template.getHeadCount(); - this.headCountLimitSet = template.getHeadCountLimitSet(); - this.additionalProperties = template.getAdditionalProperties(); - this.effectiveFrom = template.getEffectiveFrom(); - this.effectiveTo = template.getEffectiveTo(); - this.typeName = template.getTypeName(); - this.extendedProperties = template.getExtendedProperties(); - } - } - - - /** - * Return the unique name for element in open metadata ecosystem. - * - * @return unique name - */ - public String getQualifiedName() - { - return qualifiedName; - } - - - /** - * Set up the unique name for element in open metadata ecosystem. - * - * @param qualifiedName unique name - */ - public void setQualifiedName(String qualifiedName) - { - this.qualifiedName = qualifiedName; - } - - - /** - * Return the unique identifier for this job role/appointment typically from an HR system. - * - * @return unique identifier - */ - public String getRoleId() - { - return roleId; - } - - - /** - * Set up the unique identifier for this job role/appointment. - * - * @param roleId unique identifier - */ - public void setRoleId(String roleId) - { - this.roleId = roleId; - } - - - /** - * Return the context in which the governance officer is appointed. This may be an organizational scope, - * location, or scope of assets. - * - * @return string description - */ - public String getScope() - { - return scope; - } - - - /** - * Set up the context in which the governance officer is appointed. This may be an organizational scope, - * location, or scope of assets. - * - * @param scope string description - */ - public void setScope(String scope) - { - this.scope = scope; - } - - - /** - * Return the job role title. - * - * @return string name - */ - public String getTitle() - { - return title; - } - - - /** - * Set up the job role title. - * - * @param title string name - */ - public void setTitle(String title) - { - this.title = title; - } - - - /** - * Return the description of the job role for this governance appointment. This may relate to the specific - * governance responsibilities, or may be their main role if the governance responsibilities are - * just an adjunct to their main role. - * - * @return string description - */ - public String getDescription() - { - return description; - } - - - /** - * Set up the description of the job role for this governance officer. This may relate to the specific - * governance responsibilities, or may be their main role if the governance responsibilities are - * just an adjunct to their main role. - * - * @param description string description - */ - public void setDescription(String description) - { - this.description = description; - } - - - - /** - * Return the indicator whether the head count limit is set for a person role. - * - * @return boolean flag - */ - public boolean getHeadCountLimitSet() - { - return headCountLimitSet; - } - - - /** - * Set up the indicator whether the head count limit is set for a person role. - * - * @param headCountLimitSet boolean flag - */ - public void setHeadCountLimitSet(boolean headCountLimitSet) - { - this.headCountLimitSet = headCountLimitSet; - } - - - /** - * Return the number of people that can be appointed to this role. - * - * @return int - */ - public int getHeadCount() - { - return headCount; - } - - - /** - * Set up the number of people that can be appointed to this role. - * - * @param headCount int - */ - public void setHeadCount(int headCount) - { - this.headCount = headCount; - } - - - /** - * Return a copy of the additional properties. Null means no additional properties are available. - * - * @return AdditionalProperties - */ - public Map getAdditionalProperties() - { - if (additionalProperties == null) - { - return null; - } - else if (additionalProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(additionalProperties); - } - } - - - /** - * Set up additional properties. - * - * @param additionalProperties Additional properties object - */ - public void setAdditionalProperties(Map additionalProperties) - { - this.additionalProperties = additionalProperties; - } - - - /** - * Return the date/time that this element is effective from (null means effective from the epoch). - * - * @return date object - */ - public Date getEffectiveFrom() - { - return effectiveFrom; - } - - - /** - * Set up the date/time that this element is effective from (null means effective from the epoch). - * - * @param effectiveFrom date object - */ - public void setEffectiveFrom(Date effectiveFrom) - { - this.effectiveFrom = effectiveFrom; - } - - - /** - * Return the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @return date object - */ - public Date getEffectiveTo() - { - return effectiveTo; - } - - - /** - * Set the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @param effectiveTo date object - */ - public void setEffectiveTo(Date effectiveTo) - { - this.effectiveTo = effectiveTo; - } - - - /** - * Return the open metadata type name of this object - this is used to create a subtype of - * the referenceable. Any properties associated with this subtype are passed as extended properties. - * - * @return string type name - */ - public String getTypeName() - { - return typeName; - } - - - /** - * Set up the open metadata type name of this object - this is used to create a subtype of - * the referenceable. Any properties associated with this subtype are passed as extended properties. - * - * @param typeName string type name - */ - public void setTypeName(String typeName) - { - this.typeName = typeName; - } - - - /** - * Return the properties that are defined for a subtype of referenceable but are not explicitly - * supported by the bean. - * - * @return map of properties - */ - public Map getExtendedProperties() - { - if (extendedProperties == null) - { - return null; - } - else if (extendedProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(extendedProperties); - } - } - - - /** - * Set up the properties that are defined for a subtype of referenceable but are not explicitly - * supported by the bean. - * - * @param extendedProperties map of properties - */ - public void setExtendedProperties(Map extendedProperties) - { - this.extendedProperties = extendedProperties; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "PersonRoleProperties{" + - "qualifiedName='" + qualifiedName + '\'' + - ", roleId='" + roleId + '\'' + - ", scope='" + scope + '\'' + - ", title='" + title + '\'' + - ", description='" + description + '\'' + - ", headCountLimitSet=" + headCountLimitSet + - ", headCount=" + headCount + - ", additionalProperties=" + additionalProperties + - ", effectiveFrom=" + effectiveFrom + - ", effectiveTo=" + effectiveTo + - ", typeName='" + typeName + '\'' + - ", extendedProperties=" + extendedProperties + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - PersonRoleProperties that = (PersonRoleProperties) objectToCompare; - return headCountLimitSet == that.headCountLimitSet && - headCount == that.headCount && - Objects.equals(qualifiedName, that.qualifiedName) && - Objects.equals(roleId, that.roleId) && - Objects.equals(scope, that.scope) && - Objects.equals(title, that.title) && - Objects.equals(description, that.description) && - Objects.equals(additionalProperties, that.additionalProperties) && - Objects.equals(effectiveFrom, that.effectiveFrom) && - Objects.equals(effectiveTo, that.effectiveTo) && - Objects.equals(typeName, that.typeName) && - Objects.equals(extendedProperties, that.extendedProperties); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(qualifiedName, roleId, scope, title, description, headCountLimitSet, headCount, additionalProperties, effectiveFrom, effectiveTo, typeName, extendedProperties); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/PersonalProfileProperties.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/PersonalProfileProperties.java deleted file mode 100644 index c8fe43cf5ca..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/PersonalProfileProperties.java +++ /dev/null @@ -1,444 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * The PersonalProfileProperties describes an individual. Information about the - * personal profile is stored as a Person entity in the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class PersonalProfileProperties extends ActorProfileProperties -{ - private String title = null; - private String initials = null; - private String givenNames = null; - private String surname = null; - private String fullName = null; - private String pronouns = null; - private String jobTitle = null; - private String employeeNumber = null; - private String employeeType = null; - private String preferredLanguage = null; - private String residentCountry = null; - private String timeZone = null; - private boolean isPublic = true; - - - /** - * Default Constructor - */ - public PersonalProfileProperties() - { - super(); - } - - - /** - * Copy/clone Constructor - the resulting object. - * - * @param template object being copied - */ - public PersonalProfileProperties(PersonalProfileProperties template) - { - super (template); - - if (template != null) - { - this.title = template.getTitle(); - this.initials = template.getInitials(); - this.givenNames = template.getGivenNames(); - this.surname = template.getSurname(); - this.fullName = template.getFullName(); - this.pronouns = template.getPronouns(); - this.jobTitle = template.getJobTitle(); - this.employeeNumber = template.getEmployeeNumber(); - this.employeeType = template.getEmployeeType(); - this.preferredLanguage = template.getPreferredLanguage(); - this.residentCountry = template.getResidentCountry(); - this.timeZone = template.getTimeZone(); - this.isPublic = template.getIsPublic(); - } - } - - - /** - * Return the courtesy title. - * - * @return string - */ - public String getTitle() - { - return title; - } - - - /** - * Set up the courtesy title. - * - * @param title string - */ - public void setTitle(String title) - { - this.title = title; - } - - - /** - * Return the person's initials (first letter of each given name). - * - * @return string - */ - public String getInitials() - { - return initials; - } - - - /** - * Set up the person's initials (first letter of each given name). - * - * @param initials string - */ - public void setInitials(String initials) - { - this.initials = initials; - } - - - /** - * Return the list of given names. - * - * @return string - */ - public String getGivenNames() - { - return givenNames; - } - - - /** - * Set up the list of given names. - * - * @param givenNames string - */ - public void setGivenNames(String givenNames) - { - this.givenNames = givenNames; - } - - - /** - * Return the last, or family name of the person. - * - * @return string - */ - public String getSurname() - { - return surname; - } - - - /** - * Set up the last, or family name of the person. - * - * @param surname string - */ - public void setSurname(String surname) - { - this.surname = surname; - } - - - /** - * Return the full legal name for this person. - * - * @return string name - */ - public String getFullName() - { - return fullName; - } - - - /** - * Set up the full legal name for this person. - * - * @param fullName string name - */ - public void setFullName(String fullName) - { - this.fullName = fullName; - } - - - /** - * Return the person's pronouns preference. - * - * @return string - */ - public String getPronouns() - { - return pronouns; - } - - - /** - * Set up the person's pronouns preference. - * - * @param pronouns string - */ - public void setPronouns(String pronouns) - { - this.pronouns = pronouns; - } - - - /** - * Return the primary job title for this person. - * - * @return string title - */ - public String getJobTitle() - { - return jobTitle; - } - - - /** - * Set up the primary job title for this person. - * - * @param jobTitle string title - */ - public void setJobTitle(String jobTitle) - { - this.jobTitle = jobTitle; - } - - - /** - * Return the person's employee number (aka personnel number, serial number). - * - * @return string - */ - public String getEmployeeNumber() - { - return employeeNumber; - } - - - /** - * Set up the person's employee number (aka personnel number, serial number). - * - * @param employeeNumber string - */ - public void setEmployeeNumber(String employeeNumber) - { - this.employeeNumber = employeeNumber; - } - - - /** - * Return the type of employee contract such as full-time, part-time, that the person holds. - * - * @return string - */ - public String getEmployeeType() - { - return employeeType; - } - - - /** - * Set up the type of employee contract such as full-time, part-time, that the person holds. - * - * @param employeeType string - */ - public void setEmployeeType(String employeeType) - { - this.employeeType = employeeType; - } - - - /** - * Return the person's preferred speaking/written language for communicating with them. - * - * @return string - */ - public String getPreferredLanguage() - { - return preferredLanguage; - } - - - /** - * Set up the person's preferred speaking/written language for communicating with them. - * - * @param preferredLanguage string - */ - public void setPreferredLanguage(String preferredLanguage) - { - this.preferredLanguage = preferredLanguage; - } - - - /** - * Return the name of the country that is the person's primary residence. - * - * @return string - */ - public String getResidentCountry() - { - return residentCountry; - } - - - /** - * Set up the name of the country that is the person's primary residence. - * - * @param residentCountry string - */ - public void setResidentCountry(String residentCountry) - { - this.residentCountry = residentCountry; - } - - - /** - * Return the time zone that the person is located in. - * - * @return string - */ - public String getTimeZone() - { - return timeZone; - } - - - /** - * Set up the time zone that the person is located in. - * - * @param timeZone string - */ - public void setTimeZone(String timeZone) - { - this.timeZone = timeZone; - } - - - /** - * Return the flag to indicate whether the profile is public or not. - * - * @return boolean flag - */ - public boolean getIsPublic() - { - return isPublic; - } - - - /** - * Set up the flag to indicate whether the profile is public or not. - * - * @param aPublic boolean flag - */ - public void setIsPublic(boolean aPublic) - { - isPublic = aPublic; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "PersonalProfileProperties{" + - "title='" + title + '\'' + - ", initials='" + initials + '\'' + - ", givenName='" + givenNames + '\'' + - ", surname='" + surname + '\'' + - ", fullName='" + fullName + '\'' + - ", pronouns='" + pronouns + '\'' + - ", jobTitle='" + jobTitle + '\'' + - ", employeeNumber='" + employeeNumber + '\'' + - ", employeeType='" + employeeType + '\'' + - ", preferredLanguage='" + preferredLanguage + '\'' + - ", residentCountry='" + residentCountry + '\'' + - ", timeZone='" + timeZone + '\'' + - ", isPublic=" + isPublic + - ", knownName='" + getKnownName() + '\'' + - ", description='" + getDescription() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (! (objectToCompare instanceof PersonalProfileProperties that)) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - return isPublic == that.isPublic && - Objects.equals(title, that.title) && - Objects.equals(initials, that.initials) && - Objects.equals(givenNames, that.givenNames) && - Objects.equals(surname, that.surname) && - Objects.equals(fullName, that.fullName) && - Objects.equals(pronouns, that.pronouns) && - Objects.equals(jobTitle, that.jobTitle) && - Objects.equals(employeeNumber, that.employeeNumber) && - Objects.equals(employeeType, that.employeeType) && - Objects.equals(preferredLanguage, that.preferredLanguage) && - Objects.equals(residentCountry, that.residentCountry) && - Objects.equals(timeZone, that.timeZone); - } - - - /** - * Just use the GUID for the hash code as it should be unique. - * - * @return int code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), title, initials, givenNames, surname, fullName, pronouns, jobTitle, employeeNumber, employeeType, - preferredLanguage, residentCountry, timeZone, isPublic); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/ReferenceableProperties.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/ReferenceableProperties.java deleted file mode 100644 index 44f38890f64..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/ReferenceableProperties.java +++ /dev/null @@ -1,291 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.governanceprogram.properties; - -import com.fasterxml.jackson.annotation.*; - -import java.util.Date; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ReferenceableProperties provides a structure for passing a referenceables' properties over the Java API. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes( - { - @JsonSubTypes.Type(value = ExecutionPointProperties.class, name = "ExecutionPointProperties"), - @JsonSubTypes.Type(value = ExternalReferenceProperties.class, name = "ExternalReferenceProperties"), - @JsonSubTypes.Type(value = GovernanceDomainProperties.class, name = "GovernanceDomainProperties"), - @JsonSubTypes.Type(value = GovernanceDomainSetProperties.class, name = "GovernanceDomainSetProperties"), - @JsonSubTypes.Type(value = GovernanceLevelIdentifierProperties.class, name = "GovernanceLevelIdentifierProperties"), - @JsonSubTypes.Type(value = GovernanceLevelIdentifierSetProperties.class, name = "GovernanceLevelIdentifierSetProperties"), - @JsonSubTypes.Type(value = GovernanceMetricProperties.class, name = "GovernanceMetricProperties"), - @JsonSubTypes.Type(value = GovernanceZoneProperties.class, name = "GovernanceZoneProperties"), - @JsonSubTypes.Type(value = SubjectAreaProperties.class, name = "SubjectAreaProperties") - }) -public abstract class ReferenceableProperties -{ - private String qualifiedName = null; - private Map additionalProperties = null; - - private Date effectiveFrom = null; - private Date effectiveTo = null; - - private String typeName = null; - private Map extendedProperties = null; - - /** - * Default constructor - */ - public ReferenceableProperties() - { - super(); - } - - - /** - * Copy/clone constructor. Retrieves the values from the supplied template - * - * @param template element to copy - */ - public ReferenceableProperties(ReferenceableProperties template) - { - if (template != null) - { - qualifiedName = template.getQualifiedName(); - additionalProperties = template.getAdditionalProperties(); - - effectiveFrom = template.getEffectiveFrom(); - effectiveTo = template.getEffectiveTo(); - - typeName = template.getTypeName(); - extendedProperties = template.getExtendedProperties(); - } - } - - - /** - * Set up the fully qualified name. - * - * @param qualifiedName String name - */ - public void setQualifiedName(String qualifiedName) - { - this.qualifiedName = qualifiedName; - } - - - /** - * Returns the stored qualified name property for the metadata entity. - * If no qualified name is available then the empty string is returned. - * - * @return qualifiedName - */ - public String getQualifiedName() - { - return qualifiedName; - } - - - /** - * Set up additional properties. - * - * @param additionalProperties Additional properties object - */ - public void setAdditionalProperties(Map additionalProperties) - { - this.additionalProperties = additionalProperties; - } - - - /** - * Return a copy of the additional properties. Null means no additional properties are available. - * - * @return AdditionalProperties - */ - public Map getAdditionalProperties() - { - if (additionalProperties == null) - { - return null; - } - else if (additionalProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(additionalProperties); - } - } - - - /** - * Return the date/time that this element is effective from (null means effective from the epoch). - * - * @return date object - */ - public Date getEffectiveFrom() - { - return effectiveFrom; - } - - - /** - * Set up the date/time that this element is effective from (null means effective from the epoch). - * - * @param effectiveFrom date object - */ - public void setEffectiveFrom(Date effectiveFrom) - { - this.effectiveFrom = effectiveFrom; - } - - - /** - * Return the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @return date object - */ - public Date getEffectiveTo() - { - return effectiveTo; - } - - - /** - * Set the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @param effectiveTo date object - */ - public void setEffectiveTo(Date effectiveTo) - { - this.effectiveTo = effectiveTo; - } - - - /** - * Return the name of the open metadata type for this metadata element. - * - * @return string name - */ - public String getTypeName() - { - return typeName; - } - - - /** - * Set up the name of the open metadata type for this element. - * - * @param typeName string name - */ - public void setTypeName(String typeName) - { - this.typeName = typeName; - } - - - /** - * Return the properties that have been defined for a subtype of this object that are not supported explicitly - * by this bean. - * - * @return property map - */ - public Map getExtendedProperties() - { - if (extendedProperties == null) - { - return null; - } - else if (extendedProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(extendedProperties); - } - } - - - /** - * Set up the properties that have been defined for a subtype of this object that are not supported explicitly - * by this bean. - * - * @param extendedProperties property map - */ - public void setExtendedProperties(Map extendedProperties) - { - this.extendedProperties = extendedProperties; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "ReferenceableProperties{" + - "qualifiedName='" + qualifiedName + '\'' + - ", additionalProperties=" + additionalProperties + - ", effectiveFrom=" + effectiveFrom + - ", effectiveTo=" + effectiveTo + - ", typeName='" + typeName + '\'' + - ", extendedProperties=" + extendedProperties + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ReferenceableProperties that = (ReferenceableProperties) objectToCompare; - return Objects.equals(qualifiedName, that.qualifiedName) && - Objects.equals(additionalProperties, that.additionalProperties) && - Objects.equals(effectiveFrom, that.effectiveFrom) && - Objects.equals(effectiveTo, that.effectiveTo) && - Objects.equals(typeName, that.typeName) && - Objects.equals(extendedProperties, that.extendedProperties); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(qualifiedName, additionalProperties, effectiveFrom, effectiveTo, typeName, extendedProperties); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/RelationshipProperties.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/RelationshipProperties.java deleted file mode 100644 index df05573359b..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/RelationshipProperties.java +++ /dev/null @@ -1,203 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; - -import java.util.Date; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * RelationshipProperties provides the base class for relationships items. This provides extended properties with the ability to - * set effectivity dates. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes( - { - @JsonSubTypes.Type(value = ResourceListProperties.class, name = "ResourceListProperties"), - @JsonSubTypes.Type(value = AssignmentScopeProperties.class, name = "AssignmentScopeProperties"), - @JsonSubTypes.Type(value = StakeholderProperties.class, name = "StakeholderProperties"), - @JsonSubTypes.Type(value = SupportingDefinitionProperties.class, name = "SupportingDefinitionProperties"), - @JsonSubTypes.Type(value = PeerDefinitionProperties.class, name = "PeerDefinitionProperties"), - @JsonSubTypes.Type(value = LicenseProperties.class, name = "LicenseProperties"), - @JsonSubTypes.Type(value = CertificationProperties.class, name = "CertificationProperties"), - @JsonSubTypes.Type(value = ExternalReferenceLinkProperties.class, name = "ExternalReferenceLinkProperties"), - @JsonSubTypes.Type(value = GovernanceDefinitionMetricProperties.class, name = "GovernanceDefinitionMetricProperties"), - @JsonSubTypes.Type(value = GovernanceResultsProperties.class, name = "GovernanceResultsProperties"), - }) -public class RelationshipProperties -{ - private Date effectiveFrom = null; - private Date effectiveTo = null; - - private Map extendedProperties = null; - - - /** - * Default constructor - */ - public RelationshipProperties() - { - super(); - } - - - /** - * Copy/clone constructor. Retrieve values from the supplied template - * - * @param template element to copy - */ - public RelationshipProperties(RelationshipProperties template) - { - if (template != null) - { - effectiveFrom = template.getEffectiveFrom(); - effectiveTo = template.getEffectiveTo(); - extendedProperties = template.getExtendedProperties(); - } - } - - - /** - * Return the date/time that this element is effective from (null means effective from the epoch). - * - * @return date object - */ - public Date getEffectiveFrom() - { - return effectiveFrom; - } - - - /** - * Set up the date/time that this element is effective from (null means effective from the epoch). - * - * @param effectiveFrom date object - */ - public void setEffectiveFrom(Date effectiveFrom) - { - this.effectiveFrom = effectiveFrom; - } - - - /** - * Return the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @return date object - */ - public Date getEffectiveTo() - { - return effectiveTo; - } - - - /** - * Set the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @param effectiveTo date object - */ - public void setEffectiveTo(Date effectiveTo) - { - this.effectiveTo = effectiveTo; - } - - - /** - * Return the properties that have been defined for a subtype of this object that are not supported explicitly - * by this bean. - * - * @return property map - */ - public Map getExtendedProperties() - { - if (extendedProperties == null) - { - return null; - } - else if (extendedProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(extendedProperties); - } - } - - - /** - * Set up the properties that have been defined for a subtype of this object that are not supported explicitly - * by this bean. - * - * @param extendedProperties property map - */ - public void setExtendedProperties(Map extendedProperties) - { - this.extendedProperties = extendedProperties; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "RelationshipProperties{" + - "effectiveFrom=" + effectiveFrom + - ", effectiveTo=" + effectiveTo + - ", extendedProperties=" + extendedProperties + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - RelationshipProperties that = (RelationshipProperties) objectToCompare; - return Objects.equals(effectiveFrom, that.effectiveFrom) && - Objects.equals(effectiveTo, that.effectiveTo); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(effectiveFrom, effectiveTo); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/ResourceListProperties.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/ResourceListProperties.java deleted file mode 100644 index d449e24194f..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/ResourceListProperties.java +++ /dev/null @@ -1,202 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.properties; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ResourceListProperties provides a details of why an element providing resources (such as a community) has been attached to an initiative - * such as a governance domain. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ResourceListProperties extends RelationshipProperties -{ - String resourceUse = null; - String resourceUseDescription = null; - Map resourceUseProperties = null; - boolean watchResource = false; - - /** - * Default constructor - */ - public ResourceListProperties() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ResourceListProperties(ResourceListProperties template) - { - super(template); - - if (template != null) - { - this.resourceUse = template.getResourceUse(); - this.resourceUseDescription = template.getResourceUseDescription(); - this.resourceUseProperties = template.getResourceUseProperties(); - this.watchResource = template.getWatchResource(); - } - } - - - /** - * Return the identifier that describes the type of resource use. (Use ResourceUse enum in GAF). - * - * @return string - */ - public String getResourceUse() - { - return resourceUse; - } - - - /** - * Set up identifier that describes the type of resource use. (Use ResourceUse enum in GAF). - * - * @param resourceUse string - */ - public void setResourceUse(String resourceUse) - { - this.resourceUse = resourceUse; - } - - - /** - * Return the description of how the resource is used, or why it is useful. - * - * @return string - */ - public String getResourceUseDescription() - { - return resourceUseDescription; - } - - - /** - * Set up the description of how the resource is used, or why it is useful. - * - * @param resourceUseDescription string - */ - public void setResourceUseDescription(String resourceUseDescription) - { - this.resourceUseDescription = resourceUseDescription; - } - - - /** - * Return any additional properties that explains how to use the resource. - * - * @return map - */ - public Map getResourceUseProperties() - { - return resourceUseProperties; - } - - - /** - * Set up any additional properties that explains how to use the resource. - * - * @param resourceUseProperties map - */ - public void setResourceUseProperties(Map resourceUseProperties) - { - this.resourceUseProperties = resourceUseProperties; - } - - - /** - * Return whether changes to the resource result in notifications to the initiative. - * - * @return flag - */ - public boolean getWatchResource() - { - return watchResource; - } - - - /** - * Set up whether changes to the resource result in notifications to the initiative. - * - * @param watchResource flag - */ - public void setWatchResource(boolean watchResource) - { - this.watchResource = watchResource; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ResourceListProperties{" + - "resourceUse='" + resourceUse + '\'' + - "resourceUseDescription='" + resourceUseDescription + '\'' + - "resourceUseProperties='" + resourceUseProperties + '\'' + - ", watchResource=" + watchResource + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - ResourceListProperties that = (ResourceListProperties) objectToCompare; - return watchResource == that.watchResource && - Objects.equals(resourceUse, that.resourceUse) && - Objects.equals(resourceUseDescription, that.resourceUseDescription) && - Objects.equals(resourceUseProperties, that.resourceUseProperties); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), resourceUse, resourceUseDescription, resourceUseProperties, watchResource); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/SecurityGroupProperties.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/SecurityGroupProperties.java deleted file mode 100644 index 3d71a2187da..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/SecurityGroupProperties.java +++ /dev/null @@ -1,135 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * SecurityGroupProperties defines a security group technical control. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class SecurityGroupProperties extends GovernanceDefinitionProperties -{ - private String distinguishedName = null; - - - /** - * Default Constructor - */ - public SecurityGroupProperties() - { - } - - - /** - * Copy/Clone Constructor - * - * @param template object to copy - */ - public SecurityGroupProperties(SecurityGroupProperties template) - { - super(template); - - if (template != null) - { - this.distinguishedName = template.getDistinguishedName(); - } - } - - - /** - * Return the specific distinguishedName of the license. - * - * @return string description - */ - public String getDistinguishedName() - { - return distinguishedName; - } - - - /** - * Set up the specific distinguishedName of the license. - * - * @param distinguishedName string description - */ - public void setDistinguishedName(String distinguishedName) - { - this.distinguishedName = distinguishedName; - } - - - /** - * JSON-style toString - * - * @return string containing the properties and their values - */ - @Override - public String toString() - { - return "SecurityGroupProperties{" + - "typeName='" + getTypeName() + '\'' + - ", documentIdentifier='" + getDocumentIdentifier() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", extendedProperties=" + getExtendedProperties() + - ", title='" + getTitle() + '\'' + - ", summary='" + getSummary() + '\'' + - ", description='" + getDescription() + '\'' + - ", scope='" + getScope() + '\'' + - ", domainIdentifier=" + getDomainIdentifier() + - ", priority='" + getPriority() + '\'' + - ", implications=" + getImplications() + - ", outcomes=" + getOutcomes() + - ", results=" + getResults() + - ", distinguishedName='" + distinguishedName + '\'' + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - SecurityGroupProperties that = (SecurityGroupProperties) objectToCompare; - return Objects.equals(distinguishedName, that.distinguishedName); - } - - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), distinguishedName); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/SecurityTagsProperties.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/SecurityTagsProperties.java deleted file mode 100644 index ecc01572f98..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/SecurityTagsProperties.java +++ /dev/null @@ -1,172 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.governanceprogram.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.*; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * SecurityTags holds the list of labels and properties used by a security enforcement engine to control access - * and visibility to the contents of the real-world object described by the Referenceable. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class SecurityTagsProperties -{ - private List securityLabels = null; - private Map securityProperties = null; - - - /** - * Default constructor - */ - public SecurityTagsProperties() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public SecurityTagsProperties(SecurityTagsProperties template) - { - super(); - - if (template != null) - { - this.securityLabels = template.getSecurityLabels(); - this.securityProperties = template.getSecurityProperties(); - } - } - - - /** - * Return the list of security labels attached to the element. - * - * @return list of label strings - */ - public List getSecurityLabels() - { - if (securityLabels == null) - { - return null; - } - else if (securityLabels.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(securityLabels); - } - } - - - /** - * Set up the list of security labels for the element. - * - * @param securityLabels list of label strings - */ - public void setSecurityLabels(List securityLabels) - { - this.securityLabels = securityLabels; - } - - - /** - * Return the security properties associated with the element. These are name-value pairs. - * - * @return map of properties - */ - public Map getSecurityProperties() - { - if (securityProperties == null) - { - return null; - } - else if (securityProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(securityProperties); - } - } - - - /** - * Set up the security properties associated with the element. These are name-value pairs. - * - * @param securityProperties map of properties - */ - public void setSecurityProperties(Map securityProperties) - { - this.securityProperties = securityProperties; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "SecurityTagsProperties{" + - "securityLabels=" + securityLabels + - ", securityProperties=" + securityProperties + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - SecurityTagsProperties that = (SecurityTagsProperties) objectToCompare; - return Objects.equals(securityLabels, that.securityLabels) && - Objects.equals(securityProperties, that.securityProperties); - } - - - /** - * Create a hash code for this element type. - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), securityLabels, securityProperties); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/StakeholderProperties.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/StakeholderProperties.java deleted file mode 100644 index 0e0d81b121b..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/StakeholderProperties.java +++ /dev/null @@ -1,125 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.properties; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * StakeholderProperties provides a details of a stakeholder for an initiative. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class StakeholderProperties extends RelationshipProperties -{ - String stakeholderRole = null; - - /** - * Default constructor - */ - public StakeholderProperties() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public StakeholderProperties(StakeholderProperties template) - { - super(template); - - if (template != null) - { - this.stakeholderRole = template.getStakeholderRole(); - } - } - - - /** - * Return the role of the stakeholder to the initiative. - * - * @return role type - */ - public String getStakeholderRole() - { - return stakeholderRole; - } - - - /** - * Set up the role of the stakeholder to the initiative. - * - * @param stakeholderRole role type - */ - public void setStakeholderRole(String stakeholderRole) - { - this.stakeholderRole = stakeholderRole; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "StakeholderProperties{" + - "effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", extendedProperties=" + getExtendedProperties() + - ", stakeholderRole='" + stakeholderRole + '\'' + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - StakeholderProperties that = (StakeholderProperties) objectToCompare; - return Objects.equals(stakeholderRole, that.stakeholderRole); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), stakeholderRole); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/SubjectAreaClassificationProperties.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/SubjectAreaClassificationProperties.java deleted file mode 100644 index c41d6c99ff5..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/SubjectAreaClassificationProperties.java +++ /dev/null @@ -1,116 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.properties; - -import java.util.Objects; - -/** - * A subject area defines a group of definitions for governing assets related to a specific topic. The subject area definition defines - * how the assets related to the topic should be managed. - */ -public class SubjectAreaClassificationProperties extends ClassificationProperties -{ - private String subjectAreaName = null; - - - /** - * Default constructor - */ - public SubjectAreaClassificationProperties() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public SubjectAreaClassificationProperties(SubjectAreaClassificationProperties template) - { - super(template); - - if (template != null) - { - this.subjectAreaName = template.getSubjectAreaName(); - } - } - - - /** - * Return the name of the subject area - this is added to the SubjectArea classification. - * - * @return string name - */ - public String getSubjectAreaName() - { - return subjectAreaName; - } - - - /** - * Set up the name of the subject area - this is added to the SubjectArea classification. - * - * @param subjectAreaName string name - */ - public void setSubjectAreaName(String subjectAreaName) - { - this.subjectAreaName = subjectAreaName; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "SubjectAreaClassificationProperties{" + - "effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", extendedProperties=" + getExtendedProperties() + - ", subjectAreaName='" + subjectAreaName + '\'' + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (! (objectToCompare instanceof SubjectAreaClassificationProperties)) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - SubjectAreaClassificationProperties that = (SubjectAreaClassificationProperties) objectToCompare; - return Objects.equals(subjectAreaName, that.subjectAreaName); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), getSubjectAreaName()); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/SubjectAreaProperties.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/SubjectAreaProperties.java deleted file mode 100644 index d58e2c78e37..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/SubjectAreaProperties.java +++ /dev/null @@ -1,247 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.properties; - -import java.util.Objects; - -/** - * A subject area defines a group of definitions for governing assets related to a specific topic. The subject area definition defines - * how the assets related to the topic should be managed. - */ -public class SubjectAreaProperties extends ReferenceableProperties -{ - private String subjectAreaName = null; - private String displayName = null; - private String description = null; - private String usage = null; - private String scope = null; - private int domainIdentifier = 0; - - - /** - * Default constructor - */ - public SubjectAreaProperties() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public SubjectAreaProperties(SubjectAreaProperties template) - { - super(template); - - if (template != null) - { - this.subjectAreaName = template.getSubjectAreaName(); - this.displayName = template.getDisplayName(); - this.description = template.getDescription(); - this.usage = template.getUsage(); - this.scope = template.getScope(); - this.domainIdentifier = template.getDomainIdentifier(); - } - } - - - /** - * Return the name of the subject area - this is added to the SubjectArea classification. - * - * @return string name - */ - public String getSubjectAreaName() - { - return subjectAreaName; - } - - - /** - * Set up the name of the subject area - this is added to the SubjectArea classification. - * - * @param subjectAreaName string name - */ - public void setSubjectAreaName(String subjectAreaName) - { - this.subjectAreaName = subjectAreaName; - } - - - /** - * Return the short name for the governance zone. - * - * @return string name - */ - public String getDisplayName() - { - return displayName; - } - - - /** - * Set up the short name for the governance zone. - * - * @param displayName string name - */ - public void setDisplayName(String displayName) - { - this.displayName = displayName; - } - - - /** - * Return the description for the governance zone - * - * @return text - */ - public String getDescription() - { - return description; - } - - - /** - * Set up the description of the governance zone - * - * @param description text - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * Return details of the usage of this subject area. - * - * @return text - */ - public String getUsage() - { - return usage; - } - - - /** - * Set up the details of the usage of this subject area. - * - * @param usage text - */ - public void setUsage(String usage) - { - this.usage = usage; - } - - - /** - * Return the definition of the scope of this subject area - * - * @return scope definition - */ - public String getScope() - { - return scope; - } - - - /** - * Set up the scope definition - * - * @param scope string definition - */ - public void setScope(String scope) - { - this.scope = scope; - } - - - /** - * Return the identifier of the governance domain that this subject area is managed by. - * - * @return int identifier - */ - public int getDomainIdentifier() - { - return domainIdentifier; - } - - - /** - * Set up the identifier of the governance domain that this subject area is managed by. - * - * @param domainIdentifier int identifier - */ - public void setDomainIdentifier(int domainIdentifier) - { - this.domainIdentifier = domainIdentifier; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "SubjectAreaProperties{" + - "typeName='" + getTypeName() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", extendedProperties=" + getExtendedProperties() + - ", subjectAreaName='" + subjectAreaName + '\'' + - ", displayName='" + displayName + '\'' + - ", description='" + description + '\'' + - ", usage='" + usage + '\'' + - ", scope='" + scope + '\'' + - ", domainIdentifier=" + domainIdentifier + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - SubjectAreaProperties that = (SubjectAreaProperties) objectToCompare; - return domainIdentifier == that.domainIdentifier && - Objects.equals(subjectAreaName, that.subjectAreaName) && - Objects.equals(displayName, that.displayName) && - Objects.equals(description, that.description) && - Objects.equals(usage, that.usage) && - Objects.equals(scope, that.scope); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), getSubjectAreaName(), getDisplayName(), getDescription(), getUsage(), getScope(), getDomainIdentifier()); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/SupplementaryProperties.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/SupplementaryProperties.java deleted file mode 100644 index dd66297589f..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/SupplementaryProperties.java +++ /dev/null @@ -1,239 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.governanceprogram.properties; - -import com.fasterxml.jackson.annotation.*; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * SupplementaryProperties describe additional information about a technical element (typically assets and schemas) - * that has been added as part of a governance process. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes( - { - @JsonSubTypes.Type(value = AssetProperties.class, name = "AssetProperties"), - }) -public class SupplementaryProperties extends ReferenceableProperties -{ - private String displayName = null; - private String summary = null; - private String description = null; - private String abbreviation = null; - private String usage = null; - - - /** - * Default constructor - */ - public SupplementaryProperties() - { - } - - - /** - * Copy/clone constructor. Note, this is a deep copy - * - * @param template object to copy - */ - public SupplementaryProperties(SupplementaryProperties template) - { - super(template); - - if (template != null) - { - displayName = template.getDisplayName(); - summary = template.getSummary(); - description = template.getDescription(); - abbreviation = template.getAbbreviation(); - usage = template.getUsage(); - } - } - - - /** - * Returns the stored display name property for the technical element. - * If no display name is available then null is returned. - * - * @return String name - */ - public String getDisplayName() - { - return displayName; - } - - - /** - * Set up the stored display name property for the technical element. - * - * @param displayName String name - */ - public void setDisplayName(String displayName) - { - this.displayName = displayName; - } - - - /** - * Return the short (1-2 sentence) description of the technical element. - * - * @return string text - */ - public String getSummary() - { - return summary; - } - - - /** - * Set up the short (1-2 sentence) description of the technical element. - * - * @param summary string text - */ - public void setSummary(String summary) - { - this.summary = summary; - } - - - /** - * Returns the stored description property for the technical element. - * If no description is provided then null is returned. - * - * @return String text - */ - public String getDescription() - { - return description; - } - - - /** - * Set up the stored description property for the technical element. - * - * @param description String text - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * Return the abbreviation used for this technical element. - * - * @return string text - */ - public String getAbbreviation() - { - return abbreviation; - } - - - /** - * Set up the abbreviation used for this technical element. - * - * @param abbreviation string text - */ - public void setAbbreviation(String abbreviation) - { - this.abbreviation = abbreviation; - } - - - /** - * Return details of the expected usage of this technical element. - * - * @return string text - */ - public String getUsage() - { - return usage; - } - - - /** - * Set up details of the expected usage of this technical element. - * - * @param usage string text - */ - public void setUsage(String usage) - { - this.usage = usage; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "SupplementaryProperties{" + - "displayName='" + displayName + '\'' + - ", summary='" + summary + '\'' + - ", description='" + description + '\'' + - ", abbreviation='" + abbreviation + '\'' + - ", usage='" + usage + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - SupplementaryProperties that = (SupplementaryProperties) objectToCompare; - return Objects.equals(getDisplayName(), that.getDisplayName()) && - Objects.equals(getSummary(), that.getSummary()) && - Objects.equals(getDescription(), that.getDescription()) && - Objects.equals(getAbbreviation(), that.getAbbreviation()) && - Objects.equals(getUsage(), that.getUsage()); - } - - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), getDisplayName(), getSummary(), getDescription(), getAbbreviation(), getUsage()); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/TeamProfileProperties.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/TeamProfileProperties.java deleted file mode 100644 index 168a4e5893e..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/TeamProfileProperties.java +++ /dev/null @@ -1,135 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.properties; - -import com.fasterxml.jackson.annotation.*; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * The PersonalProfileProperties describes an individual. Information about the - * personal profile is stored as an Person entity in the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes( - { - @JsonSubTypes.Type(value = OrganizationProfileProperties.class, name = "OrganizationProfileProperties") - }) -public class TeamProfileProperties extends ActorProfileProperties -{ - private String teamType = null; - - - /** - * Default Constructor - */ - public TeamProfileProperties() - { - super(); - } - - - /** - * Copy/clone Constructor - the resulting object. - * - * @param template object being copied - */ - public TeamProfileProperties(TeamProfileProperties template) - { - super (template); - - if (template != null) - { - this.teamType = template.getTeamType(); - } - } - - - /** - * Return the type of team. - * - * @return string name - */ - public String getTeamType() - { - return teamType; - } - - - /** - * Set up the type of team. - * - * @param teamType string name - */ - public void setTeamType(String teamType) - { - this.teamType = teamType; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "TeamProfileProperties{" + - "teamType='" + teamType + '\'' + - ", knownName='" + getKnownName() + '\'' + - ", description='" + getDescription() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - TeamProfileProperties that = (TeamProfileProperties) objectToCompare; - return Objects.equals(teamType, that.teamType); - } - - - /** - * Just use the GUID for the hash code as it should be unique. - * - * @return int code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), teamType); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/UserIdentityProperties.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/UserIdentityProperties.java deleted file mode 100644 index 86e6780b65d..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/UserIdentityProperties.java +++ /dev/null @@ -1,152 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * UserIdentityProperties describes an element that is linked to a single userId. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class UserIdentityProperties extends ReferenceableProperties -{ - private String userId = null; - private String distinguishedName = null; - - - /** - * Default constructor - */ - public UserIdentityProperties() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public UserIdentityProperties(UserIdentityProperties template) - { - super(template); - - if (template != null) - { - this.userId = template.getUserId(); - this.distinguishedName = template.getDistinguishedName(); - } - } - - - /** - * Return the identifier of the user's account - * - * @return string - */ - public String getUserId() - { - return userId; - } - - - /** - * Return the identifier of the user's account. - * - * @param userId string - */ - public void setUserId(String userId) - { - this.userId = userId; - } - - - /** - * Return the unique name in LDAP. - * - * @return string name - */ - public String getDistinguishedName() - { - return distinguishedName; - } - - - /** - * Set up the unique name in LDAP. - * - * @param distinguishedName string name - */ - public void setDistinguishedName(String distinguishedName) - { - this.distinguishedName = distinguishedName; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "UserIdentityProperties{" + - "qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - ", userId='" + userId + '\'' + - ", distinguishedName='" + distinguishedName + '\'' + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - UserIdentityProperties that = (UserIdentityProperties) objectToCompare; - return Objects.equals(userId, that.userId) && - Objects.equals(distinguishedName, that.distinguishedName); - } - - - /** - * Just use the GUID for the hash code as it should be unique. - * - * @return int code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), userId, distinguishedName); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/package-info.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/package-info.java deleted file mode 100644 index ff6c5a58805..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -/** - * These beans describe the core properties that are passed to the server to create and update metadata. - */ -package org.odpi.openmetadata.accessservices.governanceprogram.properties; diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/AppointmentRequestBody.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/AppointmentRequestBody.java deleted file mode 100644 index a25dcc6f227..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/AppointmentRequestBody.java +++ /dev/null @@ -1,148 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Date; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * AppointmentRequestBody provides a structure for appointing a person to a role. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class AppointmentRequestBody extends GovernanceProgramOMASAPIRequestBody -{ - private String profileGUID = null; - private Date effectiveDate = null; - - - /** - * Default constructor - */ - public AppointmentRequestBody() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public AppointmentRequestBody(AppointmentRequestBody template) - { - super(template); - - if (template != null) - { - this.profileGUID = template.getProfileGUID(); - this.effectiveDate = template.getEffectiveDate(); - } - } - - - /** - * Return the unique employee number for this governance officer. - * - * @return String identifier - */ - public String getProfileGUID() - { - return profileGUID; - } - - - /** - * Set up the unique employee number for this governance officer. - * - * @param guid String identifier - */ - public void setProfileGUID(String guid) - { - this.profileGUID = guid; - } - - - /** - * Return the date that this action is effective. - * - * @return date - */ - public Date getEffectiveDate() - { - return effectiveDate; - } - - - /** - * Set up the date that this action is effective. - * - * @param effectiveDate date - */ - public void setEffectiveDate(Date effectiveDate) - { - this.effectiveDate = effectiveDate; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "AppointmentRequestBody{" + - "profileGUID='" + profileGUID + '\'' + - ", effectiveDate=" + effectiveDate + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - AppointmentRequestBody that = (AppointmentRequestBody) objectToCompare; - return Objects.equals(profileGUID, that.profileGUID) && - Objects.equals(effectiveDate, that.effectiveDate); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(profileGUID, effectiveDate); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/CertificateIdRequestBody.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/CertificateIdRequestBody.java deleted file mode 100644 index 1693bec30dc..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/CertificateIdRequestBody.java +++ /dev/null @@ -1,123 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Date; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * CertificateIdRequestBody provides a structure for the unique certificate identifier. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class CertificateIdRequestBody extends GovernanceProgramOMASAPIRequestBody -{ - private String certificateId = null; - - - /** - * Default constructor - */ - public CertificateIdRequestBody() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public CertificateIdRequestBody(CertificateIdRequestBody template) - { - super(template); - - if (template != null) - { - this.certificateId = template.getCertificateId(); - } - } - - - /** - * Return the unique identifier for the certificate from the certificate authority. - * - * @return String identifier - */ - public String getCertificateId() - { - return certificateId; - } - - - /** - * Set up the unique identifier for the certificate from the certificate authority. - * - * @param certificateId String identifier - */ - public void setCertificateId(String certificateId) - { - this.certificateId = certificateId; - } - - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "CertificateIdRequestBody{" + - "certificateId='" + certificateId + '\'' + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - CertificateIdRequestBody that = (CertificateIdRequestBody) objectToCompare; - return Objects.equals(certificateId, that.certificateId); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(certificateId); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/CertificationListResponse.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/CertificationListResponse.java deleted file mode 100644 index ad5a7236c70..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/CertificationListResponse.java +++ /dev/null @@ -1,149 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.CertificationElement; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * CertificationTypeListResponse is the response structure used on the OMAS REST API calls that return a - * list of certifications as a response. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class CertificationListResponse extends GovernanceProgramOMASAPIResponse -{ - private List elements = null; - - - /** - * Default constructor - */ - public CertificationListResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public CertificationListResponse(CertificationListResponse template) - { - super(template); - - if (template != null) - { - this.elements = template.getElements(); - } - } - - - /** - * Return the list of certification types. - * - * @return list of objects or null - */ - public List getElements() - { - if (elements == null) - { - return null; - } - else if (elements.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elements); - } - } - - - /** - * Set up the list of certification types. - * - * @param elements - list of objects or null - */ - public void setElements(List elements) - { - this.elements = elements; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "CertificationListResponse{" + - "elements=" + elements + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof CertificationListResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - CertificationListResponse that = (CertificationListResponse) objectToCompare; - return Objects.equals(this.getElements(), that.getElements()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(elements, super.hashCode()); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/CertificationTypeListResponse.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/CertificationTypeListResponse.java deleted file mode 100644 index a3227772226..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/CertificationTypeListResponse.java +++ /dev/null @@ -1,149 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.CertificationTypeElement; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * CertificationTypeListResponse is the response structure used on the OMAS REST API calls that return a - * list of certification types as a response. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class CertificationTypeListResponse extends GovernanceProgramOMASAPIResponse -{ - private List elements = null; - - - /** - * Default constructor - */ - public CertificationTypeListResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public CertificationTypeListResponse(CertificationTypeListResponse template) - { - super(template); - - if (template != null) - { - this.elements = template.getElements(); - } - } - - - /** - * Return the list of certification types. - * - * @return list of objects or null - */ - public List getElements() - { - if (elements == null) - { - return null; - } - else if (elements.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elements); - } - } - - - /** - * Set up the list of certification types. - * - * @param elements - list of objects or null - */ - public void setElements(List elements) - { - this.elements = elements; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "CertificationTypeListResponse{" + - "elements=" + elements + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof CertificationTypeListResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - CertificationTypeListResponse that = (CertificationTypeListResponse) objectToCompare; - return Objects.equals(this.getElements(), that.getElements()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(elements, super.hashCode()); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/CertificationTypeRequestBody.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/CertificationTypeRequestBody.java deleted file mode 100644 index b1363b4eb28..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/CertificationTypeRequestBody.java +++ /dev/null @@ -1,145 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.CertificationTypeProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceDefinitionStatus; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * CertificationTypeRequestBody provides a structure used when creating certification types. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class CertificationTypeRequestBody extends GovernanceProgramOMASAPIRequestBody -{ - private CertificationTypeProperties properties = null; - private GovernanceDefinitionStatus initialStatus = null; - - - /** - * Default constructor - */ - public CertificationTypeRequestBody() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public CertificationTypeRequestBody(CertificationTypeRequestBody template) - { - super(template); - - if (template != null) - { - this.properties = template.getProperties(); - this.initialStatus = template.getInitialStatus(); - } - } - - - /** - * Return the properties of the certification type. - * - * @return properties - */ - public CertificationTypeProperties getProperties() - { - return properties; - } - - - /** - * Set up the properties of the certification type. - * - * @param properties properties - */ - public void setProperties(CertificationTypeProperties properties) - { - this.properties = properties; - } - - - /** - * Return the initial status of the certification type. - * - * @return instance status - */ - public GovernanceDefinitionStatus getInitialStatus() - { - return initialStatus; - } - - - /** - * Set up the initial status of the certification type. - * - * @param initialStatus instance status - */ - public void setInitialStatus(GovernanceDefinitionStatus initialStatus) - { - this.initialStatus = initialStatus; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "CertificationTypeRequestBody{" + - "properties=" + properties + - ", initialStatus=" + initialStatus + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - CertificationTypeRequestBody that = (CertificationTypeRequestBody) objectToCompare; - return Objects.equals(properties, that.properties) && - initialStatus == that.initialStatus; - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(properties, initialStatus); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/CertificationTypeResponse.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/CertificationTypeResponse.java deleted file mode 100644 index ac219bde54d..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/CertificationTypeResponse.java +++ /dev/null @@ -1,136 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.CertificationTypeElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * CertificationTypeResponse is the response structure used on the OMAS REST API calls that returns a - * certification type object as a response. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class CertificationTypeResponse extends GovernanceProgramOMASAPIResponse -{ - private CertificationTypeElement element = null; - - - /** - * Default constructor - */ - public CertificationTypeResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public CertificationTypeResponse(CertificationTypeResponse template) - { - super(template); - - if (template != null) - { - this.element = template.getElement(); - } - } - - - /** - * Return the element result. - * - * @return CertificationTypeProperties object - */ - public CertificationTypeElement getElement() - { - return element; - } - - - /** - * Set up the element result. - * - * @param element CertificationTypeProperties object - */ - public void setElement(CertificationTypeElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "CertificationTypeResponse{" + - "element='" + getElement() + '\'' + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof CertificationTypeResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - CertificationTypeResponse that = (CertificationTypeResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/ClassificationRequestBody.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/ClassificationRequestBody.java deleted file mode 100644 index e494ccfda15..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/ClassificationRequestBody.java +++ /dev/null @@ -1,127 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.rest; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.ClassificationProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * ClassificationRequestBody describes the request body used when attaching classification to elements. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ClassificationRequestBody extends ExternalSourceRequestBody -{ - private ClassificationProperties properties = null; - - - /** - * Default constructor - */ - public ClassificationRequestBody() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public ClassificationRequestBody(ClassificationRequestBody template) - { - super(template); - - if (template != null) - { - properties = template.getProperties(); - } - } - - - /** - * Return the properties for the classification. - * - * @return properties object - */ - public ClassificationProperties getProperties() - { - return properties; - } - - - /** - * Set up the properties for the classification. - * - * @param properties properties object - */ - public void setProperties(ClassificationProperties properties) - { - this.properties = properties; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ClassificationRequestBody{" + - "externalSourceGUID='" + getExternalSourceGUID() + '\'' + - ", externalSourceName='" + getExternalSourceName() + '\'' + - ", properties=" + properties + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ClassificationRequestBody that = (ClassificationRequestBody) objectToCompare; - return Objects.equals(getProperties(), that.getProperties()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), properties); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/ElementStubListResponse.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/ElementStubListResponse.java deleted file mode 100644 index ad28d722eff..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/ElementStubListResponse.java +++ /dev/null @@ -1,149 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * ElementStubListResponse is the response structure used on the OMAS REST API calls that return a - * list of element identifiers as a response. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ElementStubListResponse extends GovernanceProgramOMASAPIResponse -{ - private List elements = null; - - - /** - * Default constructor - */ - public ElementStubListResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ElementStubListResponse(ElementStubListResponse template) - { - super(template); - - if (template != null) - { - this.elements = template.getElements(); - } - } - - - /** - * Return the list of element identifiers. - * - * @return list of objects or null - */ - public List getElements() - { - if (elements == null) - { - return null; - } - else if (elements.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elements); - } - } - - - /** - * Set up the list of element identifiers. - * - * @param elements - list of objects or null - */ - public void setElements(List elements) - { - this.elements = elements; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ElementStubListResponse{" + - "elements=" + elements + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof ElementStubListResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ElementStubListResponse that = (ElementStubListResponse) objectToCompare; - return Objects.equals(this.getElements(), that.getElements()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(elements, super.hashCode()); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/ExternalReferenceIdRequestBody.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/ExternalReferenceIdRequestBody.java deleted file mode 100644 index cfa220dd228..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/ExternalReferenceIdRequestBody.java +++ /dev/null @@ -1,122 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ExternalReferenceIdRequestBody provides a structure for the unique external reference identifier. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ExternalReferenceIdRequestBody extends GovernanceProgramOMASAPIRequestBody -{ - private String referenceId = null; - - - /** - * Default constructor - */ - public ExternalReferenceIdRequestBody() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ExternalReferenceIdRequestBody(ExternalReferenceIdRequestBody template) - { - super(template); - - if (template != null) - { - this.referenceId = template.getReferenceId(); - } - } - - - /** - * Return the unique identifier for the certificate from the certificate authority. - * - * @return String identifier - */ - public String getReferenceId() - { - return referenceId; - } - - - /** - * Set up the unique identifier for the certificate from the certificate authority. - * - * @param referenceId String identifier - */ - public void setReferenceId(String referenceId) - { - this.referenceId = referenceId; - } - - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "CertificateIdRequestBody{" + - "referenceId='" + referenceId + '\'' + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ExternalReferenceIdRequestBody that = (ExternalReferenceIdRequestBody) objectToCompare; - return Objects.equals(referenceId, that.referenceId); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(referenceId); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/ExternalReferenceListResponse.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/ExternalReferenceListResponse.java deleted file mode 100644 index 8d189954d8c..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/ExternalReferenceListResponse.java +++ /dev/null @@ -1,149 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.ExternalReferenceElement; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * ExternalReferenceListResponse is the response structure used on the OMAS REST API calls that return a - * list of external references as a response. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ExternalReferenceListResponse extends GovernanceProgramOMASAPIResponse -{ - private List elements = null; - - - /** - * Default constructor - */ - public ExternalReferenceListResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ExternalReferenceListResponse(ExternalReferenceListResponse template) - { - super(template); - - if (template != null) - { - this.elements = template.getElements(); - } - } - - - /** - * Return the list of external references. - * - * @return list of objects or null - */ - public List getElements() - { - if (elements == null) - { - return null; - } - else if (elements.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elements); - } - } - - - /** - * Set up the list of external references. - * - * @param elements - list of objects or null - */ - public void setElements(List elements) - { - this.elements = elements; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ExternalReferenceListResponse{" + - "elements=" + elements + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof ExternalReferenceListResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ExternalReferenceListResponse that = (ExternalReferenceListResponse) objectToCompare; - return Objects.equals(this.getElements(), that.getElements()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(elements, super.hashCode()); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/ExternalReferenceRequestBody.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/ExternalReferenceRequestBody.java deleted file mode 100644 index 97199a95992..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/ExternalReferenceRequestBody.java +++ /dev/null @@ -1,148 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.ExternalReferenceProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ExternalReferenceRequestBody provides a structure for a new ExternalReference. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ExternalReferenceRequestBody extends GovernanceProgramOMASAPIRequestBody -{ - private String anchorGUID = null; - private ExternalReferenceProperties properties = null; - - - /** - * Default constructor - */ - public ExternalReferenceRequestBody() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ExternalReferenceRequestBody(ExternalReferenceRequestBody template) - { - super(template); - - if (template != null) - { - this.anchorGUID = template.getAnchorGUID(); - this.properties = template.getProperties(); - } - } - - - /** - * Return the optional anchor unique identifier. - * - * @return String guid - */ - public String getAnchorGUID() - { - return anchorGUID; - } - - - /** - * Set up the optional anchor unique identifier. - * - * @param guid String guid - */ - public void setAnchorGUID(String guid) - { - this.anchorGUID = guid; - } - - - /** - * Return the properties for this external reference. - * - * @return date - */ - public ExternalReferenceProperties getProperties() - { - return properties; - } - - - /** - * Set up the properties for this external reference. - * - * @param properties date - */ - public void setProperties(ExternalReferenceProperties properties) - { - this.properties = properties; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "ExternalReferenceRequestBody{" + - "anchorGUID='" + anchorGUID + '\'' + - ", properties=" + properties + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ExternalReferenceRequestBody that = (ExternalReferenceRequestBody) objectToCompare; - return Objects.equals(anchorGUID, that.anchorGUID) && - Objects.equals(properties, that.properties); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(anchorGUID, properties); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/ExternalReferenceResponse.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/ExternalReferenceResponse.java deleted file mode 100644 index e92da38029e..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/ExternalReferenceResponse.java +++ /dev/null @@ -1,136 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.ExternalReferenceElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * ExternalReferenceResponse is the response structure used on the OMAS REST API calls that returns a - * external reference object as a response. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ExternalReferenceResponse extends GovernanceProgramOMASAPIResponse -{ - private ExternalReferenceElement element = null; - - - /** - * Default constructor - */ - public ExternalReferenceResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ExternalReferenceResponse(ExternalReferenceResponse template) - { - super(template); - - if (template != null) - { - this.element = template.getElement(); - } - } - - - /** - * Return the element result. - * - * @return external reference object - */ - public ExternalReferenceElement getElement() - { - return element; - } - - - /** - * Set up the element result. - * - * @param element external reference object - */ - public void setElement(ExternalReferenceElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ExternalReferenceResponse{" + - "element='" + getElement() + '\'' + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof ExternalReferenceResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ExternalReferenceResponse that = (ExternalReferenceResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/ExternalSourceRequestBody.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/ExternalSourceRequestBody.java deleted file mode 100644 index 184c0ea8345..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/ExternalSourceRequestBody.java +++ /dev/null @@ -1,143 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ExternalSourceRequestBody carries the parameters for marking an asset or schema as external. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ExternalSourceRequestBody extends GovernanceProgramOMASAPIRequestBody -{ - private String externalSourceGUID = null; - private String externalSourceName = null; - - - /** - * Default constructor - */ - public ExternalSourceRequestBody() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ExternalSourceRequestBody(ExternalSourceRequestBody template) - { - super(template); - - if (template != null) - { - externalSourceGUID = template.getExternalSourceGUID(); - externalSourceName = template.getExternalSourceName(); - } - } - - - /** - * Return the unique identifier of the software server capability entity that represented the external source - null for local. - * - * @return string guid - */ - public String getExternalSourceGUID() - { - return externalSourceGUID; - } - - - /** - * Set up the unique identifier of the software server capability entity that represented the external source - null for local. - * - * @param externalSourceGUID string guid - */ - public void setExternalSourceGUID(String externalSourceGUID) - { - this.externalSourceGUID = externalSourceGUID; - } - - - /** - * Return the unique name of the software server capability entity that represented the external source. - * - * @return string name - */ - public String getExternalSourceName() - { - return externalSourceName; - } - - - /** - * Set up the unique name of the software server capability entity that represented the external source. - * - * @param externalSourceName string name - */ - public void setExternalSourceName(String externalSourceName) - { - this.externalSourceName = externalSourceName; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ExternalSourceRequestBody{" + - "externalSourceGUID='" + externalSourceGUID + '\'' + - ", externalSourceName='" + externalSourceName + '\'' + - '}'; - } - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ExternalSourceRequestBody that = (ExternalSourceRequestBody) objectToCompare; - return Objects.equals(externalSourceGUID, that.externalSourceGUID) && - Objects.equals(externalSourceName, that.externalSourceName); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), externalSourceGUID, externalSourceName); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceDefinitionGraphResponse.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceDefinitionGraphResponse.java deleted file mode 100644 index 49e88f45e9a..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceDefinitionGraphResponse.java +++ /dev/null @@ -1,136 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceDefinitionGraph; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * GovernanceDefinitionGraphResponse is the response structure used on the OMAS REST API calls that returns a - * governance definition graph object as a response. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class GovernanceDefinitionGraphResponse extends GovernanceProgramOMASAPIResponse -{ - private GovernanceDefinitionGraph element = null; - - - /** - * Default constructor - */ - public GovernanceDefinitionGraphResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public GovernanceDefinitionGraphResponse(GovernanceDefinitionGraphResponse template) - { - super(template); - - if (template != null) - { - this.element = template.getElement(); - } - } - - - /** - * Return the element result. - * - * @return governance definition graph object - */ - public GovernanceDefinitionGraph getElement() - { - return element; - } - - - /** - * Set up the element result. - * - * @param element governance definition graph object - */ - public void setElement(GovernanceDefinitionGraph element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "GovernanceDefinitionGraphResponse{" + - "element='" + getElement() + '\'' + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof GovernanceDefinitionGraphResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - GovernanceDefinitionGraphResponse that = (GovernanceDefinitionGraphResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceDefinitionListResponse.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceDefinitionListResponse.java deleted file mode 100644 index 6c9ce07d87c..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceDefinitionListResponse.java +++ /dev/null @@ -1,149 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceDefinitionElement; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * GovernanceDefinitionListResponse is the response structure used on the OMAS REST API calls that return a - * list of governance definitions as a response. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class GovernanceDefinitionListResponse extends GovernanceProgramOMASAPIResponse -{ - private List elements = null; - - - /** - * Default constructor - */ - public GovernanceDefinitionListResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public GovernanceDefinitionListResponse(GovernanceDefinitionListResponse template) - { - super(template); - - if (template != null) - { - this.elements = template.getElements(); - } - } - - - /** - * Return the list of governance definitions. - * - * @return list of objects or null - */ - public List getElements() - { - if (elements == null) - { - return null; - } - else if (elements.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elements); - } - } - - - /** - * Set up the list of governance definitions. - * - * @param elements - list of objects or null - */ - public void setElements(List elements) - { - this.elements = elements; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "GovernanceDefinitionListResponse{" + - "elements=" + elements + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof GovernanceDefinitionListResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - GovernanceDefinitionListResponse that = (GovernanceDefinitionListResponse) objectToCompare; - return Objects.equals(this.getElements(), that.getElements()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(elements, super.hashCode()); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceDefinitionResponse.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceDefinitionResponse.java deleted file mode 100644 index 885622740b7..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceDefinitionResponse.java +++ /dev/null @@ -1,137 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceDefinitionElement; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceRoleElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * GovernanceDefinitionResponse is the response structure used on the OMAS REST API calls that returns a - * governance definition object as a response. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class GovernanceDefinitionResponse extends GovernanceProgramOMASAPIResponse -{ - private GovernanceDefinitionElement element = null; - - - /** - * Default constructor - */ - public GovernanceDefinitionResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public GovernanceDefinitionResponse(GovernanceDefinitionResponse template) - { - super(template); - - if (template != null) - { - this.element = template.getElement(); - } - } - - - /** - * Return the element result. - * - * @return definition object - */ - public GovernanceDefinitionElement getElement() - { - return element; - } - - - /** - * Set up the element result. - * - * @param element definition object - */ - public void setElement(GovernanceDefinitionElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "GovernanceDefinitionResponse{" + - "element='" + getElement() + '\'' + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof GovernanceDefinitionResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - GovernanceDefinitionResponse that = (GovernanceDefinitionResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceDomainListResponse.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceDomainListResponse.java deleted file mode 100644 index 5cfe9d70af3..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceDomainListResponse.java +++ /dev/null @@ -1,149 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceDomainElement; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * GovernanceDomainListResponse is the response structure used on the OMAS REST API calls that return a - * list of governance domain definitions as a response. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class GovernanceDomainListResponse extends GovernanceProgramOMASAPIResponse -{ - private List elements = null; - - - /** - * Default constructor - */ - public GovernanceDomainListResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public GovernanceDomainListResponse(GovernanceDomainListResponse template) - { - super(template); - - if (template != null) - { - this.elements = template.getElements(); - } - } - - - /** - * Return the list of governance domain definitions. - * - * @return list of objects or null - */ - public List getElements() - { - if (elements == null) - { - return null; - } - else if (elements.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elements); - } - } - - - /** - * Set up the list of governance domain definitions. - * - * @param elements - list of objects or null - */ - public void setElements(List elements) - { - this.elements = elements; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "GovernanceDomainListResponse{" + - "elements=" + elements + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof GovernanceDomainListResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - GovernanceDomainListResponse that = (GovernanceDomainListResponse) objectToCompare; - return Objects.equals(this.getElements(), that.getElements()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(elements, super.hashCode()); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceDomainResponse.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceDomainResponse.java deleted file mode 100644 index 2e9acaa68bc..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceDomainResponse.java +++ /dev/null @@ -1,136 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceDomainElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * GovernanceDomainResponse is the response structure used on the OMAS REST API calls that returns a - * governance domain definition object as a response. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class GovernanceDomainResponse extends GovernanceProgramOMASAPIResponse -{ - private GovernanceDomainElement element = null; - - - /** - * Default constructor - */ - public GovernanceDomainResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public GovernanceDomainResponse(GovernanceDomainResponse template) - { - super(template); - - if (template != null) - { - this.element = template.getElement(); - } - } - - - /** - * Return the element result. - * - * @return Governance domain definition object - */ - public GovernanceDomainElement getElement() - { - return element; - } - - - /** - * Set up the element result. - * - * @param element Governance domain definition object - */ - public void setElement(GovernanceDomainElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "GovernanceDomainResponse{" + - "element='" + getElement() + '\'' + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof GovernanceDomainResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - GovernanceDomainResponse that = (GovernanceDomainResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceDomainSetListResponse.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceDomainSetListResponse.java deleted file mode 100644 index ae05ec0ddc0..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceDomainSetListResponse.java +++ /dev/null @@ -1,149 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceDomainSetElement; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * GovernanceDomainSetListResponse is the response structure used on the OMAS REST API calls that return a - * list of governance domain definition sets as a response. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class GovernanceDomainSetListResponse extends GovernanceProgramOMASAPIResponse -{ - private List elements = null; - - - /** - * Default constructor - */ - public GovernanceDomainSetListResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public GovernanceDomainSetListResponse(GovernanceDomainSetListResponse template) - { - super(template); - - if (template != null) - { - this.elements = template.getElements(); - } - } - - - /** - * Return the list of governance domain definition sets. - * - * @return list of objects or null - */ - public List getElements() - { - if (elements == null) - { - return null; - } - else if (elements.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elements); - } - } - - - /** - * Set up the list of governance domain definition sets. - * - * @param elements - list of objects or null - */ - public void setElements(List elements) - { - this.elements = elements; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "GovernanceDomainSetListResponse{" + - "elements=" + elements + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof GovernanceDomainSetListResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - GovernanceDomainSetListResponse that = (GovernanceDomainSetListResponse) objectToCompare; - return Objects.equals(this.getElements(), that.getElements()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(elements, super.hashCode()); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceDomainSetResponse.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceDomainSetResponse.java deleted file mode 100644 index 2d2fd57bc78..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceDomainSetResponse.java +++ /dev/null @@ -1,136 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceDomainSetElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * GovernanceDomainResponse is the response structure used on the OMAS REST API calls that returns a - * governance domain definition object as a response. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class GovernanceDomainSetResponse extends GovernanceProgramOMASAPIResponse -{ - private GovernanceDomainSetElement element = null; - - - /** - * Default constructor - */ - public GovernanceDomainSetResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public GovernanceDomainSetResponse(GovernanceDomainSetResponse template) - { - super(template); - - if (template != null) - { - this.element = template.getElement(); - } - } - - - /** - * Return the element result. - * - * @return Governance domain definition set object - */ - public GovernanceDomainSetElement getElement() - { - return element; - } - - - /** - * Set up the element result. - * - * @param element Governance domain definition set object - */ - public void setElement(GovernanceDomainSetElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "GovernanceDomainSetResponse{" + - "element='" + getElement() + '\'' + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof GovernanceDomainSetResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - GovernanceDomainSetResponse that = (GovernanceDomainSetResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceLevelIdentifierListResponse.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceLevelIdentifierListResponse.java deleted file mode 100644 index 4fbc86abe39..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceLevelIdentifierListResponse.java +++ /dev/null @@ -1,149 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceLevelIdentifierElement; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * GovernanceLevelIdentifierListResponse is the response structure used on the OMAS REST API calls that return a - * list of governance classification level identifiers as a response. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class GovernanceLevelIdentifierListResponse extends GovernanceProgramOMASAPIResponse -{ - private List elements = null; - - - /** - * Default constructor - */ - public GovernanceLevelIdentifierListResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public GovernanceLevelIdentifierListResponse(GovernanceLevelIdentifierListResponse template) - { - super(template); - - if (template != null) - { - this.elements = template.getElements(); - } - } - - - /** - * Return the list of governance classification level identifiers. - * - * @return list of objects or null - */ - public List getElements() - { - if (elements == null) - { - return null; - } - else if (elements.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elements); - } - } - - - /** - * Set up the list of governance classification level identifiers. - * - * @param elements - list of objects or null - */ - public void setElements(List elements) - { - this.elements = elements; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "GovernanceLevelIdentifierListResponse{" + - "elements=" + elements + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof GovernanceLevelIdentifierListResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - GovernanceLevelIdentifierListResponse that = (GovernanceLevelIdentifierListResponse) objectToCompare; - return Objects.equals(this.getElements(), that.getElements()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(elements, super.hashCode()); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceLevelIdentifierResponse.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceLevelIdentifierResponse.java deleted file mode 100644 index b922f0e2118..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceLevelIdentifierResponse.java +++ /dev/null @@ -1,136 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceLevelIdentifierElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * GovernanceLevelIdentifierSetResponse is the response structure used on the OMAS REST API calls that returns a - * governance classification level identifier object as a response. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class GovernanceLevelIdentifierResponse extends GovernanceProgramOMASAPIResponse -{ - private GovernanceLevelIdentifierElement element = null; - - - /** - * Default constructor - */ - public GovernanceLevelIdentifierResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public GovernanceLevelIdentifierResponse(GovernanceLevelIdentifierResponse template) - { - super(template); - - if (template != null) - { - this.element = template.getElement(); - } - } - - - /** - * Return the element result. - * - * @return GovernanceLevelIdentifierProperties object - */ - public GovernanceLevelIdentifierElement getElement() - { - return element; - } - - - /** - * Set up the element result. - * - * @param element GovernanceLevelIdentifierProperties object - */ - public void setElement(GovernanceLevelIdentifierElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "GovernanceLevelIdentifierResponse{" + - "element='" + getElement() + '\'' + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof GovernanceLevelIdentifierResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - GovernanceLevelIdentifierResponse that = (GovernanceLevelIdentifierResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceLevelIdentifierSetListResponse.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceLevelIdentifierSetListResponse.java deleted file mode 100644 index 963591f00be..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceLevelIdentifierSetListResponse.java +++ /dev/null @@ -1,150 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceLevelIdentifierSetElement; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceRoleElement; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * GovernanceLevelIdentifierSetListResponse is the response structure used on the OMAS REST API calls that return a - * list of governance classification level identifier sets as a response. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class GovernanceLevelIdentifierSetListResponse extends GovernanceProgramOMASAPIResponse -{ - private List elements = null; - - - /** - * Default constructor - */ - public GovernanceLevelIdentifierSetListResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public GovernanceLevelIdentifierSetListResponse(GovernanceLevelIdentifierSetListResponse template) - { - super(template); - - if (template != null) - { - this.elements = template.getElements(); - } - } - - - /** - * Return the list of governance classification level identifier sets. - * - * @return list of objects or null - */ - public List getElements() - { - if (elements == null) - { - return null; - } - else if (elements.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elements); - } - } - - - /** - * Set up the list of governance classification level identifier sets. - * - * @param elements - list of objects or null - */ - public void setElements(List elements) - { - this.elements = elements; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "GovernanceLevelIdentifierSetListResponse{" + - "elements=" + elements + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof GovernanceLevelIdentifierSetListResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - GovernanceLevelIdentifierSetListResponse that = (GovernanceLevelIdentifierSetListResponse) objectToCompare; - return Objects.equals(this.getElements(), that.getElements()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(elements, super.hashCode()); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceLevelIdentifierSetResponse.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceLevelIdentifierSetResponse.java deleted file mode 100644 index 9118bba8c31..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceLevelIdentifierSetResponse.java +++ /dev/null @@ -1,136 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceLevelIdentifierSetElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * GovernanceLevelIdentifierSetResponse is the response structure used on the OMAS REST API calls that returns a - * governance classification level identifier set object as a response. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class GovernanceLevelIdentifierSetResponse extends GovernanceProgramOMASAPIResponse -{ - private GovernanceLevelIdentifierSetElement element = null; - - - /** - * Default constructor - */ - public GovernanceLevelIdentifierSetResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public GovernanceLevelIdentifierSetResponse(GovernanceLevelIdentifierSetResponse template) - { - super(template); - - if (template != null) - { - this.element = template.getElement(); - } - } - - - /** - * Return the element result. - * - * @return GovernanceLevelIdentifierSetProperties object - */ - public GovernanceLevelIdentifierSetElement getElement() - { - return element; - } - - - /** - * Set up the element result. - * - * @param element GovernanceLevelIdentifierSetProperties object - */ - public void setElement(GovernanceLevelIdentifierSetElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "GovernanceLevelIdentifierSetResponse{" + - "element='" + getElement() + '\'' + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof GovernanceLevelIdentifierSetResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - GovernanceLevelIdentifierSetResponse that = (GovernanceLevelIdentifierSetResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceMetricImplementationListResponse.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceMetricImplementationListResponse.java deleted file mode 100644 index f58648ba9d7..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceMetricImplementationListResponse.java +++ /dev/null @@ -1,149 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceMetricImplementation; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * GovernanceMetricListResponse is the response structure used on the OMAS REST API calls that return a - * list of governance metrics along with details of the data sets where measurements are kept as a response. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class GovernanceMetricImplementationListResponse extends GovernanceProgramOMASAPIResponse -{ - private List elements = null; - - - /** - * Default constructor - */ - public GovernanceMetricImplementationListResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public GovernanceMetricImplementationListResponse(GovernanceMetricImplementationListResponse template) - { - super(template); - - if (template != null) - { - this.elements = template.getElements(); - } - } - - - /** - * Return the list of governance metrics. - * - * @return list of objects or null - */ - public List getElements() - { - if (elements == null) - { - return null; - } - else if (elements.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elements); - } - } - - - /** - * Set up the list of governance metrics. - * - * @param elements - list of objects or null - */ - public void setElements(List elements) - { - this.elements = elements; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "GovernanceMetricListResponse{" + - "elements=" + elements + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof GovernanceMetricImplementationListResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - GovernanceMetricImplementationListResponse that = (GovernanceMetricImplementationListResponse) objectToCompare; - return Objects.equals(this.getElements(), that.getElements()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(elements, super.hashCode()); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceMetricListResponse.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceMetricListResponse.java deleted file mode 100644 index 732bba256e4..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceMetricListResponse.java +++ /dev/null @@ -1,149 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceMetricElement; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * GovernanceMetricListResponse is the response structure used on the OMAS REST API calls that return a - * list of governance metric as a response. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class GovernanceMetricListResponse extends GovernanceProgramOMASAPIResponse -{ - private List elements = null; - - - /** - * Default constructor - */ - public GovernanceMetricListResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public GovernanceMetricListResponse(GovernanceMetricListResponse template) - { - super(template); - - if (template != null) - { - this.elements = template.getElements(); - } - } - - - /** - * Return the list of governance metrics. - * - * @return list of objects or null - */ - public List getElements() - { - if (elements == null) - { - return null; - } - else if (elements.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elements); - } - } - - - /** - * Set up the list of governance metrics. - * - * @param elements - list of objects or null - */ - public void setElements(List elements) - { - this.elements = elements; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "GovernanceMetricListResponse{" + - "elements=" + elements + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof GovernanceMetricListResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - GovernanceMetricListResponse that = (GovernanceMetricListResponse) objectToCompare; - return Objects.equals(this.getElements(), that.getElements()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(elements, super.hashCode()); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceMetricResponse.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceMetricResponse.java deleted file mode 100644 index fbf62d4811a..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceMetricResponse.java +++ /dev/null @@ -1,136 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceMetricElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * GovernanceMetricResponse is the response structure used on the OMAS REST API calls that returns a - * governance metric object as a response. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class GovernanceMetricResponse extends GovernanceProgramOMASAPIResponse -{ - private GovernanceMetricElement element = null; - - - /** - * Default constructor - */ - public GovernanceMetricResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public GovernanceMetricResponse(GovernanceMetricResponse template) - { - super(template); - - if (template != null) - { - this.element = template.getElement(); - } - } - - - /** - * Return the element result. - * - * @return governance metric object - */ - public GovernanceMetricElement getElement() - { - return element; - } - - - /** - * Set up the element result. - * - * @param element governance metric object - */ - public void setElement(GovernanceMetricElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "GovernanceMetricResponse{" + - "element='" + getElement() + '\'' + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof GovernanceMetricResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - GovernanceMetricResponse that = (GovernanceMetricResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceProgramOMASAPIRequestBody.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceProgramOMASAPIRequestBody.java deleted file mode 100644 index 307676a8f5a..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceProgramOMASAPIRequestBody.java +++ /dev/null @@ -1,53 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.rest; - -import com.fasterxml.jackson.annotation.*; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * GovernanceProgramOMASAPIRequestBody provides a common header for Governance Program OMAS request bodies for its REST API. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes( - { - @JsonSubTypes.Type(value = AppointmentRequestBody.class, name = "AppointmentRequestBody"), - }) -public abstract class GovernanceProgramOMASAPIRequestBody -{ - /** - * Default constructor - */ - public GovernanceProgramOMASAPIRequestBody() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public GovernanceProgramOMASAPIRequestBody(GovernanceProgramOMASAPIRequestBody template) - { - } - - - /** - * JSON-like toString - * - * @return string containing the property names and values - */ - @Override - public String toString() - { - return "GovernanceProgramOMASAPIRequestBody{}"; - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceProgramOMASAPIResponse.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceProgramOMASAPIResponse.java deleted file mode 100644 index f1d090b4c74..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceProgramOMASAPIResponse.java +++ /dev/null @@ -1,77 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.rest; - -import com.fasterxml.jackson.annotation.*; -import org.odpi.openmetadata.commonservices.ffdc.rest.FFDCResponseBase; - -import java.util.Arrays; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * GovernanceProgramOMASAPIResponse provides a common header for Governance Program OMAS managed rest to its REST API. - * It manages information about exceptions. If no exception has been raised exceptionClassName is null. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes( - { - @JsonSubTypes.Type(value = GovernanceRoleResponse.class, name = "GovernanceRoleResponse"), - @JsonSubTypes.Type(value = GovernanceRoleListResponse.class, name = "GovernanceRoleListResponse"), - @JsonSubTypes.Type(value = SubjectAreaDefinitionResponse.class, name = "SubjectAreaDefinitionResponse"), - @JsonSubTypes.Type(value = SubjectAreaListResponse.class, name = "SubjectAreaListResponse"), - @JsonSubTypes.Type(value = SubjectAreaResponse.class, name = "SubjectAreaResponse"), - @JsonSubTypes.Type(value = GovernanceZoneDefinitionResponse.class, name = "GovernanceZoneDefinitionResponse"), - @JsonSubTypes.Type(value = GovernanceZoneListResponse.class, name = "GovernanceZoneListResponse"), - @JsonSubTypes.Type(value = GovernanceZoneResponse.class, name = "GovernanceZoneResponse"), - }) -public abstract class GovernanceProgramOMASAPIResponse extends FFDCResponseBase -{ - /** - * Default constructor - */ - public GovernanceProgramOMASAPIResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public GovernanceProgramOMASAPIResponse(GovernanceProgramOMASAPIResponse template) - { - super(template); - } - - - /** - * JSON-like toString - * - * @return string containing the property names and values - */ - @Override - public String toString() - { - return "GovernanceProgramOMASAPIResponse{" + - "exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceRoleAppointeeListResponse.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceRoleAppointeeListResponse.java deleted file mode 100644 index 364b64195b6..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceRoleAppointeeListResponse.java +++ /dev/null @@ -1,149 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceRoleAppointee; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * GovernanceRoleAppointeeListResponse is the response structure used on the OMAS REST API calls that return a - * list of governance roles and their appointees as a response. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class GovernanceRoleAppointeeListResponse extends GovernanceProgramOMASAPIResponse -{ - private List elements = null; - - - /** - * Default constructor - */ - public GovernanceRoleAppointeeListResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public GovernanceRoleAppointeeListResponse(GovernanceRoleAppointeeListResponse template) - { - super(template); - - if (template != null) - { - this.elements = template.getElements(); - } - } - - - /** - * Return the list of governance roles. - * - * @return list of objects or null - */ - public List getElements() - { - if (elements == null) - { - return null; - } - else if (elements.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elements); - } - } - - - /** - * Set up the list of governance roles. - * - * @param elements - list of objects or null - */ - public void setElements(List elements) - { - this.elements = elements; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "GovernanceOfficerAppointeeListResponse{" + - "elements=" + elements + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof GovernanceRoleAppointeeListResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - GovernanceRoleAppointeeListResponse that = (GovernanceRoleAppointeeListResponse) objectToCompare; - return Objects.equals(this.getElements(), that.getElements()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(elements, super.hashCode()); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceRoleHistoryResponse.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceRoleHistoryResponse.java deleted file mode 100644 index 6a497ade9cd..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceRoleHistoryResponse.java +++ /dev/null @@ -1,136 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceRoleHistory; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * GovernanceRoleHistoryResponse is the response structure used on the OMAS REST API calls that return a - * governance role object with details of who is and has been appointed to the role as a response. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class GovernanceRoleHistoryResponse extends GovernanceProgramOMASAPIResponse -{ - private GovernanceRoleHistory element = null; - - - /** - * Default constructor - */ - public GovernanceRoleHistoryResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public GovernanceRoleHistoryResponse(GovernanceRoleHistoryResponse template) - { - super(template); - - if (template != null) - { - this.element = template.getElement(); - } - } - - - /** - * Return the result. - * - * @return GovernanceRoleHistory object - */ - public GovernanceRoleHistory getElement() - { - return element; - } - - - /** - * Set up the result. - * - * @param element GovernanceRoleHistory object - */ - public void setElement(GovernanceRoleHistory element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "GovernanceRoleHistoryResponse{" + - "element='" + getElement() + '\'' + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof GovernanceRoleHistoryResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - GovernanceRoleHistoryResponse that = (GovernanceRoleHistoryResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceRoleListResponse.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceRoleListResponse.java deleted file mode 100644 index db095f8f25d..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceRoleListResponse.java +++ /dev/null @@ -1,149 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceRoleElement; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * GovernanceRoleListResponse is the response structure used on the OMAS REST API calls that return a - * list of governance roles as a response. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class GovernanceRoleListResponse extends GovernanceProgramOMASAPIResponse -{ - private List elements = null; - - - /** - * Default constructor - */ - public GovernanceRoleListResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public GovernanceRoleListResponse(GovernanceRoleListResponse template) - { - super(template); - - if (template != null) - { - this.elements = template.getElements(); - } - } - - - /** - * Return the list of governance roles. - * - * @return list of objects or null - */ - public List getElements() - { - if (elements == null) - { - return null; - } - else if (elements.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elements); - } - } - - - /** - * Set up the list of governance roles. - * - * @param elements - list of objects or null - */ - public void setElements(List elements) - { - this.elements = elements; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "GovernanceRoleListResponse{" + - "elements=" + elements + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof GovernanceRoleListResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - GovernanceRoleListResponse that = (GovernanceRoleListResponse) objectToCompare; - return Objects.equals(this.getElements(), that.getElements()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(elements, super.hashCode()); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceRoleResponse.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceRoleResponse.java deleted file mode 100644 index cccc2d1651e..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceRoleResponse.java +++ /dev/null @@ -1,136 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceRoleElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * GovernanceRoleResponse is the response structure used on the OMAS REST API calls that returns a - * governance role object as a response. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class GovernanceRoleResponse extends GovernanceProgramOMASAPIResponse -{ - private GovernanceRoleElement element = null; - - - /** - * Default constructor - */ - public GovernanceRoleResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public GovernanceRoleResponse(GovernanceRoleResponse template) - { - super(template); - - if (template != null) - { - this.element = template.getElement(); - } - } - - - /** - * Return the element result. - * - * @return GovernanceRoleProperties object - */ - public GovernanceRoleElement getElement() - { - return element; - } - - - /** - * Set up the element result. - * - * @param element GovernanceRoleProperties object - */ - public void setElement(GovernanceRoleElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "GovernanceRoleResponse{" + - "element='" + getElement() + '\'' + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof GovernanceRoleResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - GovernanceRoleResponse that = (GovernanceRoleResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceStatusIdentifierResponse.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceStatusIdentifierResponse.java deleted file mode 100644 index 9d3a70c751f..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceStatusIdentifierResponse.java +++ /dev/null @@ -1,136 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceStatusIdentifierElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * GovernanceStatusIdentifierSetResponse is the response structure used on the OMAS REST API calls that returns a - * governance classification level identifier object as a response. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class GovernanceStatusIdentifierResponse extends GovernanceProgramOMASAPIResponse -{ - private GovernanceStatusIdentifierElement element = null; - - - /** - * Default constructor - */ - public GovernanceStatusIdentifierResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public GovernanceStatusIdentifierResponse(GovernanceStatusIdentifierResponse template) - { - super(template); - - if (template != null) - { - this.element = template.getElement(); - } - } - - - /** - * Return the element result. - * - * @return GovernanceStatusIdentifierProperties object - */ - public GovernanceStatusIdentifierElement getElement() - { - return element; - } - - - /** - * Set up the element result. - * - * @param element GovernanceStatusIdentifierProperties object - */ - public void setElement(GovernanceStatusIdentifierElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "GovernanceStatusIdentifierResponse{" + - "element='" + getElement() + '\'' + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof GovernanceStatusIdentifierResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - GovernanceStatusIdentifierResponse that = (GovernanceStatusIdentifierResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceStatusIdentifierSetListResponse.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceStatusIdentifierSetListResponse.java deleted file mode 100644 index 119b299f3c2..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceStatusIdentifierSetListResponse.java +++ /dev/null @@ -1,149 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceStatusIdentifierSetElement; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * GovernanceStatusIdentifierSetListResponse is the response structure used on the OMAS REST API calls that return a - * list of governance classification level identifier sets as a response. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class GovernanceStatusIdentifierSetListResponse extends GovernanceProgramOMASAPIResponse -{ - private List elements = null; - - - /** - * Default constructor - */ - public GovernanceStatusIdentifierSetListResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public GovernanceStatusIdentifierSetListResponse(GovernanceStatusIdentifierSetListResponse template) - { - super(template); - - if (template != null) - { - this.elements = template.getElements(); - } - } - - - /** - * Return the list of governance classification level identifier sets. - * - * @return list of objects or null - */ - public List getElements() - { - if (elements == null) - { - return null; - } - else if (elements.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elements); - } - } - - - /** - * Set up the list of governance classification level identifier sets. - * - * @param elements - list of objects or null - */ - public void setElements(List elements) - { - this.elements = elements; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "GovernanceStatusIdentifierSetListResponse{" + - "elements=" + elements + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof GovernanceStatusIdentifierSetListResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - GovernanceStatusIdentifierSetListResponse that = (GovernanceStatusIdentifierSetListResponse) objectToCompare; - return Objects.equals(this.getElements(), that.getElements()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(elements, super.hashCode()); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceStatusIdentifierSetResponse.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceStatusIdentifierSetResponse.java deleted file mode 100644 index 0f2b2b82df5..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceStatusIdentifierSetResponse.java +++ /dev/null @@ -1,136 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceStatusIdentifierSetElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * GovernanceStatusIdentifierSetResponse is the response structure used on the OMAS REST API calls that returns a - * governance classification level identifier set object as a response. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class GovernanceStatusIdentifierSetResponse extends GovernanceProgramOMASAPIResponse -{ - private GovernanceStatusIdentifierSetElement element = null; - - - /** - * Default constructor - */ - public GovernanceStatusIdentifierSetResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public GovernanceStatusIdentifierSetResponse(GovernanceStatusIdentifierSetResponse template) - { - super(template); - - if (template != null) - { - this.element = template.getElement(); - } - } - - - /** - * Return the element result. - * - * @return GovernanceStatusIdentifierSetProperties object - */ - public GovernanceStatusIdentifierSetElement getElement() - { - return element; - } - - - /** - * Set up the element result. - * - * @param element GovernanceStatusIdentifierSetProperties object - */ - public void setElement(GovernanceStatusIdentifierSetElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "GovernanceStatusIdentifierSetResponse{" + - "element='" + getElement() + '\'' + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof GovernanceStatusIdentifierSetResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - GovernanceStatusIdentifierSetResponse that = (GovernanceStatusIdentifierSetResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceZoneDefinitionResponse.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceZoneDefinitionResponse.java deleted file mode 100644 index 12c1e8e9815..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceZoneDefinitionResponse.java +++ /dev/null @@ -1,137 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.governanceprogram.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceZoneDefinition; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * GovernanceZoneDefinitionResponse is the response structure used on the OMAS REST API calls that return the properties - * for a governance zone with the linked governance definitions. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class GovernanceZoneDefinitionResponse extends GovernanceProgramOMASAPIResponse -{ - private GovernanceZoneDefinition properties = null; - - - /** - * Default constructor - */ - public GovernanceZoneDefinitionResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public GovernanceZoneDefinitionResponse(GovernanceZoneDefinitionResponse template) - { - super(template); - - if (template != null) - { - this.properties = template.getProperties(); - } - } - - - /** - * Return the properties result. - * - * @return bean - */ - public GovernanceZoneDefinition getProperties() - { - return properties; - } - - - /** - * Set up the properties result. - * - * @param properties - bean - */ - public void setProperties(GovernanceZoneDefinition properties) - { - this.properties = properties; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "GovernanceZoneDefinitionResponse{" + - "properties=" + properties + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof GovernanceZoneDefinitionResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - GovernanceZoneDefinitionResponse that = (GovernanceZoneDefinitionResponse) objectToCompare; - return Objects.equals(properties, that.properties); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(properties); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceZoneListResponse.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceZoneListResponse.java deleted file mode 100644 index 69ef6f8c8a6..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceZoneListResponse.java +++ /dev/null @@ -1,146 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.governanceprogram.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceZoneElement; - -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * GovernanceZoneListResponse is the response structure used on the OMAS REST API calls that return a list of governance zones. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class GovernanceZoneListResponse extends GovernanceProgramOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public GovernanceZoneListResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public GovernanceZoneListResponse(GovernanceZoneListResponse template) - { - super(template); - - if (template != null) - { - this.elementList = template.getElementList(); - } - } - - - /** - * Return the resulting elements. - * - * @return list of elements - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - - return elementList; - } - - - /** - * Set up the resulting elements. - * - * @param elements list of results - */ - public void setGovernanceZone(List elements) - { - this.elementList = elements; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "GovernanceZoneListResponse{" + - "elementList=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof GovernanceZoneListResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - GovernanceZoneListResponse that = (GovernanceZoneListResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(elementList); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceZoneResponse.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceZoneResponse.java deleted file mode 100644 index 0c70a03f1e3..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceZoneResponse.java +++ /dev/null @@ -1,137 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.governanceprogram.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceZoneElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * GovernanceZoneResponse is the response structure used on the OMAS REST API calls that return the properties - * for a governance zone. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class GovernanceZoneResponse extends GovernanceProgramOMASAPIResponse -{ - private GovernanceZoneElement element = null; - - - /** - * Default constructor - */ - public GovernanceZoneResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public GovernanceZoneResponse(GovernanceZoneResponse template) - { - super(template); - - if (template != null) - { - this.element = template.getElement(); - } - } - - - /** - * Return the element result. - * - * @return bean - */ - public GovernanceZoneElement getElement() - { - return element; - } - - - /** - * Set up the element result. - * - * @param element - bean - */ - public void setElement(GovernanceZoneElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "GovernanceZoneResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof GovernanceZoneResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - GovernanceZoneResponse that = (GovernanceZoneResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(element); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/LicenseIdRequestBody.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/LicenseIdRequestBody.java deleted file mode 100644 index 326b763f6c0..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/LicenseIdRequestBody.java +++ /dev/null @@ -1,122 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * LicenseIdRequestBody provides a structure for the unique certificate identifier. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class LicenseIdRequestBody extends GovernanceProgramOMASAPIRequestBody -{ - private String licenseId = null; - - - /** - * Default constructor - */ - public LicenseIdRequestBody() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public LicenseIdRequestBody(LicenseIdRequestBody template) - { - super(template); - - if (template != null) - { - this.licenseId = template.getLicenseId(); - } - } - - - /** - * Return the unique identifier for the license. - * - * @return String identifier - */ - public String getLicenseId() - { - return licenseId; - } - - - /** - * Set up the unique identifier for the license. - * - * @param licenseId String identifier - */ - public void setLicenseId(String licenseId) - { - this.licenseId = licenseId; - } - - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "LicenseIdRequestBody{" + - "licenseId='" + licenseId + '\'' + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - LicenseIdRequestBody that = (LicenseIdRequestBody) objectToCompare; - return Objects.equals(licenseId, that.licenseId); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(licenseId); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/LicenseListResponse.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/LicenseListResponse.java deleted file mode 100644 index 65cd559e573..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/LicenseListResponse.java +++ /dev/null @@ -1,149 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.LicenseElement; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * LicenseListResponse is the response structure used on the OMAS REST API calls that return a - * list of licenses as a response. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class LicenseListResponse extends GovernanceProgramOMASAPIResponse -{ - private List elements = null; - - - /** - * Default constructor - */ - public LicenseListResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public LicenseListResponse(LicenseListResponse template) - { - super(template); - - if (template != null) - { - this.elements = template.getElements(); - } - } - - - /** - * Return the list of license types. - * - * @return list of objects or null - */ - public List getElements() - { - if (elements == null) - { - return null; - } - else if (elements.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elements); - } - } - - - /** - * Set up the list of license types. - * - * @param elements - list of objects or null - */ - public void setElements(List elements) - { - this.elements = elements; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "LicenseListResponse{" + - "elements=" + elements + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof LicenseListResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - LicenseListResponse that = (LicenseListResponse) objectToCompare; - return Objects.equals(this.getElements(), that.getElements()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(elements, super.hashCode()); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/LicenseTypeListResponse.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/LicenseTypeListResponse.java deleted file mode 100644 index b149becfc7f..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/LicenseTypeListResponse.java +++ /dev/null @@ -1,149 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.LicenseTypeElement; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * LicenseTypeListResponse is the response structure used on the OMAS REST API calls that return a - * list of license types as a response. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class LicenseTypeListResponse extends GovernanceProgramOMASAPIResponse -{ - private List elements = null; - - - /** - * Default constructor - */ - public LicenseTypeListResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public LicenseTypeListResponse(LicenseTypeListResponse template) - { - super(template); - - if (template != null) - { - this.elements = template.getElements(); - } - } - - - /** - * Return the list of license types. - * - * @return list of objects or null - */ - public List getElements() - { - if (elements == null) - { - return null; - } - else if (elements.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elements); - } - } - - - /** - * Set up the list of license types. - * - * @param elements - list of objects or null - */ - public void setElements(List elements) - { - this.elements = elements; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "LicenseTypeListResponse{" + - "elements=" + elements + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof LicenseTypeListResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - LicenseTypeListResponse that = (LicenseTypeListResponse) objectToCompare; - return Objects.equals(this.getElements(), that.getElements()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(elements, super.hashCode()); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/LicenseTypeRequestBody.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/LicenseTypeRequestBody.java deleted file mode 100644 index 6b502e9e5c9..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/LicenseTypeRequestBody.java +++ /dev/null @@ -1,145 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.LicenseTypeProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceDefinitionStatus; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * LicenseTypeRequestBody provides a structure used when creating license types. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class LicenseTypeRequestBody extends GovernanceProgramOMASAPIRequestBody -{ - private LicenseTypeProperties properties = null; - private GovernanceDefinitionStatus initialStatus = null; - - - /** - * Default constructor - */ - public LicenseTypeRequestBody() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public LicenseTypeRequestBody(LicenseTypeRequestBody template) - { - super(template); - - if (template != null) - { - this.properties = template.getProperties(); - this.initialStatus = template.getInitialStatus(); - } - } - - - /** - * Return the properties of the license type. - * - * @return properties - */ - public LicenseTypeProperties getProperties() - { - return properties; - } - - - /** - * Set up the properties of the license type. - * - * @param properties properties - */ - public void setProperties(LicenseTypeProperties properties) - { - this.properties = properties; - } - - - /** - * Return the initial status of the license type. - * - * @return instance status - */ - public GovernanceDefinitionStatus getInitialStatus() - { - return initialStatus; - } - - - /** - * Set up the initial status of the license type. - * - * @param initialStatus instance status - */ - public void setInitialStatus(GovernanceDefinitionStatus initialStatus) - { - this.initialStatus = initialStatus; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "LicenseTypeRequestBody{" + - "properties=" + properties + - ", initialStatus=" + initialStatus + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - LicenseTypeRequestBody that = (LicenseTypeRequestBody) objectToCompare; - return Objects.equals(properties, that.properties) && - initialStatus == that.initialStatus; - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(properties, initialStatus); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/LicenseTypeResponse.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/LicenseTypeResponse.java deleted file mode 100644 index b7c42ce3def..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/LicenseTypeResponse.java +++ /dev/null @@ -1,136 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.LicenseTypeElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * LicenseTypeResponse is the response structure used on the OMAS REST API calls that returns a - * license type object as a response. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class LicenseTypeResponse extends GovernanceProgramOMASAPIResponse -{ - private LicenseTypeElement element = null; - - - /** - * Default constructor - */ - public LicenseTypeResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public LicenseTypeResponse(LicenseTypeResponse template) - { - super(template); - - if (template != null) - { - this.element = template.getElement(); - } - } - - - /** - * Return the element result. - * - * @return LicenseTypeProperties object - */ - public LicenseTypeElement getElement() - { - return element; - } - - - /** - * Set up the element result. - * - * @param element LicenseTypeProperties object - */ - public void setElement(LicenseTypeElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "LicenseTypeResponse{" + - "element='" + getElement() + '\'' + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof LicenseTypeResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - LicenseTypeResponse that = (LicenseTypeResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/PersonRoleListResponse.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/PersonRoleListResponse.java deleted file mode 100644 index f4532584521..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/PersonRoleListResponse.java +++ /dev/null @@ -1,148 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.PersonRoleElement; - -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * PersonRoleListResponse is the response structure used on the OMAS REST API calls that return - * a list of person role elements. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class PersonRoleListResponse extends GovernanceProgramOMASAPIResponse -{ - private List elements = null; - - - /** - * Default constructor - */ - public PersonRoleListResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public PersonRoleListResponse(PersonRoleListResponse template) - { - super(template); - - if (template != null) - { - this.elements = template.getElements(); - } - } - - - /** - * Return the person role result. - * - * @return unique identifier - */ - public List getElements() - { - if (elements == null) - { - return null; - } - else if (elements.isEmpty()) - { - return null; - } - else - { - return elements; - } - } - - - /** - * Set up the person role result. - * - * @param elements - unique identifier - */ - public void setElements(List elements) - { - this.elements = elements; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "PersonRoleListResponse{" + - "elements=" + elements + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof PersonRoleListResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - PersonRoleListResponse that = (PersonRoleListResponse) objectToCompare; - return Objects.equals(getElements(), that.getElements()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elements); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/PersonRoleResponse.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/PersonRoleResponse.java deleted file mode 100644 index da5344953d7..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/PersonRoleResponse.java +++ /dev/null @@ -1,136 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.PersonRoleElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * PersonRoleResponse is the response structure used on the OMAS REST API calls that return a - * PersonRoleElement object as a response. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class PersonRoleResponse extends GovernanceProgramOMASAPIResponse -{ - private PersonRoleElement element = null; - - - /** - * Default constructor - */ - public PersonRoleResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public PersonRoleResponse(PersonRoleResponse template) - { - super(template); - - if (template != null) - { - this.element = template.getElement(); - } - } - - - /** - * Return the element result. - * - * @return details of person role - */ - public PersonRoleElement getElement() - { - return element; - } - - - /** - * Set up the element result. - * - * @param element details of person role - */ - public void setElement(PersonRoleElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "PersonRoleResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof PersonRoleResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - PersonRoleResponse that = (PersonRoleResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/ReferenceableRequestBody.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/ReferenceableRequestBody.java deleted file mode 100644 index 0c6ab74f5d2..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/ReferenceableRequestBody.java +++ /dev/null @@ -1,152 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.rest; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.ReferenceableProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * RelationshipRequestBody describes the request body used when linking elements together. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ReferenceableRequestBody extends ExternalSourceRequestBody -{ - private String anchorGUID = null; - private ReferenceableProperties properties = null; - - - /** - * Default constructor - */ - public ReferenceableRequestBody() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public ReferenceableRequestBody(ReferenceableRequestBody template) - { - super(template); - - if (template != null) - { - anchorGUID = template.getAnchorGUID(); - properties = template.getProperties(); - } - } - - - /** - * Return the properties for the relationship. - * - * @return properties object - */ - public ReferenceableProperties getProperties() - { - return properties; - } - - - /** - * Set up the properties for the relationship. - * - * @param properties properties object - */ - public void setProperties(ReferenceableProperties properties) - { - this.properties = properties; - } - - - /** - * Return an optional anchor GUID to attach the new element to. - * - * @return guid - */ - public String getAnchorGUID() - { - return anchorGUID; - } - - - /** - * Set up an optional anchor GUID to attach the new element to. - * - * @param anchorGUID guid - */ - public void setAnchorGUID(String anchorGUID) - { - this.anchorGUID = anchorGUID; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ReferenceableRequestBody{" + - "externalSourceGUID='" + getExternalSourceGUID() + '\'' + - ", externalSourceName='" + getExternalSourceName() + '\'' + - ", anchorGUID='" + anchorGUID + '\'' + - ", properties=" + properties + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (! (objectToCompare instanceof ReferenceableRequestBody)) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - ReferenceableRequestBody that = (ReferenceableRequestBody) objectToCompare; - return Objects.equals(anchorGUID, that.anchorGUID) && Objects.equals(properties, that.properties); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), anchorGUID, properties); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/RelatedElementListResponse.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/RelatedElementListResponse.java deleted file mode 100644 index 96752b91a83..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/RelatedElementListResponse.java +++ /dev/null @@ -1,146 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.governanceprogram.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.RelatedElement; - -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * RelatedElementListResponse is a response object for passing back a list of relatedElement objects. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class RelatedElementListResponse extends GovernanceProgramOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public RelatedElementListResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public RelatedElementListResponse(RelatedElementListResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return elementList; - } - } - - - /** - * Set up the list of metadata elements to return. - * - * @param elements result object - */ - public void setElementList(List elements) - { - this.elementList = elements; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "RelatedElementListResponse{" + - "element=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - RelatedElementListResponse that = (RelatedElementListResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/RelationshipRequestBody.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/RelationshipRequestBody.java deleted file mode 100644 index 59979d1bd44..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/RelationshipRequestBody.java +++ /dev/null @@ -1,152 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.rest; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.RelationshipProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * RelationshipRequestBody describes the request body used when linking elements together. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class RelationshipRequestBody extends ExternalSourceRequestBody -{ - private String relationshipName = null; - private RelationshipProperties properties = null; - - - /** - * Default constructor - */ - public RelationshipRequestBody() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public RelationshipRequestBody(RelationshipRequestBody template) - { - super(template); - - if (template != null) - { - relationshipName = template.getRelationshipName(); - properties = template.getProperties(); - } - } - - - /** - * Return the name of the relationship type. - * - * @return type name - */ - public String getRelationshipName() - { - return relationshipName; - } - - - /** - * Set up the name of the relationship type. - * - * @param relationshipName type name - */ - public void setRelationshipName(String relationshipName) - { - this.relationshipName = relationshipName; - } - - - /** - * Return the properties for the relationship. - * - * @return properties object - */ - public RelationshipProperties getProperties() - { - return properties; - } - - - /** - * Set up the properties for the relationship. - * - * @param properties properties object - */ - public void setProperties(RelationshipProperties properties) - { - this.properties = properties; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "RelationshipRequestBody{" + - "externalSourceGUID='" + getExternalSourceGUID() + '\'' + - ", externalSourceName='" + getExternalSourceName() + '\'' + - ", relationshipTypeName=" + relationshipName + - ", properties=" + properties + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - RelationshipRequestBody that = (RelationshipRequestBody) objectToCompare; - return Objects.equals(getProperties(), that.getProperties()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), relationshipName, properties); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/SubjectAreaDefinitionResponse.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/SubjectAreaDefinitionResponse.java deleted file mode 100644 index ac095ec7676..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/SubjectAreaDefinitionResponse.java +++ /dev/null @@ -1,138 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.governanceprogram.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceZoneDefinition; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.SubjectAreaDefinition; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * SubjectAreaDefinitionResponse is the response structure used on the OMAS REST API calls that return the properties - * for a subject area with the linked governance definitions. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class SubjectAreaDefinitionResponse extends GovernanceProgramOMASAPIResponse -{ - private SubjectAreaDefinition properties = null; - - - /** - * Default constructor - */ - public SubjectAreaDefinitionResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public SubjectAreaDefinitionResponse(SubjectAreaDefinitionResponse template) - { - super(template); - - if (template != null) - { - this.properties = template.getProperties(); - } - } - - - /** - * Return the properties result. - * - * @return bean - */ - public SubjectAreaDefinition getProperties() - { - return properties; - } - - - /** - * Set up the properties result. - * - * @param properties - bean - */ - public void setProperties(SubjectAreaDefinition properties) - { - this.properties = properties; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "SubjectAreaDefinitionResponse{" + - "properties=" + properties + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof SubjectAreaDefinitionResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - SubjectAreaDefinitionResponse that = (SubjectAreaDefinitionResponse) objectToCompare; - return Objects.equals(properties, that.properties); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(properties); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/SubjectAreaListResponse.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/SubjectAreaListResponse.java deleted file mode 100644 index b6c1944ee1e..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/SubjectAreaListResponse.java +++ /dev/null @@ -1,146 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.governanceprogram.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.SubjectAreaElement; - -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * SubjectAreaListResponse is the response structure used on the OMAS REST API calls that return a list of subject area descriptions. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class SubjectAreaListResponse extends GovernanceProgramOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public SubjectAreaListResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public SubjectAreaListResponse(SubjectAreaListResponse template) - { - super(template); - - if (template != null) - { - this.elementList = template.getElementList(); - } - } - - - /** - * Return the list of elements. - * - * @return list of results - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - - return elementList; - } - - - /** - * Set up the list of elements to return. - * - * @param elements list of results - */ - public void setElementList(List elements) - { - this.elementList = elements; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "SubjectAreaListResponse{" + - "elementList=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof SubjectAreaListResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - SubjectAreaListResponse that = (SubjectAreaListResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(elementList); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/SubjectAreaResponse.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/SubjectAreaResponse.java deleted file mode 100644 index ac4c09dd75f..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/SubjectAreaResponse.java +++ /dev/null @@ -1,137 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.governanceprogram.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.SubjectAreaElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * SubjectAreaResponse is the response structure used on the OMAS REST API calls that return the properties - * for a subject area. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class SubjectAreaResponse extends GovernanceProgramOMASAPIResponse -{ - private SubjectAreaElement element = null; - - - /** - * Default constructor - */ - public SubjectAreaResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public SubjectAreaResponse(SubjectAreaResponse template) - { - super(template); - - if (template != null) - { - this.element = template.getElement(); - } - } - - - /** - * Return the element result. - * - * @return bean - */ - public SubjectAreaElement getElement() - { - return element; - } - - - /** - * Set up the element result. - * - * @param element - bean - */ - public void setElement(SubjectAreaElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "SubjectAreaResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof SubjectAreaResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - SubjectAreaResponse that = (SubjectAreaResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(element); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/package-info.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/package-info.java deleted file mode 100644 index fad150c540f..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/package-info.java +++ /dev/null @@ -1,12 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -/** - * This package defines the beans used to build the REST request and response payloads. - * - * REST APIs can pass parameters in their URLs (called path variables) as well has having a RequestBody bean - * for additional, more complex, or optional parameters. Responses are returned in response beans. - * - * The response beans encode the return type of the method as well as any exceptions and associated messages. - */ -package org.odpi.openmetadata.accessservices.governanceprogram.rest; diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/test/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/MockAPIResponse.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/test/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/MockAPIResponse.java deleted file mode 100644 index 42b367b5248..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/test/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/MockAPIResponse.java +++ /dev/null @@ -1,27 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.rest; - -/** - * MockAPIResponse enables the overridden methods of GovernanceProgramOMASAPIResponse to be tested. - */ -public class MockAPIResponse extends GovernanceProgramOMASAPIResponse -{ - /** - * Default constructor - */ - public MockAPIResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to clone - */ - public MockAPIResponse(MockAPIResponse template) - { - super(template); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/test/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/OMASAPIResponseTest.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/test/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/OMASAPIResponseTest.java deleted file mode 100644 index 6d361337a2e..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/test/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/OMASAPIResponseTest.java +++ /dev/null @@ -1,21 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.rest; - -import org.testng.annotations.Test; - -import static org.testng.Assert.assertTrue; - -/** - * Test the overridden methods of GovernanceProgramOMASAPIResponse - */ -public class OMASAPIResponseTest -{ - @Test public void TestToString() - { - MockAPIResponse testObject = new MockAPIResponse(); - - assertTrue(testObject.toString().contains("GovernanceProgramOMASAPIResponse")); - assertTrue(new MockAPIResponse(testObject).toString().contains("GovernanceProgramOMASAPIResponse")); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-client/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/client/CertificationManager.java b/open-metadata-implementation/access-services/governance-program/governance-program-client/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/client/CertificationManager.java index 789214cae29..4bc338b315f 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-client/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/client/CertificationManager.java +++ b/open-metadata-implementation/access-services/governance-program/governance-program-client/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/client/CertificationManager.java @@ -4,17 +4,17 @@ import org.odpi.openmetadata.accessservices.governanceprogram.api.CertificationManagementInterface; import org.odpi.openmetadata.accessservices.governanceprogram.client.rest.GovernanceProgramRESTClient; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.CertificationTypeElement; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.RelatedElement; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.CertificationProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.CertificationTypeProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceDefinitionStatus; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.*; +import org.odpi.openmetadata.commonservices.ffdc.rest.CertificationTypeResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.CertificationTypesResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.RelatedElementsResponse; import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.enums.GovernanceDefinitionStatus; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.*; import java.util.List; @@ -240,10 +240,10 @@ public CertificationTypeElement getCertificationTypeByGUID(String userId, invalidParameterHandler.validateGUID(certificationTypeGUID, guidParameterName, methodName); CertificationTypeResponse restResult = restClient.callCertificationTypeGetRESTCall(methodName, - urlTemplate, - serverName, - userId, - certificationTypeGUID); + urlTemplate, + serverName, + userId, + certificationTypeGUID); return restResult.getElement(); } @@ -321,13 +321,13 @@ public List getCertificationTypesByTitle(String userId requestBody.setSearchString(title); requestBody.setSearchStringParameterName(titleParameterName); - CertificationTypeListResponse restResult = restClient.callCertificationTypeListPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - startFrom, - queryPageSize); + CertificationTypesResponse restResult = restClient.callCertificationTypeListPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + startFrom, + queryPageSize); return restResult.getElements(); } @@ -362,13 +362,13 @@ public List getCertificationTypeByDomainId(String user invalidParameterHandler.validateUserId(userId, methodName); int queryPageSize = invalidParameterHandler.validatePaging(startFrom, pageSize, methodName); - CertificationTypeListResponse restResult = restClient.callCertificationTypeListGetRESTCall(methodName, - urlTemplate, - serverName, - userId, - domainIdentifier, - startFrom, - queryPageSize); + CertificationTypesResponse restResult = restClient.callCertificationTypeListGetRESTCall(methodName, + urlTemplate, + serverName, + userId, + domainIdentifier, + startFrom, + queryPageSize); return restResult.getElements(); } @@ -545,14 +545,14 @@ public List getCertifications(String userId, int queryPageSize = invalidParameterHandler.validatePaging(startFrom, pageSize, methodName); - RelatedElementListResponse restResult = restClient.callRelatedElementListGetRESTCall(methodName, - urlTemplate, - serverName, - userId, - elementGUID, - startFrom, - queryPageSize); + RelatedElementsResponse restResult = restClient.callRelatedElementsGetRESTCall(methodName, + urlTemplate, + serverName, + userId, + elementGUID, + startFrom, + queryPageSize); - return restResult.getElementList(); + return restResult.getElements(); } } diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-client/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/client/ExternalReferenceManager.java b/open-metadata-implementation/access-services/governance-program/governance-program-client/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/client/ExternalReferenceManager.java index f4dfdbfd1a0..c9cddcda369 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-client/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/client/ExternalReferenceManager.java +++ b/open-metadata-implementation/access-services/governance-program/governance-program-client/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/client/ExternalReferenceManager.java @@ -4,18 +4,18 @@ import org.odpi.openmetadata.accessservices.governanceprogram.api.ExternalReferencesInterface; import org.odpi.openmetadata.accessservices.governanceprogram.client.rest.GovernanceProgramRESTClient; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.ExternalReferenceElement; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.RelatedElement; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.ExternalReferenceLinkProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.ExternalReferenceProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.ExternalReferenceListResponse; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.ExternalReferenceResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.ExternalReferenceResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.ExternalReferencesResponse; import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ExternalReferenceElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.externalreferences.ExternalReferenceLinkProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.externalreferences.ExternalReferenceProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.RelatedElement; import java.util.List; @@ -290,7 +290,7 @@ public ExternalReferenceElement getExternalReferenceByGUID(String userId, invalidParameterHandler.validateGUID(externalReferenceGUID, guidParameterName, methodName); ExternalReferenceResponse restResult = restClient.callExternalReferenceGetRESTCall(methodName, - urlTemplate, + urlTemplate, serverName, userId, externalReferenceGUID); @@ -335,13 +335,13 @@ public List findExternalReferencesById(String userId, requestBody.setSearchString(resourceId); requestBody.setSearchStringParameterName(resourceIdParameterName); - ExternalReferenceListResponse restResult = restClient.callExternalReferenceListPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - startFrom, - queryPageSize); + ExternalReferencesResponse restResult = restClient.callExternalReferencesPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + startFrom, + queryPageSize); return restResult.getElements(); } @@ -382,13 +382,13 @@ public List getExternalReferencesByURL(String userId, requestBody.setName(url); requestBody.setNameParameterName(urlParameterName); - ExternalReferenceListResponse restResult = restClient.callExternalReferenceListPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - startFrom, - queryPageSize); + ExternalReferencesResponse restResult = restClient.callExternalReferencesPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + startFrom, + queryPageSize); return restResult.getElements(); } @@ -426,13 +426,13 @@ public List retrieveAttachedExternalReferences(String int queryPageSize = invalidParameterHandler.validatePaging(startFrom, pageSize, methodName); - ExternalReferenceListResponse restResult = restClient.callExternalReferenceListGetRESTCall(methodName, - urlTemplate, - serverName, - userId, - attachedToGUID, - startFrom, - queryPageSize); + ExternalReferencesResponse restResult = restClient.callExternalReferencesGetRESTCall(methodName, + urlTemplate, + serverName, + userId, + attachedToGUID, + startFrom, + queryPageSize); return restResult.getElements(); } diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-client/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/client/GovernanceClassificationLevelManager.java b/open-metadata-implementation/access-services/governance-program/governance-program-client/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/client/GovernanceClassificationLevelManager.java index 3afd35e8805..e1dd3915b5d 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-client/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/client/GovernanceClassificationLevelManager.java +++ b/open-metadata-implementation/access-services/governance-program/governance-program-client/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/client/GovernanceClassificationLevelManager.java @@ -5,11 +5,13 @@ import org.odpi.openmetadata.accessservices.governanceprogram.api.GovernanceClassificationLevelInterface; import org.odpi.openmetadata.accessservices.governanceprogram.client.rest.GovernanceProgramRESTClient; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceLevelIdentifierElement; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceLevelIdentifierSetElement; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceLevelIdentifierProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceLevelIdentifierSetProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.*; +import org.odpi.openmetadata.commonservices.ffdc.rest.GovernanceLevelIdentifierResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.GovernanceLevelIdentifierSetResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.GovernanceLevelIdentifierSetsResponse; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.GovernanceLevelIdentifierElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.GovernanceLevelIdentifierSetElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.GovernanceLevelIdentifierProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.GovernanceLevelIdentifierSetProperties; import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; @@ -283,10 +285,10 @@ public List getGovernanceLevelIdentifierSet invalidParameterHandler.validateUserId(userId, methodName); - GovernanceLevelIdentifierSetListResponse restResult = restClient.callLevelIdentifierSetListGetRESTCall(methodName, - urlTemplate, - serverName, - userId); + GovernanceLevelIdentifierSetsResponse restResult = restClient.callLevelIdentifierSetListGetRESTCall(methodName, + urlTemplate, + serverName, + userId); return restResult.getElements(); } diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-client/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/client/GovernanceDefinitionManager.java b/open-metadata-implementation/access-services/governance-program/governance-program-client/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/client/GovernanceDefinitionManager.java index 11fcf7f4d13..51572cc5cea 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-client/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/client/GovernanceDefinitionManager.java +++ b/open-metadata-implementation/access-services/governance-program/governance-program-client/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/client/GovernanceDefinitionManager.java @@ -4,10 +4,9 @@ import org.odpi.openmetadata.accessservices.governanceprogram.api.GovernanceDefinitionsInterface; import org.odpi.openmetadata.accessservices.governanceprogram.client.rest.GovernanceProgramRESTClient; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceDefinitionProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceDefinitionStatus; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.PeerDefinitionProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.SupportingDefinitionProperties; +import org.odpi.openmetadata.frameworks.openmetadata.enums.GovernanceDefinitionStatus; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.PeerDefinitionProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.*; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; @@ -17,11 +16,9 @@ /** * GovernanceDefinitionManager is the java client for managing the definitions for the governance drivers, policies and controls * that define the motivation, goals and implementation approach for the governance program. - * * Governance drivers document of the business strategy and regulations that provide the motivation behind the governance program. They feed * into the governance program's policymaking phase ensuring the governance program is focused on activity that delivers value to the organization. * A governance driver could be a governance strategy statement, a business imperative, a regulation or a regulation's article. - * * Governance policies define the goals and best practices for the governance program. There are three types of governance policies: *
      *
    • diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-client/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/client/GovernanceDomainManager.java b/open-metadata-implementation/access-services/governance-program/governance-program-client/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/client/GovernanceDomainManager.java index 5e263e6c388..814173c22d2 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-client/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/client/GovernanceDomainManager.java +++ b/open-metadata-implementation/access-services/governance-program/governance-program-client/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/client/GovernanceDomainManager.java @@ -5,14 +5,12 @@ import org.odpi.openmetadata.accessservices.governanceprogram.api.GovernanceDomainInterface; import org.odpi.openmetadata.accessservices.governanceprogram.client.rest.GovernanceProgramRESTClient; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceDomainElement; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceDomainSetElement; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.GovernanceDomainElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.GovernanceDomainSetElement; import org.odpi.openmetadata.frameworks.openmetadata.enums.GovernanceDomain; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceDomainProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceDomainSetProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.*; -import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.GovernanceDomainProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.GovernanceDomainSetProperties; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; @@ -317,13 +315,13 @@ public List findGovernanceDomainSets(String userId, requestBody.setSearchString(searchString); requestBody.setSearchStringParameterName(searchStringParameterName); - GovernanceDomainSetListResponse restResult = restClient.callGovernanceDomainSetListPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - startFrom, - queryPageSize); + GovernanceDomainSetsResponse restResult = restClient.callGovernanceDomainSetListPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + startFrom, + queryPageSize); return restResult.getElements(); } @@ -366,13 +364,13 @@ public List getGovernanceDomainSetsByName(String use requestBody.setName(name); requestBody.setNameParameterName(nameParameterName); - GovernanceDomainSetListResponse restResult = restClient.callGovernanceDomainSetListPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - startFrom, - queryPageSize); + GovernanceDomainSetsResponse restResult = restClient.callGovernanceDomainSetListPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + startFrom, + queryPageSize); return restResult.getElements(); } @@ -597,12 +595,12 @@ public List getGovernanceDomains(String userId, int queryPageSize = invalidParameterHandler.validatePaging(startFrom, pageSize, methodName); - GovernanceDomainListResponse restResult = restClient.callGovernanceDomainListGetRESTCall(methodName, - urlTemplate, - serverName, - userId, - startFrom, - queryPageSize); + GovernanceDomainsResponse restResult = restClient.callGovernanceDomainListGetRESTCall(methodName, + urlTemplate, + serverName, + userId, + startFrom, + queryPageSize); return restResult.getElements(); } @@ -645,13 +643,13 @@ public List findGovernanceDomains(String userId, requestBody.setSearchString(searchString); requestBody.setSearchStringParameterName(searchStringParameterName); - GovernanceDomainListResponse restResult = restClient.callGovernanceDomainListPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - startFrom, - queryPageSize); + GovernanceDomainsResponse restResult = restClient.callGovernanceDomainListPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + startFrom, + queryPageSize); return restResult.getElements(); } @@ -688,13 +686,13 @@ public List getSetsForGovernanceDomain(String userId int queryPageSize = invalidParameterHandler.validatePaging(startFrom, pageSize, methodName); - GovernanceDomainSetListResponse restResult = restClient.callGovernanceDomainSetListGetRESTCall(methodName, - urlTemplate, - serverName, - userId, - governanceDomainGUID, - startFrom, - queryPageSize); + GovernanceDomainSetsResponse restResult = restClient.callGovernanceDomainSetListGetRESTCall(methodName, + urlTemplate, + serverName, + userId, + governanceDomainGUID, + startFrom, + queryPageSize); return restResult.getElements(); } @@ -737,13 +735,13 @@ public List getGovernanceDomainsByName(String userId, requestBody.setName(name); requestBody.setNameParameterName(nameParameterName); - GovernanceDomainListResponse restResult = restClient.callGovernanceDomainListPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - startFrom, - queryPageSize); + GovernanceDomainsResponse restResult = restClient.callGovernanceDomainListPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + startFrom, + queryPageSize); return restResult.getElements(); } diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-client/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/client/GovernanceMetricsManager.java b/open-metadata-implementation/access-services/governance-program/governance-program-client/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/client/GovernanceMetricsManager.java index e1766ad2917..34296f9102d 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-client/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/client/GovernanceMetricsManager.java +++ b/open-metadata-implementation/access-services/governance-program/governance-program-client/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/client/GovernanceMetricsManager.java @@ -4,15 +4,13 @@ import org.odpi.openmetadata.accessservices.governanceprogram.api.GovernanceMetricsInterface; import org.odpi.openmetadata.accessservices.governanceprogram.client.rest.GovernanceProgramRESTClient; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceMetricElement; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceDefinitionMetricProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceExpectationsProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceMeasurementsDataSetProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceMeasurementsProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceMetricProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceResultsProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.GovernanceMetricListResponse; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.GovernanceMetricResponse; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.GovernanceMetricElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.GovernanceDefinitionMetricProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.GovernanceExpectationsProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.GovernanceMeasurementsDataSetProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.GovernanceMeasurementsProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.GovernanceMetricProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.GovernanceResultsProperties; import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; @@ -537,13 +535,13 @@ public List findGovernanceMetrics(String userId, requestBody.setSearchString(searchString); requestBody.setSearchStringParameterName(searchStringParameterName); - GovernanceMetricListResponse restResult = restClient.callGovernanceMetricListPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - startFrom, - queryPageSize); + GovernanceMetricsResponse restResult = restClient.callGovernanceMetricListPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + startFrom, + queryPageSize); return restResult.getElements(); } diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-client/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/client/GovernanceProgramBaseClient.java b/open-metadata-implementation/access-services/governance-program/governance-program-client/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/client/GovernanceProgramBaseClient.java index 218255e2eaa..a35ec8b31f3 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-client/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/client/GovernanceProgramBaseClient.java +++ b/open-metadata-implementation/access-services/governance-program/governance-program-client/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/client/GovernanceProgramBaseClient.java @@ -5,37 +5,20 @@ import org.odpi.openmetadata.accessservices.governanceprogram.api.RelatedElementsManagementInterface; import org.odpi.openmetadata.accessservices.governanceprogram.client.rest.GovernanceProgramRESTClient; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceDefinitionElement; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceRoleElement; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.RelatedElement; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.AssignmentScopeProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.ClassificationProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceDefinitionProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceDefinitionStatus; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceRoleProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.ReferenceableProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.RelationshipProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.ResourceListProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.StakeholderProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.ClassificationRequestBody; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.ElementStubListResponse; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.ExternalSourceRequestBody; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.GovernanceDefinitionListResponse; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.GovernanceDefinitionRequestBody; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.GovernanceRoleListResponse; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.GovernanceRoleRequestBody; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.GovernanceStatusRequestBody; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.ReferenceableRequestBody; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.RelatedElementListResponse; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.RelationshipRequestBody; +import org.odpi.openmetadata.frameworks.openmetadata.enums.GovernanceDefinitionStatus; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.*; import org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NullRequestBody; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.properties.projects.StakeholderProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.resources.ResourceListProperties; import java.util.List; @@ -928,15 +911,15 @@ List getRelatedElements(String userId, invalidParameterHandler.validateUserId(userId, methodName); invalidParameterHandler.validateGUID(startingElementGUID, startingElementGUIDParameterName, methodName); - RelatedElementListResponse restResult = restClient.callRelatedElementListGetRESTCall(methodName, - urlTemplate, - serverName, - userId, - startingElementGUID, - Integer.toString(startFrom), - Integer.toString(pageSize)); + RelatedElementsResponse restResult = restClient.callRelatedElementsGetRESTCall(methodName, + urlTemplate, + serverName, + userId, + startingElementGUID, + Integer.toString(startFrom), + Integer.toString(pageSize)); - return restResult.getElementList(); + return restResult.getElements(); } @@ -969,13 +952,13 @@ List getElementStubsByName(String userId, invalidParameterHandler.validateUserId(userId, methodName); invalidParameterHandler.validateName(name, nameParameterName, methodName); - ElementStubListResponse restResult = restClient.callElementStubListGetRESTCall(methodName, - urlTemplate, - serverName, - userId, - name, - Integer.toString(startFrom), - Integer.toString(pageSize)); + ElementStubsResponse restResult = restClient.callElementStubsGetRESTCall(methodName, + urlTemplate, + serverName, + userId, + name, + Integer.toString(startFrom), + Integer.toString(pageSize)); return restResult.getElements(); } @@ -1010,13 +993,13 @@ List getGovernanceDefinitionElements(String userId, invalidParameterHandler.validateUserId(userId, methodName); invalidParameterHandler.validateGUID(startingElementGUID, startingElementGUIDParameterName, methodName); - GovernanceDefinitionListResponse restResult = restClient.callGovernanceDefinitionListGetRESTCall(methodName, - urlTemplate, - serverName, - userId, - startingElementGUID, - Integer.toString(startFrom), - Integer.toString(pageSize)); + GovernanceDefinitionsResponse restResult = restClient.callGovernanceDefinitionsGetRESTCall(methodName, + urlTemplate, + serverName, + userId, + startingElementGUID, + Integer.toString(startFrom), + Integer.toString(pageSize)); return restResult.getElements(); } @@ -1051,13 +1034,13 @@ List getGovernanceRoleElements(String userId, invalidParameterHandler.validateUserId(userId, methodName); invalidParameterHandler.validateGUID(startingElementGUID, startingElementGUIDParameterName, methodName); - GovernanceRoleListResponse restResult = restClient.callGovernanceRoleListGetRESTCall(methodName, - urlTemplate, - serverName, - userId, - startingElementGUID, - Integer.toString(startFrom), - Integer.toString(pageSize)); + GovernanceRolesResponse restResult = restClient.callGovernanceRoleListGetRESTCall(methodName, + urlTemplate, + serverName, + userId, + startingElementGUID, + Integer.toString(startFrom), + Integer.toString(pageSize)); return restResult.getElements(); } diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-client/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/client/GovernanceProgramReviewManager.java b/open-metadata-implementation/access-services/governance-program/governance-program-client/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/client/GovernanceProgramReviewManager.java index 66b8113e886..d50b5a61bd2 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-client/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/client/GovernanceProgramReviewManager.java +++ b/open-metadata-implementation/access-services/governance-program/governance-program-client/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/client/GovernanceProgramReviewManager.java @@ -4,14 +4,12 @@ import org.odpi.openmetadata.accessservices.governanceprogram.api.GovernanceProgramReviewInterface; import org.odpi.openmetadata.accessservices.governanceprogram.client.rest.GovernanceProgramRESTClient; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.*; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.*; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; import java.util.List; @@ -184,15 +182,15 @@ public List getGovernanceDefinitionsForDomain(Strin int queryPageSize = invalidParameterHandler.validatePaging(startFrom, pageSize, methodName); - GovernanceDefinitionListResponse restResult = restClient.callGovernanceDefinitionListGetRESTCall(methodName, - urlTemplate, - serverName, - userId, - getTypeName(typeName), - domainIdentifier, - typeName, - startFrom, - queryPageSize); + GovernanceDefinitionsResponse restResult = restClient.callGovernanceDefinitionsGetRESTCall(methodName, + urlTemplate, + serverName, + userId, + getTypeName(typeName), + domainIdentifier, + typeName, + startFrom, + queryPageSize); return restResult.getElements(); } @@ -232,14 +230,14 @@ public List getGovernanceDefinitionsForDocId(String int queryPageSize = invalidParameterHandler.validatePaging(startFrom, pageSize, methodName); - GovernanceDefinitionListResponse restResult = restClient.callGovernanceDefinitionListGetRESTCall(methodName, - urlTemplate, - serverName, - userId, - getTypeName(typeName), - docId, - startFrom, - queryPageSize); + GovernanceDefinitionsResponse restResult = restClient.callGovernanceDefinitionsGetRESTCall(methodName, + urlTemplate, + serverName, + userId, + getTypeName(typeName), + docId, + startFrom, + queryPageSize); return restResult.getElements(); } @@ -336,14 +334,14 @@ public List findGovernanceDefinitions(String userId requestBody.setSearchString(searchString); requestBody.setSearchStringParameterName(searchStringParameterName); - GovernanceDefinitionListResponse restResult = restClient.callGovernanceDefinitionListPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - getTypeName(typeName), - startFrom, - queryPageSize); + GovernanceDefinitionsResponse restResult = restClient.callGovernanceDefinitionsPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + getTypeName(typeName), + startFrom, + queryPageSize); return restResult.getElements(); } @@ -379,7 +377,7 @@ public List getGovernanceDefinitionMetrics(Strin int queryPageSize = invalidParameterHandler.validatePaging(startFrom, pageSize, methodName); - GovernanceMetricImplementationListResponse restResult = restClient.callGovernanceMetricsImplementationListGetRESTCall(methodName, + GovernanceMetricImplementationsResponse restResult = restClient.callGovernanceMetricsImplementationListGetRESTCall(methodName, urlTemplate, serverName, userId, @@ -431,14 +429,14 @@ public List getGovernanceZoneMembers(String userId, typeName = subTypeName; } - ElementStubListResponse restResult = restClient.callElementStubListGetRESTCall(methodName, - urlTemplate, - serverName, - userId, - zoneName, - typeName, - startFrom, - queryPageSize); + ElementStubsResponse restResult = restClient.callElementStubsGetRESTCall(methodName, + urlTemplate, + serverName, + userId, + zoneName, + typeName, + startFrom, + queryPageSize); return restResult.getElements(); } diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-client/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/client/GovernanceRoleManager.java b/open-metadata-implementation/access-services/governance-program/governance-program-client/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/client/GovernanceRoleManager.java index 6ab05c61816..133fc4b388a 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-client/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/client/GovernanceRoleManager.java +++ b/open-metadata-implementation/access-services/governance-program/governance-program-client/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/client/GovernanceRoleManager.java @@ -4,17 +4,9 @@ import org.odpi.openmetadata.accessservices.governanceprogram.api.GovernanceRolesInterface; import org.odpi.openmetadata.accessservices.governanceprogram.client.rest.GovernanceProgramRESTClient; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceRoleAppointee; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceRoleElement; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceRoleHistory; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceRoleProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.AppointmentRequestBody; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.GovernanceRoleAppointeeListResponse; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.GovernanceRoleHistoryResponse; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.GovernanceRoleListResponse; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.GovernanceRoleResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.*; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; @@ -318,11 +310,11 @@ public List getGovernanceRoleByRoleId(String userId, invalidParameterHandler.validateUserId(userId, methodName); invalidParameterHandler.validateName(roleId, appointmentIdParameterName, methodName); - GovernanceRoleListResponse restResult = restClient.callGovernanceRoleListGetRESTCall(methodName, - urlTemplate, - serverName, - userId, - roleId); + GovernanceRolesResponse restResult = restClient.callGovernanceRoleListGetRESTCall(methodName, + urlTemplate, + serverName, + userId, + roleId); return restResult.getElements(); } @@ -358,13 +350,13 @@ public List getGovernanceRolesByDomainId(String userId, int queryPageSize = invalidParameterHandler.validatePaging(startFrom, pageSize, methodName); - GovernanceRoleListResponse restResult = restClient.callGovernanceRoleListGetRESTCall(methodName, - urlTemplate, - serverName, - userId, - domainIdentifier, - startFrom, - queryPageSize); + GovernanceRolesResponse restResult = restClient.callGovernanceRoleListGetRESTCall(methodName, + urlTemplate, + serverName, + userId, + domainIdentifier, + startFrom, + queryPageSize); return restResult.getElements(); } @@ -405,13 +397,13 @@ public List getGovernanceRolesByTitle(String userId, requestBody.setSearchString(title); requestBody.setSearchStringParameterName(titleParameterName); - GovernanceRoleListResponse restResult = restClient.callGovernanceRoleListPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - startFrom, - queryPageSize); + GovernanceRolesResponse restResult = restClient.callGovernanceRoleListPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + startFrom, + queryPageSize); return restResult.getElements(); } @@ -447,13 +439,13 @@ public List getCurrentGovernanceRoleAppointments(String int queryPageSize = invalidParameterHandler.validatePaging(startFrom, pageSize, methodName); - GovernanceRoleAppointeeListResponse restResult = restClient.callGovernanceRoleAppointeeListGetRESTCall(methodName, - urlTemplate, - serverName, - userId, - domainIdentifier, - startFrom, - queryPageSize); + GovernanceRoleAppointeesResponse restResult = restClient.callGovernanceRoleAppointeeListGetRESTCall(methodName, + urlTemplate, + serverName, + userId, + domainIdentifier, + startFrom, + queryPageSize); return restResult.getElements(); } @@ -481,7 +473,7 @@ public String appointGovernanceRole(String userId, UserNotAuthorizedException { final String methodName = "appointGovernanceRole"; - final String urlTemplate = serverPlatformURLRoot + "/servers/{0}/open-metadata/access-services/governance-program/users/{1}/governance-roles/{2}/appoint"; + final String urlTemplate = serverPlatformURLRoot + "/servers/{0}/open-metadata/access-services/governance-program/users/{1}/governance-roles/{2}/appoint/{3}"; final String governanceRoleGUIDParameterName = "governanceRoleGUID"; final String profileGUIDParameterName = "profileGUID"; @@ -490,16 +482,16 @@ public String appointGovernanceRole(String userId, invalidParameterHandler.validateGUID(governanceRoleGUID, governanceRoleGUIDParameterName, methodName); invalidParameterHandler.validateGUID(profileGUID, profileGUIDParameterName, methodName); - AppointmentRequestBody requestBody = new AppointmentRequestBody(); - requestBody.setProfileGUID(profileGUID); - requestBody.setEffectiveDate(startDate); + AppointmentRequestBody requestBody = new AppointmentRequestBody(); + requestBody.setEffectiveTime(startDate); GUIDResponse restResult = restClient.callGUIDPostRESTCall(methodName, urlTemplate, requestBody, serverName, userId, - governanceRoleGUID); + governanceRoleGUID, + profileGUID); return restResult.getGUID(); } @@ -528,7 +520,7 @@ public void relieveGovernanceRole(String userId, UserNotAuthorizedException { final String methodName = "relieveGovernanceRole"; - final String urlTemplate = serverPlatformURLRoot + "/servers/{0}/open-metadata/access-services/governance-program/users/{1}/governance-roles/{2}/relieve/{3}"; + final String urlTemplate = serverPlatformURLRoot + "/servers/{0}/open-metadata/access-services/governance-program/users/{1}/governance-roles/{2}/relieve/{3}/{4}"; final String governanceRoleGUIDParameterName = "governanceRoleGUID"; final String profileGUIDParameterName = "profileGUID"; @@ -538,8 +530,7 @@ public void relieveGovernanceRole(String userId, invalidParameterHandler.validateGUID(profileGUID, profileGUIDParameterName, methodName); AppointmentRequestBody requestBody = new AppointmentRequestBody(); - requestBody.setProfileGUID(profileGUID); - requestBody.setEffectiveDate(endDate); + requestBody.setEffectiveTime(endDate); restClient.callVoidPostRESTCall(methodName, urlTemplate, @@ -547,6 +538,7 @@ public void relieveGovernanceRole(String userId, serverName, userId, governanceRoleGUID, - appointmentGUID); + appointmentGUID, + profileGUID); } } diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-client/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/client/GovernanceStatusLevelManager.java b/open-metadata-implementation/access-services/governance-program/governance-program-client/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/client/GovernanceStatusLevelManager.java index 5694e99b924..e98eba79ad9 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-client/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/client/GovernanceStatusLevelManager.java +++ b/open-metadata-implementation/access-services/governance-program/governance-program-client/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/client/GovernanceStatusLevelManager.java @@ -5,14 +5,11 @@ import org.odpi.openmetadata.accessservices.governanceprogram.api.GovernanceStatusLevelInterface; import org.odpi.openmetadata.accessservices.governanceprogram.client.rest.GovernanceProgramRESTClient; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceStatusIdentifierElement; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceStatusIdentifierSetElement; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceStatusIdentifierProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceStatusIdentifierSetProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.GovernanceStatusIdentifierResponse; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.GovernanceStatusIdentifierSetListResponse; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.GovernanceStatusIdentifierSetResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.GovernanceStatusIdentifierElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.GovernanceStatusIdentifierSetElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.GovernanceStatusIdentifierProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.GovernanceStatusIdentifierSetProperties; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; @@ -265,10 +262,10 @@ public List getGovernanceStatusIdentifierS invalidParameterHandler.validateUserId(userId, methodName); - GovernanceStatusIdentifierSetListResponse restResult = restClient.callStatusIdentifierSetListGetRESTCall(methodName, - urlTemplate, - serverName, - userId); + GovernanceStatusIdentifierSetsResponse restResult = restClient.callStatusIdentifierSetListGetRESTCall(methodName, + urlTemplate, + serverName, + userId); return restResult.getElements(); } diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-client/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/client/GovernanceZoneManager.java b/open-metadata-implementation/access-services/governance-program/governance-program-client/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/client/GovernanceZoneManager.java index c749196e893..5f752e1918e 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-client/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/client/GovernanceZoneManager.java +++ b/open-metadata-implementation/access-services/governance-program/governance-program-client/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/client/GovernanceZoneManager.java @@ -5,12 +5,12 @@ import org.odpi.openmetadata.accessservices.governanceprogram.api.GovernanceZonesInterface; import org.odpi.openmetadata.accessservices.governanceprogram.client.rest.GovernanceProgramRESTClient; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceZoneDefinition; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceZoneElement; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceZoneProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.GovernanceZoneDefinitionResponse; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.GovernanceZoneListResponse; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.GovernanceZoneResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.GovernanceZoneDefinitionResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.GovernanceZoneResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.GovernanceZonesResponse; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.GovernanceZoneDefinition; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.GovernanceZoneElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.GovernanceZoneProperties; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; @@ -384,15 +384,15 @@ public List getGovernanceZonesForDomain(String userId, int queryPageSize = invalidParameterHandler.validatePaging(startFrom, pageSize, methodName); - GovernanceZoneListResponse restResult = restClient.callGovernanceZoneListGetRESTCall(methodName, - urlTemplate, - serverName, - userId, - domainIdentifier, - startFrom, - queryPageSize); + GovernanceZonesResponse restResult = restClient.callGovernanceZoneListGetRESTCall(methodName, + urlTemplate, + serverName, + userId, + domainIdentifier, + startFrom, + queryPageSize); - return restResult.getElementList(); + return restResult.getElements(); } diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-client/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/client/RightsManager.java b/open-metadata-implementation/access-services/governance-program/governance-program-client/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/client/RightsManager.java index a56178807ea..063d4fdbb4a 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-client/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/client/RightsManager.java +++ b/open-metadata-implementation/access-services/governance-program/governance-program-client/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/client/RightsManager.java @@ -4,20 +4,15 @@ import org.odpi.openmetadata.accessservices.governanceprogram.api.RightsManagementInterface; import org.odpi.openmetadata.accessservices.governanceprogram.client.rest.GovernanceProgramRESTClient; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.LicenseElement; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.LicenseTypeElement; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.RelatedElement; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceDefinitionStatus; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.LicenseProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.LicenseTypeProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.LicenseListResponse; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.LicenseTypeListResponse; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.LicenseTypeResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.enums.GovernanceDefinitionStatus; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.LicenseProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.LicenseTypeProperties; import java.util.List; @@ -348,7 +343,7 @@ public List getLicenseTypesByTitle(String userId, requestBody.setSearchString(title); requestBody.setSearchStringParameterName(titleParameterName); - LicenseTypeListResponse restResult = restClient.callLicenseTypeListPostRESTCall(methodName, + LicenseTypesResponse restResult = restClient.callLicenseTypeListPostRESTCall(methodName, urlTemplate, requestBody, serverName, @@ -389,13 +384,13 @@ public List getLicenseTypeByDomainId(String userId, int queryPageSize = invalidParameterHandler.validatePaging(startFrom, pageSize, methodName); - LicenseTypeListResponse restResult = restClient.callLicenseTypeListGetRESTCall(methodName, - urlTemplate, - serverName, - userId, - domainIdentifier, - startFrom, - queryPageSize); + LicenseTypesResponse restResult = restClient.callLicenseTypesGetRESTCall(methodName, + urlTemplate, + serverName, + userId, + domainIdentifier, + startFrom, + queryPageSize); return restResult.getElements(); } @@ -461,9 +456,9 @@ public String licenseElement(String userId, public void updateLicense(String userId, String licenseGUID, boolean isMergeUpdate, - LicenseProperties properties) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException + LicenseProperties properties) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException { final String methodName = "updateLicense"; final String urlTemplate = serverPlatformURLRoot + "/servers/{0}/open-metadata/access-services/governance-program/users/{1}/licenses/{2}/update?isMergeUpdate={3}"; @@ -572,13 +567,13 @@ public List getLicenses(String userId, int queryPageSize = invalidParameterHandler.validatePaging(startFrom, pageSize, methodName); - LicenseListResponse restResult = restClient.callLicenseListGetRESTCall(methodName, - urlTemplate, - serverName, - userId, - elementGUID, - startFrom, - queryPageSize); + LicensesResponse restResult = restClient.callLicensesGetRESTCall(methodName, + urlTemplate, + serverName, + userId, + elementGUID, + startFrom, + queryPageSize); return restResult.getElements(); } diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-client/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/client/SubjectAreaManager.java b/open-metadata-implementation/access-services/governance-program/governance-program-client/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/client/SubjectAreaManager.java index 71ae215d154..ed219e2be58 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-client/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/client/SubjectAreaManager.java +++ b/open-metadata-implementation/access-services/governance-program/governance-program-client/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/client/SubjectAreaManager.java @@ -5,16 +5,14 @@ import org.odpi.openmetadata.accessservices.governanceprogram.api.SubjectAreasInterface; import org.odpi.openmetadata.accessservices.governanceprogram.client.rest.GovernanceProgramRESTClient; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.SubjectAreaDefinition; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.SubjectAreaElement; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.SubjectAreaClassificationProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.SubjectAreaProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.*; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.*; import java.util.List; @@ -376,15 +374,15 @@ public List getSubjectAreasForDomain(String userId, int queryPageSize = invalidParameterHandler.validatePaging(startFrom, pageSize, methodName); - SubjectAreaListResponse restResult = restClient.callSubjectAreaListGetRESTCall(methodName, - urlTemplate, - serverName, - userId, - domainIdentifier, - startFrom, - queryPageSize); + SubjectAreasResponse restResult = restClient.callSubjectAreaListGetRESTCall(methodName, + urlTemplate, + serverName, + userId, + domainIdentifier, + startFrom, + queryPageSize); - return restResult.getElementList(); + return restResult.getElements(); } diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-client/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/client/rest/GovernanceProgramRESTClient.java b/open-metadata-implementation/access-services/governance-program/governance-program-client/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/client/rest/GovernanceProgramRESTClient.java index c7cea31165c..a4b8adbf932 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-client/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/client/rest/GovernanceProgramRESTClient.java +++ b/open-metadata-implementation/access-services/governance-program/governance-program-client/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/client/rest/GovernanceProgramRESTClient.java @@ -2,8 +2,8 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.governanceprogram.client.rest; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.*; import org.odpi.openmetadata.commonservices.ffdc.rest.FFDCRESTClient; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; @@ -118,18 +118,18 @@ public CertificationTypeResponse callCertificationTypeGetRESTCall(String meth * @param methodName name of the method being called * @param urlTemplate template of the URL with place-holders for the parameters * @param params a list of parameters that are slotted into the url template - * @return CertificationTypeListResponse + * @return CertificationTypesResponse * @throws InvalidParameterException one of the parameters is invalid. * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException the repository is not available or not working properly. */ - public CertificationTypeListResponse callCertificationTypeListGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, + public CertificationTypesResponse callCertificationTypeListGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - CertificationTypeListResponse restResult = this.callGetRESTCall(methodName, CertificationTypeListResponse.class, urlTemplate, params); + CertificationTypesResponse restResult = this.callGetRESTCall(methodName, CertificationTypesResponse.class, urlTemplate, params); exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); @@ -144,44 +144,19 @@ public CertificationTypeListResponse callCertificationTypeListGetRESTCall(String * @param urlTemplate template of the URL with place-holders for the parameters * @param requestBody request body for the REST call - contains most of the parameters * @param params a list of parameters that are slotted into the url template - * @return CertificationTypeListResponse + * @return CertificationTypesResponse * @throws InvalidParameterException one of the parameters is invalid. * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException the repository is not available or not working properly. */ - public CertificationTypeListResponse callCertificationTypeListPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, + public CertificationTypesResponse callCertificationTypeListPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - CertificationTypeListResponse restResult = this.callPostRESTCall(methodName, CertificationTypeListResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a ElementStubListResponse object. - * - * @param methodName name of the method being called - * @param urlTemplate template of the URL with place-holders for the parameters - * @param params a list of parameters that are slotted into the url template - * @return ElementStubListResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public ElementStubListResponse callElementStubListGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException - { - ElementStubListResponse restResult = this.callGetRESTCall(methodName, ElementStubListResponse.class, urlTemplate, params); + CertificationTypesResponse restResult = this.callPostRESTCall(methodName, CertificationTypesResponse.class, urlTemplate, requestBody, params); exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); @@ -190,75 +165,25 @@ public ElementStubListResponse callElementStubListGetRESTCall(String methodNa /** - * Issue a GET REST call that returns a ExternalReferenceResponse object. - * - * @param methodName name of the method being called - * @param urlTemplate template of the URL with place-holders for the parameters - * @param params a list of parameters that are slotted into the url template - * @return ExternalReferenceResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public ExternalReferenceResponse callExternalReferenceGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException - { - ExternalReferenceResponse restResult = this.callGetRESTCall(methodName, ExternalReferenceResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a list of ExternalReferenceElement objects. - * - * @param methodName name of the method being called - * @param urlTemplate template of the URL with place-holders for the parameters - * @param params a list of parameters that are slotted into the url template - * @return ExternalReferenceListResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public ExternalReferenceListResponse callExternalReferenceListGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException - { - ExternalReferenceListResponse restResult = this.callGetRESTCall(methodName, ExternalReferenceListResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a POST REST call that returns a list of ExternalReferenceElement objects. + * Issue a POST REST call that returns a list of GovernanceDefinitionsResponse objects. * * @param methodName name of the method being called * @param urlTemplate template of the URL with place-holders for the parameters * @param requestBody request body for the REST call - contains most of the parameters * @param params a list of parameters that are slotted into the url template - * @return ExternalReferenceListResponse + * @return GovernanceDefinitionsResponse * @throws InvalidParameterException one of the parameters is invalid. * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException the repository is not available or not working properly. */ - public ExternalReferenceListResponse callExternalReferenceListPostRESTCall(String methodName, + public GovernanceDefinitionsResponse callGovernanceDefinitionsPostRESTCall(String methodName, String urlTemplate, Object requestBody, Object... params) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - ExternalReferenceListResponse restResult = this.callPostRESTCall(methodName, ExternalReferenceListResponse.class, urlTemplate, requestBody, params); + GovernanceDefinitionsResponse restResult = this.callPostRESTCall(methodName, GovernanceDefinitionsResponse.class, urlTemplate, requestBody, params); exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); @@ -267,50 +192,23 @@ public ExternalReferenceListResponse callExternalReferenceListPostRESTCall(Strin /** - * Issue a POST REST call that returns a list of GovernanceDefinitionListResponse objects. + * Issue a GET REST call that returns a GovernanceDefinitionsResponse object. * * @param methodName name of the method being called * @param urlTemplate template of the URL with place-holders for the parameters - * @param requestBody request body for the REST call - contains most of the parameters * @param params a list of parameters that are slotted into the url template - * @return GovernanceDefinitionListResponse + * @return GovernanceDefinitionsResponse * @throws InvalidParameterException one of the parameters is invalid. * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException the repository is not available or not working properly. */ - public GovernanceDefinitionListResponse callGovernanceDefinitionListPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException - { - GovernanceDefinitionListResponse restResult = this.callPostRESTCall(methodName, GovernanceDefinitionListResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a GovernanceDefinitionListResponse object. - * - * @param methodName name of the method being called - * @param urlTemplate template of the URL with place-holders for the parameters - * @param params a list of parameters that are slotted into the url template - * @return GovernanceDefinitionListResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public GovernanceDefinitionListResponse callGovernanceDefinitionListGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, + public GovernanceDefinitionsResponse callGovernanceDefinitionsGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - GovernanceDefinitionListResponse restResult = this.callGetRESTCall(methodName, GovernanceDefinitionListResponse.class, urlTemplate, params); + GovernanceDefinitionsResponse restResult = this.callGetRESTCall(methodName, GovernanceDefinitionsResponse.class, urlTemplate, params); exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); @@ -369,7 +267,7 @@ public GovernanceDefinitionGraphResponse callGovernanceDefinitionGraphGetRESTCal /** - * Issue a GET REST call that returns a GovernanceMetricImplementationListResponse object. + * Issue a GET REST call that returns a GovernanceMetricImplementationsResponse object. * * @param methodName name of the method being called * @param urlTemplate template of the URL with place-holders for the parameters @@ -379,13 +277,13 @@ public GovernanceDefinitionGraphResponse callGovernanceDefinitionGraphGetRESTCal * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException the repository is not available or not working properly. */ - public GovernanceMetricImplementationListResponse callGovernanceMetricsImplementationListGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, + public GovernanceMetricImplementationsResponse callGovernanceMetricsImplementationListGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - GovernanceMetricImplementationListResponse restResult = this.callGetRESTCall(methodName, GovernanceMetricImplementationListResponse.class, urlTemplate, params); + GovernanceMetricImplementationsResponse restResult = this.callGetRESTCall(methodName, GovernanceMetricImplementationsResponse.class, urlTemplate, params); exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); @@ -394,25 +292,25 @@ public GovernanceMetricImplementationListResponse callGovernanceMetricsImplement /** - * Issue a POST REST call that returns a list of GovernanceDomainSetListResponse objects. + * Issue a POST REST call that returns a list of GovernanceDomainSetsResponse objects. * * @param methodName name of the method being called * @param urlTemplate template of the URL with place-holders for the parameters * @param requestBody request body for the REST call - contains most of the parameters * @param params a list of parameters that are slotted into the url template - * @return GovernanceDomainSetListResponse + * @return GovernanceDomainSetsResponse * @throws InvalidParameterException one of the parameters is invalid. * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException the repository is not available or not working properly. */ - public GovernanceDomainSetListResponse callGovernanceDomainSetListPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, + public GovernanceDomainSetsResponse callGovernanceDomainSetListPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - GovernanceDomainSetListResponse restResult = this.callPostRESTCall(methodName, GovernanceDomainSetListResponse.class, urlTemplate, requestBody, params); + GovernanceDomainSetsResponse restResult = this.callPostRESTCall(methodName, GovernanceDomainSetsResponse.class, urlTemplate, requestBody, params); exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); @@ -421,7 +319,7 @@ public GovernanceDomainSetListResponse callGovernanceDomainSetListPostRESTCall(S /** - * Issue a GET REST call that returns a GovernanceDomainSetListResponse object. + * Issue a GET REST call that returns a GovernanceDomainSetsResponse object. * * @param methodName name of the method being called * @param urlTemplate template of the URL with place-holders for the parameters @@ -431,13 +329,13 @@ public GovernanceDomainSetListResponse callGovernanceDomainSetListPostRESTCall(S * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException the repository is not available or not working properly. */ - public GovernanceDomainSetListResponse callGovernanceDomainSetListGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, + public GovernanceDomainSetsResponse callGovernanceDomainSetListGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - GovernanceDomainSetListResponse restResult = this.callGetRESTCall(methodName, GovernanceDomainSetListResponse.class, urlTemplate, params); + GovernanceDomainSetsResponse restResult = this.callGetRESTCall(methodName, GovernanceDomainSetsResponse.class, urlTemplate, params); exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); @@ -472,25 +370,25 @@ public GovernanceDomainSetResponse callGovernanceDomainSetGetRESTCall(String /** - * Issue a POST REST call that returns a list of GovernanceDomainListResponse objects. + * Issue a POST REST call that returns a list of GovernanceDomainsResponse objects. * * @param methodName name of the method being called * @param urlTemplate template of the URL with place-holders for the parameters * @param requestBody request body for the REST call - contains most of the parameters * @param params a list of parameters that are slotted into the url template - * @return GovernanceDomainListResponse + * @return GovernanceDomainsResponse * @throws InvalidParameterException one of the parameters is invalid. * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException the repository is not available or not working properly. */ - public GovernanceDomainListResponse callGovernanceDomainListPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, + public GovernanceDomainsResponse callGovernanceDomainListPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - GovernanceDomainListResponse restResult = this.callPostRESTCall(methodName, GovernanceDomainListResponse.class, urlTemplate, requestBody, params); + GovernanceDomainsResponse restResult = this.callPostRESTCall(methodName, GovernanceDomainsResponse.class, urlTemplate, requestBody, params); exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); @@ -499,23 +397,23 @@ public GovernanceDomainListResponse callGovernanceDomainListPostRESTCall(String /** - * Issue a GET REST call that returns a list of GovernanceDomainListResponse objects. + * Issue a GET REST call that returns a list of GovernanceDomainsResponse objects. * * @param methodName name of the method being called * @param urlTemplate template of the URL with place-holders for the parameters * @param params a list of parameters that are slotted into the url template - * @return GovernanceDomainListResponse + * @return GovernanceDomainsResponse * @throws InvalidParameterException one of the parameters is invalid. * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException the repository is not available or not working properly. */ - public GovernanceDomainListResponse callGovernanceDomainListGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, + public GovernanceDomainsResponse callGovernanceDomainListGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - GovernanceDomainListResponse restResult = this.callGetRESTCall(methodName, GovernanceDomainListResponse.class, urlTemplate, params); + GovernanceDomainsResponse restResult = this.callGetRESTCall(methodName, GovernanceDomainsResponse.class, urlTemplate, params); exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); @@ -580,19 +478,19 @@ public GovernanceMetricResponse callGovernanceMetricGetRESTCall(String method * @param urlTemplate template of the URL with place-holders for the parameters * @param requestBody request body for the REST call - contains most of the parameters * @param params a list of parameters that are slotted into the url template - * @return GovernanceMetricListResponse + * @return GovernanceMetricsResponse * @throws InvalidParameterException one of the parameters is invalid. * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException the repository is not available or not working properly. */ - public GovernanceMetricListResponse callGovernanceMetricListPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, + public GovernanceMetricsResponse callGovernanceMetricListPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - GovernanceMetricListResponse restResult = this.callPostRESTCall(methodName, GovernanceMetricListResponse.class, urlTemplate, requestBody, params); + GovernanceMetricsResponse restResult = this.callPostRESTCall(methodName, GovernanceMetricsResponse.class, urlTemplate, requestBody, params); exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); @@ -636,66 +534,13 @@ public LicenseTypeResponse callLicenseTypeGetRESTCall(String methodName, * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException the repository is not available or not working properly. */ - public LicenseTypeListResponse callLicenseTypeListGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, + public LicenseTypesResponse callLicenseTypesGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - LicenseTypeListResponse restResult = this.callGetRESTCall(methodName, LicenseTypeListResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - - /** - * Issue a GET REST call that returns a list of LicenseElement objects. - * - * @param methodName name of the method being called - * @param urlTemplate template of the URL with place-holders for the parameters - * @param params a list of parameters that are slotted into the url template - * @return LicenseListResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public LicenseListResponse callLicenseListGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException - { - LicenseListResponse restResult = this.callGetRESTCall(methodName, LicenseListResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a POST REST call that returns a list of LicenseTypeElement objects. - * - * @param methodName name of the method being called - * @param urlTemplate template of the URL with place-holders for the parameters - * @param requestBody request body for the REST call - contains most of the parameters - * @param params a list of parameters that are slotted into the url template - * @return LicenseTypeListResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public LicenseTypeListResponse callLicenseTypeListPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException - { - LicenseTypeListResponse restResult = this.callPostRESTCall(methodName, LicenseTypeListResponse.class, urlTemplate, requestBody, params); + LicenseTypesResponse restResult = this.callGetRESTCall(methodName, LicenseTypesResponse.class, urlTemplate, params); exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); @@ -783,23 +628,23 @@ public GovernanceStatusIdentifierSetResponse callStatusIdentifierSetGetRESTCall( /** - * Issue a GET REST call that returns a GovernanceStatusIdentifierSetListResponse object. + * Issue a GET REST call that returns a GovernanceStatusIdentifierSetsResponse object. * * @param methodName name of the method being called * @param urlTemplate template of the URL with place-holders for the parameters * @param params a list of parameters that are slotted into the url template - * @return GovernanceStatusIdentifierSetListResponse + * @return GovernanceStatusIdentifierSetsResponse * @throws InvalidParameterException one of the parameters is invalid. * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException the repository is not available or not working properly. */ - public GovernanceStatusIdentifierSetListResponse callStatusIdentifierSetListGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, + public GovernanceStatusIdentifierSetsResponse callStatusIdentifierSetListGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - GovernanceStatusIdentifierSetListResponse restResult = this.callGetRESTCall(methodName, GovernanceStatusIdentifierSetListResponse.class, urlTemplate, params); + GovernanceStatusIdentifierSetsResponse restResult = this.callGetRESTCall(methodName, GovernanceStatusIdentifierSetsResponse.class, urlTemplate, params); exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); @@ -833,25 +678,25 @@ public GovernanceLevelIdentifierResponse callLevelIdentifierListGetRESTCall(Stri /** - * Issue a POST REST call that returns a list of GovernanceLevelIdentifierListResponse objects. + * Issue a POST REST call that returns a list of GovernanceLevelIdentifiersResponse objects. * * @param methodName name of the method being called * @param urlTemplate template of the URL with place-holders for the parameters * @param requestBody request body for the REST call - contains most of the parameters * @param params a list of parameters that are slotted into the url template - * @return GovernanceLevelIdentifierListResponse + * @return GovernanceLevelIdentifiersResponse * @throws InvalidParameterException one of the parameters is invalid. * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException the repository is not available or not working properly. */ - public GovernanceLevelIdentifierListResponse callLevelIdentifierListPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, + public GovernanceLevelIdentifiersResponse callLevelIdentifierListPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - GovernanceLevelIdentifierListResponse restResult = this.callPostRESTCall(methodName, GovernanceLevelIdentifierListResponse.class, urlTemplate, requestBody, params); + GovernanceLevelIdentifiersResponse restResult = this.callPostRESTCall(methodName, GovernanceLevelIdentifiersResponse.class, urlTemplate, requestBody, params); exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); @@ -885,23 +730,23 @@ public GovernanceLevelIdentifierSetResponse callLevelIdentifierSetGetRESTCall(St /** - * Issue a GET REST call that returns a list of GovernanceLevelIdentifierSetListResponse objects. + * Issue a GET REST call that returns a list of GovernanceLevelIdentifierSetsResponse objects. * * @param methodName name of the method being called * @param urlTemplate template of the URL with place-holders for the parameters * @param params a list of parameters that are slotted into the url template - * @return GovernanceLevelIdentifierSetListResponse + * @return GovernanceLevelIdentifierSetsResponse * @throws InvalidParameterException one of the parameters is invalid. * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException the repository is not available or not working properly. */ - public GovernanceLevelIdentifierSetListResponse callLevelIdentifierSetListGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, + public GovernanceLevelIdentifierSetsResponse callLevelIdentifierSetListGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - GovernanceLevelIdentifierSetListResponse restResult = this.callGetRESTCall(methodName, GovernanceLevelIdentifierSetListResponse.class, urlTemplate, params); + GovernanceLevelIdentifierSetsResponse restResult = this.callGetRESTCall(methodName, GovernanceLevelIdentifierSetsResponse.class, urlTemplate, params); exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); @@ -992,18 +837,18 @@ public GovernanceRoleHistoryResponse callGovernanceRoleHistoryGetRESTCall(String * @param methodName name of the method being called * @param urlTemplate template of the URL with place-holders for the parameters * @param params a list of parameters that are slotted into the url template - * @return GovernanceRoleListResponse + * @return GovernanceRolesResponse * @throws InvalidParameterException one of the parameters is invalid. * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException the repository is not available or not working properly. */ - public GovernanceRoleListResponse callGovernanceRoleListGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, + public GovernanceRolesResponse callGovernanceRoleListGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - GovernanceRoleListResponse restResult = this.callGetRESTCall(methodName, GovernanceRoleListResponse.class, urlTemplate, params); + GovernanceRolesResponse restResult = this.callGetRESTCall(methodName, GovernanceRolesResponse.class, urlTemplate, params); exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); @@ -1019,19 +864,19 @@ public GovernanceRoleListResponse callGovernanceRoleListGetRESTCall(String me * @param urlTemplate template of the URL with place-holders for the parameters * @param requestBody request body for the REST call - contains most of the parameters * @param params a list of parameters that are slotted into the url template - * @return GovernanceRoleListResponse + * @return GovernanceRolesResponse * @throws InvalidParameterException one of the parameters is invalid. * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException the repository is not available or not working properly. */ - public GovernanceRoleListResponse callGovernanceRoleListPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, + public GovernanceRolesResponse callGovernanceRoleListPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - GovernanceRoleListResponse restResult = this.callPostRESTCall(methodName, GovernanceRoleListResponse.class, urlTemplate, requestBody, params); + GovernanceRolesResponse restResult = this.callPostRESTCall(methodName, GovernanceRolesResponse.class, urlTemplate, requestBody, params); exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); @@ -1045,18 +890,18 @@ public GovernanceRoleListResponse callGovernanceRoleListPostRESTCall(String m * @param methodName name of the method being called * @param urlTemplate template of the URL with place-holders for the parameters * @param params a list of parameters that are slotted into the url template - * @return GovernanceRoleAppointeeListResponse + * @return GovernanceRoleAppointeesResponse * @throws InvalidParameterException one of the parameters is invalid. * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException the repository is not available or not working properly. */ - public GovernanceRoleAppointeeListResponse callGovernanceRoleAppointeeListGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, + public GovernanceRoleAppointeesResponse callGovernanceRoleAppointeeListGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { - GovernanceRoleAppointeeListResponse restResult = this.callGetRESTCall(methodName, GovernanceRoleAppointeeListResponse.class, urlTemplate, params); + GovernanceRoleAppointeesResponse restResult = this.callGetRESTCall(methodName, GovernanceRoleAppointeesResponse.class, urlTemplate, params); exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); @@ -1092,24 +937,24 @@ public GovernanceZoneResponse callGovernanceZoneGetRESTCall(String methodName /** - * Issue a GET REST call that returns a GovernanceZoneListResponse object. + * Issue a GET REST call that returns a GovernanceZonesResponse object. * * @param methodName name of the method being called. * @param urlTemplate template of the URL with place-holders for the parameters. * @param params a list of parameters that are slotted into the url template. * - * @return GovernanceZoneListResponse + * @return GovernanceZonesResponse * @throws InvalidParameterException one of the parameters is invalid. * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException the repository is not available or not working properly. */ - public GovernanceZoneListResponse callGovernanceZoneListGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, + public GovernanceZonesResponse callGovernanceZoneListGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - GovernanceZoneListResponse restResult = this.callGetRESTCall(methodName, GovernanceZoneListResponse.class, urlTemplate, params); + GovernanceZonesResponse restResult = this.callGetRESTCall(methodName, GovernanceZonesResponse.class, urlTemplate, params); exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); @@ -1202,24 +1047,24 @@ public SubjectAreaDefinitionResponse callSubjectAreaDefinitionGetRESTCall(String /** - * Issue a GET REST call that returns a SubjectAreaListResponse object. + * Issue a GET REST call that returns a SubjectAreasResponse object. * * @param methodName name of the method being called. * @param urlTemplate template of the URL with place-holders for the parameters. * @param params a list of parameters that are slotted into the url template. * - * @return SubjectAreaListResponse + * @return SubjectAreasResponse * @throws InvalidParameterException one of the parameters is invalid. * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException the repository is not available or not working properly. */ - public SubjectAreaListResponse callSubjectAreaListGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, + public SubjectAreasResponse callSubjectAreaListGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - SubjectAreaListResponse restResult = this.callGetRESTCall(methodName, SubjectAreaListResponse.class, urlTemplate, params); + SubjectAreasResponse restResult = this.callGetRESTCall(methodName, SubjectAreasResponse.class, urlTemplate, params); exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); @@ -1228,7 +1073,7 @@ public SubjectAreaListResponse callSubjectAreaListGetRESTCall(String methodNa /** - * Issue a GET REST call that returns a RelatedElementListResponse object. + * Issue a GET REST call that returns a RelatedElementsResponse object. * * @param methodName name of the method being called. * @param urlTemplate REST API call URL template with place-holders for the parameters. @@ -1239,13 +1084,13 @@ public SubjectAreaListResponse callSubjectAreaListGetRESTCall(String methodNa * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException the repository is not available or not working properly. */ - public RelatedElementListResponse callRelatedElementListGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, + public RelatedElementsResponse callRelatedElementsGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - RelatedElementListResponse restResult = this.callGetRESTCall(methodName, RelatedElementListResponse.class, urlTemplate, params); + RelatedElementsResponse restResult = this.callGetRESTCall(methodName, RelatedElementsResponse.class, urlTemplate, params); exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/converters/AssetConverter.java b/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/converters/AssetConverter.java deleted file mode 100644 index 93c72627dc1..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/converters/AssetConverter.java +++ /dev/null @@ -1,186 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.converters; - -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.AssetElement; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.AssetProperties; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityProxy; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; -import java.util.List; - - -/** - * AssetConverter provides common methods for transferring relevant properties from an Open Metadata Repository Services (OMRS) - * EntityDetail object into an AssetElement bean. - */ -public class AssetConverter extends GovernanceProgramOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public AssetConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - String methodName) throws PropertyServerException - { - return getNewComplexBean(beanClass, entity,null, null, methodName); - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - Relationship relationship, - String methodName) throws PropertyServerException - { - return getNewComplexBean(beanClass, entity,null, null, methodName); - } - - - /** - * Using the supplied instances, return a new instance of the bean. It is used for beans such as - * a connection bean which made up of 3 entities (Connection, ConnectorType and Endpoint) plus the - * relationships between them. The relationships may be omitted if they do not have any properties. - * - * @param beanClass name of the class to create - * @param primaryEntity entity that is the root of the collection of entities that make up the content of the bean - * @param supplementaryEntities entities connected to the primary entity by the relationships - * @param relationships relationships linking the entities - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewComplexBean(Class beanClass, - EntityDetail primaryEntity, - List supplementaryEntities, - List relationships, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof AssetElement) - { - AssetElement bean = (AssetElement) returnBean; - AssetProperties assetProperties = new AssetProperties(); - - if (primaryEntity != null) - { - bean.setElementHeader(super.getMetadataElementHeader(beanClass, primaryEntity, primaryEntity.getClassifications(), methodName)); - - /* - * The initial set of values come from the entity. - */ - InstanceProperties instanceProperties = new InstanceProperties(primaryEntity.getProperties()); - - assetProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); - assetProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); - assetProperties.setResourceName(this.removeName(instanceProperties)); - assetProperties.setResourceDescription(this.removeDescription(instanceProperties)); - - /* - * Any remaining properties are returned in the extended properties. They are - * assumed to be defined in a subtype. - */ - assetProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); - assetProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - - if ((relationships != null) && (supplementaryEntities != null)) - { - for (Relationship relationship : relationships) - { - if (relationship != null) - { - if (repositoryHelper.isTypeOf(serviceName, - relationship.getType().getTypeDefName(), - OpenMetadataType.SUPPLEMENTARY_PROPERTIES_TYPE_NAME)) - { - EntityProxy termProxy = relationship.getEntityTwoProxy(); - - if (termProxy != null) - { - for (EntityDetail entity : supplementaryEntities) - { - if (entity != null) - { - if (termProxy.getGUID().equals(entity.getGUID())) - { - instanceProperties = entity.getProperties(); - assetProperties.setDisplayName(this.getDisplayName(instanceProperties)); - assetProperties.setSummary(this.getSummary(instanceProperties)); - assetProperties.setDescription(this.getDescription(instanceProperties)); - assetProperties.setAbbreviation(this.getAbbreviation(instanceProperties)); - assetProperties.setUsage(this.getUsage(instanceProperties)); - } - } - } - } - } - } - } - } - - bean.setProperties(assetProperties); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/converters/CertificationTypeConverter.java b/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/converters/CertificationTypeConverter.java deleted file mode 100644 index 36afb7f661c..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/converters/CertificationTypeConverter.java +++ /dev/null @@ -1,141 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.converters; - - -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.CertificationTypeElement; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.CertificationTypeProperties; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; - - -/** - * CertificationTypeConverter provides common methods for transferring relevant properties from an Open Metadata Repository Services (OMRS) - * EntityDetail object into a bean that inherits from CertificationTypeElement. - */ -public class CertificationTypeConverter extends GovernanceProgramOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public CertificationTypeConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - - /** - * Using the supplied entity, return a new instance of the bean. This is used for most beans that have - * a one to one correspondence with the repository instances. - * - * @param beanClass name of the class to create - * @param primaryEntity entity containing the properties - * @param methodName calling method - * @return bean populated with properties from the entity supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - public B getNewBean(Class beanClass, - EntityDetail primaryEntity, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof CertificationTypeElement) - { - CertificationTypeElement bean = (CertificationTypeElement) returnBean; - - if (primaryEntity != null) - { - bean.setElementHeader(this.getMetadataElementHeader(beanClass, primaryEntity, primaryEntity.getClassifications(), methodName)); - - /* - * The initial set of values come from the entity. - */ - InstanceProperties instanceProperties = new InstanceProperties(primaryEntity.getProperties()); - - CertificationTypeProperties governanceDefinitionProperties = new CertificationTypeProperties(); - - governanceDefinitionProperties.setDocumentIdentifier(this.removeQualifiedName(instanceProperties)); - governanceDefinitionProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); - governanceDefinitionProperties.setTitle(this.removeTitle(instanceProperties)); - governanceDefinitionProperties.setScope(this.removeScope(instanceProperties)); - governanceDefinitionProperties.setDomainIdentifier(this.removeDomainIdentifier(instanceProperties)); - governanceDefinitionProperties.setPriority(this.removePriority(instanceProperties)); - governanceDefinitionProperties.setOutcomes(this.removeOutcomes(instanceProperties)); - governanceDefinitionProperties.setResults(this.removeResults(instanceProperties)); - governanceDefinitionProperties.setDetails(this.removeDetails(instanceProperties)); - - /* - * Any remaining properties are returned in the extended properties. They are - * assumed to be defined in a subtype. - */ - governanceDefinitionProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); - governanceDefinitionProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - - bean.setProperties(governanceDefinitionProperties); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @SuppressWarnings(value = "unused") - public B getNewBean(Class beanClass, - EntityDetail entity, - Relationship relationship, - String methodName) throws PropertyServerException - { - final String thisMethodName = "getNewBean(entity, relationship)"; - B returnBean = this.getNewBean(beanClass, entity, methodName); - - if (returnBean instanceof CertificationTypeElement) - { - CertificationTypeElement bean = (CertificationTypeElement) returnBean; - - bean.setRelatedElement(super.getRelatedElement(beanClass, entity, relationship, methodName)); - } - - return returnBean; - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/converters/ElementStubConverter.java b/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/converters/ElementStubConverter.java deleted file mode 100644 index 7248e3f05c1..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/converters/ElementStubConverter.java +++ /dev/null @@ -1,221 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.converters; - - -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityProxy; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; -import java.util.ArrayList; -import java.util.List; - - -/** - * ElementStubConverter provides common methods for transferring relevant properties from an Open Metadata Repository Services (OMRS) - * EntityProxy object into an ElementStub bean. - */ -public class ElementStubConverter extends GovernanceProgramOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public ElementStubConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entityProxy and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entityProxy entityProxy containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @SuppressWarnings(value = "unchecked") - private B getNewBean(Class beanClass, - EntityProxy entityProxy, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof ElementStub) - { - returnBean = (B)super.getElementStub(beanClass, entityProxy, methodName); - - return returnBean; - } - - return null; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an relationship and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param relationship relationship containing the properties - * @param useEnd1 should the proxy come from end 1 - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - public B getNewBean(Class beanClass, - Relationship relationship, - boolean useEnd1, - String methodName) throws PropertyServerException - { - if (relationship != null) - { - if (useEnd1) - { - return getNewBean(beanClass, relationship.getEntityOneProxy(), methodName); - } - else - { - return getNewBean(beanClass, relationship.getEntityTwoProxy(), methodName); - } - } - - return null; - } - - - /** - * Using the supplied instances, return list of new instances of the bean. - * - * @param beanClass name of the class to create - * @param relationships list of relationships containing the properties - * @param useEnd1 should the proxy come from end 1 - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - public List getNewBeans(Class beanClass, - List relationships, - boolean useEnd1, - String methodName) throws PropertyServerException - { - if (relationships != null) - { - List beans = new ArrayList<>(); - - for (Relationship relationship : relationships) - { - if (relationship != null) - { - B bean = getNewBean(beanClass, relationship, useEnd1, methodName); - - if (bean != null) - { - beans.add(bean); - } - } - } - - if (! beans.isEmpty()) - { - return beans; - } - } - - return null; - } - - - - /** - * Using the supplied entity, return a new instance of the bean. This is used for most beans that have - * a one to one correspondence with the repository instances. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param methodName calling method - * @return bean populated with properties from the entity supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @SuppressWarnings(value = "unchecked") - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - EntityProxy entityProxy = repositoryHelper.getNewEntityProxy(serviceName, entity); - - if (returnBean instanceof ElementStub) - { - returnBean = (B)super.getElementStub(beanClass, entityProxy, methodName); - - return returnBean; - } - - return null; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - catch (Exception error) - { - super.handleBadEntity(beanClass.getName(), entity, methodName); - } - - return null; - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @SuppressWarnings(value = "unused") - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - Relationship relationship, - String methodName) throws PropertyServerException - { - return this.getNewBean(beanClass, entity, methodName); - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/converters/ExternalReferenceConverter.java b/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/converters/ExternalReferenceConverter.java deleted file mode 100644 index 962712d6cf4..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/converters/ExternalReferenceConverter.java +++ /dev/null @@ -1,136 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.converters; - - -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.ExternalReferenceElement; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.ExternalReferenceProperties; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; - - -/** - * ExternalReferenceConverter provides common methods for transferring relevant properties from an Open Metadata Repository Services (OMRS) - * EntityDetail object into a bean that inherits from ExternalReferenceElement. - */ -public class ExternalReferenceConverter extends GovernanceProgramOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public ExternalReferenceConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - String methodName) throws PropertyServerException - { - return getNewBean(beanClass, entity, null, methodName); - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - Relationship relationship, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof ExternalReferenceElement) - { - ExternalReferenceElement bean = (ExternalReferenceElement) returnBean; - - if (entity != null) - { - bean.setElementHeader(this.getMetadataElementHeader(beanClass, entity, entity.getClassifications(), methodName)); - ExternalReferenceProperties externalReferenceProperties = new ExternalReferenceProperties(); - - /* - * The initial set of values come from the entity. - */ - InstanceProperties instanceProperties = new InstanceProperties(entity.getProperties()); - - externalReferenceProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); - externalReferenceProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); - externalReferenceProperties.setDisplayName(this.removeDisplayName(instanceProperties)); - externalReferenceProperties.setURI(this.removeURL(instanceProperties)); - externalReferenceProperties.setVersion(this.removeReferenceVersion(instanceProperties)); - externalReferenceProperties.setResourceDescription(this.removeDescription(instanceProperties)); - externalReferenceProperties.setOrganization(this.removeOwningOrganization(instanceProperties)); - - /* - * Any remaining properties are returned in the extended properties. They are - * assumed to be defined in a subtype. - */ - externalReferenceProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); - externalReferenceProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - - if (relationship != null) - { - instanceProperties = relationship.getProperties(); - - externalReferenceProperties.setLinkDescription(this.getDescription(instanceProperties)); - externalReferenceProperties.setLocalReferenceId(this.getReferenceId(instanceProperties)); - } - - bean.setProperties(externalReferenceProperties); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/converters/GovernanceProgramOMASConverter.java b/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/converters/GovernanceProgramOMASConverter.java index ddcaf677613..041ad765b8f 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/converters/GovernanceProgramOMASConverter.java +++ b/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/converters/GovernanceProgramOMASConverter.java @@ -3,16 +3,7 @@ package org.odpi.openmetadata.accessservices.governanceprogram.converters; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.RelatedElement; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.RelationshipProperties; import org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericConverter; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityProxy; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; @@ -37,113 +28,4 @@ public GovernanceProgramOMASConverter(OMRSRepositoryHelper repositoryHelper, { super (repositoryHelper, serviceName, serverName); } - - - /** - * Using the supplied instances, return a new instance of a relatedElement bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - public RelatedElement getRelatedElement(Class beanClass, - EntityDetail entity, - Relationship relationship, - String methodName) throws PropertyServerException - { - RelatedElement relatedElement = new RelatedElement(); - - relatedElement.setRelationshipHeader(this.getMetadataElementHeader(beanClass, relationship, null, methodName)); - - if (relationship != null) - { - InstanceProperties instanceProperties = new InstanceProperties(relationship.getProperties()); - - RelationshipProperties relationshipProperties = new RelationshipProperties(); - - relationshipProperties.setEffectiveFrom(instanceProperties.getEffectiveFromTime()); - relationshipProperties.setEffectiveTo(instanceProperties.getEffectiveToTime()); - relationshipProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - - relatedElement.setRelationshipProperties(relationshipProperties); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.RELATIONSHIP_DEF, methodName); - } - - - if (entity != null) - { - ElementStub elementStub = this.getElementStub(beanClass, entity, methodName); - - relatedElement.setRelatedElement(elementStub); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - - return relatedElement; - } - - - - /** - * Using the supplied instances, return a new instance of a relatedElement bean. This is used for beans that - * contain a combination of the properties from an entityProxy and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entityProxy entityProxy containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - public RelatedElement getRelatedElement(Class beanClass, - Relationship relationship, - EntityProxy entityProxy, - String methodName) throws PropertyServerException - { - RelatedElement relatedElement = new RelatedElement(); - - relatedElement.setRelationshipHeader(this.getMetadataElementHeader(beanClass, relationship, null, methodName)); - - if (relationship != null) - { - InstanceProperties instanceProperties = new InstanceProperties(relationship.getProperties()); - - RelationshipProperties relationshipProperties = new RelationshipProperties(); - - relationshipProperties.setEffectiveFrom(instanceProperties.getEffectiveFromTime()); - relationshipProperties.setEffectiveTo(instanceProperties.getEffectiveToTime()); - relationshipProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - - relatedElement.setRelationshipProperties(relationshipProperties); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.RELATIONSHIP_DEF, methodName); - } - - - if (entityProxy != null) - { - ElementStub elementStub = this.getElementStub(beanClass, entityProxy, methodName); - - relatedElement.setRelatedElement(elementStub); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - - return relatedElement; - } - - } diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/converters/LicenseTypeConverter.java b/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/converters/LicenseTypeConverter.java deleted file mode 100644 index 2d6f51c2029..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/converters/LicenseTypeConverter.java +++ /dev/null @@ -1,141 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.converters; - - -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.LicenseTypeElement; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.LicenseTypeProperties; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; - - -/** - * LicenseTypeConverter provides common methods for transferring relevant properties from an Open Metadata Repository Services (OMRS) - * EntityDetail object into a bean that inherits from LicenseTypeElement. - */ -public class LicenseTypeConverter extends GovernanceProgramOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public LicenseTypeConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - - /** - * Using the supplied entity, return a new instance of the bean. This is used for most beans that have - * a one to one correspondence with the repository instances. - * - * @param beanClass name of the class to create - * @param primaryEntity entity containing the properties - * @param methodName calling method - * @return bean populated with properties from the entity supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - public B getNewBean(Class beanClass, - EntityDetail primaryEntity, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof LicenseTypeElement) - { - LicenseTypeElement bean = (LicenseTypeElement) returnBean; - - if (primaryEntity != null) - { - bean.setElementHeader(this.getMetadataElementHeader(beanClass, primaryEntity, primaryEntity.getClassifications(), methodName)); - - /* - * The initial set of values come from the entity. - */ - InstanceProperties instanceProperties = new InstanceProperties(primaryEntity.getProperties()); - - LicenseTypeProperties licenseTypeProperties = new LicenseTypeProperties(); - - licenseTypeProperties.setDocumentIdentifier(this.removeQualifiedName(instanceProperties)); - licenseTypeProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); - licenseTypeProperties.setTitle(this.removeTitle(instanceProperties)); - licenseTypeProperties.setScope(this.removeScope(instanceProperties)); - licenseTypeProperties.setDomainIdentifier(this.removeDomainIdentifier(instanceProperties)); - licenseTypeProperties.setPriority(this.removePriority(instanceProperties)); - licenseTypeProperties.setOutcomes(this.removeOutcomes(instanceProperties)); - licenseTypeProperties.setResults(this.removeResults(instanceProperties)); - licenseTypeProperties.setDetails(this.removeDetails(instanceProperties)); - - /* - * Any remaining properties are returned in the extended properties. They are - * assumed to be defined in a subtype. - */ - licenseTypeProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); - licenseTypeProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - - bean.setProperties(licenseTypeProperties); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @SuppressWarnings(value = "unused") - public B getNewBean(Class beanClass, - EntityDetail entity, - Relationship relationship, - String methodName) throws PropertyServerException - { - final String thisMethodName = "getNewBean(entity, relationship)"; - B returnBean = this.getNewBean(beanClass, entity, methodName); - - if (returnBean instanceof LicenseTypeElement) - { - LicenseTypeElement bean = (LicenseTypeElement) returnBean; - - bean.setRelatedElement(super.getRelatedElement(beanClass, entity, relationship, methodName)); - } - - return returnBean; - } -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/converters/RelatedElementConverter.java b/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/converters/RelatedElementConverter.java deleted file mode 100644 index 5ab8c7834bf..00000000000 --- a/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/converters/RelatedElementConverter.java +++ /dev/null @@ -1,64 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.converters; - - -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - - -/** - * RelatedElementConverter generates a RelatedElement from a relationship and attached entity - */ -public class RelatedElementConverter extends GovernanceProgramOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public RelatedElementConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - @SuppressWarnings(value = "unchecked") - public B getNewBean(Class beanClass, - EntityDetail entity, - Relationship relationship, - String methodName) throws PropertyServerException - { - try - { - return (B)super.getRelatedElement(beanClass, entity, relationship, methodName); - } - catch (ClassCastException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - -} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/handlers/AppointmentHandler.java b/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/handlers/AppointmentHandler.java index 80abb679af8..cc9d42b25a4 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/handlers/AppointmentHandler.java +++ b/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/handlers/AppointmentHandler.java @@ -3,8 +3,9 @@ package org.odpi.openmetadata.accessservices.governanceprogram.handlers; import org.odpi.openmetadata.accessservices.governanceprogram.converters.GovernanceProgramOMASConverter; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.*; + import org.odpi.openmetadata.commonservices.generichandlers.ActorProfileHandler; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.commonservices.generichandlers.PersonRoleHandler; import org.odpi.openmetadata.commonservices.repositoryhandler.RepositoryErrorHandler; @@ -12,7 +13,6 @@ import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/handlers/GovernanceProgramEnumHandler.java b/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/handlers/GovernanceProgramEnumHandler.java index c1ca907cc8e..7c504779126 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/handlers/GovernanceProgramEnumHandler.java +++ b/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/handlers/GovernanceProgramEnumHandler.java @@ -17,8 +17,8 @@ class GovernanceProgramEnumHandler { private static final Logger log = LoggerFactory.getLogger(GovernanceProgramEnumHandler.class); - private String serviceName; - private OMRSRepositoryHelper repositoryHelper; + private final String serviceName; + private final OMRSRepositoryHelper repositoryHelper; /** * Construct the enum handler handler with a link to the property server's connector and this access service's diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/CertificationRESTServices.java b/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/CertificationRESTServices.java index 1f4cf296277..174c99d4294 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/CertificationRESTServices.java +++ b/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/CertificationRESTServices.java @@ -2,25 +2,16 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.governanceprogram.server; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.CertificationTypeElement; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.RelatedElement; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.CertificationProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.CertificationTypeProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.CertificationTypeListResponse; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.CertificationTypeResponse; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.ExternalSourceRequestBody; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.GovernanceDefinitionRequestBody; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.RelatedElementListResponse; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.RelationshipRequestBody; import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; -import org.odpi.openmetadata.commonservices.generichandlers.CertificationHandler; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.CertificationTypeElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.RelatedElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.CertificationProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.CertificationTypeProperties; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.commonservices.generichandlers.ReferenceableHandler; +import org.odpi.openmetadata.commonservices.generichandlers.*; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.slf4j.LoggerFactory; @@ -78,14 +69,12 @@ public GUIDResponse createCertificationType(String serv { if (requestBody != null) { - if (requestBody.getProperties() instanceof CertificationTypeProperties) + if (requestBody.getProperties() instanceof CertificationTypeProperties properties) { auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); CertificationHandler handler = instanceHandler.getCertificationTypeHandler(userId, serverName, methodName); - CertificationTypeProperties properties = (CertificationTypeProperties) requestBody.getProperties(); - String setGUID = handler.createGovernanceDefinition(userId, properties.getDocumentIdentifier(), properties.getTitle(), @@ -165,14 +154,12 @@ public VoidResponse updateCertificationType(String serv { if (requestBody != null) { - if (requestBody.getProperties() instanceof CertificationTypeProperties) + if (requestBody.getProperties() instanceof CertificationTypeProperties properties) { auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); CertificationHandler handler = instanceHandler.getCertificationTypeHandler(userId, serverName, methodName); - CertificationTypeProperties properties = (CertificationTypeProperties) requestBody.getProperties(); - handler.updateGovernanceDefinition(userId, certificationTypeGUID, guidParameterName, @@ -391,19 +378,19 @@ public CertificationTypeResponse getCertificationTypeByDocId(String serverName, * PropertyServerException problem accessing property server * UserNotAuthorizedException security access problem */ - public CertificationTypeListResponse getCertificationTypesByTitle(String serverName, - String userId, - int startFrom, - int pageSize, - SearchStringRequestBody requestBody) + public CertificationTypesResponse getCertificationTypesByTitle(String serverName, + String userId, + int startFrom, + int pageSize, + SearchStringRequestBody requestBody) { final String methodName = "getCertificationTypesByTitle"; final String titleParameterName = "title"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - CertificationTypeListResponse response = new CertificationTypeListResponse(); - AuditLog auditLog = null; + CertificationTypesResponse response = new CertificationTypesResponse(); + AuditLog auditLog = null; try { @@ -453,18 +440,18 @@ public CertificationTypeListResponse getCertificationTypesByTitle(String * PropertyServerException problem accessing property server * UserNotAuthorizedException security access problem */ - public CertificationTypeListResponse getCertificationTypeByDomainId(String serverName, - String userId, - int domainIdentifier, - int startFrom, - int pageSize) + public CertificationTypesResponse getCertificationTypeByDomainId(String serverName, + String userId, + int domainIdentifier, + int startFrom, + int pageSize) { final String methodName = "getCertificationTypeByDomainId"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - CertificationTypeListResponse response = new CertificationTypeListResponse(); - AuditLog auditLog = null; + CertificationTypesResponse response = new CertificationTypesResponse(); + AuditLog auditLog = null; try { @@ -531,14 +518,12 @@ public GUIDResponse certifyElement(String serverName, { if (requestBody != null) { - if (requestBody.getProperties() instanceof CertificationProperties) + if (requestBody.getProperties() instanceof CertificationProperties properties) { auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); CertificationHandler handler = instanceHandler.getCertificationTypeHandler(userId, serverName, methodName); - CertificationProperties properties = (CertificationProperties) requestBody.getProperties(); - response.setGUID(handler.certifyElement(userId, requestBody.getExternalSourceGUID(), requestBody.getExternalSourceName(), @@ -622,14 +607,12 @@ public VoidResponse updateCertification(String serverName, { if (requestBody != null) { - if (requestBody.getProperties() instanceof CertificationProperties) + if (requestBody.getProperties() instanceof CertificationProperties properties) { auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); CertificationHandler handler = instanceHandler.getCertificationTypeHandler(userId, serverName, methodName); - CertificationProperties properties = (CertificationProperties) requestBody.getProperties(); - handler.updateCertification(userId, requestBody.getExternalSourceGUID(), requestBody.getExternalSourceName(), @@ -759,41 +742,41 @@ public VoidResponse decertifyElement(String serverName, * PropertyServerException problem accessing property server * UserNotAuthorizedException security access problem */ - public RelatedElementListResponse getCertifiedElements(String serverName, - String userId, - String certificationTypeGUID, - int startFrom, - int pageSize) + public RelatedElementsResponse getCertifiedElements(String serverName, + String userId, + String certificationTypeGUID, + int startFrom, + int pageSize) { final String methodName = "getCertifiedElements"; final String guidParameter = "certificationTypeGUID"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - RelatedElementListResponse response = new RelatedElementListResponse(); - AuditLog auditLog = null; + RelatedElementsResponse response = new RelatedElementsResponse(); + AuditLog auditLog = null; try { auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); ReferenceableHandler handler = instanceHandler.getRelatedElementHandler(userId, serverName, methodName); - response.setElementList(handler.getAttachedElements(userId, - certificationTypeGUID, - guidParameter, - OpenMetadataType.CERTIFICATION_TYPE_TYPE_NAME, - OpenMetadataType.CERTIFICATION_OF_REFERENCEABLE_TYPE_GUID, - OpenMetadataType.CERTIFICATION_OF_REFERENCEABLE_TYPE_NAME, - OpenMetadataType.REFERENCEABLE.typeName, - null, - null, - 1, - false, - false, - startFrom, - pageSize, - new Date(), - methodName)); + response.setElements(handler.getAttachedElements(userId, + certificationTypeGUID, + guidParameter, + OpenMetadataType.CERTIFICATION_TYPE_TYPE_NAME, + OpenMetadataType.CERTIFICATION_OF_REFERENCEABLE_TYPE_GUID, + OpenMetadataType.CERTIFICATION_OF_REFERENCEABLE_TYPE_NAME, + OpenMetadataType.REFERENCEABLE.typeName, + null, + null, + 1, + false, + false, + startFrom, + pageSize, + new Date(), + methodName)); } catch (Exception error) { @@ -819,41 +802,41 @@ public RelatedElementListResponse getCertifiedElements(String serverName, * PropertyServerException problem accessing property server * UserNotAuthorizedException security access problem */ - public RelatedElementListResponse getCertifications(String serverName, - String userId, - String elementGUID, - int startFrom, - int pageSize) + public RelatedElementsResponse getCertifications(String serverName, + String userId, + String elementGUID, + int startFrom, + int pageSize) { final String methodName = "getLicences"; final String guidParameterName = "elementGUID"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - RelatedElementListResponse response = new RelatedElementListResponse(); - AuditLog auditLog = null; + RelatedElementsResponse response = new RelatedElementsResponse(); + AuditLog auditLog = null; try { auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); ReferenceableHandler handler = instanceHandler.getRelatedElementHandler(userId, serverName, methodName); - response.setElementList(handler.getAttachedElements(userId, - elementGUID, - guidParameterName, - OpenMetadataType.REFERENCEABLE.typeName, - OpenMetadataType.CERTIFICATION_OF_REFERENCEABLE_TYPE_GUID, - OpenMetadataType.CERTIFICATION_OF_REFERENCEABLE_TYPE_NAME, - OpenMetadataType.CERTIFICATION_TYPE_TYPE_NAME, - null, - null, - 2, - false, - false, - startFrom, - pageSize, - new Date(), - methodName)); + response.setElements(handler.getAttachedElements(userId, + elementGUID, + guidParameterName, + OpenMetadataType.REFERENCEABLE.typeName, + OpenMetadataType.CERTIFICATION_OF_REFERENCEABLE_TYPE_GUID, + OpenMetadataType.CERTIFICATION_OF_REFERENCEABLE_TYPE_NAME, + OpenMetadataType.CERTIFICATION_TYPE_TYPE_NAME, + null, + null, + 2, + false, + false, + startFrom, + pageSize, + new Date(), + methodName)); } catch (Exception error) { diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/ExternalReferenceRESTServices.java b/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/ExternalReferenceRESTServices.java index c3161de6c1e..4c6468bc53f 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/ExternalReferenceRESTServices.java +++ b/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/ExternalReferenceRESTServices.java @@ -2,24 +2,15 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.governanceprogram.server; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.ExternalReferenceElement; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.RelatedElement; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.ExternalReferenceLinkProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.ExternalReferenceProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.ExternalReferenceListResponse; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.ExternalReferenceResponse; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.ExternalSourceRequestBody; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.ReferenceableRequestBody; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.RelatedElementListResponse; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.RelationshipRequestBody; import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.odpi.openmetadata.commonservices.generichandlers.ExternalReferenceHandler; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ExternalReferenceElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.RelatedElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.externalreferences.ExternalReferenceLinkProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.externalreferences.ExternalReferenceProperties; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.commonservices.generichandlers.ReferenceableHandler; @@ -63,9 +54,9 @@ public ExternalReferenceRESTServices() * PropertyServerException problem accessing property server * UserNotAuthorizedException security access problem */ - public GUIDResponse createExternalReference(String serverName, - String userId, - ReferenceableRequestBody requestBody) + public GUIDResponse createExternalReference(String serverName, + String userId, + ReferenceableRequestBody requestBody) { final String methodName = "createExternalReference"; @@ -78,13 +69,11 @@ public GUIDResponse createExternalReference(String serverNa { if (requestBody != null) { - if (requestBody.getProperties() instanceof ExternalReferenceProperties) + if (requestBody.getProperties() instanceof ExternalReferenceProperties properties) { auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); ExternalReferenceHandler handler = instanceHandler.getExternalReferencesHandler(userId, serverName, methodName); - ExternalReferenceProperties properties = (ExternalReferenceProperties) requestBody.getProperties(); - response.setGUID(handler.createExternalReference(userId, requestBody.getExternalSourceGUID(), requestBody.getExternalSourceName(), @@ -155,13 +144,11 @@ public VoidResponse updateExternalReference(String serverNa { if (requestBody != null) { - if (requestBody.getProperties() instanceof ExternalReferenceProperties) + if (requestBody.getProperties() instanceof ExternalReferenceProperties properties) { auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); ExternalReferenceHandler handler = instanceHandler.getExternalReferencesHandler(userId, serverName, methodName); - ExternalReferenceProperties properties = (ExternalReferenceProperties) requestBody.getProperties(); - handler.updateExternalReference(userId, requestBody.getExternalSourceGUID(), requestBody.getExternalSourceName(), @@ -535,19 +522,19 @@ public ExternalReferenceResponse getExternalReferenceByGUID(String serverName, * PropertyServerException problem accessing property server * UserNotAuthorizedException security access problem */ - public ExternalReferenceListResponse findExternalReferencesById(String serverName, - String userId, - int startFrom, - int pageSize, - SearchStringRequestBody requestBody) + public ExternalReferencesResponse findExternalReferencesById(String serverName, + String userId, + int startFrom, + int pageSize, + SearchStringRequestBody requestBody) { final String methodName = "findExternalReferencesById"; final String resourceIdParameterName = "resourceId"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - ExternalReferenceListResponse response = new ExternalReferenceListResponse(); - AuditLog auditLog = null; + ExternalReferencesResponse response = new ExternalReferencesResponse(); + AuditLog auditLog = null; try { @@ -598,19 +585,19 @@ public ExternalReferenceListResponse findExternalReferencesById(String * PropertyServerException problem accessing property server * UserNotAuthorizedException security access problem */ - public ExternalReferenceListResponse getExternalReferencesByURL(String serverName, - String userId, - int startFrom, - int pageSize, - NameRequestBody requestBody) + public ExternalReferencesResponse getExternalReferencesByURL(String serverName, + String userId, + int startFrom, + int pageSize, + NameRequestBody requestBody) { final String methodName = "getExternalReferencesByURL"; final String urlParameterName = "resourceId"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - ExternalReferenceListResponse response = new ExternalReferenceListResponse(); - AuditLog auditLog = null; + ExternalReferencesResponse response = new ExternalReferencesResponse(); + AuditLog auditLog = null; try { @@ -658,19 +645,19 @@ public ExternalReferenceListResponse getExternalReferencesByURL(String * PropertyServerException problem accessing property server * UserNotAuthorizedException security access problem */ - public ExternalReferenceListResponse retrieveAttachedExternalReferences(String serverName, - String userId, - String attachedToGUID, - int startFrom, - int pageSize) + public ExternalReferencesResponse retrieveAttachedExternalReferences(String serverName, + String userId, + String attachedToGUID, + int startFrom, + int pageSize) { final String methodName = "retrieveAttachedExternalReferences"; final String guidParameterName = "attachedToGUID"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - ExternalReferenceListResponse response = new ExternalReferenceListResponse(); - AuditLog auditLog = null; + ExternalReferencesResponse response = new ExternalReferencesResponse(); + AuditLog auditLog = null; try { @@ -718,41 +705,41 @@ public ExternalReferenceListResponse retrieveAttachedExternalReferences(String s * PropertyServerException problem accessing property server * UserNotAuthorizedException security access problem */ - public RelatedElementListResponse getElementsForExternalReference(String serverName, - String userId, - String externalReferenceGUID, - int startFrom, - int pageSize) + public RelatedElementsResponse getElementsForExternalReference(String serverName, + String userId, + String externalReferenceGUID, + int startFrom, + int pageSize) { final String methodName = "getElementsForExternalReference"; final String guidParameter = "externalReferenceGUID"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - RelatedElementListResponse response = new RelatedElementListResponse(); - AuditLog auditLog = null; + RelatedElementsResponse response = new RelatedElementsResponse(); + AuditLog auditLog = null; try { auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); ReferenceableHandler handler = instanceHandler.getRelatedElementHandler(userId, serverName, methodName); - response.setElementList(handler.getAttachedElements(userId, - externalReferenceGUID, - guidParameter, - OpenMetadataType.EXTERNAL_REFERENCE.typeName, - OpenMetadataType.EXTERNAL_REFERENCE_LINK_RELATIONSHIP.typeGUID, - OpenMetadataType.EXTERNAL_REFERENCE_LINK_RELATIONSHIP.typeName, - OpenMetadataType.REFERENCEABLE.typeName, - null, - null, - 1, - false, - false, - startFrom, - pageSize, - new Date(), - methodName)); + response.setElements(handler.getAttachedElements(userId, + externalReferenceGUID, + guidParameter, + OpenMetadataType.EXTERNAL_REFERENCE.typeName, + OpenMetadataType.EXTERNAL_REFERENCE_LINK_RELATIONSHIP.typeGUID, + OpenMetadataType.EXTERNAL_REFERENCE_LINK_RELATIONSHIP.typeName, + OpenMetadataType.REFERENCEABLE.typeName, + null, + null, + 1, + false, + false, + startFrom, + pageSize, + new Date(), + methodName)); } catch (Exception error) { diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/GovernanceDefinitionRESTServices.java b/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/GovernanceDefinitionRESTServices.java index c767603125d..0148a20b4cb 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/GovernanceDefinitionRESTServices.java +++ b/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/GovernanceDefinitionRESTServices.java @@ -2,21 +2,18 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.governanceprogram.server; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceDefinitionElement; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceDefinitionProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceDefinitionStatus; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.PeerDefinitionProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.SupportingDefinitionProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.ExternalSourceRequestBody; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.GovernanceDefinitionRequestBody; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.GovernanceStatusRequestBody; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.RelationshipRequestBody; + +import org.odpi.openmetadata.commonservices.ffdc.rest.*; +import org.odpi.openmetadata.frameworks.openmetadata.enums.GovernanceDefinitionStatus; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.GovernanceDefinitionElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.PeerDefinitionProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.*; import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; -import org.odpi.openmetadata.commonservices.generichandlers.GovernanceDefinitionHandler; +import org.odpi.openmetadata.commonservices.generichandlers.*; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceStatus; @@ -28,11 +25,9 @@ /** * GovernanceDefinitionManager is the java client for managing the definitions for the governance drivers, policies and controls * that define the motivation, goals and implementation approach for the governance program. - * * Governance drivers document of the business strategy and regulations that provide the motivation behind the governance program. They feed * into the governance program's policymaking phase ensuring the governance program is focused on activity that delivers value to the organization. * A governance driver could be a governance strategy statement, a business imperative, a regulation or a regulation's article. - * * Governance policies define the goals and best practices for the governance program. There are three types of governance policies: *
        *
      • @@ -48,7 +43,6 @@ * Within the definition of each governance policy is a description of what the policy is trying to achieve * along with the implications to the organization's operation when they adopt this. * These implications help to estimate the cost of the policy's implementation and the activities that need to happen. - * * The governance definitions that define how the governance program is to be implemented. * There are two types of governance definitions: *
          @@ -343,23 +337,14 @@ private InstanceStatus getInstanceStatus(GovernanceDefinitionStatus governanceDe { if (governanceDefinitionStatus != null) { - switch(governanceDefinitionStatus) + return switch (governanceDefinitionStatus) { - case DRAFT: - return InstanceStatus.DRAFT; - - case ACTIVE: - return InstanceStatus.ACTIVE; - - case PROPOSED: - return InstanceStatus.PROPOSED; - - case DEPRECATED: - return InstanceStatus.DEPRECATED; - - case OTHER: - return InstanceStatus.OTHER; - } + case DRAFT -> InstanceStatus.DRAFT; + case ACTIVE -> InstanceStatus.ACTIVE; + case PROPOSED -> InstanceStatus.PROPOSED; + case DEPRECATED -> InstanceStatus.DEPRECATED; + case OTHER -> InstanceStatus.OTHER; + }; } return null; @@ -459,10 +444,8 @@ public VoidResponse linkPeerDefinitions(String serverName, GovernanceDefinitionHandler handler = instanceHandler.getGovernanceDefinitionHandler(userId, serverName, methodName); - if (requestBody.getProperties() instanceof PeerDefinitionProperties) + if (requestBody.getProperties() instanceof PeerDefinitionProperties properties) { - PeerDefinitionProperties properties = (PeerDefinitionProperties)requestBody.getProperties(); - handler.setupPeerRelationship(userId, definitionOneGUID, definitionOneGUIDParameterName, @@ -627,10 +610,8 @@ public VoidResponse setupSupportingDefinition(String serverName GovernanceDefinitionHandler handler = instanceHandler.getGovernanceDefinitionHandler(userId, serverName, methodName); - if (requestBody.getProperties() instanceof SupportingDefinitionProperties) + if (requestBody.getProperties() instanceof SupportingDefinitionProperties properties) { - SupportingDefinitionProperties properties = (SupportingDefinitionProperties)requestBody.getProperties(); - handler.setupDelegationRelationship(userId, definitionGUID, definitionOneGUIDParameterName, diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/GovernanceDomainRESTServices.java b/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/GovernanceDomainRESTServices.java index b7d12b3c677..5abbd75483c 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/GovernanceDomainRESTServices.java +++ b/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/GovernanceDomainRESTServices.java @@ -3,24 +3,14 @@ package org.odpi.openmetadata.accessservices.governanceprogram.server; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceDomainElement; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceDomainSetElement; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceDomainProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceDomainSetProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.ExternalSourceRequestBody; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.GovernanceDomainListResponse; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.GovernanceDomainResponse; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.GovernanceDomainSetListResponse; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.GovernanceDomainSetResponse; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.ReferenceableRequestBody; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.RelationshipRequestBody; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.GovernanceDomainElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.GovernanceDomainSetElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.GovernanceDomainProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.GovernanceDomainSetProperties; import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; import org.odpi.openmetadata.commonservices.generichandlers.CollectionHandler; import org.odpi.openmetadata.commonservices.generichandlers.GovernanceDomainHandler; @@ -289,19 +279,19 @@ public VoidResponse removeGovernanceDomainSet(String serverNa * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - public GovernanceDomainSetListResponse findGovernanceDomainSets(String serverName, - String userId, - int startFrom, - int pageSize, - SearchStringRequestBody requestBody) + public GovernanceDomainSetsResponse findGovernanceDomainSets(String serverName, + String userId, + int startFrom, + int pageSize, + SearchStringRequestBody requestBody) { final String methodName = "findGovernanceDomainSets"; final String searchStringParameterName = "searchString"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - GovernanceDomainSetListResponse response = new GovernanceDomainSetListResponse(); - AuditLog auditLog = null; + GovernanceDomainSetsResponse response = new GovernanceDomainSetsResponse(); + AuditLog auditLog = null; try { @@ -354,19 +344,19 @@ public GovernanceDomainSetListResponse findGovernanceDomainSets(String * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - public GovernanceDomainSetListResponse getGovernanceDomainSetsByName(String serverName, - String userId, - int startFrom, - int pageSize, - NameRequestBody requestBody) + public GovernanceDomainSetsResponse getGovernanceDomainSetsByName(String serverName, + String userId, + int startFrom, + int pageSize, + NameRequestBody requestBody) { final String methodName = "getGovernanceDomainSetsByName"; final String nameParameterName = "name"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - GovernanceDomainSetListResponse response = new GovernanceDomainSetListResponse(); - AuditLog auditLog = null; + GovernanceDomainSetsResponse response = new GovernanceDomainSetsResponse(); + AuditLog auditLog = null; try { @@ -847,17 +837,17 @@ public VoidResponse removeDomainFromSet(String serverName, * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - public GovernanceDomainListResponse getGovernanceDomains(String serverName, - String userId, - int startFrom, - int pageSize) + public GovernanceDomainsResponse getGovernanceDomains(String serverName, + String userId, + int startFrom, + int pageSize) { final String methodName = "getGovernanceDomains"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - GovernanceDomainListResponse response = new GovernanceDomainListResponse(); - AuditLog auditLog = null; + GovernanceDomainsResponse response = new GovernanceDomainsResponse(); + AuditLog auditLog = null; try { @@ -903,19 +893,19 @@ public GovernanceDomainListResponse getGovernanceDomains(String serverName, * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - public GovernanceDomainListResponse findGovernanceDomains(String serverName, - String userId, - int startFrom, - int pageSize, - SearchStringRequestBody requestBody) + public GovernanceDomainsResponse findGovernanceDomains(String serverName, + String userId, + int startFrom, + int pageSize, + SearchStringRequestBody requestBody) { final String methodName = "findGovernanceDomains"; final String searchStringParameterName = "searchString"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - GovernanceDomainListResponse response = new GovernanceDomainListResponse(); - AuditLog auditLog = null; + GovernanceDomainsResponse response = new GovernanceDomainsResponse(); + AuditLog auditLog = null; try { @@ -962,19 +952,19 @@ public GovernanceDomainListResponse findGovernanceDomains(String * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - public GovernanceDomainSetListResponse getSetsForGovernanceDomain(String serverName, - String userId, - String governanceDomainGUID, - int startFrom, - int pageSize) + public GovernanceDomainSetsResponse getSetsForGovernanceDomain(String serverName, + String userId, + String governanceDomainGUID, + int startFrom, + int pageSize) { final String methodName = "getSetsForGovernanceDomain"; final String guidParameterName = "governanceDomainGUID"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - GovernanceDomainSetListResponse response = new GovernanceDomainSetListResponse(); - AuditLog auditLog = null; + GovernanceDomainSetsResponse response = new GovernanceDomainSetsResponse(); + AuditLog auditLog = null; try { @@ -1091,19 +1081,19 @@ private void addDomainsToSet(String us * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - public GovernanceDomainListResponse getGovernanceDomainsByName(String serverName, - String userId, - int startFrom, - int pageSize, - NameRequestBody requestBody) + public GovernanceDomainsResponse getGovernanceDomainsByName(String serverName, + String userId, + int startFrom, + int pageSize, + NameRequestBody requestBody) { final String methodName = "getGovernanceDomainsByName"; final String nameParameterName = "name"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - GovernanceDomainListResponse response = new GovernanceDomainListResponse(); - AuditLog auditLog = null; + GovernanceDomainsResponse response = new GovernanceDomainsResponse(); + AuditLog auditLog = null; try { diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/GovernanceMetricsRESTServices.java b/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/GovernanceMetricsRESTServices.java index a46537c87c9..35ca1ab3231 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/GovernanceMetricsRESTServices.java +++ b/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/GovernanceMetricsRESTServices.java @@ -2,20 +2,16 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.governanceprogram.server; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceMetricElement; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.RelatedElement; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceDefinitionMetricProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceExpectationsProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceMeasurementsDataSetProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceMeasurementsProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceMetricProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceResultsProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.ClassificationRequestBody; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.ExternalSourceRequestBody; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.GovernanceMetricListResponse; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.GovernanceMetricResponse; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.ReferenceableRequestBody; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.RelationshipRequestBody; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.GovernanceMetricElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.RelatedElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.GovernanceDefinitionMetricProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.GovernanceExpectationsProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.GovernanceMeasurementsDataSetProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.GovernanceMeasurementsProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.GovernanceMetricProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.GovernanceResultsProperties; + import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; @@ -79,14 +75,12 @@ public GUIDResponse createGovernanceMetric(String serverName, { if (requestBody != null) { - if (requestBody.getProperties() instanceof GovernanceMetricProperties) + if (requestBody.getProperties() instanceof GovernanceMetricProperties properties) { auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); GovernanceMetricHandler handler = instanceHandler.getGovernanceMetricHandler(userId, serverName, methodName); - GovernanceMetricProperties properties = (GovernanceMetricProperties) requestBody.getProperties(); - String setGUID = handler.createGovernanceMetric(userId, requestBody.getExternalSourceGUID(), requestBody.getExternalSourceName(), @@ -158,14 +152,12 @@ public VoidResponse updateGovernanceMetric(String serverName, { if (requestBody != null) { - if (requestBody.getProperties() instanceof GovernanceMetricProperties) + if (requestBody.getProperties() instanceof GovernanceMetricProperties properties) { auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); GovernanceMetricHandler handler = instanceHandler.getGovernanceMetricHandler(userId, serverName, methodName); - GovernanceMetricProperties properties = (GovernanceMetricProperties) requestBody.getProperties(); - handler.updateGovernanceMetric(userId, requestBody.getExternalSourceGUID(), requestBody.getExternalSourceName(), @@ -297,10 +289,8 @@ public VoidResponse setupGovernanceDefinitionMetric(String serv if (requestBody != null) { - if (requestBody.getProperties() instanceof GovernanceDefinitionMetricProperties) + if (requestBody.getProperties() instanceof GovernanceDefinitionMetricProperties properties) { - GovernanceDefinitionMetricProperties properties = (GovernanceDefinitionMetricProperties)requestBody.getProperties(); - handler.addGovernanceDefinitionMetric(userId, requestBody.getExternalSourceGUID(), requestBody.getExternalSourceName(), @@ -475,10 +465,8 @@ public VoidResponse setupGovernanceResults(String serverName, if (requestBody != null) { - if (requestBody.getProperties() instanceof GovernanceResultsProperties) + if (requestBody.getProperties() instanceof GovernanceResultsProperties properties) { - GovernanceResultsProperties properties = (GovernanceResultsProperties)requestBody.getProperties(); - handler.addGovernanceResults(userId, requestBody.getExternalSourceGUID(), requestBody.getExternalSourceName(), @@ -651,10 +639,8 @@ public VoidResponse setGovernanceMeasurementsDataSet(String s if (requestBody != null) { - if (requestBody.getProperties() instanceof GovernanceMeasurementsDataSetProperties) + if (requestBody.getProperties() instanceof GovernanceMeasurementsDataSetProperties properties) { - GovernanceMeasurementsDataSetProperties properties = (GovernanceMeasurementsDataSetProperties)requestBody.getProperties(); - handler.addGovernanceMeasurementsDataSetClassification(userId, requestBody.getExternalSourceGUID(), requestBody.getExternalSourceName(), @@ -790,10 +776,8 @@ public VoidResponse setGovernanceExpectations(String serverNa if (requestBody != null) { - if (requestBody.getProperties() instanceof GovernanceExpectationsProperties) + if (requestBody.getProperties() instanceof GovernanceExpectationsProperties properties) { - GovernanceExpectationsProperties properties = (GovernanceExpectationsProperties)requestBody.getProperties(); - handler.addGovernanceExpectationsClassification(userId, requestBody.getExternalSourceGUID(), requestBody.getExternalSourceName(), @@ -931,10 +915,8 @@ public VoidResponse setGovernanceMeasurements(String serverNa if (requestBody != null) { - if (requestBody.getProperties() instanceof GovernanceMeasurementsProperties) + if (requestBody.getProperties() instanceof GovernanceMeasurementsProperties properties) { - GovernanceMeasurementsProperties properties = (GovernanceMeasurementsProperties)requestBody.getProperties(); - handler.addGovernanceMeasurementsClassification(userId, requestBody.getExternalSourceGUID(), requestBody.getExternalSourceName(), @@ -1100,19 +1082,19 @@ public GovernanceMetricResponse getGovernanceMetricByGUID(String serverName, * PropertyServerException problem accessing property server * UserNotAuthorizedException security access problem */ - public GovernanceMetricListResponse findGovernanceMetrics(String serverName, - String userId, - int startFrom, - int pageSize, - SearchStringRequestBody requestBody) + public GovernanceMetricsResponse findGovernanceMetrics(String serverName, + String userId, + int startFrom, + int pageSize, + SearchStringRequestBody requestBody) { final String methodName = "findGovernanceMetrics"; final String searchStringParameterName = "searchString"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - GovernanceMetricListResponse response = new GovernanceMetricListResponse(); - AuditLog auditLog = null; + GovernanceMetricsResponse response = new GovernanceMetricsResponse(); + AuditLog auditLog = null; try { diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/GovernanceProgramInstanceHandler.java b/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/GovernanceProgramInstanceHandler.java index f658887af7c..f4e59b7a7d4 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/GovernanceProgramInstanceHandler.java +++ b/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/GovernanceProgramInstanceHandler.java @@ -3,16 +3,15 @@ package org.odpi.openmetadata.accessservices.governanceprogram.server; -import org.odpi.openmetadata.accessservices.governanceprogram.converters.ElementStubConverter; import org.odpi.openmetadata.accessservices.governanceprogram.handlers.AppointmentHandler; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.*; + import org.odpi.openmetadata.adminservices.configuration.registration.AccessServiceDescription; import org.odpi.openmetadata.commonservices.generichandlers.*; import org.odpi.openmetadata.commonservices.multitenant.OMASServiceInstanceHandler; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; /** * GovernanceProgramInstanceHandler retrieves information from the instance map for the diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/GovernanceProgramServicesInstance.java b/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/GovernanceProgramServicesInstance.java index 69bd8ed11c4..430eabec78b 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/GovernanceProgramServicesInstance.java +++ b/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/GovernanceProgramServicesInstance.java @@ -3,16 +3,18 @@ package org.odpi.openmetadata.accessservices.governanceprogram.server; -import org.odpi.openmetadata.accessservices.governanceprogram.converters.*; import org.odpi.openmetadata.accessservices.governanceprogram.ffdc.GovernanceProgramErrorCode; import org.odpi.openmetadata.accessservices.governanceprogram.handlers.AppointmentHandler; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.*; import org.odpi.openmetadata.adminservices.configuration.registration.AccessServiceDescription; import org.odpi.openmetadata.commonservices.generichandlers.*; +import org.odpi.openmetadata.commonservices.generichandlers.CertificationTypeConverter; +import org.odpi.openmetadata.commonservices.generichandlers.ExternalReferenceConverter; +import org.odpi.openmetadata.commonservices.generichandlers.LicenseTypeConverter; +import org.odpi.openmetadata.commonservices.generichandlers.RelatedElementConverter; import org.odpi.openmetadata.commonservices.multitenant.OMASServiceInstance; import org.odpi.openmetadata.commonservices.multitenant.ffdc.exceptions.NewInstanceException; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryConnector; import java.util.List; @@ -110,7 +112,7 @@ public GovernanceProgramServicesInstance(OMRSRepositoryConnector repositoryConne publishZones, auditLog); - this.relatedAssetHandler = new AssetHandler<>(new RelatedElementConverter<>(repositoryHelper, serviceName,serverName), + this.relatedAssetHandler = new AssetHandler<>(new RelatedElementConverter<>(repositoryHelper, serviceName, serverName), RelatedElement.class, serviceName, serverName, diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/GovernanceReviewRESTServices.java b/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/GovernanceReviewRESTServices.java index 3a93c1672b5..4232a07dd5d 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/GovernanceReviewRESTServices.java +++ b/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/GovernanceReviewRESTServices.java @@ -2,23 +2,18 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.governanceprogram.server; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceDefinitionElement; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceDefinitionGraph; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceMetricImplementation; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.ElementStubListResponse; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.GovernanceDefinitionGraphResponse; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.GovernanceDefinitionListResponse; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.GovernanceDefinitionResponse; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.GovernanceMetricImplementationListResponse; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.GovernanceDefinitionElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.GovernanceDefinitionGraph; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.GovernanceMetricImplementation; import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.odpi.openmetadata.commonservices.generichandlers.AssetHandler; import org.odpi.openmetadata.commonservices.generichandlers.GovernanceDefinitionHandler; import org.odpi.openmetadata.commonservices.generichandlers.GovernanceMetricHandler; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementStub; import org.slf4j.LoggerFactory; import java.util.Date; @@ -108,19 +103,19 @@ public GovernanceDefinitionResponse getGovernanceDefinitionByGUID(String serverN * UserNotAuthorizedException the caller is not authorized to issue the request * PropertyServerException the metadata service has problems */ - public GovernanceDefinitionListResponse getGovernanceDefinitionsForDomain(String serverName, - String userId, - String typeName, - int domainIdentifier, - int startFrom, - int pageSize) + public GovernanceDefinitionsResponse getGovernanceDefinitionsForDomain(String serverName, + String userId, + String typeName, + int domainIdentifier, + int startFrom, + int pageSize) { final String methodName = "getGovernanceDefinitionsForDomain"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - GovernanceDefinitionListResponse response = new GovernanceDefinitionListResponse(); - AuditLog auditLog = null; + GovernanceDefinitionsResponse response = new GovernanceDefinitionsResponse(); + AuditLog auditLog = null; try { @@ -164,20 +159,20 @@ public GovernanceDefinitionListResponse getGovernanceDefinitionsForDomain(String * UserNotAuthorizedException the caller is not authorized to issue the request * PropertyServerException the metadata service has problems */ - public GovernanceDefinitionListResponse getGovernanceDefinitionsForDocId(String serverName, - String userId, - String typeName, - String docId, - int startFrom, - int pageSize) + public GovernanceDefinitionsResponse getGovernanceDefinitionsForDocId(String serverName, + String userId, + String typeName, + String docId, + int startFrom, + int pageSize) { final String methodName = "getGovernanceDefinitionsForDocId"; final String docIdParameterName = "docId"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - GovernanceDefinitionListResponse response = new GovernanceDefinitionListResponse(); - AuditLog auditLog = null; + GovernanceDefinitionsResponse response = new GovernanceDefinitionsResponse(); + AuditLog auditLog = null; try { @@ -270,20 +265,20 @@ public GovernanceDefinitionGraphResponse getGovernanceDefinitionInContext(String * UserNotAuthorizedException the caller is not authorized to issue the request * PropertyServerException the metadata service has problems */ - public GovernanceDefinitionListResponse findGovernanceDefinitions(String serverName, - String userId, - String typeName, - int startFrom, - int pageSize, - SearchStringRequestBody requestBody) + public GovernanceDefinitionsResponse findGovernanceDefinitions(String serverName, + String userId, + String typeName, + int startFrom, + int pageSize, + SearchStringRequestBody requestBody) { final String methodName = "findGovernanceDefinitions"; final String searchStringParameterName = "searchString"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - GovernanceDefinitionListResponse response = new GovernanceDefinitionListResponse(); - AuditLog auditLog = null; + GovernanceDefinitionsResponse response = new GovernanceDefinitionsResponse(); + AuditLog auditLog = null; try { @@ -334,19 +329,19 @@ public GovernanceDefinitionListResponse findGovernanceDefinitions(String * UserNotAuthorizedException the caller is not authorized to issue the request * PropertyServerException the metadata service has problems */ - public GovernanceMetricImplementationListResponse getGovernanceDefinitionMetrics(String serverName, - String userId, - String governanceDefinitionGUID, - int startFrom, - int pageSize) + public GovernanceMetricImplementationsResponse getGovernanceDefinitionMetrics(String serverName, + String userId, + String governanceDefinitionGUID, + int startFrom, + int pageSize) { final String methodName = "getGovernanceDefinitionMetrics"; final String guidParameterName = "governanceDefinitionGUID"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - GovernanceMetricImplementationListResponse response = new GovernanceMetricImplementationListResponse(); - AuditLog auditLog = null; + GovernanceMetricImplementationsResponse response = new GovernanceMetricImplementationsResponse(); + AuditLog auditLog = null; try { @@ -391,19 +386,19 @@ public GovernanceMetricImplementationListResponse getGovernanceDefinitionMetrics * UserNotAuthorizedException the caller is not authorized to issue the request * PropertyServerException the metadata service has problems */ - public ElementStubListResponse getGovernanceZoneMembers(String serverName, - String userId, - String zoneName, - String subTypeName, - int startFrom, - int pageSize) + public ElementStubsResponse getGovernanceZoneMembers(String serverName, + String userId, + String zoneName, + String subTypeName, + int startFrom, + int pageSize) { final String methodName = "getGovernanceZoneMembers"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - ElementStubListResponse response = new ElementStubListResponse(); - AuditLog auditLog = null; + ElementStubsResponse response = new ElementStubsResponse(); + AuditLog auditLog = null; try { diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/GovernanceRolesRESTServices.java b/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/GovernanceRolesRESTServices.java index 83057c94c90..c97828cd0f3 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/GovernanceRolesRESTServices.java +++ b/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/GovernanceRolesRESTServices.java @@ -3,14 +3,12 @@ package org.odpi.openmetadata.accessservices.governanceprogram.server; import org.odpi.openmetadata.accessservices.governanceprogram.handlers.AppointmentHandler; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceRoleElement; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceRoleProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.*; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.GovernanceRoleElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.GovernanceRoleProperties; import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.commonservices.generichandlers.PersonRoleHandler; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; @@ -741,17 +739,17 @@ public GovernanceRoleHistoryResponse getGovernanceRoleHistoryByGUID(String s * PropertyServerException the server is not available or * UserNotAuthorizedException the calling user is not authorized to issue the call. */ - public GovernanceRoleListResponse getGovernanceRoleByRoleId(String serverName, - String userId, - String roleId) + public GovernanceRolesResponse getGovernanceRoleByRoleId(String serverName, + String userId, + String roleId) { final String methodName = "getGovernanceRoleByRoleId"; final String governanceRoleGUIDParameterName = "governanceRoleGUID"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - GovernanceRoleListResponse response = new GovernanceRoleListResponse(); - AuditLog auditLog = null; + GovernanceRolesResponse response = new GovernanceRolesResponse(); + AuditLog auditLog = null; try { @@ -790,18 +788,18 @@ public GovernanceRoleListResponse getGovernanceRoleByRoleId(String serverNam * PropertyServerException the server is not available or * UserNotAuthorizedException the calling user is not authorized to issue the call. */ - public GovernanceRoleListResponse getGovernanceRolesByDomainId(String serverName, - String userId, - int domainIdentifier, - int startFrom, - int pageSize) + public GovernanceRolesResponse getGovernanceRolesByDomainId(String serverName, + String userId, + int domainIdentifier, + int startFrom, + int pageSize) { final String methodName = "getGovernanceRolesByDomainId"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - GovernanceRoleListResponse response = new GovernanceRoleListResponse(); - AuditLog auditLog = null; + GovernanceRolesResponse response = new GovernanceRolesResponse(); + AuditLog auditLog = null; try { @@ -841,19 +839,19 @@ public GovernanceRoleListResponse getGovernanceRolesByDomainId(String serverName * PropertyServerException the server is not available or * UserNotAuthorizedException the calling user is not authorized to issue the call. */ - public GovernanceRoleListResponse getGovernanceRolesByTitle(String serverName, - String userId, - String title, - int startFrom, - int pageSize) + public GovernanceRolesResponse getGovernanceRolesByTitle(String serverName, + String userId, + String title, + int startFrom, + int pageSize) { final String methodName = "getGovernanceRolesByTitle"; final String titleParameterName = "title"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - GovernanceRoleListResponse response = new GovernanceRoleListResponse(); - AuditLog auditLog = null; + GovernanceRolesResponse response = new GovernanceRolesResponse(); + AuditLog auditLog = null; try { @@ -893,18 +891,18 @@ public GovernanceRoleListResponse getGovernanceRolesByTitle(String serverName, * PropertyServerException the server is not available or * UserNotAuthorizedException the calling user is not authorized to issue the call. */ - public GovernanceRoleAppointeeListResponse getCurrentGovernanceRoleAppointments(String serverName, - String userId, - int domainIdentifier, - int startFrom, - int pageSize) + public GovernanceRoleAppointeesResponse getCurrentGovernanceRoleAppointments(String serverName, + String userId, + int domainIdentifier, + int startFrom, + int pageSize) { final String methodName = "getActiveGovernanceRoles"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - GovernanceRoleAppointeeListResponse response = new GovernanceRoleAppointeeListResponse(); - AuditLog auditLog = null; + GovernanceRoleAppointeesResponse response = new GovernanceRoleAppointeesResponse(); + AuditLog auditLog = null; try { @@ -934,6 +932,7 @@ public GovernanceRoleAppointeeListResponse getCurrentGovernanceRoleAppointments( * @param serverName name of server instance to call * @param userId the name of the calling user. * @param governanceRoleGUID unique identifier (guid) of the governance role. + * @param profileGUID unique identifier of the actor profile * @param requestBody unique identifier for the profile * @return unique identifier (guid) of the appointment relationship or * UnrecognizedGUIDException the unique identifier of the governance role or profile is either null or invalid or @@ -943,6 +942,7 @@ public GovernanceRoleAppointeeListResponse getCurrentGovernanceRoleAppointments( public GUIDResponse appointGovernanceRole(String serverName, String userId, String governanceRoleGUID, + String profileGUID, AppointmentRequestBody requestBody) { final String methodName = "appointGovernanceRole"; @@ -965,12 +965,12 @@ public GUIDResponse appointGovernanceRole(String serverName, String appointmentGUID = handler.appointPersonToRole(userId, null, null, - requestBody.getProfileGUID(), + profileGUID, profileGUIDParameterName, governanceRoleGUID, governanceRoleGUIDParameterName, true, - requestBody.getEffectiveDate(), + requestBody.getEffectiveTime(), null, false, false, @@ -1000,6 +1000,7 @@ public GUIDResponse appointGovernanceRole(String serverName, * @param serverName name of server instance to call * @param userId the name of the calling user. * @param governanceRoleGUID unique identifier (guid) of the governance role. + * @param profileGUID unique identifier of the actor profile * @param requestBody unique identifier for the profile. * @param appointmentGUID unique identifier (guid) of the appointment relationship * @return void response or @@ -1012,6 +1013,7 @@ public VoidResponse relieveGovernanceRole(String serverName, String userId, String governanceRoleGUID, String appointmentGUID, + String profileGUID, AppointmentRequestBody requestBody) { final String methodName = "relieveGovernanceRole"; @@ -1034,13 +1036,13 @@ public VoidResponse relieveGovernanceRole(String serverName, handler.relievePersonFromRole(userId, null, null, - requestBody.getProfileGUID(), + profileGUID, profileGUIDParameterName, governanceRoleGUID, governanceRoleGUIDParameterName, appointmentGUID, appointmentGUIDParameterName, - requestBody.getEffectiveDate(), + requestBody.getEffectiveTime(), null, methodName); } diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/GovernanceZoneRESTServices.java b/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/GovernanceZoneRESTServices.java index 788836a4eed..11c460b6a99 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/GovernanceZoneRESTServices.java +++ b/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/GovernanceZoneRESTServices.java @@ -3,27 +3,18 @@ package org.odpi.openmetadata.accessservices.governanceprogram.server; -import org.odpi.openmetadata.accessservices.governanceprogram.converters.ElementStubConverter; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceDefinitionElement; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceZoneDefinition; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceZoneElement; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceZoneProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.ExternalSourceRequestBody; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.GovernanceZoneDefinitionResponse; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.GovernanceZoneListResponse; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.GovernanceZoneResponse; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.ReferenceableRequestBody; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.RelationshipRequestBody; +import org.odpi.openmetadata.commonservices.generichandlers.ElementStubConverter; +import org.odpi.openmetadata.commonservices.generichandlers.GovernanceDefinitionHandler; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.*; import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; -import org.odpi.openmetadata.commonservices.generichandlers.GovernanceDefinitionHandler; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.odpi.openmetadata.commonservices.generichandlers.GovernanceZoneHandler; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementStub; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; import org.slf4j.LoggerFactory; @@ -83,13 +74,11 @@ public GUIDResponse createGovernanceZone(String serverName, { if (requestBody != null) { - if (requestBody.getProperties() instanceof GovernanceZoneProperties) + if (requestBody.getProperties() instanceof GovernanceZoneProperties properties) { auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); GovernanceZoneHandler handler = instanceHandler.getGovernanceZoneHandler(userId, serverName, methodName); - GovernanceZoneProperties properties = (GovernanceZoneProperties) requestBody.getProperties(); - String zoneGUID = handler.createGovernanceZone(userId, requestBody.getExternalSourceGUID(), requestBody.getExternalSourceName(), @@ -758,18 +747,18 @@ public GovernanceZoneResponse getGovernanceZoneByName(String serverName, * PropertyServerException problem accessing property server * UserNotAuthorizedException security access problem */ - public GovernanceZoneListResponse getGovernanceZonesForDomain(String serverName, - String userId, - int domainIdentifier, - int startFrom, - int pageSize) + public GovernanceZonesResponse getGovernanceZonesForDomain(String serverName, + String userId, + int domainIdentifier, + int startFrom, + int pageSize) { final String methodName = "getGovernanceZonesForDomain"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - GovernanceZoneListResponse response = new GovernanceZoneListResponse(); - AuditLog auditLog = null; + GovernanceZonesResponse response = new GovernanceZonesResponse(); + AuditLog auditLog = null; try { diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/LicenseRESTServices.java b/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/LicenseRESTServices.java index 1170cacaf4c..c4872bb9b66 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/LicenseRESTServices.java +++ b/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/LicenseRESTServices.java @@ -2,23 +2,15 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.governanceprogram.server; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.LicenseTypeElement; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.RelatedElement; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.LicenseProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.LicenseTypeProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.LicenseTypeListResponse; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.LicenseTypeResponse; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.ExternalSourceRequestBody; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.GovernanceDefinitionRequestBody; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.RelatedElementListResponse; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.RelationshipRequestBody; import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.odpi.openmetadata.commonservices.generichandlers.LicenseHandler; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.LicenseTypeElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.RelatedElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.LicenseProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.LicenseTypeProperties; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.commonservices.generichandlers.ReferenceableHandler; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; @@ -64,8 +56,8 @@ public LicenseRESTServices() * UserNotAuthorizedException security access problem */ public GUIDResponse createLicenseType(String serverName, - String userId, - GovernanceDefinitionRequestBody requestBody) + String userId, + GovernanceDefinitionRequestBody requestBody) { final String methodName = "createLicenseType"; @@ -78,14 +70,12 @@ public GUIDResponse createLicenseType(String serverName { if (requestBody != null) { - if (requestBody.getProperties() instanceof LicenseTypeProperties) + if (requestBody.getProperties() instanceof LicenseTypeProperties properties) { auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); LicenseHandler handler = instanceHandler.getLicenseTypeHandler(userId, serverName, methodName); - LicenseTypeProperties properties = (LicenseTypeProperties) requestBody.getProperties(); - String setGUID = handler.createGovernanceDefinition(userId, properties.getDocumentIdentifier(), properties.getTitle(), @@ -165,14 +155,12 @@ public VoidResponse updateLicenseType(String serverName { if (requestBody != null) { - if (requestBody.getProperties() instanceof LicenseTypeProperties) + if (requestBody.getProperties() instanceof LicenseTypeProperties properties) { auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); LicenseHandler handler = instanceHandler.getLicenseTypeHandler(userId, serverName, methodName); - LicenseTypeProperties properties = (LicenseTypeProperties) requestBody.getProperties(); - handler.updateGovernanceDefinition(userId, licenseTypeGUID, guidParameterName, @@ -391,19 +379,19 @@ public LicenseTypeResponse getLicenseTypeByDocId(String serverName, * PropertyServerException problem accessing property server * UserNotAuthorizedException security access problem */ - public LicenseTypeListResponse getLicenseTypesByTitle(String serverName, - String userId, - int startFrom, - int pageSize, - SearchStringRequestBody requestBody) + public LicenseTypesResponse getLicenseTypesByTitle(String serverName, + String userId, + int startFrom, + int pageSize, + SearchStringRequestBody requestBody) { final String methodName = "getLicenseTypesByTitle"; final String titleParameterName = "title"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - LicenseTypeListResponse response = new LicenseTypeListResponse(); - AuditLog auditLog = null; + LicenseTypesResponse response = new LicenseTypesResponse(); + AuditLog auditLog = null; try { @@ -453,18 +441,18 @@ public LicenseTypeListResponse getLicenseTypesByTitle(String se * PropertyServerException problem accessing property server * UserNotAuthorizedException security access problem */ - public LicenseTypeListResponse getLicenseTypeByDomainId(String serverName, - String userId, - int domainIdentifier, - int startFrom, - int pageSize) + public LicenseTypesResponse getLicenseTypeByDomainId(String serverName, + String userId, + int domainIdentifier, + int startFrom, + int pageSize) { final String methodName = "getLicenseTypeByDomainId"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - LicenseTypeListResponse response = new LicenseTypeListResponse(); - AuditLog auditLog = null; + LicenseTypesResponse response = new LicenseTypesResponse(); + AuditLog auditLog = null; try { @@ -531,14 +519,12 @@ public GUIDResponse licenseElement(String serverName, { if (requestBody != null) { - if (requestBody.getProperties() instanceof LicenseProperties) + if (requestBody.getProperties() instanceof LicenseProperties properties) { auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); LicenseHandler handler = instanceHandler.getLicenseTypeHandler(userId, serverName, methodName); - LicenseProperties properties = (LicenseProperties) requestBody.getProperties(); - response.setGUID(handler.licenseElement(userId, requestBody.getExternalSourceGUID(), requestBody.getExternalSourceName(), @@ -605,10 +591,10 @@ public GUIDResponse licenseElement(String serverName, * UserNotAuthorizedException security access problem */ public VoidResponse updateLicense(String serverName, - String userId, - String licenseGUID, - boolean isMergeUpdate, - RelationshipRequestBody requestBody) + String userId, + String licenseGUID, + boolean isMergeUpdate, + RelationshipRequestBody requestBody) { final String methodName = "updateLicense"; final String licenseGUIDParameterName = "licenseGUID"; @@ -622,14 +608,12 @@ public VoidResponse updateLicense(String serverName, { if (requestBody != null) { - if (requestBody.getProperties() instanceof LicenseProperties) + if (requestBody.getProperties() instanceof LicenseProperties properties) { auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); LicenseHandler handler = instanceHandler.getLicenseTypeHandler(userId, serverName, methodName); - LicenseProperties properties = (LicenseProperties) requestBody.getProperties(); - handler.updateLicense(userId, requestBody.getExternalSourceGUID(), requestBody.getExternalSourceName(), @@ -759,41 +743,41 @@ public VoidResponse unlicenseElement(String serverName, * PropertyServerException problem accessing property server * UserNotAuthorizedException security access problem */ - public RelatedElementListResponse getLicensedElements(String serverName, - String userId, - String licenseTypeGUID, - int startFrom, - int pageSize) + public RelatedElementsResponse getLicensedElements(String serverName, + String userId, + String licenseTypeGUID, + int startFrom, + int pageSize) { final String methodName = "getLicensedElements"; final String guidParameter = "licenseTypeGUID"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - RelatedElementListResponse response = new RelatedElementListResponse(); - AuditLog auditLog = null; + RelatedElementsResponse response = new RelatedElementsResponse(); + AuditLog auditLog = null; try { auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); ReferenceableHandler handler = instanceHandler.getRelatedElementHandler(userId, serverName, methodName); - response.setElementList(handler.getAttachedElements(userId, - licenseTypeGUID, - guidParameter, - OpenMetadataType.LICENSE_TYPE_TYPE_NAME, - OpenMetadataType.LICENSE_OF_REFERENCEABLE_TYPE_GUID, - OpenMetadataType.LICENSE_OF_REFERENCEABLE_TYPE_NAME, - OpenMetadataType.REFERENCEABLE.typeName, - null, - null, - 1, - false, - false, - startFrom, - pageSize, - new Date(), - methodName)); + response.setElements(handler.getAttachedElements(userId, + licenseTypeGUID, + guidParameter, + OpenMetadataType.LICENSE_TYPE_TYPE_NAME, + OpenMetadataType.LICENSE_OF_REFERENCEABLE_TYPE_GUID, + OpenMetadataType.LICENSE_OF_REFERENCEABLE_TYPE_NAME, + OpenMetadataType.REFERENCEABLE.typeName, + null, + null, + 1, + false, + false, + startFrom, + pageSize, + new Date(), + methodName)); } catch (Exception error) { @@ -819,41 +803,41 @@ public RelatedElementListResponse getLicensedElements(String serverName, * PropertyServerException problem accessing property server * UserNotAuthorizedException security access problem */ - public RelatedElementListResponse getLicenses(String serverName, - String userId, - String elementGUID, - int startFrom, - int pageSize) + public RelatedElementsResponse getLicenses(String serverName, + String userId, + String elementGUID, + int startFrom, + int pageSize) { final String methodName = "getLicences"; final String guidParameterName = "elementGUID"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - RelatedElementListResponse response = new RelatedElementListResponse(); - AuditLog auditLog = null; + RelatedElementsResponse response = new RelatedElementsResponse(); + AuditLog auditLog = null; try { auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); ReferenceableHandler handler = instanceHandler.getRelatedElementHandler(userId, serverName, methodName); - response.setElementList(handler.getAttachedElements(userId, - elementGUID, - guidParameterName, - OpenMetadataType.REFERENCEABLE.typeName, - OpenMetadataType.LICENSE_OF_REFERENCEABLE_TYPE_GUID, - OpenMetadataType.LICENSE_OF_REFERENCEABLE_TYPE_NAME, - OpenMetadataType.LICENSE_TYPE_TYPE_NAME, - null, - null, - 2, - false, - false, - startFrom, - pageSize, - new Date(), - methodName)); + response.setElements(handler.getAttachedElements(userId, + elementGUID, + guidParameterName, + OpenMetadataType.REFERENCEABLE.typeName, + OpenMetadataType.LICENSE_OF_REFERENCEABLE_TYPE_GUID, + OpenMetadataType.LICENSE_OF_REFERENCEABLE_TYPE_NAME, + OpenMetadataType.LICENSE_TYPE_TYPE_NAME, + null, + null, + 2, + false, + false, + startFrom, + pageSize, + new Date(), + methodName)); } catch (Exception error) { diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/RelatedElementRESTServices.java b/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/RelatedElementRESTServices.java index 4928a4e60fa..f31edf6311f 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/RelatedElementRESTServices.java +++ b/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/RelatedElementRESTServices.java @@ -2,22 +2,17 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.governanceprogram.server; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceDefinitionElement; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceRoleElement; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.RelatedElement; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.AssignmentScopeProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.ResourceListProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.StakeholderProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.ExternalSourceRequestBody; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.GovernanceDefinitionListResponse; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.GovernanceRoleListResponse; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.RelatedElementListResponse; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.RelationshipRequestBody; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; + import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; import org.odpi.openmetadata.commonservices.generichandlers.GovernanceDefinitionHandler; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.RelatedElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.AssignmentScopeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.projects.StakeholderProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.resources.ResourceListProperties; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.commonservices.generichandlers.PersonRoleHandler; import org.odpi.openmetadata.commonservices.generichandlers.ReferenceableHandler; @@ -214,19 +209,19 @@ public VoidResponse clearMoreInformation(String serverName, * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - public RelatedElementListResponse getMoreInformation(String serverName, - String userId, - String elementGUID, - int startFrom, - int pageSize) + public RelatedElementsResponse getMoreInformation(String serverName, + String userId, + String elementGUID, + int startFrom, + int pageSize) { final String methodName = "getMoreInformation"; final String guidPropertyName = "elementGUID"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - RelatedElementListResponse response = new RelatedElementListResponse(); - AuditLog auditLog = null; + RelatedElementsResponse response = new RelatedElementsResponse(); + AuditLog auditLog = null; try { @@ -234,17 +229,17 @@ public RelatedElementListResponse getMoreInformation(String serverName, ReferenceableHandler handler = instanceHandler.getRelatedElementHandler(userId, serverName, methodName); - response.setElementList(handler.getMoreInformation(userId, - elementGUID, - guidPropertyName, - OpenMetadataType.REFERENCEABLE.typeName, - OpenMetadataType.REFERENCEABLE.typeName, - startFrom, - pageSize, - false, - false, - new Date(), - methodName)); + response.setElements(handler.getMoreInformation(userId, + elementGUID, + guidPropertyName, + OpenMetadataType.REFERENCEABLE.typeName, + OpenMetadataType.REFERENCEABLE.typeName, + startFrom, + pageSize, + false, + false, + new Date(), + methodName)); } catch (Exception error) { @@ -271,19 +266,19 @@ public RelatedElementListResponse getMoreInformation(String serverName, * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - public RelatedElementListResponse getDescriptiveElements(String serverName, - String userId, - String detailGUID, - int startFrom, - int pageSize) + public RelatedElementsResponse getDescriptiveElements(String serverName, + String userId, + String detailGUID, + int startFrom, + int pageSize) { final String methodName = "getDescriptiveElements"; final String guidPropertyName = "detailGUID"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - RelatedElementListResponse response = new RelatedElementListResponse(); - AuditLog auditLog = null; + RelatedElementsResponse response = new RelatedElementsResponse(); + AuditLog auditLog = null; try { @@ -291,7 +286,7 @@ public RelatedElementListResponse getDescriptiveElements(String serverName, ReferenceableHandler handler = instanceHandler.getRelatedElementHandler(userId, serverName, methodName); - response.setElementList(handler.getDescriptiveElements(userId, + response.setElements(handler.getDescriptiveElements(userId, detailGUID, guidPropertyName, OpenMetadataType.REFERENCEABLE.typeName, @@ -489,19 +484,19 @@ public VoidResponse clearGovernedBy(String serverName, * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - public GovernanceDefinitionListResponse getGovernanceDefinitionsForElement(String serverName, - String userId, - String elementGUID, - int startFrom, - int pageSize) + public GovernanceDefinitionsResponse getGovernanceDefinitionsForElement(String serverName, + String userId, + String elementGUID, + int startFrom, + int pageSize) { final String methodName = "getGovernanceDefinitionsForElement"; final String guidPropertyName = "elementGUID"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - GovernanceDefinitionListResponse response = new GovernanceDefinitionListResponse(); - AuditLog auditLog = null; + GovernanceDefinitionsResponse response = new GovernanceDefinitionsResponse(); + AuditLog auditLog = null; try { @@ -546,19 +541,19 @@ public GovernanceDefinitionListResponse getGovernanceDefinitionsForElement(Strin * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - public RelatedElementListResponse getGovernedElements(String serverName, - String userId, - String governanceDefinitionGUID, - int startFrom, - int pageSize) + public RelatedElementsResponse getGovernedElements(String serverName, + String userId, + String governanceDefinitionGUID, + int startFrom, + int pageSize) { final String methodName = "getGovernedElements"; final String guidPropertyName = "governanceDefinitionGUID"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - RelatedElementListResponse response = new RelatedElementListResponse(); - AuditLog auditLog = null; + RelatedElementsResponse response = new RelatedElementsResponse(); + AuditLog auditLog = null; try { @@ -566,7 +561,7 @@ public RelatedElementListResponse getGovernedElements(String serverName, ReferenceableHandler handler = instanceHandler.getRelatedElementHandler(userId, serverName, methodName); - response.setElementList(handler.getGovernedElements(userId, + response.setElements(handler.getGovernedElements(userId, governanceDefinitionGUID, guidPropertyName, OpenMetadataType.REFERENCEABLE.typeName, @@ -764,19 +759,19 @@ public VoidResponse clearGovernanceDefinitionScope(String ser * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - public RelatedElementListResponse getGovernanceDefinitionScopes(String serverName, - String userId, - String governanceDefinitionGUID, - int startFrom, - int pageSize) + public RelatedElementsResponse getGovernanceDefinitionScopes(String serverName, + String userId, + String governanceDefinitionGUID, + int startFrom, + int pageSize) { final String methodName = "getGovernanceDefinitionScopes"; final String guidPropertyName = "governanceDefinitionGUID"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - RelatedElementListResponse response = new RelatedElementListResponse(); - AuditLog auditLog = null; + RelatedElementsResponse response = new RelatedElementsResponse(); + AuditLog auditLog = null; try { @@ -784,7 +779,7 @@ public RelatedElementListResponse getGovernanceDefinitionScopes(String serverNam ReferenceableHandler handler = instanceHandler.getRelatedElementHandler(userId, serverName, methodName); - response.setElementList(handler.getGovernanceDefinitionScope(userId, + response.setElements(handler.getGovernanceDefinitionScope(userId, governanceDefinitionGUID, guidPropertyName, OpenMetadataType.REFERENCEABLE.typeName, @@ -820,19 +815,19 @@ public RelatedElementListResponse getGovernanceDefinitionScopes(String serverNam * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - public GovernanceDefinitionListResponse getScopedGovernanceDefinitions(String serverName, - String userId, - String scopeGUID, - int startFrom, - int pageSize) + public GovernanceDefinitionsResponse getScopedGovernanceDefinitions(String serverName, + String userId, + String scopeGUID, + int startFrom, + int pageSize) { final String methodName = "getScopedGovernanceDefinitions"; final String guidPropertyName = "scopeGUID"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - GovernanceDefinitionListResponse response = new GovernanceDefinitionListResponse(); - AuditLog auditLog = null; + GovernanceDefinitionsResponse response = new GovernanceDefinitionsResponse(); + AuditLog auditLog = null; try { @@ -1039,19 +1034,19 @@ public VoidResponse clearGovernanceResponsibilityAssignment(String * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - public GovernanceRoleListResponse getResponsibleRoles(String serverName, - String userId, - String governanceResponsibilityGUID, - int startFrom, - int pageSize) + public GovernanceRolesResponse getResponsibleRoles(String serverName, + String userId, + String governanceResponsibilityGUID, + int startFrom, + int pageSize) { final String methodName = "getResponsibleRoles"; final String guidPropertyName = "governanceResponsibilityGUID"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - GovernanceRoleListResponse response = new GovernanceRoleListResponse(); - AuditLog auditLog = null; + GovernanceRolesResponse response = new GovernanceRolesResponse(); + AuditLog auditLog = null; try { @@ -1094,19 +1089,19 @@ public GovernanceRoleListResponse getResponsibleRoles(String serverName, * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - public GovernanceDefinitionListResponse getRoleResponsibilities(String serverName, - String userId, - String personRoleGUID, - int startFrom, - int pageSize) + public GovernanceDefinitionsResponse getRoleResponsibilities(String serverName, + String userId, + String personRoleGUID, + int startFrom, + int pageSize) { final String methodName = "getRoleResponsibilities"; final String guidPropertyName = "personRoleGUID"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - GovernanceDefinitionListResponse response = new GovernanceDefinitionListResponse(); - AuditLog auditLog = null; + GovernanceDefinitionsResponse response = new GovernanceDefinitionsResponse(); + AuditLog auditLog = null; try { @@ -1172,10 +1167,8 @@ public VoidResponse setupStakeholder(String serverName, if (requestBody != null) { - if (requestBody.getProperties() instanceof StakeholderProperties) + if (requestBody.getProperties() instanceof StakeholderProperties properties) { - StakeholderProperties properties = (StakeholderProperties) requestBody.getProperties(); - handler.addStakeholder(userId, requestBody.getExternalSourceGUID(), requestBody.getExternalSourceName(), @@ -1318,19 +1311,19 @@ public VoidResponse clearStakeholder(String serverName, * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - public RelatedElementListResponse getStakeholders(String serverName, - String userId, - String elementGUID, - int startFrom, - int pageSize) + public RelatedElementsResponse getStakeholders(String serverName, + String userId, + String elementGUID, + int startFrom, + int pageSize) { final String methodName = "getStakeholders"; final String guidPropertyName = "elementGUID"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - RelatedElementListResponse response = new RelatedElementListResponse(); - AuditLog auditLog = null; + RelatedElementsResponse response = new RelatedElementsResponse(); + AuditLog auditLog = null; try { @@ -1338,7 +1331,7 @@ public RelatedElementListResponse getStakeholders(String serverName, ReferenceableHandler handler = instanceHandler.getRelatedElementHandler(userId, serverName, methodName); - response.setElementList(handler.getStakeholders(userId, + response.setElements(handler.getStakeholders(userId, elementGUID, guidPropertyName, OpenMetadataType.REFERENCEABLE.typeName, @@ -1375,19 +1368,19 @@ public RelatedElementListResponse getStakeholders(String serverName, * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - public RelatedElementListResponse getStakeholderCommissionedElements(String serverName, - String userId, - String stakeholderGUID, - int startFrom, - int pageSize) + public RelatedElementsResponse getStakeholderCommissionedElements(String serverName, + String userId, + String stakeholderGUID, + int startFrom, + int pageSize) { final String methodName = "getStakeholderCommissionedElements"; final String guidPropertyName = "stakeholderGUID"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - RelatedElementListResponse response = new RelatedElementListResponse(); - AuditLog auditLog = null; + RelatedElementsResponse response = new RelatedElementsResponse(); + AuditLog auditLog = null; try { @@ -1395,7 +1388,7 @@ public RelatedElementListResponse getStakeholderCommissionedElements(String ser ReferenceableHandler handler = instanceHandler.getRelatedElementHandler(userId, serverName, methodName); - response.setElementList(handler.getCommissionedByStakeholder(userId, + response.setElements(handler.getCommissionedByStakeholder(userId, stakeholderGUID, guidPropertyName, OpenMetadataType.REFERENCEABLE.typeName, @@ -1455,9 +1448,8 @@ public VoidResponse setupAssignmentScope(String serverName, if (requestBody != null) { - if (requestBody.getProperties() instanceof AssignmentScopeProperties) + if (requestBody.getProperties() instanceof AssignmentScopeProperties properties) { - AssignmentScopeProperties properties = (AssignmentScopeProperties) requestBody.getProperties(); handler.addAssignmentScope(userId, requestBody.getExternalSourceGUID(), @@ -1603,19 +1595,19 @@ public VoidResponse clearAssignmentScope(String serverName, * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - public RelatedElementListResponse getAssignedScopes(String serverName, - String userId, - String elementGUID, - int startFrom, - int pageSize) + public RelatedElementsResponse getAssignedScopes(String serverName, + String userId, + String elementGUID, + int startFrom, + int pageSize) { final String methodName = "getAssignedScopes"; final String guidPropertyName = "elementGUID"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - RelatedElementListResponse response = new RelatedElementListResponse(); - AuditLog auditLog = null; + RelatedElementsResponse response = new RelatedElementsResponse(); + AuditLog auditLog = null; try { @@ -1623,7 +1615,7 @@ public RelatedElementListResponse getAssignedScopes(String serverName, ReferenceableHandler handler = instanceHandler.getRelatedElementHandler(userId, serverName, methodName); - response.setElementList(handler.getAssignmentScope(userId, + response.setElements(handler.getAssignmentScope(userId, elementGUID, guidPropertyName, OpenMetadataType.REFERENCEABLE.typeName, @@ -1660,19 +1652,19 @@ public RelatedElementListResponse getAssignedScopes(String serverName, * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - public RelatedElementListResponse getAssignedActors(String serverName, - String userId, - String scopeGUID, - int startFrom, - int pageSize) + public RelatedElementsResponse getAssignedActors(String serverName, + String userId, + String scopeGUID, + int startFrom, + int pageSize) { final String methodName = "getAssignedActors"; final String guidPropertyName = "scopeGUID"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - RelatedElementListResponse response = new RelatedElementListResponse(); - AuditLog auditLog = null; + RelatedElementsResponse response = new RelatedElementsResponse(); + AuditLog auditLog = null; try { @@ -1680,7 +1672,7 @@ public RelatedElementListResponse getAssignedActors(String serverName, ReferenceableHandler handler = instanceHandler.getRelatedElementHandler(userId, serverName, methodName); - response.setElementList(handler.getAssignedActors(userId, + response.setElements(handler.getAssignedActors(userId, scopeGUID, guidPropertyName, OpenMetadataType.REFERENCEABLE.typeName, @@ -1890,19 +1882,19 @@ public VoidResponse clearResource(String serverName, * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - public RelatedElementListResponse getResourceList(String serverName, - String userId, - String elementGUID, - int startFrom, - int pageSize) + public RelatedElementsResponse getResourceList(String serverName, + String userId, + String elementGUID, + int startFrom, + int pageSize) { final String methodName = "getResourceList"; final String guidPropertyName = "elementGUID"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - RelatedElementListResponse response = new RelatedElementListResponse(); - AuditLog auditLog = null; + RelatedElementsResponse response = new RelatedElementsResponse(); + AuditLog auditLog = null; try { @@ -1910,7 +1902,7 @@ public RelatedElementListResponse getResourceList(String serverName, ReferenceableHandler handler = instanceHandler.getRelatedElementHandler(userId, serverName, methodName); - response.setElementList(handler.getResourceList(userId, + response.setElements(handler.getResourceList(userId, elementGUID, guidPropertyName, OpenMetadataType.REFERENCEABLE.typeName, @@ -1946,11 +1938,11 @@ public RelatedElementListResponse getResourceList(String serverName, * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - public RelatedElementListResponse getSupportedByResource(String serverName, - String userId, - String resourceGUID, - int startFrom, - int pageSize) + public RelatedElementsResponse getSupportedByResource(String serverName, + String userId, + String resourceGUID, + int startFrom, + int pageSize) { final String methodName = "getSupportedByResource"; final String guidPropertyName = "resourceGUID"; @@ -1958,8 +1950,8 @@ public RelatedElementListResponse getSupportedByResource(String serverName, RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - RelatedElementListResponse response = new RelatedElementListResponse(); - AuditLog auditLog = null; + RelatedElementsResponse response = new RelatedElementsResponse(); + AuditLog auditLog = null; try { @@ -1967,7 +1959,7 @@ public RelatedElementListResponse getSupportedByResource(String serverName, ReferenceableHandler handler = instanceHandler.getRelatedElementHandler(userId, serverName, methodName); - response.setElementList(handler.getSupportedByResource(userId, + response.setElements(handler.getSupportedByResource(userId, resourceGUID, guidPropertyName, OpenMetadataType.REFERENCEABLE.typeName, diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/SubjectAreaRESTServices.java b/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/SubjectAreaRESTServices.java index cc6e9e91d2c..46c4e9ea9d7 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/SubjectAreaRESTServices.java +++ b/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/SubjectAreaRESTServices.java @@ -3,32 +3,19 @@ package org.odpi.openmetadata.accessservices.governanceprogram.server; -import org.odpi.openmetadata.accessservices.governanceprogram.converters.ElementStubConverter; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceDefinitionElement; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.RelatedElement; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.SubjectAreaDefinition; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.SubjectAreaElement; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.SubjectAreaClassificationProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.SubjectAreaProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.ClassificationRequestBody; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.ElementStubListResponse; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.ExternalSourceRequestBody; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.ReferenceableRequestBody; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.RelationshipRequestBody; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.SubjectAreaDefinitionResponse; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.SubjectAreaListResponse; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.SubjectAreaResponse; + import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; +import org.odpi.openmetadata.commonservices.generichandlers.ElementStubConverter; import org.odpi.openmetadata.commonservices.generichandlers.GovernanceDefinitionHandler; import org.odpi.openmetadata.commonservices.generichandlers.ReferenceableHandler; import org.odpi.openmetadata.commonservices.generichandlers.SubjectAreaHandler; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.*; +import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; import org.slf4j.LoggerFactory; @@ -85,13 +72,11 @@ public GUIDResponse createSubjectArea(String serverName, { if (requestBody != null) { - if (requestBody.getProperties() instanceof SubjectAreaProperties) + if (requestBody.getProperties() instanceof SubjectAreaProperties properties) { auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); SubjectAreaHandler handler = instanceHandler.getSubjectAreaHandler(userId, serverName, methodName); - SubjectAreaProperties properties = (SubjectAreaProperties)requestBody.getProperties(); - String subjectAreaGUID = handler.createSubjectArea(userId, requestBody.getExternalSourceGUID(), requestBody.getExternalSourceName(), @@ -792,18 +777,18 @@ public SubjectAreaResponse getSubjectAreaByName(String serverName, * PropertyServerException problem accessing property server * UserNotAuthorizedException security access problem */ - public SubjectAreaListResponse getSubjectAreasForDomain(String serverName, - String userId, - int domainIdentifier, - int startFrom, - int pageSize) + public SubjectAreasResponse getSubjectAreasForDomain(String serverName, + String userId, + int domainIdentifier, + int startFrom, + int pageSize) { final String methodName = "getSubjectAreasForDomain"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SubjectAreaListResponse response = new SubjectAreaListResponse(); - AuditLog auditLog = null; + SubjectAreasResponse response = new SubjectAreasResponse(); + AuditLog auditLog = null; try { @@ -819,7 +804,7 @@ public SubjectAreaListResponse getSubjectAreasForDomain(String serverName, new Date(), methodName); - response.setElementList(subjectAreas); + response.setElements(subjectAreas); } catch (Exception error) { @@ -1070,18 +1055,18 @@ public VoidResponse deleteSubjectAreaMemberClassification(String * PropertyServerException problem accessing property server * UserNotAuthorizedException security access problem */ - public ElementStubListResponse getMembersOfSubjectArea(String serverName, - String userId, - String subjectAreaName, - int startFrom, - int pageSize) + public ElementStubsResponse getMembersOfSubjectArea(String serverName, + String userId, + String subjectAreaName, + int startFrom, + int pageSize) { final String methodName = "getMembersOfSubjectArea"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - ElementStubListResponse response = new ElementStubListResponse(); - AuditLog auditLog = null; + ElementStubsResponse response = new ElementStubsResponse(); + AuditLog auditLog = null; try { diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-spring/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/spring/GovernanceCertificationsResource.java b/open-metadata-implementation/access-services/governance-program/governance-program-spring/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/spring/GovernanceCertificationsResource.java index 251997f4d0e..3f2232efbd3 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-spring/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/spring/GovernanceCertificationsResource.java +++ b/open-metadata-implementation/access-services/governance-program/governance-program-spring/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/spring/GovernanceCertificationsResource.java @@ -5,16 +5,8 @@ import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.CertificationTypeListResponse; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.CertificationTypeResponse; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.ExternalSourceRequestBody; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.GovernanceDefinitionRequestBody; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.RelatedElementListResponse; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.RelationshipRequestBody; import org.odpi.openmetadata.accessservices.governanceprogram.server.CertificationRESTServices; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; @@ -184,11 +176,11 @@ public CertificationTypeResponse getCertificationTypeByDocId(@PathVariable Strin */ @PostMapping (path = "/certification-types/by-title") - public CertificationTypeListResponse getCertificationTypesByTitle(@PathVariable String serverName, - @PathVariable String userId, - @RequestParam int startFrom, - @RequestParam int pageSize, - @RequestBody SearchStringRequestBody requestBody) + public CertificationTypesResponse getCertificationTypesByTitle(@PathVariable String serverName, + @PathVariable String userId, + @RequestParam int startFrom, + @RequestParam int pageSize, + @RequestBody SearchStringRequestBody requestBody) { return restAPI.getCertificationTypesByTitle(serverName, userId, startFrom, pageSize, requestBody); } @@ -210,11 +202,11 @@ public CertificationTypeListResponse getCertificationTypesByTitle(@PathVariable */ @GetMapping (path = "/certification-types/by-domain/{domainIdentifier}") - public CertificationTypeListResponse getCertificationTypeByDomainId(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable int domainIdentifier, - @RequestParam int startFrom, - @RequestParam int pageSize) + public CertificationTypesResponse getCertificationTypeByDomainId(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable int domainIdentifier, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getCertificationTypeByDomainId(serverName, userId, domainIdentifier, startFrom, pageSize); } @@ -318,11 +310,11 @@ public VoidResponse decertifyElement(@PathVariable String serve */ @GetMapping (path = "/elements/certifications/{certificationGUID}") - public RelatedElementListResponse getCertifiedElements(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String certificationGUID, - @RequestParam int startFrom, - @RequestParam int pageSize) + public RelatedElementsResponse getCertifiedElements(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String certificationGUID, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getCertifiedElements(serverName, userId, certificationGUID, startFrom, pageSize); } @@ -344,11 +336,11 @@ public RelatedElementListResponse getCertifiedElements(@PathVariable String serv */ @GetMapping (path = "/elements/{elementGUID}/certifications") - public RelatedElementListResponse getCertifications(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String elementGUID, - @RequestParam int startFrom, - @RequestParam int pageSize) + public RelatedElementsResponse getCertifications(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String elementGUID, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getCertifications(serverName, userId, elementGUID, startFrom, pageSize); } diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-spring/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/spring/GovernanceDefinitionsResource.java b/open-metadata-implementation/access-services/governance-program/governance-program-spring/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/spring/GovernanceDefinitionsResource.java index 2eb30864378..ba2a97fa7b0 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-spring/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/spring/GovernanceDefinitionsResource.java +++ b/open-metadata-implementation/access-services/governance-program/governance-program-spring/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/spring/GovernanceDefinitionsResource.java @@ -5,13 +5,8 @@ import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.ExternalSourceRequestBody; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.GovernanceDefinitionRequestBody; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.GovernanceStatusRequestBody; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.RelationshipRequestBody; import org.odpi.openmetadata.accessservices.governanceprogram.server.GovernanceDefinitionRESTServices; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-spring/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/spring/GovernanceDomainsResource.java b/open-metadata-implementation/access-services/governance-program/governance-program-spring/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/spring/GovernanceDomainsResource.java index 37d8faa3d39..bcaa9a1003f 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-spring/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/spring/GovernanceDomainsResource.java +++ b/open-metadata-implementation/access-services/governance-program/governance-program-spring/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/spring/GovernanceDomainsResource.java @@ -5,18 +5,8 @@ import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.ExternalSourceRequestBody; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.GovernanceDomainListResponse; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.GovernanceDomainResponse; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.GovernanceDomainSetListResponse; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.GovernanceDomainSetResponse; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.ReferenceableRequestBody; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.RelationshipRequestBody; import org.odpi.openmetadata.accessservices.governanceprogram.server.GovernanceDomainRESTServices; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; @@ -143,11 +133,11 @@ public VoidResponse removeGovernanceDomainSet(@PathVariable String serv */ @PostMapping(path = "/governance-domain-sets/by-search-string") - public GovernanceDomainSetListResponse findGovernanceDomainSets(@PathVariable String serverName, - @PathVariable String userId, - @RequestParam int startFrom, - @RequestParam int pageSize, - @RequestBody SearchStringRequestBody requestBody) + public GovernanceDomainSetsResponse findGovernanceDomainSets(@PathVariable String serverName, + @PathVariable String userId, + @RequestParam int startFrom, + @RequestParam int pageSize, + @RequestBody SearchStringRequestBody requestBody) { return restAPI.findGovernanceDomainSets(serverName, userId, startFrom, pageSize, requestBody); } @@ -170,11 +160,11 @@ public GovernanceDomainSetListResponse findGovernanceDomainSets(@PathVariable St */ @PostMapping(path = "/governance-domain-sets/by-name") - public GovernanceDomainSetListResponse getGovernanceDomainSetsByName(@PathVariable String serverName, - @PathVariable String userId, - @RequestParam int startFrom, - @RequestParam int pageSize, - @RequestBody NameRequestBody requestBody) + public GovernanceDomainSetsResponse getGovernanceDomainSetsByName(@PathVariable String serverName, + @PathVariable String userId, + @RequestParam int startFrom, + @RequestParam int pageSize, + @RequestBody NameRequestBody requestBody) { return restAPI.getGovernanceDomainSetsByName(serverName, userId, startFrom, pageSize, requestBody); } @@ -351,10 +341,10 @@ public VoidResponse removeDomainFromSet(@PathVariable String serverName */ @GetMapping(path = "/governance-domains") - public GovernanceDomainListResponse getGovernanceDomains(@PathVariable String serverName, - @PathVariable String userId, - @RequestParam int startFrom, - @RequestParam int pageSize) + public GovernanceDomainsResponse getGovernanceDomains(@PathVariable String serverName, + @PathVariable String userId, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getGovernanceDomains(serverName, userId, startFrom, pageSize); } @@ -377,11 +367,11 @@ public GovernanceDomainListResponse getGovernanceDomains(@PathVariable String se */ @PostMapping(path = "/governance-domain/by-search-string") - public GovernanceDomainListResponse findGovernanceDomains(@PathVariable String serverName, - @PathVariable String userId, - @RequestParam int startFrom, - @RequestParam int pageSize, - @RequestBody SearchStringRequestBody requestBody) + public GovernanceDomainsResponse findGovernanceDomains(@PathVariable String serverName, + @PathVariable String userId, + @RequestParam int startFrom, + @RequestParam int pageSize, + @RequestBody SearchStringRequestBody requestBody) { return restAPI.findGovernanceDomains(serverName, userId, startFrom, pageSize, requestBody); } @@ -403,11 +393,11 @@ public GovernanceDomainListResponse findGovernanceDomains(@PathVariable String */ @GetMapping(path = "/governance-domain-sets/by-governance-domains/{governanceDomainGUID}") - public GovernanceDomainSetListResponse getSetsForGovernanceDomain(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String governanceDomainGUID, - @RequestParam int startFrom, - @RequestParam int pageSize) + public GovernanceDomainSetsResponse getSetsForGovernanceDomain(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String governanceDomainGUID, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getSetsForGovernanceDomain(serverName, userId, governanceDomainGUID, startFrom, pageSize); } @@ -430,11 +420,11 @@ public GovernanceDomainSetListResponse getSetsForGovernanceDomain(@PathVariable */ @PostMapping(path = "/governance-domain/by-name") - public GovernanceDomainListResponse getGovernanceDomainsByName(@PathVariable String serverName, - @PathVariable String userId, - @RequestParam int startFrom, - @RequestParam int pageSize, - @RequestBody NameRequestBody requestBody) + public GovernanceDomainsResponse getGovernanceDomainsByName(@PathVariable String serverName, + @PathVariable String userId, + @RequestParam int startFrom, + @RequestParam int pageSize, + @RequestBody NameRequestBody requestBody) { return restAPI.getGovernanceDomainsByName(serverName, userId, startFrom, pageSize, requestBody); } diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-spring/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/spring/GovernanceExternalReferenceResource.java b/open-metadata-implementation/access-services/governance-program/governance-program-spring/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/spring/GovernanceExternalReferenceResource.java index f793e365377..6233829eb05 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-spring/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/spring/GovernanceExternalReferenceResource.java +++ b/open-metadata-implementation/access-services/governance-program/governance-program-spring/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/spring/GovernanceExternalReferenceResource.java @@ -5,17 +5,8 @@ import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.ExternalReferenceListResponse; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.ExternalReferenceResponse; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.ExternalSourceRequestBody; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.ReferenceableRequestBody; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.RelatedElementListResponse; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.RelationshipRequestBody; import org.odpi.openmetadata.accessservices.governanceprogram.server.ExternalReferenceRESTServices; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; @@ -213,11 +204,11 @@ public ExternalReferenceResponse getExternalReferenceByGUID(@PathVariable String */ @PostMapping(path = "/external-references/by-resource-id") - public ExternalReferenceListResponse findExternalReferencesById(@PathVariable String serverName, - @PathVariable String userId, - @RequestParam int startFrom, - @RequestParam int pageSize, - @RequestBody SearchStringRequestBody requestBody) + public ExternalReferencesResponse findExternalReferencesById(@PathVariable String serverName, + @PathVariable String userId, + @RequestParam int startFrom, + @RequestParam int pageSize, + @RequestBody SearchStringRequestBody requestBody) { return restAPI.findExternalReferencesById(serverName, userId, startFrom, pageSize, requestBody); } @@ -239,11 +230,11 @@ public ExternalReferenceListResponse findExternalReferencesById(@PathVariable St */ @PostMapping(path = "/external-references/by-url") - public ExternalReferenceListResponse getExternalReferencesByURL(@PathVariable String serverName, - @PathVariable String userId, - @RequestParam int startFrom, - @RequestParam int pageSize, - @RequestBody NameRequestBody requestBody) + public ExternalReferencesResponse getExternalReferencesByURL(@PathVariable String serverName, + @PathVariable String userId, + @RequestParam int startFrom, + @RequestParam int pageSize, + @RequestBody NameRequestBody requestBody) { return restAPI.getExternalReferencesByURL(serverName, userId, startFrom, pageSize, requestBody); } @@ -265,11 +256,11 @@ public ExternalReferenceListResponse getExternalReferencesByURL(@PathVariable St */ @GetMapping(path = "/elements/{attachedToGUID}/external-references") - public ExternalReferenceListResponse retrieveAttachedExternalReferences(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String attachedToGUID, - @RequestParam int startFrom, - @RequestParam int pageSize) + public ExternalReferencesResponse retrieveAttachedExternalReferences(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String attachedToGUID, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.retrieveAttachedExternalReferences(serverName, userId, attachedToGUID, startFrom, pageSize); } @@ -291,11 +282,11 @@ public ExternalReferenceListResponse retrieveAttachedExternalReferences(@PathVar */ @GetMapping(path = "/elements/external-references/{externalReferenceGUID}") - public RelatedElementListResponse getElementsForExternalReference(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String externalReferenceGUID, - @RequestParam int startFrom, - @RequestParam int pageSize) + public RelatedElementsResponse getElementsForExternalReference(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String externalReferenceGUID, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getElementsForExternalReference(serverName, userId, externalReferenceGUID, startFrom, pageSize); } diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-spring/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/spring/GovernanceLicensesResource.java b/open-metadata-implementation/access-services/governance-program/governance-program-spring/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/spring/GovernanceLicensesResource.java index 1f3dcf8147b..3e10c3a3050 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-spring/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/spring/GovernanceLicensesResource.java +++ b/open-metadata-implementation/access-services/governance-program/governance-program-spring/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/spring/GovernanceLicensesResource.java @@ -5,16 +5,8 @@ import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.LicenseTypeListResponse; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.LicenseTypeResponse; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.ExternalSourceRequestBody; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.GovernanceDefinitionRequestBody; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.RelatedElementListResponse; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.RelationshipRequestBody; import org.odpi.openmetadata.accessservices.governanceprogram.server.LicenseRESTServices; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; @@ -184,11 +176,11 @@ public LicenseTypeResponse getLicenseTypeByDocId(@PathVariable String serverName */ @PostMapping (path = "/license-types/by-title") - public LicenseTypeListResponse getLicenseTypesByTitle(@PathVariable String serverName, - @PathVariable String userId, - @RequestParam int startFrom, - @RequestParam int pageSize, - @RequestBody SearchStringRequestBody requestBody) + public LicenseTypesResponse getLicenseTypesByTitle(@PathVariable String serverName, + @PathVariable String userId, + @RequestParam int startFrom, + @RequestParam int pageSize, + @RequestBody SearchStringRequestBody requestBody) { return restAPI.getLicenseTypesByTitle(serverName, userId, startFrom, pageSize, requestBody); } @@ -210,11 +202,11 @@ public LicenseTypeListResponse getLicenseTypesByTitle(@PathVariable String */ @GetMapping (path = "/license-types/by-domain/{domainIdentifier}") - public LicenseTypeListResponse getLicenseTypeByDomainId(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable int domainIdentifier, - @RequestParam int startFrom, - @RequestParam int pageSize) + public LicenseTypesResponse getLicenseTypeByDomainId(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable int domainIdentifier, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getLicenseTypeByDomainId(serverName, userId, domainIdentifier, startFrom, pageSize); } @@ -318,11 +310,11 @@ public VoidResponse unlicenseElement(@PathVariable String serve */ @GetMapping (path = "/elements/licenses/{licenseGUID}") - public RelatedElementListResponse getCertifiedElements(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String licenseGUID, - @RequestParam int startFrom, - @RequestParam int pageSize) + public RelatedElementsResponse getCertifiedElements(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String licenseGUID, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getLicensedElements(serverName, userId, licenseGUID, startFrom, pageSize); } @@ -344,11 +336,11 @@ public RelatedElementListResponse getCertifiedElements(@PathVariable String serv */ @GetMapping (path = "/elements/{elementGUID}/licenses") - public RelatedElementListResponse getLicenses(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String elementGUID, - @RequestParam int startFrom, - @RequestParam int pageSize) + public RelatedElementsResponse getLicenses(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String elementGUID, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getLicenses(serverName, userId, elementGUID, startFrom, pageSize); } diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-spring/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/spring/GovernanceMetricsResource.java b/open-metadata-implementation/access-services/governance-program/governance-program-spring/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/spring/GovernanceMetricsResource.java index 9525d2abfb6..01504626507 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-spring/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/spring/GovernanceMetricsResource.java +++ b/open-metadata-implementation/access-services/governance-program/governance-program-spring/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/spring/GovernanceMetricsResource.java @@ -5,16 +5,8 @@ import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.ClassificationRequestBody; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.ExternalSourceRequestBody; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.GovernanceMetricListResponse; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.GovernanceMetricResponse; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.ReferenceableRequestBody; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.RelationshipRequestBody; import org.odpi.openmetadata.accessservices.governanceprogram.server.GovernanceMetricsRESTServices; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; @@ -408,11 +400,11 @@ public GovernanceMetricResponse getGovernanceMetricByGUID(@PathVariable String s */ @PostMapping(path = "/governance-metrics/by-search-string") - public GovernanceMetricListResponse findGovernanceMetrics(@PathVariable String serverName, - @PathVariable String userId, - @RequestParam int startFrom, - @RequestParam int pageSize, - @RequestBody SearchStringRequestBody requestBody) + public GovernanceMetricsResponse findGovernanceMetrics(@PathVariable String serverName, + @PathVariable String userId, + @RequestParam int startFrom, + @RequestParam int pageSize, + @RequestBody SearchStringRequestBody requestBody) { return restAPI.findGovernanceMetrics(serverName, userId, startFrom, pageSize, requestBody); } diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-spring/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/spring/GovernanceProgramResource.java b/open-metadata-implementation/access-services/governance-program/governance-program-spring/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/spring/GovernanceProgramResource.java index 05867e5338f..b557ccd039f 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-spring/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/spring/GovernanceProgramResource.java +++ b/open-metadata-implementation/access-services/governance-program/governance-program-spring/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/spring/GovernanceProgramResource.java @@ -4,13 +4,8 @@ import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.ExternalSourceRequestBody; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.GovernanceDefinitionListResponse; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.GovernanceRoleListResponse; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.RelatedElementListResponse; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.RelationshipRequestBody; import org.odpi.openmetadata.accessservices.governanceprogram.server.RelatedElementRESTServices; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; @@ -114,11 +109,11 @@ public VoidResponse clearMoreInformation(@PathVariable String */ @GetMapping(path = "/related-elements/more-information/by-descriptive-element/{elementGUID}") - public RelatedElementListResponse getMoreInformation(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String elementGUID, - @RequestParam int startFrom, - @RequestParam int pageSize) + public RelatedElementsResponse getMoreInformation(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String elementGUID, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getMoreInformation(serverName, userId, elementGUID, startFrom, pageSize); } @@ -140,11 +135,11 @@ public RelatedElementListResponse getMoreInformation(@PathVariable String serve */ @GetMapping(path = "/related-elements/more-information/by-detail-element/{detailGUID}") - public RelatedElementListResponse getDescriptiveElements(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String detailGUID, - @RequestParam int startFrom, - @RequestParam int pageSize) + public RelatedElementsResponse getDescriptiveElements(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String detailGUID, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getDescriptiveElements(serverName, userId, detailGUID, startFrom, pageSize); } @@ -218,11 +213,11 @@ public VoidResponse clearGovernedBy(@PathVariable String serv */ @GetMapping(path = "/related-elements/governed-by/by-element/{elementGUID}") - public GovernanceDefinitionListResponse getGovernanceDefinitionsForElement(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String elementGUID, - @RequestParam int startFrom, - @RequestParam int pageSize) + public GovernanceDefinitionsResponse getGovernanceDefinitionsForElement(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String elementGUID, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getGovernanceDefinitionsForElement(serverName, userId, elementGUID, startFrom, pageSize); } @@ -244,11 +239,11 @@ public GovernanceDefinitionListResponse getGovernanceDefinitionsForElement(@Pat */ @GetMapping(path = "/related-elements/governed-by/by-governance-definition/{governanceDefinitionGUID}") - public RelatedElementListResponse getGovernedElements(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String governanceDefinitionGUID, - @RequestParam int startFrom, - @RequestParam int pageSize) + public RelatedElementsResponse getGovernedElements(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String governanceDefinitionGUID, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getGovernedElements(serverName, userId, governanceDefinitionGUID, startFrom, pageSize); } @@ -323,11 +318,11 @@ public VoidResponse clearGovernanceDefinitionScope(@PathVariable String */ @GetMapping(path = "/related-elements/governance-definition-scopes/by-governance-definition/{governanceDefinitionGUID}") - public RelatedElementListResponse getGovernanceDefinitionScopes(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String governanceDefinitionGUID, - @RequestParam int startFrom, - @RequestParam int pageSize) + public RelatedElementsResponse getGovernanceDefinitionScopes(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String governanceDefinitionGUID, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getGovernanceDefinitionScopes(serverName, userId, governanceDefinitionGUID, startFrom, pageSize); } @@ -349,11 +344,11 @@ public RelatedElementListResponse getGovernanceDefinitionScopes(@PathVariable S */ @GetMapping(path = "/related-elements/governance-definition-scopes/by-scope/{scopeGUID}") - public GovernanceDefinitionListResponse getScopedGovernanceDefinitions(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String scopeGUID, - @RequestParam int startFrom, - @RequestParam int pageSize) + public GovernanceDefinitionsResponse getScopedGovernanceDefinitions(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String scopeGUID, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getScopedGovernanceDefinitions(serverName, userId, scopeGUID, startFrom, pageSize); } @@ -427,11 +422,11 @@ public VoidResponse clearGovernanceResponsibilityAssignment(@PathVariable String */ @GetMapping(path = "/related-elements/governance-responsibility-assignments/by-responsibility/{governanceResponsibilityGUID}") - public GovernanceRoleListResponse getResponsibleRoles(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String governanceResponsibilityGUID, - @RequestParam int startFrom, - @RequestParam int pageSize) + public GovernanceRolesResponse getResponsibleRoles(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String governanceResponsibilityGUID, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getResponsibleRoles(serverName, userId, governanceResponsibilityGUID, startFrom, pageSize); } @@ -453,11 +448,11 @@ public GovernanceRoleListResponse getResponsibleRoles(@PathVariable String serve */ @GetMapping(path = "/related-elements/governance-responsibility-assignments/by-role/{personRoleGUID}") - public GovernanceDefinitionListResponse getRoleResponsibilities(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String personRoleGUID, - @RequestParam int startFrom, - @RequestParam int pageSize) + public GovernanceDefinitionsResponse getRoleResponsibilities(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String personRoleGUID, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getRoleResponsibilities(serverName, userId, personRoleGUID, startFrom, pageSize); } @@ -531,11 +526,11 @@ public VoidResponse clearStakeholder(@PathVariable String ser */ @GetMapping(path = "/related-elements/stakeholders/by-commissioned-element/{elementGUID}") - public RelatedElementListResponse getStakeholders(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String elementGUID, - @RequestParam int startFrom, - @RequestParam int pageSize) + public RelatedElementsResponse getStakeholders(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String elementGUID, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getStakeholders(serverName, userId, elementGUID, startFrom, pageSize); } @@ -557,11 +552,11 @@ public RelatedElementListResponse getStakeholders(@PathVariable String serverNa */ @GetMapping(path = "/related-elements/stakeholders/by-stakeholder/{stakeholderGUID}") - public RelatedElementListResponse getStakeholderCommissionedElements(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String stakeholderGUID, - @RequestParam int startFrom, - @RequestParam int pageSize) + public RelatedElementsResponse getStakeholderCommissionedElements(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String stakeholderGUID, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getStakeholderCommissionedElements(serverName, userId, stakeholderGUID, startFrom, pageSize); } @@ -635,11 +630,11 @@ public VoidResponse clearAssignmentScope(@PathVariable String */ @GetMapping(path = "/related-elements/assignment-scopes/by-assigned-actor/{elementGUID}") - public RelatedElementListResponse getAssignedScopes(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String elementGUID, - @RequestParam int startFrom, - @RequestParam int pageSize) + public RelatedElementsResponse getAssignedScopes(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String elementGUID, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getAssignedScopes(serverName, userId, elementGUID, startFrom, pageSize); } @@ -661,11 +656,11 @@ public RelatedElementListResponse getAssignedScopes(@PathVariable String server */ @GetMapping(path = "/related-elements/assignment-scopes/by-assigned-scope/{scopeGUID}") - public RelatedElementListResponse getAssignedActors(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String scopeGUID, - @RequestParam int startFrom, - @RequestParam int pageSize) + public RelatedElementsResponse getAssignedActors(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String scopeGUID, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getAssignedActors(serverName, userId, scopeGUID, startFrom, pageSize); } @@ -739,11 +734,11 @@ public VoidResponse clearResource(@PathVariable String server */ @GetMapping(path = "/related-elements/resource-list/by-assignee/{elementGUID}") - public RelatedElementListResponse getResourceList(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String elementGUID, - @RequestParam int startFrom, - @RequestParam int pageSize) + public RelatedElementsResponse getResourceList(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String elementGUID, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getResourceList(serverName, userId, elementGUID, startFrom, pageSize); } @@ -765,11 +760,11 @@ public RelatedElementListResponse getResourceList(@PathVariable String serverNa */ @GetMapping(path = "/related-elements/resource-list/by-resource/{resourceGUID}") - public RelatedElementListResponse getSupportedByResource(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String resourceGUID, - @RequestParam int startFrom, - @RequestParam int pageSize) + public RelatedElementsResponse getSupportedByResource(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String resourceGUID, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getSupportedByResource(serverName, userId, resourceGUID, startFrom, pageSize); } diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-spring/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/spring/GovernanceReviewResource.java b/open-metadata-implementation/access-services/governance-program/governance-program-spring/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/spring/GovernanceReviewResource.java index e6044110818..a7857edfc47 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-spring/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/spring/GovernanceReviewResource.java +++ b/open-metadata-implementation/access-services/governance-program/governance-program-spring/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/spring/GovernanceReviewResource.java @@ -5,13 +5,8 @@ import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.ElementStubListResponse; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.GovernanceDefinitionGraphResponse; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.GovernanceDefinitionListResponse; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.GovernanceDefinitionResponse; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.GovernanceMetricImplementationListResponse; import org.odpi.openmetadata.accessservices.governanceprogram.server.GovernanceReviewRESTServices; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; @@ -83,12 +78,12 @@ public GovernanceDefinitionResponse getGovernanceDefinitionByGUID(@PathVariable */ @GetMapping(path = "/review/governance-definitions/{typeName}/for-domain") - public GovernanceDefinitionListResponse getGovernanceDefinitionsForDomain(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String typeName, - @RequestParam int domainIdentifier, - @RequestParam int startFrom, - @RequestParam int pageSize) + public GovernanceDefinitionsResponse getGovernanceDefinitionsForDomain(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String typeName, + @RequestParam int domainIdentifier, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getGovernanceDefinitionsForDomain(serverName, userId, typeName, domainIdentifier, startFrom, pageSize); } @@ -111,12 +106,12 @@ public GovernanceDefinitionListResponse getGovernanceDefinitionsForDomain(@PathV */ @GetMapping(path = "/review/governance-definitions/{typeName}/for-document-id/{docId}") - public GovernanceDefinitionListResponse getGovernanceDefinitionsForDocId(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String typeName, - @PathVariable String docId, - @RequestParam int startFrom, - @RequestParam int pageSize) + public GovernanceDefinitionsResponse getGovernanceDefinitionsForDocId(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String typeName, + @PathVariable String docId, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getGovernanceDefinitionsForDocId(serverName, userId, typeName, docId, startFrom, pageSize); } @@ -161,12 +156,12 @@ public GovernanceDefinitionGraphResponse getGovernanceDefinitionInContext(@PathV */ @PostMapping(path = "/review/governance-definitions/{typeName}/by-search-string") - public GovernanceDefinitionListResponse findGovernanceDefinitions(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String typeName, - @RequestParam int startFrom, - @RequestParam int pageSize, - @RequestBody SearchStringRequestBody requestBody) + public GovernanceDefinitionsResponse findGovernanceDefinitions(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String typeName, + @RequestParam int startFrom, + @RequestParam int pageSize, + @RequestBody SearchStringRequestBody requestBody) { return restAPI.findGovernanceDefinitions(serverName, userId, typeName, startFrom, pageSize, requestBody); } @@ -188,11 +183,11 @@ public GovernanceDefinitionListResponse findGovernanceDefinitions(@PathVariable */ @GetMapping(path = "/review/governance-definitions/{governanceDefinitionGUID}/metrics-implementation") - public GovernanceMetricImplementationListResponse getGovernanceDefinitionMetrics(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String governanceDefinitionGUID, - @RequestParam int startFrom, - @RequestParam int pageSize) + public GovernanceMetricImplementationsResponse getGovernanceDefinitionMetrics(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String governanceDefinitionGUID, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getGovernanceDefinitionMetrics(serverName, userId, governanceDefinitionGUID, startFrom, pageSize); } @@ -215,12 +210,12 @@ public GovernanceMetricImplementationListResponse getGovernanceDefinitionMetrics */ @GetMapping(path = "/review/governance-zones/{zoneName}/members/{subTypeName}") - public ElementStubListResponse getGovernanceZoneMembers(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String zoneName, - @PathVariable String subTypeName, - @RequestParam int startFrom, - @RequestParam int pageSize) + public ElementStubsResponse getGovernanceZoneMembers(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String zoneName, + @PathVariable String subTypeName, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getGovernanceZoneMembers(serverName, userId, zoneName, subTypeName, startFrom, pageSize); } diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-spring/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/spring/GovernanceRolesResource.java b/open-metadata-implementation/access-services/governance-program/governance-program-spring/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/spring/GovernanceRolesResource.java index 6c16feab954..6b66ddc70c7 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-spring/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/spring/GovernanceRolesResource.java +++ b/open-metadata-implementation/access-services/governance-program/governance-program-spring/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/spring/GovernanceRolesResource.java @@ -4,10 +4,8 @@ import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.*; import org.odpi.openmetadata.accessservices.governanceprogram.server.GovernanceRolesRESTServices; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.springframework.web.bind.annotation.*; /** @@ -281,9 +279,9 @@ public GovernanceRoleHistoryResponse getGovernanceRoleHistoryByGUID(@PathVariabl */ @GetMapping(path = "/governance-roles/by-role-id/{roleId}") - public GovernanceRoleListResponse getGovernanceRoleByRoleId(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String roleId) + public GovernanceRolesResponse getGovernanceRoleByRoleId(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String roleId) { return restAPI.getGovernanceRoleByRoleId(serverName, userId, roleId); } @@ -298,18 +296,17 @@ public GovernanceRoleListResponse getGovernanceRoleByRoleId(@PathVariable String * @param startFrom where to start from in the list of definitions * @param pageSize max number of results to return in one call * @return list of governance role objects or - * * InvalidParameterException the guid is either null or invalid or * PropertyServerException the server is not available or * UserNotAuthorizedException the calling user is not authorized to issue the call. */ @GetMapping(path = "/governance-roles/by-domain/{domainIdentifier}") - public GovernanceRoleListResponse getGovernanceRolesByDomainId(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable int domainIdentifier, - @RequestParam int startFrom, - @RequestParam int pageSize) + public GovernanceRolesResponse getGovernanceRolesByDomainId(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable int domainIdentifier, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getGovernanceRolesByDomainId(serverName, userId, domainIdentifier, startFrom, pageSize); } @@ -331,11 +328,11 @@ public GovernanceRoleListResponse getGovernanceRolesByDomainId(@PathVariable St */ @GetMapping(path = "/governance-roles/by-title/{title}") - public GovernanceRoleListResponse getGovernanceRolesByTitle(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String title, - @RequestParam int startFrom, - @RequestParam int pageSize) + public GovernanceRolesResponse getGovernanceRolesByTitle(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String title, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getGovernanceRolesByTitle(serverName, userId, title, startFrom, pageSize); } @@ -356,11 +353,11 @@ public GovernanceRoleListResponse getGovernanceRolesByTitle(@PathVariable Strin */ @GetMapping(path = "/governance-roles/by-domain/{domainIdentifier}/current-appointments") - public GovernanceRoleAppointeeListResponse getCurrentGovernanceRoleAppointments(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable int domainIdentifier, - @RequestParam int startFrom, - @RequestParam int pageSize) + public GovernanceRoleAppointeesResponse getCurrentGovernanceRoleAppointments(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable int domainIdentifier, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getCurrentGovernanceRoleAppointments(serverName, userId, domainIdentifier, startFrom, pageSize); } @@ -372,20 +369,22 @@ public GovernanceRoleAppointeeListResponse getCurrentGovernanceRoleAppointments( * @param serverName name of server instance to call * @param userId the name of the calling user. * @param governanceRoleGUID unique identifier (guid) of the governance role. + * @param profileGUID unique identifier of the actor profile * @param requestBody unique identifier for the profile and start date. * @return unique identifier (guid) of the appointment relationship or * UnrecognizedGUIDException the unique identifier of the governance role or profile is either null or invalid or * PropertyServerException the server is not available or * UserNotAuthorizedException the calling user is not authorized to issue the call. */ - @PostMapping(path = "/governance-roles/{governanceRoleGUID}/appoint") + @PostMapping(path = "/governance-roles/{governanceRoleGUID}/appoint/{profileGUID}") public GUIDResponse appointGovernanceRole(@PathVariable String serverName, @PathVariable String userId, @PathVariable String governanceRoleGUID, + @PathVariable String profileGUID, @RequestBody AppointmentRequestBody requestBody) { - return restAPI.appointGovernanceRole(serverName, userId, governanceRoleGUID, requestBody); + return restAPI.appointGovernanceRole(serverName, userId, governanceRoleGUID, profileGUID, requestBody); } @@ -403,14 +402,15 @@ public GUIDResponse appointGovernanceRole(@PathVariable String * PropertyServerException the server is not available or * UserNotAuthorizedException the calling user is not authorized to issue the call. */ - @PostMapping(path = "/governance-roles/{governanceRoleGUID}/relieve/{appointmentGUID}") + @PostMapping(path = "/governance-roles/{governanceRoleGUID}/relieve/{appointmentGUID}/{profileGUID}") public VoidResponse relieveGovernanceRole(@PathVariable String serverName, @PathVariable String userId, @PathVariable String governanceRoleGUID, @PathVariable String appointmentGUID, + @PathVariable String profileGUID, @RequestBody AppointmentRequestBody requestBody) { - return restAPI.relieveGovernanceRole(serverName, userId, governanceRoleGUID, appointmentGUID, requestBody); + return restAPI.relieveGovernanceRole(serverName, userId, governanceRoleGUID, appointmentGUID, profileGUID, requestBody); } } diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-spring/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/spring/GovernanceZonesResource.java b/open-metadata-implementation/access-services/governance-program/governance-program-spring/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/spring/GovernanceZonesResource.java index 87d12eca400..c0539f1dacb 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-spring/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/spring/GovernanceZonesResource.java +++ b/open-metadata-implementation/access-services/governance-program/governance-program-spring/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/spring/GovernanceZonesResource.java @@ -4,14 +4,8 @@ import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.ExternalSourceRequestBody; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.GovernanceZoneDefinitionResponse; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.GovernanceZoneListResponse; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.GovernanceZoneResponse; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.ReferenceableRequestBody; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.RelationshipRequestBody; import org.odpi.openmetadata.accessservices.governanceprogram.server.GovernanceZoneRESTServices; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; import org.springframework.web.bind.annotation.*; @@ -59,7 +53,7 @@ public GovernanceZonesResource() public GUIDResponse createGovernanceZone(@PathVariable String serverName, @PathVariable String userId, - @RequestBody ReferenceableRequestBody requestBody) + @RequestBody ReferenceableRequestBody requestBody) { return restAPI.createGovernanceZone(serverName, userId, requestBody); } @@ -285,11 +279,11 @@ public GovernanceZoneResponse getGovernanceZoneByName(@PathVariable String serve */ @GetMapping(path = "/governance-zones/for-domain") - public GovernanceZoneListResponse getGovernanceZonesForDomain(@PathVariable String serverName, - @PathVariable String userId, - @RequestParam int domainIdentifier, - @RequestParam int startFrom, - @RequestParam int pageSize) + public GovernanceZonesResponse getGovernanceZonesForDomain(@PathVariable String serverName, + @PathVariable String userId, + @RequestParam int domainIdentifier, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getGovernanceZonesForDomain(serverName, userId, domainIdentifier, startFrom, pageSize); } diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-spring/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/spring/SubjectAreaResource.java b/open-metadata-implementation/access-services/governance-program/governance-program-spring/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/spring/SubjectAreaResource.java index 4caca43c90f..bd6456355fb 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-spring/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/spring/SubjectAreaResource.java +++ b/open-metadata-implementation/access-services/governance-program/governance-program-spring/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/server/spring/SubjectAreaResource.java @@ -4,18 +4,8 @@ import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.ClassificationRequestBody; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.ElementStubListResponse; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.ExternalSourceRequestBody; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.ReferenceableRequestBody; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.RelatedElementListResponse; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.RelationshipRequestBody; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.SubjectAreaDefinitionResponse; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.SubjectAreaListResponse; -import org.odpi.openmetadata.accessservices.governanceprogram.rest.SubjectAreaResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.odpi.openmetadata.accessservices.governanceprogram.server.SubjectAreaRESTServices; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; import org.springframework.web.bind.annotation.*; @@ -285,11 +275,11 @@ public SubjectAreaResponse getSubjectAreaByName(@PathVariable String serverName, */ @GetMapping(path = "/subject-areas/for-domain") - public SubjectAreaListResponse getSubjectAreasForDomain(@PathVariable String serverName, - @PathVariable String userId, - @RequestParam int domainIdentifier, - @RequestParam int startFrom, - @RequestParam int pageSize) + public SubjectAreasResponse getSubjectAreasForDomain(@PathVariable String serverName, + @PathVariable String userId, + @RequestParam int domainIdentifier, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getSubjectAreasForDomain(serverName, userId, domainIdentifier, startFrom, pageSize); } @@ -381,11 +371,11 @@ public VoidResponse deleteSubjectAreaMemberClassification(@PathVariable String */ @GetMapping(path = "/subject-areas/{subjectAreaName}/members") - public ElementStubListResponse getMembersOfSubjectArea(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String subjectAreaName, - @RequestParam int startFrom, - @RequestParam int pageSize) + public ElementStubsResponse getMembersOfSubjectArea(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String subjectAreaName, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getMembersOfSubjectArea(serverName, userId, subjectAreaName, startFrom, pageSize); } diff --git a/open-metadata-implementation/access-services/governance-server/governance-server-client/build.gradle b/open-metadata-implementation/access-services/governance-server/governance-server-client/build.gradle index e4876707116..fbf6de5f4fa 100644 --- a/open-metadata-implementation/access-services/governance-server/governance-server-client/build.gradle +++ b/open-metadata-implementation/access-services/governance-server/governance-server-client/build.gradle @@ -18,6 +18,7 @@ dependencies { implementation project(':open-metadata-implementation:common-services:ffdc-services') implementation project(':open-metadata-implementation:repository-services:repository-services-apis') implementation project(':open-metadata-implementation:admin-services:admin-services-api') + implementation project(':open-metadata-implementation:frameworks:open-metadata-framework') implementation project(':open-metadata-implementation:frameworks:open-connector-framework') implementation project(':open-metadata-implementation:frameworks:open-integration-framework') implementation project(':open-metadata-implementation:frameworks:governance-action-framework') diff --git a/open-metadata-implementation/access-services/governance-server/governance-server-server/src/main/java/org/odpi/openmetadata/accessservices/governanceserver/server/GovernanceServerRESTServices.java b/open-metadata-implementation/access-services/governance-server/governance-server-server/src/main/java/org/odpi/openmetadata/accessservices/governanceserver/server/GovernanceServerRESTServices.java index f9b37ac353b..ddfd7e06bce 100644 --- a/open-metadata-implementation/access-services/governance-server/governance-server-server/src/main/java/org/odpi/openmetadata/accessservices/governanceserver/server/GovernanceServerRESTServices.java +++ b/open-metadata-implementation/access-services/governance-server/governance-server-server/src/main/java/org/odpi/openmetadata/accessservices/governanceserver/server/GovernanceServerRESTServices.java @@ -6,7 +6,7 @@ import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; -import org.odpi.openmetadata.commonservices.ffdc.rest.ConnectionResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.OCFConnectionResponse; import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.slf4j.LoggerFactory; @@ -46,16 +46,16 @@ public GovernanceServerRESTServices() * UserNotAuthorizedException user not authorized to issue this request or * PropertyServerException problem retrieving the Governance Server definition. */ - public ConnectionResponse getOutTopicConnection(String serverName, - String userId, - String callerId) + public OCFConnectionResponse getOutTopicConnection(String serverName, + String userId, + String callerId) { final String methodName = "getOutTopicConnection"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - ConnectionResponse response = new ConnectionResponse(); - AuditLog auditLog = null; + OCFConnectionResponse response = new OCFConnectionResponse(); + AuditLog auditLog = null; try { diff --git a/open-metadata-implementation/access-services/governance-server/governance-server-spring/src/main/java/org/odpi/openmetadata/accessservices/governanceserver/server/spring/GovernanceServerOMASResource.java b/open-metadata-implementation/access-services/governance-server/governance-server-spring/src/main/java/org/odpi/openmetadata/accessservices/governanceserver/server/spring/GovernanceServerOMASResource.java index a9df289ac46..440d10799c7 100644 --- a/open-metadata-implementation/access-services/governance-server/governance-server-spring/src/main/java/org/odpi/openmetadata/accessservices/governanceserver/server/spring/GovernanceServerOMASResource.java +++ b/open-metadata-implementation/access-services/governance-server/governance-server-spring/src/main/java/org/odpi/openmetadata/accessservices/governanceserver/server/spring/GovernanceServerOMASResource.java @@ -44,9 +44,9 @@ public class GovernanceServerOMASResource externalDocs=@ExternalDocumentation(description="Further Information", url="https://egeria-project.org/concepts/out-topic/")) - public ConnectionResponse getOutTopicConnection(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String callerId) + public OCFConnectionResponse getOutTopicConnection(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String callerId) { return restAPI.getOutTopicConnection(serverName, userId, callerId); } diff --git a/open-metadata-implementation/access-services/governance-server/governance-server-topic-connectors/build.gradle b/open-metadata-implementation/access-services/governance-server/governance-server-topic-connectors/build.gradle index a11f83fec83..f4ea9becc1a 100644 --- a/open-metadata-implementation/access-services/governance-server/governance-server-topic-connectors/build.gradle +++ b/open-metadata-implementation/access-services/governance-server/governance-server-topic-connectors/build.gradle @@ -6,6 +6,7 @@ dependencies { implementation project(':open-metadata-implementation:frameworks:audit-log-framework') + implementation project(':open-metadata-implementation:frameworks:open-metadata-framework') implementation project(':open-metadata-implementation:frameworks:open-connector-framework') implementation project(':open-metadata-implementation:frameworks:governance-action-framework') implementation project(':open-metadata-implementation:repository-services:repository-services-apis') diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/api/ConnectionsManagerInterface.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/api/ConnectionsManagerInterface.java index c05fe9a7d1b..1a82da1c023 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/api/ConnectionsManagerInterface.java +++ b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/api/ConnectionsManagerInterface.java @@ -3,8 +3,8 @@ package org.odpi.openmetadata.accessservices.itinfrastructure.api; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.ConnectionElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.ConnectionProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ConnectionElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.ConnectionProperties; import org.odpi.openmetadata.accessservices.itinfrastructure.properties.TemplateProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/api/ConnectorTypeManagerInterface.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/api/ConnectorTypeManagerInterface.java index dc27bd595c2..57c69348f31 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/api/ConnectorTypeManagerInterface.java +++ b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/api/ConnectorTypeManagerInterface.java @@ -3,8 +3,8 @@ package org.odpi.openmetadata.accessservices.itinfrastructure.api; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.ConnectorTypeElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.ConnectorTypeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ConnectorTypeElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.ConnectorTypeProperties; import org.odpi.openmetadata.accessservices.itinfrastructure.properties.TemplateProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/api/DataAssetManagerInterface.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/api/DataAssetManagerInterface.java index 84414b894d9..f8d5124aa9a 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/api/DataAssetManagerInterface.java +++ b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/api/DataAssetManagerInterface.java @@ -4,8 +4,8 @@ -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.DataAssetElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.DataAssetProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.DataAssetElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.DataAssetProperties; import org.odpi.openmetadata.accessservices.itinfrastructure.properties.TemplateProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/api/DeploymentManagementInterface.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/api/DeploymentManagementInterface.java index 65911f6f105..58fa8064a36 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/api/DeploymentManagementInterface.java +++ b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/api/DeploymentManagementInterface.java @@ -2,9 +2,8 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.itinfrastructure.api; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.DeployedCapabilityElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.DeploymentElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.DeploymentProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.DeploymentElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.infrastructure.DeploymentProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/api/EndpointManagerInterface.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/api/EndpointManagerInterface.java index 1c4aa033897..98c06045bac 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/api/EndpointManagerInterface.java +++ b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/api/EndpointManagerInterface.java @@ -2,8 +2,8 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.itinfrastructure.api; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.EndpointElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.EndpointProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.EndpointElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.EndpointProperties; import org.odpi.openmetadata.accessservices.itinfrastructure.properties.TemplateProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/api/HostManagerInterface.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/api/HostManagerInterface.java index 51f9033d4b6..a359ee8a4fa 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/api/HostManagerInterface.java +++ b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/api/HostManagerInterface.java @@ -2,8 +2,8 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.itinfrastructure.api; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.HostElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.HostProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.HostElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.infrastructure.HostProperties; import org.odpi.openmetadata.accessservices.itinfrastructure.properties.TemplateProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/api/ITProfileManagerInterface.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/api/ITProfileManagerInterface.java index 8f2116dc836..a45fa4fa60e 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/api/ITProfileManagerInterface.java +++ b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/api/ITProfileManagerInterface.java @@ -2,12 +2,13 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.itinfrastructure.api; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.ITProfileElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.UserIdentityElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.ContactMethodProperties; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.ITProfileProperties; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.ProfileIdentityProperties; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.UserIdentityProperties; + +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ITProfileElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.UserIdentityElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.ContactMethodProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.ITProfileProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.ProfileIdentityProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.UserIdentityProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/api/ProcessManagerInterface.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/api/ProcessManagerInterface.java index 64c62fd4b91..c916de08b76 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/api/ProcessManagerInterface.java +++ b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/api/ProcessManagerInterface.java @@ -2,18 +2,14 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.itinfrastructure.api; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.ControlFlowElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.DataFlowElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.LineageMappingElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.ProcessCallElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.ProcessElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.ControlFlowProperties; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.DataFlowProperties; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.LineageMappingProperties; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.ProcessCallProperties; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ProcessStatus; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.lineage.ControlFlowProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.lineage.DataFlowProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.lineage.LineageMappingProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.lineage.ProcessCallProperties; import org.odpi.openmetadata.frameworks.openmetadata.enums.ProcessContainmentType; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.ProcessProperties; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.ProcessStatus; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.processes.ProcessProperties; import org.odpi.openmetadata.accessservices.itinfrastructure.properties.TemplateProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/api/SoftwareCapabilityManagerInterface.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/api/SoftwareCapabilityManagerInterface.java index b2a5811dd8c..10640f23eae 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/api/SoftwareCapabilityManagerInterface.java +++ b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/api/SoftwareCapabilityManagerInterface.java @@ -2,13 +2,13 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.itinfrastructure.api; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.RelatedAssetElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.ServerAssetUseElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.SoftwareCapabilityElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.CapabilityDeploymentProperties; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.ServerAssetUseProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.RelatedAssetElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ServerAssetUseElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.SoftwareCapabilityElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities.CapabilityDeploymentProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.infrastructure.ServerAssetUseProperties; import org.odpi.openmetadata.frameworks.openmetadata.enums.ServerAssetUseType; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.SoftwareCapabilityProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities.SoftwareCapabilityProperties; import org.odpi.openmetadata.accessservices.itinfrastructure.properties.TemplateProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/api/SoftwareServerCapabilityManagerInterface.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/api/SoftwareServerCapabilityManagerInterface.java index 16e350835c6..b48f6b4427d 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/api/SoftwareServerCapabilityManagerInterface.java +++ b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/api/SoftwareServerCapabilityManagerInterface.java @@ -2,8 +2,8 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.itinfrastructure.api; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.SoftwareServerCapabilityElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.SoftwareServerCapabilityProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.SoftwareServerCapabilityElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities.SoftwareServerCapabilityProperties; import org.odpi.openmetadata.accessservices.itinfrastructure.properties.TemplateProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/api/SoftwareServerManagerInterface.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/api/SoftwareServerManagerInterface.java index 75941399f73..eba86081ad9 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/api/SoftwareServerManagerInterface.java +++ b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/api/SoftwareServerManagerInterface.java @@ -2,11 +2,8 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.itinfrastructure.api; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.SoftwareServerElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.DeployedCapabilityElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.SoftwareServerPlatformElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.DeploymentProperties; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.SoftwareServerProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.SoftwareServerElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.infrastructure.SoftwareServerProperties; import org.odpi.openmetadata.accessservices.itinfrastructure.properties.TemplateProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/api/SoftwareServerPlatformManagerInterface.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/api/SoftwareServerPlatformManagerInterface.java index e79700a80cd..407f13cbfc5 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/api/SoftwareServerPlatformManagerInterface.java +++ b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/api/SoftwareServerPlatformManagerInterface.java @@ -2,10 +2,8 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.itinfrastructure.api; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.DeploymentElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.SoftwareServerPlatformElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.PlatformDeploymentProperties; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.SoftwareServerPlatformProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.SoftwareServerPlatformElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.infrastructure.SoftwareServerPlatformProperties; import org.odpi.openmetadata.accessservices.itinfrastructure.properties.TemplateProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/events/ITInfrastructureOutTopicEvent.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/events/ITInfrastructureOutTopicEvent.java index 226803d4b90..53858ca9cf7 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/events/ITInfrastructureOutTopicEvent.java +++ b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/events/ITInfrastructureOutTopicEvent.java @@ -5,7 +5,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; import java.util.Date; import java.util.Map; diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/AssetElement.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/AssetElement.java deleted file mode 100644 index 0de449661c7..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/AssetElement.java +++ /dev/null @@ -1,147 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.AssetProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * AssetElement contains the properties and header for an asset retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class AssetElement implements MetadataElement -{ - private AssetProperties properties = null; - private ElementHeader elementHeader = null; - - - /** - * Default constructor - */ - public AssetElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public AssetElement(AssetElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - properties = template.getProperties(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - @Override - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the properties for the asset. - * - * @return asset properties (using appropriate subclass) - */ - public AssetProperties getProperties() - { - return properties; - } - - - /** - * Set up the properties for the asset. - * - * @param properties asset properties - */ - public void setProperties(AssetProperties properties) - { - this.properties = properties; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "AssetElement{" + - "properties=" + properties + - ", elementHeader=" + elementHeader + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - AssetElement that = (AssetElement) objectToCompare; - return Objects.equals(getProperties(), that.getProperties()) && - Objects.equals(getElementHeader(), that.getElementHeader()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementHeader, properties); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/ConnectionElement.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/ConnectionElement.java deleted file mode 100644 index 2f2cb9e3244..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/ConnectionElement.java +++ /dev/null @@ -1,238 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.ConnectionProperties; - -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; - -/** - * ConnectionElement contains the properties and header for a connection retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ConnectionElement implements MetadataElement -{ - private ConnectionProperties connectionProperties = null; - private ElementHeader elementHeader = null; - private ElementStub connectorType = null; - private ElementStub endpoint = null; - private List embeddedConnections = null; - - - /** - * Default constructor - */ - public ConnectionElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ConnectionElement(ConnectionElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - connectionProperties = template.getConnectionProperties(); - connectorType = template.getConnectorType(); - endpoint = template.getEndpoint(); - embeddedConnections = template.getEmbeddedConnections(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - @Override - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the properties for the connection. - * - * @return asset properties (using appropriate subclass) - */ - public ConnectionProperties getConnectionProperties() - { - return connectionProperties; - } - - - /** - * Set up the properties for the connection. - * - * @param connectionProperties asset properties - */ - public void setConnectionProperties(ConnectionProperties connectionProperties) - { - this.connectionProperties = connectionProperties; - } - - - /** - * Set up the connector type properties for this Connection. - * - * @param connectorType ConnectorType properties object - */ - public void setConnectorType(ElementStub connectorType) - { - this.connectorType = connectorType; - } - - - /** - * Returns a copy of the properties for this connection's connector type. - * A null means there is no connection type. - * - * @return connector type for the connection - */ - public ElementStub getConnectorType() - { - return connectorType; - } - - - /** - * Set up the endpoint properties for this Connection. - * - * @param endpoint Endpoint properties object - */ - public void setEndpoint(ElementStub endpoint) - { - this.endpoint = endpoint; - } - - - /** - * Returns a copy of the properties for this connection's endpoint. - * Null means no endpoint information available. - * - * @return endpoint for the connection - */ - public ElementStub getEndpoint() - { - return endpoint; - } - - - /** - * Return the list of embedded connections for this virtual connection. - * - * @return list of EmbeddedConnection objects - */ - public List getEmbeddedConnections() - { - if (embeddedConnections == null) - { - return null; - } - else if (embeddedConnections.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(embeddedConnections); - } - } - - - /** - * Set up the list of embedded connections for this virtual connection. - * - * @param embeddedConnections list of EmbeddedConnection objects - */ - public void setEmbeddedConnections(List embeddedConnections) - { - this.embeddedConnections = embeddedConnections; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ConnectionElement{" + - "connectionProperties=" + connectionProperties + - ", elementHeader=" + elementHeader + - ", connectorType=" + connectorType + - ", endpoint=" + endpoint + - ", embeddedConnections=" + embeddedConnections + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ConnectionElement that = (ConnectionElement) objectToCompare; - return Objects.equals(getConnectionProperties(), that.getConnectionProperties()) && - Objects.equals(getElementHeader(), that.getElementHeader()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementHeader, connectionProperties); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/ConnectorTypeElement.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/ConnectorTypeElement.java deleted file mode 100644 index 9c1fc931084..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/ConnectorTypeElement.java +++ /dev/null @@ -1,148 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.ConnectorTypeProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * ConnectorTypeElement contains the properties and header for a connector type retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ConnectorTypeElement implements MetadataElement -{ - private ConnectorTypeProperties connectorTypeProperties = null; - private ElementHeader elementHeader = null; - - - /** - * Default constructor - */ - public ConnectorTypeElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ConnectorTypeElement(ConnectorTypeElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - connectorTypeProperties = template.getConnectorTypeProperties(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - @Override - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - - /** - * Return the properties for the connector type. - * - * @return asset properties (using appropriate subclass) - */ - public ConnectorTypeProperties getConnectorTypeProperties() - { - return connectorTypeProperties; - } - - - /** - * Set up the properties for the connector type. - * - * @param connectorTypeProperties asset properties - */ - public void setConnectorTypeProperties(ConnectorTypeProperties connectorTypeProperties) - { - this.connectorTypeProperties = connectorTypeProperties; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ConnectorTypeElement{" + - "connectorTypeProperties=" + connectorTypeProperties + - ", elementHeader=" + elementHeader + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ConnectorTypeElement that = (ConnectorTypeElement) objectToCompare; - return Objects.equals(getConnectorTypeProperties(), that.getConnectorTypeProperties()) && - Objects.equals(getElementHeader(), that.getElementHeader()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementHeader, connectorTypeProperties); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/ContactMethodElement.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/ContactMethodElement.java deleted file mode 100644 index 241fae31116..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/ContactMethodElement.java +++ /dev/null @@ -1,147 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.ContactMethodProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * ContactMethodElement contains the properties and header for a contract method retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ContactMethodElement implements MetadataElement -{ - private ElementHeader elementHeader = null; - private ContactMethodProperties properties = null; - - - /** - * Default constructor - */ - public ContactMethodElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ContactMethodElement(ContactMethodElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - properties = template.getProperties(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - @Override - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the properties of the contact method. - * - * @return properties - */ - public ContactMethodProperties getProperties() - { - return properties; - } - - - /** - * Set up the contract method properties. - * - * @param properties properties - */ - public void setProperties(ContactMethodProperties properties) - { - this.properties = properties; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ContactMethodElement{" + - "elementHeader=" + elementHeader + - ", properties=" + properties + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ContactMethodElement that = (ContactMethodElement) objectToCompare; - return Objects.equals(elementHeader, that.elementHeader) && - Objects.equals(properties, that.properties); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementHeader, properties); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/ControlFlowElement.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/ControlFlowElement.java deleted file mode 100644 index 167b434c645..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/ControlFlowElement.java +++ /dev/null @@ -1,197 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.ControlFlowProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * ControlFlowElement contains the properties and header for a control flow relationship retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ControlFlowElement -{ - private ElementHeader controlFlowHeader = null; - private ControlFlowProperties controlFlowProperties = null; - private ElementHeader currentStep = null; - private ElementHeader nextStep = null; - - /** - * Default constructor - */ - public ControlFlowElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ControlFlowElement(ControlFlowElement template) - { - if (template != null) - { - controlFlowHeader = template.getControlFlowHeader(); - controlFlowProperties = template.getControlFlowProperties(); - currentStep = template.getCurrentStep(); - nextStep = template.getNextStep(); - } - } - - - /** - * Return the element header associated with the relationship. - * - * @return element header object - */ - public ElementHeader getControlFlowHeader() - { - return controlFlowHeader; - } - - - /** - * Set up the element header associated with the relationship. - * - * @param controlFlowHeader element header object - */ - public void setControlFlowHeader(ElementHeader controlFlowHeader) - { - this.controlFlowHeader = controlFlowHeader; - } - - - /** - * Return details of the relationship - * - * @return relationship properties - */ - public ControlFlowProperties getControlFlowProperties() - { - return controlFlowProperties; - } - - - /** - * Set up relationship properties - * - * @param controlFlowProperties relationship properties - */ - public void setControlFlowProperties(ControlFlowProperties controlFlowProperties) - { - this.controlFlowProperties = controlFlowProperties; - } - - - /** - * Return the element header associated with end 1 of the relationship. - * - * @return element header object - */ - public ElementHeader getCurrentStep() - { - return currentStep; - } - - - /** - * Set up the element header associated with end 1 of the relationship. - * - * @param currentStep element header object - */ - public void setCurrentStep(ElementHeader currentStep) - { - this.currentStep = currentStep; - } - - - - /** - * Return the element header associated with end 2 of the relationship. - * - * @return element header object - */ - public ElementHeader getNextStep() - { - return nextStep; - } - - - /** - * Set up the element header associated with end 2 of the relationship. - * - * @param nextStep element header object - */ - public void setNextStep(ElementHeader nextStep) - { - this.nextStep = nextStep; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ControlFlowElement{" + - "controlFlowHeader=" + controlFlowHeader + - ", controlFlowProperties=" + controlFlowProperties + - ", currentStep=" + currentStep + - ", nextStep=" + nextStep + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ControlFlowElement that = (ControlFlowElement) objectToCompare; - return Objects.equals(getControlFlowHeader(), that.getControlFlowHeader()) && - Objects.equals(getControlFlowProperties(), that.getControlFlowProperties()) && - Objects.equals(getCurrentStep(), that.getCurrentStep()) && - Objects.equals(getNextStep(), that.getNextStep()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), controlFlowHeader, controlFlowProperties, currentStep, nextStep); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/DataFlowElement.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/DataFlowElement.java deleted file mode 100644 index 6694a70f963..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/DataFlowElement.java +++ /dev/null @@ -1,197 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.DataFlowProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * DataFlowElement contains the properties and header for a data flow relationship retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class DataFlowElement -{ - private ElementHeader dataFlowHeader = null; - private DataFlowProperties dataFlowProperties = null; - private ElementHeader dataSupplier = null; - private ElementHeader dataConsumer = null; - - /** - * Default constructor - */ - public DataFlowElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public DataFlowElement(DataFlowElement template) - { - if (template != null) - { - dataFlowHeader = template.getDataFlowHeader(); - dataFlowProperties = template.getDataFlowProperties(); - dataSupplier = template.getDataSupplier(); - dataConsumer = template.getDataConsumer(); - } - } - - - /** - * Return the element header associated with the relationship. - * - * @return element header object - */ - public ElementHeader getDataFlowHeader() - { - return dataFlowHeader; - } - - - /** - * Set up the element header associated with the relationship. - * - * @param dataFlowHeader element header object - */ - public void setDataFlowHeader(ElementHeader dataFlowHeader) - { - this.dataFlowHeader = dataFlowHeader; - } - - - /** - * Return details of the relationship - * - * @return relationship properties - */ - public DataFlowProperties getDataFlowProperties() - { - return dataFlowProperties; - } - - - /** - * Set up relationship properties - * - * @param dataFlowProperties relationship properties - */ - public void setDataFlowProperties(DataFlowProperties dataFlowProperties) - { - this.dataFlowProperties = dataFlowProperties; - } - - - /** - * Return the element header associated with end 1 of the relationship. - * - * @return element header object - */ - public ElementHeader getDataSupplier() - { - return dataSupplier; - } - - - /** - * Set up the element header associated with end 1 of the relationship. - * - * @param dataSupplier element header object - */ - public void setDataSupplier(ElementHeader dataSupplier) - { - this.dataSupplier = dataSupplier; - } - - - - /** - * Return the element header associated with end 2 of the relationship. - * - * @return element header object - */ - public ElementHeader getDataConsumer() - { - return dataConsumer; - } - - - /** - * Set up the element header associated with end 2 of the relationship. - * - * @param dataConsumer element header object - */ - public void setDataConsumer(ElementHeader dataConsumer) - { - this.dataConsumer = dataConsumer; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "DataFlowElement{" + - "dataFlowHeader=" + dataFlowHeader + - ", dataFlowProperties=" + dataFlowProperties + - ", dataSupplier=" + dataSupplier + - ", dataConsumer=" + dataConsumer + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - DataFlowElement that = (DataFlowElement) objectToCompare; - return Objects.equals(getDataFlowHeader(), that.getDataFlowHeader()) && - Objects.equals(getDataFlowProperties(), that.getDataFlowProperties()) && - Objects.equals(getDataSupplier(), that.getDataSupplier()) && - Objects.equals(getDataConsumer(), that.getDataConsumer()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), dataFlowHeader, dataFlowProperties, dataSupplier, dataConsumer); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/EmbeddedConnection.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/EmbeddedConnection.java deleted file mode 100644 index e2a4c173a48..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/EmbeddedConnection.java +++ /dev/null @@ -1,212 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; - -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * The EmbeddedConnection is used within a VirtualConnection to link to the embedded connections. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class EmbeddedConnection -{ - /* - * Attributes of an embedded connection - */ - protected int position = 0; - protected String displayName = null; - protected Map arguments = null; - protected ElementStub embeddedConnection = null; - - - /** - * Default constructor - */ - public EmbeddedConnection() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template element to copy - */ - public EmbeddedConnection(EmbeddedConnection template) - { - if (template != null) - { - position = template.getPosition(); - displayName = template.getDisplayName(); - arguments = template.getArguments(); - embeddedConnection = template.getEmbeddedConnection(); - } - } - - - /** - * Return the position that this connector is in the list of embedded connectors. - * - * @return int - */ - public int getPosition() - { - return position; - } - - - /** - * Set up the position that this connector is in the list of embedded connectors. - * - * @param position int - */ - public void setPosition(int position) - { - this.position = position; - } - - - /** - * Return the printable name of the embedded connection. - * - * @return String name - */ - public String getDisplayName() - { - return displayName; - } - - - /** - * Set up the printable name of the embedded connection. - * - * @param displayName String name - */ - public void setDisplayName(String displayName) - { - this.displayName = displayName; - } - - - /** - * Return the arguments for the embedded connection. - * - * @return property map - */ - public Map getArguments() - { - if (arguments == null) - { - return null; - } - else if (arguments.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(arguments); - } - } - - - /** - * Set up the arguments for the embedded connection. - * - * @param arguments property map - */ - public void setArguments(Map arguments) - { - this.arguments = arguments; - } - - - /** - * Return the embedded connection. - * - * @return header of Connection object. - */ - public ElementStub getEmbeddedConnection() - { - return embeddedConnection; - } - - - /** - * Set up the embedded connection - * - * @param embeddedConnection header of Connection object - */ - public void setEmbeddedConnection(ElementStub embeddedConnection) - { - this.embeddedConnection = embeddedConnection; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "EmbeddedConnection{" + - "position=" + position + - ", displayName='" + displayName + '\'' + - ", arguments=" + arguments + - ", embeddedConnection=" + embeddedConnection + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - EmbeddedConnection that = (EmbeddedConnection) objectToCompare; - return position == that.position && - Objects.equals(displayName, that.displayName) && - Objects.equals(arguments, that.arguments) && - Objects.equals(embeddedConnection, that.embeddedConnection); - } - - - /** - * Create a hash code for this element type. - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(position, displayName, arguments, embeddedConnection); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/EndpointElement.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/EndpointElement.java deleted file mode 100644 index 3c6307877b8..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/EndpointElement.java +++ /dev/null @@ -1,147 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.EndpointProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * EndpointElement contains the properties and header for an endpoint retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class EndpointElement implements MetadataElement -{ - private EndpointProperties endpointProperties = null; - private ElementHeader elementHeader = null; - - - /** - * Default constructor - */ - public EndpointElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public EndpointElement(EndpointElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - endpointProperties = template.getEndpointProperties(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - @Override - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the properties for the endpoint. - * - * @return asset properties (using appropriate subclass) - */ - public EndpointProperties getEndpointProperties() - { - return endpointProperties; - } - - - /** - * Set up the properties for the endpoint. - * - * @param endpointProperties asset properties - */ - public void setEndpointProperties(EndpointProperties endpointProperties) - { - this.endpointProperties = endpointProperties; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "EndpointElement{" + - "endpointProperties=" + endpointProperties + - ", elementHeader=" + elementHeader + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - EndpointElement that = (EndpointElement) objectToCompare; - return Objects.equals(getEndpointProperties(), that.getEndpointProperties()) && - Objects.equals(getElementHeader(), that.getElementHeader()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementHeader, endpointProperties); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/LineageMappingElement.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/LineageMappingElement.java deleted file mode 100644 index d8dcb68c8d7..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/LineageMappingElement.java +++ /dev/null @@ -1,170 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * LineageMappingElement contains the properties and header for a lineage mapping relationship retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class LineageMappingElement -{ - private ElementHeader lineageMappingHeader = null; - private ElementHeader sourceElement = null; - private ElementHeader targetElement = null; - - /** - * Default constructor - */ - public LineageMappingElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public LineageMappingElement(LineageMappingElement template) - { - if (template != null) - { - lineageMappingHeader = template.getLineageMappingHeader(); - sourceElement = template.getSourceElement(); - targetElement = template.getTargetElement(); - } - } - - - /** - * Return the element header associated with the relationship. - * - * @return element header object - */ - public ElementHeader getLineageMappingHeader() - { - return lineageMappingHeader; - } - - - /** - * Set up the element header associated with the relationship. - * - * @param lineageMappingHeader element header object - */ - public void setLineageMappingHeader(ElementHeader lineageMappingHeader) - { - this.lineageMappingHeader = lineageMappingHeader; - } - - - /** - * Return the element header associated with end 1 of the relationship. - * - * @return element header object - */ - public ElementHeader getSourceElement() - { - return sourceElement; - } - - - /** - * Set up the element header associated with end 1 of the relationship. - * - * @param sourceElement element header object - */ - public void setSourceElement(ElementHeader sourceElement) - { - this.sourceElement = sourceElement; - } - - - - /** - * Return the element header associated with end 2 of the relationship. - * - * @return element header object - */ - public ElementHeader getTargetElement() - { - return targetElement; - } - - - /** - * Set up the element header associated with end 2 of the relationship. - * - * @param targetElement element header object - */ - public void setTargetElement(ElementHeader targetElement) - { - this.targetElement = targetElement; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "LineageMappingElement{" + - "lineageMappingHeader=" + lineageMappingHeader + - ", sourceElement=" + sourceElement + - ", targetElement=" + targetElement + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - LineageMappingElement that = (LineageMappingElement) objectToCompare; - return Objects.equals(getLineageMappingHeader(), that.getLineageMappingHeader()) && - Objects.equals(getSourceElement(), that.getSourceElement()) && - Objects.equals(getTargetElement(), that.getTargetElement()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), lineageMappingHeader, sourceElement, targetElement); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/MetadataElement.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/MetadataElement.java deleted file mode 100644 index 207905aef8b..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/MetadataElement.java +++ /dev/null @@ -1,27 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * MetadataElement is the common interface for all metadata elements. It adds the header information that is stored with the properties. - * This includes detains of its unique identifier, type and origin. - */ -public interface MetadataElement -{ - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - ElementHeader getElementHeader(); - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - void setElementHeader(ElementHeader elementHeader); -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/ProcessCallElement.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/ProcessCallElement.java deleted file mode 100644 index 64feb1686c7..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/ProcessCallElement.java +++ /dev/null @@ -1,197 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.ProcessCallProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * ProcessCallElement contains the properties and header for a process call relationship retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ProcessCallElement -{ - private ElementHeader processCallHeader = null; - private ProcessCallProperties processCallProperties = null; - private ElementHeader caller = null; - private ElementHeader called = null; - - /** - * Default constructor - */ - public ProcessCallElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ProcessCallElement(ProcessCallElement template) - { - if (template != null) - { - processCallHeader = template.getProcessCallHeader(); - processCallProperties = template.getProcessCallProperties(); - caller = template.getCaller(); - called = template.getCalled(); - } - } - - - /** - * Return the element header associated with the relationship. - * - * @return element header object - */ - public ElementHeader getProcessCallHeader() - { - return processCallHeader; - } - - - /** - * Set up the element header associated with the relationship. - * - * @param processCallHeader element header object - */ - public void setProcessCallHeader(ElementHeader processCallHeader) - { - this.processCallHeader = processCallHeader; - } - - - /** - * Return details of the relationship - * - * @return relationship properties - */ - public ProcessCallProperties getProcessCallProperties() - { - return processCallProperties; - } - - - /** - * Set up relationship properties - * - * @param processCallProperties relationship properties - */ - public void setProcessCallProperties(ProcessCallProperties processCallProperties) - { - this.processCallProperties = processCallProperties; - } - - - /** - * Return the element header associated with end 1 of the relationship. - * - * @return element header object - */ - public ElementHeader getCaller() - { - return caller; - } - - - /** - * Set up the element header associated with end 1 of the relationship. - * - * @param caller element header object - */ - public void setCaller(ElementHeader caller) - { - this.caller = caller; - } - - - - /** - * Return the element header associated with end 2 of the relationship. - * - * @return element header object - */ - public ElementHeader getCalled() - { - return called; - } - - - /** - * Set up the element header associated with end 2 of the relationship. - * - * @param called element header object - */ - public void setCalled(ElementHeader called) - { - this.called = called; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ProcessCallElement{" + - "processCallHeader=" + processCallHeader + - ", processCallProperties=" + processCallProperties + - ", caller=" + caller + - ", called=" + called + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ProcessCallElement that = (ProcessCallElement) objectToCompare; - return Objects.equals(getProcessCallHeader(), that.getProcessCallHeader()) && - Objects.equals(getProcessCallProperties(), that.getProcessCallProperties()) && - Objects.equals(getCaller(), that.getCaller()) && - Objects.equals(getCalled(), that.getCalled()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), processCallHeader, processCallProperties, caller, called); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/ProfileIdentityElement.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/ProfileIdentityElement.java deleted file mode 100644 index 487add5beed..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/ProfileIdentityElement.java +++ /dev/null @@ -1,145 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.ProfileIdentityProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ProfileIdentityElement contains the properties and header for a relationship between a profile and a user identity retrieved - * from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ProfileIdentityElement -{ - private ProfileIdentityProperties profileIdentity = null; - private UserIdentityElement properties = null; - - - /** - * Default constructor - */ - public ProfileIdentityElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ProfileIdentityElement(ProfileIdentityElement template) - { - if (template != null) - { - profileIdentity = template.getProfileIdentity(); - properties = template.getProperties(); - } - } - - - /** - * Return the properties from the profile identity relationship. - * - * @return profile identity - */ - public ProfileIdentityProperties getProfileIdentity() - { - return profileIdentity; - } - - - /** - * Set up the properties from the profile identity relationship. - * - * @param profileIdentity profile identity - */ - public void setProfileIdentity(ProfileIdentityProperties profileIdentity) - { - this.profileIdentity = profileIdentity; - } - - - /** - * Return the properties of the userId. - * - * @return properties - */ - public UserIdentityElement getProperties() - { - return properties; - } - - - /** - * Set up the userId properties. - * - * @param properties properties - */ - public void setProperties(UserIdentityElement properties) - { - this.properties = properties; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ProfileIdentityElement{" + - "profileIdentity=" + profileIdentity + - ", properties=" + properties + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ProfileIdentityElement that = (ProfileIdentityElement) objectToCompare; - return Objects.equals(profileIdentity, that.profileIdentity) && - Objects.equals(properties, that.properties); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), profileIdentity, properties); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/SoftwareCapabilityElement.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/SoftwareCapabilityElement.java deleted file mode 100644 index 627671ea212..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/SoftwareCapabilityElement.java +++ /dev/null @@ -1,148 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.SoftwareCapabilityProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * SoftwareCapabilityElement contains the properties and header for a software server capability retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class SoftwareCapabilityElement implements MetadataElement -{ - private SoftwareCapabilityProperties properties = null; - private ElementHeader elementHeader = null; - - - /** - * Default constructor - */ - public SoftwareCapabilityElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public SoftwareCapabilityElement(SoftwareCapabilityElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - properties = template.getProperties(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - @Override - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the properties for the software server capability. - * - * @return asset properties (using appropriate subclass) - */ - public SoftwareCapabilityProperties getProperties() - { - return properties; - } - - - /** - * Set up the properties for the software server capability. - * - * @param properties asset properties - */ - public void setProperties(SoftwareCapabilityProperties properties) - { - this.properties = properties; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "SoftwareCapabilityElement{" + - "properties=" + properties + - ", elementHeader=" + elementHeader + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - SoftwareCapabilityElement that = (SoftwareCapabilityElement) objectToCompare; - return Objects.equals(getProperties(), that.getProperties()) && - Objects.equals(getElementHeader(), that.getElementHeader()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementHeader, properties); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/UserIdentityElement.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/UserIdentityElement.java deleted file mode 100644 index 06b33e156b8..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/UserIdentityElement.java +++ /dev/null @@ -1,147 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.UserIdentityProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * UserIdentityElement contains the properties and header for a user identity retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class UserIdentityElement implements MetadataElement -{ - private ElementHeader elementHeader = null; - private UserIdentityProperties properties = null; - - - /** - * Default constructor - */ - public UserIdentityElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public UserIdentityElement(UserIdentityElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - properties = template.getProperties(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - @Override - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the properties of the userId. - * - * @return properties - */ - public UserIdentityProperties getProperties() - { - return properties; - } - - - /** - * Set up the userId properties. - * - * @param properties properties - */ - public void setProperties(UserIdentityProperties properties) - { - this.properties = properties; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "UserIdentityElement{" + - "elementHeader=" + elementHeader + - ", properties=" + properties + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - UserIdentityElement that = (UserIdentityElement) objectToCompare; - return Objects.equals(elementHeader, that.elementHeader) && - Objects.equals(properties, that.properties); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementHeader, properties); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/package-info.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/package-info.java deleted file mode 100644 index 7960738ffc7..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -/** - * The metadata elements describe the way that metadata is returned from the repository. - */ -package org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements; diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/ActorProfileProperties.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/ActorProfileProperties.java deleted file mode 100644 index 6bacce29baa..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/ActorProfileProperties.java +++ /dev/null @@ -1,163 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * The ActorProfileProperties describes the common properties of a Personal Profile, IT Profile and Team Profile. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes( - { - @JsonSubTypes.Type(value = ITProfileProperties.class, name = "ITProfileProperties"), - }) -public class ActorProfileProperties extends ReferenceableProperties -{ - private String knownName = null; - private String description = null; - - - /** - * Default Constructor - */ - public ActorProfileProperties() - { - super(); - } - - - /** - * Copy/clone Constructor - the resulting object. - * - * @param template object being copied - */ - public ActorProfileProperties(ActorProfileProperties template) - { - super (template); - - if (template != null) - { - this.knownName = template.getKnownName(); - this.description = template.getDescription(); - } - } - - - /** - * Return the name that the person/automated agent/team is known as. - * - * @return string name - */ - public String getKnownName() - { - return knownName; - } - - - /** - * Set up the name that the person/automated agent/team is known as. - * - * @param knownName string name - */ - public void setKnownName(String knownName) - { - this.knownName = knownName; - } - - - /** - * Return description of the person/automated agent/team. - * - * @return text - */ - public String getDescription() - { - return description; - } - - - /** - * Set up description of the person/automated agent/team. - * - * @param description text - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "ActorProfileProperties{" + - "knownName='" + knownName + '\'' + - ", description='" + description + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ActorProfileProperties that = (ActorProfileProperties) objectToCompare; - return Objects.equals(knownName, that.knownName) && - Objects.equals(description, that.description); - } - - - /** - * Just use the GUID for the hash code as it should be unique. - * - * @return int code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), knownName, description); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/AssetProperties.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/AssetProperties.java deleted file mode 100644 index 314954cfebe..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/AssetProperties.java +++ /dev/null @@ -1,242 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.itinfrastructure.properties; - -import com.fasterxml.jackson.annotation.*; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * AssetProperties is a java bean used to create assets associated with the IT landscape. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes( - { - @JsonSubTypes.Type(value = ITInfrastructureProperties.class, name = "ITInfrastructureProperties"), - @JsonSubTypes.Type(value = DataAssetProperties.class, name = "DataAssetProperties"), - @JsonSubTypes.Type(value = ProcessProperties.class, name = "ProcessProperties"), - }) -public class AssetProperties extends ConfigurationItemProperties -{ - private String name = null; - private String versionIdentifier = null; - private String description = null; - private String deployedImplementationType = null; - - - /** - * Default constructor - */ - public AssetProperties() - { - } - - - /** - * Copy/clone constructor. Note, this is a deep copy - * - * @param template object to copy - */ - public AssetProperties(AssetProperties template) - { - super(template); - - if (template != null) - { - name = template.getName(); - versionIdentifier = template.getVersionIdentifier(); - description = template.getDescription(); - deployedImplementationType = template.getDeployedImplementationType(); - } - } - - - /** - * Convert this object into an AssetProperties object. This involves packing the properties introduced at this level - * into the extended properties. - * - * @param subTypeName subtype name - * @return asset properties - */ - public AssetProperties cloneToAsset(String subTypeName) - { - AssetProperties clone = new AssetProperties(this); - - if (clone.getTypeName() == null) - { - clone.setTypeName(subTypeName); - } - - return clone; - } - - - /** - * Return the name of the resource that this asset represents. - * - * @return string resource name - */ - public String getName() - { - return name; - } - - - /** - * Set up the name of the resource that this asset represents. - * - * @param name string resource name - */ - public void setName(String name) - { - this.name = name; - } - - - /** - * Set up the version identifier of the resource. - * - * @return string version name - */ - public String getVersionIdentifier() - { - return versionIdentifier; - } - - - /** - * Set up the version identifier of the resource. - * - * @param versionIdentifier string version name - */ - public void setVersionIdentifier(String versionIdentifier) - { - this.versionIdentifier = versionIdentifier; - } - - - /** - * Returns the stored description property for the asset. - * If no description is provided then null is returned. - * - * @return description String text - */ - public String getDescription() - { - return description; - } - - - /** - * Set up the stored description property associated with the asset. - * - * @param description String text - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * Retrieve the name of the technology used for this data asset. - * - * @return string name - */ - public String getDeployedImplementationType() - { - return deployedImplementationType; - } - - - /** - * Set up the name of the technology used for this data asset. - * - * @param deployedImplementationType string name - */ - public void setDeployedImplementationType(String deployedImplementationType) - { - this.deployedImplementationType = deployedImplementationType; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "AssetProperties{" + - "name='" + name + '\'' + - ", versionIdentifier='" + versionIdentifier + '\'' + - ", description='" + description + '\'' + - ", deployedImplementationType='" + deployedImplementationType + '\'' + - "} " + super.toString(); - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (! (objectToCompare instanceof AssetProperties)) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - - AssetProperties that = (AssetProperties) objectToCompare; - - if (name != null ? ! name.equals(that.name) : that.name != null) - { - return false; - } - if (versionIdentifier != null ? ! versionIdentifier.equals(that.versionIdentifier) : that.versionIdentifier != null) - { - return false; - } - if (deployedImplementationType != null ? ! deployedImplementationType.equals(that.deployedImplementationType) : that.deployedImplementationType != null) - { - return false; - } - return description != null ? description.equals(that.description) : that.description == null; - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - int result = super.hashCode(); - result = 31 * result + (name != null ? name.hashCode() : 0); - result = 31 * result + (versionIdentifier != null ? versionIdentifier.hashCode() : 0); - result = 31 * result + (deployedImplementationType != null ? deployedImplementationType.hashCode() : 0); - result = 31 * result + (description != null ? description.hashCode() : 0); - return result; - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/CapabilityDeploymentProperties.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/CapabilityDeploymentProperties.java deleted file mode 100644 index aa1b9fcd55b..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/CapabilityDeploymentProperties.java +++ /dev/null @@ -1,285 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Date; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -import org.odpi.openmetadata.frameworks.openmetadata.enums.OperationalStatus; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * CapabilityDeploymentProperties describes the properties for the SupportedSoftwareCapability relationship between a ITInfrastructure asset - * and a Software Capability. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class CapabilityDeploymentProperties extends ConfigurationItemRelationshipProperties -{ - private static final String deploymentTimeProperty = "deploymentTime"; - private static final String deployerProperty = "deployer"; - private static final String deployerTypeNameProperty = "deployerTypeName"; - private static final String deployerPropertyNameProperty = "deployerPropertyName"; - private static final String deploymentStatusProperty = "serverCapabilityStatus"; - - - private Date deploymentTime = null; - private String deployer = null; - private String deployerTypeName = null; - private String deployerPropertyName = null; - private OperationalStatus softwareCapabilityStatus = null; - - - /** - * Default constructor - */ - public CapabilityDeploymentProperties() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public CapabilityDeploymentProperties(CapabilityDeploymentProperties template) - { - super(template); - - if (template != null) - { - deploymentTime = template.getDeploymentTime(); - deployer = template.getDeployer(); - deployerTypeName = template.getDeployerTypeName(); - deployerPropertyName = template.getDeployerPropertyName(); - softwareCapabilityStatus = template.getSoftwareCapabilityStatus(); - } - } - - - /** - * Turn the properties into a property map. - * - * @return property map. - */ - public Map cloneToMap() - { - Map propertyMap = new HashMap<>(); - - if (deploymentTime != null) - { - propertyMap.put(deploymentTimeProperty, deploymentTime); - } - - if (deployer != null) - { - propertyMap.put(deployerProperty, deployer); - } - - if (deployerTypeName != null) - { - propertyMap.put(deployerTypeNameProperty, deployerTypeName); - } - - if (deployerPropertyName != null) - { - propertyMap.put(deployerPropertyNameProperty, deployerPropertyName); - } - - if (softwareCapabilityStatus != null) - { - propertyMap.put(deploymentStatusProperty, softwareCapabilityStatus.getOpenTypeOrdinal()); - } - - if (! propertyMap.isEmpty()) - { - propertyMap = null; - } - - return propertyMap; - } - - - - /** - * Return the time that the capability was deployed into the server. - * - * @return date/time - */ - public Date getDeploymentTime() - { - return deploymentTime; - } - - - /** - * Set up the time that the capability was deployed into the server. - * - * @param deploymentTime date/time - */ - public void setDeploymentTime(Date deploymentTime) - { - this.deploymentTime = deploymentTime; - } - - - /** - * Return the userId of the deployer. - * - * @return name - */ - public String getDeployer() - { - return deployer; - } - - - /** - * Set up the userId of the deployer. - * - * @param deployer name - */ - public void setDeployer(String deployer) - { - this.deployer = deployer; - } - - - /** - * Return the type name of the element used to represent the deployer. - * - * @return string name - */ - public String getDeployerTypeName() - { - return deployerTypeName; - } - - - /** - * Set up the type name of the element used to represent the deployer. - * - * @param deployerTypeName string name - */ - public void setDeployerTypeName(String deployerTypeName) - { - this.deployerTypeName = deployerTypeName; - } - - - /** - * Return the property name from the element used to represent the deployer. - * - * @return string name - */ - public String getDeployerPropertyName() - { - return deployerPropertyName; - } - - - /** - * Set up the property name from the element used to represent the deployer. - * - * @param deployerPropertyName string name - */ - public void setDeployerPropertyName(String deployerPropertyName) - { - this.deployerPropertyName = deployerPropertyName; - } - - - /** - * Return whether the capability is ready to use. - * - * @return operational status enum - */ - public OperationalStatus getSoftwareCapabilityStatus() - { - return softwareCapabilityStatus; - } - - - /** - * Set up whether the capability is ready to use. - * - * @param softwareCapabilityStatus operational status enum - */ - public void setSoftwareCapabilityStatus(OperationalStatus softwareCapabilityStatus) - { - this.softwareCapabilityStatus = softwareCapabilityStatus; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "CapabilityDeploymentProperties{" + - "deploymentTime=" + deploymentTime + - ", deployer='" + deployer + '\'' + - ", deployerTypeName='" + deployerTypeName + '\'' + - ", deployerPropertyName='" + deployerPropertyName + '\'' + - ", softwareCapabilityStatus=" + softwareCapabilityStatus + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - CapabilityDeploymentProperties that = (CapabilityDeploymentProperties) objectToCompare; - return Objects.equals(deploymentTime, that.deploymentTime) && - Objects.equals(deployer, that.deployer) && - Objects.equals(deployerTypeName, that.deployerTypeName) && - Objects.equals(deployerPropertyName, that.deployerPropertyName) && - softwareCapabilityStatus == that.softwareCapabilityStatus; - } - - - /** - * Hash code for this object - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), deploymentTime, deployer, deployerTypeName, deployerPropertyName, softwareCapabilityStatus); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/ConfigurationItemProperties.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/ConfigurationItemProperties.java deleted file mode 100644 index 8d789f20203..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/ConfigurationItemProperties.java +++ /dev/null @@ -1,163 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.properties; - -import com.fasterxml.jackson.annotation.*; - -import java.util.*; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ConfigurationItemProperties provides the base class for infrastructure items. This extends referenceable with the ability to - * set effectivity dates. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes( - { - @JsonSubTypes.Type(value = AssetProperties.class, name = "AssetProperties"), - @JsonSubTypes.Type(value = ConnectionProperties.class, name = "ConnectionProperties"), - @JsonSubTypes.Type(value = ConnectorTypeProperties.class, name = "ConnectorTypeProperties"), - @JsonSubTypes.Type(value = EndpointProperties.class, name = "EndpointProperties"), - @JsonSubTypes.Type(value = SoftwareCapabilityProperties.class, name = "SoftwareCapabilityProperties"), - }) -public class ConfigurationItemProperties extends ReferenceableProperties -{ - private Date effectiveFrom = null; - private Date effectiveTo = null; - - - /** - * Default constructor - */ - public ConfigurationItemProperties() - { - super(); - } - - - /** - * Copy/clone constructor. Retrieves values from the supplied template - * - * @param template element to copy - */ - public ConfigurationItemProperties(ConfigurationItemProperties template) - { - super(template); - - if (template != null) - { - effectiveFrom = template.getEffectiveFrom(); - effectiveTo = template.getEffectiveTo(); - } - } - - - /** - * Return the date/time that this element is effective from (null means effective from the epoch). - * - * @return date object - */ - public Date getEffectiveFrom() - { - return effectiveFrom; - } - - - /** - * Set up the date/time that this element is effective from (null means effective from the epoch). - * - * @param effectiveFrom date object - */ - public void setEffectiveFrom(Date effectiveFrom) - { - this.effectiveFrom = effectiveFrom; - } - - - /** - * Return the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @return date object - */ - public Date getEffectiveTo() - { - return effectiveTo; - } - - - /** - * Set the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @param effectiveTo date object - */ - public void setEffectiveTo(Date effectiveTo) - { - this.effectiveTo = effectiveTo; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "ConfigurationItemProperties{" + - "effectiveFrom=" + effectiveFrom + - ", effectiveTo=" + effectiveTo + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - ConfigurationItemProperties that = (ConfigurationItemProperties) objectToCompare; - return Objects.equals(effectiveFrom, that.effectiveFrom) && - Objects.equals(effectiveTo, that.effectiveTo); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), effectiveFrom, effectiveTo); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/ConfigurationItemRelationshipProperties.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/ConfigurationItemRelationshipProperties.java deleted file mode 100644 index 1353dca04ec..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/ConfigurationItemRelationshipProperties.java +++ /dev/null @@ -1,159 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; - -import java.util.Date; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ConfigurationItemProperties provides the base class for infrastructure items. This extends referenceable with the ability to - * set effectivity dates. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes( - { - @JsonSubTypes.Type(value = ServerAssetUseProperties.class, name = "ServerAssetUseProperties"), - @JsonSubTypes.Type(value = CapabilityDeploymentProperties.class, name = "CapabilityDeploymentProperties"), - @JsonSubTypes.Type(value = DeploymentProperties.class, name = "DeploymentProperties"), - @JsonSubTypes.Type(value = ControlFlowProperties.class, name = "ControlFlowProperties"), - @JsonSubTypes.Type(value = DataFlowProperties.class, name = "DataFlowProperties"), - @JsonSubTypes.Type(value = ProcessCallProperties.class, name = "ProcessCallProperties"), - @JsonSubTypes.Type(value = LineageMappingProperties.class, name = "LineageMappingProperties"), - }) -public class ConfigurationItemRelationshipProperties -{ - private Date effectiveFrom = null; - private Date effectiveTo = null; - - - /** - * Default constructor - */ - public ConfigurationItemRelationshipProperties() - { - super(); - } - - - /** - * Copy/clone constructor. Retrieves values from the supplied template - * - * @param template element to copy - */ - public ConfigurationItemRelationshipProperties(ConfigurationItemRelationshipProperties template) - { - if (template != null) - { - effectiveFrom = template.getEffectiveFrom(); - effectiveTo = template.getEffectiveTo(); - } - } - - - /** - * Return the date/time that this element is effective from (null means effective from the epoch). - * - * @return date object - */ - public Date getEffectiveFrom() - { - return effectiveFrom; - } - - - /** - * Set up the date/time that this element is effective from (null means effective from the epoch). - * - * @param effectiveFrom date object - */ - public void setEffectiveFrom(Date effectiveFrom) - { - this.effectiveFrom = effectiveFrom; - } - - - /** - * Return the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @return date object - */ - public Date getEffectiveTo() - { - return effectiveTo; - } - - - /** - * Set the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @param effectiveTo date object - */ - public void setEffectiveTo(Date effectiveTo) - { - this.effectiveTo = effectiveTo; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "ConfigurationItemRelationshipProperties{" + - "effectiveFrom=" + effectiveFrom + - ", effectiveTo=" + effectiveTo + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ConfigurationItemRelationshipProperties that = (ConfigurationItemRelationshipProperties) objectToCompare; - return Objects.equals(effectiveFrom, that.effectiveFrom) && - Objects.equals(effectiveTo, that.effectiveTo); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(effectiveFrom, effectiveTo); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/ConnectionProperties.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/ConnectionProperties.java deleted file mode 100644 index 0a805ae4fec..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/ConnectionProperties.java +++ /dev/null @@ -1,380 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * The connection is an object that contains the properties needed to create and initialise a connector to access a - * specific data assets. - * - * The properties for a connection are defined in model 0201. They include the following options for connector name: - *
            - *
          • - * guid - Globally unique identifier for the connection. - *
          • - *
          • - * url - URL of the connection definition in the metadata repository. - * This URL can be stored as a property in another entity to create an explicit link to this connection. - *
          • - *
          • - * qualifiedName - The official (unique) name for the connection. - * This is often defined by the IT systems management organization and should be used (when available) on - * audit logs and error messages. The qualifiedName is defined in the 0010 model as part of Referenceable. - *
          • - *
          • - * displayName - A consumable name for the connection. Often a shortened form of the qualifiedName for use - * on user interfaces and messages. The displayName should be only be used for audit logs and error messages - * if the qualifiedName is not set. - *
          • - *
          - * - * Either the guid, qualifiedName or displayName can be used to specify the name for a connection. - * - * Other properties for the connection include: - *
            - *
          • - * type - information about the TypeDef for Connection - *
          • - *
          • - * description - A full description of the connection covering details of the assets it connects to - * along with usage and version information. - *
          • - *
          • - * additionalProperties - Any additional properties associated with the connection. - *
          • - *
          • - * configurationProperties - properties for configuring the connector. - *
          • - *
          • - * securedProperties - Protected properties for secure log on by connector to back end server. These - * are protected properties that can only be retrieved by privileged connector code. - *
          • - *
          • - * userId - name or URI or connecting user. - *
          • - *
          • - * encryptedPassword - password for the userId - needs decrypting by connector before use. - *
          • - *
          • - * clearPassword - password for userId - ready to use. - *
          • - *
          • - * connectorType - Properties that describe the connector type for the connector. - *
          • - *
          • - * endpoint - Properties that describe the server endpoint where the connector will retrieve the assets. - *
          • - *
          • - * assetSummary - short description of the connected asset (if any). - *
          • - *
          - * - * The connection class is simply used to cache the properties for an connection. - * It is used by other classes to exchange this information between a metadata repository and a consumer. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ConnectionProperties extends ConfigurationItemProperties -{ - /* - * Attributes of a connector - */ - private String displayName = null; - private String description = null; - private String userId = null; - private String encryptedPassword = null; - private String clearPassword = null; - private Map configurationProperties = null; - private Map securedProperties = null; - - - /** - * Default constructor sets the Connection properties to null. - */ - public ConnectionProperties() - { - super(); - } - - - /** - * Copy/clone Constructor to return a copy of a connection object. - * - * @param template Connection to copy - */ - public ConnectionProperties(ConnectionProperties template) - { - super(template); - - if (template != null) - { - displayName = template.getDisplayName(); - description = template.getDescription(); - userId = template.getUserId(); - clearPassword = template.getClearPassword(); - encryptedPassword = template.getEncryptedPassword(); - configurationProperties = template.getConfigurationProperties(); - securedProperties = template.getSecuredProperties(); - } - } - - - /** - * Returns the stored display name property for the connection. - * Null means no displayName is available. - * - * @return displayName - */ - public String getDisplayName() { return displayName; } - - - /** - * Set up the display name for UIs and reports. - * - * @param displayName String name - */ - public void setDisplayName(String displayName) - { - this.displayName = displayName; - } - - - /** - * Set up description of the element. - * - * @param description String - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * Returns the stored description property for the connection. - * If no description is provided then null is returned. - * - * @return description - */ - public String getDescription() - { - return description; - } - - - /** - * Return the userId to use on this connection. - * - * @return string - */ - public String getUserId() - { - return userId; - } - - - /** - * Set up the userId to use on this connection. - * - * @param userId string - */ - public void setUserId(String userId) - { - this.userId = userId; - } - - - /** - * Return an encrypted password. The caller is responsible for decrypting it. - * - * @return string - */ - public String getEncryptedPassword() - { - return encryptedPassword; - } - - - /** - * Set up an encrypted password. - * - * @param encryptedPassword string - */ - public void setEncryptedPassword(String encryptedPassword) - { - this.encryptedPassword = encryptedPassword; - } - - - /** - * Return an unencrypted password. - * - * @return string - */ - public String getClearPassword() - { - return clearPassword; - } - - - /** - * Set up an unencrypted password. - * - * @param clearPassword string - */ - public void setClearPassword(String clearPassword) - { - this.clearPassword = clearPassword; - } - - - /** - * Set up the configuration properties for this Connection. - * - * @param configurationProperties properties that contain additional configuration information for the connector. - */ - public void setConfigurationProperties(Map configurationProperties) - { - this.configurationProperties = configurationProperties; - } - - - /** - * Return a copy of the configuration properties. Null means no secured properties are available. - * - * @return secured properties typically user credentials for the connection - */ - public Map getConfigurationProperties() - { - if (configurationProperties == null) - { - return null; - } - else if (configurationProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(configurationProperties); - } - } - - - /** - * Set up the secured properties for this Connection. - * - * @param securedProperties properties that contain secret information such as log on information. - */ - public void setSecuredProperties(Map securedProperties) - { - this.securedProperties = securedProperties; - } - - - /** - * Return a copy of the secured properties. Null means no secured properties are available. - * - * @return secured properties typically user credentials for the connection - */ - public Map getSecuredProperties() - { - if (securedProperties == null) - { - return null; - } - else if (securedProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(securedProperties); - } - } - - - /** - * Standard toString method. Note SecuredProperties and other credential type properties are not displayed. - * This is deliberate because there is no knowing where the string will be printed. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "ConnectionProperties{" + - "displayName='" + displayName + '\'' + - ", description='" + description + '\'' + - ", userId='" + userId + '\'' + - ", encryptedPassword='" + encryptedPassword + '\'' + - ", clearPassword='" + clearPassword + '\'' + - ", configurationProperties=" + configurationProperties + - ", securedProperties=" + securedProperties + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ConnectionProperties that = (ConnectionProperties) objectToCompare; - return Objects.equals(getDisplayName(), that.getDisplayName()) && - Objects.equals(getDescription(), that.getDescription()) && - Objects.equals(getUserId(), that.getUserId()) && - Objects.equals(getEncryptedPassword(), that.getEncryptedPassword()) && - Objects.equals(getClearPassword(), that.getClearPassword()) && - Objects.equals(getConfigurationProperties(), that.getConfigurationProperties()) && - Objects.equals(getSecuredProperties(), that.getSecuredProperties()); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), getDisplayName(), getDescription(), - getUserId(), getEncryptedPassword(), getClearPassword(), getSecuredProperties(), - getConfigurationProperties()); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/ConnectorTypeProperties.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/ConnectorTypeProperties.java deleted file mode 100644 index 4488004e732..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/ConnectorTypeProperties.java +++ /dev/null @@ -1,613 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * The ConnectorTypeProperties describe the implementation details of a particular type of connector. - * The properties for a connector type are defined in model 0201. - * They include: - * - *
            - *
          • - * guid - Globally unique identifier for the connector type. - *
          • - *
          • - * qualifiedName - The official (unique) name for the connector type. This is often defined by the IT - * systems management organization and should be used (when available) on audit logs and error messages. - *
          • - *
          • - * displayName - A consumable name for the connector type. Often a shortened form of the qualifiedName for use - * on user interfaces and messages. The displayName should be only be used for audit logs and error messages - * if the qualifiedName is not set. - *
          • - *
          • - * description - A full description of the connector type covering details of the assets it connects to - * along with usage and versioning information. - *
          • - *
          • - * supportedAssetTypeName - the type of asset that the connector implementation supports. - *
          • - *
          • - * expectedDataFormat - the format of the data that the connector supports - null for "any". - *
          • - *
          • - * connectorProviderClassName - The connector provider is the factory for a particular type of connector. - * This property defines the class name for the connector provider that the Connector Broker should use to request - * new connector instances. - *
          • - *
          • - * connectorFrameworkName - name of the connector framework that the connector implements - default Open Connector Framework (OCF). - *
          • - *
          • - * connectorInterfaceLanguage - the language that the connector is implemented in - default Java. - *
          • - *
          • - * connectorInterfaces - list of interfaces that the connector supports. - *
          • - *
          • - * targetTechnologySource - the organization that supplies the target technology that the connector implementation connects to. - *
          • - *
          • - * targetTechnologyName - the name of the target technology that the connector implementation connects to. - *
          • - *
          • - * targetTechnologyInterfaces - the names of the interfaces in the target technology that the connector calls. - *
          • - *
          • - * targetTechnologyVersions - the versions of the target technology that the connector supports. - *
          • - *
          • - * recognizedAdditionalProperties - these are the Connection additional properties recognized by the connector implementation - *
          • - *
          • - * recognizedConfigurationProperties - these are the Connection configuration properties recognized by the connector implementation - *
          • - *
          • - * recognizedSecuredProperties - these are the Connection secured properties recognized by the connector implementation - *
          • - *
          • - * additionalProperties - Any additional properties that the connector provider needs to know in order to - * create connector instances. - *
          • - *
          - * - * The connectorTypeProperties class is simply used to cache the properties for an connector type. - * It is used by other classes to exchange this information between a metadata repository and a consumer. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ConnectorTypeProperties extends ConfigurationItemProperties -{ - /* - * Attributes of a connector type - */ - private String displayName = null; - private String description = null; - private String supportedAssetTypeName = null; - private String expectedDataFormat = null; - private String connectorProviderClassName = null; - private String connectorFrameworkName = null; - private String connectorInterfaceLanguage = null; - private List connectorInterfaces = null; - private String targetTechnologySource = null; - private String targetTechnologyName = null; - private List targetTechnologyInterfaces = null; - private List targetTechnologyVersions = null; - private List recognizedAdditionalProperties = null; - private List recognizedConfigurationProperties = null; - private List recognizedSecuredProperties = null; - - - - /** - * Default constructor - */ - public ConnectorTypeProperties() - { - super(); - } - - - /** - * Copy/clone constructor for a connectorType that is not connected to an asset (either directly or indirectly). - * - * @param template template object to copy. - */ - public ConnectorTypeProperties(ConnectorTypeProperties template) - { - super(template); - - if (template != null) - { - displayName = template.getDisplayName(); - description = template.getDescription(); - supportedAssetTypeName = template.getSupportedAssetTypeName(); - expectedDataFormat = template.getExpectedDataFormat(); - connectorProviderClassName = template.getConnectorProviderClassName(); - connectorFrameworkName = template.getConnectorFrameworkName(); - connectorInterfaceLanguage = template.getConnectorInterfaceLanguage(); - connectorInterfaces = template.getConnectorInterfaces(); - targetTechnologySource = template.getTargetTechnologySource(); - targetTechnologyName = template.getTargetTechnologyName(); - targetTechnologyInterfaces = template.getTargetTechnologyInterfaces(); - targetTechnologyVersions = template.getTargetTechnologyVersions(); - recognizedAdditionalProperties = template.getRecognizedAdditionalProperties(); - recognizedConfigurationProperties = template.getRecognizedConfigurationProperties(); - recognizedSecuredProperties = template.getRecognizedSecuredProperties(); - } - } - - /** - * Set up the display name for UIs and reports. - * - * @param displayName String name - */ - public void setDisplayName(String displayName) - { - this.displayName = displayName; - } - - - /** - * Returns the stored display name property for the connector type. - * If no display name is available then null is returned. - * - * @return displayName - */ - public String getDisplayName() - { - return displayName; - } - - - /** - * Set up description of the element. - * - * @param description String - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * Returns the stored description property for the connector type. - * If no description is available then null is returned. - * - * @return description - */ - public String getDescription() - { - return description; - } - - - /** - * Return the type of asset that the connector implementation supports. - * - * @return string name - */ - public String getSupportedAssetTypeName() - { - return supportedAssetTypeName; - } - - - /** - * Set up the type of asset that the connector implementation supports. - * - * @param supportedAssetTypeName string name - */ - public void setSupportedAssetTypeName(String supportedAssetTypeName) - { - this.supportedAssetTypeName = supportedAssetTypeName; - } - - - /** - * Return the format of the data that the connector supports - null for "any". - * - * @return string name - */ - public String getExpectedDataFormat() - { - return expectedDataFormat; - } - - - /** - * Set up the format of the data that the connector supports - null for "any". - * - * @param expectedDataFormat string name - */ - public void setExpectedDataFormat(String expectedDataFormat) - { - this.expectedDataFormat = expectedDataFormat; - } - - - /** - * The name of the connector provider class name. - * - * @param connectorProviderClassName String class name - */ - public void setConnectorProviderClassName(String connectorProviderClassName) - { - this.connectorProviderClassName = connectorProviderClassName; - } - - - /** - * Returns the stored connectorProviderClassName property for the connector type. - * If no connectorProviderClassName is available then null is returned. - * - * @return connectorProviderClassName class name (including package name) - */ - public String getConnectorProviderClassName() - { - return connectorProviderClassName; - } - - - /** - * Return name of the connector framework that the connector implements - default Open Connector Framework (OCF). - * - * @return string name - */ - public String getConnectorFrameworkName() - { - return connectorFrameworkName; - } - - - /** - * Set up name of the connector framework that the connector implements - default Open Connector Framework (OCF). - * - * @param connectorFrameworkName string name - */ - public void setConnectorFrameworkName(String connectorFrameworkName) - { - this.connectorFrameworkName = connectorFrameworkName; - } - - - /** - * Return the language that the connector is implemented in - default Java. - * - * @return string name - */ - public String getConnectorInterfaceLanguage() - { - return connectorInterfaceLanguage; - } - - - /** - * Set up the language that the connector is implemented in - default Java. - * - * @param connectorInterfaceLanguage string name - */ - public void setConnectorInterfaceLanguage(String connectorInterfaceLanguage) - { - this.connectorInterfaceLanguage = connectorInterfaceLanguage; - } - - - /** - * Return list of interfaces that the connector supports. - * - * @return list of names - */ - public List getConnectorInterfaces() - { - return connectorInterfaces; - } - - - /** - * Set up list of interfaces that the connector supports. - * - * @param connectorInterfaces list of names - */ - public void setConnectorInterfaces(List connectorInterfaces) - { - this.connectorInterfaces = connectorInterfaces; - } - - - /** - * Return the name of the organization that supplies the target technology that the connector implementation connects to. - * - * @return string name - */ - public String getTargetTechnologySource() - { - return targetTechnologySource; - } - - - /** - * Set up the name of the organization that supplies the target technology that the connector implementation connects to. - * - * @param targetTechnologySource list of names - */ - public void setTargetTechnologySource(String targetTechnologySource) - { - this.targetTechnologySource = targetTechnologySource; - } - - - /** - * Return the name of the target technology that the connector implementation connects to. - * - * @return string name - */ - public String getTargetTechnologyName() - { - return targetTechnologyName; - } - - - /** - * Set up the name of the target technology that the connector implementation connects to. - * - * @param targetTechnologyName string name - */ - public void setTargetTechnologyName(String targetTechnologyName) - { - this.targetTechnologyName = targetTechnologyName; - } - - - /** - * Return the names of the interfaces in the target technology that the connector calls. - * - * @return list of interface names - */ - public List getTargetTechnologyInterfaces() - { - return targetTechnologyInterfaces; - } - - - /** - * Set up the names of the interfaces in the target technology that the connector calls. - * - * @param targetTechnologyInterfaces list of interface names - */ - public void setTargetTechnologyInterfaces(List targetTechnologyInterfaces) - { - this.targetTechnologyInterfaces = targetTechnologyInterfaces; - } - - - /** - * Return the versions of the target technology that the connector supports. - * - * @return list of version identifiers - */ - public List getTargetTechnologyVersions() - { - return targetTechnologyVersions; - } - - - /** - * Set up the versions of the target technology that the connector supports. - * - * @param targetTechnologyVersions list of version identifiers - */ - public void setTargetTechnologyVersions(List targetTechnologyVersions) - { - this.targetTechnologyVersions = targetTechnologyVersions; - } - - - /** - * Set up the list of property names that this connector/connector provider implementation looks for - * in the Connection object's additionalProperties. - * - * @param recognizedAdditionalProperties list of property names - */ - public void setRecognizedAdditionalProperties(List recognizedAdditionalProperties) - { - this.recognizedAdditionalProperties = recognizedAdditionalProperties; - } - - - /** - * Return the list of property names that this connector/connector provider implementation looks for - * in the Connection object's additionalProperties. - * - * @return list of property names - */ - public List getRecognizedAdditionalProperties() - { - if (recognizedAdditionalProperties == null) - { - return null; - } - else if (recognizedAdditionalProperties.isEmpty()) - { - return null; - } - else - { - return recognizedAdditionalProperties; - } - } - - - /** - * Set up the list of property names that this connector/connector provider implementation looks for - * in the Connection object's configurationProperties. - * - * @param recognizedConfigurationProperties list of property names - */ - public void setRecognizedConfigurationProperties(List recognizedConfigurationProperties) - { - - this.recognizedConfigurationProperties = recognizedConfigurationProperties; - } - - - /** - * Return the list of property names that this connector/connector provider implementation looks for - * in the Connection object's configurationProperties. - * - * @return list of property names - */ - public List getRecognizedConfigurationProperties() - { - if (recognizedConfigurationProperties == null) - { - return null; - } - else if (recognizedConfigurationProperties.isEmpty()) - { - return null; - } - else - { - return recognizedConfigurationProperties; - } - } - - - /** - * Set up the list of property names that this connector/connector provider implementation looks for - * in the Connection object's securedProperties. - * - * @param recognizedSecuredProperties list of property names - */ - public void setRecognizedSecuredProperties(List recognizedSecuredProperties) - { - this.recognizedSecuredProperties = recognizedSecuredProperties; - } - - - /** - * Return the list of property names that this connector/connector provider implementation looks for - * in the Connection object's securedProperties. - * - * @return list of property names - */ - public List getRecognizedSecuredProperties() - { - if (recognizedSecuredProperties == null) - { - return null; - } - else if (recognizedSecuredProperties.isEmpty()) - { - return null; - } - else - { - return recognizedSecuredProperties; - } - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "ConnectorTypeProperties{" + - "displayName='" + displayName + '\'' + - ", description='" + description + '\'' + - ", supportedAssetTypeName='" + supportedAssetTypeName + '\'' + - ", expectedDataFormat='" + expectedDataFormat + '\'' + - ", connectorProviderClassName='" + connectorProviderClassName + '\'' + - ", connectorFrameworkName='" + connectorFrameworkName + '\'' + - ", connectorInterfaceLanguage='" + connectorInterfaceLanguage + '\'' + - ", connectorInterfaces=" + connectorInterfaces + - ", targetTechnologySource='" + targetTechnologySource + '\'' + - ", targetTechnologyName='" + targetTechnologyName + '\'' + - ", targetTechnologyInterfaces=" + targetTechnologyInterfaces + - ", targetTechnologyVersions=" + targetTechnologyVersions + - ", recognizedAdditionalProperties=" + recognizedAdditionalProperties + - ", recognizedConfigurationProperties=" + recognizedConfigurationProperties + - ", recognizedSecuredProperties=" + recognizedSecuredProperties + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - ConnectorTypeProperties that = (ConnectorTypeProperties) objectToCompare; - return Objects.equals(displayName, that.displayName) && - Objects.equals(description, that.description) && - Objects.equals(supportedAssetTypeName, that.supportedAssetTypeName) && - Objects.equals(expectedDataFormat, that.expectedDataFormat) && - Objects.equals(connectorProviderClassName, that.connectorProviderClassName) && - Objects.equals(connectorFrameworkName, that.connectorFrameworkName) && - Objects.equals(connectorInterfaceLanguage, that.connectorInterfaceLanguage) && - Objects.equals(connectorInterfaces, that.connectorInterfaces) && - Objects.equals(targetTechnologySource, that.targetTechnologySource) && - Objects.equals(targetTechnologyName, that.targetTechnologyName) && - Objects.equals(targetTechnologyInterfaces, that.targetTechnologyInterfaces) && - Objects.equals(targetTechnologyVersions, that.targetTechnologyVersions) && - Objects.equals(recognizedAdditionalProperties, that.recognizedAdditionalProperties) && - Objects.equals(recognizedConfigurationProperties, that.recognizedConfigurationProperties) && - Objects.equals(recognizedSecuredProperties, that.recognizedSecuredProperties); - } - - - /** - * Hash of properties - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), displayName, description, supportedAssetTypeName, expectedDataFormat, connectorProviderClassName, - connectorFrameworkName, connectorInterfaceLanguage, connectorInterfaces, targetTechnologySource, targetTechnologyName, - targetTechnologyInterfaces, targetTechnologyVersions, recognizedAdditionalProperties, recognizedConfigurationProperties, - recognizedSecuredProperties); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/ContactMethodProperties.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/ContactMethodProperties.java deleted file mode 100644 index c8718ff23a9..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/ContactMethodProperties.java +++ /dev/null @@ -1,339 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.openmetadata.enums.ContactMethodType; - -import java.util.Date; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ContactMethodProperties describes a single mechanism that can be used to contact an individual. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ContactMethodProperties -{ - private String name = null; - private String contactType = null; - - private ContactMethodType contactMethodType = null; - private String contactMethodService = null; - private String contactMethodValue = null; - - private Date effectiveFrom = null; - private Date effectiveTo = null; - - private String typeName = null; - private Map extendedProperties = null; - - - /** - * Default constructor - */ - public ContactMethodProperties() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ContactMethodProperties(ContactMethodProperties template) - { - if (template != null) - { - contactMethodType = template.getContactMethodType(); - contactMethodService = template.getContactMethodService(); - contactMethodValue = template.getContactMethodValue(); - effectiveFrom = template.getEffectiveFrom(); - effectiveTo = template.getEffectiveTo(); - typeName = template.getTypeName(); - extendedProperties = template.getExtendedProperties(); - } - } - - - /** - * Return the name to give this contact method (imagine a list of contact methods). - * - * @return string - */ - public String getName() - { - return name; - } - - - /** - * Set up the name to give this contact method (imagine a list of contact methods). - * - * @param name string - */ - public void setName(String name) - { - this.name = name; - } - - - /** - * Return the type of contact - is it related to work or personal etc. - * - * @return string type name - often controlled by a valid value set - */ - public String getContactType() - { - return contactType; - } - - - /** - * Set up the type of contact - is it related to work or personal etc. - * - * @param contactType string type name - often controlled by a valid value set - */ - public void setContactType(String contactType) - { - this.contactType = contactType; - } - - - /** - * Return the type of the contact method. - * - * @return contact method type enum - */ - public ContactMethodType getContactMethodType() - { - return contactMethodType; - } - - - /** - * Set up the type of the contact method. - * - * @param contactMethodType contact method type enum - */ - public void setContactMethodType(ContactMethodType contactMethodType) - { - this.contactMethodType = contactMethodType; - } - - - /** - * Return the URL of the service used to contact the individual. - * - * @return service URL - */ - public String getContactMethodService() - { - return contactMethodService; - } - - - /** - * Set up theURL of the service used to contact the individual. - * - * @param contactMethodService service URL - */ - public void setContactMethodService(String contactMethodService) - { - this.contactMethodService = contactMethodService; - } - - - /** - * Return the account name or similar value used to direct the message to the individual. - * - * @return value string - */ - public String getContactMethodValue() - { - return contactMethodValue; - } - - - /** - * Set up the account name or similar value used to direct the message to the individual. - * - * @param contactMethodValue value string - */ - public void setContactMethodValue(String contactMethodValue) - { - this.contactMethodValue = contactMethodValue; - } - - - - /** - * Return the date/time that this element is effective from (null means effective from the epoch). - * - * @return date object - */ - public Date getEffectiveFrom() - { - return effectiveFrom; - } - - - /** - * Set up the date/time that this element is effective from (null means effective from the epoch). - * - * @param effectiveFrom date object - */ - public void setEffectiveFrom(Date effectiveFrom) - { - this.effectiveFrom = effectiveFrom; - } - - - /** - * Return the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @return date object - */ - public Date getEffectiveTo() - { - return effectiveTo; - } - - - /** - * Set the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @param effectiveTo date object - */ - public void setEffectiveTo(Date effectiveTo) - { - this.effectiveTo = effectiveTo; - } - - - /** - * Return the name of the open metadata type for this metadata element. - * - * @return string name - */ - public String getTypeName() - { - return typeName; - } - - - /** - * Set up the name of the open metadata type for this element. - * - * @param typeName string name - */ - public void setTypeName(String typeName) - { - this.typeName = typeName; - } - - - /** - * Return the properties that have been defined for a subtype of this object that are not supported explicitly - * by this bean. - * - * @return property map - */ - public Map getExtendedProperties() - { - if (extendedProperties == null) - { - return null; - } - else if (extendedProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(extendedProperties); - } - } - - - /** - * Set up the properties that have been defined for a subtype of this object that are not supported explicitly - * by this bean. - * - * @param extendedProperties property map - */ - public void setExtendedProperties(Map extendedProperties) - { - this.extendedProperties = extendedProperties; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "ContactMethodProperties{" + - "type=" + contactMethodType + - ", service='" + contactMethodService + '\'' + - ", value='" + contactMethodValue + '\'' + - ", effectiveFrom=" + effectiveFrom + - ", effectiveTo=" + effectiveTo + - ", typeName='" + typeName + '\'' + - ", extendedProperties=" + extendedProperties + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ContactMethodProperties that = (ContactMethodProperties) objectToCompare; - return contactMethodType == that.contactMethodType && - Objects.equals(contactMethodService, that.contactMethodService) && - Objects.equals(contactMethodValue, that.contactMethodValue) && - Objects.equals(effectiveFrom, that.effectiveFrom) && - Objects.equals(effectiveTo, that.effectiveTo) && - Objects.equals(typeName, that.typeName) && - Objects.equals(extendedProperties, that.extendedProperties); - } - - - /** - * Hash code for this object - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(contactMethodType, contactMethodService, contactMethodValue, effectiveFrom, effectiveTo, typeName, extendedProperties); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/ControlFlowProperties.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/ControlFlowProperties.java deleted file mode 100644 index 96510ce426b..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/ControlFlowProperties.java +++ /dev/null @@ -1,171 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ControlFlowProperties describe the properties for a control flow relationship. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ControlFlowProperties extends ConfigurationItemRelationshipProperties -{ - private String qualifiedName = null; - private String description = null; - private String guard = null; - - - /** - * Default constructor - */ - public ControlFlowProperties() - { - super(); - } - - - /** - * Copy/clone constructor. Retrieves values from the supplied template - * - * @param template element to copy - */ - public ControlFlowProperties(ControlFlowProperties template) - { - if (template != null) - { - qualifiedName = template.getQualifiedName(); - description = template.getDescription(); - guard = template.getGuard(); - } - } - - - /** - * Set up the fully qualified name. - * - * @param qualifiedName String name - */ - public void setQualifiedName(String qualifiedName) - { - this.qualifiedName = qualifiedName; - } - - - /** - * Returns the stored qualified name property for the relationship. - * If no qualified name is available then the empty string is returned. - * - * @return qualifiedName - */ - public String getQualifiedName() - { - return qualifiedName; - } - - - /** - * Return the description of the relationship. - * - * @return string text - */ - public String getDescription() - { - return description; - } - - - /** - * Set up the description of the relationship. - * - * @param description string text - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * Return the guard of the relationship. - * - * @return string guard - */ - public String getGuard() - { - return guard; - } - - - /** - * Set up the guard of the relationship. - * - * @param guard string name - */ - public void setGuard(String guard) - { - this.guard = guard; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "ControlFlowProperties{" + - "qualifiedName='" + qualifiedName + '\'' + - ", description='" + description + '\'' + - ", guard='" + guard + '\'' + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ControlFlowProperties that = (ControlFlowProperties) objectToCompare; - return Objects.equals(getQualifiedName(), that.getQualifiedName()) && - Objects.equals(getDescription(), that.getDescription()) && - Objects.equals(getGuard(), that.getGuard()); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(qualifiedName, description, guard); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/DataAssetProperties.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/DataAssetProperties.java deleted file mode 100644 index 916ff80730e..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/DataAssetProperties.java +++ /dev/null @@ -1,74 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.itinfrastructure.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * DataAssetProperties is a java bean used to create assets associated with the IT Infrastructure. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class DataAssetProperties extends AssetProperties -{ - /** - * Default constructor - */ - public DataAssetProperties() - { - } - - - /** - * Copy/clone constructor. Note, this is a deep copy - * - * @param template object to copy - */ - public DataAssetProperties(DataAssetProperties template) - { - super(template); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public DataAssetProperties(AssetProperties template) - { - super(template); - } - - - /** - * Convert this object into an AssetProperties object. This involves packing the properties introduced at this level - * into the extended properties. - * - * @return asset properties - */ - public AssetProperties cloneToAsset() - { - return super.cloneToAsset("Asset"); - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "DataAssetProperties{} " + super.toString(); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/DataFlowProperties.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/DataFlowProperties.java deleted file mode 100644 index f3f2f228d86..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/DataFlowProperties.java +++ /dev/null @@ -1,197 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * DataFlowProperties describe the properties for a data flow relationship. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class DataFlowProperties extends ConfigurationItemRelationshipProperties -{ - private String qualifiedName = null; - private String description = null; - private String formula = null; - private String formulaType = null; - - - /** - * Default constructor - */ - public DataFlowProperties() - { - super(); - } - - - /** - * Copy/clone constructor. Retrieves values from the supplied template - * - * @param template element to copy - */ - public DataFlowProperties(DataFlowProperties template) - { - if (template != null) - { - qualifiedName = template.getQualifiedName(); - description = template.getDescription(); - formula = template.getFormula(); - formulaType = template.getFormulaType(); - } - } - - - /** - * Set up the fully qualified name. - * - * @param qualifiedName String name - */ - public void setQualifiedName(String qualifiedName) - { - this.qualifiedName = qualifiedName; - } - - - /** - * Returns the stored qualified name property for the relationship. - * If no qualified name is available then the empty string is returned. - * - * @return qualifiedName - */ - public String getQualifiedName() - { - return qualifiedName; - } - - - /** - * Return the description of the relationship. - * - * @return string text - */ - public String getDescription() - { - return description; - } - - - /** - * Set up the description of the relationship. - * - * @param description string text - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * Return the formula of the relationship. - * - * @return string formula - */ - public String getFormula() - { - return formula; - } - - - /** - * Set up the formula of the relationship. - * - * @param formula string name - */ - public void setFormula(String formula) - { - this.formula = formula; - } - - - /** - * Return the specification language for the formula. - * - * @return string description - */ - public String getFormulaType() - { - return formulaType; - } - - - /** - * Set up the specification language for the formula. - * - * @param formulaType string description - */ - public void setFormulaType(String formulaType) - { - this.formulaType = formulaType; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "DataFlowProperties{" + - "qualifiedName='" + qualifiedName + '\'' + - ", description='" + description + '\'' + - ", formula='" + formula + '\'' + - ", formulaType='" + formulaType + '\'' + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - DataFlowProperties that = (DataFlowProperties) objectToCompare; - return Objects.equals(getQualifiedName(), that.getQualifiedName()) && - Objects.equals(getDescription(), that.getDescription()) && - Objects.equals(getFormula(), that.getFormula()) && - Objects.equals(getFormulaType(), that.getFormulaType()); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(qualifiedName, description, formula, formulaType); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/DeploymentProperties.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/DeploymentProperties.java deleted file mode 100644 index 185b960eb4c..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/DeploymentProperties.java +++ /dev/null @@ -1,316 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Date; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -import org.odpi.openmetadata.frameworks.openmetadata.enums.OperationalStatus; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * DeploymentProperties describes the properties for the DeployedOn relationship between an IT Infrastructure asset - * and a destination asset. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class DeploymentProperties extends ConfigurationItemRelationshipProperties -{ - private static final String deploymentTimeProperty = "deploymentTime"; - private static final String deployerProperty = "deployer"; - private static final String deployerTypeNameProperty = "deployerTypeName"; - private static final String deployerPropertyNameProperty = "deployerPropertyName"; - private static final String deploymentStatusProperty = "deploymentStatus"; - - - private Date deploymentTime = null; - private String deployer = null; - private String deployerTypeName = null; - private String deployerPropertyName = null; - private OperationalStatus deploymentStatus = null; - - - /** - * Default constructor - */ - public DeploymentProperties() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public DeploymentProperties(DeploymentProperties template) - { - super(template); - - if (template != null) - { - deploymentTime = template.getDeploymentTime(); - deployer = template.getDeployer(); - deployerTypeName = template.getDeployerTypeName(); - deployerPropertyName = template.getDeployerPropertyName(); - deploymentStatus = template.getDeploymentStatus(); } - } - - - /** - * Copy/clone constructor - * - * @param properties property map - * @param effectiveFrom effective from - * @param effectiveTo effective to - */ - public DeploymentProperties(Map properties, - Date effectiveFrom, - Date effectiveTo) - { - super(); - - super.setEffectiveFrom(effectiveFrom); - super.setEffectiveTo(effectiveTo); - - if (properties != null) - { - deploymentTime = (Date)properties.get(deploymentTimeProperty); - deployer = properties.get(deployerProperty).toString(); - deployerTypeName = properties.get(deployerTypeNameProperty).toString(); - deployerPropertyName = properties.get(deployerPropertyNameProperty).toString(); - - deploymentStatus = OperationalStatus.DISABLED; - int operationalStatus = (Integer)properties.get(deploymentStatusProperty); - - if (operationalStatus == 1) - { - deploymentStatus = OperationalStatus.ENABLED; - } - } - } - - - /** - * Turn the properties into a property map. - * - * @return property map. - */ - public Map cloneToMap() - { - Map propertyMap = new HashMap<>(); - - if (deploymentTime != null) - { - propertyMap.put(deploymentTimeProperty, deploymentTime); - } - - if (deployer != null) - { - propertyMap.put(deployerProperty, deployer); - } - - if (deployerTypeName != null) - { - propertyMap.put(deployerTypeNameProperty, deployerTypeName); - } - - if (deployerPropertyName != null) - { - propertyMap.put(deployerPropertyNameProperty, deployerPropertyName); - } - - if (deploymentStatus != null) - { - propertyMap.put(deploymentStatusProperty, deploymentStatus.getOpenTypeOrdinal()); - } - - if (! propertyMap.isEmpty()) - { - propertyMap = null; - } - - return propertyMap; - } - - - - /** - * Return the time that the capability was deployed into the server. - * - * @return date/time - */ - public Date getDeploymentTime() - { - return deploymentTime; - } - - - /** - * Set up the time that the capability was deployed into the server. - * - * @param deploymentTime date/time - */ - public void setDeploymentTime(Date deploymentTime) - { - this.deploymentTime = deploymentTime; - } - - - /** - * Return the userId of the deployer. - * - * @return name - */ - public String getDeployer() - { - return deployer; - } - - - /** - * Set up the userId of the deployer. - * - * @param deployer name - */ - public void setDeployer(String deployer) - { - this.deployer = deployer; - } - - - /** - * Return the type name of the element used to represent the deployer. - * - * @return string name - */ - public String getDeployerTypeName() - { - return deployerTypeName; - } - - - /** - * Set up the type name of the element used to represent the deployer. - * - * @param deployerTypeName string name - */ - public void setDeployerTypeName(String deployerTypeName) - { - this.deployerTypeName = deployerTypeName; - } - - - /** - * Return the property name from the element used to represent the deployer. - * - * @return string name - */ - public String getDeployerPropertyName() - { - return deployerPropertyName; - } - - - /** - * Set up the property name from the element used to represent the deployer. - * - * @param deployerPropertyName string name - */ - public void setDeployerPropertyName(String deployerPropertyName) - { - this.deployerPropertyName = deployerPropertyName; - } - - - /** - * Return whether the capability is ready to use. - * - * @return operational status enum - */ - public OperationalStatus getDeploymentStatus() - { - return deploymentStatus; - } - - - /** - * Set up whether the capability is ready to use. - * - * @param deploymentStatus operational status enum - */ - public void setDeploymentStatus(OperationalStatus deploymentStatus) - { - this.deploymentStatus = deploymentStatus; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "DeploymentProperties{" + - "deploymentTime=" + deploymentTime + - ", deployer='" + deployer + '\'' + - ", deploymentStatus=" + deploymentStatus + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - DeploymentProperties that = (DeploymentProperties) objectToCompare; - return Objects.equals(deploymentTime, that.deploymentTime) && - Objects.equals(deployer, that.deployer) && - Objects.equals(deployerTypeName, that.deployerTypeName) && - Objects.equals(deployerPropertyName, that.deployerPropertyName) && - deploymentStatus == that.deploymentStatus; - } - - - /** - * Hash code for this object - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), deploymentTime, deployer, deployerTypeName, deployerPropertyName, deploymentStatus); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/EndpointProperties.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/EndpointProperties.java deleted file mode 100644 index a064a051f2a..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/EndpointProperties.java +++ /dev/null @@ -1,243 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.itinfrastructure.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * EndpointProperties describes the properties of a server endpoint. The endpoint is linked - * to the data platform's server and describes its network endpoint. It is also linked to connection objects - * that are used by clients to connect to the data platform. A connection is linked to each asset - * that is hosted on the data platform. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class EndpointProperties extends ConfigurationItemProperties -{ - private String displayName = null; - private String description = null; - private String address = null; - private String protocol = null; - private String encryptionMethod = null; - - - /** - * Default constructor - */ - public EndpointProperties() - { - super(); - } - - - /** - * Copy/clone constructor for an Endpoint. - * - * @param template template object to copy. - */ - public EndpointProperties(EndpointProperties template) - { - super(template); - - if (template != null) - { - displayName = template.getDisplayName(); - description = template.getDescription(); - address = template.getAddress(); - protocol = template.getProtocol(); - encryptionMethod = template.getEncryptionMethod(); - } - } - - - /** - * Set up the display name for UIs and reports. - * - * @param displayName String name - */ - public void setDisplayName(String displayName) - { - this.displayName = displayName; - } - - - /** - * Returns the stored display name property for the endpoint. - * If no display name is available then null is returned. - * - * @return String name - */ - public String getDisplayName() - { - return displayName; - } - - - /** - * Set up description of the element. - * - * @param description String - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * Return the description for the endpoint. - * - * @return String description - */ - public String getDescription() - { - return description; - } - - - /** - * Set up the network address of the Endpoint. - * - * @param address String resource name - */ - public void setAddress(String address) - { - this.address = address; - } - - - /** - * Returns the stored address property for the endpoint. - * If no network address is available then null is returned. - * - * @return address - */ - public String getAddress() - { - return address; - } - - - /** - * Set up the protocol to use for this Endpoint - * - * @param protocol String protocol name - */ - public void setProtocol(String protocol) - { - this.protocol = protocol; - } - - - /** - * Returns the stored protocol property for the endpoint. - * If no protocol is available then null is returned. - * - * @return protocol - */ - public String getProtocol() - { - return protocol; - } - - - /** - * Set up the encryption method used on this Endpoint. - * - * @param encryptionMethod String name - */ - public void setEncryptionMethod(String encryptionMethod) - { - this.encryptionMethod = encryptionMethod; - } - - - /** - * Returns the stored encryptionMethod property for the endpoint. This is an open type allowing the information - * needed to work with a specific encryption mechanism used by the endpoint to be defined. - * If no encryptionMethod property is available (typically because this is an unencrypted endpoint) - * then null is returned. - * - * @return encryption method information - */ - public String getEncryptionMethod() - { - return encryptionMethod; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "EndpointProperties{" + - "displayName='" + displayName + '\'' + - ", description='" + description + '\'' + - ", address='" + address + '\'' + - ", protocol='" + protocol + '\'' + - ", encryptionMethod='" + encryptionMethod + '\'' + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - EndpointProperties that = (EndpointProperties) objectToCompare; - return Objects.equals(displayName, that.displayName) && - Objects.equals(description, that.description) && - Objects.equals(address, that.address) && - Objects.equals(protocol, that.protocol) && - Objects.equals(encryptionMethod, that.encryptionMethod); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), displayName, description, address, protocol, encryptionMethod); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/ITProfileProperties.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/ITProfileProperties.java deleted file mode 100644 index 299657dddcc..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/ITProfileProperties.java +++ /dev/null @@ -1,59 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * The ITProfileProperties describes a automated agent that is taking governance action. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ITProfileProperties extends ActorProfileProperties -{ - /** - * Default Constructor - */ - public ITProfileProperties() - { - super(); - } - - - /** - * Copy/clone Constructor - the resulting object. - * - * @param template object being copied - */ - public ITProfileProperties(ITProfileProperties template) - { - super (template); - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "ITProfileProperties{" + - "knownName='" + getKnownName() + '\'' + - ", description='" + getDescription() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/LineageMappingProperties.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/LineageMappingProperties.java deleted file mode 100644 index 3de834b57ef..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/LineageMappingProperties.java +++ /dev/null @@ -1,145 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * LineageMappingProperties describe the properties for a lineage mapping relationship. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class LineageMappingProperties extends ConfigurationItemRelationshipProperties -{ - private String qualifiedName = null; - private String description = null; - - - /** - * Default constructor - */ - public LineageMappingProperties() - { - super(); - } - - - /** - * Copy/clone constructor. Retrieves values from the supplied template - * - * @param template element to copy - */ - public LineageMappingProperties(LineageMappingProperties template) - { - if (template != null) - { - qualifiedName = template.getQualifiedName(); - description = template.getDescription(); - } - } - - - /** - * Set up the fully qualified name. - * - * @param qualifiedName String name - */ - public void setQualifiedName(String qualifiedName) - { - this.qualifiedName = qualifiedName; - } - - - /** - * Returns the stored qualified name property for the relationship. - * If no qualified name is available then the empty string is returned. - * - * @return qualifiedName - */ - public String getQualifiedName() - { - return qualifiedName; - } - - - /** - * Return the description of the relationship. - * - * @return string text - */ - public String getDescription() - { - return description; - } - - - /** - * Set up the description of the relationship. - * - * @param description string text - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "LineageMappingProperties{" + - "effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", qualifiedName='" + qualifiedName + '\'' + - ", description='" + description + '\'' + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - LineageMappingProperties that = (LineageMappingProperties) objectToCompare; - return Objects.equals(getQualifiedName(), that.getQualifiedName()) && - Objects.equals(getDescription(), that.getDescription()); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(qualifiedName, description); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/PortProperties.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/PortProperties.java deleted file mode 100644 index fcbb085c51d..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/PortProperties.java +++ /dev/null @@ -1,156 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.itinfrastructure.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.openmetadata.enums.PortType; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * PortProperties is a class for representing a generic port for a process. The typeName is set to indicate it is either a - * PortAlias (part of a choreographing process) or PortImplementation (part of an implemented process). - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class PortProperties extends ReferenceableProperties -{ - private String displayName = null; - private PortType portType = null; - - - /** - * Default constructor - */ - public PortProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public PortProperties(PortProperties template) - { - super(template); - - if (template != null) - { - displayName = template.getDisplayName(); - portType = template.getPortType(); - } - } - - - /** - * Return a human memorable name for the port. - * - * @return string name - */ - public String getDisplayName() - { - return displayName; - } - - - /** - * Set up a human memorable name for the port. - * - * @param displayName string name - */ - public void setDisplayName(String displayName) - { - this.displayName = displayName; - } - - - /** - * Return the direction of data flow of the port. - * - * @return portType enum - */ - public PortType getPortType() - { - return portType; - } - - - /** - * Set up the direction of data flow of the port. - * - * @param portType portType enum - */ - public void setPortType(PortType portType) - { - this.portType = portType; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "PortProperties{" + - "displayName='" + displayName + '\'' + - ", portType=" + portType + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - PortProperties that = (PortProperties) objectToCompare; - return Objects.equals(getDisplayName(), that.getDisplayName()) && - getPortType() == that.getPortType(); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), displayName, portType); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/ProcessCallProperties.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/ProcessCallProperties.java deleted file mode 100644 index 00fd211259a..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/ProcessCallProperties.java +++ /dev/null @@ -1,197 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ProcessCallProperties describe the properties for a process call relationship. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ProcessCallProperties extends ConfigurationItemRelationshipProperties -{ - private String qualifiedName = null; - private String description = null; - private String formula = null; - private String formulaType = null; - - - /** - * Default constructor - */ - public ProcessCallProperties() - { - super(); - } - - - /** - * Copy/clone constructor. Retrieves values from the supplied template - * - * @param template element to copy - */ - public ProcessCallProperties(ProcessCallProperties template) - { - if (template != null) - { - qualifiedName = template.getQualifiedName(); - description = template.getDescription(); - formula = template.getFormula(); - formulaType = template.getFormulaType(); - } - } - - - /** - * Set up the fully qualified name. - * - * @param qualifiedName String name - */ - public void setQualifiedName(String qualifiedName) - { - this.qualifiedName = qualifiedName; - } - - - /** - * Returns the stored qualified name property for the relationship. - * If no qualified name is available then the empty string is returned. - * - * @return qualifiedName - */ - public String getQualifiedName() - { - return qualifiedName; - } - - - /** - * Return the description of the relationship. - * - * @return string text - */ - public String getDescription() - { - return description; - } - - - /** - * Set up the description of the relationship. - * - * @param description string text - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * Return the formula of the relationship. - * - * @return string formula - */ - public String getFormula() - { - return formula; - } - - - /** - * Set up the formula of the relationship. - * - * @param formula string name - */ - public void setFormula(String formula) - { - this.formula = formula; - } - - - /** - * Return the specification language for the formula. - * - * @return string description - */ - public String getFormulaType() - { - return formulaType; - } - - - /** - * Set up the specification language for the formula. - * - * @param formulaType string description - */ - public void setFormulaType(String formulaType) - { - this.formulaType = formulaType; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "ProcessCallProperties{" + - "qualifiedName='" + qualifiedName + '\'' + - ", description='" + description + '\'' + - ", formula='" + formula + '\'' + - ", formulaType='" + formulaType + '\'' + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ProcessCallProperties that = (ProcessCallProperties) objectToCompare; - return Objects.equals(getQualifiedName(), that.getQualifiedName()) && - Objects.equals(getDescription(), that.getDescription()) && - Objects.equals(getFormula(), that.getFormula()) && - Objects.equals(getFormulaType(), that.getFormulaType()); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(qualifiedName, description, formula, formulaType); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/ProcessProperties.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/ProcessProperties.java deleted file mode 100644 index d612eb78a6f..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/ProcessProperties.java +++ /dev/null @@ -1,258 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; - -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * Process properties defines the properties of a process. A process is a series of steps and decisions in operation - * in the organization. It is typically an automated process but may be performed by a person. - * Only set the implementationLanguage if the process is automated. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ProcessProperties extends AssetProperties -{ - private static final String formulaProperty = OpenMetadataProperty.FORMULA.name; - private static final String formulaTypeProperty = OpenMetadataProperty.FORMULA_TYPE.name; - private static final String implementationLanguageProperty = OpenMetadataProperty.IMPLEMENTATION_LANGUAGE.name; - - private String formula = null; - private String formulaType = null; - private String implementationLanguage = null; - - /** - * Default constructor - */ - public ProcessProperties() - { - super(); - } - - - /** - * Copy/clone Constructor - * - * @param template template object to copy. - */ - public ProcessProperties(ProcessProperties template) - { - super(template); - - if (template != null) - { - formula = template.getFormula(); - formulaType = template.getFormulaType(); - implementationLanguage = template.getImplementationLanguage(); - } - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ProcessProperties(AssetProperties template) - { - super(template); - - if (template != null) - { - Map assetExtendedProperties = template.getExtendedProperties(); - - if (assetExtendedProperties != null) - { - if (assetExtendedProperties.get(formulaProperty) != null) - { - formula = assetExtendedProperties.get(formulaProperty).toString(); - assetExtendedProperties.remove(formulaProperty); - } - - if (assetExtendedProperties.get(formulaTypeProperty) != null) - { - formulaType = assetExtendedProperties.get(formulaTypeProperty).toString(); - assetExtendedProperties.remove(formulaTypeProperty); - } - - if (assetExtendedProperties.get(implementationLanguageProperty) != null) - { - implementationLanguage = assetExtendedProperties.get(implementationLanguageProperty).toString(); - assetExtendedProperties.remove(implementationLanguageProperty); - } - - super.setExtendedProperties(assetExtendedProperties); - } - } - } - - - /** - * Convert this object into an AssetProperties object. This involves packing the properties introduced at this level - * into the extended properties. - * - * @return asset properties - */ - public AssetProperties cloneToAsset() - { - AssetProperties assetProperties = super.cloneToAsset("Process"); - - Map extendedProperties = assetProperties.getExtendedProperties(); - - if (extendedProperties == null) - { - extendedProperties = new HashMap<>(); - } - - if (formula != null) - { - extendedProperties.put(formulaProperty, formula); - } - - if (formulaType != null) - { - extendedProperties.put(formulaTypeProperty, formulaType); - } - - if (implementationLanguage != null) - { - extendedProperties.put(implementationLanguageProperty, implementationLanguage); - } - - if (! extendedProperties.isEmpty()) - { - assetProperties.setExtendedProperties(extendedProperties); - } - - return assetProperties; - } - - - /** - * Return the description of the processing performed by this process. - * - * @return string description - */ - public String getFormula() { return formula; } - - - /** - * Set up the description of the processing performed by this process. - * - * @param formula string description - */ - public void setFormula(String formula) - { - this.formula = formula; - } - - - /** - * Return the specification language for the formula. - * - * @return string description - */ - public String getFormulaType() - { - return formulaType; - } - - - /** - * Set up the specification language for the formula. - * - * @param formulaType string description - */ - public void setFormulaType(String formulaType) - { - this.formulaType = formulaType; - } - - - /** - * Return the name of the programming language that this process is implemented in. - * - * @return string name - */ - public String getImplementationLanguage() - { - return implementationLanguage; - } - - - /** - * Set up the name of the programming language that this process is implemented in. - * - * @param implementationLanguage string name - */ - public void setImplementationLanguage(String implementationLanguage) - { - this.implementationLanguage = implementationLanguage; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "ProcessProperties{" + - "formula='" + formula + '\'' + - ", formulaType='" + formulaType + '\'' + - ", implementationLanguage='" + implementationLanguage + '\'' + - "} " + super.toString(); - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - ProcessProperties that = (ProcessProperties) objectToCompare; - return Objects.equals(formula, that.formula) && Objects.equals(formulaType, that.formulaType) && - Objects.equals(implementationLanguage, that.implementationLanguage); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), getFormula(), getFormulaType(), getImplementationLanguage()); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/ProcessStatus.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/ProcessStatus.java deleted file mode 100644 index 4c3b01bb02d..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/ProcessStatus.java +++ /dev/null @@ -1,115 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStatus; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * The ProcessStatus defines the status of a process. It effectively defines its visibility to different types of queries. - * Most queries by default will only return instances in the active status. - *
            - *
          • Unknown: Unknown process status.
          • - *
          • Draft: The process is incomplete.
          • - *
          • Proposed: The process is in review.
          • - *
          • Approved: The process is approved.
          • - *
          • Active: The process is approved and in use.
          • - *
          - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public enum ProcessStatus -{ - UNKNOWN (ElementStatus.UNKNOWN), - DRAFT (ElementStatus.DRAFT), - PROPOSED (ElementStatus.PROPOSED), - APPROVED (ElementStatus.APPROVED), - ACTIVE (ElementStatus.ACTIVE); - - private final ElementStatus elementStatus; - - /** - * Constructor to set up the instance of this enum. - * - * @param elementStatus status value - */ - ProcessStatus(ElementStatus elementStatus) - { - this.elementStatus = elementStatus; - } - - - /** - * Return the equivalent element status - * - * @return enum - */ - public ElementStatus getElementStatus() - { - return elementStatus; - } - - - /** - * Return the code for this enum instance - * - * @return int key pattern code - */ - public int getOrdinal() - { - return elementStatus.getOrdinal(); - } - - - /** - * Return the code for this enum that comes from the Open Metadata Type that this enum represents. - * - * @return int code number - */ - public int getOpenTypeOrdinal() - { - return elementStatus.getOrdinal(); - } - - - - /** - * Return the default name for this enum instance. - * - * @return String default name - */ - public String getName() - { - return elementStatus.getName(); - } - - - /** - * Return the default description for the key pattern for this enum instance. - * - * @return String default description - */ - public String getDescription() - { - return elementStatus.getDescription(); - } - - - /** - * toString() JSON-style - * - * @return string description - */ - @Override - public String toString() - { - return "ProcessStatus{" + - "elementStatus=" + elementStatus + - '}'; - }} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/ProfileIdentityProperties.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/ProfileIdentityProperties.java deleted file mode 100644 index 9edac1e106c..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/ProfileIdentityProperties.java +++ /dev/null @@ -1,169 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ProfileIdentityProperties describes the properties for the ProfileIdentity relationship between a profile - * and a user identity. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ProfileIdentityProperties -{ - private String roleTypeName = null; - private String roleGUID = null; - private String description = null; - - - /** - * Default constructor - */ - public ProfileIdentityProperties() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ProfileIdentityProperties(ProfileIdentityProperties template) - { - if (template != null) - { - roleTypeName = template.getRoleTypeName(); - roleGUID = template.getRoleGUID(); - description = template.getDescription(); - } - } - - - /** - * Return the type of the role. - * - * @return name - */ - public String getRoleTypeName() - { - return roleTypeName; - } - - - /** - * Set up the type of the role. - * - * @param roleTypeName name - */ - public void setRoleTypeName(String roleTypeName) - { - this.roleTypeName = roleTypeName; - } - - - /** - * Return the instance of the role. - * - * @return guid - */ - public String getRoleGUID() - { - return roleGUID; - } - - - /** - * Set up the instance of the role. - * - * @param roleGUID guid - */ - public void setRoleGUID(String roleGUID) - { - this.roleGUID = roleGUID; - } - - - /** - * Return the description of the user identity with respect to the individual. - * - * @return value string - */ - public String getDescription() - { - return description; - } - - - /** - * Set up the description of the user identity with respect to the individual. - * - * @param description value string - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "ProfileIdentityProperties{" + - "roleTypeName='" + roleTypeName + '\'' + - ", roleGUID='" + roleGUID + '\'' + - ", description='" + description + '\'' + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ProfileIdentityProperties that = (ProfileIdentityProperties) objectToCompare; - return Objects.equals(roleTypeName, that.roleTypeName) && - Objects.equals(roleGUID, that.roleGUID) && - Objects.equals(description, that.description); - } - - - /** - * Hash code for this object - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(roleTypeName, roleGUID, description); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/ReferenceableProperties.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/ReferenceableProperties.java deleted file mode 100644 index 1b2ee4e3302..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/ReferenceableProperties.java +++ /dev/null @@ -1,267 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.properties; - -import com.fasterxml.jackson.annotation.*; - -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * Many open metadata entities are referenceable. It means that they have a qualified name and additional - * properties. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes( - { - @JsonSubTypes.Type(value = ConfigurationItemProperties.class, name = "ConfigurationItemProperties"), - @JsonSubTypes.Type(value = ActorProfileProperties.class, name = "ActorProfileProperties"), - @JsonSubTypes.Type(value = UserIdentityProperties.class, name = "UserIdentityProperties"), - }) -public class ReferenceableProperties -{ - private String qualifiedName = null; - private Map additionalProperties = null; - - private Map vendorProperties = null; - - private String typeName = null; - private Map extendedProperties = null; - - /** - * Default constructor - */ - public ReferenceableProperties() - { - super(); - } - - - /** - * Copy/clone constructor. Retrieves properties from the supplied template - * - * @param template element to copy - */ - public ReferenceableProperties(ReferenceableProperties template) - { - if (template != null) - { - qualifiedName = template.getQualifiedName(); - additionalProperties = template.getAdditionalProperties(); - vendorProperties = template.getVendorProperties(); - typeName = template.getTypeName(); - extendedProperties = template.getExtendedProperties(); - } - } - - - /** - * Set up the fully qualified name. - * - * @param qualifiedName String name - */ - public void setQualifiedName(String qualifiedName) - { - this.qualifiedName = qualifiedName; - } - - - /** - * Returns the stored qualified name property for the metadata entity. - * If no qualified name is available then the empty string is returned. - * - * @return qualifiedName - */ - public String getQualifiedName() - { - return qualifiedName; - } - - - /** - * Set up additional properties. - * - * @param additionalProperties Additional properties object - */ - public void setAdditionalProperties(Map additionalProperties) - { - this.additionalProperties = additionalProperties; - } - - - /** - * Return a copy of the additional properties. Null means no additional properties are available. - * - * @return AdditionalProperties - */ - public Map getAdditionalProperties() - { - if (additionalProperties == null) - { - return null; - } - else if (additionalProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(additionalProperties); - } - } - - - /** - * Return specific properties for the data platform vendor. - * - * @return name value pairs - */ - public Map getVendorProperties() - { - if (vendorProperties == null) - { - return null; - } - else if (vendorProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(vendorProperties); - } - } - - - /** - * Set up specific properties for the data platform vendor. - * - * @param vendorProperties name value pairs - */ - public void setVendorProperties(Map vendorProperties) - { - this.vendorProperties = vendorProperties; - } - - - /** - * Return the name of the open metadata type for this element. - * - * @return string name - */ - public String getTypeName() - { - return typeName; - } - - - /** - * Set up the name of the open metadata type for this element. - * - * @param typeName string name - */ - public void setTypeName(String typeName) - { - this.typeName = typeName; - } - - - /** - * Return the properties that have been defined for a subtype of this object that are not supported explicitly - * by this bean. - * - * @return property map - */ - public Map getExtendedProperties() - { - if (extendedProperties == null) - { - return null; - } - else if (extendedProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(extendedProperties); - } - } - - - /** - * Set up the properties that have been defined for a subtype of this object that are not supported explicitly - * by this bean. - * - * @param extendedProperties property map - */ - public void setExtendedProperties(Map extendedProperties) - { - this.extendedProperties = extendedProperties; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "ReferenceableProperties{" + - "qualifiedName='" + qualifiedName + '\'' + - ", additionalProperties=" + additionalProperties + - ", vendorProperties=" + vendorProperties + - ", typeName='" + typeName + '\'' + - ", extendedProperties=" + extendedProperties + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ReferenceableProperties that = (ReferenceableProperties) objectToCompare; - return Objects.equals(qualifiedName, that.qualifiedName) && - Objects.equals(additionalProperties, that.additionalProperties) && - Objects.equals(vendorProperties, that.vendorProperties) && - Objects.equals(typeName, that.typeName) && - Objects.equals(extendedProperties, that.extendedProperties); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(qualifiedName, additionalProperties, vendorProperties, typeName, extendedProperties); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/ServerAssetUseProperties.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/ServerAssetUseProperties.java deleted file mode 100644 index 3c5a15cbbe6..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/ServerAssetUseProperties.java +++ /dev/null @@ -1,256 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.openmetadata.enums.ServerAssetUseType; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ServerAssetUseProperties describes the properties for the ServerAssetUse relationship between a software - * server capability and an asset. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ServerAssetUseProperties extends ConfigurationItemRelationshipProperties -{ - private ServerAssetUseType useType = null; - private String description = null; - private boolean minimumInstancesSet = false; - private int minimumInstances = 0; - private boolean maximumInstancesSet = false; - private int maximumInstances = 0; - - - /** - * Default constructor - */ - public ServerAssetUseProperties() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ServerAssetUseProperties(ServerAssetUseProperties template) - { - super(template); - - if (template != null) - { - this.useType = template.getUseType(); - this.description = template.getDescription(); - this.minimumInstancesSet = template.getMinimumInstancesSet(); - this.minimumInstances = template.getMinimumInstances(); - this.maximumInstancesSet = template.getMaximumInstancesSet(); - this.maximumInstances = template.getMaximumInstances(); - } - } - - - /** - * Return the types of interactions that the software server capability may have with the asset. - * - * @return ServerAssetUseType enum - */ - public ServerAssetUseType getUseType() - { - return useType; - } - - - /** - * Set up the types of interactions that the software server capability may have with the asset. - * - * @param useType ServerAssetUseType enum - */ - public void setUseType(ServerAssetUseType useType) - { - this.useType = useType; - } - - - /** - * Return the description of the relationship between the software server capability and the asset. - * - * @return text - */ - public String getDescription() - { - return description; - } - - - /** - * Set up the description of the relationship between the software server capability and the asset. - * - * @param description text - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * Return whether the minimum instances value is set up or just default. - * - * @return flag - */ - public boolean getMinimumInstancesSet() - { - return minimumInstancesSet; - } - - - /** - * Set up whether the minimum instances value is set up or just default. - * - * @param minimumInstancesSet flag - */ - public void setMinimumInstancesSet(boolean minimumInstancesSet) - { - this.minimumInstancesSet = minimumInstancesSet; - } - - - /** - * Return the minimum number of running asset instances controlled by the software server capability. - * - * @return integer - */ - public int getMinimumInstances() - { - return minimumInstances; - } - - - /** - * Set up the minimum number of running asset instances controlled by the software server capability. - * - * @param minimumInstances integer - */ - public void setMinimumInstances(int minimumInstances) - { - this.minimumInstances = minimumInstances; - } - - - /** - * Return whether the maximum instances value is set up or just default. - * - * @return flag - */ - public boolean getMaximumInstancesSet() - { - return maximumInstancesSet; - } - - - /** - * Set up whether the maximum instances value is set up or just default. - * - * @param maximumInstancesSet flag - */ - public void setMaximumInstancesSet(boolean maximumInstancesSet) - { - this.maximumInstancesSet = maximumInstancesSet; - } - - - /** - * Return the maximum number of running asset instances controlled by the software server capability. - * - * @return integer - */ - public int getMaximumInstances() - { - return maximumInstances; - } - - - /** - * Set up the maximum number of running asset instances controlled by the software server capability. - * - * @param maximumInstances integer - */ - public void setMaximumInstances(int maximumInstances) - { - this.maximumInstances = maximumInstances; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "ServerAssetUseProperties{" + - "useType=" + useType + - ", description='" + description + '\'' + - ", minimumInstancesSet=" + minimumInstancesSet + - ", minimumInstances=" + minimumInstances + - ", maximumInstancesSet=" + maximumInstancesSet + - ", maximumInstances=" + maximumInstances + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - ServerAssetUseProperties that = (ServerAssetUseProperties) objectToCompare; - return minimumInstancesSet == that.minimumInstancesSet && - minimumInstances == that.minimumInstances && - maximumInstancesSet == that.maximumInstancesSet && - maximumInstances == that.maximumInstances && - useType == that.useType && - Objects.equals(description, that.description); - } - - - /** - * Hash code for this object - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), useType, description, minimumInstancesSet, minimumInstances, maximumInstancesSet, maximumInstances); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/SoftwareCapabilityProperties.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/SoftwareCapabilityProperties.java deleted file mode 100644 index b410a4c549f..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/SoftwareCapabilityProperties.java +++ /dev/null @@ -1,259 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.properties; - - -import com.fasterxml.jackson.annotation.*; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * SoftwareCapabilityProperties describes a function implemented in software that is supported by an instance of IT Infrastructure. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class SoftwareCapabilityProperties extends ConfigurationItemProperties -{ - private String displayName = null; - private String description = null; - private String deployedImplementationType = null; - private String version = null; - private String patchLevel = null; - private String source = null; - - - /** - * Default constructor. - */ - public SoftwareCapabilityProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public SoftwareCapabilityProperties(SoftwareCapabilityProperties template) - { - super(template); - - if (template != null) - { - displayName = template.getDisplayName(); - description = template.getDescription(); - deployedImplementationType = template.getDeployedImplementationType(); - version = template.getVersion(); - patchLevel = template.getPatchLevel(); - source = template.getSource(); - } - } - - - /** - * Return the display name for messages and UI. - * - * @return string name - */ - public String getDisplayName() - { - return displayName; - } - - - /** - * Set up the display name for messages and UI. - * - * @param displayName string name - */ - public void setDisplayName(String displayName) - { - this.displayName = displayName; - } - - - /** - * Return the description of the discovery engine. - * - * @return string description - */ - public String getDescription() - { - return description; - } - - - /** - * Set up the description of the discovery engine. - * - * @param description string - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * Return the description of the type of capability this is. - * - * @return string description - */ - public String getDeployedImplementationType() - { - return deployedImplementationType; - } - - - /** - * Set up the description of the type of capability this is. - * - * @param deployedImplementationType string - */ - public void setDeployedImplementationType(String deployedImplementationType) - { - this.deployedImplementationType = deployedImplementationType; - } - - - /** - * Return the version of the discovery engine. - * - * @return version string - */ - public String getVersion() - { - return version; - } - - - /** - * Set up the version string of the discovery engine. - * - * @param version string - */ - public void setVersion(String version) - { - this.version = version; - } - - - /** - * Return the patch level of the discovery engine. - * - * @return patch level string - */ - public String getPatchLevel() - { - return patchLevel; - } - - - /** - * Set up the patch level of the discovery engine. - * - * @param patchLevel string - */ - public void setPatchLevel(String patchLevel) - { - this.patchLevel = patchLevel; - } - - - /** - * Return the source of the discovery engine implementation. - * - * @return string url - */ - public String getSource() - { - return source; - } - - - /** - * Set up the source of the discovery engine implementation. - * - * @param source string url - */ - public void setSource(String source) - { - this.source = source; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "SoftwareCapabilityProperties{" + - "displayName='" + displayName + '\'' + - ", description='" + description + '\'' + - ", typeDescription='" + deployedImplementationType + '\'' + - ", version='" + version + '\'' + - ", patchLevel='" + patchLevel + '\'' + - ", source='" + source + '\'' + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - SoftwareCapabilityProperties that = (SoftwareCapabilityProperties) objectToCompare; - return Objects.equals(getDisplayName(), that.getDisplayName()) && - Objects.equals(getDescription(), that.getDescription()) && - Objects.equals(getDeployedImplementationType(), that.getDeployedImplementationType()) && - Objects.equals(getVersion(), that.getVersion()) && - Objects.equals(getPatchLevel(), that.getPatchLevel()) && - Objects.equals(getSource(), that.getSource()); - } - - - /** - * Create a hash code for this element type. - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), getDisplayName(), getDescription(), getDeployedImplementationType(), - getVersion(), getPatchLevel(), getSource()); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/SoftwareServerCapabilityProperties.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/SoftwareServerCapabilityProperties.java deleted file mode 100644 index 84a5d45e27d..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/SoftwareServerCapabilityProperties.java +++ /dev/null @@ -1,62 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.properties; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -/** - * SoftwareCapabilityProperties describes a function implemented in software that is supported by an instance of IT Infrastructure. - */ -@Deprecated -public class SoftwareServerCapabilityProperties extends SoftwareCapabilityProperties -{ - /** - * Default constructor. - */ - public SoftwareServerCapabilityProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public SoftwareServerCapabilityProperties(SoftwareServerCapabilityProperties template) - { - super(template); - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "SoftwareServerCapabilityProperties{" + - "effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/UserIdentityProperties.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/UserIdentityProperties.java deleted file mode 100644 index feec59a52aa..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/UserIdentityProperties.java +++ /dev/null @@ -1,153 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * UserIdentityProperties describes an element that is linked to a single userId. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class UserIdentityProperties extends ReferenceableProperties -{ - private String userId = null; - private String distinguishedName = null; - - - /** - * Default constructor - */ - public UserIdentityProperties() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public UserIdentityProperties(UserIdentityProperties template) - { - super(template); - - if (template != null) - { - this.userId = template.getUserId(); - this.distinguishedName = template.getDistinguishedName(); - } - } - - - /** - * Return the identifier of the user's account - * - * @return string - */ - public String getUserId() - { - return userId; - } - - - /** - * Return the identifier of the user's account. - * - * @param userId string - */ - public void setUserId(String userId) - { - this.userId = userId; - } - - - /** - * Return the unique name in LDAP. - * - * @return string name - */ - public String getDistinguishedName() - { - return distinguishedName; - } - - - /** - * Set up the unique name in LDAP. - * - * @param distinguishedName string name - */ - public void setDistinguishedName(String distinguishedName) - { - this.distinguishedName = distinguishedName; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "UserIdentityProperties{" + - "qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - ", userId='" + userId + '\'' + - ", distinguishedName='" + distinguishedName + '\'' + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - UserIdentityProperties that = (UserIdentityProperties) objectToCompare; - return Objects.equals(userId, that.userId) && - Objects.equals(distinguishedName, that.distinguishedName); - } - - - /** - * Just use the GUID for the hash code as it should be unique. - * - * @return int code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), userId, distinguishedName); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/AssetConnectionRequestBody.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/AssetConnectionRequestBody.java deleted file mode 100644 index 1ba30bb0a87..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/AssetConnectionRequestBody.java +++ /dev/null @@ -1,117 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * AssetConnectionRequestBody carries the parameters for creating a new relationship between an asset and a connection. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class AssetConnectionRequestBody extends MetadataSourceRequestBody -{ - private String assetSummary = null; - - - /** - * Default constructor - */ - public AssetConnectionRequestBody() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public AssetConnectionRequestBody(AssetConnectionRequestBody template) - { - super(template); - - if (template != null) - { - assetSummary = template.getAssetSummary(); - } - } - - - /** - * Return the full path of the file - this should be unique. - * - * @return string name - */ - public String getAssetSummary() - { - return assetSummary; - } - - - /** - * Set up the full path of the file - this should be unique. - * - * @param assetSummary string name - */ - public void setAssetSummary(String assetSummary) - { - this.assetSummary = assetSummary; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "PathNameRequestBody{" + - ", assetSummary='" + assetSummary + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - AssetConnectionRequestBody that = (AssetConnectionRequestBody) objectToCompare; - return Objects.equals(getAssetSummary(), that.getAssetSummary()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(getAssetSummary()); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/AssetListResponse.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/AssetListResponse.java deleted file mode 100644 index fa81178a858..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/AssetListResponse.java +++ /dev/null @@ -1,147 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.itinfrastructure.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.AssetElement; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * AssetListResponse is a response object for passing back a a list of hosts - * or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class AssetListResponse extends ITInfrastructureOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public AssetListResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public AssetListResponse(AssetListResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elementList); - } - } - - - /** - * Set up the metadata element to return. - * - * @param elementList result object - */ - public void setElementList(List elementList) - { - this.elementList = elementList; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "AssetListResponse{" + - "elementList=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - AssetListResponse that = (AssetListResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/AssetRelationshipListResponse.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/AssetRelationshipListResponse.java deleted file mode 100644 index 6cdcd1286ba..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/AssetRelationshipListResponse.java +++ /dev/null @@ -1,148 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.itinfrastructure.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.AssetRelationshipElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.RelatedAssetElement; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * AssetRelationshipListResponse is a response object for passing back a list of relationships between assets - * or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class AssetRelationshipListResponse extends ITInfrastructureOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public AssetRelationshipListResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public AssetRelationshipListResponse(AssetRelationshipListResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elementList); - } - } - - - /** - * Set up the metadata element to return. - * - * @param elementList result object - */ - public void setElementList(List elementList) - { - this.elementList = elementList; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "AssetRelationshipListResponse{" + - "elementList=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - AssetRelationshipListResponse that = (AssetRelationshipListResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/AssetResponse.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/AssetResponse.java deleted file mode 100644 index ce74644d396..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/AssetResponse.java +++ /dev/null @@ -1,135 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.itinfrastructure.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.AssetElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * AssetResponse is a response object for passing back a single asset - * element or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class AssetResponse extends ITInfrastructureOMASAPIResponse -{ - private AssetElement element = null; - - - /** - * Default constructor - */ - public AssetResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public AssetResponse(AssetResponse template) - { - super(template); - - if (template != null) - { - element = template.getElement(); - } - } - - - /** - * Return the metadata element. - * - * @return result object - */ - public AssetElement getElement() - { - return element; - } - - - /** - * Set up the metadata element to return. - * - * @param element result object - */ - public void setElement(AssetElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "AssetResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - AssetResponse that = (AssetResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ConnectionRequestBody.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ConnectionRequestBody.java deleted file mode 100644 index f6f03dfd633..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ConnectionRequestBody.java +++ /dev/null @@ -1,172 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.ConnectionProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ConnectionRequestBody carries the parameters for describing a connection. - * The external source identifiers are used if the connection was created using the external source identifiers. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ConnectionRequestBody extends ConnectionProperties -{ - private String externalSourceGUID = null; - private String externalSourceName = null; - - - /** - * Default constructor - */ - public ConnectionRequestBody() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ConnectionRequestBody(ConnectionRequestBody template) - { - super(template); - - if (template != null) - { - externalSourceGUID = template.getExternalSourceGUID(); - externalSourceName = template.getExternalSourceName(); - } - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ConnectionRequestBody(ConnectionProperties template) - { - super(template); - } - - - /** - * Return the unique identifier of the software server capability entity that represented the external source - null for local. - * - * @return string guid - */ - public String getExternalSourceGUID() - { - return externalSourceGUID; - } - - - /** - * Set up the unique identifier of the software server capability entity that represented the external source - null for local. - * - * @param externalSourceGUID string guid - */ - public void setExternalSourceGUID(String externalSourceGUID) - { - this.externalSourceGUID = externalSourceGUID; - } - - - /** - * Return the unique name of the software server capability entity that represented the external source. - * - * @return string name - */ - public String getExternalSourceName() - { - return externalSourceName; - } - - - /** - * Set up the unique name of the software server capability entity that represented the external source. - * - * @param externalSourceName string name - */ - public void setExternalSourceName(String externalSourceName) - { - this.externalSourceName = externalSourceName; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ConnectionRequestBody{" + - "externalSourceGUID='" + externalSourceGUID + '\'' + - ", externalSourceName='" + externalSourceName + '\'' + - ", displayName='" + getDisplayName() + '\'' + - ", description='" + getDescription() + '\'' + - ", userId='" + getUserId() + '\'' + - ", encryptedPassword='" + getEncryptedPassword() + '\'' + - ", clearPassword='" + getClearPassword() + '\'' + - ", configurationProperties=" + getConfigurationProperties() + - ", securedProperties=" + getSecuredProperties() + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ConnectionRequestBody that = (ConnectionRequestBody) objectToCompare; - return Objects.equals(externalSourceGUID, that.externalSourceGUID) && - Objects.equals(externalSourceName, that.externalSourceName); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), externalSourceGUID, externalSourceName); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ConnectionResponse.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ConnectionResponse.java deleted file mode 100644 index 3f52df95aa9..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ConnectionResponse.java +++ /dev/null @@ -1,134 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.itinfrastructure.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.ConnectionElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ConnectionResponse is a response object for passing back a single connection object. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ConnectionResponse extends ITInfrastructureOMASAPIResponse -{ - private ConnectionElement element = null; - - - /** - * Default constructor - */ - public ConnectionResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ConnectionResponse(ConnectionResponse template) - { - super(template); - - if (template != null) - { - element = template.getElement(); - } - } - - - /** - * Return the metadata element. - * - * @return result object - */ - public ConnectionElement getElement() - { - return element; - } - - - /** - * Set up the metadata element to return. - * - * @param element result object - */ - public void setElement(ConnectionElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ConnectionResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ConnectionResponse that = (ConnectionResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ConnectionsResponse.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ConnectionsResponse.java deleted file mode 100644 index b49c622aa4f..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ConnectionsResponse.java +++ /dev/null @@ -1,146 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.itinfrastructure.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.ConnectionElement; - -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ConnectionsResponse is a response object for passing back a list of connection objects. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ConnectionsResponse extends ITInfrastructureOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public ConnectionsResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ConnectionsResponse(ConnectionsResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return elementList; - } - } - - - /** - * Set up the list of metadata elements to return. - * - * @param elementList result object - */ - public void setElementList(List elementList) - { - this.elementList = elementList; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ConnectionsResponse{" + - "element=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ConnectionsResponse that = (ConnectionsResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ConnectorTypeRequestBody.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ConnectorTypeRequestBody.java deleted file mode 100644 index a3e4f088fb3..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ConnectorTypeRequestBody.java +++ /dev/null @@ -1,171 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.ConnectorTypeProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ConnectorTypeRequestBody carries the parameters for describing a connector type. - * The external source identifiers are used if the connector type was created using the external source identifiers. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ConnectorTypeRequestBody extends ConnectorTypeProperties -{ - private String externalSourceGUID = null; - private String externalSourceName = null; - - - /** - * Default constructor - */ - public ConnectorTypeRequestBody() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ConnectorTypeRequestBody(ConnectorTypeRequestBody template) - { - super(template); - - if (template != null) - { - externalSourceGUID = template.getExternalSourceGUID(); - externalSourceName = template.getExternalSourceName(); - } - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ConnectorTypeRequestBody(ConnectorTypeProperties template) - { - super(template); - } - - - /** - * Return the unique identifier of the software server capability entity that represented the external source - null for local. - * - * @return string guid - */ - public String getExternalSourceGUID() - { - return externalSourceGUID; - } - - - /** - * Set up the unique identifier of the software server capability entity that represented the external source - null for local. - * - * @param externalSourceGUID string guid - */ - public void setExternalSourceGUID(String externalSourceGUID) - { - this.externalSourceGUID = externalSourceGUID; - } - - - /** - * Return the unique name of the software server capability entity that represented the external source. - * - * @return string name - */ - public String getExternalSourceName() - { - return externalSourceName; - } - - - /** - * Set up the unique name of the software server capability entity that represented the external source. - * - * @param externalSourceName string name - */ - public void setExternalSourceName(String externalSourceName) - { - this.externalSourceName = externalSourceName; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ConnectorTypeRequestBody{" + - "externalSourceGUID='" + externalSourceGUID + '\'' + - ", externalSourceName='" + externalSourceName + '\'' + - ", displayName='" + getDisplayName() + '\'' + - ", description='" + getDescription() + '\'' + - ", connectorProviderClassName='" + getConnectorProviderClassName() + '\'' + - ", recognizedAdditionalProperties=" + getRecognizedAdditionalProperties() + - ", recognizedConfigurationProperties=" + getRecognizedConfigurationProperties() + - ", recognizedSecuredProperties=" + getRecognizedSecuredProperties() + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ConnectorTypeRequestBody that = (ConnectorTypeRequestBody) objectToCompare; - return Objects.equals(externalSourceGUID, that.externalSourceGUID) && - Objects.equals(externalSourceName, that.externalSourceName); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), externalSourceGUID, externalSourceName); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ConnectorTypeResponse.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ConnectorTypeResponse.java deleted file mode 100644 index 1494924a3b6..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ConnectorTypeResponse.java +++ /dev/null @@ -1,134 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.itinfrastructure.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.ConnectorTypeElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ConnectorReportResponse is a response object for passing back a single connector type object. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ConnectorTypeResponse extends ITInfrastructureOMASAPIResponse -{ - private ConnectorTypeElement element = null; - - - /** - * Default constructor - */ - public ConnectorTypeResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ConnectorTypeResponse(ConnectorTypeResponse template) - { - super(template); - - if (template != null) - { - element = template.getElement(); - } - } - - - /** - * Return the metadata element. - * - * @return result object - */ - public ConnectorTypeElement getElement() - { - return element; - } - - - /** - * Set up the metadata element to return. - * - * @param element result object - */ - public void setElement(ConnectorTypeElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ConnectorReportResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ConnectorTypeResponse that = (ConnectorTypeResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ConnectorTypesResponse.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ConnectorTypesResponse.java deleted file mode 100644 index 7bde5a497e9..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ConnectorTypesResponse.java +++ /dev/null @@ -1,146 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.itinfrastructure.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.ConnectorTypeElement; - -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ConnectorTypesResponse is a response object for passing back a list of connector type objects. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ConnectorTypesResponse extends ITInfrastructureOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public ConnectorTypesResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ConnectorTypesResponse(ConnectorTypesResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return elementList; - } - } - - - /** - * Set up the list of metadata elements to return. - * - * @param elementList result object - */ - public void setElementList(List elementList) - { - this.elementList = elementList; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ConnectorTypesResponse{" + - "element=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ConnectorTypesResponse that = (ConnectorTypesResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ContactMethodRequestBody.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ContactMethodRequestBody.java deleted file mode 100644 index df4d68d5b10..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ContactMethodRequestBody.java +++ /dev/null @@ -1,123 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.ContactMethodProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ContactMethodRequestBody provides the request body payload for working on ContactMethod entities. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ContactMethodRequestBody extends MetadataSourceRequestBody -{ - private ContactMethodProperties properties = null; - - /** - * Default constructor - */ - public ContactMethodRequestBody() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ContactMethodRequestBody(ContactMethodRequestBody template) - { - super(template); - - if (template != null) - { - this.properties = template.getProperties(); - } - } - - - /** - * Return the properties for this contact method. - * - * @return properties bean - */ - public ContactMethodProperties getProperties() - { - return properties; - } - - - /** - * Set up the properties for this contact method. - * - * @param properties properties bean - */ - public void setProperties(ContactMethodProperties properties) - { - this.properties = properties; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "ContactMethodRequestBody{" + - "properties=" + properties + - ", externalSourceGUID='" + getExternalSourceGUID() + '\'' + - ", externalSourceName='" + getExternalSourceName() + '\'' + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ContactMethodRequestBody that = (ContactMethodRequestBody) objectToCompare; - return Objects.equals(properties, that.properties); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), properties); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ControlFlowElementResponse.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ControlFlowElementResponse.java deleted file mode 100644 index fdfcfe2ab9a..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ControlFlowElementResponse.java +++ /dev/null @@ -1,137 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.itinfrastructure.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.ControlFlowElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * ControlFlowElementResponse is the response structure used on the OMAS REST API calls that return the properties - * for a element. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ControlFlowElementResponse extends ITInfrastructureOMASAPIResponse -{ - private ControlFlowElement element = null; - - - /** - * Default constructor - */ - public ControlFlowElementResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ControlFlowElementResponse(ControlFlowElementResponse template) - { - super(template); - - if (template != null) - { - this.element = template.getElement(); - } - } - - - /** - * Return the element result. - * - * @return bean - */ - public ControlFlowElement getElement() - { - return element; - } - - - /** - * Set up the element result. - * - * @param element bean - */ - public void setElement(ControlFlowElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ControlFlowElementResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof ControlFlowElementResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ControlFlowElementResponse that = (ControlFlowElementResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(element); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ControlFlowElementsResponse.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ControlFlowElementsResponse.java deleted file mode 100644 index d1e9ccd9da9..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ControlFlowElementsResponse.java +++ /dev/null @@ -1,147 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.itinfrastructure.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.ControlFlowElement; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ControlFlowElementsResponse is a response object for passing back a a list of control flow relationships - * or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ControlFlowElementsResponse extends ITInfrastructureOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public ControlFlowElementsResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ControlFlowElementsResponse(ControlFlowElementsResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elementList); - } - } - - - /** - * Set up the metadata element to return. - * - * @param elementList result object - */ - public void setElementList(List elementList) - { - this.elementList = elementList; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ControlFlowElementsResponse{" + - "elementList=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ControlFlowElementsResponse that = (ControlFlowElementsResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ControlFlowRequestBody.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ControlFlowRequestBody.java deleted file mode 100644 index 2687f0eef84..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ControlFlowRequestBody.java +++ /dev/null @@ -1,128 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.rest; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.ControlFlowProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * ControlFlowRequestBody describes the request body used when linking elements within processes. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ControlFlowRequestBody extends EffectiveTimeMetadataSourceRequestBody -{ - private ControlFlowProperties properties = null; - - - /** - * Default constructor - */ - public ControlFlowRequestBody() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public ControlFlowRequestBody(ControlFlowRequestBody template) - { - super(template); - - if (template != null) - { - properties = template.getProperties(); - } - } - - - /** - * Return the properties for the relationship. - * - * @return properties object - */ - public ControlFlowProperties getProperties() - { - return properties; - } - - - /** - * Set up the properties for the relationship. - * - * @param properties properties object - */ - public void setProperties(ControlFlowProperties properties) - { - this.properties = properties; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ControlFlowRequestBody{" + - "properties=" + properties + - ", effectiveTime=" + getEffectiveTime() + - ", externalSourceGUID='" + getExternalSourceGUID() + '\'' + - ", externalSourceName='" + getExternalSourceName() + '\'' + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ControlFlowRequestBody that = (ControlFlowRequestBody) objectToCompare; - return Objects.equals(getProperties(), that.getProperties()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), properties); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/DataFlowElementResponse.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/DataFlowElementResponse.java deleted file mode 100644 index 25fff76229f..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/DataFlowElementResponse.java +++ /dev/null @@ -1,137 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.itinfrastructure.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.DataFlowElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * DataFlowElementResponse is the response structure used on the OMAS REST API calls that return the properties - * for a element. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class DataFlowElementResponse extends ITInfrastructureOMASAPIResponse -{ - private DataFlowElement element = null; - - - /** - * Default constructor - */ - public DataFlowElementResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public DataFlowElementResponse(DataFlowElementResponse template) - { - super(template); - - if (template != null) - { - this.element = template.getElement(); - } - } - - - /** - * Return the element result. - * - * @return bean - */ - public DataFlowElement getElement() - { - return element; - } - - - /** - * Set up the element result. - * - * @param element bean - */ - public void setElement(DataFlowElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "DataFlowElementResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof DataFlowElementResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - DataFlowElementResponse that = (DataFlowElementResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(element); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/DataFlowElementsResponse.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/DataFlowElementsResponse.java deleted file mode 100644 index 3678bac9f8d..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/DataFlowElementsResponse.java +++ /dev/null @@ -1,147 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.itinfrastructure.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.DataFlowElement; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * DataFlowElementsResponse is a response object for passing back a a list of data flow relationships - * or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class DataFlowElementsResponse extends ITInfrastructureOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public DataFlowElementsResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public DataFlowElementsResponse(DataFlowElementsResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elementList); - } - } - - - /** - * Set up the metadata element to return. - * - * @param elementList result object - */ - public void setElementList(List elementList) - { - this.elementList = elementList; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "DataFlowElementsResponse{" + - "elementList=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - DataFlowElementsResponse that = (DataFlowElementsResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/DataFlowRequestBody.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/DataFlowRequestBody.java deleted file mode 100644 index 971b34e9afc..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/DataFlowRequestBody.java +++ /dev/null @@ -1,128 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.rest; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.DataFlowProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * DataFlowRequestBody describes the request body used when linking elements within processes. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class DataFlowRequestBody extends EffectiveTimeMetadataSourceRequestBody -{ - private DataFlowProperties properties = null; - - - /** - * Default constructor - */ - public DataFlowRequestBody() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public DataFlowRequestBody(DataFlowRequestBody template) - { - super(template); - - if (template != null) - { - properties = template.getProperties(); - } - } - - - /** - * Return the properties for the relationship. - * - * @return properties object - */ - public DataFlowProperties getProperties() - { - return properties; - } - - - /** - * Set up the properties for the relationship. - * - * @param properties properties object - */ - public void setProperties(DataFlowProperties properties) - { - this.properties = properties; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "DataFlowRequestBody{" + - "properties=" + properties + - ", effectiveTime=" + getEffectiveTime() + - ", externalSourceGUID='" + getExternalSourceGUID() + '\'' + - ", externalSourceName='" + getExternalSourceName() + '\'' + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - DataFlowRequestBody that = (DataFlowRequestBody) objectToCompare; - return Objects.equals(getProperties(), that.getProperties()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), properties); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/EffectiveDatesRequestBody.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/EffectiveDatesRequestBody.java deleted file mode 100644 index 5e6200a0087..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/EffectiveDatesRequestBody.java +++ /dev/null @@ -1,151 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Date; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * MetadataSourceRequestBody carries the parameters for marking an element as external with the effective time set up. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class EffectiveDatesRequestBody extends MetadataSourceRequestBody -{ - private Date effectiveFrom = null; - private Date effectiveTo = null; - - - /** - * Default constructor - */ - public EffectiveDatesRequestBody() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public EffectiveDatesRequestBody(EffectiveDatesRequestBody template) - { - super(template); - - if (template != null) - { - effectiveFrom = template.getEffectiveFrom(); - effectiveTo = template.getEffectiveTo(); - } - } - - - /** - * Return the date/time that this element is effective from (null means effective from the epoch). - * - * @return date object - */ - public Date getEffectiveFrom() - { - return effectiveFrom; - } - - - /** - * Set up the date/time that this element is effective from (null means effective from the epoch). - * - * @param effectiveFrom date object - */ - public void setEffectiveFrom(Date effectiveFrom) - { - this.effectiveFrom = effectiveFrom; - } - - - /** - * Return the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @return date object - */ - public Date getEffectiveTo() - { - return effectiveTo; - } - - - /** - * Set the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @param effectiveTo date object - */ - public void setEffectiveTo(Date effectiveTo) - { - this.effectiveTo = effectiveTo; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "EffectiveDatesRequestBody{" + - "effectiveFrom=" + effectiveFrom + - ", effectiveTo=" + effectiveTo + - ", externalSourceGUID='" + getExternalSourceGUID() + '\'' + - ", externalSourceName='" + getExternalSourceName() + '\'' + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - EffectiveDatesRequestBody that = (EffectiveDatesRequestBody) objectToCompare; - return Objects.equals(effectiveFrom, that.effectiveFrom) && - Objects.equals(effectiveTo, that.effectiveTo); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), effectiveFrom, effectiveTo); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/EffectiveTimeMetadataSourceRequestBody.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/EffectiveTimeMetadataSourceRequestBody.java deleted file mode 100644 index dd3f96d2a31..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/EffectiveTimeMetadataSourceRequestBody.java +++ /dev/null @@ -1,124 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Date; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * EffectiveTimeRequestBody carries the date/time for a query. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class EffectiveTimeMetadataSourceRequestBody extends MetadataSourceRequestBody -{ - private Date effectiveTime = null; - - - /** - * Default constructor - */ - public EffectiveTimeMetadataSourceRequestBody() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public EffectiveTimeMetadataSourceRequestBody(EffectiveTimeMetadataSourceRequestBody template) - { - if (template != null) - { - effectiveTime = template.getEffectiveTime(); - } - } - - - /** - * Return the date/time to use for the query. - * - * @return date object - */ - public Date getEffectiveTime() - { - return effectiveTime; - } - - - /** - * Set up the date/time to use for the query. - * - * @param effectiveTime date object - */ - public void setEffectiveTime(Date effectiveTime) - { - this.effectiveTime = effectiveTime; - } - - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "EffectiveTimeMetadataSourceRequestBody{" + - "effectiveTime=" + effectiveTime + - ", externalSourceGUID='" + getExternalSourceGUID() + '\'' + - ", externalSourceName='" + getExternalSourceName() + '\'' + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - EffectiveTimeMetadataSourceRequestBody that = (EffectiveTimeMetadataSourceRequestBody) objectToCompare; - return Objects.equals(effectiveTime, that.effectiveTime); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), effectiveTime); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ElementStubResponse.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ElementStubResponse.java deleted file mode 100644 index 4c31ff4abf0..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ElementStubResponse.java +++ /dev/null @@ -1,135 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.itinfrastructure.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ElementStubResponse is a response object for passing back the header of a Referenceable - * element or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ElementStubResponse extends ITInfrastructureOMASAPIResponse -{ - private ElementStub element = null; - - - /** - * Default constructor - */ - public ElementStubResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ElementStubResponse(ElementStubResponse template) - { - super(template); - - if (template != null) - { - element = template.getElement(); - } - } - - - /** - * Return the metadata element. - * - * @return result object - */ - public ElementStub getElement() - { - return element; - } - - - /** - * Set up the metadata element to return. - * - * @param element result object - */ - public void setElement(ElementStub element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ElementStubResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ElementStubResponse that = (ElementStubResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ElementStubsResponse.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ElementStubsResponse.java deleted file mode 100644 index b0a4adc111b..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ElementStubsResponse.java +++ /dev/null @@ -1,149 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * ElementStubListResponse is the response structure used on the OMAS REST API calls that return a - * list of element identifiers as a response. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ElementStubsResponse extends ITInfrastructureOMASAPIResponse -{ - private List elements = null; - - - /** - * Default constructor - */ - public ElementStubsResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ElementStubsResponse(ElementStubsResponse template) - { - super(template); - - if (template != null) - { - this.elements = template.getElements(); - } - } - - - /** - * Return the list of element identifiers. - * - * @return list of objects or null - */ - public List getElements() - { - if (elements == null) - { - return null; - } - else if (elements.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elements); - } - } - - - /** - * Set up the list of element identifiers. - * - * @param elements - list of objects or null - */ - public void setElements(List elements) - { - this.elements = elements; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ElementStubListResponse{" + - "elements=" + elements + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof ElementStubsResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ElementStubsResponse that = (ElementStubsResponse) objectToCompare; - return Objects.equals(this.getElements(), that.getElements()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(elements, super.hashCode()); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/EmbeddedConnectionRequestBody.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/EmbeddedConnectionRequestBody.java deleted file mode 100644 index 9a7ff365b7c..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/EmbeddedConnectionRequestBody.java +++ /dev/null @@ -1,242 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.rest; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * The EmbeddedConnectionRequestBody is used within a VirtualConnection to link to the embedded connections. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class EmbeddedConnectionRequestBody -{ - /* - * Attributes of an embedded connection - */ - protected int position = 0; - protected String displayName = null; - protected Map arguments = null; - - /* - * data manager - */ - private String externalSourceGUID = null; - private String externalSourceName = null; - - - /** - * Default constructor - */ - public EmbeddedConnectionRequestBody() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template element to copy - */ - public EmbeddedConnectionRequestBody(EmbeddedConnectionRequestBody template) - { - if (template != null) - { - position = template.getPosition(); - displayName = template.getDisplayName(); - arguments = template.getArguments(); - externalSourceGUID = template.getExternalSourceGUID(); - externalSourceName = template.getExternalSourceName(); - } - } - - - /** - * Return the position that this connector is in the list of embedded connectors. - * - * @return int - */ - public int getPosition() - { - return position; - } - - - /** - * Set up the position that this connector is in the list of embedded connectors. - * - * @param position int - */ - public void setPosition(int position) - { - this.position = position; - } - - - /** - * Return the printable name of the embedded connection. - * - * @return String name - */ - public String getDisplayName() - { - return displayName; - } - - - /** - * Set up the printable name of the embedded connection. - * - * @param displayName String name - */ - public void setDisplayName(String displayName) - { - this.displayName = displayName; - } - - - /** - * Return the arguments for the embedded connection. - * - * @return property map - */ - public Map getArguments() - { - if (arguments == null) - { - return null; - } - else if (arguments.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(arguments); - } - } - - - /** - * Set up the arguments for the embedded connection. - * - * @param arguments property map - */ - public void setArguments(Map arguments) - { - this.arguments = arguments; - } - - - - /** - * Return the unique identifier of the software server capability entity that represented the external source - null for local. - * - * @return string guid - */ - public String getExternalSourceGUID() - { - return externalSourceGUID; - } - - - /** - * Set up the unique identifier of the software server capability entity that represented the external source - null for local. - * - * @param externalSourceGUID string guid - */ - public void setExternalSourceGUID(String externalSourceGUID) - { - this.externalSourceGUID = externalSourceGUID; - } - - - /** - * Return the unique name of the software server capability entity that represented the external source. - * - * @return string name - */ - public String getExternalSourceName() - { - return externalSourceName; - } - - - /** - * Set up the unique name of the software server capability entity that represented the external source. - * - * @param externalSourceName string name - */ - public void setExternalSourceName(String externalSourceName) - { - this.externalSourceName = externalSourceName; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "EmbeddedConnectionRequestBody{" + - "position=" + position + - ", displayName='" + displayName + '\'' + - ", arguments=" + arguments + - ", externalSourceGUID='" + externalSourceGUID + '\'' + - ", externalSourceName='" + externalSourceName + '\'' + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - EmbeddedConnectionRequestBody that = (EmbeddedConnectionRequestBody) objectToCompare; - return position == that.position && - Objects.equals(displayName, that.displayName) && - Objects.equals(arguments, that.arguments) && - Objects.equals(externalSourceGUID, that.externalSourceGUID) && - Objects.equals(externalSourceName, that.externalSourceName); - } - - - /** - * Create a hash code for this element type. - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(position, displayName, arguments, externalSourceGUID, externalSourceName); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/EndpointRequestBody.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/EndpointRequestBody.java deleted file mode 100644 index 4d69d74a97e..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/EndpointRequestBody.java +++ /dev/null @@ -1,170 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.EndpointProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * EndpointRequestBody carries the parameters for describing an endpoint. - * The external source identifiers are used if the endpoint was created using the external source identifiers. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class EndpointRequestBody extends EndpointProperties -{ - private String externalSourceGUID = null; - private String externalSourceName = null; - - - /** - * Default constructor - */ - public EndpointRequestBody() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public EndpointRequestBody(EndpointRequestBody template) - { - super(template); - - if (template != null) - { - externalSourceGUID = template.getExternalSourceGUID(); - externalSourceName = template.getExternalSourceName(); - } - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public EndpointRequestBody(EndpointProperties template) - { - super(template); - } - - - /** - * Return the unique identifier of the software server capability entity that represented the external source - null for local. - * - * @return string guid - */ - public String getExternalSourceGUID() - { - return externalSourceGUID; - } - - - /** - * Set up the unique identifier of the software server capability entity that represented the external source - null for local. - * - * @param externalSourceGUID string guid - */ - public void setExternalSourceGUID(String externalSourceGUID) - { - this.externalSourceGUID = externalSourceGUID; - } - - - /** - * Return the unique name of the software server capability entity that represented the external source. - * - * @return string name - */ - public String getExternalSourceName() - { - return externalSourceName; - } - - - /** - * Set up the unique name of the software server capability entity that represented the external source. - * - * @param externalSourceName string name - */ - public void setExternalSourceName(String externalSourceName) - { - this.externalSourceName = externalSourceName; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "EndpointRequestBody{" + - "externalSourceGUID='" + externalSourceGUID + '\'' + - ", externalSourceName='" + externalSourceName + '\'' + - ", displayName='" + getDisplayName() + '\'' + - ", description='" + getDescription() + '\'' + - ", address='" + getAddress() + '\'' + - ", protocol='" + getProtocol() + '\'' + - ", encryptionMethod='" + getEncryptionMethod() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - EndpointRequestBody that = (EndpointRequestBody) objectToCompare; - return Objects.equals(externalSourceGUID, that.externalSourceGUID) && - Objects.equals(externalSourceName, that.externalSourceName); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), externalSourceGUID, externalSourceName); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/EndpointResponse.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/EndpointResponse.java deleted file mode 100644 index d2ba702cfbf..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/EndpointResponse.java +++ /dev/null @@ -1,134 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.itinfrastructure.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.EndpointElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * EndpointResponse is a response object for passing back a single endpoint object. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class EndpointResponse extends ITInfrastructureOMASAPIResponse -{ - private EndpointElement element = null; - - - /** - * Default constructor - */ - public EndpointResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public EndpointResponse(EndpointResponse template) - { - super(template); - - if (template != null) - { - element = template.getElement(); - } - } - - - /** - * Return the metadata element. - * - * @return result object - */ - public EndpointElement getElement() - { - return element; - } - - - /** - * Set up the metadata element to return. - * - * @param element result object - */ - public void setElement(EndpointElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "EndpointResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - EndpointResponse that = (EndpointResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/EndpointsResponse.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/EndpointsResponse.java deleted file mode 100644 index 80d9c84eff8..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/EndpointsResponse.java +++ /dev/null @@ -1,146 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.itinfrastructure.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.EndpointElement; - -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * EndpointsResponse is a response object for passing back a list of endpoint objects. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class EndpointsResponse extends ITInfrastructureOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public EndpointsResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public EndpointsResponse(EndpointsResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return elementList; - } - } - - - /** - * Set up the list of metadata elements to return. - * - * @param elementList result object - */ - public void setElementList(List elementList) - { - this.elementList = elementList; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "EndpointsResponse{" + - "element=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - EndpointsResponse that = (EndpointsResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/HostListResponse.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/HostListResponse.java deleted file mode 100644 index 389f183efb5..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/HostListResponse.java +++ /dev/null @@ -1,147 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.itinfrastructure.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.HostElement; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * HostListResponse is a response object for passing back a a list of hosts - * or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class HostListResponse extends ITInfrastructureOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public HostListResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public HostListResponse(HostListResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elementList); - } - } - - - /** - * Set up the metadata element to return. - * - * @param elementList result object - */ - public void setElementList(List elementList) - { - this.elementList = elementList; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "HostListResponse{" + - "elementList=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - HostListResponse that = (HostListResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/HostResponse.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/HostResponse.java deleted file mode 100644 index fa827a7042c..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/HostResponse.java +++ /dev/null @@ -1,135 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.itinfrastructure.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.HostElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * HostResponse is a response object for passing back a single host - * element or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class HostResponse extends ITInfrastructureOMASAPIResponse -{ - private HostElement element = null; - - - /** - * Default constructor - */ - public HostResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public HostResponse(HostResponse template) - { - super(template); - - if (template != null) - { - element = template.getElement(); - } - } - - - /** - * Return the metadata element. - * - * @return result object - */ - public HostElement getElement() - { - return element; - } - - - /** - * Set up the metadata element to return. - * - * @param element result object - */ - public void setElement(HostElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "HostResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - HostResponse that = (HostResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ITInfrastructureOMASAPIRequestBody.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ITInfrastructureOMASAPIRequestBody.java deleted file mode 100644 index eddcea4b2f6..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ITInfrastructureOMASAPIRequestBody.java +++ /dev/null @@ -1,60 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.itinfrastructure.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * DataManagerOMASAPIRequestBody provides a common header for Data Manager OMAS request bodies for its REST API. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes({ - @JsonSubTypes.Type(value = MetadataSourceRequestBody.class, name = "MetadataSourceRequestBody"), - - }) -public abstract class ITInfrastructureOMASAPIRequestBody -{ - - /** - * Default constructor - */ - public ITInfrastructureOMASAPIRequestBody() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ITInfrastructureOMASAPIRequestBody(ITInfrastructureOMASAPIRequestBody template) - { - } - - - /** - * JSON-like toString - * - * @return string containing the class name - */ - @Override - public String toString() - { - return "ITInfrastructureOMASAPIRequestBody{}"; - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ITProfileListResponse.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ITProfileListResponse.java deleted file mode 100644 index a4614dbe691..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ITProfileListResponse.java +++ /dev/null @@ -1,148 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.ITProfileElement; - -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * ITProfileListResponse is the response structure used on the OMAS REST API calls that return a - * a list of profile elements. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ITProfileListResponse extends ITInfrastructureOMASAPIResponse -{ - private List elements = null; - - - /** - * Default constructor - */ - public ITProfileListResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ITProfileListResponse(ITProfileListResponse template) - { - super(template); - - if (template != null) - { - this.elements = template.getElements(); - } - } - - - /** - * Return the profile result. - * - * @return unique identifier - */ - public List getElements() - { - if (elements == null) - { - return null; - } - else if (elements.isEmpty()) - { - return null; - } - else - { - return elements; - } - } - - - /** - * Set up the profile result. - * - * @param elements - unique identifier - */ - public void setElements(List elements) - { - this.elements = elements; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ITProfileListResponse{" + - "elements=" + elements + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof ITProfileListResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ITProfileListResponse that = (ITProfileListResponse) objectToCompare; - return Objects.equals(getElements(), that.getElements()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elements); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ITProfileResponse.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ITProfileResponse.java deleted file mode 100644 index 47c2398f9fe..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ITProfileResponse.java +++ /dev/null @@ -1,136 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.ITProfileElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * ITProfileResponse is the response structure used on the OMAS REST API calls that return a - * ActorProfileElement object as a response. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ITProfileResponse extends ITInfrastructureOMASAPIResponse -{ - private ITProfileElement element = null; - - - /** - * Default constructor - */ - public ITProfileResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ITProfileResponse(ITProfileResponse template) - { - super(template); - - if (template != null) - { - this.element = template.getElement(); - } - } - - - /** - * Return the element result. - * - * @return details of profile - */ - public ITProfileElement getElement() - { - return element; - } - - - /** - * Set up the element result. - * - * @param element details of profile - */ - public void setElement(ITProfileElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ITProfileResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof ITProfileResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ITProfileResponse that = (ITProfileResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/LineageMappingElementResponse.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/LineageMappingElementResponse.java deleted file mode 100644 index 546f7db876e..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/LineageMappingElementResponse.java +++ /dev/null @@ -1,137 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.itinfrastructure.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.LineageMappingElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * LineageMappingElementResponse is the response structure used on the OMAS REST API calls that return the properties - * for a relationship. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class LineageMappingElementResponse extends ITInfrastructureOMASAPIResponse -{ - private LineageMappingElement element = null; - - - /** - * Default constructor - */ - public LineageMappingElementResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public LineageMappingElementResponse(LineageMappingElementResponse template) - { - super(template); - - if (template != null) - { - this.element = template.getElement(); - } - } - - - /** - * Return the element result. - * - * @return bean - */ - public LineageMappingElement getElement() - { - return element; - } - - - /** - * Set up the element result. - * - * @param element bean - */ - public void setElement(LineageMappingElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "LineageMappingElementResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof LineageMappingElementResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - LineageMappingElementResponse that = (LineageMappingElementResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(element); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/LineageMappingElementsResponse.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/LineageMappingElementsResponse.java deleted file mode 100644 index 94609a7117e..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/LineageMappingElementsResponse.java +++ /dev/null @@ -1,147 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.itinfrastructure.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.LineageMappingElement; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * LineageMappingElementsResponse is a response object for passing back a a list of lineage mapping relationships - * or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class LineageMappingElementsResponse extends ITInfrastructureOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public LineageMappingElementsResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public LineageMappingElementsResponse(LineageMappingElementsResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elementList); - } - } - - - /** - * Set up the metadata element to return. - * - * @param elementList result object - */ - public void setElementList(List elementList) - { - this.elementList = elementList; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "LineageMappingElementsResponse{" + - "elementList=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - LineageMappingElementsResponse that = (LineageMappingElementsResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/MetadataSourceRequestBody.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/MetadataSourceRequestBody.java deleted file mode 100644 index a09cbc753d1..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/MetadataSourceRequestBody.java +++ /dev/null @@ -1,144 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * MetadataSourceRequestBody carries the parameters for marking an element as external. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class MetadataSourceRequestBody extends ITInfrastructureOMASAPIRequestBody -{ - private String externalSourceGUID = null; - private String externalSourceName = null; - - - - /** - * Default constructor - */ - public MetadataSourceRequestBody() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public MetadataSourceRequestBody(MetadataSourceRequestBody template) - { - super(template); - - if (template != null) - { - externalSourceGUID = template.getExternalSourceGUID(); - externalSourceName = template.getExternalSourceName(); - } - } - - - /** - * Return the unique identifier of the software server capability entity that represented the external source - null for local. - * - * @return string guid - */ - public String getExternalSourceGUID() - { - return externalSourceGUID; - } - - - /** - * Set up the unique identifier of the software server capability entity that represented the external source - null for local. - * - * @param externalSourceGUID string guid - */ - public void setExternalSourceGUID(String externalSourceGUID) - { - this.externalSourceGUID = externalSourceGUID; - } - - - /** - * Return the unique name of the software server capability entity that represented the external source. - * - * @return string name - */ - public String getExternalSourceName() - { - return externalSourceName; - } - - - /** - * Set up the unique name of the software server capability entity that represented the external source. - * - * @param externalSourceName string name - */ - public void setExternalSourceName(String externalSourceName) - { - this.externalSourceName = externalSourceName; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "MetadataSourceRequestBody{" + - "externalSourceGUID='" + externalSourceGUID + '\'' + - ", externalSourceName='" + externalSourceName + '\'' + - '}'; - } - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - MetadataSourceRequestBody that = (MetadataSourceRequestBody) objectToCompare; - return Objects.equals(externalSourceGUID, that.externalSourceGUID) && - Objects.equals(externalSourceName, that.externalSourceName); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), externalSourceGUID, externalSourceName); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/PortElementResponse.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/PortElementResponse.java deleted file mode 100644 index f3b0cd24d73..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/PortElementResponse.java +++ /dev/null @@ -1,137 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.itinfrastructure.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.PortElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * PortElementResponse is the response structure used on the OMAS REST API calls that return the properties - * for a element. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class PortElementResponse extends ITInfrastructureOMASAPIResponse -{ - private PortElement element = null; - - - /** - * Default constructor - */ - public PortElementResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public PortElementResponse(PortElementResponse template) - { - super(template); - - if (template != null) - { - this.element = template.getElement(); - } - } - - - /** - * Return the element result. - * - * @return bean - */ - public PortElement getElement() - { - return element; - } - - - /** - * Set up the element result. - * - * @param element bean - */ - public void setElement(PortElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "PortElementResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof PortElementResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - PortElementResponse that = (PortElementResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(element); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/PortElementsResponse.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/PortElementsResponse.java deleted file mode 100644 index fc6fc73eec6..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/PortElementsResponse.java +++ /dev/null @@ -1,147 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.itinfrastructure.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.PortElement; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * PortElementsResponse is a response object for passing back a a list of glossaries - * or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class PortElementsResponse extends ITInfrastructureOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public PortElementsResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public PortElementsResponse(PortElementsResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elementList); - } - } - - - /** - * Set up the metadata element to return. - * - * @param elementList result object - */ - public void setElementList(List elementList) - { - this.elementList = elementList; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "PortElementsResponse{" + - "elementList=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - PortElementsResponse that = (PortElementsResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ProcessCallElementResponse.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ProcessCallElementResponse.java deleted file mode 100644 index e88bd585491..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ProcessCallElementResponse.java +++ /dev/null @@ -1,137 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.itinfrastructure.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.ProcessCallElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * ProcessCallElementResponse is the response structure used on the OMAS REST API calls that return the properties - * for a element. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ProcessCallElementResponse extends ITInfrastructureOMASAPIResponse -{ - private ProcessCallElement element = null; - - - /** - * Default constructor - */ - public ProcessCallElementResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ProcessCallElementResponse(ProcessCallElementResponse template) - { - super(template); - - if (template != null) - { - this.element = template.getElement(); - } - } - - - /** - * Return the element result. - * - * @return bean - */ - public ProcessCallElement getElement() - { - return element; - } - - - /** - * Set up the element result. - * - * @param element bean - */ - public void setElement(ProcessCallElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ProcessCallElementResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof ProcessCallElementResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ProcessCallElementResponse that = (ProcessCallElementResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(element); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ProcessCallElementsResponse.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ProcessCallElementsResponse.java deleted file mode 100644 index 67498d98e58..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ProcessCallElementsResponse.java +++ /dev/null @@ -1,147 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.itinfrastructure.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.ProcessCallElement; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ProcessCallElementsResponse is a response object for passing back a a list of process call relationships - * or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ProcessCallElementsResponse extends ITInfrastructureOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public ProcessCallElementsResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ProcessCallElementsResponse(ProcessCallElementsResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elementList); - } - } - - - /** - * Set up the metadata element to return. - * - * @param elementList result object - */ - public void setElementList(List elementList) - { - this.elementList = elementList; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ProcessCallElementsResponse{" + - "elementList=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ProcessCallElementsResponse that = (ProcessCallElementsResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ProcessCallRequestBody.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ProcessCallRequestBody.java deleted file mode 100644 index a22d161b025..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ProcessCallRequestBody.java +++ /dev/null @@ -1,127 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.rest; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.ProcessCallProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * ProcessCallRequestBody describes the request body used when linking elements within processes. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ProcessCallRequestBody extends EffectiveTimeMetadataSourceRequestBody -{ - private ProcessCallProperties properties = null; - - - /** - * Default constructor - */ - public ProcessCallRequestBody() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public ProcessCallRequestBody(ProcessCallRequestBody template) - { - super(template); - - if (template != null) - { - properties = template.getProperties(); - } - } - - - /** - * Return the properties for the relationship. - * - * @return properties object - */ - public ProcessCallProperties getProperties() - { - return properties; - } - - - /** - * Set up the properties for the relationship. - * - * @param properties properties object - */ - public void setProperties(ProcessCallProperties properties) - { - this.properties = properties; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ProcessCallRequestBody{" + - "properties=" + properties + - ", externalSourceGUID='" + getExternalSourceGUID() + '\'' + - ", externalSourceName='" + getExternalSourceName() + '\'' + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ProcessCallRequestBody that = (ProcessCallRequestBody) objectToCompare; - return Objects.equals(getProperties(), that.getProperties()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), properties); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ProcessElementResponse.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ProcessElementResponse.java deleted file mode 100644 index ff98530a809..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ProcessElementResponse.java +++ /dev/null @@ -1,137 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.itinfrastructure.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.ProcessElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * ProcessElementResponse is the response structure used on the OMAS REST API calls that return the properties - * for a element. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ProcessElementResponse extends ITInfrastructureOMASAPIResponse -{ - private ProcessElement element = null; - - - /** - * Default constructor - */ - public ProcessElementResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ProcessElementResponse(ProcessElementResponse template) - { - super(template); - - if (template != null) - { - this.element = template.getElement(); - } - } - - - /** - * Return the element result. - * - * @return bean - */ - public ProcessElement getElement() - { - return element; - } - - - /** - * Set up the element result. - * - * @param element bean - */ - public void setElement(ProcessElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ProcessElementResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof ProcessElementResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ProcessElementResponse that = (ProcessElementResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(element); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ProcessElementsResponse.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ProcessElementsResponse.java deleted file mode 100644 index 615914ff6d6..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ProcessElementsResponse.java +++ /dev/null @@ -1,147 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.itinfrastructure.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.ProcessElement; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ProcessElementsResponse is a response object for passing back a a list of glossaries - * or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ProcessElementsResponse extends ITInfrastructureOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public ProcessElementsResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ProcessElementsResponse(ProcessElementsResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elementList); - } - } - - - /** - * Set up the metadata element to return. - * - * @param elementList result object - */ - public void setElementList(List elementList) - { - this.elementList = elementList; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ProcessElementsResponse{" + - "elementList=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ProcessElementsResponse that = (ProcessElementsResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/RelatedAssetListResponse.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/RelatedAssetListResponse.java deleted file mode 100644 index 9d411ff5a24..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/RelatedAssetListResponse.java +++ /dev/null @@ -1,147 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.itinfrastructure.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.RelatedAssetElement; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * RelatedAssetListResponse is a response object for passing back a list of related assets with te properties from the relationship - * or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class RelatedAssetListResponse extends ITInfrastructureOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public RelatedAssetListResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public RelatedAssetListResponse(RelatedAssetListResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elementList); - } - } - - - /** - * Set up the metadata element to return. - * - * @param elementList result object - */ - public void setElementList(List elementList) - { - this.elementList = elementList; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "RelatedAssetListResponse{" + - "elementList=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - RelatedAssetListResponse that = (RelatedAssetListResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ServerAssetUseListResponse.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ServerAssetUseListResponse.java deleted file mode 100644 index 6fb785b87eb..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ServerAssetUseListResponse.java +++ /dev/null @@ -1,146 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.rest; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.ServerAssetUseElement; - -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ServerAssetUseListResponse returns a list of serverAssetUse relationships from the server. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ServerAssetUseListResponse extends ITInfrastructureOMASAPIResponse -{ - private List elements = null; - - - /** - * Default constructor - */ - public ServerAssetUseListResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ServerAssetUseListResponse(ServerAssetUseListResponse template) - { - super(template); - - if (template != null) - { - this.elements = template.getElements(); - } - } - - - /** - * Return the list of assets in the response. - * - * @return list of assets - */ - public List getElements() - { - if (elements == null) - { - return null; - } - else if (elements.isEmpty()) - { - return null; - } - else - { - return elements; - } - } - - - /** - * Set up the list of assets for the response. - * - * @param elements list of assets - */ - public void setElements(List elements) - { - this.elements = elements; - } - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ServerAssetUseListResponse{" + - "assets=" + elements + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - ServerAssetUseListResponse that = (ServerAssetUseListResponse) objectToCompare; - return Objects.equals(elements, that.elements); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elements); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ServerAssetUseResponse.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ServerAssetUseResponse.java deleted file mode 100644 index db7b932c450..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ServerAssetUseResponse.java +++ /dev/null @@ -1,135 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.itinfrastructure.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.ServerAssetUseElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ServerAssetUseResponse is a response object for passing back a single relationship between a software server - * capability and an asset (or an exception if the request failed). - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ServerAssetUseResponse extends ITInfrastructureOMASAPIResponse -{ - private ServerAssetUseElement element = null; - - - /** - * Default constructor - */ - public ServerAssetUseResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ServerAssetUseResponse(ServerAssetUseResponse template) - { - super(template); - - if (template != null) - { - element = template.getElement(); - } - } - - - /** - * Return the metadata element. - * - * @return result object - */ - public ServerAssetUseElement getElement() - { - return element; - } - - - /** - * Set up the metadata element to return. - * - * @param element result object - */ - public void setElement(ServerAssetUseElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ServerAssetUseResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ServerAssetUseResponse that = (ServerAssetUseResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/SoftwareCapabilityListResponse.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/SoftwareCapabilityListResponse.java deleted file mode 100644 index db5308ecd1c..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/SoftwareCapabilityListResponse.java +++ /dev/null @@ -1,147 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.itinfrastructure.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.SoftwareCapabilityElement; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * SoftwareCapabilityListResponse is a response object for passing back a a list of software server capabilities - * or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class SoftwareCapabilityListResponse extends ITInfrastructureOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public SoftwareCapabilityListResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public SoftwareCapabilityListResponse(SoftwareCapabilityListResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elementList); - } - } - - - /** - * Set up the metadata element to return. - * - * @param elementList result object - */ - public void setElementList(List elementList) - { - this.elementList = elementList; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "SoftwareCapabilityListResponse{" + - "elementList=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - SoftwareCapabilityListResponse that = (SoftwareCapabilityListResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/SoftwareCapabilityRequestBody.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/SoftwareCapabilityRequestBody.java deleted file mode 100644 index 2022c2992b9..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/SoftwareCapabilityRequestBody.java +++ /dev/null @@ -1,202 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.rest; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.SoftwareCapabilityProperties; - - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * SoftwareCapabilityRequestBody describes the properties of the software server capability for creation and update. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class SoftwareCapabilityRequestBody extends SoftwareCapabilityProperties -{ - private String externalSourceGUID = null; - private String externalSourceName = null; - private String classificationName = null; - - - /** - * Default constructor - */ - public SoftwareCapabilityRequestBody() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public SoftwareCapabilityRequestBody(SoftwareCapabilityRequestBody template) - { - super(template); - - if (template != null) - { - externalSourceGUID = template.getExternalSourceGUID(); - externalSourceName = template.getExternalSourceName(); - classificationName = template.getClassificationName(); - } - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public SoftwareCapabilityRequestBody(SoftwareCapabilityProperties template) - { - super(template); - } - - - /** - * Return the unique identifier of the software server capability entity that represented the external source - null for local. - * - * @return string guid - */ - public String getExternalSourceGUID() - { - return externalSourceGUID; - } - - - /** - * Set up the unique identifier of the software server capability entity that represented the external source - null for local. - * - * @param externalSourceGUID string guid - */ - public void setExternalSourceGUID(String externalSourceGUID) - { - this.externalSourceGUID = externalSourceGUID; - } - - - /** - * Return the unique name of the software server capability entity that represented the external source. - * - * @return string name - */ - public String getExternalSourceName() - { - return externalSourceName; - } - - - /** - * Set up the unique name of the software server capability entity that represented the external source. - * - * @param externalSourceName string name - */ - public void setExternalSourceName(String externalSourceName) - { - this.externalSourceName = externalSourceName; - } - - - /** - * Return the optional classification name for the software server capability. - * - * @return string name - */ - public String getClassificationName() - { - return classificationName; - } - - - /** - * Set up the optional classification name for the software server capability. - * - * @param classificationName string name - */ - public void setClassificationName(String classificationName) - { - this.classificationName = classificationName; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "SoftwareCapabilityRequestBody{" + - "externalSourceGUID='" + externalSourceGUID + '\'' + - ", externalSourceName='" + externalSourceName + '\'' + - ", classificationName='" + classificationName + '\'' + - ", displayName='" + getDisplayName() + '\'' + - ", description='" + getDescription() + '\'' + - ", typeDescription='" + getDeployedImplementationType() + '\'' + - ", version='" + getVersion() + '\'' + - ", patchLevel='" + getPatchLevel() + '\'' + - ", source='" + getSource() + '\'' + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - SoftwareCapabilityRequestBody that = (SoftwareCapabilityRequestBody) objectToCompare; - return Objects.equals(externalSourceGUID, that.externalSourceGUID) && - Objects.equals(externalSourceName, that.externalSourceName) && - Objects.equals(classificationName, that.classificationName); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), externalSourceGUID, externalSourceName, classificationName); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/SoftwareCapabilityResponse.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/SoftwareCapabilityResponse.java deleted file mode 100644 index ca8a5eab430..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/SoftwareCapabilityResponse.java +++ /dev/null @@ -1,135 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.itinfrastructure.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.SoftwareCapabilityElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * SoftwareCapabilityResponse is a response object for passing back a single software server capability - * element or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class SoftwareCapabilityResponse extends ITInfrastructureOMASAPIResponse -{ - private SoftwareCapabilityElement element = null; - - - /** - * Default constructor - */ - public SoftwareCapabilityResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public SoftwareCapabilityResponse(SoftwareCapabilityResponse template) - { - super(template); - - if (template != null) - { - element = template.getElement(); - } - } - - - /** - * Return the metadata element. - * - * @return result object - */ - public SoftwareCapabilityElement getElement() - { - return element; - } - - - /** - * Set up the metadata element to return. - * - * @param element result object - */ - public void setElement(SoftwareCapabilityElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "SoftwareCapabilityResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - SoftwareCapabilityResponse that = (SoftwareCapabilityResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/SoftwareServerListResponse.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/SoftwareServerListResponse.java deleted file mode 100644 index 122c5b82f3a..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/SoftwareServerListResponse.java +++ /dev/null @@ -1,147 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.itinfrastructure.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.SoftwareServerElement; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * SoftwareServerListResponse is a response object for passing back a a list of software servers - * or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class SoftwareServerListResponse extends ITInfrastructureOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public SoftwareServerListResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public SoftwareServerListResponse(SoftwareServerListResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elementList); - } - } - - - /** - * Set up the metadata element to return. - * - * @param elementList result object - */ - public void setElementList(List elementList) - { - this.elementList = elementList; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "SoftwareServerListResponse{" + - "elementList=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - SoftwareServerListResponse that = (SoftwareServerListResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/SoftwareServerPlatformListResponse.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/SoftwareServerPlatformListResponse.java deleted file mode 100644 index 934f9846efc..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/SoftwareServerPlatformListResponse.java +++ /dev/null @@ -1,147 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.itinfrastructure.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.SoftwareServerPlatformElement; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * SoftwareServerPlatformListResponse is a response object for passing back a a list of software server platforms - * or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class SoftwareServerPlatformListResponse extends ITInfrastructureOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public SoftwareServerPlatformListResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public SoftwareServerPlatformListResponse(SoftwareServerPlatformListResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elementList); - } - } - - - /** - * Set up the metadata element to return. - * - * @param elementList result object - */ - public void setElementList(List elementList) - { - this.elementList = elementList; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "SoftwareServerPlatformListResponse{" + - "elementList=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - SoftwareServerPlatformListResponse that = (SoftwareServerPlatformListResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/SoftwareServerPlatformResponse.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/SoftwareServerPlatformResponse.java deleted file mode 100644 index edf7fc8131d..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/SoftwareServerPlatformResponse.java +++ /dev/null @@ -1,135 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.itinfrastructure.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.SoftwareServerPlatformElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * SoftwareServerPlatformResponse is a response object for passing back a single software server platform - * element or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class SoftwareServerPlatformResponse extends ITInfrastructureOMASAPIResponse -{ - private SoftwareServerPlatformElement element = null; - - - /** - * Default constructor - */ - public SoftwareServerPlatformResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public SoftwareServerPlatformResponse(SoftwareServerPlatformResponse template) - { - super(template); - - if (template != null) - { - element = template.getElement(); - } - } - - - /** - * Return the metadata element. - * - * @return result object - */ - public SoftwareServerPlatformElement getElement() - { - return element; - } - - - /** - * Set up the metadata element to return. - * - * @param element result object - */ - public void setElement(SoftwareServerPlatformElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "SoftwareServerPlatformResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - SoftwareServerPlatformResponse that = (SoftwareServerPlatformResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/SoftwareServerResponse.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/SoftwareServerResponse.java deleted file mode 100644 index b0b1ebd709d..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/SoftwareServerResponse.java +++ /dev/null @@ -1,135 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.itinfrastructure.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.SoftwareServerElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * SoftwareServerResponse is a response object for passing back a single software server - * element or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class SoftwareServerResponse extends ITInfrastructureOMASAPIResponse -{ - private SoftwareServerElement element = null; - - - /** - * Default constructor - */ - public SoftwareServerResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public SoftwareServerResponse(SoftwareServerResponse template) - { - super(template); - - if (template != null) - { - element = template.getElement(); - } - } - - - /** - * Return the metadata element. - * - * @return result object - */ - public SoftwareServerElement getElement() - { - return element; - } - - - /** - * Set up the metadata element to return. - * - * @param element result object - */ - public void setElement(SoftwareServerElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "SoftwareServerResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - SoftwareServerResponse that = (SoftwareServerResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/SupportedCapabilityListResponse.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/SupportedCapabilityListResponse.java deleted file mode 100644 index 9f98b39ab4a..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/SupportedCapabilityListResponse.java +++ /dev/null @@ -1,146 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.rest; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.DeployedCapabilityElement; - -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * SupportedCapabilityListResponse returns a list of SoftwareServerSupportedCapability relationships from the server. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class SupportedCapabilityListResponse extends ITInfrastructureOMASAPIResponse -{ - private List elements = null; - - - /** - * Default constructor - */ - public SupportedCapabilityListResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public SupportedCapabilityListResponse(SupportedCapabilityListResponse template) - { - super(template); - - if (template != null) - { - this.elements = template.getElements(); - } - } - - - /** - * Return the list of assets in the response. - * - * @return list of assets - */ - public List getElements() - { - if (elements == null) - { - return null; - } - else if (elements.isEmpty()) - { - return null; - } - else - { - return elements; - } - } - - - /** - * Set up the list of assets for the response. - * - * @param elements list of assets - */ - public void setElements(List elements) - { - this.elements = elements; - } - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "SupportedCapabilityListResponse{" + - "assets=" + elements + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - SupportedCapabilityListResponse that = (SupportedCapabilityListResponse) objectToCompare; - return Objects.equals(elements, that.elements); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elements); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/UserIdentityListResponse.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/UserIdentityListResponse.java deleted file mode 100644 index 904d4c8c47a..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/UserIdentityListResponse.java +++ /dev/null @@ -1,148 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.UserIdentityElement; - -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * UserIdentityListResponse is the response structure used on the OMAS REST API calls that return a - * a list of user identity elements. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class UserIdentityListResponse extends ITInfrastructureOMASAPIResponse -{ - private List elements = null; - - - /** - * Default constructor - */ - public UserIdentityListResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public UserIdentityListResponse(UserIdentityListResponse template) - { - super(template); - - if (template != null) - { - this.elements = template.getElements(); - } - } - - - /** - * Return the user identity result. - * - * @return unique identifier - */ - public List getElements() - { - if (elements == null) - { - return null; - } - else if (elements.isEmpty()) - { - return null; - } - else - { - return elements; - } - } - - - /** - * Set up the user identity result. - * - * @param elements - unique identifier - */ - public void setElements(List elements) - { - this.elements = elements; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "UserIdentityListResponse{" + - "elements=" + elements + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof UserIdentityListResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - UserIdentityListResponse that = (UserIdentityListResponse) objectToCompare; - return Objects.equals(getElements(), that.getElements()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elements); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/UserIdentityRequestBody.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/UserIdentityRequestBody.java deleted file mode 100644 index d119176e07a..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/UserIdentityRequestBody.java +++ /dev/null @@ -1,124 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.UserIdentityProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * UserIdentityRequestBody provides the request body payload for working on UserIdentity entities and their - * link to profiles. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class UserIdentityRequestBody extends MetadataSourceRequestBody -{ - private UserIdentityProperties properties = null; - - /** - * Default constructor - */ - public UserIdentityRequestBody() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public UserIdentityRequestBody(UserIdentityRequestBody template) - { - super(template); - - if (template != null) - { - this.properties = template.getProperties(); - } - } - - - /** - * Return the properties for this user identity. - * - * @return properties bean - */ - public UserIdentityProperties getProperties() - { - return properties; - } - - - /** - * Set up the properties for this user identity. - * - * @param properties properties bean - */ - public void setProperties(UserIdentityProperties properties) - { - this.properties = properties; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "UserIdentityRequestBody{" + - "properties=" + properties + - ", externalSourceGUID='" + getExternalSourceGUID() + '\'' + - ", externalSourceName='" + getExternalSourceName() + '\'' + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - UserIdentityRequestBody that = (UserIdentityRequestBody) objectToCompare; - return Objects.equals(properties, that.properties); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), properties); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/UserIdentityResponse.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/UserIdentityResponse.java deleted file mode 100644 index cbf4ef83e4e..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/UserIdentityResponse.java +++ /dev/null @@ -1,136 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.UserIdentityElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * UserIdentityResponse is the response structure used on the OMAS REST API calls that return a - * UserIdentityElement object as a response. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class UserIdentityResponse extends ITInfrastructureOMASAPIResponse -{ - private UserIdentityElement element = null; - - - /** - * Default constructor - */ - public UserIdentityResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public UserIdentityResponse(UserIdentityResponse template) - { - super(template); - - if (template != null) - { - this.element = template.getElement(); - } - } - - - /** - * Return the element result. - * - * @return details of user identity - */ - public UserIdentityElement getElement() - { - return element; - } - - - /** - * Set up the element result. - * - * @param element details of user identity - */ - public void setElement(UserIdentityElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "UserIdentityResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof UserIdentityResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - UserIdentityResponse that = (UserIdentityResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/test/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/MockAPIResponse.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/test/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/MockAPIResponse.java deleted file mode 100644 index 7f7ff040d78..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/test/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/MockAPIResponse.java +++ /dev/null @@ -1,27 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.rest; - -/** - * MockAPIResponse enables the overridden methods of ITInfrastructureOMASAPIResponse to be tested. - */ -public class MockAPIResponse extends ITInfrastructureOMASAPIResponse -{ - /** - * Default constructor - */ - public MockAPIResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to clone - */ - public MockAPIResponse(MockAPIResponse template) - { - super(template); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/test/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/OMASAPIResponseTest.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/test/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/OMASAPIResponseTest.java deleted file mode 100644 index 0b5e61c14e1..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/test/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/OMASAPIResponseTest.java +++ /dev/null @@ -1,21 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.rest; - -import org.testng.annotations.Test; - -import static org.testng.Assert.assertTrue; - -/** - * Test the overridden methods of ITInfrastructureOMASAPIResponse - */ -public class OMASAPIResponseTest -{ - @Test public void TestToString() - { - MockAPIResponse testObject = new MockAPIResponse(); - - assertTrue(testObject.toString().contains("ITInfrastructureOMASAPIResponse")); - assertTrue(new MockAPIResponse(testObject).toString().contains("ITInfrastructureOMASAPIResponse")); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-client/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/client/CapabilityManagerClient.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-client/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/client/CapabilityManagerClient.java index 96cc5794a49..05838d23f71 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-client/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/client/CapabilityManagerClient.java +++ b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-client/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/client/CapabilityManagerClient.java @@ -5,29 +5,18 @@ import org.odpi.openmetadata.accessservices.itinfrastructure.api.SoftwareCapabilityManagerInterface; import org.odpi.openmetadata.accessservices.itinfrastructure.api.SoftwareServerCapabilityManagerInterface; import org.odpi.openmetadata.accessservices.itinfrastructure.client.rest.ITInfrastructureRESTClient; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.RelatedAssetElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.ServerAssetUseElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.SoftwareCapabilityElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.SoftwareServerCapabilityElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.CapabilityDeploymentProperties; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.ServerAssetUseProperties; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.RelatedAssetElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ServerAssetUseElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.SoftwareCapabilityElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.SoftwareServerCapabilityElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities.CapabilityDeploymentProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.infrastructure.ServerAssetUseProperties; import org.odpi.openmetadata.frameworks.openmetadata.enums.ServerAssetUseType; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.SoftwareCapabilityProperties; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.SoftwareServerCapabilityProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities.SoftwareCapabilityProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities.SoftwareServerCapabilityProperties; import org.odpi.openmetadata.accessservices.itinfrastructure.properties.TemplateProperties; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.MetadataSourceRequestBody; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.ServerAssetUseListResponse; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.ServerAssetUseRequestBody; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.ServerAssetUseResponse; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.SoftwareCapabilityRequestBody; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.SoftwareCapabilityListResponse; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.SoftwareCapabilityResponse; import org.odpi.openmetadata.accessservices.itinfrastructure.rest.TemplateRequestBody; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.UseTypeRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.EffectiveTimeRequestBody; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; @@ -734,7 +723,7 @@ public void removeSoftwareCapability(String userId, final String urlTemplate = serverPlatformURLRoot + capabilityURLTemplatePrefix + "/{2}/delete"; - MetadataSourceRequestBody requestBody = new MetadataSourceRequestBody(); + ExternalSourceRequestBody requestBody = new ExternalSourceRequestBody(); requestBody.setExternalSourceGUID(infrastructureManagerGUID); requestBody.setExternalSourceName(infrastructureManagerName); @@ -788,7 +777,7 @@ public List findSoftwareCapabilities(String userId, requestBody.setSearchString(searchString); requestBody.setSearchStringParameterName(searchStringParameterName); - SoftwareCapabilityListResponse restResult = restClient.callSoftwareServerCapabilityListPostRESTCall(methodName, + SoftwareCapabilitiesResponse restResult = restClient.callSoftwareServerCapabilitiesPostRESTCall(methodName, urlTemplate, requestBody, serverName, @@ -796,7 +785,7 @@ public List findSoftwareCapabilities(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -840,7 +829,7 @@ public List getSoftwareCapabilitiesByName(String user requestBody.setName(name); requestBody.setNamePropertyName(nameParameterName); - SoftwareCapabilityListResponse restResult = restClient.callSoftwareServerCapabilityListPostRESTCall(methodName, + SoftwareCapabilitiesResponse restResult = restClient.callSoftwareServerCapabilitiesPostRESTCall(methodName, urlTemplate, requestBody, serverName, @@ -848,7 +837,7 @@ public List getSoftwareCapabilitiesByName(String user startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -918,7 +907,7 @@ public List getDeployedSoftwareCapabilities(String us requestBody.setEffectiveTime(effectiveTime); - SoftwareCapabilityListResponse restResult = restClient.callSoftwareServerCapabilityListPostRESTCall(methodName, + SoftwareCapabilitiesResponse restResult = restClient.callSoftwareServerCapabilitiesPostRESTCall(methodName, urlTemplate, requestBody, serverName, @@ -927,7 +916,7 @@ public List getDeployedSoftwareCapabilities(String us startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -974,7 +963,7 @@ public List getSoftwareCapabilitiesForInfrastructureM requestBody.setEffectiveTime(effectiveTime); - SoftwareCapabilityListResponse restResult = restClient.callSoftwareServerCapabilityListPostRESTCall(methodName, + SoftwareCapabilitiesResponse restResult = restClient.callSoftwareServerCapabilitiesPostRESTCall(methodName, urlTemplate, requestBody, serverName, @@ -984,7 +973,7 @@ public List getSoftwareCapabilitiesForInfrastructureM startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -1163,7 +1152,7 @@ public void removeServerAssetUse(String userId, final String urlTemplate = serverPlatformURLRoot + assetUsesURLTemplatePrefix + "/{2}/delete"; - MetadataSourceRequestBody requestBody = new MetadataSourceRequestBody(); + ExternalSourceRequestBody requestBody = new ExternalSourceRequestBody(); requestBody.setExternalSourceGUID(infrastructureManagerGUID); requestBody.setExternalSourceName(infrastructureManagerName); @@ -1216,7 +1205,7 @@ public List getServerAssetUsesForCapability(String requestBody.setEffectiveTime(effectiveTime); requestBody.setUseType(useType); - ServerAssetUseListResponse restResult = restClient.callServerAssetUseListPostRESTCall(methodName, + ServerAssetUsesResponse restResult = restClient.callServerAssetUseListPostRESTCall(methodName, urlTemplate, requestBody, serverName, @@ -1269,7 +1258,7 @@ public List getCapabilityUsesForAsset(String requestBody.setEffectiveTime(effectiveTime); requestBody.setUseType(useType); - ServerAssetUseListResponse restResult = restClient.callServerAssetUseListPostRESTCall(methodName, + ServerAssetUsesResponse restResult = restClient.callServerAssetUseListPostRESTCall(methodName, urlTemplate, requestBody, serverName, @@ -1323,7 +1312,7 @@ public List getServerAssetUsesForElements(String userId, requestBody.setEffectiveTime(effectiveTime); - ServerAssetUseListResponse restResult = restClient.callServerAssetUseListPostRESTCall(methodName, + ServerAssetUsesResponse restResult = restClient.callServerAssetUseListPostRESTCall(methodName, urlTemplate, requestBody, serverName, diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-client/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/client/ConnectionManagerClient.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-client/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/client/ConnectionManagerClient.java index 31f9ae5df73..fca89b3173f 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-client/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/client/ConnectionManagerClient.java +++ b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-client/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/client/ConnectionManagerClient.java @@ -4,15 +4,11 @@ import org.odpi.openmetadata.accessservices.itinfrastructure.api.ConnectionsManagerInterface; import org.odpi.openmetadata.accessservices.itinfrastructure.client.rest.ITInfrastructureRESTClient; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.ConnectionElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.ConnectionProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ConnectionElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.ConnectionProperties; import org.odpi.openmetadata.accessservices.itinfrastructure.properties.TemplateProperties; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.AssetConnectionRequestBody; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.ConnectionRequestBody; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.ConnectionResponse; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.ConnectionsResponse; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.EmbeddedConnectionRequestBody; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.MetadataSourceRequestBody; +import org.odpi.openmetadata.commonservices.ffdc.rest.AssetConnectionRequestBody; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.odpi.openmetadata.accessservices.itinfrastructure.rest.TemplateRequestBody; import org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler; import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; @@ -34,11 +30,11 @@ public class ConnectionManagerClient implements ConnectionsManagerInterface private static final String connectionURLTemplatePrefix = "/servers/{0}/open-metadata/access-services/it-infrastructure/users/{1}/connections"; private static final String assetURLTemplatePrefix = "/servers/{0}/open-metadata/access-services/it-infrastructure/users/{1}/assets"; - private String serverName; /* Initialized in constructor */ - private String serverPlatformURLRoot; /* Initialized in constructor */ + private final String serverName; /* Initialized in constructor */ + private final String serverPlatformURLRoot; /* Initialized in constructor */ - private InvalidParameterHandler invalidParameterHandler = new InvalidParameterHandler(); - private ITInfrastructureRESTClient restClient; /* Initialized in constructor */ + private final InvalidParameterHandler invalidParameterHandler = new InvalidParameterHandler(); + private final ITInfrastructureRESTClient restClient; /* Initialized in constructor */ /** @@ -363,7 +359,7 @@ public void setupConnectorType(String userId, final String urlTemplate = serverPlatformURLRoot + connectionURLTemplatePrefix + "/{2}/connector-types/{3}"; - MetadataSourceRequestBody requestBody = new MetadataSourceRequestBody(); + ExternalSourceRequestBody requestBody = new ExternalSourceRequestBody(); requestBody.setExternalSourceGUID(infrastructureManagerGUID); requestBody.setExternalSourceName(infrastructureManagerName); @@ -410,7 +406,7 @@ public void clearConnectorType(String userId, final String urlTemplate = serverPlatformURLRoot + connectionURLTemplatePrefix + "/{2}/connector-types/{3}/delete"; - MetadataSourceRequestBody requestBody = new MetadataSourceRequestBody(); + ExternalSourceRequestBody requestBody = new ExternalSourceRequestBody(); requestBody.setExternalSourceGUID(infrastructureManagerGUID); requestBody.setExternalSourceName(infrastructureManagerName); @@ -457,7 +453,7 @@ public void setupEndpoint(String userId, final String urlTemplate = serverPlatformURLRoot + connectionURLTemplatePrefix + "/{2}/endpoints/{3}"; - MetadataSourceRequestBody requestBody = new MetadataSourceRequestBody(); + ExternalSourceRequestBody requestBody = new ExternalSourceRequestBody(); requestBody.setExternalSourceGUID(infrastructureManagerGUID); requestBody.setExternalSourceName(infrastructureManagerName); @@ -504,7 +500,7 @@ public void clearEndpoint(String userId, final String urlTemplate = serverPlatformURLRoot + connectionURLTemplatePrefix + "/{2}/endpoints/{3}/delete"; - MetadataSourceRequestBody requestBody = new MetadataSourceRequestBody(); + ExternalSourceRequestBody requestBody = new ExternalSourceRequestBody(); requestBody.setExternalSourceGUID(infrastructureManagerGUID); requestBody.setExternalSourceName(infrastructureManagerName); @@ -607,7 +603,7 @@ public void clearEmbeddedConnection(String userId, final String urlTemplate = serverPlatformURLRoot + connectionURLTemplatePrefix + "/{2}/embedded-connections/{3}/delete}"; - MetadataSourceRequestBody requestBody = new MetadataSourceRequestBody(); + ExternalSourceRequestBody requestBody = new ExternalSourceRequestBody(); requestBody.setExternalSourceGUID(infrastructureManagerGUID); requestBody.setExternalSourceName(infrastructureManagerName); @@ -704,7 +700,7 @@ public void clearAssetConnection(String userId, final String urlTemplate = serverPlatformURLRoot + assetURLTemplatePrefix + "/{2}/connections/{3}/delete"; - MetadataSourceRequestBody requestBody = new MetadataSourceRequestBody(); + ExternalSourceRequestBody requestBody = new ExternalSourceRequestBody(); requestBody.setExternalSourceGUID(infrastructureManagerGUID); requestBody.setExternalSourceName(infrastructureManagerName); @@ -747,7 +743,7 @@ public void removeConnection(String userId, final String urlTemplate = serverPlatformURLRoot + connectionURLTemplatePrefix + "/{2}/delete"; - MetadataSourceRequestBody requestBody = new MetadataSourceRequestBody(); + ExternalSourceRequestBody requestBody = new ExternalSourceRequestBody(); requestBody.setExternalSourceGUID(infrastructureManagerGUID); requestBody.setExternalSourceName(infrastructureManagerName); @@ -806,7 +802,7 @@ public List findConnections(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -855,7 +851,7 @@ public List getConnectionsByName(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-client/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/client/ConnectorTypeManagerClient.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-client/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/client/ConnectorTypeManagerClient.java index 4acacbbd1d5..afe50515c0f 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-client/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/client/ConnectorTypeManagerClient.java +++ b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-client/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/client/ConnectorTypeManagerClient.java @@ -4,13 +4,10 @@ import org.odpi.openmetadata.accessservices.itinfrastructure.api.ConnectorTypeManagerInterface; import org.odpi.openmetadata.accessservices.itinfrastructure.client.rest.ITInfrastructureRESTClient; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.ConnectorTypeElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.ConnectorTypeProperties; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ConnectorTypeElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.ConnectorTypeProperties; import org.odpi.openmetadata.accessservices.itinfrastructure.properties.TemplateProperties; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.ConnectorTypeRequestBody; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.ConnectorTypeResponse; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.ConnectorTypesResponse; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.MetadataSourceRequestBody; import org.odpi.openmetadata.accessservices.itinfrastructure.rest.TemplateRequestBody; import org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler; import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; @@ -30,11 +27,11 @@ public class ConnectorTypeManagerClient implements ConnectorTypeManagerInterface { private static final String connectorTypeURLTemplatePrefix = "/servers/{0}/open-metadata/access-services/it-infrastructure/users/{1}/connector-types"; - private String serverName; /* Initialized in constructor */ - private String serverPlatformURLRoot; /* Initialized in constructor */ + private final String serverName; /* Initialized in constructor */ + private final String serverPlatformURLRoot; /* Initialized in constructor */ - private InvalidParameterHandler invalidParameterHandler = new InvalidParameterHandler(); - private ITInfrastructureRESTClient restClient; /* Initialized in constructor */ + private final InvalidParameterHandler invalidParameterHandler = new InvalidParameterHandler(); + private final ITInfrastructureRESTClient restClient; /* Initialized in constructor */ /** @@ -356,7 +353,7 @@ public void removeConnectorType(String userId, final String urlTemplate = serverPlatformURLRoot + connectorTypeURLTemplatePrefix + "/{2}/delete"; - MetadataSourceRequestBody requestBody = new MetadataSourceRequestBody(); + ExternalSourceRequestBody requestBody = new ExternalSourceRequestBody(); requestBody.setExternalSourceGUID(infrastructureManagerGUID); requestBody.setExternalSourceName(infrastructureManagerName); @@ -415,7 +412,7 @@ public List findConnectorTypes(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -465,7 +462,7 @@ public List getConnectorTypesByName(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-client/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/client/DataAssetManagerClient.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-client/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/client/DataAssetManagerClient.java index 31a469094e9..72a35818197 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-client/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/client/DataAssetManagerClient.java +++ b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-client/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/client/DataAssetManagerClient.java @@ -4,10 +4,10 @@ import org.odpi.openmetadata.accessservices.itinfrastructure.api.DataAssetManagerInterface; import org.odpi.openmetadata.accessservices.itinfrastructure.client.rest.ITInfrastructureRESTClient; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.AssetElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.DataAssetElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.AssetProperties; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.DataAssetProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.AssetElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.DataAssetElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.AssetProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.DataAssetProperties; import org.odpi.openmetadata.accessservices.itinfrastructure.properties.TemplateProperties; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-client/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/client/EndpointManagerClient.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-client/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/client/EndpointManagerClient.java index df22e368696..2221309d03a 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-client/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/client/EndpointManagerClient.java +++ b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-client/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/client/EndpointManagerClient.java @@ -4,18 +4,12 @@ import org.odpi.openmetadata.accessservices.itinfrastructure.api.EndpointManagerInterface; import org.odpi.openmetadata.accessservices.itinfrastructure.client.rest.ITInfrastructureRESTClient; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.EndpointElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.EndpointProperties; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.EndpointElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.EndpointProperties; import org.odpi.openmetadata.accessservices.itinfrastructure.properties.TemplateProperties; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.EndpointRequestBody; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.EndpointResponse; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.EndpointsResponse; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.MetadataSourceRequestBody; import org.odpi.openmetadata.accessservices.itinfrastructure.rest.TemplateRequestBody; import org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; @@ -30,11 +24,11 @@ public class EndpointManagerClient implements EndpointManagerInterface { private static final String endpointURLTemplatePrefix = "/servers/{0}/open-metadata/access-services/it-infrastructure/users/{1}/endpoints"; - private String serverName; /* Initialized in constructor */ - private String serverPlatformURLRoot; /* Initialized in constructor */ + private final String serverName; /* Initialized in constructor */ + private final String serverPlatformURLRoot; /* Initialized in constructor */ - private InvalidParameterHandler invalidParameterHandler = new InvalidParameterHandler(); - private ITInfrastructureRESTClient restClient; /* Initialized in constructor */ + private final InvalidParameterHandler invalidParameterHandler = new InvalidParameterHandler(); + private final ITInfrastructureRESTClient restClient; /* Initialized in constructor */ /** @@ -396,7 +390,7 @@ public void removeEndpoint(String userId, final String urlTemplate = serverPlatformURLRoot + endpointURLTemplatePrefix + "/{2}/delete"; - MetadataSourceRequestBody requestBody = new MetadataSourceRequestBody(); + ExternalSourceRequestBody requestBody = new ExternalSourceRequestBody(); requestBody.setExternalSourceGUID(infrastructureManagerGUID); requestBody.setExternalSourceName(infrastructureManagerName); @@ -454,7 +448,7 @@ public List findEndpoints(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -503,7 +497,7 @@ public List getEndpointsByName(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -552,7 +546,7 @@ public List getEndpointsByNetworkAddress(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -595,7 +589,7 @@ public List getEndpointsForInfrastructure(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-client/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/client/HostManagerClient.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-client/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/client/HostManagerClient.java index e3f0d1be19e..926686715f7 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-client/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/client/HostManagerClient.java +++ b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-client/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/client/HostManagerClient.java @@ -4,11 +4,11 @@ import org.odpi.openmetadata.accessservices.itinfrastructure.api.HostManagerInterface; import org.odpi.openmetadata.accessservices.itinfrastructure.client.rest.ITInfrastructureRESTClient; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.AssetElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.HostElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.RelatedAssetElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.AssetProperties; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.HostProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.AssetElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.HostElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.RelatedAssetElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.AssetProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.infrastructure.HostProperties; import org.odpi.openmetadata.accessservices.itinfrastructure.properties.TemplateProperties; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-client/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/client/ITInfrastructureClientBase.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-client/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/client/ITInfrastructureClientBase.java index fa8aa3d1849..2237d09f2a5 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-client/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/client/ITInfrastructureClientBase.java +++ b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-client/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/client/ITInfrastructureClientBase.java @@ -5,34 +5,22 @@ import org.odpi.openmetadata.accessservices.itinfrastructure.api.DeploymentManagementInterface; import org.odpi.openmetadata.accessservices.itinfrastructure.api.ServerPurposeManagerInterface; import org.odpi.openmetadata.accessservices.itinfrastructure.client.rest.ITInfrastructureRESTClient; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.AssetElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.AssetRelationshipElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.DeploymentElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.RelatedAssetElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.AssetProperties; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.DeploymentProperties; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.TemplateProperties; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.AssetExtensionsRequestBody; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.AssetListResponse; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.AssetRelationshipListResponse; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.AssetRequestBody; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.AssetResponse; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.EffectiveTimeMetadataSourceRequestBody; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.ElementStatusRequestBody; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.MetadataSourceRequestBody; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.RelatedAssetListResponse; import org.odpi.openmetadata.accessservices.itinfrastructure.rest.TemplateRequestBody; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.AssetElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.AssetRelationshipElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.DeploymentElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.RelatedAssetElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.AssetProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.infrastructure.DeploymentProperties; +import org.odpi.openmetadata.accessservices.itinfrastructure.properties.TemplateProperties; +import org.odpi.openmetadata.commonservices.ffdc.rest.AssetRelationshipsResponse; import org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler; -import org.odpi.openmetadata.commonservices.ffdc.rest.EffectiveTimeRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.NullRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStatus; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ElementStatus; import java.util.ArrayList; import java.util.Date; @@ -303,7 +291,7 @@ String createAssetFromTemplate(String userId, final String urlTemplate = serverPlatformURLRoot + assetURLTemplatePrefix + "/from-template/{2}?infrastructureManagerIsHome={3}"; - TemplateRequestBody requestBody = new TemplateRequestBody(templateProperties); + TemplateRequestBody requestBody = new TemplateRequestBody(); requestBody.setExternalSourceGUID(infrastructureManagerGUID); requestBody.setExternalSourceName(infrastructureManagerName); @@ -585,7 +573,7 @@ void clearRelatedAsset(String userId, final String urlTemplate = serverPlatformURLRoot + assetURLTemplatePrefix + "/" + assetTypeName + "/{2}/" + relationshipTypeName + "/" + relatedAssetTypeName + "/{3}/delete"; - EffectiveTimeMetadataSourceRequestBody requestBody = new EffectiveTimeMetadataSourceRequestBody(); + org.odpi.openmetadata.commonservices.ffdc.rest.EffectiveTimeQueryRequestBody requestBody = new org.odpi.openmetadata.commonservices.ffdc.rest.EffectiveTimeQueryRequestBody(); requestBody.setExternalSourceGUID(infrastructureManagerGUID); requestBody.setExternalSourceName(infrastructureManagerName); @@ -758,7 +746,7 @@ void clearClassification(String userId, final String urlTemplate = serverPlatformURLRoot + assetURLTemplatePrefix + "/" + assetTypeName + "/{2}/declassify/" + classificationName; - EffectiveTimeMetadataSourceRequestBody requestBody = new EffectiveTimeMetadataSourceRequestBody(); + EffectiveTimeQueryRequestBody requestBody = new EffectiveTimeQueryRequestBody(); requestBody.setExternalSourceGUID(infrastructureManagerGUID); requestBody.setExternalSourceName(infrastructureManagerName); @@ -871,7 +859,7 @@ void removeAsset(String userId, final String urlTemplate = serverPlatformURLRoot + assetURLTemplatePrefix + "/{2}/delete"; - MetadataSourceRequestBody requestBody = new MetadataSourceRequestBody(); + ExternalSourceRequestBody requestBody = new ExternalSourceRequestBody(); requestBody.setExternalSourceGUID(infrastructureManagerGUID); requestBody.setExternalSourceName(infrastructureManagerName); @@ -927,15 +915,15 @@ List findAssets(String userId, requestBody.setSearchString(searchString); requestBody.setSearchStringParameterName(searchStringParameterName); - AssetListResponse restResult = restClient.callAssetListPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - startFrom, - validatedPageSize); + AssetElementsResponse restResult = restClient.callAssetElementsPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + startFrom, + validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -981,15 +969,15 @@ List getAssetsByName(String userId, requestBody.setName(name); requestBody.setNamePropertyName(nameParameterName); - AssetListResponse restResult = restClient.callAssetListPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - startFrom, - validatedPageSize); + AssetElementsResponse restResult = restClient.callAssetElementsPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + startFrom, + validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -1035,15 +1023,15 @@ List getAssetsByDeployedImplementationType(String userId, requestBody.setName(name); requestBody.setNamePropertyName(nameParameterName); - AssetListResponse restResult = restClient.callAssetListPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - startFrom, - validatedPageSize); + AssetElementsResponse restResult = restClient.callAssetElementsPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + startFrom, + validatedPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -1091,17 +1079,17 @@ List getAssetsForInfrastructureManager(String userId, requestBody.setEffectiveTime(effectiveTime); - AssetListResponse restResult = restClient.callAssetListPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - infrastructureManagerGUID, - infrastructureManagerName, - startFrom, - validatedPageSize); - - return restResult.getElementList(); + AssetElementsResponse restResult = restClient.callAssetElementsPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + infrastructureManagerGUID, + infrastructureManagerName, + startFrom, + validatedPageSize); + + return restResult.getElements(); } @@ -1138,7 +1126,7 @@ AssetElement getAssetByGUID(String userId, final String urlTemplate = serverPlatformURLRoot + assetURLTemplatePrefix + "/" + assetTypeName + "/{2}"; - AssetResponse restResult = restClient.callAssetPostRESTCall(methodName, + AssetElementResponse restResult = restClient.callAssetPostRESTCall(methodName, urlTemplate, requestBody, serverName, @@ -1192,17 +1180,17 @@ List getAssetRelationships(String userId, requestBody.setEffectiveTime(effectiveTime); - AssetRelationshipListResponse restResult = restClient.callAssetRelationshipListPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - assetGUID, - startingEnd, - startFrom, - validatedPageSize); - - return restResult.getElementList(); + AssetRelationshipsResponse restResult = restClient.callAssetRelationshipsPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + assetGUID, + startingEnd, + startFrom, + validatedPageSize); + + return restResult.getElements(); } @@ -1248,17 +1236,17 @@ List getRelatedAssets(String userId, requestBody.setEffectiveTime(effectiveTime); - RelatedAssetListResponse restResult = restClient.callRelatedAssetListPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - assetGUID, - startingEnd, - startFrom, - validatedPageSize); - - return restResult.getElementList(); + RelatedAssetsResponse restResult = restClient.callRelatedAssetsPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + assetGUID, + startingEnd, + startFrom, + validatedPageSize); + + return restResult.getElements(); } diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-client/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/client/ITProfileManagerClient.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-client/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/client/ITProfileManagerClient.java index d3c9c011874..d4601abe0f6 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-client/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/client/ITProfileManagerClient.java +++ b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-client/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/client/ITProfileManagerClient.java @@ -4,28 +4,16 @@ package org.odpi.openmetadata.accessservices.itinfrastructure.client; import org.odpi.openmetadata.accessservices.itinfrastructure.client.rest.ITInfrastructureRESTClient; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.ITProfileElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.UserIdentityElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.ITProfileProperties; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.ContactMethodProperties; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.ProfileIdentityProperties; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.UserIdentityProperties; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.EffectiveDatesRequestBody; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.EffectiveTimeMetadataSourceRequestBody; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.ITProfileListResponse; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.ITProfileRequestBody; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.ITProfileResponse; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.ContactMethodRequestBody; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.MetadataSourceRequestBody; +import org.odpi.openmetadata.commonservices.ffdc.rest.ProfileIdentityRequestBody; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ITProfileElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.UserIdentityElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.ITProfileProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.ContactMethodProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.ProfileIdentityProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.UserIdentityProperties; import org.odpi.openmetadata.accessservices.itinfrastructure.api.ITProfileManagerInterface; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.ProfileIdentityRequestBody; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.UserIdentityListResponse; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.UserIdentityRequestBody; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.UserIdentityResponse; import org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; @@ -302,7 +290,7 @@ public void deleteITProfile(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/profiles/{2}/delete"; - MetadataSourceRequestBody requestBody = new MetadataSourceRequestBody(); + ExternalSourceRequestBody requestBody = new ExternalSourceRequestBody(); requestBody.setExternalSourceGUID(externalSourceGUID); requestBody.setExternalSourceName(externalSourceName); @@ -388,7 +376,7 @@ public void deleteContactMethod(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/profiles/contact-methods/{2}/delete"; - MetadataSourceRequestBody requestBody = new MetadataSourceRequestBody(); + ExternalSourceRequestBody requestBody = new ExternalSourceRequestBody(); requestBody.setExternalSourceGUID(externalSourceGUID); requestBody.setExternalSourceName(externalSourceName); @@ -522,7 +510,7 @@ public void unlinkITInfrastructureFromProfile(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/assets/{2}/profiles/{3}/unlink"; - EffectiveTimeMetadataSourceRequestBody requestBody = new EffectiveTimeMetadataSourceRequestBody(); + EffectiveTimeQueryRequestBody requestBody = new EffectiveTimeQueryRequestBody(); requestBody.setExternalSourceGUID(externalSourceGUID); requestBody.setExternalSourceName(externalSourceName); @@ -546,9 +534,9 @@ public void unlinkITInfrastructureFromProfile(String userId, */ @Override public ITProfileElement getITProfileByGUID(String userId, - String itProfileGUID) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException + String itProfileGUID) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException { final String methodName = "getITProfileByGUID"; final String guidParameterName = "itProfileGUID"; @@ -641,13 +629,13 @@ public List getITProfileByName(String userId, requestBody.setNamePropertyName(namePropertyName); requestBody.setNameParameterName(nameParameterName); - ITProfileListResponse restResult = restClient.callITProfileListPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - Integer.toString(startFrom), - Integer.toString(pageSize)); + ITProfilesResponse restResult = restClient.callITProfileListPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + Integer.toString(startFrom), + Integer.toString(pageSize)); return restResult.getElements(); } @@ -688,13 +676,13 @@ public List findITProfile(String userId, requestBody.setSearchString(searchString); requestBody.setSearchStringParameterName(searchStringParameterName); - ITProfileListResponse restResult = restClient.callITProfileListPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - Integer.toString(startFrom), - Integer.toString(pageSize)); + ITProfilesResponse restResult = restClient.callITProfileListPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + Integer.toString(startFrom), + Integer.toString(pageSize)); return restResult.getElements(); } @@ -828,7 +816,7 @@ public void deleteUserIdentity(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/{2}/delete"; - MetadataSourceRequestBody requestBody = new MetadataSourceRequestBody(); + ExternalSourceRequestBody requestBody = new ExternalSourceRequestBody(); requestBody.setExternalSourceGUID(externalSourceGUID); requestBody.setExternalSourceName(externalSourceName); @@ -961,7 +949,7 @@ public void removeIdentityFromProfile(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/{2}/profiles/{3}/unlink"; - MetadataSourceRequestBody requestBody = new MetadataSourceRequestBody(); + ExternalSourceRequestBody requestBody = new ExternalSourceRequestBody(); requestBody.setExternalSourceGUID(externalSourceGUID); requestBody.setExternalSourceName(externalSourceName); @@ -1006,13 +994,13 @@ public List findUserIdentities(String userId, requestBody.setSearchString(searchString); requestBody.setSearchStringParameterName(searchStringParameterName); - UserIdentityListResponse restResult = restClient.callUserIdentityListPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - Integer.toString(startFrom), - Integer.toString(pageSize)); + UserIdentitiesResponse restResult = restClient.callUserIdentityListPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + Integer.toString(startFrom), + Integer.toString(pageSize)); return restResult.getElements(); } @@ -1056,13 +1044,13 @@ public List getUserIdentitiesByName(String userId, requestBody.setNamePropertyName(namePropertyName); requestBody.setNameParameterName(nameParameterName); - UserIdentityListResponse restResult = restClient.callUserIdentityListPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - Integer.toString(startFrom), - Integer.toString(pageSize)); + UserIdentitiesResponse restResult = restClient.callUserIdentityListPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + Integer.toString(startFrom), + Integer.toString(pageSize)); return restResult.getElements(); } diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-client/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/client/PlatformManagerClient.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-client/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/client/PlatformManagerClient.java index 33869749eaf..66ad1629ec3 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-client/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/client/PlatformManagerClient.java +++ b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-client/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/client/PlatformManagerClient.java @@ -4,10 +4,10 @@ import org.odpi.openmetadata.accessservices.itinfrastructure.api.SoftwareServerPlatformManagerInterface; import org.odpi.openmetadata.accessservices.itinfrastructure.client.rest.ITInfrastructureRESTClient; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.AssetElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.SoftwareServerPlatformElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.AssetProperties; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.SoftwareServerPlatformProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.AssetElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.SoftwareServerPlatformElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.AssetProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.infrastructure.SoftwareServerPlatformProperties; import org.odpi.openmetadata.accessservices.itinfrastructure.properties.TemplateProperties; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-client/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/client/ProcessManagerClient.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-client/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/client/ProcessManagerClient.java index f10a8f0a8d8..7eca433a4ae 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-client/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/client/ProcessManagerClient.java +++ b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-client/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/client/ProcessManagerClient.java @@ -4,43 +4,22 @@ import org.odpi.openmetadata.accessservices.itinfrastructure.api.ProcessManagerInterface; import org.odpi.openmetadata.accessservices.itinfrastructure.client.rest.ITInfrastructureRESTClient; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.AssetElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.ControlFlowElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.DataFlowElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.LineageMappingElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.ProcessCallElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.ProcessElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.RelatedAssetElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.AssetProperties; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.ControlFlowProperties; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.DataFlowProperties; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.LineageMappingProperties; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.ProcessCallProperties; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ProcessStatus; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.AssetProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.lineage.ControlFlowProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.lineage.DataFlowProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.lineage.LineageMappingProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.lineage.ProcessCallProperties; import org.odpi.openmetadata.frameworks.openmetadata.enums.ProcessContainmentType; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.ProcessProperties; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.ProcessStatus; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.processes.ProcessProperties; import org.odpi.openmetadata.accessservices.itinfrastructure.properties.TemplateProperties; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.ControlFlowElementResponse; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.ControlFlowElementsResponse; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.ControlFlowRequestBody; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.DataFlowElementResponse; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.DataFlowElementsResponse; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.DataFlowRequestBody; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.EffectiveTimeMetadataSourceRequestBody; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.LineageMappingElementResponse; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.LineageMappingElementsResponse; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.LineageMappingRequestBody; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.ProcessCallElementResponse; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.ProcessCallElementsResponse; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.ProcessCallRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.EffectiveTimeRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStatus; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ElementStatus; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import java.util.ArrayList; @@ -918,7 +897,7 @@ public void clearDataFlow(String userId, final String urlTemplate = serverPlatformURLRoot + baseURLTemplatePrefix + "/data-flows/{2}/remove"; - EffectiveTimeMetadataSourceRequestBody requestBody = new EffectiveTimeMetadataSourceRequestBody(); + EffectiveTimeQueryRequestBody requestBody = new EffectiveTimeQueryRequestBody(); requestBody.setExternalSourceGUID(infrastructureManagerGUID); requestBody.setExternalSourceName(infrastructureManagerName); requestBody.setEffectiveTime(effectiveTime); @@ -977,7 +956,7 @@ public List getDataFlowConsumers(String userId, startFrom, pageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -1026,7 +1005,7 @@ public List getDataFlowSuppliers(String userId, startFrom, pageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -1224,7 +1203,7 @@ public void clearControlFlow(String userId, final String urlTemplate = serverPlatformURLRoot + baseURLTemplatePrefix + "/control-flows/{2}/remove"; - EffectiveTimeMetadataSourceRequestBody requestBody = new EffectiveTimeMetadataSourceRequestBody(); + EffectiveTimeQueryRequestBody requestBody = new EffectiveTimeQueryRequestBody(); requestBody.setExternalSourceGUID(infrastructureManagerGUID); requestBody.setExternalSourceName(infrastructureManagerName); requestBody.setEffectiveTime(effectiveTime); @@ -1283,7 +1262,7 @@ public List getControlFlowNextSteps(String userId, startFrom, pageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -1332,7 +1311,7 @@ public List getControlFlowPreviousSteps(String userId, startFrom, pageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -1528,7 +1507,7 @@ public void clearProcessCall(String userId, final String urlTemplate = serverPlatformURLRoot + baseURLTemplatePrefix + "/process-calls/{2}/remove"; - EffectiveTimeMetadataSourceRequestBody requestBody = new EffectiveTimeMetadataSourceRequestBody(); + EffectiveTimeQueryRequestBody requestBody = new EffectiveTimeQueryRequestBody(); requestBody.setExternalSourceGUID(infrastructureManagerGUID); requestBody.setExternalSourceName(infrastructureManagerName); requestBody.setEffectiveTime(effectiveTime); @@ -1586,7 +1565,7 @@ public List getProcessCalled(String userId, startFrom, pageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -1634,7 +1613,7 @@ public List getProcessCallers(String userId, startFrom, pageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -1819,7 +1798,7 @@ public void clearLineageMapping(String userId, final String urlTemplate = serverPlatformURLRoot + baseURLTemplatePrefix + "/lineage-mappings/{2}/remove"; - EffectiveTimeMetadataSourceRequestBody requestBody = new EffectiveTimeMetadataSourceRequestBody(); + EffectiveTimeQueryRequestBody requestBody = new EffectiveTimeQueryRequestBody(); requestBody.setEffectiveTime(effectiveTime); restClient.callVoidPostRESTCall(methodName, @@ -1875,7 +1854,7 @@ public List getDestinationLineageMappings(String userId, startFrom, pageSize); - return results.getElementList(); + return results.getElements(); } @@ -1923,7 +1902,7 @@ public List getSourceLineageMappings(String userId, startFrom, pageSize); - return results.getElementList(); + return results.getElements(); } diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-client/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/client/ServerManagerClient.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-client/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/client/ServerManagerClient.java index f6891e4963d..5e32c370265 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-client/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/client/ServerManagerClient.java +++ b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-client/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/client/ServerManagerClient.java @@ -4,11 +4,10 @@ import org.odpi.openmetadata.accessservices.itinfrastructure.api.SoftwareServerManagerInterface; import org.odpi.openmetadata.accessservices.itinfrastructure.client.rest.ITInfrastructureRESTClient; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.AssetElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.SoftwareServerElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.SoftwareServerPlatformElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.AssetProperties; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.SoftwareServerProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.AssetElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.SoftwareServerElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.AssetProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.infrastructure.SoftwareServerProperties; import org.odpi.openmetadata.accessservices.itinfrastructure.properties.TemplateProperties; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-client/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/client/rest/ITInfrastructureRESTClient.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-client/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/client/rest/ITInfrastructureRESTClient.java index f5204b989b1..810d155addc 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-client/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/client/rest/ITInfrastructureRESTClient.java +++ b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-client/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/client/rest/ITInfrastructureRESTClient.java @@ -3,7 +3,7 @@ package org.odpi.openmetadata.accessservices.itinfrastructure.client.rest; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.*; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.client.OCFRESTClient; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; @@ -88,649 +88,8 @@ public ITInfrastructureRESTClient(String serverName, super(serverName, serverPlatformURLRoot, userId, password); } - - - - /** - * Issue a GET REST call that returns a ConnectionResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return ConnectionResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public ConnectionResponse callConnectionGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ConnectionResponse restResult = this.callGetRESTCall(methodName, ConnectionResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a POST REST call that returns a ConnectionsResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return ConnectionsResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public ConnectionsResponse callConnectionsGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ConnectionsResponse restResult = this.callGetRESTCall(methodName, ConnectionsResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - - /** - * Issue a POST REST call that returns a ConnectionsResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param requestBody properties describing the valid value definition/set - * @param params a list of parameters that are slotted into the url template. - * - * @return ConnectionsResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public ConnectionsResponse callConnectionsPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ConnectionsResponse restResult = this.callPostRESTCall(methodName, ConnectionsResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a ConnectorReportResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return ConnectorReportResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public ConnectorTypeResponse callConnectorTypeGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ConnectorTypeResponse restResult = this.callGetRESTCall(methodName, ConnectorTypeResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a POST REST call that returns a ConnectorTypesResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param requestBody properties describing the valid value definition/set - * @param params a list of parameters that are slotted into the url template. - * - * @return ConnectorTypesResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public ConnectorTypesResponse callConnectorTypesPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ConnectorTypesResponse restResult = this.callPostRESTCall(methodName, ConnectorTypesResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - - - /** - * Issue a GET REST call that returns a EndpointResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return EndpointResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public EndpointResponse callEndpointGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - EndpointResponse restResult = this.callGetRESTCall(methodName, EndpointResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a EndpointsResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return EndpointsResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public EndpointsResponse callEndpointsGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - EndpointsResponse restResult = this.callGetRESTCall(methodName, EndpointsResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - - /** - * Issue a POST REST call that returns a EndpointsResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param requestBody properties describing the valid value definition/set - * @param params a list of parameters that are slotted into the url template. - * - * @return EndpointsResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public EndpointsResponse callEndpointsPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - EndpointsResponse restResult = this.callPostRESTCall(methodName, EndpointsResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a ElementStubResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public ElementStubResponse callElementStubGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ElementStubResponse restResult = this.callGetRESTCall(methodName, ElementStubResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a ITProfileElement in a response object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException something went wrong with the REST call stack. - */ - public ITProfileResponse callITProfileGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ITProfileResponse restResult = this.callGetRESTCall(methodName, ITProfileResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a list of ITProfileElements in a response object. - * - * @param methodName name of the method being called - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters - * @param params a list of parameters that are slotted into the url template - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException something went wrong with the REST call stack. - */ - public ITProfileListResponse callITProfileListGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ITProfileListResponse restResult = this.callGetRESTCall(methodName, ITProfileListResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a list of ITProfileElements in a response object. - * - * @param methodName name of the method being called - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters - * @param requestBody request body for the request - * @param params a list of parameters that are slotted into the url template - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException something went wrong with the REST call stack. - */ - public ITProfileListResponse callITProfileListPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ITProfileListResponse restResult = this.callPostRESTCall(methodName, ITProfileListResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - - /** - * Issue a GET REST call that returns a UserIdentityElement in a response object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return UserIdentityResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException something went wrong with the REST call stack. - */ - public UserIdentityResponse callUserIdentityGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - UserIdentityResponse restResult = this.callGetRESTCall(methodName, UserIdentityResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a list of UserIdentityElements in a response object. - * - * @param methodName name of the method being called - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters - * @param params a list of parameters that are slotted into the url template - * @return UserIdentityListResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException something went wrong with the REST call stack. - */ - public UserIdentityListResponse callUserIdentityListGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - UserIdentityListResponse restResult = this.callGetRESTCall(methodName, UserIdentityListResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a POST REST call that returns a list of UserIdentityElements in a response object. - * - * @param methodName name of the method being called - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters - * @param requestBody request body for the request - * @param params a list of parameters that are slotted into the url template - * @return UserIdentityListResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException something went wrong with the REST call stack. - */ - public UserIdentityListResponse callUserIdentityListPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - UserIdentityListResponse restResult = this.callPostRESTCall(methodName, UserIdentityListResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a SoftwareCapabilityElement in a response object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException something went wrong with the REST call stack. - */ - public SoftwareCapabilityResponse callSoftwareServerCapabilityGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - SoftwareCapabilityResponse restResult = this.callGetRESTCall(methodName, SoftwareCapabilityResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a list of SoftwareServerCapabilityElements in a response object. - * - * @param methodName name of the method being called - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters - * @param params a list of parameters that are slotted into the url template - * @return response objects - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException something went wrong with the REST call stack. - */ - public SoftwareCapabilityListResponse callSoftwareServerCapabilityListGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - SoftwareCapabilityListResponse restResult = this.callGetRESTCall(methodName, SoftwareCapabilityListResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a POST REST call that returns a list of SoftwareServerCapabilityElements in a response object. - * - * @param methodName name of the method being called - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters - * @param requestBody request body for the request - * @param params a list of parameters that are slotted into the url template - * @return response objects - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException something went wrong with the REST call stack. - */ - public SoftwareCapabilityListResponse callSoftwareServerCapabilityListPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - SoftwareCapabilityListResponse restResult = this.callPostRESTCall(methodName, SoftwareCapabilityListResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns an AssetElement in a response object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException something went wrong with the REST call stack. - */ - public AssetResponse callAssetGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - AssetResponse restResult = this.callGetRESTCall(methodName, AssetResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a POST REST call that returns an asset in a response object. - * - * @param methodName name of the method being called - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters - * @param requestBody request body for the request - * @param params a list of parameters that are slotted into the url template - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException something went wrong with the REST call stack. - */ - public AssetResponse callAssetPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - AssetResponse restResult = this.callPostRESTCall(methodName, AssetResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a list of AssetElements in a response object. - * - * @param methodName name of the method being called - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters - * @param params a list of parameters that are slotted into the url template - * @return response objects - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException something went wrong with the REST call stack. - */ - public AssetListResponse callAssetListGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - AssetListResponse restResult = this.callGetRESTCall(methodName, AssetListResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a POST REST call that returns a list of AssetElements in a response object. - * - * @param methodName name of the method being called - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters - * @param requestBody request body for the request - * @param params a list of parameters that are slotted into the url template - * @return response objects - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException something went wrong with the REST call stack. - */ - public AssetListResponse callAssetListPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - AssetListResponse restResult = this.callPostRESTCall(methodName, AssetListResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a POST REST call that returns a list of AssetRelationshipListResponse in a response object. - * - * @param methodName name of the method being called - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters - * @param requestBody request body for the request - * @param params a list of parameters that are slotted into the url template - * @return response objects - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException something went wrong with the REST call stack. - */ - public AssetRelationshipListResponse callAssetRelationshipListPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - AssetRelationshipListResponse restResult = this.callPostRESTCall(methodName, AssetRelationshipListResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a POST REST call that returns a list of RelatedAssetElements in a response object. - * - * @param methodName name of the method being called - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters - * @param requestBody request body for the request - * @param params a list of parameters that are slotted into the url template - * @return response objects - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException something went wrong with the REST call stack. - */ - public RelatedAssetListResponse callRelatedAssetListPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - RelatedAssetListResponse restResult = this.callPostRESTCall(methodName, RelatedAssetListResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - /** - * Issue a GET REST call that returns a ServerAssetUseElement in a response object. + * Issue a GET REST call that returns an AssetElement in a response object. * * @param methodName name of the method being called. * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. @@ -741,38 +100,13 @@ public RelatedAssetListResponse callRelatedAssetListPostRESTCall(String metho * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException something went wrong with the REST call stack. */ - public ServerAssetUseResponse callServerAssetUseGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ServerAssetUseResponse restResult = this.callGetRESTCall(methodName, ServerAssetUseResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a list of ServerAssetUseElements in a response object. - * - * @param methodName name of the method being called - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters - * @param params a list of parameters that are slotted into the url template - * @return response objects - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException something went wrong with the REST call stack. - */ - public ServerAssetUseListResponse callServerAssetUseListGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException + public AssetElementResponse callAssetGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException { - ServerAssetUseListResponse restResult = this.callGetRESTCall(methodName, ServerAssetUseListResponse.class, urlTemplate, params); + AssetElementResponse restResult = this.callGetRESTCall(methodName, AssetElementResponse.class, urlTemplate, params); exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); @@ -781,25 +115,25 @@ public ServerAssetUseListResponse callServerAssetUseListGetRESTCall(String me /** - * Issue a POST REST call that returns a list of ServerAssetUseElements in a response object. + * Issue a POST REST call that returns an asset in a response object. * * @param methodName name of the method being called * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters * @param requestBody request body for the request * @param params a list of parameters that are slotted into the url template - * @return response objects + * @return response object * @throws InvalidParameterException one of the parameters is invalid. * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException something went wrong with the REST call stack. */ - public ServerAssetUseListResponse callServerAssetUseListPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException + public AssetElementResponse callAssetPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException { - ServerAssetUseListResponse restResult = this.callPostRESTCall(methodName, ServerAssetUseListResponse.class, urlTemplate, requestBody, params); + AssetElementResponse restResult = this.callPostRESTCall(methodName, AssetElementResponse.class, urlTemplate, requestBody, params); exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); @@ -808,7 +142,7 @@ public ServerAssetUseListResponse callServerAssetUseListPostRESTCall(String m /** - * Issue a POST REST call that returns a list of SupportedCapabilityElements in a response object. + * Issue a POST REST call that returns a list of AssetElements in a response object. * * @param methodName name of the method being called * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters @@ -819,242 +153,18 @@ public ServerAssetUseListResponse callServerAssetUseListPostRESTCall(String m * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException something went wrong with the REST call stack. */ - public SupportedCapabilityListResponse callSupportedCapabilityListPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - SupportedCapabilityListResponse restResult = this.callPostRESTCall(methodName, SupportedCapabilityListResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - - /** - * Issue a POST REST call that returns a DataFlowElementResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param requestBody object that passes additional parameters - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public DataFlowElementResponse callDataFlowPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, + public AssetElementsResponse callAssetElementsPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - DataFlowElementResponse restResult = this.callPostRESTCall(methodName, DataFlowElementResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a POST REST call that returns a DataFlowElementsResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param requestBody object that passes additional parameters - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public DataFlowElementsResponse callDataFlowsPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - DataFlowElementsResponse restResult = this.callPostRESTCall(methodName, DataFlowElementsResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a POST REST call that returns a ControlFlowElementResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param requestBody object that passes additional parameters - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public ControlFlowElementResponse callControlFlowPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ControlFlowElementResponse restResult = this.callPostRESTCall(methodName, ControlFlowElementResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a POST REST call that returns a ControlFlowElementsResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param requestBody object that passes additional parameters - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public ControlFlowElementsResponse callControlFlowsPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ControlFlowElementsResponse restResult = this.callPostRESTCall(methodName, ControlFlowElementsResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a POST REST call that returns a ProcessCallElementResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param requestBody object that passes additional parameters - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public ProcessCallElementResponse callProcessCallPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ProcessCallElementResponse restResult = this.callPostRESTCall(methodName, ProcessCallElementResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a POST REST call that returns a ProcessCallElementsResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param requestBody object that passes additional parameters - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public ProcessCallElementsResponse callProcessCallsPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ProcessCallElementsResponse restResult = this.callPostRESTCall(methodName, ProcessCallElementsResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a POST REST call that returns a LineageMappingElementResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param requestBody object that passes additional parameters - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public LineageMappingElementResponse callLineageMappingPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - LineageMappingElementResponse restResult = this.callPostRESTCall(methodName, LineageMappingElementResponse.class, urlTemplate, requestBody, params); + AssetElementsResponse restResult = this.callPostRESTCall(methodName, AssetElementsResponse.class, urlTemplate, requestBody, params); exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); return restResult; } - - /** - * Issue a POST REST call that returns a LineageMappingElementsResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param requestBody object that passes additional parameters - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public LineageMappingElementsResponse callLineageMappingsPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - LineageMappingElementsResponse restResult = this.callPostRESTCall(methodName, LineageMappingElementsResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } } diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/converters/AssetConverter.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/converters/AssetConverter.java deleted file mode 100644 index 3377d5da773..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/converters/AssetConverter.java +++ /dev/null @@ -1,125 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.converters; - -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.AssetElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.AssetProperties; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; - - -/** - * AssetConverter provides common methods for transferring relevant properties from an Open Metadata Repository Services (OMRS) - * EntityDetail object into a bean that inherits from AssetElement. - */ -public class AssetConverter extends ITInfrastructureOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public AssetConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof AssetElement bean) - { - AssetProperties assetProperties = new AssetProperties(); - - if (entity != null) - { - bean.setElementHeader(super.getMetadataElementHeader(beanClass, entity, methodName)); - - /* - * The initial set of values come from the entity. - */ - InstanceProperties instanceProperties = new InstanceProperties(entity.getProperties()); - - assetProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); - assetProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); - assetProperties.setName(this.removeName(instanceProperties)); - assetProperties.setDeployedImplementationType(assetProperties.getDeployedImplementationType()); - assetProperties.setDescription(this.removeDescription(instanceProperties)); - - /* - * Any remaining properties are returned in the extended properties. They are - * assumed to be defined in a subtype. - */ - assetProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); - assetProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - - - bean.setProperties(assetProperties); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - Relationship relationship, - String methodName) throws PropertyServerException - { - return getNewBean(beanClass, entity, methodName); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/converters/ConnectionConverter.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/converters/ConnectionConverter.java deleted file mode 100644 index 140e51e6d5a..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/converters/ConnectionConverter.java +++ /dev/null @@ -1,155 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.converters; - -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.ConnectionElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.EmbeddedConnection; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.ConnectionProperties; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; -import java.util.ArrayList; -import java.util.List; - -/** - * ConnectionConverter transfers the relevant properties from some Open Metadata Repository Services (OMRS) - * EntityDetail and Relationship objects into a Connection bean (or a VirtualConnection bean). - */ -public class ConnectionConverter extends ITInfrastructureOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public ConnectionConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - /** - * Using the supplied instances, return a new instance of the bean. It is used for beans such as - * a connection bean which made up of 3 entities (Connection, ConnectorType and Endpoint) plus the - * relationships between them. The relationships may be omitted if they do not have an properties. - * - * @param beanClass name of the class to create - * @param primaryEntity entity that is the root of the collection of entities that make up the - * content of the bean - * @param supplementaryEntities entities connected to the primary entity by the relationships - * @param relationships relationships linking the entities - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - @SuppressWarnings(value = "unchecked") - public B getNewComplexBean(Class beanClass, - EntityDetail primaryEntity, - List supplementaryEntities, - List relationships, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof ConnectionElement bean) - { - ConnectionProperties connectionProperties = new ConnectionProperties(); - - if (primaryEntity != null) - { - bean.setElementHeader(this.getMetadataElementHeader(beanClass, primaryEntity, methodName)); - - /* - * The initial set of values come from the entity. - */ - InstanceProperties instanceProperties = new InstanceProperties(primaryEntity.getProperties()); - - connectionProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); - connectionProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); - connectionProperties.setDisplayName(this.removeDisplayName(instanceProperties)); - connectionProperties.setDescription(this.removeDescription(instanceProperties)); - connectionProperties.setSecuredProperties(this.removeSecuredProperties(instanceProperties)); - connectionProperties.setConfigurationProperties(this.removeConfigurationProperties(instanceProperties)); - connectionProperties.setUserId(this.removeUserId(instanceProperties)); - connectionProperties.setClearPassword(this.removeClearPassword(instanceProperties)); - connectionProperties.setEncryptedPassword(this.removeEncryptedPassword(instanceProperties)); - /* - * Any remaining properties are returned in the extended properties. They are - * assumed to be defined in a subtype. - */ - connectionProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); - connectionProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - - bean.setConnectionProperties(connectionProperties); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - - if (relationships != null) - { - List embeddedConnections = new ArrayList<>(); - - for (Relationship relationship : relationships) - { - if ((relationship != null) && (relationship.getType() != null)) - { - if (repositoryHelper.isTypeOf(serviceName, relationship.getType().getTypeDefName(), OpenMetadataType.EMBEDDED_CONNECTION_TYPE_NAME)) - { - EmbeddedConnection embeddedConnection = new EmbeddedConnection(); - - InstanceProperties relationshipProperties = relationship.getProperties(); - - embeddedConnection.setPosition(this.getPosition(relationshipProperties)); - embeddedConnection.setDisplayName(this.getDisplayName(relationshipProperties)); - embeddedConnection.setArguments(this.getArguments(relationshipProperties)); - - embeddedConnection.setEmbeddedConnection(getElementStub(beanClass, relationship.getEntityTwoProxy(), methodName)); - - embeddedConnections.add(embeddedConnection); - } - else if (repositoryHelper.isTypeOf(serviceName, relationship.getType().getTypeDefName(), OpenMetadataType.CONNECTION_CONNECTOR_TYPE_TYPE_NAME)) - { - bean.setConnectorType(getElementStub(beanClass, relationship.getEntityTwoProxy(), methodName)); - } - else if (repositoryHelper.isTypeOf(serviceName, relationship.getType().getTypeDefName(), OpenMetadataType.CONNECTION_ENDPOINT_TYPE_NAME)) - { - bean.setEndpoint(getElementStub(beanClass, relationship.getEntityOneProxy(), methodName)); - } - } - } - - if (! embeddedConnections.isEmpty()) - { - bean.setEmbeddedConnections(embeddedConnections); - } - } - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/converters/ConnectorTypeConverter.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/converters/ConnectorTypeConverter.java deleted file mode 100644 index 1d1b0e9c730..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/converters/ConnectorTypeConverter.java +++ /dev/null @@ -1,135 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.converters; - -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.ConnectorTypeElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.ConnectorTypeProperties; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; - -/** - * ConnectorTypeConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) - * EntityDetail object into a ConnectorTypeElement bean. - */ -public class ConnectorTypeConverter extends ITInfrastructureOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity/relationship objects - * @param serviceName name of this component - * @param serverName local server name - */ - public ConnectorTypeConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof ConnectorTypeElement bean) - { - ConnectorTypeProperties connectorTypeProperties = new ConnectorTypeProperties(); - - if (entity != null) - { - bean.setElementHeader(this.getMetadataElementHeader(beanClass, entity, methodName)); - - /* - * The initial set of values come from the entity. - */ - InstanceProperties instanceProperties = new InstanceProperties(entity.getProperties()); - - connectorTypeProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); - connectorTypeProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); - connectorTypeProperties.setDisplayName(this.removeDisplayName(instanceProperties)); - connectorTypeProperties.setDescription(this.removeDescription(instanceProperties)); - connectorTypeProperties.setSupportedAssetTypeName(this.removeSupportedAssetTypeName(instanceProperties)); - connectorTypeProperties.setExpectedDataFormat(this.removeExpectedDataFormat(instanceProperties)); - connectorTypeProperties.setConnectorProviderClassName(this.removeConnectorProviderClassName(instanceProperties)); - connectorTypeProperties.setConnectorFrameworkName(this.removeConnectorFrameworkName(instanceProperties)); - connectorTypeProperties.setConnectorInterfaceLanguage(this.removeConnectorInterfaceLanguage(instanceProperties)); - connectorTypeProperties.setConnectorInterfaces(this.removeConnectorInterfaces(instanceProperties)); - connectorTypeProperties.setTargetTechnologySource(this.removeTargetTechnologySource(instanceProperties)); - connectorTypeProperties.setTargetTechnologyName(this.removeTargetTechnologyName(instanceProperties)); - connectorTypeProperties.setTargetTechnologyInterfaces(this.removeTargetTechnologyInterfaces(instanceProperties)); - connectorTypeProperties.setTargetTechnologyVersions(this.removeTargetTechnologyVersions(instanceProperties)); - connectorTypeProperties.setRecognizedAdditionalProperties(this.removeRecognizedAdditionalProperties(instanceProperties)); - connectorTypeProperties.setRecognizedSecuredProperties(this.removeRecognizedSecuredProperties(instanceProperties)); - connectorTypeProperties.setRecognizedConfigurationProperties(this.removeRecognizedConfigurationProperties(instanceProperties)); - - /* - * Any remaining properties are returned in the extended properties. They are - * assumed to be defined in a subtype. - */ - connectorTypeProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); - connectorTypeProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - - bean.setConnectorTypeProperties(connectorTypeProperties); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - Relationship relationship, - String methodName) throws PropertyServerException - { - return getNewBean(beanClass, entity, methodName); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/converters/ContactMethodConverter.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/converters/ContactMethodConverter.java deleted file mode 100644 index 464c1428328..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/converters/ContactMethodConverter.java +++ /dev/null @@ -1,131 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.converters; - - -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.ContactMethodElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.ContactMethodProperties; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - - -import java.lang.reflect.InvocationTargetException; - -/** - * ContactMethodConverter generates a ContactMethodProperties bean from a ContactMethodProperties entity. - */ -public class ContactMethodConverter extends ITInfrastructureOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public ContactMethodConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - /** - * Using the supplied entity, return a new instance of the bean. This is used for most beans that have - * a one to one correspondence with the repository instances. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof ContactMethodElement bean) - { - ContactMethodProperties contactMethodProperties = new ContactMethodProperties(); - - bean.setElementHeader(super.getMetadataElementHeader(beanClass, entity, methodName)); - - InstanceProperties entityProperties; - - /* - * The initial set of values come from the entity. - */ - if (entity != null) - { - entityProperties = new InstanceProperties(entity.getProperties()); - - contactMethodProperties.setName(this.removeName(entityProperties)); - contactMethodProperties.setContactType(this.removeContactType(entityProperties)); - contactMethodProperties.setContactMethodType(this.getContactMethodTypeFromProperties(entityProperties)); - contactMethodProperties.setContactMethodService(this.removeContactMethodService(entityProperties)); - contactMethodProperties.setContactMethodValue(this.removeContactMethodValue(entityProperties)); - contactMethodProperties.setEffectiveFrom(entityProperties.getEffectiveFromTime()); - contactMethodProperties.setEffectiveTo(entityProperties.getEffectiveToTime()); - - /* - * Any remaining properties are returned in the extended properties. They are - * assumed to be defined in a subtype. - */ - contactMethodProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); - contactMethodProperties.setExtendedProperties(this.getRemainingExtendedProperties(entityProperties)); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - - bean.setProperties(contactMethodProperties); - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @SuppressWarnings(value = "unused") - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - Relationship relationship, - String methodName) throws PropertyServerException - { - return this.getNewBean(beanClass, entity, methodName); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/converters/ElementHeaderConverter.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/converters/ElementHeaderConverter.java deleted file mode 100644 index ff2bc3b61f5..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/converters/ElementHeaderConverter.java +++ /dev/null @@ -1,100 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.converters; - -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; - -/** - * ElementHeaderConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) - * EntityDetail object into a ElementHeader bean. - */ -public class ElementHeaderConverter extends ITInfrastructureOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity/relationship objects - * @param serviceName name of this component - * @param serverName local server name - */ - public ElementHeaderConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @SuppressWarnings(value = "unchecked") - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof ElementHeader) - { - if (entity != null) - { - returnBean = (B) this.getMetadataElementHeader(beanClass, entity, methodName); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - Relationship relationship, - String methodName) throws PropertyServerException - { - return getNewBean(beanClass, entity, methodName); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/converters/ElementStubConverter.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/converters/ElementStubConverter.java deleted file mode 100644 index ee04ec84f9e..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/converters/ElementStubConverter.java +++ /dev/null @@ -1,221 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.converters; - - -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityProxy; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; -import java.util.ArrayList; -import java.util.List; - - -/** - * ElementStubConverter provides common methods for transferring relevant properties from an Open Metadata Repository Services (OMRS) - * EntityProxy object into an ElementStub bean. - */ -public class ElementStubConverter extends ITInfrastructureOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public ElementStubConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entityProxy and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entityProxy entityProxy containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @SuppressWarnings(value = "unchecked") - private B getNewBean(Class beanClass, - EntityProxy entityProxy, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof ElementStub) - { - returnBean = (B)super.getElementStub(beanClass, entityProxy, methodName); - - return returnBean; - } - - return null; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an relationship and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param relationship relationship containing the properties - * @param useEnd1 should the - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - public B getNewBean(Class beanClass, - Relationship relationship, - boolean useEnd1, - String methodName) throws PropertyServerException - { - if (relationship != null) - { - if (useEnd1) - { - return getNewBean(beanClass, relationship.getEntityOneProxy(), methodName); - } - else - { - return getNewBean(beanClass, relationship.getEntityTwoProxy(), methodName); - } - } - - return null; - } - - - /** - * Using the supplied instances, return list of new instances of the bean. - * - * @param beanClass name of the class to create - * @param relationships list of relationships containing the properties - * @param useEnd1 should the - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - public List getNewBean(Class beanClass, - List relationships, - boolean useEnd1, - String methodName) throws PropertyServerException - { - if (relationships != null) - { - List beans = new ArrayList<>(); - - for (Relationship relationship : relationships) - { - if (relationship != null) - { - B bean = getNewBean(beanClass, relationship, useEnd1, methodName); - - if (bean != null) - { - beans.add(bean); - } - } - } - - if (! beans.isEmpty()) - { - return beans; - } - } - - return null; - } - - - - /** - * Using the supplied entity, return a new instance of the bean. This is used for most beans that have - * a one to one correspondence with the repository instances. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param methodName calling method - * @return bean populated with properties from the entity supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @SuppressWarnings(value = "unchecked") - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - EntityProxy entityProxy = repositoryHelper.getNewEntityProxy(serviceName, entity); - - if (returnBean instanceof ElementStub) - { - returnBean = (B)super.getElementStub(beanClass, entityProxy, methodName); - - return returnBean; - } - - return null; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - catch (Exception error) - { - super.handleBadEntity(beanClass.getName(), entity, methodName); - } - - return null; - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @SuppressWarnings(value = "unused") - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - Relationship relationship, - String methodName) throws PropertyServerException - { - return this.getNewBean(beanClass, entity, methodName); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/converters/EndpointConverter.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/converters/EndpointConverter.java deleted file mode 100644 index 302d5ccde9d..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/converters/EndpointConverter.java +++ /dev/null @@ -1,126 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.converters; - -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.EndpointElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.EndpointProperties; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; - -/** - * EndpointConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) - * EntityDetail object into a EndpointElement bean. - */ -public class EndpointConverter extends ITInfrastructureOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity/relationship objects - * @param serviceName name of this component - * @param serverName local server name - */ - public EndpointConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof EndpointElement bean) - { - EndpointProperties endpointProperties = new EndpointProperties(); - - if (entity != null) - { - bean.setElementHeader(this.getMetadataElementHeader(beanClass, entity, methodName)); - - /* - * The initial set of values come from the entity. - */ - InstanceProperties instanceProperties = new InstanceProperties(entity.getProperties()); - - endpointProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); - endpointProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); - endpointProperties.setDisplayName(this.removeName(instanceProperties)); - endpointProperties.setDescription(this.removeDescription(instanceProperties)); - endpointProperties.setAddress(this.removeNetworkAddress(instanceProperties)); - endpointProperties.setProtocol(this.removeProtocol(instanceProperties)); - endpointProperties.setEncryptionMethod(this.removeEncryptionMethod(instanceProperties)); - - - /* - * Any remaining properties are returned in the extended properties. They are - * assumed to be defined in a subtype. - */ - endpointProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); - endpointProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - - bean.setEndpointProperties(endpointProperties); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - Relationship relationship, - String methodName) throws PropertyServerException - { - return getNewBean(beanClass, entity, methodName); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/converters/ITInfrastructureOMASConverter.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/converters/ITInfrastructureOMASConverter.java deleted file mode 100644 index 4c3a97f0d79..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/converters/ITInfrastructureOMASConverter.java +++ /dev/null @@ -1,165 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.converters; - -import org.odpi.openmetadata.frameworks.openmetadata.enums.ContactMethodType; -import org.odpi.openmetadata.frameworks.openmetadata.enums.PortType; -import org.odpi.openmetadata.frameworks.openmetadata.enums.ServerAssetUseType; -import org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericConverter; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - - -/** - * DataManagerOMASConverter provides the generic methods for the Data Manager beans converters. Generic classes - * have limited knowledge of the classes these are working on and this means creating a new instance of a - * class from within a generic is a little involved. This class provides the generic method for creating - * and initializing a Data Manager bean. - */ -public class ITInfrastructureOMASConverter extends OpenMetadataAPIGenericConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName name of this server - */ - public ITInfrastructureOMASConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super (repositoryHelper, serviceName, serverName); - } - - - /*=============================== - * Methods to fill out headers and enums - */ - - - - /** - * Retrieve the ContactMethodType enum property from the instance properties of an entity - * - * @param properties entity properties - * @return ContactMethodType enum value - */ - ContactMethodType getContactMethodTypeFromProperties(InstanceProperties properties) - { - final String methodName = "getContactMethodTypeFromProperties"; - - ContactMethodType contactMethodType = ContactMethodType.OTHER; - - if (properties != null) - { - int ordinal = repositoryHelper.removeEnumPropertyOrdinal(serviceName, OpenMetadataProperty.CONTACT_METHOD_TYPE.name, properties, methodName); - - switch (ordinal) - { - case 0: - contactMethodType = ContactMethodType.EMAIL; - break; - - case 1: - contactMethodType = ContactMethodType.PHONE; - break; - - case 2: - contactMethodType = ContactMethodType.CHAT; - break; - - case 3: - contactMethodType = ContactMethodType.PROFILE; - break; - - case 4: - contactMethodType = ContactMethodType.ACCOUNT; - break; - - case 99: - contactMethodType = ContactMethodType.OTHER; - break; - } - } - - return contactMethodType; - } - - - /** - * Retrieve the ContactMethodType enum property from the instance properties of an entity - * - * @param properties entity properties - * @return ContactMethodType enum value - */ - ServerAssetUseType getServerAssetUseTypeFromProperties(InstanceProperties properties) - { - final String methodName = "getServerAssetUseTypeFromProperties"; - - ServerAssetUseType serverAssetUseType = ServerAssetUseType.OTHER; - - if (properties != null) - { - int ordinal = repositoryHelper.removeEnumPropertyOrdinal(serviceName, OpenMetadataType.SERVER_ASSET_USE_TYPE_TYPE_NAME, properties, methodName); - - switch (ordinal) - { - case 0: - serverAssetUseType = ServerAssetUseType.OWNS; - break; - - case 1: - serverAssetUseType = ServerAssetUseType.GOVERNS; - break; - - case 2: - serverAssetUseType = ServerAssetUseType.MAINTAINS; - break; - - case 3: - serverAssetUseType = ServerAssetUseType.USES; - break; - - case 99: - serverAssetUseType = ServerAssetUseType.OTHER; - break; - } - } - - return serverAssetUseType; - } - - - - /** - * Extract and delete the portType property from the supplied instance properties. - * - * @param instanceProperties properties from entity - * @return PortType enum - */ - PortType removePortType(InstanceProperties instanceProperties) - { - final String methodName = "removePortType"; - - if (instanceProperties != null) - { - int ordinal = repositoryHelper.removeEnumPropertyOrdinal(serviceName, - OpenMetadataType.PORT_TYPE_PROPERTY_NAME, - instanceProperties, - methodName); - - for (PortType portType : PortType.values()) - { - if (portType.getOpenTypeOrdinal() == ordinal) - { - return portType; - } - } - } - - return PortType.OTHER; - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/converters/UserIdentityConverter.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/converters/UserIdentityConverter.java deleted file mode 100644 index d1df187c998..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/converters/UserIdentityConverter.java +++ /dev/null @@ -1,123 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.converters; - - -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.UserIdentityElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.UserIdentityProperties; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; - - -/** - * UserIdentityConverter generates an UserIdentityElement bean from an UserIdentity entity. - */ -public class UserIdentityConverter extends ITInfrastructureOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public UserIdentityConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof UserIdentityElement bean) - { - UserIdentityProperties properties = new UserIdentityProperties(); - - if (entity != null) - { - bean.setElementHeader(this.getMetadataElementHeader(beanClass, entity, methodName)); - - /* - * The initial set of values come from the entity. - */ - InstanceProperties instanceProperties = new InstanceProperties(entity.getProperties()); - - properties.setQualifiedName(this.removeQualifiedName(instanceProperties)); - properties.setUserId(this.removeUserId(instanceProperties)); - properties.setDistinguishedName(this.removeDistinguishedName(instanceProperties)); - properties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); - - /* - * Any remaining properties are returned in the extended properties. They are - * assumed to be defined in a subtype. - */ - properties.setTypeName(bean.getElementHeader().getType().getTypeName()); - properties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - - bean.setProperties(properties); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - Relationship relationship, - String methodName) throws PropertyServerException - { - return getNewBean(beanClass, entity, methodName); - } -} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/converters/package-info.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/converters/package-info.java deleted file mode 100644 index 501a68ab83e..00000000000 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/converters/package-info.java +++ /dev/null @@ -1,8 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -/** - * Provides the converters that take beans from the repository services (eg entities and relationships) - * and converts them into IT Infrastructure OMAS beans to return to the caller. - */ -package org.odpi.openmetadata.accessservices.itinfrastructure.converters; diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/listener/ITInfrastructureOMRSTopicListener.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/listener/ITInfrastructureOMRSTopicListener.java index af72d5ca88e..ab3b70f0e96 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/listener/ITInfrastructureOMRSTopicListener.java +++ b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/listener/ITInfrastructureOMRSTopicListener.java @@ -3,9 +3,9 @@ package org.odpi.openmetadata.accessservices.itinfrastructure.listener; import org.odpi.openmetadata.accessservices.itinfrastructure.events.ITInfrastructureEventType; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.AssetElement; import org.odpi.openmetadata.accessservices.itinfrastructure.outtopic.ITInfrastructureOutTopicPublisher; import org.odpi.openmetadata.commonservices.generichandlers.AssetHandler; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.AssetElement; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.repositoryservices.connectors.omrstopic.OMRSTopicListenerBase; diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/outtopic/ITInfrastructureOutTopicPublisher.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/outtopic/ITInfrastructureOutTopicPublisher.java index ac911626682..7c706e679ec 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/outtopic/ITInfrastructureOutTopicPublisher.java +++ b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/outtopic/ITInfrastructureOutTopicPublisher.java @@ -4,12 +4,12 @@ package org.odpi.openmetadata.accessservices.itinfrastructure.outtopic; import org.odpi.openmetadata.accessservices.itinfrastructure.connectors.outtopic.ITInfrastructureOutTopicServerConnector; -import org.odpi.openmetadata.accessservices.itinfrastructure.converters.ElementHeaderConverter; import org.odpi.openmetadata.accessservices.itinfrastructure.events.ITInfrastructureEventType; import org.odpi.openmetadata.accessservices.itinfrastructure.events.ITInfrastructureOutTopicEvent; import org.odpi.openmetadata.accessservices.itinfrastructure.ffdc.ITInfrastructureAuditCode; +import org.odpi.openmetadata.commonservices.generichandlers.ElementHeaderConverter; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Classification; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; @@ -22,9 +22,9 @@ public class ITInfrastructureOutTopicPublisher { private final ITInfrastructureOutTopicServerConnector outTopicServerConnector; private final AuditLog outTopicAuditLog; - private final String outTopicName; - private final ElementHeaderConverter headerConverter; - private final OMRSRepositoryHelper repositoryHelper; + private final String outTopicName; + private final ElementHeaderConverter headerConverter; + private final OMRSRepositoryHelper repositoryHelper; private final String actionDescription = "Out topic configuration refresh event publishing"; diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/server/ITAssetRESTService.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/server/ITAssetRESTService.java index 153c2957085..cd50edbc815 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/server/ITAssetRESTService.java +++ b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/server/ITAssetRESTService.java @@ -2,25 +2,13 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.itinfrastructure.server; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.AssetElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.ControlFlowElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.DataFlowElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.LineageMappingElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.PortElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.ProcessCallElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.ProcessElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.RelatedAssetElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.AssetProperties; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.*; +import org.odpi.openmetadata.accessservices.itinfrastructure.rest.TemplateRequestBody; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.AssetProperties; import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; -import org.odpi.openmetadata.commonservices.ffdc.rest.EffectiveTimeRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.NullRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; import org.odpi.openmetadata.commonservices.generichandlers.AssetHandler; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.commonservices.generichandlers.ProcessHandler; @@ -29,7 +17,7 @@ import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStatus; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ElementStatus; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceStatus; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDef; @@ -118,7 +106,7 @@ public GUIDResponse createAsset(String serverName, requestBody.getQualifiedName(), requestBody.getName(), requestBody.getVersionIdentifier(), - requestBody.getDescription(), + requestBody.getResourceDescription(), requestBody.getDeployedImplementationType(), requestBody.getAdditionalProperties(), typeName, @@ -159,7 +147,7 @@ public GUIDResponse createAsset(String serverName, requestBody.getQualifiedName(), requestBody.getName(), requestBody.getVersionIdentifier(), - requestBody.getDescription(), + requestBody.getResourceDescription(), requestBody.getDeployedImplementationType(), requestBody.getAdditionalProperties(), typeName, @@ -410,8 +398,9 @@ public VoidResponse updateAsset(String serverName, elementGUIDParameterName, requestBody.getQualifiedName(), requestBody.getName(), + requestBody.getResourceName(), requestBody.getVersionIdentifier(), - requestBody.getDescription(), + requestBody.getResourceDescription(), requestBody.getDeployedImplementationType(), requestBody.getAdditionalProperties(), typeName, @@ -697,7 +686,7 @@ public VoidResponse clearRelatedAsset(String ser String relationshipTypeName, String relatedAssetTypeName, String relatedAssetGUID, - EffectiveTimeMetadataSourceRequestBody requestBody) + EffectiveTimeQueryRequestBody requestBody) { final String methodName = "clearRelatedAsset"; final String assetGUIDParameterName = "assetGUID"; @@ -927,7 +916,7 @@ public VoidResponse clearClassification(String s String assetTypeName, String assetGUID, String classificationName, - EffectiveTimeMetadataSourceRequestBody requestBody) + EffectiveTimeQueryRequestBody requestBody) { final String methodName = "clearClassification"; final String elementGUIDParameterName = "assetGUID"; @@ -1088,7 +1077,7 @@ public VoidResponse withdrawAsset(String serverName, public VoidResponse removeAsset(String serverName, String userId, String assetGUID, - MetadataSourceRequestBody requestBody) + ExternalSourceRequestBody requestBody) { final String methodName = "removeAsset"; final String elementGUIDParameterName = "assetGUID"; @@ -1152,20 +1141,20 @@ public VoidResponse removeAsset(String serverName, * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - public AssetListResponse findAssets(String serverName, - String userId, - String assetTypeName, - int startFrom, - int pageSize, - SearchStringRequestBody requestBody) + public AssetElementsResponse findAssets(String serverName, + String userId, + String assetTypeName, + int startFrom, + int pageSize, + SearchStringRequestBody requestBody) { final String methodName = "findAssets"; final String searchStringParameterName = "searchString"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - AssetListResponse response = new AssetListResponse(); - AuditLog auditLog = null; + AssetElementsResponse response = new AssetElementsResponse(); + AuditLog auditLog = null; try { @@ -1196,7 +1185,7 @@ public AssetListResponse findAssets(String serverName, methodName); setUpVendorProperties(userId, assets, handler, methodName); - response.setElementList(assets); + response.setElements(assets); } } else @@ -1231,20 +1220,20 @@ public AssetListResponse findAssets(String serverName, * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - public AssetListResponse getAssetsByName(String serverName, - String userId, - String assetTypeName, - int startFrom, - int pageSize, - NameRequestBody requestBody) + public AssetElementsResponse getAssetsByName(String serverName, + String userId, + String assetTypeName, + int startFrom, + int pageSize, + NameRequestBody requestBody) { final String methodName = "getAssetsByName"; final String nameParameterName = "name"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - AssetListResponse response = new AssetListResponse(); - AuditLog auditLog = null; + AssetElementsResponse response = new AssetElementsResponse(); + AuditLog auditLog = null; try { @@ -1275,7 +1264,7 @@ public AssetListResponse getAssetsByName(String serverName, methodName); setUpVendorProperties(userId, assets, handler, methodName); - response.setElementList(assets); + response.setElements(assets); } } else @@ -1311,20 +1300,20 @@ public AssetListResponse getAssetsByName(String serverName, * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - public AssetListResponse getAssetsByDeployedImplementationType(String serverName, - String userId, - String assetTypeName, - int startFrom, - int pageSize, - NameRequestBody requestBody) + public AssetElementsResponse getAssetsByDeployedImplementationType(String serverName, + String userId, + String assetTypeName, + int startFrom, + int pageSize, + NameRequestBody requestBody) { final String methodName = "getAssetsByDeployedImplementationType"; final String nameParameterName = "name"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - AssetListResponse response = new AssetListResponse(); - AuditLog auditLog = null; + AssetElementsResponse response = new AssetElementsResponse(); + AuditLog auditLog = null; try { @@ -1372,7 +1361,7 @@ public AssetListResponse getAssetsByDeployedImplementationType(String s } setUpVendorProperties(userId, assets, handler, methodName); - response.setElementList(assets); + response.setElements(assets); } } catch (Exception error) @@ -1404,22 +1393,22 @@ public AssetListResponse getAssetsByDeployedImplementationType(String s * PropertyServerException there is a problem reported in the open metadata server(s) */ @SuppressWarnings(value = "unused") - public AssetListResponse getAssetsForInfrastructureManager(String serverName, - String userId, - String infrastructureManagerGUID, - String infrastructureManagerName, - String assetTypeName, - int startFrom, - int pageSize, - EffectiveTimeRequestBody requestBody) + public AssetElementsResponse getAssetsForInfrastructureManager(String serverName, + String userId, + String infrastructureManagerGUID, + String infrastructureManagerName, + String assetTypeName, + int startFrom, + int pageSize, + EffectiveTimeRequestBody requestBody) { final String methodName = "getAssetsForInfrastructureManager"; final String infrastructureManagerGUIDParameterName = "infrastructureManagerGUID"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - AssetListResponse response = new AssetListResponse(); - AuditLog auditLog = null; + AssetElementsResponse response = new AssetElementsResponse(); + AuditLog auditLog = null; try { @@ -1456,7 +1445,7 @@ public AssetListResponse getAssetsForInfrastructureManager(String methodName); setUpVendorProperties(userId, assets, handler, methodName); - response.setElementList(assets); + response.setElements(assets); } } else @@ -1489,19 +1478,19 @@ public AssetListResponse getAssetsForInfrastructureManager(String * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - public AssetResponse getAssetByGUID(String serverName, - String userId, - String assetTypeName, - String guid, - EffectiveTimeRequestBody requestBody) + public AssetElementResponse getAssetByGUID(String serverName, + String userId, + String assetTypeName, + String guid, + EffectiveTimeRequestBody requestBody) { final String methodName = "getAssetByGUID"; final String guidParameterName = "guid"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - AssetResponse response = new AssetResponse(); - AuditLog auditLog = null; + AssetElementResponse response = new AssetElementResponse(); + AuditLog auditLog = null; try { @@ -1568,16 +1557,16 @@ public AssetResponse getAssetByGUID(String serverName, * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - public AssetRelationshipListResponse getAssetRelationships(String serverName, - String userId, - String assetTypeName, - String assetGUID, - String relationshipTypeName, - String relatedAssetTypeName, - int startingEnd, - int startFrom, - int pageSize, - EffectiveTimeRequestBody requestBody) + public AssetRelationshipsResponse getAssetRelationships(String serverName, + String userId, + String assetTypeName, + String assetGUID, + String relationshipTypeName, + String relatedAssetTypeName, + int startingEnd, + int startFrom, + int pageSize, + EffectiveTimeRequestBody requestBody) { // todo return null; @@ -1604,24 +1593,24 @@ public AssetRelationshipListResponse getAssetRelationships(String * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - public RelatedAssetListResponse getRelatedAssets(String serverName, - String userId, - String assetTypeName, - String assetGUID, - String relationshipTypeName, - String relatedAssetTypeName, - int startingEnd, - int startFrom, - int pageSize, - EffectiveTimeRequestBody requestBody) + public RelatedAssetsResponse getRelatedAssets(String serverName, + String userId, + String assetTypeName, + String assetGUID, + String relationshipTypeName, + String relatedAssetTypeName, + int startingEnd, + int startFrom, + int pageSize, + EffectiveTimeRequestBody requestBody) { final String methodName = "getRelatedAssets"; final String guidParameterName = "assetGUID"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - RelatedAssetListResponse response = new RelatedAssetListResponse(); - AuditLog auditLog = null; + RelatedAssetsResponse response = new RelatedAssetsResponse(); + AuditLog auditLog = null; try { @@ -1676,7 +1665,7 @@ public RelatedAssetListResponse getRelatedAssets(String server } } - response.setElementList(assets); + response.setElements(assets); } else { @@ -2081,7 +2070,7 @@ public VoidResponse updateDataFlow(String serverName, public VoidResponse clearDataFlow(String serverName, String userId, String dataFlowGUID, - EffectiveTimeMetadataSourceRequestBody requestBody) + EffectiveTimeQueryRequestBody requestBody) { final String dataFlowGUIDParameterName = "dataFlowGUID"; final String methodName = "clearDataFlow"; @@ -2181,27 +2170,27 @@ public DataFlowElementsResponse getDataFlowConsumers(String se if (requestBody != null) { - response.setElementList(handler.getDataFlowConsumers(userId, - dataSupplierGUID, - dataSupplierGUIDParameterName, - startFrom, - pageSize, - false, - false, - requestBody.getEffectiveTime(), - methodName)); + response.setElements(handler.getDataFlowConsumers(userId, + dataSupplierGUID, + dataSupplierGUIDParameterName, + startFrom, + pageSize, + false, + false, + requestBody.getEffectiveTime(), + methodName)); } else { - response.setElementList(handler.getDataFlowConsumers(userId, - dataSupplierGUID, - dataSupplierGUIDParameterName, - startFrom, - pageSize, - false, - false, - new Date(), - methodName)); + response.setElements(handler.getDataFlowConsumers(userId, + dataSupplierGUID, + dataSupplierGUIDParameterName, + startFrom, + pageSize, + false, + false, + new Date(), + methodName)); } } catch (Exception error) @@ -2258,27 +2247,27 @@ public DataFlowElementsResponse getDataFlowSuppliers(String se if (requestBody != null) { - response.setElementList(handler.getDataFlowSuppliers(userId, - dataConsumerGUID, - dataConsumerGUIDParameterName, - startFrom, - pageSize, - false, - false, - requestBody.getEffectiveTime(), - methodName)); + response.setElements(handler.getDataFlowSuppliers(userId, + dataConsumerGUID, + dataConsumerGUIDParameterName, + startFrom, + pageSize, + false, + false, + requestBody.getEffectiveTime(), + methodName)); } else { - response.setElementList(handler.getDataFlowSuppliers(userId, - dataConsumerGUID, - dataConsumerGUIDParameterName, - startFrom, - pageSize, - false, - false, - new Date(), - methodName)); + response.setElements(handler.getDataFlowSuppliers(userId, + dataConsumerGUID, + dataConsumerGUIDParameterName, + startFrom, + pageSize, + false, + false, + new Date(), + methodName)); } } catch (Exception error) @@ -2579,7 +2568,7 @@ public VoidResponse updateControlFlow(String serverName, public VoidResponse clearControlFlow(String serverName, String userId, String controlFlowGUID, - EffectiveTimeMetadataSourceRequestBody requestBody) + EffectiveTimeQueryRequestBody requestBody) { final String controlFlowGUIDParameterName = "controlFlowGUID"; final String methodName = "clearControlFlow"; @@ -2679,27 +2668,27 @@ public ControlFlowElementsResponse getControlFlowNextSteps(String if (requestBody != null) { - response.setElementList(handler.getControlFlowNextSteps(userId, - currentStepGUID, - currentStepGUIDParameterName, - startFrom, - pageSize, - false, - false, - requestBody.getEffectiveTime(), - methodName)); + response.setElements(handler.getControlFlowNextSteps(userId, + currentStepGUID, + currentStepGUIDParameterName, + startFrom, + pageSize, + false, + false, + requestBody.getEffectiveTime(), + methodName)); } else { - response.setElementList(handler.getControlFlowNextSteps(userId, - currentStepGUID, - currentStepGUIDParameterName, - startFrom, - pageSize, - false, - false, - new Date(), - methodName)); + response.setElements(handler.getControlFlowNextSteps(userId, + currentStepGUID, + currentStepGUIDParameterName, + startFrom, + pageSize, + false, + false, + new Date(), + methodName)); } } catch (Exception error) @@ -2756,27 +2745,27 @@ public ControlFlowElementsResponse getControlFlowPreviousSteps(String if (requestBody != null) { - response.setElementList(handler.getControlFlowPreviousSteps(userId, - currentStepGUID, - currentStepGUIDParameterName, - startFrom, - pageSize, - false, - false, - requestBody.getEffectiveTime(), - methodName)); + response.setElements(handler.getControlFlowPreviousSteps(userId, + currentStepGUID, + currentStepGUIDParameterName, + startFrom, + pageSize, + false, + false, + requestBody.getEffectiveTime(), + methodName)); } else { - response.setElementList(handler.getControlFlowPreviousSteps(userId, - currentStepGUID, - currentStepGUIDParameterName, - startFrom, - pageSize, - false, - false, - new Date(), - methodName)); + response.setElements(handler.getControlFlowPreviousSteps(userId, + currentStepGUID, + currentStepGUIDParameterName, + startFrom, + pageSize, + false, + false, + new Date(), + methodName)); } } catch (Exception error) @@ -3077,7 +3066,7 @@ public VoidResponse updateProcessCall(String serverName, public VoidResponse clearProcessCall(String serverName, String userId, String processCallGUID, - EffectiveTimeMetadataSourceRequestBody requestBody) + EffectiveTimeQueryRequestBody requestBody) { final String processCallGUIDParameterName = "processCallGUID"; final String methodName = "clearProcessCall"; @@ -3177,27 +3166,27 @@ public ProcessCallElementsResponse getProcessCalled(String ser if (requestBody != null) { - response.setElementList(handler.getProcessCalled(userId, - callerGUID, - callerGUIDParameterName, - startFrom, - pageSize, - false, - false, - requestBody.getEffectiveTime(), - methodName)); + response.setElements(handler.getProcessCalled(userId, + callerGUID, + callerGUIDParameterName, + startFrom, + pageSize, + false, + false, + requestBody.getEffectiveTime(), + methodName)); } else { - response.setElementList(handler.getProcessCalled(userId, - callerGUID, - callerGUIDParameterName, - startFrom, - pageSize, - false, - false, - new Date(), - methodName)); + response.setElements(handler.getProcessCalled(userId, + callerGUID, + callerGUIDParameterName, + startFrom, + pageSize, + false, + false, + new Date(), + methodName)); } } catch (Exception error) @@ -3254,27 +3243,27 @@ public ProcessCallElementsResponse getProcessCallers(String se if (requestBody != null) { - response.setElementList(handler.getProcessCallers(userId, - calledGUID, - callerGUIDParameterName, - startFrom, - pageSize, - false, - false, - requestBody.getEffectiveTime(), - methodName)); + response.setElements(handler.getProcessCallers(userId, + calledGUID, + callerGUIDParameterName, + startFrom, + pageSize, + false, + false, + requestBody.getEffectiveTime(), + methodName)); } else { - response.setElementList(handler.getProcessCallers(userId, - calledGUID, - callerGUIDParameterName, - startFrom, - pageSize, - false, - false, - new Date(), - methodName)); + response.setElements(handler.getProcessCallers(userId, + calledGUID, + callerGUIDParameterName, + startFrom, + pageSize, + false, + false, + new Date(), + methodName)); } } catch (Exception error) @@ -3488,7 +3477,7 @@ public LineageMappingElementResponse getLineageMapping(String serverNam public VoidResponse clearLineageMapping(String serverName, String userId, String lineageMappingGUID, - EffectiveTimeMetadataSourceRequestBody requestBody) + EffectiveTimeQueryRequestBody requestBody) { final String lineageMappingGUIDParameterName = "lineageMappingGUID"; final String methodName = "clearLineageMapping"; @@ -3584,27 +3573,27 @@ public LineageMappingElementsResponse getDestinationLineageMappings(String if (requestBody != null) { - response.setElementList(handler.getDestinationLineageMappings(userId, - sourceElementGUID, - sourceElementGUIDParameterName, - startFrom, - pageSize, - false, - false, - requestBody.getEffectiveTime(), - methodName)); + response.setElements(handler.getDestinationLineageMappings(userId, + sourceElementGUID, + sourceElementGUIDParameterName, + startFrom, + pageSize, + false, + false, + requestBody.getEffectiveTime(), + methodName)); } else { - response.setElementList(handler.getDestinationLineageMappings(userId, - sourceElementGUID, - sourceElementGUIDParameterName, - startFrom, - pageSize, - false, - false, - new Date(), - methodName)); + response.setElements(handler.getDestinationLineageMappings(userId, + sourceElementGUID, + sourceElementGUIDParameterName, + startFrom, + pageSize, + false, + false, + new Date(), + methodName)); } } catch (Exception error) @@ -3661,27 +3650,27 @@ public LineageMappingElementsResponse getSourceLineageMappings(String if (requestBody != null) { - response.setElementList(handler.getSourceLineageMappings(userId, - destinationElementGUID, - destinationElementGUIDParameterName, - startFrom, - pageSize, - false, - false, - requestBody.getEffectiveTime(), - methodName)); + response.setElements(handler.getSourceLineageMappings(userId, + destinationElementGUID, + destinationElementGUIDParameterName, + startFrom, + pageSize, + false, + false, + requestBody.getEffectiveTime(), + methodName)); } else { - response.setElementList(handler.getSourceLineageMappings(userId, - destinationElementGUID, - destinationElementGUIDParameterName, - startFrom, - pageSize, - false, - false, - new Date(), - methodName)); + response.setElements(handler.getSourceLineageMappings(userId, + destinationElementGUID, + destinationElementGUIDParameterName, + startFrom, + pageSize, + false, + false, + new Date(), + methodName)); } } catch (Exception error) diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/server/ITInfrastructureInstanceHandler.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/server/ITInfrastructureInstanceHandler.java index 289fead2230..125e2980de1 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/server/ITInfrastructureInstanceHandler.java +++ b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/server/ITInfrastructureInstanceHandler.java @@ -2,21 +2,7 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.itinfrastructure.server; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.AssetElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.ConnectionElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.ConnectorTypeElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.ContactMethodElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.ControlFlowElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.DataFlowElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.EndpointElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.ITProfileElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.LineageMappingElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.PortElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.ProcessCallElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.ProcessElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.RelatedAssetElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.SoftwareCapabilityElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.UserIdentityElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; import org.odpi.openmetadata.adminservices.configuration.registration.AccessServiceDescription; import org.odpi.openmetadata.commonservices.generichandlers.ActorProfileHandler; import org.odpi.openmetadata.commonservices.generichandlers.AssetHandler; diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/server/ITInfrastructureRESTServices.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/server/ITInfrastructureRESTServices.java index c95e068c05d..0b4c5d99670 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/server/ITInfrastructureRESTServices.java +++ b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/server/ITInfrastructureRESTServices.java @@ -3,28 +3,27 @@ package org.odpi.openmetadata.accessservices.itinfrastructure.server; -import org.odpi.openmetadata.accessservices.itinfrastructure.converters.ElementStubConverter; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.AssetElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.ConnectionElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.ConnectorTypeElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.EndpointElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.ServerAssetUseElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.SoftwareCapabilityElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.ConnectionProperties; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.ConnectorTypeProperties; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.EndpointProperties; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.ServerAssetUseProperties; +import org.odpi.openmetadata.accessservices.itinfrastructure.rest.TemplateRequestBody; + +import org.odpi.openmetadata.commonservices.generichandlers.ElementStubConverter; +import org.odpi.openmetadata.commonservices.ffdc.rest.ConnectionResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.ConnectionsResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.ConnectorTypeResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.ConnectorTypesResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.EmbeddedConnectionRequestBody; +import org.odpi.openmetadata.commonservices.ffdc.rest.EndpointResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.EndpointsResponse; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.ConnectionProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.ConnectorTypeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.EndpointProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.infrastructure.ServerAssetUseProperties; import org.odpi.openmetadata.frameworks.openmetadata.enums.ServerAssetUseType; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.SoftwareCapabilityProperties; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities.SoftwareCapabilityProperties; import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; -import org.odpi.openmetadata.commonservices.ffdc.rest.EffectiveTimeRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; import org.odpi.openmetadata.commonservices.generichandlers.AssetHandler; import org.odpi.openmetadata.commonservices.generichandlers.ConnectionHandler; import org.odpi.openmetadata.commonservices.generichandlers.ConnectorTypeHandler; @@ -36,7 +35,7 @@ import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementStub; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; @@ -85,16 +84,16 @@ public ITInfrastructureRESTServices() * UserNotAuthorizedException user not authorized to issue this request or * PropertyServerException problem retrieving the discovery engine definition. */ - public org.odpi.openmetadata.commonservices.ffdc.rest.ConnectionResponse getOutTopicConnection(String serverName, - String userId, - String callerId) + public OCFConnectionResponse getOutTopicConnection(String serverName, + String userId, + String callerId) { final String methodName = "getOutTopicConnection"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - org.odpi.openmetadata.commonservices.ffdc.rest.ConnectionResponse - response = new org.odpi.openmetadata.commonservices.ffdc.rest.ConnectionResponse(); + OCFConnectionResponse + response = new OCFConnectionResponse(); AuditLog auditLog = null; try @@ -390,7 +389,7 @@ public VoidResponse setupConnectorType(String serverName, String userId, String connectionGUID, String connectorTypeGUID, - MetadataSourceRequestBody requestBody) + ExternalSourceRequestBody requestBody) { final String methodName = "setupConnectorType"; final String connectionGUIDParameterName = "connectionGUID"; @@ -457,7 +456,7 @@ public VoidResponse clearConnectorType(String serverName, String userId, String connectionGUID, String connectorTypeGUID, - MetadataSourceRequestBody requestBody) + ExternalSourceRequestBody requestBody) { final String methodName = "clearConnectorType"; final String connectionGUIDParameterName = "connectionGUID"; @@ -522,7 +521,7 @@ public VoidResponse setupEndpoint(String serverName, String userId, String connectionGUID, String endpointGUID, - MetadataSourceRequestBody requestBody) + ExternalSourceRequestBody requestBody) { final String methodName = "setupEndpoint"; final String connectionGUIDParameterName = "connectionGUID"; @@ -589,7 +588,7 @@ public VoidResponse clearEndpoint(String serverName, String userId, String connectionGUID, String endpointGUID, - MetadataSourceRequestBody requestBody) + ExternalSourceRequestBody requestBody) { final String methodName = "clearEndpoint"; final String connectionGUIDParameterName = "connectionGUID"; @@ -725,7 +724,7 @@ public VoidResponse clearEmbeddedConnection(String serverName String userId, String connectionGUID, String embeddedConnectionGUID, - MetadataSourceRequestBody requestBody) + ExternalSourceRequestBody requestBody) { final String methodName = "clearEmbeddedConnection"; final String connectionGUIDParameterName = "connectionGUID"; @@ -859,7 +858,7 @@ public VoidResponse clearAssetConnection(String serverName, String userId, String assetGUID, String connectionGUID, - MetadataSourceRequestBody requestBody) + ExternalSourceRequestBody requestBody) { final String methodName = "clearAssetConnection"; final String connectionGUIDParameterName = "connectionGUID"; @@ -923,7 +922,7 @@ public VoidResponse clearAssetConnection(String serverName, public VoidResponse removeConnection(String serverName, String userId, String connectionGUID, - MetadataSourceRequestBody requestBody) + ExternalSourceRequestBody requestBody) { final String methodName = "removeConnection"; final String connectionGUIDParameterName = "connectionGUID"; @@ -1014,7 +1013,7 @@ public ConnectionsResponse findConnections(String serverName, new Date(), methodName); - response.setElementList(setUpVendorProperties(userId, connections, handler, methodName)); + response.setElements(setUpVendorProperties(userId, connections, handler, methodName)); } else { @@ -1059,7 +1058,7 @@ public ConnectionsResponse getConnectionsByName(String serverName, RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); ConnectionsResponse response = new ConnectionsResponse(); - AuditLog auditLog = null; + AuditLog auditLog = null; try { @@ -1079,7 +1078,7 @@ public ConnectionsResponse getConnectionsByName(String serverName, new Date(), methodName); - response.setElementList(setUpVendorProperties(userId, connections, handler, methodName)); + response.setElements(setUpVendorProperties(userId, connections, handler, methodName)); } else { @@ -1414,7 +1413,7 @@ public VoidResponse updateConnectorType(String serverName, public VoidResponse removeConnectorType(String serverName, String userId, String connectorTypeGUID, - MetadataSourceRequestBody requestBody) + ExternalSourceRequestBody requestBody) { final String methodName = "removeConnectorType"; final String connectorTypeGUIDParameterName = "connectorTypeGUID"; @@ -1506,7 +1505,7 @@ public ConnectorTypesResponse findConnectorTypes(String serverN new Date(), methodName); - response.setElementList(setUpVendorProperties(userId, elements, handler, methodName)); + response.setElements(setUpVendorProperties(userId, elements, handler, methodName)); } else { @@ -1571,7 +1570,7 @@ public ConnectorTypesResponse getConnectorTypesByName(String serverName new Date(), methodName); - response.setElementList(setUpVendorProperties(userId, elements, handler, methodName)); + response.setElements(setUpVendorProperties(userId, elements, handler, methodName)); } else { @@ -1684,8 +1683,8 @@ public GUIDResponse createEndpoint(String serverName, requestBody.getExternalSourceName(), infrastructureGUID, requestBody.getQualifiedName(), - requestBody.getDisplayName(), - requestBody.getDescription(), + requestBody.getName(), + requestBody.getResourceDescription(), requestBody.getAddress(), requestBody.getProtocol(), requestBody.getEncryptionMethod(), @@ -1874,8 +1873,8 @@ public VoidResponse updateEndpoint(String serverName, endpointGUID, endpointGUIDParameterName, requestBody.getQualifiedName(), - requestBody.getDisplayName(), - requestBody.getDescription(), + requestBody.getName(), + requestBody.getResourceDescription(), requestBody.getAddress(), requestBody.getProtocol(), requestBody.getEncryptionMethod(), @@ -1933,7 +1932,7 @@ public VoidResponse updateEndpoint(String serverName, public VoidResponse removeEndpoint(String serverName, String userId, String endpointGUID, - MetadataSourceRequestBody requestBody) + ExternalSourceRequestBody requestBody) { final String methodName = "removeEndpoint"; final String endpointGUIDParameterName = "endpointGUID"; @@ -2025,7 +2024,7 @@ public EndpointsResponse findEndpoints(String serverName, new Date(), methodName); - response.setElementList(setUpVendorProperties(userId, endpoints, handler, methodName)); + response.setElements(setUpVendorProperties(userId, endpoints, handler, methodName)); } } catch (Exception error) @@ -2084,7 +2083,7 @@ public EndpointsResponse getEndpointsByName(String serverName, false, new Date(), methodName); - response.setElementList(setUpVendorProperties(userId, endpoints, handler, methodName)); + response.setElements(setUpVendorProperties(userId, endpoints, handler, methodName)); } } catch (Exception error) @@ -2145,7 +2144,7 @@ public EndpointsResponse getEndpointsByNetworkAddress(String serverName new Date(), methodName); - response.setElementList(setUpVendorProperties(userId, endpoints, handler, methodName)); + response.setElements(setUpVendorProperties(userId, endpoints, handler, methodName)); } } catch (Exception error) @@ -2209,7 +2208,7 @@ public EndpointsResponse getEndpointsForInfrastructure(String serverName, new Date(), methodName); - response.setElementList(setUpVendorProperties(userId, endpoints, handler, methodName)); + response.setElements(setUpVendorProperties(userId, endpoints, handler, methodName)); } catch (Exception error) { @@ -2546,8 +2545,8 @@ public GUIDResponse createSoftwareCapability(String requestBody.getTypeName(), requestBody.getClassificationName(), requestBody.getQualifiedName(), - requestBody.getDisplayName(), - requestBody.getDescription(), + requestBody.getResourceName(), + requestBody.getResourceDescription(), requestBody.getDeployedImplementationType(), requestBody.getVersion(), requestBody.getPatchLevel(), @@ -2570,8 +2569,8 @@ public GUIDResponse createSoftwareCapability(String requestBody.getTypeName(), requestBody.getClassificationName(), requestBody.getQualifiedName(), - requestBody.getDisplayName(), - requestBody.getDescription(), + requestBody.getResourceName(), + requestBody.getResourceDescription(), requestBody.getDeployedImplementationType(), requestBody.getVersion(), requestBody.getPatchLevel(), @@ -2734,8 +2733,8 @@ public VoidResponse updateSoftwareCapability(String serve capabilityGUID, elementGUIDParameterName, requestBody.getQualifiedName(), - requestBody.getDisplayName(), - requestBody.getDescription(), + requestBody.getResourceName(), + requestBody.getResourceDescription(), requestBody.getDeployedImplementationType(), requestBody.getVersion(), requestBody.getPatchLevel(), @@ -2794,7 +2793,7 @@ public VoidResponse updateSoftwareCapability(String serve public VoidResponse removeSoftwareCapability(String serverName, String userId, String capabilityGUID, - MetadataSourceRequestBody requestBody) + ExternalSourceRequestBody requestBody) { final String methodName = "removeSoftwareCapability"; final String elementGUIDParameterName = "capabilityGUID"; @@ -2857,19 +2856,19 @@ public VoidResponse removeSoftwareCapability(String serverNam * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - public SoftwareCapabilityListResponse findSoftwareCapabilities(String serverName, - String userId, - int startFrom, - int pageSize, - SearchStringRequestBody requestBody) + public SoftwareCapabilitiesResponse findSoftwareCapabilities(String serverName, + String userId, + int startFrom, + int pageSize, + SearchStringRequestBody requestBody) { final String methodName = "findSoftwareCapabilities"; final String searchStringParameterName = "searchString"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SoftwareCapabilityListResponse response = new SoftwareCapabilityListResponse(); - AuditLog auditLog = null; + SoftwareCapabilitiesResponse response = new SoftwareCapabilitiesResponse(); + AuditLog auditLog = null; try { @@ -2892,7 +2891,7 @@ public SoftwareCapabilityListResponse findSoftwareCapabilities(String new Date(), methodName); - response.setElementList(setUpVendorProperties(userId, capabilities, handler, methodName)); + response.setElements(setUpVendorProperties(userId, capabilities, handler, methodName)); } } catch (Exception error) @@ -2920,19 +2919,19 @@ public SoftwareCapabilityListResponse findSoftwareCapabilities(String * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - public SoftwareCapabilityListResponse getSoftwareCapabilitiesByName(String serverName, - String userId, - int startFrom, - int pageSize, - NameRequestBody requestBody) + public SoftwareCapabilitiesResponse getSoftwareCapabilitiesByName(String serverName, + String userId, + int startFrom, + int pageSize, + NameRequestBody requestBody) { final String methodName = "getSoftwareCapabilitiesByName"; final String nameParameterName = "name"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - SoftwareCapabilityListResponse response = new SoftwareCapabilityListResponse(); - AuditLog auditLog = null; + SoftwareCapabilitiesResponse response = new SoftwareCapabilitiesResponse(); + AuditLog auditLog = null; try { @@ -2965,7 +2964,7 @@ public SoftwareCapabilityListResponse getSoftwareCapabilitiesByName(String new Date(), methodName); - response.setElementList(setUpVendorProperties(userId, capabilities, handler, methodName)); + response.setElements(setUpVendorProperties(userId, capabilities, handler, methodName)); } } catch (Exception error) @@ -3374,7 +3373,7 @@ public VoidResponse updateServerAssetUse(String serverName, public VoidResponse removeServerAssetUse(String serverName, String userId, String serverAssetUseGUID, - MetadataSourceRequestBody requestBody) + ExternalSourceRequestBody requestBody) { final String methodName = "removeServerAssetUse"; final String elementGUIDParameterName = "serverAssetUseGUID"; @@ -3428,20 +3427,20 @@ public VoidResponse removeServerAssetUse(String serverName, * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - public ServerAssetUseListResponse getServerAssetUsesForCapability(String serverName, - String userId, - String capabilityGUID, - int startFrom, - int pageSize, - UseTypeRequestBody requestBody) + public ServerAssetUsesResponse getServerAssetUsesForCapability(String serverName, + String userId, + String capabilityGUID, + int startFrom, + int pageSize, + UseTypeRequestBody requestBody) { final String methodName = "getServerAssetUsesForCapability"; final String elementGUIDParameterName = "capabilityGUID"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - ServerAssetUseListResponse response = new ServerAssetUseListResponse(); - AuditLog auditLog = null; + ServerAssetUsesResponse response = new ServerAssetUsesResponse(); + AuditLog auditLog = null; try { @@ -3501,20 +3500,20 @@ public ServerAssetUseListResponse getServerAssetUsesForCapability(String * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - public ServerAssetUseListResponse getCapabilityUsesForAsset(String serverName, - String userId, - String assetGUID, - int startFrom, - int pageSize, - UseTypeRequestBody requestBody) + public ServerAssetUsesResponse getCapabilityUsesForAsset(String serverName, + String userId, + String assetGUID, + int startFrom, + int pageSize, + UseTypeRequestBody requestBody) { final String methodName = "getCapabilityUsesForAsset"; final String elementGUIDParameterName = "assetGUID"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - ServerAssetUseListResponse response = new ServerAssetUseListResponse(); - AuditLog auditLog = null; + ServerAssetUsesResponse response = new ServerAssetUsesResponse(); + AuditLog auditLog = null; try { @@ -3575,21 +3574,21 @@ public ServerAssetUseListResponse getCapabilityUsesForAsset(String s * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - public ServerAssetUseListResponse getServerAssetUsesForElements(String serverName, - String userId, - String capabilityGUID, - String assetGUID, - int startFrom, - int pageSize, - EffectiveTimeRequestBody requestBody) + public ServerAssetUsesResponse getServerAssetUsesForElements(String serverName, + String userId, + String capabilityGUID, + String assetGUID, + int startFrom, + int pageSize, + EffectiveTimeRequestBody requestBody) { final String methodName = "getServerAssetUsesForElements"; final String capabilityGUIDParameterName = "capabilityGUID"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - ServerAssetUseListResponse response = new ServerAssetUseListResponse(); - AuditLog auditLog = null; + ServerAssetUsesResponse response = new ServerAssetUsesResponse(); + AuditLog auditLog = null; try { diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/server/ITInfrastructureServicesInstance.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/server/ITInfrastructureServicesInstance.java index 37e6be4f300..74b57dea784 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/server/ITInfrastructureServicesInstance.java +++ b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/server/ITInfrastructureServicesInstance.java @@ -3,48 +3,10 @@ package org.odpi.openmetadata.accessservices.itinfrastructure.server; import org.odpi.openmetadata.accessservices.itinfrastructure.connectors.outtopic.ITInfrastructureOutTopicClientProvider; -import org.odpi.openmetadata.accessservices.itinfrastructure.converters.AssetConverter; -import org.odpi.openmetadata.accessservices.itinfrastructure.converters.ConnectionConverter; -import org.odpi.openmetadata.accessservices.itinfrastructure.converters.ConnectorTypeConverter; -import org.odpi.openmetadata.accessservices.itinfrastructure.converters.ContactMethodConverter; -import org.odpi.openmetadata.accessservices.itinfrastructure.converters.ControlFlowConverter; -import org.odpi.openmetadata.accessservices.itinfrastructure.converters.DataFlowConverter; -import org.odpi.openmetadata.accessservices.itinfrastructure.converters.EndpointConverter; -import org.odpi.openmetadata.accessservices.itinfrastructure.converters.ITProfileConverter; -import org.odpi.openmetadata.accessservices.itinfrastructure.converters.LineageMappingConverter; -import org.odpi.openmetadata.accessservices.itinfrastructure.converters.PortConverter; -import org.odpi.openmetadata.accessservices.itinfrastructure.converters.ProcessCallConverter; -import org.odpi.openmetadata.accessservices.itinfrastructure.converters.ProcessConverter; -import org.odpi.openmetadata.accessservices.itinfrastructure.converters.RelatedAssetConverter; -import org.odpi.openmetadata.accessservices.itinfrastructure.converters.SoftwareCapabilityConverter; -import org.odpi.openmetadata.accessservices.itinfrastructure.converters.UserIdentityConverter; +import org.odpi.openmetadata.commonservices.generichandlers.*; import org.odpi.openmetadata.accessservices.itinfrastructure.ffdc.ITInfrastructureErrorCode; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.AssetElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.ConnectionElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.ConnectorTypeElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.ContactMethodElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.ControlFlowElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.DataFlowElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.EndpointElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.ITProfileElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.LineageMappingElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.PortElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.ProcessCallElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.ProcessElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.RelatedAssetElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.SoftwareCapabilityElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.UserIdentityElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; import org.odpi.openmetadata.adminservices.configuration.registration.AccessServiceDescription; -import org.odpi.openmetadata.commonservices.generichandlers.ActorProfileHandler; -import org.odpi.openmetadata.commonservices.generichandlers.AssetHandler; -import org.odpi.openmetadata.commonservices.generichandlers.ConnectionHandler; -import org.odpi.openmetadata.commonservices.generichandlers.ConnectorTypeHandler; -import org.odpi.openmetadata.commonservices.generichandlers.ContactDetailsHandler; -import org.odpi.openmetadata.commonservices.generichandlers.EndpointHandler; -import org.odpi.openmetadata.commonservices.generichandlers.ProcessHandler; -import org.odpi.openmetadata.commonservices.generichandlers.RelatedAssetHandler; -import org.odpi.openmetadata.commonservices.generichandlers.SoftwareCapabilityHandler; -import org.odpi.openmetadata.commonservices.generichandlers.UserIdentityHandler; import org.odpi.openmetadata.commonservices.multitenant.OMASServiceInstance; import org.odpi.openmetadata.commonservices.multitenant.ffdc.exceptions.NewInstanceException; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/server/ITProfileRESTServices.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/server/ITProfileRESTServices.java index 3ad0b2c4efc..081cd0af9b9 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/server/ITProfileRESTServices.java +++ b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/server/ITProfileRESTServices.java @@ -3,26 +3,14 @@ package org.odpi.openmetadata.accessservices.itinfrastructure.server; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.ContactMethodElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.ITProfileElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.UserIdentityElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.ContactMethodRequestBody; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.ITProfileListResponse; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.ITProfileRequestBody; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.ITProfileResponse; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.MetadataSourceRequestBody; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.UserIdentityListResponse; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.UserIdentityRequestBody; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.UserIdentityResponse; +import org.odpi.openmetadata.accessservices.itinfrastructure.rest.TemplateRequestBody; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; import org.odpi.openmetadata.commonservices.generichandlers.ActorProfileHandler; import org.odpi.openmetadata.commonservices.generichandlers.ContactDetailsHandler; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.commonservices.generichandlers.UserIdentityHandler; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; @@ -296,7 +284,7 @@ public VoidResponse updateITProfile(String serverName, public VoidResponse deleteITProfile(String serverName, String userId, String itProfileGUID, - MetadataSourceRequestBody requestBody) + ExternalSourceRequestBody requestBody) { final String methodName = "deleteITProfile"; final String guidParameterName = "itProfileGUID"; @@ -429,7 +417,7 @@ public GUIDResponse addContactMethod(String serverName, public VoidResponse deleteContactMethod(String serverName, String userId, String contactMethodGUID, - MetadataSourceRequestBody requestBody) + ExternalSourceRequestBody requestBody) { final String methodName = "deleteContactMethod"; final String guidParameterName = "contactMethodGUID"; @@ -601,19 +589,19 @@ public ITProfileResponse getITProfileByUserId(String serverName, * PropertyServerException problem accessing property server * UserNotAuthorizedException security access problem */ - public ITProfileListResponse getITProfileByName(String serverName, - String userId, - int startFrom, - int pageSize, - NameRequestBody requestBody) + public ITProfilesResponse getITProfileByName(String serverName, + String userId, + int startFrom, + int pageSize, + NameRequestBody requestBody) { final String methodName = "getITProfileByName"; final String nameParameterName = "name"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - ITProfileListResponse response = new ITProfileListResponse(); - AuditLog auditLog = null; + ITProfilesResponse response = new ITProfilesResponse(); + AuditLog auditLog = null; try { @@ -657,19 +645,19 @@ public ITProfileListResponse getITProfileByName(String serverName, * PropertyServerException the server is not available. * UserNotAuthorizedException the calling user is not authorized to issue the call. */ - public ITProfileListResponse findITProfile(String serverName, - String userId, - int startFrom, - int pageSize, - SearchStringRequestBody requestBody) + public ITProfilesResponse findITProfile(String serverName, + String userId, + int startFrom, + int pageSize, + SearchStringRequestBody requestBody) { final String methodName = "findITProfile"; final String searchStringParameterName = "searchString"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - ITProfileListResponse response = new ITProfileListResponse(); - AuditLog auditLog = null; + ITProfilesResponse response = new ITProfilesResponse(); + AuditLog auditLog = null; try { @@ -846,7 +834,7 @@ public VoidResponse updateUserIdentity(String serverName, public VoidResponse deleteUserIdentity(String serverName, String userId, String userIdentityGUID, - MetadataSourceRequestBody requestBody) + ExternalSourceRequestBody requestBody) { final String methodName = "deleteUserIdentity"; final String guidParameterName = "userIdentityGUID"; @@ -907,7 +895,7 @@ public VoidResponse addIdentityToProfile(String serverName, String userId, String userIdentityGUID, String profileGUID, - MetadataSourceRequestBody requestBody) + ExternalSourceRequestBody requestBody) { final String methodName = "addIdentityToProfile"; final String userIdentityGUIDParameterName = "userIdentityGUID"; @@ -975,7 +963,7 @@ public VoidResponse removeIdentityFromProfile(String serverNa String userId, String userIdentityGUID, String profileGUID, - MetadataSourceRequestBody requestBody) + ExternalSourceRequestBody requestBody) { final String methodName = "removeIdentityFromProfile"; final String userIdentityGUIDParameterName = "userIdentityGUID"; @@ -1035,19 +1023,19 @@ public VoidResponse removeIdentityFromProfile(String serverNa * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - public UserIdentityListResponse findUserIdentities(String serverName, - String userId, - int startFrom, - int pageSize, - SearchStringRequestBody requestBody) + public UserIdentitiesResponse findUserIdentities(String serverName, + String userId, + int startFrom, + int pageSize, + SearchStringRequestBody requestBody) { final String methodName = "findUserIdentities"; final String searchStringParameterName = "searchString"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - UserIdentityListResponse response = new UserIdentityListResponse(); - AuditLog auditLog = null; + UserIdentitiesResponse response = new UserIdentitiesResponse(); + AuditLog auditLog = null; try { @@ -1100,19 +1088,19 @@ public UserIdentityListResponse findUserIdentities(String serve * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - public UserIdentityListResponse getUserIdentitiesByName(String serverName, - String userId, - int startFrom, - int pageSize, - NameRequestBody requestBody) + public UserIdentitiesResponse getUserIdentitiesByName(String serverName, + String userId, + int startFrom, + int pageSize, + NameRequestBody requestBody) { final String methodName = "getUserIdentitiesByName"; final String nameParameterName = "name"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - UserIdentityListResponse response = new UserIdentityListResponse(); - AuditLog auditLog = null; + UserIdentitiesResponse response = new UserIdentitiesResponse(); + AuditLog auditLog = null; try { diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-spring/build.gradle b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-spring/build.gradle index 4156b590db6..f5d86c2a385 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-spring/build.gradle +++ b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-spring/build.gradle @@ -5,6 +5,7 @@ dependencies { + implementation project(':open-metadata-implementation:frameworks:open-metadata-framework') implementation project(':open-metadata-implementation:access-services:it-infrastructure:it-infrastructure-server') implementation project(':open-metadata-implementation:access-services:it-infrastructure:it-infrastructure-api') implementation project(':open-metadata-implementation:common-services:ffdc-services') diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-spring/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/server/spring/ITAssetResource.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-spring/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/server/spring/ITAssetResource.java index 23d5228b782..f1d41ffe062 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-spring/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/server/spring/ITAssetResource.java +++ b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-spring/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/server/spring/ITAssetResource.java @@ -4,14 +4,9 @@ import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.*; import org.odpi.openmetadata.accessservices.itinfrastructure.server.ITAssetRESTService; -import org.odpi.openmetadata.commonservices.ffdc.rest.EffectiveTimeRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.NullRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; +import org.odpi.openmetadata.accessservices.itinfrastructure.rest.TemplateRequestBody; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; @@ -184,7 +179,7 @@ public VoidResponse setupRelatedAsset(@PathVariable String s @PathVariable String relatedAssetTypeName, @PathVariable String relatedAssetGUID, @RequestParam boolean infrastructureManagerIsHome, - @RequestBody AssetExtensionsRequestBody requestBody) + @RequestBody AssetExtensionsRequestBody requestBody) { return restAPI.setupRelatedAsset(serverName, userId, assetTypeName, assetGUID, relationshipTypeName, relatedAssetTypeName, relatedAssetGUID, infrastructureManagerIsHome, requestBody); } @@ -247,7 +242,7 @@ public VoidResponse clearRelatedAsset(@PathVariable String @PathVariable String relationshipTypeName, @PathVariable String relatedAssetTypeName, @PathVariable String relatedAssetGUID, - @RequestBody EffectiveTimeMetadataSourceRequestBody requestBody) + @RequestBody EffectiveTimeQueryRequestBody requestBody) { return restAPI.clearRelatedAsset(serverName, userId, assetTypeName, assetGUID, relationshipTypeName, relatedAssetTypeName, relatedAssetGUID, requestBody); } @@ -339,7 +334,7 @@ public VoidResponse clearClassification(@PathVariable String @PathVariable String assetTypeName, @PathVariable String assetGUID, @PathVariable String classificationName, - @RequestBody EffectiveTimeMetadataSourceRequestBody requestBody) + @RequestBody EffectiveTimeQueryRequestBody requestBody) { return restAPI.clearClassification(serverName, userId, assetTypeName, assetGUID, classificationName, requestBody); } @@ -419,7 +414,7 @@ public VoidResponse withdrawAsset(@PathVariable String serverName, public VoidResponse removeAsset(@PathVariable String serverName, @PathVariable String userId, @PathVariable String assetGUID, - @RequestBody MetadataSourceRequestBody requestBody) + @RequestBody ExternalSourceRequestBody requestBody) { return restAPI.removeAsset(serverName, userId, assetGUID, requestBody); } @@ -445,12 +440,12 @@ public VoidResponse removeAsset(@PathVariable String serverNa */ @PostMapping(path = "/assets/{assetTypeName}/by-search-string") - public AssetListResponse findAssets(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String assetTypeName, - @RequestParam int startFrom, - @RequestParam int pageSize, - @RequestBody SearchStringRequestBody requestBody) + public AssetElementsResponse findAssets(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String assetTypeName, + @RequestParam int startFrom, + @RequestParam int pageSize, + @RequestBody SearchStringRequestBody requestBody) { return restAPI.findAssets(serverName, userId, assetTypeName, startFrom, pageSize, requestBody); } @@ -475,12 +470,12 @@ public AssetListResponse findAssets(@PathVariable String server */ @PostMapping(path = "/assets/{assetTypeName}/by-name") - public AssetListResponse getAssetsByName(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String assetTypeName, - @RequestParam int startFrom, - @RequestParam int pageSize, - @RequestBody NameRequestBody requestBody) + public AssetElementsResponse getAssetsByName(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String assetTypeName, + @RequestParam int startFrom, + @RequestParam int pageSize, + @RequestBody NameRequestBody requestBody) { return restAPI.getAssetsByName(serverName, userId, assetTypeName, startFrom, pageSize, requestBody); } @@ -504,12 +499,12 @@ public AssetListResponse getAssetsByName(@PathVariable String serverNam */ @PostMapping(path = "/assets/{assetTypeName}/by-deployed-implementation-type") - public AssetListResponse getAssetsByDeployedImplementationType(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String assetTypeName, - @RequestParam int startFrom, - @RequestParam int pageSize, - @RequestBody(required = false) + public AssetElementsResponse getAssetsByDeployedImplementationType(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String assetTypeName, + @RequestParam int startFrom, + @RequestParam int pageSize, + @RequestBody(required = false) NameRequestBody requestBody) { return restAPI.getAssetsByDeployedImplementationType(serverName, userId, assetTypeName, startFrom, pageSize, requestBody); @@ -536,14 +531,14 @@ public AssetListResponse getAssetsByDeployedImplementationType(@PathVariable Str */ @PostMapping(path = "/infrastructure-managers/{infrastructureManagerGUID}/{infrastructureManagerName}/assets/{assetTypeName}") - public AssetListResponse getAssetsForInfrastructureManager(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String infrastructureManagerGUID, - @PathVariable String infrastructureManagerName, - @PathVariable String assetTypeName, - @RequestParam int startFrom, - @RequestParam int pageSize, - @RequestBody EffectiveTimeRequestBody requestBody) + public AssetElementsResponse getAssetsForInfrastructureManager(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String infrastructureManagerGUID, + @PathVariable String infrastructureManagerName, + @PathVariable String assetTypeName, + @RequestParam int startFrom, + @RequestParam int pageSize, + @RequestBody EffectiveTimeRequestBody requestBody) { return restAPI.getAssetsForInfrastructureManager(serverName, userId, infrastructureManagerGUID, infrastructureManagerName, assetTypeName, startFrom, pageSize, requestBody); } @@ -566,11 +561,11 @@ public AssetListResponse getAssetsForInfrastructureManager(@PathVariable String */ @PostMapping(path = "/assets/{assetTypeName}/{assetGUID}") - public AssetResponse getAssetByGUID(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String assetTypeName, - @PathVariable String assetGUID, - @RequestBody EffectiveTimeRequestBody requestBody) + public AssetElementResponse getAssetByGUID(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String assetTypeName, + @PathVariable String assetGUID, + @RequestBody EffectiveTimeRequestBody requestBody) { return restAPI.getAssetByGUID(serverName, userId, assetTypeName, assetGUID, requestBody); } @@ -598,16 +593,16 @@ public AssetResponse getAssetByGUID(@PathVariable String serve */ @PostMapping(path = "/assets/{assetTypeName}/{assetGUID}/{relationshipTypeName}/{relatedAssetTypeName}/relationships") - public AssetRelationshipListResponse getAssetRelationships(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String assetTypeName, - @PathVariable String assetGUID, - @PathVariable String relationshipTypeName, - @PathVariable String relatedAssetTypeName, - @RequestParam int startingEnd, - @RequestParam int startFrom, - @RequestParam int pageSize, - @RequestBody EffectiveTimeRequestBody requestBody) + public AssetRelationshipsResponse getAssetRelationships(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String assetTypeName, + @PathVariable String assetGUID, + @PathVariable String relationshipTypeName, + @PathVariable String relatedAssetTypeName, + @RequestParam int startingEnd, + @RequestParam int startFrom, + @RequestParam int pageSize, + @RequestBody EffectiveTimeRequestBody requestBody) { return restAPI.getAssetRelationships(serverName, userId, assetTypeName, assetGUID, relationshipTypeName, relatedAssetTypeName, startingEnd, startFrom, pageSize, requestBody); } @@ -635,16 +630,16 @@ public AssetRelationshipListResponse getAssetRelationships(@PathVariable String */ @PostMapping(path = "/assets/{assetTypeName}/{assetGUID}/{relationshipTypeName}/{relatedAssetTypeName}") - public RelatedAssetListResponse getRelatedAssets(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String assetTypeName, - @PathVariable String assetGUID, - @PathVariable String relationshipTypeName, - @PathVariable String relatedAssetTypeName, - @RequestParam int startingEnd, - @RequestParam int startFrom, - @RequestParam int pageSize, - @RequestBody EffectiveTimeRequestBody requestBody) + public RelatedAssetsResponse getRelatedAssets(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String assetTypeName, + @PathVariable String assetGUID, + @PathVariable String relationshipTypeName, + @PathVariable String relatedAssetTypeName, + @RequestParam int startingEnd, + @RequestParam int startFrom, + @RequestParam int pageSize, + @RequestBody EffectiveTimeRequestBody requestBody) { return restAPI.getRelatedAssets(serverName, userId, assetTypeName, assetGUID, relationshipTypeName, relatedAssetTypeName, startingEnd, startFrom, pageSize, requestBody); } @@ -753,7 +748,7 @@ public VoidResponse updateDataFlow(@PathVariable String serverName, public VoidResponse clearDataFlow(@PathVariable String serverName, @PathVariable String userId, @PathVariable String dataFlowGUID, - @RequestBody EffectiveTimeMetadataSourceRequestBody requestBody) + @RequestBody EffectiveTimeQueryRequestBody requestBody) { return restAPI.clearDataFlow(serverName, userId, dataFlowGUID, requestBody); } @@ -913,7 +908,7 @@ public VoidResponse updateControlFlow(@PathVariable String serve public VoidResponse clearControlFlow(@PathVariable String serverName, @PathVariable String userId, @PathVariable String controlFlowGUID, - @RequestBody EffectiveTimeMetadataSourceRequestBody requestBody) + @RequestBody EffectiveTimeQueryRequestBody requestBody) { return restAPI.clearControlFlow(serverName, userId, controlFlowGUID, requestBody); } @@ -1073,7 +1068,7 @@ public VoidResponse updateProcessCall(@PathVariable String serve public VoidResponse clearProcessCall(@PathVariable String serverName, @PathVariable String userId, @PathVariable String processCallGUID, - @RequestBody EffectiveTimeMetadataSourceRequestBody requestBody) + @RequestBody EffectiveTimeQueryRequestBody requestBody) { return restAPI.clearProcessCall(serverName, userId, processCallGUID, requestBody); } @@ -1209,7 +1204,7 @@ public LineageMappingElementResponse getLineageMapping(@PathVariable String public VoidResponse clearLineageMapping(@PathVariable String serverName, @PathVariable String userId, @PathVariable String lineageMappingGUID, - @RequestBody EffectiveTimeMetadataSourceRequestBody requestBody) + @RequestBody EffectiveTimeQueryRequestBody requestBody) { return restAPI.clearLineageMapping(serverName, userId, lineageMappingGUID, requestBody); } diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-spring/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/server/spring/ITInfrastructureResource.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-spring/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/server/spring/ITInfrastructureResource.java index b6e1b8b82b9..bcdcea1cb4f 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-spring/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/server/spring/ITInfrastructureResource.java +++ b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-spring/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/server/spring/ITInfrastructureResource.java @@ -4,13 +4,16 @@ import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.*; +import org.odpi.openmetadata.accessservices.itinfrastructure.rest.TemplateRequestBody; import org.odpi.openmetadata.accessservices.itinfrastructure.server.ITInfrastructureRESTServices; -import org.odpi.openmetadata.commonservices.ffdc.rest.EffectiveTimeRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; +import org.odpi.openmetadata.commonservices.ffdc.rest.ConnectionResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.ConnectionsResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.ConnectorTypeResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.ConnectorTypesResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.EmbeddedConnectionRequestBody; +import org.odpi.openmetadata.commonservices.ffdc.rest.EndpointResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.EndpointsResponse; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; @@ -33,7 +36,7 @@ public class ITInfrastructureResource { - private ITInfrastructureRESTServices restAPI = new ITInfrastructureRESTServices(); + private final ITInfrastructureRESTServices restAPI = new ITInfrastructureRESTServices(); /** * Default constructor @@ -57,9 +60,9 @@ public ITInfrastructureResource() */ @GetMapping(path = "/topics/out-topic-connection/{callerId}") - public org.odpi.openmetadata.commonservices.ffdc.rest.ConnectionResponse getOutTopicConnection(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String callerId) + public OCFConnectionResponse getOutTopicConnection(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String callerId) { return restAPI.getOutTopicConnection(serverName, userId, callerId); } @@ -159,7 +162,7 @@ public VoidResponse setupConnectorType(@PathVariable String s @PathVariable String userId, @PathVariable String connectionGUID, @PathVariable String connectorTypeGUID, - @RequestBody MetadataSourceRequestBody requestBody) + @RequestBody ExternalSourceRequestBody requestBody) { return restAPI.setupConnectorType(serverName, userId, connectionGUID, connectorTypeGUID, requestBody); } @@ -185,7 +188,7 @@ public VoidResponse clearConnectorType(@PathVariable String s @PathVariable String userId, @PathVariable String connectionGUID, @PathVariable String connectorTypeGUID, - @RequestBody MetadataSourceRequestBody requestBody) + @RequestBody ExternalSourceRequestBody requestBody) { return restAPI.clearConnectorType(serverName, userId, connectionGUID, connectorTypeGUID, requestBody); } @@ -211,7 +214,7 @@ public VoidResponse setupEndpoint(@PathVariable String server @PathVariable String userId, @PathVariable String connectionGUID, @PathVariable String endpointGUID, - @RequestBody MetadataSourceRequestBody requestBody) + @RequestBody ExternalSourceRequestBody requestBody) { return restAPI.setupEndpoint(serverName, userId, connectionGUID, endpointGUID, requestBody); } @@ -237,7 +240,7 @@ public VoidResponse clearEndpoint(@PathVariable String server @PathVariable String userId, @PathVariable String connectionGUID, @PathVariable String endpointGUID, - @RequestBody MetadataSourceRequestBody requestBody) + @RequestBody ExternalSourceRequestBody requestBody) { return restAPI.clearEndpoint(serverName, userId, connectionGUID, endpointGUID, requestBody); } @@ -289,7 +292,7 @@ public VoidResponse clearEmbeddedConnection(@PathVariable String @PathVariable String userId, @PathVariable String connectionGUID, @PathVariable String embeddedConnectionGUID, - @RequestBody MetadataSourceRequestBody requestBody) + @RequestBody ExternalSourceRequestBody requestBody) { return restAPI.clearEmbeddedConnection(serverName, userId, connectionGUID, embeddedConnectionGUID, requestBody); } @@ -341,7 +344,7 @@ public VoidResponse clearAssetConnection(@PathVariable String @PathVariable String userId, @PathVariable String assetGUID, @PathVariable String connectionGUID, - @RequestBody MetadataSourceRequestBody requestBody) + @RequestBody ExternalSourceRequestBody requestBody) { return restAPI.clearAssetConnection(serverName, userId, assetGUID, connectionGUID, requestBody); } @@ -366,7 +369,7 @@ public VoidResponse clearAssetConnection(@PathVariable String public VoidResponse removeConnection(@PathVariable String serverName, @PathVariable String userId, @PathVariable String connectionGUID, - @RequestBody MetadataSourceRequestBody requestBody) + @RequestBody ExternalSourceRequestBody requestBody) { return restAPI.removeConnection(serverName, userId, connectionGUID, requestBody); } @@ -391,7 +394,7 @@ public VoidResponse removeConnection(@PathVariable String ser public ConnectionsResponse findConnections(@PathVariable String serverName, @PathVariable String userId, - @RequestBody SearchStringRequestBody requestBody, + @RequestBody SearchStringRequestBody requestBody, @RequestParam int startFrom, @RequestParam int pageSize) { @@ -538,7 +541,7 @@ public VoidResponse updateConnectorType(@PathVariable String s public VoidResponse removeConnectorType(@PathVariable String serverName, @PathVariable String userId, @PathVariable String connectorTypeGUID, - @RequestBody MetadataSourceRequestBody requestBody) + @RequestBody ExternalSourceRequestBody requestBody) { return restAPI.removeConnectorType(serverName, userId, connectorTypeGUID, requestBody); } @@ -771,7 +774,7 @@ public VoidResponse updateEndpoint(@PathVariable String serverName, public VoidResponse removeEndpoint(@PathVariable String serverName, @PathVariable String userId, @PathVariable String endpointGUID, - @RequestBody MetadataSourceRequestBody requestBody) + @RequestBody ExternalSourceRequestBody requestBody) { return restAPI.removeEndpoint(serverName, userId, endpointGUID, requestBody); } @@ -1009,7 +1012,7 @@ public VoidResponse updateSoftwareCapability(@PathVariable String public VoidResponse removeSoftwareCapability(@PathVariable String serverName, @PathVariable String userId, @PathVariable String capabilityGUID, - @RequestBody MetadataSourceRequestBody requestBody) + @RequestBody ExternalSourceRequestBody requestBody) { return restAPI.removeSoftwareCapability(serverName, userId, capabilityGUID, requestBody); } @@ -1032,11 +1035,11 @@ public VoidResponse removeSoftwareCapability(@PathVariable String */ @PostMapping(path = "/software-capabilities/by-search-string") - public SoftwareCapabilityListResponse findSoftwareCapabilities(@PathVariable String serverName, - @PathVariable String userId, - @RequestParam int startFrom, - @RequestParam int pageSize, - @RequestBody SearchStringRequestBody requestBody) + public SoftwareCapabilitiesResponse findSoftwareCapabilities(@PathVariable String serverName, + @PathVariable String userId, + @RequestParam int startFrom, + @RequestParam int pageSize, + @RequestBody SearchStringRequestBody requestBody) { return restAPI.findSoftwareCapabilities(serverName, userId, startFrom, pageSize, requestBody); } @@ -1059,11 +1062,11 @@ public SoftwareCapabilityListResponse findSoftwareCapabilities(@PathVariable Str */ @PostMapping(path = "/software-capabilities/by-name") - public SoftwareCapabilityListResponse getSoftwareCapabilitiesByName(@PathVariable String serverName, - @PathVariable String userId, - @RequestParam int startFrom, - @RequestParam int pageSize, - @RequestBody NameRequestBody requestBody) + public SoftwareCapabilitiesResponse getSoftwareCapabilitiesByName(@PathVariable String serverName, + @PathVariable String userId, + @RequestParam int startFrom, + @RequestParam int pageSize, + @RequestBody NameRequestBody requestBody) { return restAPI.getSoftwareCapabilitiesByName(serverName, userId, startFrom, pageSize, requestBody); } @@ -1167,7 +1170,7 @@ public VoidResponse updateServerAssetUse(@PathVariable String public VoidResponse removeServerAssetUse(@PathVariable String serverName, @PathVariable String userId, @PathVariable String serverAssetUseGUID, - @RequestBody MetadataSourceRequestBody requestBody) + @RequestBody ExternalSourceRequestBody requestBody) { return restAPI.removeServerAssetUse(serverName, userId, serverAssetUseGUID, requestBody); } @@ -1190,12 +1193,12 @@ public VoidResponse removeServerAssetUse(@PathVariable String */ @PostMapping(path = "/server-asset-uses/software-capabilities/{capabilityGUID}") - public ServerAssetUseListResponse getServerAssetUsesForCapability(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String capabilityGUID, - @RequestParam int startFrom, - @RequestParam int pageSize, - @RequestBody UseTypeRequestBody requestBody) + public ServerAssetUsesResponse getServerAssetUsesForCapability(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String capabilityGUID, + @RequestParam int startFrom, + @RequestParam int pageSize, + @RequestBody UseTypeRequestBody requestBody) { return restAPI.getServerAssetUsesForCapability(serverName, userId, capabilityGUID, startFrom, pageSize, requestBody); } @@ -1218,12 +1221,12 @@ public ServerAssetUseListResponse getServerAssetUsesForCapability(@PathVariable */ @PostMapping(path = "/server-asset-uses/assets/{assetGUID}") - public ServerAssetUseListResponse getCapabilityUsesForAsset(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String assetGUID, - @RequestParam int startFrom, - @RequestParam int pageSize, - @RequestBody UseTypeRequestBody requestBody) + public ServerAssetUsesResponse getCapabilityUsesForAsset(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String assetGUID, + @RequestParam int startFrom, + @RequestParam int pageSize, + @RequestBody UseTypeRequestBody requestBody) { return restAPI.getCapabilityUsesForAsset(serverName, userId, assetGUID, startFrom, pageSize, requestBody); } @@ -1247,13 +1250,13 @@ public ServerAssetUseListResponse getCapabilityUsesForAsset(@PathVariable String */ @PostMapping(path = "/server-asset-uses/software-capabilities/{capabilityGUID}/assets/{assetGUID}/by-elements") - public ServerAssetUseListResponse getServerAssetUsesForElements(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String capabilityGUID, - @PathVariable String assetGUID, - @RequestParam int startFrom, - @RequestParam int pageSize, - @RequestBody EffectiveTimeRequestBody requestBody) + public ServerAssetUsesResponse getServerAssetUsesForElements(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String capabilityGUID, + @PathVariable String assetGUID, + @RequestParam int startFrom, + @RequestParam int pageSize, + @RequestBody EffectiveTimeRequestBody requestBody) { return restAPI.getServerAssetUsesForElements(serverName, userId, capabilityGUID, assetGUID, startFrom, pageSize, requestBody); } diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-spring/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/server/spring/ITProfileResource.java b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-spring/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/server/spring/ITProfileResource.java index 306a277d941..4b86360044a 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-spring/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/server/spring/ITProfileResource.java +++ b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-spring/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/server/spring/ITProfileResource.java @@ -4,19 +4,8 @@ import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.ITProfileListResponse; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.ITProfileRequestBody; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.ITProfileResponse; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.ContactMethodRequestBody; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.MetadataSourceRequestBody; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.UserIdentityListResponse; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.UserIdentityRequestBody; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.UserIdentityResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.odpi.openmetadata.accessservices.itinfrastructure.server.ITProfileRESTServices; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; @@ -68,7 +57,7 @@ public ITProfileResource() public GUIDResponse createITProfile(@PathVariable String serverName, @PathVariable String userId, - @RequestBody ITProfileRequestBody requestBody) + @RequestBody ITProfileRequestBody requestBody) { return restAPI.createITProfile(serverName, userId, requestBody); } @@ -120,7 +109,7 @@ public VoidResponse updateITProfile(@PathVariable String serverNam public VoidResponse deleteITProfile(@PathVariable String serverName, @PathVariable String userId, @PathVariable String itProfileGUID, - @RequestBody MetadataSourceRequestBody requestBody) + @RequestBody ExternalSourceRequestBody requestBody) { return restAPI.deleteITProfile(serverName, userId, itProfileGUID, requestBody); } @@ -170,7 +159,7 @@ public GUIDResponse addContactMethod(@PathVariable String serv public VoidResponse deleteContactMethod(@PathVariable String serverName, @PathVariable String userId, @PathVariable String contactMethodGUID, - @RequestBody MetadataSourceRequestBody requestBody) + @RequestBody ExternalSourceRequestBody requestBody) { return restAPI.deleteContactMethod(serverName, userId, contactMethodGUID, requestBody); } @@ -239,11 +228,11 @@ public ITProfileResponse getITProfileByUserId(@PathVariable String serverName, */ @PostMapping(path = "/profiles/by-name") - public ITProfileListResponse getITProfileByName(@PathVariable String serverName, - @PathVariable String userId, - @RequestParam int startFrom, - @RequestParam int pageSize, - @RequestBody NameRequestBody requestBody) + public ITProfilesResponse getITProfileByName(@PathVariable String serverName, + @PathVariable String userId, + @RequestParam int startFrom, + @RequestParam int pageSize, + @RequestBody NameRequestBody requestBody) { return restAPI.getITProfileByName(serverName, userId, startFrom, pageSize, requestBody); } @@ -266,11 +255,11 @@ public ITProfileListResponse getITProfileByName(@PathVariable String se */ @PostMapping(path = "/profiles/by-search-string") - public ITProfileListResponse findITProfile(@PathVariable String serverName, - @PathVariable String userId, - @RequestParam int startFrom, - @RequestParam int pageSize, - @RequestBody SearchStringRequestBody requestBody) + public ITProfilesResponse findITProfile(@PathVariable String serverName, + @PathVariable String userId, + @RequestParam int startFrom, + @RequestParam int pageSize, + @RequestBody SearchStringRequestBody requestBody) { return restAPI.findITProfile(serverName, userId, startFrom, pageSize, requestBody); } @@ -344,7 +333,7 @@ public VoidResponse updateUserIdentity(@PathVariable String ser public VoidResponse deleteUserIdentity(@PathVariable String serverName, @PathVariable String userId, @PathVariable String userIdentityGUID, - @RequestBody MetadataSourceRequestBody requestBody) + @RequestBody ExternalSourceRequestBody requestBody) { return restAPI.deleteUserIdentity(serverName, userId, userIdentityGUID, requestBody); } @@ -371,7 +360,7 @@ public VoidResponse addIdentityToProfile(@PathVariable String @PathVariable String userId, @PathVariable String userIdentityGUID, @PathVariable String profileGUID, - @RequestBody MetadataSourceRequestBody requestBody) + @RequestBody ExternalSourceRequestBody requestBody) { return restAPI.addIdentityToProfile(serverName, userId, userIdentityGUID, profileGUID, requestBody); } @@ -398,7 +387,7 @@ public VoidResponse removeIdentityFromProfile(@PathVariable String @PathVariable String userId, @PathVariable String userIdentityGUID, @PathVariable String profileGUID, - @RequestBody MetadataSourceRequestBody requestBody) + @RequestBody ExternalSourceRequestBody requestBody) { return restAPI.removeIdentityFromProfile(serverName, userId, userIdentityGUID, profileGUID, requestBody); } @@ -421,11 +410,11 @@ public VoidResponse removeIdentityFromProfile(@PathVariable String */ @PostMapping(path = "/user-identities/by-search-string") - public UserIdentityListResponse findUserIdentities(@PathVariable String serverName, - @PathVariable String userId, - @RequestParam int startFrom, - @RequestParam int pageSize, - @RequestBody SearchStringRequestBody requestBody) + public UserIdentitiesResponse findUserIdentities(@PathVariable String serverName, + @PathVariable String userId, + @RequestParam int startFrom, + @RequestParam int pageSize, + @RequestBody SearchStringRequestBody requestBody) { return restAPI.findUserIdentities(serverName, userId, startFrom, pageSize, requestBody); } @@ -448,11 +437,11 @@ public UserIdentityListResponse findUserIdentities(@PathVariable String */ @PostMapping(path = "/user-identities/by-name") - public UserIdentityListResponse getUserIdentitiesByName(@PathVariable String serverName, - @PathVariable String userId, - @RequestParam int startFrom, - @RequestParam int pageSize, - @RequestBody NameRequestBody requestBody) + public UserIdentitiesResponse getUserIdentitiesByName(@PathVariable String serverName, + @PathVariable String userId, + @RequestParam int startFrom, + @RequestParam int pageSize, + @RequestBody NameRequestBody requestBody) { return restAPI.getUserIdentitiesByName(serverName, userId, startFrom, pageSize, requestBody); } diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-topic-connectors/build.gradle b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-topic-connectors/build.gradle index 747bc65386d..b5c44534bbd 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-topic-connectors/build.gradle +++ b/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-topic-connectors/build.gradle @@ -6,6 +6,7 @@ dependencies { implementation project(':open-metadata-implementation:frameworks:audit-log-framework') + implementation project(':open-metadata-implementation:frameworks:open-metadata-framework') implementation project(':open-metadata-implementation:frameworks:open-connector-framework') implementation project(':open-metadata-implementation:repository-services:repository-services-apis') implementation project(':open-metadata-implementation:access-services:it-infrastructure:it-infrastructure-api') diff --git a/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/api/ProjectsInterface.java b/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/api/ProjectsInterface.java index 7f66ee9c7fa..61b745f6bd7 100644 --- a/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/api/ProjectsInterface.java +++ b/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/api/ProjectsInterface.java @@ -2,10 +2,10 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.projectmanagement.api; -import org.odpi.openmetadata.accessservices.projectmanagement.metadataelements.ActorProfileElement; -import org.odpi.openmetadata.accessservices.projectmanagement.metadataelements.ProjectElement; -import org.odpi.openmetadata.accessservices.projectmanagement.metadataelements.PersonRoleElement; -import org.odpi.openmetadata.accessservices.projectmanagement.metadataelements.ProjectTeamMember; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ActorProfileElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.PersonRoleElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ProjectElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ProjectTeamMember; import org.odpi.openmetadata.frameworks.openmetadata.properties.projects.ProjectTeamProperties; import org.odpi.openmetadata.frameworks.openmetadata.properties.projects.ProjectProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; diff --git a/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/api/RelatedElementsInterface.java b/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/api/RelatedElementsInterface.java index 1d824195670..2af658bb0e8 100644 --- a/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/api/RelatedElementsInterface.java +++ b/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/api/RelatedElementsInterface.java @@ -2,7 +2,7 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.projectmanagement.api; -import org.odpi.openmetadata.accessservices.projectmanagement.metadataelements.RelatedElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.RelatedElement; import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.AssignmentScopeProperties; import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; import org.odpi.openmetadata.frameworks.openmetadata.properties.resources.ResourceListProperties; diff --git a/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/metadataelements/ActorProfileElement.java b/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/metadataelements/ActorProfileElement.java deleted file mode 100644 index 7f41e4cab64..00000000000 --- a/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/metadataelements/ActorProfileElement.java +++ /dev/null @@ -1,144 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.projectmanagement.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.ActorProfileProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * The ActorProfileElement describes an individual, system, team or organization. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ActorProfileElement implements MetadataElement -{ - private ElementHeader elementHeader = null; - private ActorProfileProperties profileProperties = null; - - - - /** - * Default Constructor - */ - public ActorProfileElement() - { - } - - - /** - * Copy/clone Constructor - the resulting object. - * - * @param template object being copied - */ - public ActorProfileElement(ActorProfileElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - profileProperties = template.getProfileProperties(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the properties of the profile. - * - * @return properties - */ - public ActorProfileProperties getProfileProperties() - { - return profileProperties; - } - - - /** - * Set up the profile properties. - * - * @param profileProperties properties - */ - public void setProfileProperties(ActorProfileProperties profileProperties) - { - this.profileProperties = profileProperties; - } - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ActorProfileElement{" + - "elementHeader=" + elementHeader + - ", profileProperties=" + profileProperties + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ActorProfileElement that = (ActorProfileElement) objectToCompare; - return Objects.equals(elementHeader, that.elementHeader) && - Objects.equals(profileProperties, that.profileProperties); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(elementHeader, profileProperties); - } -} diff --git a/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/metadataelements/ContactMethodElement.java b/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/metadataelements/ContactMethodElement.java deleted file mode 100644 index 6c74139ec09..00000000000 --- a/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/metadataelements/ContactMethodElement.java +++ /dev/null @@ -1,147 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.projectmanagement.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.ContactMethodProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ContactMethodElement contains the properties and header for a contract method retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ContactMethodElement implements MetadataElement -{ - private ElementHeader elementHeader = null; - private ContactMethodProperties properties = null; - - - /** - * Default constructor - */ - public ContactMethodElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ContactMethodElement(ContactMethodElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - properties = template.getProperties(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - @Override - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the properties of the contact method. - * - * @return properties - */ - public ContactMethodProperties getProperties() - { - return properties; - } - - - /** - * Set up the contract method properties. - * - * @param properties properties - */ - public void setProperties(ContactMethodProperties properties) - { - this.properties = properties; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ContactMethodElement{" + - "elementHeader=" + elementHeader + - ", properties=" + properties + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ContactMethodElement that = (ContactMethodElement) objectToCompare; - return Objects.equals(elementHeader, that.elementHeader) && - Objects.equals(properties, that.properties); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementHeader, properties); - } -} diff --git a/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/metadataelements/ContributionRecordElement.java b/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/metadataelements/ContributionRecordElement.java deleted file mode 100644 index deca4a2b074..00000000000 --- a/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/metadataelements/ContributionRecordElement.java +++ /dev/null @@ -1,147 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.projectmanagement.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.ContributionRecord; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * ContributionRecordElement contains the properties and header for a contribution record retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ContributionRecordElement implements MetadataElement -{ - private ElementHeader elementHeader = null; - private ContributionRecord properties = null; - - - /** - * Default constructor - */ - public ContributionRecordElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ContributionRecordElement(ContributionRecordElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - properties = template.getProperties(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - @Override - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the properties of the contribution record. - * - * @return properties - */ - public ContributionRecord getProperties() - { - return properties; - } - - - /** - * Set up the contribution record properties. - * - * @param properties properties - */ - public void setProperties(ContributionRecord properties) - { - this.properties = properties; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ContributionRecordElement{" + - "elementHeader=" + elementHeader + - ", properties=" + properties + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ContributionRecordElement that = (ContributionRecordElement) objectToCompare; - return Objects.equals(elementHeader, that.elementHeader) && - Objects.equals(properties, that.properties); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementHeader, properties); - } -} diff --git a/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/metadataelements/MetadataElement.java b/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/metadataelements/MetadataElement.java deleted file mode 100644 index 8fbe0de3225..00000000000 --- a/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/metadataelements/MetadataElement.java +++ /dev/null @@ -1,28 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.projectmanagement.metadataelements; - -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * MetadataElement is the common interface for all metadata elements. It adds the header information that is stored with the properties. - * This includes detains of its unique identifier, type and origin. - */ -public interface MetadataElement -{ - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - ElementHeader getElementHeader(); - - - /** - * Set up the element header associated with the properties. - * - * @param header element header object - */ - void setElementHeader(ElementHeader header); -} diff --git a/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/metadataelements/PersonRoleElement.java b/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/metadataelements/PersonRoleElement.java deleted file mode 100644 index 68acbe5bd89..00000000000 --- a/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/metadataelements/PersonRoleElement.java +++ /dev/null @@ -1,175 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.projectmanagement.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.PersonRoleProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * PersonalRoleElement contains the properties and header for a person role assigned to a profile retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class PersonRoleElement implements MetadataElement -{ - private ElementHeader elementHeader = null; - private PersonRoleProperties properties = null; - private RelatedElement relatedElement = null; - - - /** - * Default constructor - */ - public PersonRoleElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public PersonRoleElement(PersonRoleElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - properties = template.getProperties(); - relatedElement = template.getRelatedElement(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param header element header object - */ - @Override - public void setElementHeader(ElementHeader header) - { - this.elementHeader = header; - } - - - /** - * Return the properties of the role. - * - * @return properties - */ - public PersonRoleProperties getProperties() - { - return properties; - } - - - /** - * Set up the role properties. - * - * @param properties properties - */ - public void setProperties(PersonRoleProperties properties) - { - this.properties = properties; - } - - - /** - * Return details of the relationship used to retrieve this element. - * Will be null if the element was retrieved directly rather than via a relationship. - * - * @return list of element stubs - */ - public RelatedElement getRelatedElement() - { - return relatedElement; - } - - - /** - * Set up details of the relationship used to retrieve this element. - * Will be null if the element was retrieved directly rather than via a relationship. - * - * @param relatedElement relationship details - */ - public void setRelatedElement(RelatedElement relatedElement) - { - this.relatedElement = relatedElement; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "PersonRoleElement{" + - "elementHeader=" + elementHeader + - ", properties=" + properties + - ", relatedElement=" + relatedElement + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - PersonRoleElement that = (PersonRoleElement) objectToCompare; - return Objects.equals(elementHeader, that.elementHeader) && - Objects.equals(properties, that.properties) && - Objects.equals(relatedElement, that.relatedElement); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementHeader, properties, relatedElement); - } -} diff --git a/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/metadataelements/ProfileIdentityElement.java b/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/metadataelements/ProfileIdentityElement.java deleted file mode 100644 index 73adb0b4625..00000000000 --- a/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/metadataelements/ProfileIdentityElement.java +++ /dev/null @@ -1,145 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.projectmanagement.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.ProfileIdentityProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ProfileIdentityElement contains the properties and header for a relationship between a profile and a user identity retrieved - * from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ProfileIdentityElement -{ - private ProfileIdentityProperties profileIdentity = null; - private UserIdentityElement properties = null; - - - /** - * Default constructor - */ - public ProfileIdentityElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ProfileIdentityElement(ProfileIdentityElement template) - { - if (template != null) - { - profileIdentity = template.getProfileIdentity(); - properties = template.getProperties(); - } - } - - - /** - * Return the properties from the profile identity relationship. - * - * @return profile identity - */ - public ProfileIdentityProperties getProfileIdentity() - { - return profileIdentity; - } - - - /** - * Set up the properties from the profile identity relationship. - * - * @param profileIdentity profile identity - */ - public void setProfileIdentity(ProfileIdentityProperties profileIdentity) - { - this.profileIdentity = profileIdentity; - } - - - /** - * Return the properties of the userId. - * - * @return properties - */ - public UserIdentityElement getProperties() - { - return properties; - } - - - /** - * Set up the userId properties. - * - * @param properties properties - */ - public void setProperties(UserIdentityElement properties) - { - this.properties = properties; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ProfileIdentityElement{" + - "profileIdentity=" + profileIdentity + - ", properties=" + properties + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ProfileIdentityElement that = (ProfileIdentityElement) objectToCompare; - return Objects.equals(profileIdentity, that.profileIdentity) && - Objects.equals(properties, that.properties); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), profileIdentity, properties); - } -} diff --git a/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/metadataelements/ProfileLocationElement.java b/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/metadataelements/ProfileLocationElement.java deleted file mode 100644 index fc5c2418f2e..00000000000 --- a/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/metadataelements/ProfileLocationElement.java +++ /dev/null @@ -1,146 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.projectmanagement.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.ProfileLocationProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ProfileLocationElement contains the properties and header for a relationship between a profile and a user identity retrieved - * from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ProfileLocationElement -{ - private ProfileLocationProperties properties = null; - private ElementStub location = null; - - - /** - * Default constructor - */ - public ProfileLocationElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ProfileLocationElement(ProfileLocationElement template) - { - if (template != null) - { - properties = template.getProperties(); - location = template.getLocation(); - } - } - - - /** - * Return the properties from the profile location relationship. - * - * @return profile identity - */ - public ProfileLocationProperties getProperties() - { - return properties; - } - - - /** - * Set up the properties from the profile location relationship. - * - * @param properties profile identity - */ - public void setProperties(ProfileLocationProperties properties) - { - this.properties = properties; - } - - - /** - * Return the properties of the location. - * - * @return properties - */ - public ElementStub getLocation() - { - return location; - } - - - /** - * Set up the userId properties. - * - * @param location properties - */ - public void setLocation(ElementStub location) - { - this.location = location; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ProfileLocationElement{" + - "properties=" + properties + - ", location=" + location + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ProfileLocationElement that = (ProfileLocationElement) objectToCompare; - return Objects.equals(properties, that.properties) && - Objects.equals(location, that.location); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), properties, location); - } -} diff --git a/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/metadataelements/RelatedElement.java b/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/metadataelements/RelatedElement.java deleted file mode 100644 index ccebc831470..00000000000 --- a/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/metadataelements/RelatedElement.java +++ /dev/null @@ -1,172 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.projectmanagement.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * RelatedElement contains the properties and header for a relationship retrieved from the metadata repository along with the stub - * of the related element. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class RelatedElement -{ - private ElementHeader relationshipHeader = null; - private RelationshipProperties relationshipProperties = null; - private ElementStub relatedElement = null; - - /** - * Default constructor - */ - public RelatedElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public RelatedElement(RelatedElement template) - { - if (template != null) - { - relationshipHeader = template.getRelationshipHeader(); - relationshipProperties = template.getRelationshipProperties(); - relatedElement = template.getRelatedElement(); - } - } - - - /** - * Return the element header associated with the relationship. - * - * @return element header object - */ - public ElementHeader getRelationshipHeader() - { - return relationshipHeader; - } - - - /** - * Set up the element header associated with the relationship. - * - * @param relationshipHeader element header object - */ - public void setRelationshipHeader(ElementHeader relationshipHeader) - { - this.relationshipHeader = relationshipHeader; - } - - - /** - * Return details of the relationship - * - * @return relationship properties - */ - public RelationshipProperties getRelationshipProperties() - { - return relationshipProperties; - } - - - /** - * Set up relationship properties - * - * @param relationshipProperties relationship properties - */ - public void setRelationshipProperties(RelationshipProperties relationshipProperties) - { - this.relationshipProperties = relationshipProperties; - } - - - /** - * Return the element header associated with end 1 of the relationship. - * - * @return element stub object - */ - public ElementStub getRelatedElement() - { - return relatedElement; - } - - - /** - * Set up the element header associated with end 1 of the relationship. - * - * @param relatedElement element stub object - */ - public void setRelatedElement(ElementStub relatedElement) - { - this.relatedElement = relatedElement; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "RelatedElement{" + - "relationshipHeader=" + relationshipHeader + - ", relationshipProperties=" + relationshipProperties + - ", relatedElement=" + relatedElement + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - RelatedElement that = (RelatedElement) objectToCompare; - return Objects.equals(getRelationshipHeader(), that.getRelationshipHeader()) && - Objects.equals(getRelationshipProperties(), that.getRelationshipProperties()) && - Objects.equals(getRelatedElement(), that.getRelatedElement()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), relationshipHeader, relationshipProperties, relatedElement); - } -} diff --git a/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/metadataelements/RelationshipElement.java b/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/metadataelements/RelationshipElement.java deleted file mode 100644 index c464b3d8f8a..00000000000 --- a/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/metadataelements/RelationshipElement.java +++ /dev/null @@ -1,197 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.projectmanagement.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * RelationshipElement contains the properties and header for a relationship retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class RelationshipElement -{ - private ElementHeader relationshipHeader = null; - private RelationshipProperties relationshipProperties = null; - private ElementHeader end1GUID = null; - private ElementHeader end2GUID = null; - - /** - * Default constructor - */ - public RelationshipElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public RelationshipElement(RelationshipElement template) - { - if (template != null) - { - relationshipHeader = template.getRelationshipHeader(); - relationshipProperties = template.getRelationshipProperties(); - end1GUID = template.getEnd1GUID(); - end2GUID = template.getEnd2GUID(); - } - } - - - /** - * Return the element header associated with the relationship. - * - * @return element header object - */ - public ElementHeader getRelationshipHeader() - { - return relationshipHeader; - } - - - /** - * Set up the element header associated with the relationship. - * - * @param relationshipHeader element header object - */ - public void setRelationshipHeader(ElementHeader relationshipHeader) - { - this.relationshipHeader = relationshipHeader; - } - - - /** - * Return details of the relationship - * - * @return relationship properties - */ - public RelationshipProperties getRelationshipProperties() - { - return relationshipProperties; - } - - - /** - * Set up relationship properties - * - * @param relationshipProperties relationship properties - */ - public void setRelationshipProperties(RelationshipProperties relationshipProperties) - { - this.relationshipProperties = relationshipProperties; - } - - - /** - * Return the element header associated with end 1 of the relationship. - * - * @return element header object - */ - public ElementHeader getEnd1GUID() - { - return end1GUID; - } - - - /** - * Set up the element header associated with end 1 of the relationship. - * - * @param end1GUID element header object - */ - public void setEnd1GUID(ElementHeader end1GUID) - { - this.end1GUID = end1GUID; - } - - - - /** - * Return the element header associated with end 2 of the relationship. - * - * @return element header object - */ - public ElementHeader getEnd2GUID() - { - return end2GUID; - } - - - /** - * Set up the element header associated with end 2 of the relationship. - * - * @param end2GUID element header object - */ - public void setEnd2GUID(ElementHeader end2GUID) - { - this.end2GUID = end2GUID; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "RelationshipElement{" + - "relationshipHeader=" + relationshipHeader + - ", relationshipProperties=" + relationshipProperties + - ", end1GUID=" + end1GUID + - ", end2GUID=" + end2GUID + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - RelationshipElement that = (RelationshipElement) objectToCompare; - return Objects.equals(getRelationshipHeader(), that.getRelationshipHeader()) && - Objects.equals(getRelationshipProperties(), that.getRelationshipProperties()) && - Objects.equals(getEnd1GUID(), that.getEnd1GUID()) && - Objects.equals(getEnd2GUID(), that.getEnd2GUID()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), relationshipHeader, relationshipProperties, end1GUID, end2GUID); - } -} diff --git a/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/metadataelements/UserIdentityElement.java b/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/metadataelements/UserIdentityElement.java deleted file mode 100644 index 34dc18ca19b..00000000000 --- a/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/metadataelements/UserIdentityElement.java +++ /dev/null @@ -1,175 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.projectmanagement.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.UserIdentityProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * UserIdentityElement contains the properties and header for a user identity retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class UserIdentityElement implements MetadataElement -{ - private ElementHeader elementHeader = null; - private UserIdentityProperties properties = null; - private RelatedElement relatedElement = null; - - - /** - * Default constructor - */ - public UserIdentityElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public UserIdentityElement(UserIdentityElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - properties = template.getProperties(); - relatedElement = template.getRelatedElement(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - @Override - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the properties of the userId. - * - * @return properties - */ - public UserIdentityProperties getProperties() - { - return properties; - } - - - /** - * Set up the userId properties. - * - * @param properties properties - */ - public void setProperties(UserIdentityProperties properties) - { - this.properties = properties; - } - - - /** - * Return details of the relationship used to retrieve this element. - * Will be null if the element was retrieved directly rather than via a relationship. - * - * @return list of element stubs - */ - public RelatedElement getRelatedElement() - { - return relatedElement; - } - - - /** - * Set up details of the relationship used to retrieve this element. - * Will be null if the element was retrieved directly rather than via a relationship. - * - * @param relatedElement relationship details - */ - public void setRelatedElement(RelatedElement relatedElement) - { - this.relatedElement = relatedElement; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "UserIdentityElement{" + - "elementHeader=" + elementHeader + - ", properties=" + properties + - ", relatedElement=" + relatedElement + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - UserIdentityElement that = (UserIdentityElement) objectToCompare; - return Objects.equals(elementHeader, that.elementHeader) && - Objects.equals(properties, that.properties) && - Objects.equals(relatedElement, that.relatedElement); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementHeader, properties, relatedElement); - } -} diff --git a/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/metadataelements/package-info.java b/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/metadataelements/package-info.java deleted file mode 100644 index 380e96887ed..00000000000 --- a/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/metadataelements/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -/** - * The metadata elements describe the way that metadata is returned from the repository. - */ -package org.odpi.openmetadata.accessservices.projectmanagement.metadataelements; diff --git a/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/rest/ActorProfileListResponse.java b/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/rest/ActorProfileListResponse.java deleted file mode 100644 index f64d60729c0..00000000000 --- a/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/rest/ActorProfileListResponse.java +++ /dev/null @@ -1,148 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.projectmanagement.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.projectmanagement.metadataelements.ActorProfileElement; - -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * ActorProfileListResponse is the response structure used on the OMAS REST API calls that return - * a list of profile elements. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ActorProfileListResponse extends ProjectManagementOMASAPIResponse -{ - private List elements = null; - - - /** - * Default constructor - */ - public ActorProfileListResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ActorProfileListResponse(ActorProfileListResponse template) - { - super(template); - - if (template != null) - { - this.elements = template.getElements(); - } - } - - - /** - * Return the profile result. - * - * @return unique identifier - */ - public List getElements() - { - if (elements == null) - { - return null; - } - else if (elements.isEmpty()) - { - return null; - } - else - { - return elements; - } - } - - - /** - * Set up the profile result. - * - * @param elements - unique identifier - */ - public void setElements(List elements) - { - this.elements = elements; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ActorProfileListResponse{" + - "elements=" + elements + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof ActorProfileListResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ActorProfileListResponse that = (ActorProfileListResponse) objectToCompare; - return Objects.equals(getElements(), that.getElements()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elements); - } -} diff --git a/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/rest/ClassificationRequestBody.java b/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/rest/ClassificationRequestBody.java deleted file mode 100644 index 75fb3838c57..00000000000 --- a/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/rest/ClassificationRequestBody.java +++ /dev/null @@ -1,127 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.projectmanagement.rest; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.openmetadata.properties.ClassificationProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * ClassificationRequestBody describes the request body used when attaching classification to elements. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ClassificationRequestBody extends ExternalSourceRequestBody -{ - private ClassificationProperties properties = null; - - - /** - * Default constructor - */ - public ClassificationRequestBody() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public ClassificationRequestBody(ClassificationRequestBody template) - { - super(template); - - if (template != null) - { - properties = template.getProperties(); - } - } - - - /** - * Return the properties for the classification. - * - * @return properties object - */ - public ClassificationProperties getProperties() - { - return properties; - } - - - /** - * Set up the properties for the classification. - * - * @param properties properties object - */ - public void setProperties(ClassificationProperties properties) - { - this.properties = properties; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ClassificationRequestBody{" + - "externalSourceGUID='" + getExternalSourceGUID() + '\'' + - ", externalSourceName='" + getExternalSourceName() + '\'' + - ", properties=" + properties + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ClassificationRequestBody that = (ClassificationRequestBody) objectToCompare; - return Objects.equals(getProperties(), that.getProperties()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), properties); - } -} diff --git a/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/rest/ElementStubsResponse.java b/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/rest/ElementStubsResponse.java deleted file mode 100644 index eddc1c84bbc..00000000000 --- a/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/rest/ElementStubsResponse.java +++ /dev/null @@ -1,149 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.projectmanagement.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * ElementStubListResponse is the response structure used on the OMAS REST API calls that return a - * list of element identifiers as a response. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ElementStubsResponse extends ProjectManagementOMASAPIResponse -{ - private List elements = null; - - - /** - * Default constructor - */ - public ElementStubsResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ElementStubsResponse(ElementStubsResponse template) - { - super(template); - - if (template != null) - { - this.elements = template.getElements(); - } - } - - - /** - * Return the list of element identifiers. - * - * @return list of objects or null - */ - public List getElements() - { - if (elements == null) - { - return null; - } - else if (elements.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elements); - } - } - - - /** - * Set up the list of element identifiers. - * - * @param elements - list of objects or null - */ - public void setElements(List elements) - { - this.elements = elements; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ElementStubListResponse{" + - "elements=" + elements + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof ElementStubsResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ElementStubsResponse that = (ElementStubsResponse) objectToCompare; - return Objects.equals(this.getElements(), that.getElements()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(elements, super.hashCode()); - } -} diff --git a/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/rest/ExternalSourceRequestBody.java b/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/rest/ExternalSourceRequestBody.java deleted file mode 100644 index 857c0005d7b..00000000000 --- a/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/rest/ExternalSourceRequestBody.java +++ /dev/null @@ -1,143 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.projectmanagement.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ExternalSourceRequestBody carries the parameters for marking an element as external. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ExternalSourceRequestBody extends ProjectManagementOMASAPIRequestBody -{ - private String externalSourceGUID = null; - private String externalSourceName = null; - - - /** - * Default constructor - */ - public ExternalSourceRequestBody() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ExternalSourceRequestBody(ExternalSourceRequestBody template) - { - super(template); - - if (template != null) - { - externalSourceGUID = template.getExternalSourceGUID(); - externalSourceName = template.getExternalSourceName(); - } - } - - - /** - * Return the unique identifier of the software server capability entity that represented the external source - null for local. - * - * @return string guid - */ - public String getExternalSourceGUID() - { - return externalSourceGUID; - } - - - /** - * Set up the unique identifier of the software server capability entity that represented the external source - null for local. - * - * @param externalSourceGUID string guid - */ - public void setExternalSourceGUID(String externalSourceGUID) - { - this.externalSourceGUID = externalSourceGUID; - } - - - /** - * Return the unique name of the software server capability entity that represented the external source. - * - * @return string name - */ - public String getExternalSourceName() - { - return externalSourceName; - } - - - /** - * Set up the unique name of the software server capability entity that represented the external source. - * - * @param externalSourceName string name - */ - public void setExternalSourceName(String externalSourceName) - { - this.externalSourceName = externalSourceName; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ExternalSourceRequestBody{" + - "externalSourceGUID='" + externalSourceGUID + '\'' + - ", externalSourceName='" + externalSourceName + '\'' + - '}'; - } - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ExternalSourceRequestBody that = (ExternalSourceRequestBody) objectToCompare; - return Objects.equals(externalSourceGUID, that.externalSourceGUID) && - Objects.equals(externalSourceName, that.externalSourceName); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), externalSourceGUID, externalSourceName); - } -} diff --git a/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/rest/PersonRoleListResponse.java b/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/rest/PersonRoleListResponse.java deleted file mode 100644 index 556c8396f6e..00000000000 --- a/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/rest/PersonRoleListResponse.java +++ /dev/null @@ -1,148 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.projectmanagement.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.projectmanagement.metadataelements.PersonRoleElement; - -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * PersonRoleListResponse is the response structure used on the OMAS REST API calls that return - * a list of person role elements. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class PersonRoleListResponse extends ProjectManagementOMASAPIResponse -{ - private List elements = null; - - - /** - * Default constructor - */ - public PersonRoleListResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public PersonRoleListResponse(PersonRoleListResponse template) - { - super(template); - - if (template != null) - { - this.elements = template.getElements(); - } - } - - - /** - * Return the person role result. - * - * @return unique identifier - */ - public List getElements() - { - if (elements == null) - { - return null; - } - else if (elements.isEmpty()) - { - return null; - } - else - { - return elements; - } - } - - - /** - * Set up the person role result. - * - * @param elements - unique identifier - */ - public void setElements(List elements) - { - this.elements = elements; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "PersonRoleListResponse{" + - "elements=" + elements + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof PersonRoleListResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - PersonRoleListResponse that = (PersonRoleListResponse) objectToCompare; - return Objects.equals(getElements(), that.getElements()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elements); - } -} diff --git a/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/rest/PersonRoleRequestBody.java b/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/rest/PersonRoleRequestBody.java deleted file mode 100644 index f8dd516ba0c..00000000000 --- a/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/rest/PersonRoleRequestBody.java +++ /dev/null @@ -1,124 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.projectmanagement.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.PersonRoleProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * PersonRoleRequestBody provides the request body payload for working on PersonRole entities. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class PersonRoleRequestBody extends ExternalSourceRequestBody -{ - private PersonRoleProperties properties = null; - - - /** - * Default constructor - */ - public PersonRoleRequestBody() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public PersonRoleRequestBody(PersonRoleRequestBody template) - { - super(template); - - if (template != null) - { - properties = template.getProperties(); - } - } - - - /** - * Return the properties for this person role. - * - * @return properties bean - */ - public PersonRoleProperties getProperties() - { - return properties; - } - - - /** - * Set up the properties for this person role. - * - * @param properties properties bean - */ - public void setProperties(PersonRoleProperties properties) - { - this.properties = properties; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "PersonRoleRequestBody{" + - "properties=" + properties + - ", externalSourceGUID='" + getExternalSourceGUID() + '\'' + - ", externalSourceName='" + getExternalSourceName() + '\'' + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - PersonRoleRequestBody that = (PersonRoleRequestBody) objectToCompare; - return Objects.equals(properties, that.properties); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), properties); - } -} diff --git a/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/rest/PersonRoleResponse.java b/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/rest/PersonRoleResponse.java deleted file mode 100644 index 781358f7183..00000000000 --- a/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/rest/PersonRoleResponse.java +++ /dev/null @@ -1,136 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.projectmanagement.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.projectmanagement.metadataelements.PersonRoleElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * PersonRoleResponse is the response structure used on the OMAS REST API calls that return a - * PersonRoleElement object as a response. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class PersonRoleResponse extends ProjectManagementOMASAPIResponse -{ - private PersonRoleElement element = null; - - - /** - * Default constructor - */ - public PersonRoleResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public PersonRoleResponse(PersonRoleResponse template) - { - super(template); - - if (template != null) - { - this.element = template.getElement(); - } - } - - - /** - * Return the element result. - * - * @return details of person role - */ - public PersonRoleElement getElement() - { - return element; - } - - - /** - * Set up the element result. - * - * @param element details of person role - */ - public void setElement(PersonRoleElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "PersonRoleResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof PersonRoleResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - PersonRoleResponse that = (PersonRoleResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/rest/ProjectListResponse.java b/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/rest/ProjectListResponse.java deleted file mode 100644 index 6fd22d81f7a..00000000000 --- a/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/rest/ProjectListResponse.java +++ /dev/null @@ -1,148 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.projectmanagement.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.projectmanagement.metadataelements.ProjectElement; - -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * ProjectListResponse is the response structure used on the OMAS REST API calls that return - * a list of project elements. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ProjectListResponse extends ProjectManagementOMASAPIResponse -{ - private List elements = null; - - - /** - * Default constructor - */ - public ProjectListResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ProjectListResponse(ProjectListResponse template) - { - super(template); - - if (template != null) - { - this.elements = template.getElements(); - } - } - - - /** - * Return the project result. - * - * @return unique identifier - */ - public List getElements() - { - if (elements == null) - { - return null; - } - else if (elements.isEmpty()) - { - return null; - } - else - { - return elements; - } - } - - - /** - * Set up the project result. - * - * @param elements - unique identifier - */ - public void setElements(List elements) - { - this.elements = elements; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ProjectListResponse{" + - "elements=" + elements + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof ProjectListResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ProjectListResponse that = (ProjectListResponse) objectToCompare; - return Objects.equals(getElements(), that.getElements()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elements); - } -} diff --git a/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/rest/ProjectManagementOMASAPIRequestBody.java b/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/rest/ProjectManagementOMASAPIRequestBody.java deleted file mode 100644 index cd0ec4bc81d..00000000000 --- a/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/rest/ProjectManagementOMASAPIRequestBody.java +++ /dev/null @@ -1,58 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.projectmanagement.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ProjectManagementOMASAPIRequestBody provides a common header for Community Profile OMAS request bodies for its REST API. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes( - { - @JsonSubTypes.Type(value = ExternalSourceRequestBody.class, name = "ExternalSourceRequestBody"), - }) -public abstract class ProjectManagementOMASAPIRequestBody -{ - /** - * Default constructor - */ - public ProjectManagementOMASAPIRequestBody() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ProjectManagementOMASAPIRequestBody(ProjectManagementOMASAPIRequestBody template) - { - } - - - /** - * JSON-like toString - * - * @return string containing the class name - */ - @Override - public String toString() - { - return "CommunityProfileOMASAPIRequestBody{}"; - } -} diff --git a/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/rest/ProjectManagementOMASAPIResponse.java b/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/rest/ProjectManagementOMASAPIResponse.java deleted file mode 100644 index c572e104e8e..00000000000 --- a/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/rest/ProjectManagementOMASAPIResponse.java +++ /dev/null @@ -1,65 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.projectmanagement.rest; - -import com.fasterxml.jackson.annotation.*; -import org.odpi.openmetadata.commonservices.ffdc.rest.FFDCResponseBase; - - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ProjectManagementOMASAPIResponse provides a common header for Project Management OMAS managed rest to its REST API. - * It manages information about exceptions. If no exception has been raised exceptionClassName is null. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes( - { - }) -public abstract class ProjectManagementOMASAPIResponse extends FFDCResponseBase -{ - /** - * Default constructor - */ - public ProjectManagementOMASAPIResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ProjectManagementOMASAPIResponse(ProjectManagementOMASAPIResponse template) - { - super(template); - } - - - - /** - * JSON-like toString - * - * @return string containing the property names and values - */ - @Override - public String toString() - { - return "ProjectManagementOMASAPIResponse{" + - "relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } -} diff --git a/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/rest/ProjectResponse.java b/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/rest/ProjectResponse.java deleted file mode 100644 index 048d3d074bd..00000000000 --- a/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/rest/ProjectResponse.java +++ /dev/null @@ -1,136 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.projectmanagement.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.projectmanagement.metadataelements.ProjectElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * ProjectResponse is the response structure used on the OMAS REST API calls that return a - * ProjectElement object as a response. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ProjectResponse extends ProjectManagementOMASAPIResponse -{ - private ProjectElement element = null; - - - /** - * Default constructor - */ - public ProjectResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ProjectResponse(ProjectResponse template) - { - super(template); - - if (template != null) - { - this.element = template.getElement(); - } - } - - - /** - * Return the element result. - * - * @return details of person role - */ - public ProjectElement getElement() - { - return element; - } - - - /** - * Set up the element result. - * - * @param element details of person role - */ - public void setElement(ProjectElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ProjectResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof ProjectResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ProjectResponse that = (ProjectResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/rest/ReferenceableRequestBody.java b/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/rest/ReferenceableRequestBody.java deleted file mode 100644 index f1107c26f24..00000000000 --- a/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/rest/ReferenceableRequestBody.java +++ /dev/null @@ -1,127 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.projectmanagement.rest; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.openmetadata.properties.ReferenceableProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * RelationshipRequestBody describes the request body used when linking elements together. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ReferenceableRequestBody extends ExternalSourceRequestBody -{ - private ReferenceableProperties properties = null; - - - /** - * Default constructor - */ - public ReferenceableRequestBody() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public ReferenceableRequestBody(ReferenceableRequestBody template) - { - super(template); - - if (template != null) - { - properties = template.getProperties(); - } - } - - - /** - * Return the properties for the relationship. - * - * @return properties object - */ - public ReferenceableProperties getProperties() - { - return properties; - } - - - /** - * Set up the properties for the relationship. - * - * @param properties properties object - */ - public void setProperties(ReferenceableProperties properties) - { - this.properties = properties; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ReferenceableRequestBody{" + - "externalSourceGUID='" + getExternalSourceGUID() + '\'' + - ", externalSourceName='" + getExternalSourceName() + '\'' + - ", properties=" + properties + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ReferenceableRequestBody that = (ReferenceableRequestBody) objectToCompare; - return Objects.equals(getProperties(), that.getProperties()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), properties); - } -} diff --git a/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/rest/RelatedElementListResponse.java b/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/rest/RelatedElementListResponse.java deleted file mode 100644 index 2cd87874d83..00000000000 --- a/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/rest/RelatedElementListResponse.java +++ /dev/null @@ -1,146 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.projectmanagement.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.projectmanagement.metadataelements.RelatedElement; - -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * RelatedElementListResponse is a response object for passing back a list of relatedElement objects. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class RelatedElementListResponse extends ProjectManagementOMASAPIResponse -{ - private List elements = null; - - - /** - * Default constructor - */ - public RelatedElementListResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public RelatedElementListResponse(RelatedElementListResponse template) - { - super(template); - - if (template != null) - { - elements = template.getElements(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElements() - { - if (elements == null) - { - return null; - } - else if (elements.isEmpty()) - { - return null; - } - else - { - return elements; - } - } - - - /** - * Set up the list of metadata elements to return. - * - * @param elements result object - */ - public void setElements(List elements) - { - this.elements = elements; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "RelatedElementListResponse{" + - "element=" + elements + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - RelatedElementListResponse that = (RelatedElementListResponse) objectToCompare; - return Objects.equals(elements, that.elements); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elements); - } -} diff --git a/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/rest/RelationshipElementResponse.java b/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/rest/RelationshipElementResponse.java deleted file mode 100644 index 0aa301125ec..00000000000 --- a/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/rest/RelationshipElementResponse.java +++ /dev/null @@ -1,137 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.projectmanagement.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.projectmanagement.metadataelements.RelationshipElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * RelationshipElementResponse is the response structure used on the OMAS REST API calls that return the properties - * for a relationship. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class RelationshipElementResponse extends ProjectManagementOMASAPIResponse -{ - private RelationshipElement element = null; - - - /** - * Default constructor - */ - public RelationshipElementResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public RelationshipElementResponse(RelationshipElementResponse template) - { - super(template); - - if (template != null) - { - this.element = template.getElement(); - } - } - - - /** - * Return the element result. - * - * @return bean - */ - public RelationshipElement getElement() - { - return element; - } - - - /** - * Set up the element result. - * - * @param element bean - */ - public void setElement(RelationshipElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "RelationshipElementResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof RelationshipElementResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - RelationshipElementResponse that = (RelationshipElementResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(element); - } -} diff --git a/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/rest/RelationshipElementsResponse.java b/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/rest/RelationshipElementsResponse.java deleted file mode 100644 index a56ac864229..00000000000 --- a/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/rest/RelationshipElementsResponse.java +++ /dev/null @@ -1,148 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.projectmanagement.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.projectmanagement.metadataelements.RelationshipElement; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * RelationshipElementsResponse is a response object for passing back a list of relationships - * or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class RelationshipElementsResponse extends ProjectManagementOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public RelationshipElementsResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public RelationshipElementsResponse(RelationshipElementsResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elementList); - } - } - - - /** - * Set up the metadata element to return. - * - * @param elementList result object - */ - public void setElementList(List elementList) - { - this.elementList = elementList; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "RelationshipElementsResponse{" + - "elementList=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - RelationshipElementsResponse that = (RelationshipElementsResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/rest/RelationshipRequestBody.java b/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/rest/RelationshipRequestBody.java deleted file mode 100644 index 8d1b3f4f6ef..00000000000 --- a/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/rest/RelationshipRequestBody.java +++ /dev/null @@ -1,127 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.projectmanagement.rest; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * RelationshipRequestBody describes the request body used when linking elements together. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class RelationshipRequestBody extends ExternalSourceRequestBody -{ - private RelationshipProperties properties = null; - - - /** - * Default constructor - */ - public RelationshipRequestBody() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public RelationshipRequestBody(RelationshipRequestBody template) - { - super(template); - - if (template != null) - { - properties = template.getProperties(); - } - } - - - /** - * Return the properties for the relationship. - * - * @return properties object - */ - public RelationshipProperties getProperties() - { - return properties; - } - - - /** - * Set up the properties for the relationship. - * - * @param properties properties object - */ - public void setProperties(RelationshipProperties properties) - { - this.properties = properties; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "RelationshipRequestBody{" + - "externalSourceGUID='" + getExternalSourceGUID() + '\'' + - ", externalSourceName='" + getExternalSourceName() + '\'' + - ", properties=" + properties + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - RelationshipRequestBody that = (RelationshipRequestBody) objectToCompare; - return Objects.equals(getProperties(), that.getProperties()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), properties); - } -} diff --git a/open-metadata-implementation/access-services/project-management/project-management-api/src/test/java/org/odpi/openmetadata/accessservices/projectmanagement/rest/MockAPIResponse.java b/open-metadata-implementation/access-services/project-management/project-management-api/src/test/java/org/odpi/openmetadata/accessservices/projectmanagement/rest/MockAPIResponse.java deleted file mode 100644 index 01113210498..00000000000 --- a/open-metadata-implementation/access-services/project-management/project-management-api/src/test/java/org/odpi/openmetadata/accessservices/projectmanagement/rest/MockAPIResponse.java +++ /dev/null @@ -1,27 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.projectmanagement.rest; - -/** - * MockAPIResponse enables the overridden methods of ProjectManagementOMASAPIResponse to be tested. - */ -public class MockAPIResponse extends ProjectManagementOMASAPIResponse -{ - /** - * Default constructor - */ - public MockAPIResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to clone - */ - public MockAPIResponse(MockAPIResponse template) - { - super(template); - } -} diff --git a/open-metadata-implementation/access-services/project-management/project-management-api/src/test/java/org/odpi/openmetadata/accessservices/projectmanagement/rest/OMASAPIResponseTest.java b/open-metadata-implementation/access-services/project-management/project-management-api/src/test/java/org/odpi/openmetadata/accessservices/projectmanagement/rest/OMASAPIResponseTest.java deleted file mode 100644 index 168a624bba6..00000000000 --- a/open-metadata-implementation/access-services/project-management/project-management-api/src/test/java/org/odpi/openmetadata/accessservices/projectmanagement/rest/OMASAPIResponseTest.java +++ /dev/null @@ -1,23 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.projectmanagement.rest; - -import org.testng.annotations.Test; - -import static org.testng.Assert.assertTrue; - -/** - * Test the overridden methods of ProjectManagementOMASAPIResponse - */ -public class OMASAPIResponseTest -{ - @Test public void TestToString() - { - assertTrue(new MockAPIResponse().toString().contains("ProjectManagementOMASAPIResponse")); - MockAPIResponse testObject = new MockAPIResponse(); - - assertTrue(testObject.toString().contains("ProjectManagementOMASAPIResponse")); - assertTrue(new MockAPIResponse(testObject).toString().contains("ProjectManagementOMASAPIResponse")); - - } -} diff --git a/open-metadata-implementation/access-services/project-management/project-management-client/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/client/ProjectManagement.java b/open-metadata-implementation/access-services/project-management/project-management-client/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/client/ProjectManagement.java index 03493d5a867..e50b3d76fa5 100644 --- a/open-metadata-implementation/access-services/project-management/project-management-client/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/client/ProjectManagement.java +++ b/open-metadata-implementation/access-services/project-management/project-management-client/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/client/ProjectManagement.java @@ -3,28 +3,22 @@ package org.odpi.openmetadata.accessservices.projectmanagement.client; import org.odpi.openmetadata.accessservices.projectmanagement.api.ProjectsInterface; -import org.odpi.openmetadata.accessservices.projectmanagement.api.RelatedElementsInterface; -import org.odpi.openmetadata.accessservices.projectmanagement.client.converters.ProjectConverter; -import org.odpi.openmetadata.accessservices.projectmanagement.client.converters.TeamMemberConverter; +import org.odpi.openmetadata.frameworks.governanceaction.converters.ProjectConverter; +import org.odpi.openmetadata.frameworks.governanceaction.converters.TeamMemberConverter; import org.odpi.openmetadata.accessservices.projectmanagement.client.rest.ProjectManagementRESTClient; -import org.odpi.openmetadata.accessservices.projectmanagement.metadataelements.ActorProfileElement; -import org.odpi.openmetadata.accessservices.projectmanagement.metadataelements.ProjectElement; -import org.odpi.openmetadata.accessservices.projectmanagement.metadataelements.PersonRoleElement; -import org.odpi.openmetadata.accessservices.projectmanagement.metadataelements.ProjectTeamMember; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ActorProfileElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.PersonRoleElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ProjectElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ProjectTeamMember; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.odpi.openmetadata.frameworks.openmetadata.properties.projects.ProjectProperties; import org.odpi.openmetadata.frameworks.openmetadata.properties.projects.ProjectTeamProperties; -import org.odpi.openmetadata.accessservices.projectmanagement.rest.ActorProfileListResponse; -import org.odpi.openmetadata.accessservices.projectmanagement.rest.ProjectResponse; -import org.odpi.openmetadata.accessservices.projectmanagement.rest.ProjectListResponse; -import org.odpi.openmetadata.accessservices.projectmanagement.rest.PersonRoleListResponse; import org.odpi.openmetadata.adminservices.configuration.registration.AccessServiceDescription; -import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStatus; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ElementStatus; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.frameworks.governanceaction.properties.OpenMetadataElement; @@ -900,13 +894,13 @@ public List findProjects(String userId, requestBody.setSearchString(searchString); requestBody.setSearchStringParameterName(searchStringParameterName); - ProjectListResponse restResult = restClient.callProjectListPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - startFrom, - validatedPageSize); + ProjectsResponse restResult = restClient.callProjectsPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + startFrom, + validatedPageSize); return restResult.getElements(); } @@ -949,13 +943,13 @@ public List getProjectsByName(String userId, requestBody.setName(name); requestBody.setNamePropertyName(nameParameterName); - ProjectListResponse restResult = restClient.callProjectListPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - startFrom, - validatedPageSize); + ProjectsResponse restResult = restClient.callProjectsPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + startFrom, + validatedPageSize); return restResult.getElements(); } @@ -988,12 +982,12 @@ public List getProjects(String userId, final String urlTemplate = serverPlatformURLRoot + projectURLTemplatePrefix + "?startFrom={2}&pageSize={3}"; - ProjectListResponse restResult = restClient.callProjectListGetRESTCall(methodName, - urlTemplate, - serverName, - userId, - startFrom, - validatedPageSize); + ProjectsResponse restResult = restClient.callProjectsGetRESTCall(methodName, + urlTemplate, + serverName, + userId, + startFrom, + validatedPageSize); return restResult.getElements(); } @@ -1029,13 +1023,13 @@ public List getProjectManagementRoles(String userId, final String urlTemplate = serverPlatformURLRoot + projectURLTemplatePrefix + "/project-managers/by-project/{2}?startFrom={3}&pageSize={4}"; - PersonRoleListResponse restResult = restClient.callPersonRoleListGetRESTCall(methodName, - urlTemplate, - serverName, - userId, - projectGUID, - Integer.toString(startFrom), - Integer.toString(pageSize)); + PersonRolesResponse restResult = restClient.callPersonRolesGetRESTCall(methodName, + urlTemplate, + serverName, + userId, + projectGUID, + Integer.toString(startFrom), + Integer.toString(pageSize)); return restResult.getElements(); } @@ -1071,13 +1065,13 @@ public List getProjectActors(String userId, final String urlTemplate = serverPlatformURLRoot + projectURLTemplatePrefix + "/project-actors/by-project/{2}?startFrom={3}&pageSize={4}"; - ActorProfileListResponse restResult = restClient.callActorProfileListGetRESTCall(methodName, - urlTemplate, - serverName, - userId, - projectGUID, - Integer.toString(startFrom), - Integer.toString(pageSize)); + ActorProfilesResponse restResult = restClient.callActorProfilesGetRESTCall(methodName, + urlTemplate, + serverName, + userId, + projectGUID, + Integer.toString(startFrom), + Integer.toString(pageSize)); return restResult.getElements(); } diff --git a/open-metadata-implementation/access-services/project-management/project-management-client/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/client/ProjectManagementBaseClient.java b/open-metadata-implementation/access-services/project-management/project-management-client/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/client/ProjectManagementBaseClient.java index 0b974d8ed91..e4ad622e5d1 100644 --- a/open-metadata-implementation/access-services/project-management/project-management-client/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/client/ProjectManagementBaseClient.java +++ b/open-metadata-implementation/access-services/project-management/project-management-client/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/client/ProjectManagementBaseClient.java @@ -4,7 +4,8 @@ import org.odpi.openmetadata.accessservices.projectmanagement.api.RelatedElementsInterface; import org.odpi.openmetadata.accessservices.projectmanagement.client.rest.ProjectManagementRESTClient; -import org.odpi.openmetadata.accessservices.projectmanagement.metadataelements.RelatedElement; +import org.odpi.openmetadata.accessservices.projectmanagement.rest.TemplateRequestBody; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.RelatedElement; import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.AssignmentScopeProperties; import org.odpi.openmetadata.frameworks.openmetadata.properties.ClassificationProperties; import org.odpi.openmetadata.frameworks.openmetadata.properties.ReferenceableProperties; @@ -12,14 +13,8 @@ import org.odpi.openmetadata.frameworks.openmetadata.properties.resources.ResourceListProperties; import org.odpi.openmetadata.frameworks.openmetadata.properties.projects.StakeholderProperties; import org.odpi.openmetadata.accessservices.projectmanagement.properties.TemplateProperties; -import org.odpi.openmetadata.accessservices.projectmanagement.rest.ClassificationRequestBody; -import org.odpi.openmetadata.accessservices.projectmanagement.rest.RelatedElementListResponse; -import org.odpi.openmetadata.accessservices.projectmanagement.rest.ExternalSourceRequestBody; -import org.odpi.openmetadata.accessservices.projectmanagement.rest.ReferenceableRequestBody; -import org.odpi.openmetadata.accessservices.projectmanagement.rest.RelationshipRequestBody; -import org.odpi.openmetadata.accessservices.projectmanagement.rest.TemplateRequestBody; import org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; @@ -579,13 +574,13 @@ List getRelatedElements(String userId, invalidParameterHandler.validateUserId(userId, methodName); invalidParameterHandler.validateGUID(startingElementGUID, startingElementGUIDParameterName, methodName); - RelatedElementListResponse restResult = restClient.callRelatedElementListGetRESTCall(methodName, - urlTemplate, - serverName, - userId, - startingElementGUID, - Integer.toString(startFrom), - Integer.toString(pageSize)); + RelatedElementsResponse restResult = restClient.callRelatedElementsGetRESTCall(methodName, + urlTemplate, + serverName, + userId, + startingElementGUID, + Integer.toString(startFrom), + Integer.toString(pageSize)); return restResult.getElements(); } diff --git a/open-metadata-implementation/access-services/project-management/project-management-client/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/client/converters/ProjectConverter.java b/open-metadata-implementation/access-services/project-management/project-management-client/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/client/converters/ProjectConverter.java deleted file mode 100644 index 7cab9b2884f..00000000000 --- a/open-metadata-implementation/access-services/project-management/project-management-client/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/client/converters/ProjectConverter.java +++ /dev/null @@ -1,218 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.projectmanagement.client.converters; - -import org.odpi.openmetadata.accessservices.projectmanagement.metadataelements.ProjectElement; -import org.odpi.openmetadata.frameworks.openmetadata.properties.projects.ProjectProperties; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.governanceaction.properties.OpenMetadataElement; -import org.odpi.openmetadata.frameworks.governanceaction.properties.RelatedMetadataElement; -import org.odpi.openmetadata.frameworks.governanceaction.properties.OpenMetadataRelationship; -import org.odpi.openmetadata.frameworks.governanceaction.search.ElementProperties; -import org.odpi.openmetadata.frameworks.governanceaction.search.PropertyHelper; - -import java.lang.reflect.InvocationTargetException; - - -/** - * ProjectConverter generates a ProjectElement from a Project entity - */ -public class ProjectConverter extends ProjectManagementConverterBase -{ - /** - * Constructor - * - * @param propertyHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public ProjectConverter(PropertyHelper propertyHelper, - String serviceName, - String serverName) - { - super(propertyHelper, serviceName, serverName); - } - - - /** - * Using the supplied openMetadataElement, return a new instance of the bean. This is used for most beans that have - * a one to one correspondence with the repository instances. - * - * @param beanClass name of the class to create - * @param openMetadataElement openMetadataElement containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - OpenMetadataElement openMetadataElement, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof ProjectElement bean) - { - ProjectProperties projectProperties = new ProjectProperties(); - - bean.setElementHeader(super.getMetadataElementHeader(beanClass, openMetadataElement, methodName)); - - ElementProperties elementProperties; - - /* - * The initial set of values come from the openMetadataElement. - */ - if (openMetadataElement != null) - { - elementProperties = new ElementProperties(openMetadataElement.getElementProperties()); - - projectProperties.setQualifiedName(this.removeQualifiedName(elementProperties)); - projectProperties.setAdditionalProperties(this.removeAdditionalProperties(elementProperties)); - projectProperties.setIdentifier(this.removeIdentifier(elementProperties)); - projectProperties.setName(this.removeName(elementProperties)); - projectProperties.setDescription(this.removeDescription(elementProperties)); - projectProperties.setProjectStatus(this.removeProjectStatus(elementProperties)); - projectProperties.setStartDate(this.removeStartDate(elementProperties)); - projectProperties.setPlannedEndDate(this.removePlannedEndDate(elementProperties)); - projectProperties.setEffectiveFrom(openMetadataElement.getEffectiveFromTime()); - projectProperties.setEffectiveTo(openMetadataElement.getEffectiveToTime()); - - /* - * Any remaining properties are returned in the extended properties. They are - * assumed to be defined in a subtype. - */ - projectProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); - projectProperties.setExtendedProperties(this.getRemainingExtendedProperties(elementProperties)); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), OpenMetadataElement.class.getName(), methodName); - } - - bean.setProperties(projectProperties); - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - - /** - * Using the supplied openMetadataElement, return a new instance of the bean. This is used for most beans that have - * a one to one correspondence with the repository instances. - * - * @param beanClass name of the class to create - * @param relatedMetadataElement the properties of an open metadata element plus details of the relationship used to navigate to it - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - RelatedMetadataElement relatedMetadataElement, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof ProjectElement bean) - { - ProjectProperties projectProperties = new ProjectProperties(); - OpenMetadataElement openMetadataElement = relatedMetadataElement.getElement(); - - bean.setElementHeader(super.getMetadataElementHeader(beanClass, openMetadataElement, methodName)); - - ElementProperties elementProperties; - - /* - * The initial set of values come from the openMetadataElement. - */ - if (openMetadataElement != null) - { - elementProperties = new ElementProperties(openMetadataElement.getElementProperties()); - - projectProperties.setQualifiedName(this.removeQualifiedName(elementProperties)); - projectProperties.setAdditionalProperties(this.removeAdditionalProperties(elementProperties)); - projectProperties.setIdentifier(this.removeIdentifier(elementProperties)); - projectProperties.setName(this.removeName(elementProperties)); - projectProperties.setDescription(this.removeDescription(elementProperties)); - projectProperties.setProjectStatus(this.removeProjectStatus(elementProperties)); - projectProperties.setProjectHealth(this.removeProjectHealth(elementProperties)); - projectProperties.setProjectPhase(this.removeProjectPhase(elementProperties)); - projectProperties.setPriority(this.removeIntPriority(elementProperties)); - projectProperties.setStartDate(this.removeStartDate(elementProperties)); - projectProperties.setPlannedEndDate(this.removePlannedEndDate(elementProperties)); - projectProperties.setEffectiveFrom(openMetadataElement.getEffectiveFromTime()); - projectProperties.setEffectiveTo(openMetadataElement.getEffectiveToTime()); - - /* - * Any remaining properties are returned in the extended properties. They are - * assumed to be defined in a subtype. - */ - projectProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); - projectProperties.setExtendedProperties(this.getRemainingExtendedProperties(elementProperties)); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), OpenMetadataElement.class.getName(), methodName); - } - - bean.setProperties(projectProperties); - - bean.setRelatedElement(super.getRelatedElement(beanClass, relatedMetadataElement, methodName)); - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an element and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param element element containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @SuppressWarnings(value = "unused") - public B getNewBean(Class beanClass, - OpenMetadataElement element, - OpenMetadataRelationship relationship, - String methodName) throws PropertyServerException - { - B returnBean = this.getNewBean(beanClass, element, methodName); - - if (returnBean instanceof ProjectElement bean) - { - bean.setRelatedElement(super.getRelatedElement(beanClass, element, relationship, methodName)); - } - - return returnBean; - } -} diff --git a/open-metadata-implementation/access-services/project-management/project-management-client/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/client/converters/ProjectManagementConverterBase.java b/open-metadata-implementation/access-services/project-management/project-management-client/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/client/converters/ProjectManagementConverterBase.java deleted file mode 100644 index 9e5d8bdeeec..00000000000 --- a/open-metadata-implementation/access-services/project-management/project-management-client/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/client/converters/ProjectManagementConverterBase.java +++ /dev/null @@ -1,123 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.projectmanagement.client.converters; - -import org.odpi.openmetadata.accessservices.projectmanagement.metadataelements.RelatedElement; -import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; -import org.odpi.openmetadata.frameworks.governanceaction.converters.OpenMetadataConverterBase; -import org.odpi.openmetadata.frameworks.governanceaction.properties.OpenMetadataElement; -import org.odpi.openmetadata.frameworks.governanceaction.properties.RelatedMetadataElement; -import org.odpi.openmetadata.frameworks.governanceaction.properties.OpenMetadataRelationship; -import org.odpi.openmetadata.frameworks.governanceaction.search.ElementProperties; -import org.odpi.openmetadata.frameworks.governanceaction.search.PropertyHelper; - -/** - * Provide base converter functions for the Digital Service OMAS. - * - * @param bean class - */ -public abstract class ProjectManagementConverterBase extends OpenMetadataConverterBase -{ - /** - * Constructor - * - * @param propertyHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public ProjectManagementConverterBase(PropertyHelper propertyHelper, - String serviceName, - String serverName) - { - super(propertyHelper, serviceName, serverName); - } - - - /** - * Using the supplied instances, return a new instance of a relatedElement bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param element entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - public RelatedElement getRelatedElement(Class beanClass, - OpenMetadataElement element, - OpenMetadataRelationship relationship, - String methodName) throws PropertyServerException - { - RelatedElement relatedElement = new RelatedElement(); - - relatedElement.setRelationshipHeader(this.getMetadataElementHeader(beanClass, relationship, relationship.getRelationshipGUID(), null, methodName)); - - if (relationship != null) - { - ElementProperties instanceProperties = new ElementProperties(relationship.getRelationshipProperties()); - - RelationshipProperties relationshipProperties = new RelationshipProperties(); - - relationshipProperties.setEffectiveFrom(relationship.getEffectiveFromTime()); - relationshipProperties.setEffectiveTo(relationship.getEffectiveToTime()); - relationshipProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - - relatedElement.setRelationshipProperties(relationshipProperties); - } - - if (element != null) - { - ElementStub elementStub = this.getElementStub(beanClass, element, methodName); - - relatedElement.setRelatedElement(elementStub); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), OpenMetadataElement.class.getName(), methodName); - } - - return relatedElement; - } - - - /** - * Using the supplied instances, return a new instance of a relatedElement bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param relatedMetadataElement results containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - public RelatedElement getRelatedElement(Class beanClass, - RelatedMetadataElement relatedMetadataElement, - String methodName) throws PropertyServerException - { - RelatedElement relatedElement = new RelatedElement(); - - relatedElement.setRelationshipHeader(this.getMetadataElementHeader(beanClass, relatedMetadataElement, relatedMetadataElement.getRelationshipGUID(), null, methodName)); - - if (relatedMetadataElement != null) - { - ElementProperties instanceProperties = new ElementProperties(relatedMetadataElement.getRelationshipProperties()); - - RelationshipProperties relationshipProperties = new RelationshipProperties(); - - relationshipProperties.setEffectiveFrom(relatedMetadataElement.getEffectiveFromTime()); - relationshipProperties.setEffectiveTo(relatedMetadataElement.getEffectiveToTime()); - relationshipProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - - relatedElement.setRelationshipProperties(relationshipProperties); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), OpenMetadataRelationship.class.getName(), methodName); - } - - return relatedElement; - } -} diff --git a/open-metadata-implementation/access-services/project-management/project-management-client/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/client/converters/package-info.java b/open-metadata-implementation/access-services/project-management/project-management-client/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/client/converters/package-info.java deleted file mode 100644 index 7578f9e226f..00000000000 --- a/open-metadata-implementation/access-services/project-management/project-management-client/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/client/converters/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -/** - * The converters take Open Metadata Store elements and convert them to Digital Service OMAS beans. - */ -package org.odpi.openmetadata.accessservices.projectmanagement.client.converters; \ No newline at end of file diff --git a/open-metadata-implementation/access-services/project-management/project-management-client/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/client/rest/ProjectManagementRESTClient.java b/open-metadata-implementation/access-services/project-management/project-management-client/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/client/rest/ProjectManagementRESTClient.java index 4025c9b2e7a..b8ff94cbfb7 100644 --- a/open-metadata-implementation/access-services/project-management/project-management-client/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/client/rest/ProjectManagementRESTClient.java +++ b/open-metadata-implementation/access-services/project-management/project-management-client/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/client/rest/ProjectManagementRESTClient.java @@ -2,18 +2,9 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.projectmanagement.client.rest; -import org.odpi.openmetadata.accessservices.projectmanagement.rest.ActorProfileListResponse; -import org.odpi.openmetadata.accessservices.projectmanagement.rest.ElementStubsResponse; -import org.odpi.openmetadata.accessservices.projectmanagement.rest.PersonRoleListResponse; -import org.odpi.openmetadata.accessservices.projectmanagement.rest.PersonRoleResponse; -import org.odpi.openmetadata.accessservices.projectmanagement.rest.ProjectListResponse; -import org.odpi.openmetadata.accessservices.projectmanagement.rest.ProjectResponse; -import org.odpi.openmetadata.accessservices.projectmanagement.rest.RelatedElementListResponse; import org.odpi.openmetadata.commonservices.ffdc.rest.FFDCRESTClient; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; /** * ProjectManagementRESTClient is responsible for issuing calls to the Project Profile OMAS REST APIs. @@ -24,15 +15,14 @@ public class ProjectManagementRESTClient extends FFDCRESTClient /** * Constructor for no authentication with audit log. * - * @param serverName name of the OMAG Server to call + * @param serverName name of the OMAG Server to call * @param serverPlatformURLRoot URL root of the server platform where the OMAG Server is running. - * @param auditLog destination for log messages. - * + * @param auditLog destination for log messages. * @throws InvalidParameterException there is a problem creating the client-side components to issue any - * REST API calls. + * REST API calls. */ - public ProjectManagementRESTClient(String serverName, - String serverPlatformURLRoot, + public ProjectManagementRESTClient(String serverName, + String serverPlatformURLRoot, AuditLog auditLog) throws InvalidParameterException { super(serverName, serverPlatformURLRoot, auditLog); @@ -42,10 +32,10 @@ public ProjectManagementRESTClient(String serverName, /** * Constructor for no authentication. * - * @param serverName name of the OMAG Server to call + * @param serverName name of the OMAG Server to call * @param serverPlatformURLRoot URL root of the server platform where the OMAG Server is running. * @throws InvalidParameterException there is a problem creating the client-side components to issue any - * REST API calls. + * REST API calls. */ public ProjectManagementRESTClient(String serverName, String serverPlatformURLRoot) throws InvalidParameterException @@ -57,18 +47,18 @@ public ProjectManagementRESTClient(String serverName, /** * Constructor for simple userId and password authentication with audit log. * - * @param serverName name of the OMAG Server to call + * @param serverName name of the OMAG Server to call * @param serverPlatformURLRoot URL root of the server platform where the OMAG Server is running. - * @param userId user id for the HTTP request - * @param password password for the HTTP request - * @param auditLog destination for log messages. + * @param userId user id for the HTTP request + * @param password password for the HTTP request + * @param auditLog destination for log messages. * @throws InvalidParameterException there is a problem creating the client-side components to issue any - * REST API calls. + * REST API calls. */ - public ProjectManagementRESTClient(String serverName, - String serverPlatformURLRoot, - String userId, - String password, + public ProjectManagementRESTClient(String serverName, + String serverPlatformURLRoot, + String userId, + String password, AuditLog auditLog) throws InvalidParameterException { super(serverName, serverPlatformURLRoot, userId, password, auditLog); @@ -78,12 +68,12 @@ public ProjectManagementRESTClient(String serverName, /** * Constructor for simple userId and password authentication. * - * @param serverName name of the OMAG Server to call + * @param serverName name of the OMAG Server to call * @param serverPlatformURLRoot URL root of the server platform where the OMAG Server is running. - * @param userId user id for the HTTP request - * @param password password for the HTTP request + * @param userId user id for the HTTP request + * @param password password for the HTTP request * @throws InvalidParameterException there is a problem creating the client-side components to issue any - * REST API calls. + * REST API calls. */ public ProjectManagementRESTClient(String serverName, String serverPlatformURLRoot, @@ -94,236 +84,5 @@ public ProjectManagementRESTClient(String serverName, } - /** - * Issue a GET REST call that returns a ProjectElement in a response object. - * - * @param methodName name of the method being called. - * @param urlTemplate REST API call URL template with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException something went wrong with the REST call stack. - */ - public ProjectResponse callProjectGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ProjectResponse restResult = this.callGetRESTCall(methodName, ProjectResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a list of ProjectElements in a response object. - * - * @param methodName name of the method being called - * @param urlTemplate REST API call URL template with place-holders for the parameters - * @param params a list of parameters that are slotted into the url template - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException something went wrong with the REST call stack. - */ - public ProjectListResponse callProjectListGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ProjectListResponse restResult = this.callGetRESTCall(methodName, ProjectListResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a list of ProjectElements in a response object. - * - * @param methodName name of the method being called - * @param urlTemplate REST API call URL template with place-holders for the parameters - * @param requestBody request body for the request - * @param params a list of parameters that are slotted into the url template - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException something went wrong with the REST call stack. - */ - public ProjectListResponse callProjectListPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ProjectListResponse restResult = this.callPostRESTCall(methodName, ProjectListResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a PersonRoleElement in a response object. - * - * @param methodName name of the method being called. - * @param urlTemplate REST API call URL template with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException something went wrong with the REST call stack. - */ - public PersonRoleResponse callPersonRoleGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - PersonRoleResponse restResult = this.callGetRESTCall(methodName, PersonRoleResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a list of PersonRoleElements in a response object. - * - * @param methodName name of the method being called - * @param urlTemplate REST API call URL template with place-holders for the parameters - * @param params a list of parameters that are slotted into the url template - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException something went wrong with the REST call stack. - */ - public PersonRoleListResponse callPersonRoleListGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - PersonRoleListResponse restResult = this.callGetRESTCall(methodName, PersonRoleListResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a POST REST call that returns a list of PersonRoleElements in a response object. - * - * @param methodName name of the method being called - * @param urlTemplate REST API call URL template with place-holders for the parameters - * @param requestBody request body for the request - * @param params a list of parameters that are slotted into the url template - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException something went wrong with the REST call stack. - */ - public PersonRoleListResponse callPersonRoleListPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - PersonRoleListResponse restResult = this.callPostRESTCall(methodName, PersonRoleListResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a list of ActorProfileElements in a response object. - * - * @param methodName name of the method being called - * @param urlTemplate REST API call URL template with place-holders for the parameters - * @param params a list of parameters that are slotted into the url template - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException something went wrong with the REST call stack. - */ - public ActorProfileListResponse callActorProfileListGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ActorProfileListResponse restResult = this.callGetRESTCall(methodName, ActorProfileListResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a ElementStubsResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate REST API call URL template with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public ElementStubsResponse callElementStubsGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ElementStubsResponse restResult = this.callGetRESTCall(methodName, ElementStubsResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - - /** - * Issue a GET REST call that returns a RelatedElementListResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate REST API call URL template with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public RelatedElementListResponse callRelatedElementListGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - RelatedElementListResponse restResult = this.callGetRESTCall(methodName, RelatedElementListResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } } + diff --git a/open-metadata-implementation/access-services/project-management/project-management-server/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/converters/ActorProfileConverter.java b/open-metadata-implementation/access-services/project-management/project-management-server/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/converters/ActorProfileConverter.java deleted file mode 100644 index 74c9fac66af..00000000000 --- a/open-metadata-implementation/access-services/project-management/project-management-server/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/converters/ActorProfileConverter.java +++ /dev/null @@ -1,110 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.projectmanagement.converters; - - -import org.odpi.openmetadata.accessservices.projectmanagement.metadataelements.ActorProfileElement; -import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.ActorProfileProperties; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; -import java.util.List; - -/** - * ActorProfileConverter generates a ActorProfileElement bean from a ActorProfile entity. - */ -public class ActorProfileConverter extends ProjectManagementOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public ActorProfileConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - /** - * Using the supplied instances, return a new instance of the bean. It is used for beans such as - * a connection bean which made up of 3 entities (Connection, ConnectorType and Endpoint) plus the - * relationships between them. The relationships may be omitted if they do not have any properties. - * - * @param beanClass name of the class to create - * @param primaryEntity entity that is the root of the collection of entities that make up the content of the bean - * @param supplementaryEntities entities connected to the primary entity by the relationships - * @param relationships relationships linking the entities - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewComplexBean(Class beanClass, - EntityDetail primaryEntity, - List supplementaryEntities, - List relationships, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof ActorProfileElement) - { - ActorProfileElement bean = (ActorProfileElement) returnBean; - ActorProfileProperties profileProperties = new ActorProfileProperties(); - - if (primaryEntity != null) - { - bean.setElementHeader(this.getMetadataElementHeader(beanClass, primaryEntity, methodName)); - - /* - * The initial set of values come from the entity. - */ - InstanceProperties instanceProperties = new InstanceProperties(primaryEntity.getProperties()); - - profileProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); - profileProperties.setKnownName(this.removeName(instanceProperties)); - profileProperties.setDescription(this.removeDescription(instanceProperties)); - profileProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); - profileProperties.setEffectiveFrom(instanceProperties.getEffectiveFromTime()); - profileProperties.setEffectiveTo(instanceProperties.getEffectiveToTime()); - - /* - * Any remaining properties are returned in the extended properties. They are - * assumed to be defined in a subtype. - */ - profileProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); - profileProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - - bean.setProfileProperties(profileProperties); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } -} diff --git a/open-metadata-implementation/access-services/project-management/project-management-server/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/converters/PersonRoleConverter.java b/open-metadata-implementation/access-services/project-management/project-management-server/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/converters/PersonRoleConverter.java deleted file mode 100644 index d6ba6ebce7a..00000000000 --- a/open-metadata-implementation/access-services/project-management/project-management-server/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/converters/PersonRoleConverter.java +++ /dev/null @@ -1,142 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.projectmanagement.converters; - - -import org.odpi.openmetadata.accessservices.projectmanagement.metadataelements.PersonRoleElement; -import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.PersonRoleProperties; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; - -/** - * PersonRoleConverter generates a PersonRoleProperties bean from an PersonRoleProperties entity and the relationships connected to it. - */ -public class PersonRoleConverter extends ProjectManagementOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public PersonRoleConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - /** - * Using the supplied entity, return a new instance of the bean. This is used for most beans that have - * a one to one correspondence with the repository instances. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param methodName calling method - * @return bean populated with properties from the entity supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof PersonRoleElement) - { - PersonRoleElement bean = (PersonRoleElement) returnBean; - PersonRoleProperties roleProperties = new PersonRoleProperties(); - - if (entity != null) - { - bean.setElementHeader(this.getMetadataElementHeader(beanClass, entity, methodName)); - - /* - * The initial set of values come from the entity. - */ - InstanceProperties instanceProperties = new InstanceProperties(entity.getProperties()); - - roleProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); - roleProperties.setRoleId(this.removeIdentifier(instanceProperties)); - roleProperties.setTitle(this.removeTitle(instanceProperties)); - roleProperties.setDescription(this.removeDescription(instanceProperties)); - roleProperties.setScope(this.removeScope(instanceProperties)); - roleProperties.setDomainIdentifier(this.removeDomainIdentifier(instanceProperties)); - roleProperties.setHeadCountLimitSet(instanceProperties.getPropertyValue(OpenMetadataType.HEAD_COUNT_PROPERTY_NAME) != null); - roleProperties.setHeadCount(this.removeHeadCount(instanceProperties)); - - roleProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); - roleProperties.setEffectiveFrom(instanceProperties.getEffectiveFromTime()); - roleProperties.setEffectiveTo(instanceProperties.getEffectiveToTime()); - - - /* - * Any remaining properties are returned in the extended properties. They are - * assumed to be defined in a subtype. - */ - roleProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); - roleProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - - bean.setProperties(roleProperties); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - Relationship relationship, - String methodName) throws PropertyServerException - { - B returnBean = this.getNewBean(beanClass, entity, methodName); - - if (returnBean instanceof PersonRoleElement) - { - PersonRoleElement bean = (PersonRoleElement) returnBean; - - bean.setRelatedElement(super.getRelatedElement(beanClass, entity, relationship, methodName)); - } - - return returnBean; - } -} diff --git a/open-metadata-implementation/access-services/project-management/project-management-server/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/converters/ProjectConverter.java b/open-metadata-implementation/access-services/project-management/project-management-server/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/converters/ProjectConverter.java deleted file mode 100644 index c0ff6656fee..00000000000 --- a/open-metadata-implementation/access-services/project-management/project-management-server/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/converters/ProjectConverter.java +++ /dev/null @@ -1,144 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.projectmanagement.converters; - -import org.odpi.openmetadata.frameworks.openmetadata.properties.projects.ProjectProperties; -import org.odpi.openmetadata.accessservices.projectmanagement.metadataelements.ProjectElement; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; - - -/** - * ProjectConverter generates an ProjectCollectionMember bean from an Project entity - * and a ResourceList relationship to it. - */ -public class ProjectConverter extends ProjectManagementOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public ProjectConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - String methodName) throws PropertyServerException - { - return this.getNewBean(beanClass, entity, null, methodName); - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - Relationship relationship, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof ProjectElement bean) - { - ProjectProperties projectProperties = new ProjectProperties(); - - InstanceProperties instanceProperties; - - /* - * The initial set of values come from the entity. - */ - if (entity != null) - { - bean.setElementHeader(super.getMetadataElementHeader(beanClass, entity, methodName)); - - /* - * The initial set of values come from the entity. - */ - instanceProperties = new InstanceProperties(entity.getProperties()); - - projectProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); - projectProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); - - projectProperties.setIdentifier(this.removeIdentifier(instanceProperties)); - projectProperties.setName(this.removeName(instanceProperties)); - projectProperties.setDescription(this.removeDescription(instanceProperties)); - projectProperties.setStartDate(this.removeStartDate(instanceProperties)); - projectProperties.setPlannedEndDate(this.removePlannedEndDate(instanceProperties)); - projectProperties.setProjectStatus(this.removeProjectStatus(instanceProperties)); - projectProperties.setProjectHealth(this.removeProjectHealth(instanceProperties)); - projectProperties.setProjectPhase(this.removeProjectPhase(instanceProperties)); - projectProperties.setPriority(this.removeIntPriority(instanceProperties)); - projectProperties.setEffectiveFrom(instanceProperties.getEffectiveFromTime()); - projectProperties.setEffectiveTo(instanceProperties.getEffectiveToTime()); - - /* - * Any remaining properties are returned in the extended properties. They are - * assumed to be defined in a subtype. - */ - projectProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); - projectProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - - if (relationship != null) - { - bean.setRelatedElement(super.getRelatedElement(beanClass, entity, relationship, methodName)); - } - - bean.setProperties(projectProperties); - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } -} diff --git a/open-metadata-implementation/access-services/project-management/project-management-server/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/converters/ProjectManagementOMASConverter.java b/open-metadata-implementation/access-services/project-management/project-management-server/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/converters/ProjectManagementOMASConverter.java deleted file mode 100644 index f269cff6ba9..00000000000 --- a/open-metadata-implementation/access-services/project-management/project-management-server/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/converters/ProjectManagementOMASConverter.java +++ /dev/null @@ -1,168 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.projectmanagement.converters; - -import org.odpi.openmetadata.accessservices.projectmanagement.metadataelements.RelatedElement; -import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; -import org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericConverter; -import org.odpi.openmetadata.frameworks.openmetadata.enums.ContactMethodType; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - - - -/** - * ProjectManagementOMASConverter provides the generic methods for the Community Profile beans converters. Generic classes - * have limited knowledge of the classes these are working on and this means creating a new instance of a - * class from within a generic is a little involved. This class provides the generic method for creating - * and initializing a Community Profile bean. - */ -public class ProjectManagementOMASConverter extends OpenMetadataAPIGenericConverter -{ - long karmaPointPlateau = 0; - - - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName name of this server - */ - public ProjectManagementOMASConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super (repositoryHelper, serviceName, serverName); - } - - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - * @param karmaPointPlateau how many karma points to a plateau - */ - public ProjectManagementOMASConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName, - int karmaPointPlateau) - { - this(repositoryHelper, serviceName, serverName); - - this.karmaPointPlateau = karmaPointPlateau; - } - - - /*=============================== - * Methods to fill out headers and enums - */ - - - /** - * Using the supplied instances, return a new instance of a relatedElement bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - public RelatedElement getRelatedElement(Class beanClass, - EntityDetail entity, - Relationship relationship, - String methodName) throws PropertyServerException - { - RelatedElement relatedElement = new RelatedElement(); - - relatedElement.setRelationshipHeader(this.getMetadataElementHeader(beanClass, relationship, null, methodName)); - - if (relationship != null) - { - InstanceProperties instanceProperties = new InstanceProperties(relationship.getProperties()); - - RelationshipProperties relationshipProperties = new RelationshipProperties(); - - relationshipProperties.setEffectiveFrom(instanceProperties.getEffectiveFromTime()); - relationshipProperties.setEffectiveTo(instanceProperties.getEffectiveToTime()); - relationshipProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - - relatedElement.setRelationshipProperties(relationshipProperties); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.RELATIONSHIP_DEF, methodName); - } - - - if (entity != null) - { - ElementStub elementStub = this.getElementStub(beanClass, entity, methodName); - - relatedElement.setRelatedElement(elementStub); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - - return relatedElement; - } - - - /** - * Retrieve the ContactMethodType enum property from the instance properties of an entity - * - * @param properties entity properties - * @return ContactMethodType enum value - */ - ContactMethodType getContactMethodTypeFromProperties(InstanceProperties properties) - { - final String methodName = "getContactMethodTypeFromProperties"; - - ContactMethodType contactMethodType = ContactMethodType.OTHER; - - if (properties != null) - { - int ordinal = repositoryHelper.removeEnumPropertyOrdinal(serviceName, OpenMetadataProperty.CONTACT_METHOD_TYPE.name, properties, methodName); - - switch (ordinal) - { - case 0: - contactMethodType = ContactMethodType.EMAIL; - break; - - case 1: - contactMethodType = ContactMethodType.PHONE; - break; - - case 2: - contactMethodType = ContactMethodType.CHAT; - break; - - case 3: - contactMethodType = ContactMethodType.PROFILE; - break; - - case 4: - contactMethodType = ContactMethodType.ACCOUNT; - break; - - case 99: - contactMethodType = ContactMethodType.OTHER; - break; - } - } - - return contactMethodType; - } -} diff --git a/open-metadata-implementation/access-services/project-management/project-management-server/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/converters/RelatedElementConverter.java b/open-metadata-implementation/access-services/project-management/project-management-server/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/converters/RelatedElementConverter.java deleted file mode 100644 index 5b69a501fe2..00000000000 --- a/open-metadata-implementation/access-services/project-management/project-management-server/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/converters/RelatedElementConverter.java +++ /dev/null @@ -1,64 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.projectmanagement.converters; - - - -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - - - -/** - * RelatedElementConverter generates a RelatedElement from a relationship and attached entity - */ -public class RelatedElementConverter extends ProjectManagementOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public RelatedElementConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - @SuppressWarnings(value="unchecked") - public B getNewBean(Class beanClass, - EntityDetail entity, - Relationship relationship, - String methodName) throws PropertyServerException - { - try - { - return (B)this.getRelatedElement(beanClass, entity, relationship, methodName); - } - catch (ClassCastException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } -} diff --git a/open-metadata-implementation/access-services/project-management/project-management-server/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/converters/package-info.java b/open-metadata-implementation/access-services/project-management/project-management-server/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/converters/package-info.java deleted file mode 100644 index 37f67b96b5f..00000000000 --- a/open-metadata-implementation/access-services/project-management/project-management-server/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/converters/package-info.java +++ /dev/null @@ -1,14 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -/** - * The converters are responsible for converting entities, classifications and relationships retrieved from the - * open metadata repositories into Community Profile OMAS beans. - * - * The inheritance structure follows closely to the inheritance structure of the beans themselves and the naming - * convention is consistent. The converter used is the one that corresponds to the desired bean. - * When a converter is created, it is passed the entity with its embedded classifications and a relationship if - * required on the constructor. The bean is retrieved by calling getBean(). - */ -package org.odpi.openmetadata.accessservices.projectmanagement.converters; - diff --git a/open-metadata-implementation/access-services/project-management/project-management-server/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/server/ProjectManagementInstanceHandler.java b/open-metadata-implementation/access-services/project-management/project-management-server/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/server/ProjectManagementInstanceHandler.java index 37a47323cc8..3c3b4d93021 100644 --- a/open-metadata-implementation/access-services/project-management/project-management-server/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/server/ProjectManagementInstanceHandler.java +++ b/open-metadata-implementation/access-services/project-management/project-management-server/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/server/ProjectManagementInstanceHandler.java @@ -2,18 +2,13 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.projectmanagement.server; -import org.odpi.openmetadata.accessservices.projectmanagement.metadataelements.ActorProfileElement; -import org.odpi.openmetadata.accessservices.projectmanagement.metadataelements.PersonRoleElement; -import org.odpi.openmetadata.accessservices.projectmanagement.metadataelements.ProjectElement; -import org.odpi.openmetadata.accessservices.projectmanagement.metadataelements.RelatedElement; + +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; import org.odpi.openmetadata.adminservices.configuration.registration.AccessServiceDescription; import org.odpi.openmetadata.commonservices.generichandlers.ActorProfileHandler; -import org.odpi.openmetadata.commonservices.generichandlers.CommunityHandler; -import org.odpi.openmetadata.commonservices.generichandlers.ContributionRecordHandler; import org.odpi.openmetadata.commonservices.generichandlers.PersonRoleHandler; import org.odpi.openmetadata.commonservices.generichandlers.ProjectHandler; import org.odpi.openmetadata.commonservices.generichandlers.ReferenceableHandler; -import org.odpi.openmetadata.commonservices.generichandlers.SoftwareCapabilityHandler; import org.odpi.openmetadata.commonservices.multitenant.OMASServiceInstanceHandler; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; diff --git a/open-metadata-implementation/access-services/project-management/project-management-server/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/server/ProjectManagementRESTServices.java b/open-metadata-implementation/access-services/project-management/project-management-server/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/server/ProjectManagementRESTServices.java index 89dcf83016c..b95a9d73fcd 100644 --- a/open-metadata-implementation/access-services/project-management/project-management-server/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/server/ProjectManagementRESTServices.java +++ b/open-metadata-implementation/access-services/project-management/project-management-server/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/server/ProjectManagementRESTServices.java @@ -3,30 +3,16 @@ package org.odpi.openmetadata.accessservices.projectmanagement.server; -import org.odpi.openmetadata.accessservices.projectmanagement.metadataelements.ActorProfileElement; -import org.odpi.openmetadata.accessservices.projectmanagement.metadataelements.PersonRoleElement; -import org.odpi.openmetadata.accessservices.projectmanagement.metadataelements.ProjectElement; -import org.odpi.openmetadata.accessservices.projectmanagement.metadataelements.RelatedElement; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.AssignmentScopeProperties; import org.odpi.openmetadata.frameworks.openmetadata.properties.projects.ProjectProperties; import org.odpi.openmetadata.frameworks.openmetadata.properties.projects.ProjectTeamProperties; import org.odpi.openmetadata.frameworks.openmetadata.properties.resources.ResourceListProperties; import org.odpi.openmetadata.frameworks.openmetadata.properties.projects.StakeholderProperties; -import org.odpi.openmetadata.accessservices.projectmanagement.rest.ActorProfileListResponse; -import org.odpi.openmetadata.accessservices.projectmanagement.rest.ExternalSourceRequestBody; -import org.odpi.openmetadata.accessservices.projectmanagement.rest.PersonRoleListResponse; -import org.odpi.openmetadata.accessservices.projectmanagement.rest.ProjectListResponse; -import org.odpi.openmetadata.accessservices.projectmanagement.rest.ProjectResponse; -import org.odpi.openmetadata.accessservices.projectmanagement.rest.ReferenceableRequestBody; -import org.odpi.openmetadata.accessservices.projectmanagement.rest.RelatedElementListResponse; -import org.odpi.openmetadata.accessservices.projectmanagement.rest.RelationshipRequestBody; import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; import org.odpi.openmetadata.commonservices.generichandlers.ActorProfileHandler; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.commonservices.generichandlers.PersonRoleHandler; @@ -684,19 +670,19 @@ public VoidResponse removeProject(String serverName, * UserNotAuthorizedException the user is not authorized to issue this request or * PropertyServerException there is a problem reported in the open metadata server(s) */ - public ProjectListResponse findProjects(String serverName, - String userId, - SearchStringRequestBody requestBody, - int startFrom, - int pageSize) + public ProjectsResponse findProjects(String serverName, + String userId, + SearchStringRequestBody requestBody, + int startFrom, + int pageSize) { final String methodName = "findProjects"; final String searchStringParameterName = "searchString"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - ProjectListResponse response = new ProjectListResponse(); - AuditLog auditLog = null; + ProjectsResponse response = new ProjectsResponse(); + AuditLog auditLog = null; try { @@ -749,19 +735,19 @@ public ProjectListResponse findProjects(String serverName, * UserNotAuthorizedException the user is not authorized to issue this request or * PropertyServerException there is a problem reported in the open metadata server(s) */ - public ProjectListResponse getProjectsByName(String serverName, - String userId, - NameRequestBody requestBody, - int startFrom, - int pageSize) + public ProjectsResponse getProjectsByName(String serverName, + String userId, + NameRequestBody requestBody, + int startFrom, + int pageSize) { final String methodName = "getProjectsByName"; final String nameParameterName = "name"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - ProjectListResponse response = new ProjectListResponse(); - AuditLog auditLog = null; + ProjectsResponse response = new ProjectsResponse(); + AuditLog auditLog = null; try { @@ -813,7 +799,7 @@ public ProjectListResponse getProjectsByName(String serverName, * PropertyServerException problem accessing property server * UserNotAuthorizedException security access problem */ - public PersonRoleListResponse getProjectManagementRoles(String serverName, + public PersonRolesResponse getProjectManagementRoles(String serverName, String userId, String projectGUID, int startFrom, @@ -824,8 +810,8 @@ public PersonRoleListResponse getProjectManagementRoles(String serverNa RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - PersonRoleListResponse response = new PersonRoleListResponse(); - AuditLog auditLog = null; + PersonRolesResponse response = new PersonRolesResponse(); + AuditLog auditLog = null; try { @@ -869,19 +855,19 @@ public PersonRoleListResponse getProjectManagementRoles(String serverNa * PropertyServerException problem accessing property server * UserNotAuthorizedException security access problem */ - public ActorProfileListResponse getProjectActors(String serverName, - String userId, - String projectGUID, - int startFrom, - int pageSize) + public ActorProfilesResponse getProjectActors(String serverName, + String userId, + String projectGUID, + int startFrom, + int pageSize) { final String methodName = "getProjectActors"; final String guidParameterName = "projectGUID"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - ActorProfileListResponse response = new ActorProfileListResponse(); - AuditLog auditLog = null; + ActorProfilesResponse response = new ActorProfilesResponse(); + AuditLog auditLog = null; try { @@ -923,17 +909,17 @@ public ActorProfileListResponse getProjectActors(String serverName, * UserNotAuthorizedException the user is not authorized to issue this request or * PropertyServerException there is a problem reported in the open metadata server(s) */ - public ProjectListResponse getProjects(String serverName, - String userId, - int startFrom, - int pageSize) + public ProjectsResponse getProjects(String serverName, + String userId, + int startFrom, + int pageSize) { final String methodName = "getProjects"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - ProjectListResponse response = new ProjectListResponse(); - AuditLog auditLog = null; + ProjectsResponse response = new ProjectsResponse(); + AuditLog auditLog = null; try { @@ -1265,19 +1251,19 @@ public VoidResponse clearMoreInformation(String serverName, * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - public RelatedElementListResponse getMoreInformation(String serverName, - String userId, - String elementGUID, - int startFrom, - int pageSize) + public RelatedElementsResponse getMoreInformation(String serverName, + String userId, + String elementGUID, + int startFrom, + int pageSize) { final String methodName = "getMoreInformation"; final String guidPropertyName = "elementGUID"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - RelatedElementListResponse response = new RelatedElementListResponse(); - AuditLog auditLog = null; + RelatedElementsResponse response = new RelatedElementsResponse(); + AuditLog auditLog = null; try { @@ -1322,19 +1308,19 @@ public RelatedElementListResponse getMoreInformation(String serverName, * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - public RelatedElementListResponse getDescriptiveElements(String serverName, - String userId, - String detailGUID, - int startFrom, - int pageSize) + public RelatedElementsResponse getDescriptiveElements(String serverName, + String userId, + String detailGUID, + int startFrom, + int pageSize) { final String methodName = "getDescriptiveElements"; final String guidPropertyName = "detailGUID"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - RelatedElementListResponse response = new RelatedElementListResponse(); - AuditLog auditLog = null; + RelatedElementsResponse response = new RelatedElementsResponse(); + AuditLog auditLog = null; try { @@ -1546,19 +1532,19 @@ public VoidResponse clearStakeholder(String serverName, * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - public RelatedElementListResponse getStakeholders(String serverName, - String userId, - String elementGUID, - int startFrom, - int pageSize) + public RelatedElementsResponse getStakeholders(String serverName, + String userId, + String elementGUID, + int startFrom, + int pageSize) { final String methodName = "getStakeholders"; final String guidPropertyName = "elementGUID"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - RelatedElementListResponse response = new RelatedElementListResponse(); - AuditLog auditLog = null; + RelatedElementsResponse response = new RelatedElementsResponse(); + AuditLog auditLog = null; try { @@ -1603,19 +1589,19 @@ public RelatedElementListResponse getStakeholders(String serverName, * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - public RelatedElementListResponse getStakeholderCommissionedElements(String serverName, - String userId, - String stakeholderGUID, - int startFrom, - int pageSize) + public RelatedElementsResponse getStakeholderCommissionedElements(String serverName, + String userId, + String stakeholderGUID, + int startFrom, + int pageSize) { final String methodName = "getStakeholderCommissionedElements"; final String guidPropertyName = "stakeholderGUID"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - RelatedElementListResponse response = new RelatedElementListResponse(); - AuditLog auditLog = null; + RelatedElementsResponse response = new RelatedElementsResponse(); + AuditLog auditLog = null; try { @@ -1829,19 +1815,19 @@ public VoidResponse clearAssignmentScope(String serverName, * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - public RelatedElementListResponse getAssignedScopes(String serverName, - String userId, - String elementGUID, - int startFrom, - int pageSize) + public RelatedElementsResponse getAssignedScopes(String serverName, + String userId, + String elementGUID, + int startFrom, + int pageSize) { final String methodName = "getAssignedScopes"; final String guidPropertyName = "elementGUID"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - RelatedElementListResponse response = new RelatedElementListResponse(); - AuditLog auditLog = null; + RelatedElementsResponse response = new RelatedElementsResponse(); + AuditLog auditLog = null; try { @@ -1886,19 +1872,19 @@ public RelatedElementListResponse getAssignedScopes(String serverName, * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - public RelatedElementListResponse getAssignedActors(String serverName, - String userId, - String scopeGUID, - int startFrom, - int pageSize) + public RelatedElementsResponse getAssignedActors(String serverName, + String userId, + String scopeGUID, + int startFrom, + int pageSize) { final String methodName = "getAssignedActors"; final String guidPropertyName = "scopeGUID"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - RelatedElementListResponse response = new RelatedElementListResponse(); - AuditLog auditLog = null; + RelatedElementsResponse response = new RelatedElementsResponse(); + AuditLog auditLog = null; try { @@ -2116,19 +2102,19 @@ public VoidResponse clearResource(String serverName, * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - public RelatedElementListResponse getResourceList(String serverName, - String userId, - String elementGUID, - int startFrom, - int pageSize) + public RelatedElementsResponse getResourceList(String serverName, + String userId, + String elementGUID, + int startFrom, + int pageSize) { final String methodName = "getResourceList"; final String guidPropertyName = "elementGUID"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - RelatedElementListResponse response = new RelatedElementListResponse(); - AuditLog auditLog = null; + RelatedElementsResponse response = new RelatedElementsResponse(); + AuditLog auditLog = null; try { @@ -2172,11 +2158,11 @@ public RelatedElementListResponse getResourceList(String serverName, * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - public RelatedElementListResponse getSupportedByResource(String serverName, - String userId, - String resourceGUID, - int startFrom, - int pageSize) + public RelatedElementsResponse getSupportedByResource(String serverName, + String userId, + String resourceGUID, + int startFrom, + int pageSize) { final String methodName = "getSupportedByResource"; final String guidPropertyName = "resourceGUID"; @@ -2184,8 +2170,8 @@ public RelatedElementListResponse getSupportedByResource(String serverName, RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - RelatedElementListResponse response = new RelatedElementListResponse(); - AuditLog auditLog = null; + RelatedElementsResponse response = new RelatedElementsResponse(); + AuditLog auditLog = null; try { diff --git a/open-metadata-implementation/access-services/project-management/project-management-server/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/server/ProjectManagementServicesInstance.java b/open-metadata-implementation/access-services/project-management/project-management-server/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/server/ProjectManagementServicesInstance.java index 326d55da7d8..fe19602c60e 100644 --- a/open-metadata-implementation/access-services/project-management/project-management-server/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/server/ProjectManagementServicesInstance.java +++ b/open-metadata-implementation/access-services/project-management/project-management-server/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/server/ProjectManagementServicesInstance.java @@ -2,20 +2,10 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.projectmanagement.server; -import org.odpi.openmetadata.accessservices.projectmanagement.converters.ActorProfileConverter; -import org.odpi.openmetadata.accessservices.projectmanagement.converters.PersonRoleConverter; -import org.odpi.openmetadata.accessservices.projectmanagement.converters.ProjectConverter; -import org.odpi.openmetadata.accessservices.projectmanagement.converters.RelatedElementConverter; import org.odpi.openmetadata.accessservices.projectmanagement.ffdc.ProjectManagementErrorCode; -import org.odpi.openmetadata.accessservices.projectmanagement.metadataelements.ActorProfileElement; -import org.odpi.openmetadata.accessservices.projectmanagement.metadataelements.PersonRoleElement; -import org.odpi.openmetadata.accessservices.projectmanagement.metadataelements.ProjectElement; -import org.odpi.openmetadata.accessservices.projectmanagement.metadataelements.RelatedElement; +import org.odpi.openmetadata.commonservices.generichandlers.*; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; import org.odpi.openmetadata.adminservices.configuration.registration.AccessServiceDescription; -import org.odpi.openmetadata.commonservices.generichandlers.ActorProfileHandler; -import org.odpi.openmetadata.commonservices.generichandlers.PersonRoleHandler; -import org.odpi.openmetadata.commonservices.generichandlers.ProjectHandler; -import org.odpi.openmetadata.commonservices.generichandlers.ReferenceableHandler; import org.odpi.openmetadata.commonservices.multitenant.OMASServiceInstance; import org.odpi.openmetadata.commonservices.multitenant.ffdc.exceptions.NewInstanceException; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; diff --git a/open-metadata-implementation/access-services/project-management/project-management-spring/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/server/spring/ProjectManagementResource.java b/open-metadata-implementation/access-services/project-management/project-management-spring/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/server/spring/ProjectManagementResource.java index 1802e57223a..bf30c02b76f 100644 --- a/open-metadata-implementation/access-services/project-management/project-management-spring/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/server/spring/ProjectManagementResource.java +++ b/open-metadata-implementation/access-services/project-management/project-management-spring/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/server/spring/ProjectManagementResource.java @@ -4,19 +4,8 @@ import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.accessservices.projectmanagement.rest.ActorProfileListResponse; -import org.odpi.openmetadata.accessservices.projectmanagement.rest.ExternalSourceRequestBody; -import org.odpi.openmetadata.accessservices.projectmanagement.rest.PersonRoleListResponse; -import org.odpi.openmetadata.accessservices.projectmanagement.rest.ProjectListResponse; -import org.odpi.openmetadata.accessservices.projectmanagement.rest.ProjectResponse; -import org.odpi.openmetadata.accessservices.projectmanagement.rest.ReferenceableRequestBody; -import org.odpi.openmetadata.accessservices.projectmanagement.rest.RelatedElementListResponse; -import org.odpi.openmetadata.accessservices.projectmanagement.rest.RelationshipRequestBody; import org.odpi.openmetadata.accessservices.projectmanagement.server.ProjectManagementRESTServices; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; @@ -242,11 +231,11 @@ public VoidResponse removeProject(@PathVariable String server */ @PostMapping(path = "/projects/by-search-string") - public ProjectListResponse findProjects(@PathVariable String serverName, - @PathVariable String userId, - @RequestBody SearchStringRequestBody requestBody, - @RequestParam int startFrom, - @RequestParam int pageSize) + public ProjectsResponse findProjects(@PathVariable String serverName, + @PathVariable String userId, + @RequestBody SearchStringRequestBody requestBody, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.findProjects(serverName, userId, requestBody, startFrom, pageSize); } @@ -269,11 +258,11 @@ public ProjectListResponse findProjects(@PathVariable String se */ @PostMapping(path = "/projects/by-name") - public ProjectListResponse getProjectsByName(@PathVariable String serverName, - @PathVariable String userId, - @RequestBody NameRequestBody requestBody, - @RequestParam int startFrom, - @RequestParam int pageSize) + public ProjectsResponse getProjectsByName(@PathVariable String serverName, + @PathVariable String userId, + @RequestBody NameRequestBody requestBody, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getProjectsByName(serverName, userId, requestBody, startFrom, pageSize); } @@ -295,7 +284,7 @@ public ProjectListResponse getProjectsByName(@PathVariable String ser */ @GetMapping(path = "/project-managers/by-project/{projectGUID}") - public PersonRoleListResponse getProjectManagementRoles(@PathVariable String serverName, + public PersonRolesResponse getProjectManagementRoles(@PathVariable String serverName, @PathVariable String userId, @PathVariable String projectGUID, @RequestParam int startFrom, @@ -321,11 +310,11 @@ public PersonRoleListResponse getProjectManagementRoles(@PathVariable String */ @GetMapping(path = "/project-actors/by-project/{projectGUID}") - public ActorProfileListResponse getProjectActors(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String projectGUID, - @RequestParam int startFrom, - @RequestParam int pageSize) + public ActorProfilesResponse getProjectActors(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String projectGUID, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getProjectActors(serverName, userId, projectGUID, startFrom, pageSize); } @@ -346,10 +335,10 @@ public ActorProfileListResponse getProjectActors(@PathVariable String s */ @GetMapping(path = "/projects") - public ProjectListResponse getProjectsByName(@PathVariable String serverName, - @PathVariable String userId, - @RequestParam int startFrom, - @RequestParam int pageSize) + public ProjectsResponse getProjectsByName(@PathVariable String serverName, + @PathVariable String userId, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getProjects(serverName, userId, startFrom, pageSize); } @@ -446,11 +435,11 @@ public VoidResponse clearMoreInformation(@PathVariable String */ @GetMapping(path = "/related-elements/more-information/by-descriptive-element/{elementGUID}") - public RelatedElementListResponse getMoreInformation(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String elementGUID, - @RequestParam int startFrom, - @RequestParam int pageSize) + public RelatedElementsResponse getMoreInformation(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String elementGUID, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getMoreInformation(serverName, userId, elementGUID, startFrom, pageSize); } @@ -472,11 +461,11 @@ public RelatedElementListResponse getMoreInformation(@PathVariable String serve */ @GetMapping(path = "/related-elements/more-information/by-detail-element/{detailGUID}") - public RelatedElementListResponse getDescriptiveElements(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String detailGUID, - @RequestParam int startFrom, - @RequestParam int pageSize) + public RelatedElementsResponse getDescriptiveElements(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String detailGUID, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getDescriptiveElements(serverName, userId, detailGUID, startFrom, pageSize); } @@ -550,11 +539,11 @@ public VoidResponse clearStakeholder(@PathVariable String ser */ @GetMapping(path = "/related-elements/stakeholders/by-commissioned-element/{elementGUID}") - public RelatedElementListResponse getStakeholders(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String elementGUID, - @RequestParam int startFrom, - @RequestParam int pageSize) + public RelatedElementsResponse getStakeholders(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String elementGUID, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getStakeholders(serverName, userId, elementGUID, startFrom, pageSize); } @@ -576,11 +565,11 @@ public RelatedElementListResponse getStakeholders(@PathVariable String serverNa */ @GetMapping(path = "/related-elements/stakeholders/by-stakeholder/{stakeholderGUID}") - public RelatedElementListResponse getStakeholderCommissionedElements(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String stakeholderGUID, - @RequestParam int startFrom, - @RequestParam int pageSize) + public RelatedElementsResponse getStakeholderCommissionedElements(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String stakeholderGUID, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getStakeholderCommissionedElements(serverName, userId, stakeholderGUID, startFrom, pageSize); } @@ -654,11 +643,11 @@ public VoidResponse clearAssignmentScope(@PathVariable String */ @GetMapping(path = "/related-elements/assignment-scopes/by-assigned-actor/{elementGUID}") - public RelatedElementListResponse getAssignedScopes(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String elementGUID, - @RequestParam int startFrom, - @RequestParam int pageSize) + public RelatedElementsResponse getAssignedScopes(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String elementGUID, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getAssignedScopes(serverName, userId, elementGUID, startFrom, pageSize); } @@ -680,11 +669,11 @@ public RelatedElementListResponse getAssignedScopes(@PathVariable String server */ @GetMapping(path = "/related-elements/assignment-scopes/by-assigned-scope/{scopeGUID}") - public RelatedElementListResponse getAssignedActors(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String scopeGUID, - @RequestParam int startFrom, - @RequestParam int pageSize) + public RelatedElementsResponse getAssignedActors(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String scopeGUID, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getAssignedActors(serverName, userId, scopeGUID, startFrom, pageSize); } @@ -758,11 +747,11 @@ public VoidResponse clearResource(@PathVariable String server */ @GetMapping(path = "/related-elements/resource-list/by-assignee/{elementGUID}") - public RelatedElementListResponse getResourceList(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String elementGUID, - @RequestParam int startFrom, - @RequestParam int pageSize) + public RelatedElementsResponse getResourceList(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String elementGUID, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getResourceList(serverName, userId, elementGUID, startFrom, pageSize); } @@ -784,11 +773,11 @@ public RelatedElementListResponse getResourceList(@PathVariable String serverNa */ @GetMapping(path = "/related-elements/resource-list/by-resource/{resourceGUID}") - public RelatedElementListResponse getSupportedByResource(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String resourceGUID, - @RequestParam int startFrom, - @RequestParam int pageSize) + public RelatedElementsResponse getSupportedByResource(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String resourceGUID, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getSupportedByResource(serverName, userId, resourceGUID, startFrom, pageSize); } diff --git a/open-metadata-implementation/access-services/security-manager/security-manager-api/build.gradle b/open-metadata-implementation/access-services/security-manager/security-manager-api/build.gradle index 674917b1e28..f582c2527c6 100644 --- a/open-metadata-implementation/access-services/security-manager/security-manager-api/build.gradle +++ b/open-metadata-implementation/access-services/security-manager/security-manager-api/build.gradle @@ -6,6 +6,7 @@ dependencies { implementation project(':open-metadata-implementation:repository-services:repository-services-apis') + implementation project(':open-metadata-implementation:frameworks:open-metadata-framework') implementation project(':open-metadata-implementation:frameworks:open-connector-framework') implementation project(':open-metadata-implementation:frameworks:audit-log-framework') testImplementation 'com.fasterxml.jackson.core:jackson-databind' diff --git a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/api/MetadataSourceInterface.java b/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/api/MetadataSourceInterface.java index a222fb76ada..ec60bf6eeda 100644 --- a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/api/MetadataSourceInterface.java +++ b/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/api/MetadataSourceInterface.java @@ -4,15 +4,14 @@ package org.odpi.openmetadata.accessservices.securitymanager.api; -import org.odpi.openmetadata.accessservices.securitymanager.properties.SecurityManagerProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities.SecurityManagerProperties; /** * MetadataSourceInterface is the interface used to define information about the third party technologies that * an integration daemon is extracting metadata from. - * * These technologies are represented by a software capability in open metadata. */ public interface MetadataSourceInterface @@ -38,8 +37,8 @@ String createExternalSecurityManager(String userId, String externalSourceName, String typeName, SecurityManagerProperties securityManagerProperties) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException; + UserNotAuthorizedException, + PropertyServerException; /** diff --git a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/api/SecurityManagerInterface.java b/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/api/SecurityManagerInterface.java index 8120520cbfb..fd54885f109 100644 --- a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/api/SecurityManagerInterface.java +++ b/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/api/SecurityManagerInterface.java @@ -2,17 +2,12 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.securitymanager.api; -import org.odpi.openmetadata.accessservices.securitymanager.metadataelements.ActorProfileElement; -import org.odpi.openmetadata.accessservices.securitymanager.metadataelements.PersonRoleElement; -import org.odpi.openmetadata.accessservices.securitymanager.metadataelements.PersonRoleAppointee; -import org.odpi.openmetadata.accessservices.securitymanager.metadataelements.SecurityGroupElement; -import org.odpi.openmetadata.accessservices.securitymanager.metadataelements.UserIdentityElement; -import org.odpi.openmetadata.accessservices.securitymanager.properties.SecurityGroupProperties; -import org.odpi.openmetadata.accessservices.securitymanager.properties.UserIdentityProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.UserIdentityProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.security.SecurityGroupProperties; import java.util.Date; import java.util.List; @@ -30,7 +25,6 @@ public interface SecurityManagerInterface * @param properties properties of the definition * * @return unique identifier of the definition - * * @throws InvalidParameterException typeName, documentIdentifier or userId is null; documentIdentifier is not unique; typeName is not valid * @throws PropertyServerException problem accessing the metadata service * @throws UserNotAuthorizedException security access problem @@ -387,13 +381,13 @@ List findActorProfile(String userId, * @throws PropertyServerException problem accessing property server * @throws UserNotAuthorizedException security access problem */ - List getAppointees(String userId, - String personRoleGUID, - Date effectiveTime, - int startFrom, - int pageSize) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException; + List getAppointees(String userId, + String personRoleGUID, + Date effectiveTime, + int startFrom, + int pageSize) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException; /** diff --git a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/events/SecurityManagerOutTopicEvent.java b/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/events/SecurityManagerOutTopicEvent.java index 705f612b004..c24e4989ebe 100644 --- a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/events/SecurityManagerOutTopicEvent.java +++ b/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/events/SecurityManagerOutTopicEvent.java @@ -5,7 +5,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; import java.util.Date; import java.util.Map; @@ -25,17 +25,17 @@ public class SecurityManagerOutTopicEvent { - private long eventVersionId = 1L; - private SecurityManagerEventType eventType = null; - private Date eventTime = null; - private ElementHeader elementHeader = null; - private Map elementProperties = null; + private long eventVersionId = 1L; + private SecurityManagerEventType eventType = null; + private Date eventTime = null; + private ElementHeader elementHeader = null; + private Map elementProperties = null; - private ElementHeader previousElementHeader = null; - private Map previousElementProperties = null; + private ElementHeader previousElementHeader = null; + private Map previousElementProperties = null; - private String classificationName = null; - private Map previousClassificationProperties = null; + private String classificationName = null; + private Map previousClassificationProperties = null; diff --git a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/metadataelements/ActorProfileElement.java b/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/metadataelements/ActorProfileElement.java deleted file mode 100644 index 6f1f26ed4e5..00000000000 --- a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/metadataelements/ActorProfileElement.java +++ /dev/null @@ -1,382 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.securitymanager.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.securitymanager.properties.ActorProfileProperties; - -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; - - -/** - * The ActorProfileElement describes an individual, system, team or organization. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ActorProfileElement implements MetadataElement -{ - private ElementHeader elementHeader = null; - private ActorProfileProperties profileProperties = null; - private List contactMethods = null; - private List personRoles = null; /* Person only */ - private List locations = null; - private List userIdentities = null; - private ElementStub superTeam = null; /* Team only */ - private List subTeams = null; /* Team only */ - private List teamLeaderRoles = null; /* Team only */ - private List teamMemberRoles = null; /* Team only */ - private List linkedInfrastructure = null; /* ITProfile only */ - - - /** - * Default Constructor - */ - public ActorProfileElement() - { - } - - - /** - * Copy/clone Constructor - the resulting object. - * - * @param template object being copied - */ - public ActorProfileElement(ActorProfileElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - profileProperties = template.getProfileProperties(); - contactMethods = template.getContactMethods(); - personRoles = template.getPersonRoles(); - locations = template.getLocations(); - userIdentities = template.getUserIdentities(); - superTeam = template.getSuperTeam(); - subTeams = template.getSubTeams(); - teamLeaderRoles = template.getTeamLeaderRoles(); - teamMemberRoles = template.getTeamMemberRoles(); - linkedInfrastructure = template.getLinkedInfrastructure(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the properties of the profile. - * - * @return properties - */ - public ActorProfileProperties getProfileProperties() - { - return profileProperties; - } - - - /** - * Set up the profile properties. - * - * @param profileProperties properties - */ - public void setProfileProperties(ActorProfileProperties profileProperties) - { - this.profileProperties = profileProperties; - } - - - /** - * Return the contact methods for this profile. - * - * @return list of contact methods - */ - public List getContactMethods() - { - return contactMethods; - } - - - /** - * Set up the contact methods for this profile. - * - * @param contactMethods list of contact methods - */ - public void setContactMethods(List contactMethods) - { - this.contactMethods = contactMethods; - } - - - /** - * Return the headers of the person roles that this actor is appointed to. - * - * @return role stubs - */ - public List getPersonRoles() - { - return personRoles; - } - - - /** - * Set up the headers of the person roles that this actor is appointed to. - * - * @param personRoles role stubs - */ - public void setPersonRoles(List personRoles) - { - this.personRoles = personRoles; - } - - - - /** - * Return the headers of the location that this actor is linked to. - * - * @return location stubs - */ - public List getLocations() - { - return locations; - } - - - /** - * Set up the headers of the person roles that this actor is linked to. - * - * @param locations location stubs - */ - public void setLocations(List locations) - { - this.locations = locations; - } - - - /** - * Return the list of user identities for this profile. - * - * @return list of userIds - */ - public List getUserIdentities() - { - return userIdentities; - } - - - /** - * Set up the list of user identities for this profile. - * - * @param userIdentities list of userIds - */ - public void setUserIdentities(List userIdentities) - { - this.userIdentities = userIdentities; - } - - - /** - * Return a summary of the team that is above this team in the organizational hierarchy. - * - * @return team stub - */ - public ElementStub getSuperTeam() - { - return superTeam; - } - - - /** - * Set up a summary of the team that is above this team in the organizational hierarchy. - * - * @param superTeam team stub - */ - public void setSuperTeam(ElementStub superTeam) - { - this.superTeam = superTeam; - } - - - /** - * Return the list of team that report to this team. - * - * @return list of team stubs - */ - public List getSubTeams() - { - return subTeams; - } - - - /** - * Set up the list of team that report to this team. - * - * @param subTeams list of team stubs - */ - public void setSubTeams(List subTeams) - { - this.subTeams = subTeams; - } - - - /** - * Return the list of leader roles assigned to this team. - * - * @return list of role stubs - */ - public List getTeamLeaderRoles() - { - return teamLeaderRoles; - } - - - /** - * Set up the list of leader roles assigned to this team. - * - * @param teamLeaderRoles list of role stubs - */ - public void setTeamLeaderRoles(List teamLeaderRoles) - { - this.teamLeaderRoles = teamLeaderRoles; - } - - - /** - * Return the list of member roles assigned to this team. - * - * @return list of role stubs - */ - public List getTeamMemberRoles() - { - return teamMemberRoles; - } - - - /** - * Set up the list of member roles assigned to this team. - * - * @param teamMemberRoles list of role stubs - */ - public void setTeamMemberRoles(List teamMemberRoles) - { - this.teamMemberRoles = teamMemberRoles; - } - - - /** - * Return the stubs of the pieces of IT infrastructure linked to the profile. - * - * @return list of element stubs - */ - public List getLinkedInfrastructure() - { - return linkedInfrastructure; - } - - - /** - * Set up the stubs of the pieces of IT infrastructure linked to the profile. - * - * @param linkedInfrastructure list of element stubs - */ - public void setLinkedInfrastructure(List linkedInfrastructure) - { - this.linkedInfrastructure = linkedInfrastructure; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ActorProfileElement{" + - "elementHeader=" + elementHeader + - ", profileProperties=" + profileProperties + - ", contactMethods=" + contactMethods + - ", personRoles=" + personRoles + - ", locations=" + locations + - ", userIdentities=" + userIdentities + - ", superTeam=" + superTeam + - ", subTeams=" + subTeams + - ", teamLeaderRoles=" + teamLeaderRoles + - ", teamMemberRoles=" + teamMemberRoles + - ", linkedInfrastructure=" + linkedInfrastructure + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ActorProfileElement that = (ActorProfileElement) objectToCompare; - return Objects.equals(elementHeader, that.elementHeader) && - Objects.equals(profileProperties, that.profileProperties) && - Objects.equals(contactMethods, that.contactMethods) && - Objects.equals(personRoles, that.personRoles) && - Objects.equals(locations, that.locations) && - Objects.equals(userIdentities, that.userIdentities) && - Objects.equals(superTeam, that.superTeam) && - Objects.equals(subTeams, that.subTeams) && - Objects.equals(teamLeaderRoles, that.teamLeaderRoles) && - Objects.equals(teamMemberRoles, that.teamMemberRoles) && - Objects.equals(linkedInfrastructure, that.linkedInfrastructure); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(elementHeader, profileProperties, contactMethods, userIdentities, superTeam, subTeams, - teamLeaderRoles, personRoles, locations, teamMemberRoles, linkedInfrastructure); - } -} diff --git a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/metadataelements/ContactMethodElement.java b/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/metadataelements/ContactMethodElement.java deleted file mode 100644 index b1df88fe394..00000000000 --- a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/metadataelements/ContactMethodElement.java +++ /dev/null @@ -1,147 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.securitymanager.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.securitymanager.properties.ContactMethodProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * ContactMethodElement contains the properties and header for a contract method retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ContactMethodElement implements MetadataElement -{ - private ElementHeader elementHeader = null; - private ContactMethodProperties properties = null; - - - /** - * Default constructor - */ - public ContactMethodElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ContactMethodElement(ContactMethodElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - properties = template.getProperties(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - @Override - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the properties of the contact method. - * - * @return properties - */ - public ContactMethodProperties getProperties() - { - return properties; - } - - - /** - * Set up the contract method properties. - * - * @param properties properties - */ - public void setProperties(ContactMethodProperties properties) - { - this.properties = properties; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ContactMethodElement{" + - "elementHeader=" + elementHeader + - ", properties=" + properties + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ContactMethodElement that = (ContactMethodElement) objectToCompare; - return Objects.equals(elementHeader, that.elementHeader) && - Objects.equals(properties, that.properties); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementHeader, properties); - } -} diff --git a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/metadataelements/MetadataElement.java b/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/metadataelements/MetadataElement.java deleted file mode 100644 index bc64aa7062d..00000000000 --- a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/metadataelements/MetadataElement.java +++ /dev/null @@ -1,27 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.securitymanager.metadataelements; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * MetadataElement is the common interface for all metadata elements. It adds the header information that is stored with the properties. - * This includes detains of its unique identifier, type and origin. - */ -public interface MetadataElement -{ - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - ElementHeader getElementHeader(); - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - void setElementHeader(ElementHeader elementHeader); -} diff --git a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/metadataelements/PersonRoleAppointee.java b/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/metadataelements/PersonRoleAppointee.java deleted file mode 100644 index 345734cebbd..00000000000 --- a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/metadataelements/PersonRoleAppointee.java +++ /dev/null @@ -1,181 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.securitymanager.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.securitymanager.properties.AppointmentProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * PersonRoleAppointee describes an individual's appointment to a specific governance role. It includes their personal details along with the - * start and end date of their appointment. The elementHeader is from the PersonRoleAppointment relationship. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class PersonRoleAppointee implements MetadataElement -{ - private ElementHeader elementHeader = null; - private AppointmentProperties properties = null; - private ActorProfileElement profile = null; - - - - /** - * Default constructor - */ - public PersonRoleAppointee() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public PersonRoleAppointee(PersonRoleAppointee template) - { - if (template != null) - { - this.elementHeader = template.getElementHeader(); - this.profile = template.getProfile(); - this.properties = template.getProperties(); - } - } - - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - @Override - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the properties of the appointment relationship. - * - * @return properties - */ - public AppointmentProperties getProperties() - { - return properties; - } - - - /** - * Set up the properties of the appointment relationship. - * - * @param properties properties - */ - public void setProperties(AppointmentProperties properties) - { - this.properties = properties; - } - - - /** - * Return the profile information for the individual. - * - * @return personal profile object - */ - public ActorProfileElement getProfile() - { - if (profile == null) - { - return null; - } - else - { - return profile; - } - } - - - /** - * Set up the profile information for the individual. - * - * @param profile personal profile object - */ - public void setProfile(ActorProfileElement profile) - { - this.profile = profile; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "PersonRoleAppointee{" + - "elementHeader=" + elementHeader + - ", properties=" + properties + - ", profile=" + profile + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - PersonRoleAppointee that = (PersonRoleAppointee) objectToCompare; - return Objects.equals(elementHeader, that.elementHeader) && - Objects.equals(properties, that.properties) && - Objects.equals(profile, that.profile); - } - - - /** - * Hash code for this object - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(elementHeader, properties, profile); - } -} diff --git a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/metadataelements/PersonRoleElement.java b/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/metadataelements/PersonRoleElement.java deleted file mode 100644 index 7c401ff6785..00000000000 --- a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/metadataelements/PersonRoleElement.java +++ /dev/null @@ -1,175 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.securitymanager.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.securitymanager.properties.PersonRoleProperties; - -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; - -/** - * PersonalRoleElement contains the properties and header for a person role assigned to a profile retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class PersonRoleElement implements MetadataElement -{ - private ElementHeader elementHeader = null; - private PersonRoleProperties properties = null; - private List appointees = null; - - - /** - * Default constructor - */ - public PersonRoleElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public PersonRoleElement(PersonRoleElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - properties = template.getProperties(); - appointees = template.getAppointees(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param header element header object - */ - @Override - public void setElementHeader(ElementHeader header) - { - this.elementHeader = header; - } - - - /** - * Return the properties of the role. - * - * @return properties - */ - public PersonRoleProperties getProperties() - { - return properties; - } - - - /** - * Set up the role properties. - * - * @param properties properties - */ - public void setProperties(PersonRoleProperties properties) - { - this.properties = properties; - } - - - /** - * Return the list of Person profiles that are appointed to the role. - * - * @return list of element stubs - */ - public List getAppointees() - { - return appointees; - } - - - /** - * Set up the list of Person profiles that are appointed to the role. - * - * @param appointees list of element stubs - */ - public void setAppointees(List appointees) - { - this.appointees = appointees; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "PersonRoleElement{" + - "elementHeader=" + elementHeader + - ", properties=" + properties + - ", appointees=" + appointees + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - PersonRoleElement that = (PersonRoleElement) objectToCompare; - return Objects.equals(elementHeader, that.elementHeader) && - Objects.equals(properties, that.properties) && - Objects.equals(appointees, that.appointees); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementHeader, properties, appointees); - } -} diff --git a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/metadataelements/ProfileIdentityElement.java b/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/metadataelements/ProfileIdentityElement.java deleted file mode 100644 index 64f4e8c8cbf..00000000000 --- a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/metadataelements/ProfileIdentityElement.java +++ /dev/null @@ -1,144 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.securitymanager.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.securitymanager.properties.ProfileIdentityProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * UserIdentityElement contains the properties and header for a user identity retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ProfileIdentityElement -{ - private ProfileIdentityProperties profileIdentity = null; - private UserIdentityElement properties = null; - - - /** - * Default constructor - */ - public ProfileIdentityElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ProfileIdentityElement(ProfileIdentityElement template) - { - if (template != null) - { - profileIdentity = template.getProfileIdentity(); - properties = template.getProperties(); - } - } - - - /** - * Return the properties from the profile identity relationship. - * - * @return profile identity - */ - public ProfileIdentityProperties getProfileIdentity() - { - return profileIdentity; - } - - - /** - * Set up the properties from the profile identity relationship. - * - * @param profileIdentity profile identity - */ - public void setProfileIdentity(ProfileIdentityProperties profileIdentity) - { - this.profileIdentity = profileIdentity; - } - - - /** - * Return the properties of the userId. - * - * @return properties - */ - public UserIdentityElement getProperties() - { - return properties; - } - - - /** - * Set up the userId properties. - * - * @param properties properties - */ - public void setProperties(UserIdentityElement properties) - { - this.properties = properties; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ProfileIdentityElement{" + - "profileIdentity=" + profileIdentity + - ", properties=" + properties + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ProfileIdentityElement that = (ProfileIdentityElement) objectToCompare; - return Objects.equals(profileIdentity, that.profileIdentity) && - Objects.equals(properties, that.properties); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), profileIdentity, properties); - } -} diff --git a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/metadataelements/ProfileLocationElement.java b/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/metadataelements/ProfileLocationElement.java deleted file mode 100644 index 3cc0cb1e241..00000000000 --- a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/metadataelements/ProfileLocationElement.java +++ /dev/null @@ -1,146 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.securitymanager.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.securitymanager.properties.ProfileLocationProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ProfileLocationElement contains the properties and header for a relationship between a profile and a user identity retrieved - * from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ProfileLocationElement -{ - private ProfileLocationProperties properties = null; - private ElementStub location = null; - - - /** - * Default constructor - */ - public ProfileLocationElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ProfileLocationElement(ProfileLocationElement template) - { - if (template != null) - { - properties = template.getProperties(); - location = template.getLocation(); - } - } - - - /** - * Return the properties from the profile location relationship. - * - * @return profile identity - */ - public ProfileLocationProperties getProperties() - { - return properties; - } - - - /** - * Set up the properties from the profile location relationship. - * - * @param properties profile identity - */ - public void setProperties(ProfileLocationProperties properties) - { - this.properties = properties; - } - - - /** - * Return the properties of the location. - * - * @return properties - */ - public ElementStub getLocation() - { - return location; - } - - - /** - * Set up the userId properties. - * - * @param location properties - */ - public void setLocation(ElementStub location) - { - this.location = location; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ProfileLocationElement{" + - "properties=" + properties + - ", location=" + location + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ProfileLocationElement that = (ProfileLocationElement) objectToCompare; - return Objects.equals(properties, that.properties) && - Objects.equals(location, that.location); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), properties, location); - } -} diff --git a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/metadataelements/RelatedElement.java b/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/metadataelements/RelatedElement.java deleted file mode 100644 index c53937061b6..00000000000 --- a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/metadataelements/RelatedElement.java +++ /dev/null @@ -1,172 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.securitymanager.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.securitymanager.properties.RelationshipProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * RelatedElement contains the properties and header for a relationship retrieved from the metadata repository along with the stub - * of the related element. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class RelatedElement -{ - private ElementHeader relationshipHeader = null; - private RelationshipProperties relationshipProperties = null; - private ElementStub relatedElement = null; - - /** - * Default constructor - */ - public RelatedElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public RelatedElement(RelatedElement template) - { - if (template != null) - { - relationshipHeader = template.getRelationshipHeader(); - relationshipProperties = template.getRelationshipProperties(); - relatedElement = template.getRelatedElement(); - } - } - - - /** - * Return the element header associated with the relationship. - * - * @return element header object - */ - public ElementHeader getRelationshipHeader() - { - return relationshipHeader; - } - - - /** - * Set up the element header associated with the relationship. - * - * @param relationshipHeader element header object - */ - public void setRelationshipHeader(ElementHeader relationshipHeader) - { - this.relationshipHeader = relationshipHeader; - } - - - /** - * Return details of the relationship - * - * @return relationship properties - */ - public RelationshipProperties getRelationshipProperties() - { - return relationshipProperties; - } - - - /** - * Set up relationship properties - * - * @param relationshipProperties relationship properties - */ - public void setRelationshipProperties(RelationshipProperties relationshipProperties) - { - this.relationshipProperties = relationshipProperties; - } - - - /** - * Return the element header associated with end 1 of the relationship. - * - * @return element stub object - */ - public ElementStub getRelatedElement() - { - return relatedElement; - } - - - /** - * Set up the element header associated with end 1 of the relationship. - * - * @param relatedElement element stub object - */ - public void setRelatedElement(ElementStub relatedElement) - { - this.relatedElement = relatedElement; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "RelatedElement{" + - "relationshipHeader=" + relationshipHeader + - ", relationshipProperties=" + relationshipProperties + - ", relatedElement=" + relatedElement + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - RelatedElement that = (RelatedElement) objectToCompare; - return Objects.equals(getRelationshipHeader(), that.getRelationshipHeader()) && - Objects.equals(getRelationshipProperties(), that.getRelationshipProperties()) && - Objects.equals(getRelatedElement(), that.getRelatedElement()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), relationshipHeader, relationshipProperties, relatedElement); - } -} diff --git a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/metadataelements/SecurityGroupElement.java b/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/metadataelements/SecurityGroupElement.java deleted file mode 100644 index ad6169489fb..00000000000 --- a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/metadataelements/SecurityGroupElement.java +++ /dev/null @@ -1,146 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.securitymanager.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.securitymanager.properties.SecurityGroupProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * SecurityGroupElement is the superclass used to return the common properties of a governance definition stored in the - * open metadata repositories. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class SecurityGroupElement implements MetadataElement -{ - private ElementHeader elementHeader = null; - private SecurityGroupProperties properties = null; - - - /** - * Default constructor - */ - public SecurityGroupElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public SecurityGroupElement(SecurityGroupElement template) - { - if (template != null) - { - this.elementHeader = template.getElementHeader(); - this.properties = template.getProperties(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the requested security group. - * - * @return properties bean - */ - public SecurityGroupProperties getProperties() - { - return properties; - } - - - /** - * Set up the requested security group. - * - * @param properties properties bean - */ - public void setProperties(SecurityGroupProperties properties) - { - this.properties = properties; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "SecurityGroupElement{" + - "elementHeader=" + elementHeader + - ", properties=" + properties + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - SecurityGroupElement that = (SecurityGroupElement) objectToCompare; - return Objects.equals(elementHeader, that.elementHeader) && - Objects.equals(properties, that.properties); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementHeader, properties); - } -} diff --git a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/metadataelements/UserIdentityElement.java b/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/metadataelements/UserIdentityElement.java deleted file mode 100644 index 381125fb825..00000000000 --- a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/metadataelements/UserIdentityElement.java +++ /dev/null @@ -1,147 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.securitymanager.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.securitymanager.properties.UserIdentityProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * UserIdentityElement contains the properties and header for a user identity retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class UserIdentityElement implements MetadataElement -{ - private ElementHeader elementHeader = null; - private UserIdentityProperties properties = null; - - - /** - * Default constructor - */ - public UserIdentityElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public UserIdentityElement(UserIdentityElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - properties = template.getProperties(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - @Override - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the properties of the userId. - * - * @return properties - */ - public UserIdentityProperties getProperties() - { - return properties; - } - - - /** - * Set up the userId properties. - * - * @param properties properties - */ - public void setProperties(UserIdentityProperties properties) - { - this.properties = properties; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "UserIdentityElement{" + - "elementHeader=" + elementHeader + - ", properties=" + properties + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - UserIdentityElement that = (UserIdentityElement) objectToCompare; - return Objects.equals(elementHeader, that.elementHeader) && - Objects.equals(properties, that.properties); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementHeader, properties); - } -} diff --git a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/metadataelements/package-info.java b/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/metadataelements/package-info.java deleted file mode 100644 index d0b32c92334..00000000000 --- a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/metadataelements/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -/** - * The metadata elements describe the way that metadata is returned from the repository. - */ -package org.odpi.openmetadata.accessservices.securitymanager.metadataelements; diff --git a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/properties/ActorProfileProperties.java b/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/properties/ActorProfileProperties.java deleted file mode 100644 index 4f66bb6d752..00000000000 --- a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/properties/ActorProfileProperties.java +++ /dev/null @@ -1,156 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.securitymanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * The ActorProfileProperties describes the common properties of a Personal Profile, IT Profile and Team Profile. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ActorProfileProperties extends ReferenceableProperties -{ - private String knownName = null; - private String description = null; - - - /** - * Default Constructor - */ - public ActorProfileProperties() - { - super(); - } - - - /** - * Copy/clone Constructor - the resulting object. - * - * @param template object being copied - */ - public ActorProfileProperties(ActorProfileProperties template) - { - super (template); - - if (template != null) - { - this.knownName = template.getKnownName(); - this.description = template.getDescription(); - } - } - - - /** - * Return the name that the person/automated agent/team is known as. - * - * @return string name - */ - public String getKnownName() - { - return knownName; - } - - - /** - * Set up the name that the person/automated agent/team is known as. - * - * @param knownName string name - */ - public void setKnownName(String knownName) - { - this.knownName = knownName; - } - - - /** - * Return description of the person/automated agent/team. - * - * @return text - */ - public String getDescription() - { - return description; - } - - - /** - * Set up description of the person/automated agent/team. - * - * @param description text - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "ActorProfileProperties{" + - "knownName='" + knownName + '\'' + - ", description='" + description + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ActorProfileProperties that = (ActorProfileProperties) objectToCompare; - return Objects.equals(knownName, that.knownName) && - Objects.equals(description, that.description); - } - - - /** - * Just use the GUID for the hash code as it should be unique. - * - * @return int code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), knownName, description); - } -} diff --git a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/properties/AppointmentProperties.java b/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/properties/AppointmentProperties.java deleted file mode 100644 index 6a691148988..00000000000 --- a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/properties/AppointmentProperties.java +++ /dev/null @@ -1,170 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.securitymanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Date; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * MetadataSourceRequestBody carries the parameters for marking an asset or schema as external. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class AppointmentProperties -{ - private Date effectiveFrom = null; - private Date effectiveTo = null; - private boolean isPublic = false; - - - /** - * Default constructor - */ - public AppointmentProperties() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public AppointmentProperties(AppointmentProperties template) - { - if (template != null) - { - effectiveFrom = template.getEffectiveFrom(); - effectiveTo = template.getEffectiveTo(); - isPublic = template.getIsPublic(); - } - } - - - /** - * Return the date/time that this element is effective from (null means effective from the epoch). - * - * @return date object - */ - public Date getEffectiveFrom() - { - return effectiveFrom; - } - - - /** - * Set up the date/time that this element is effective from (null means effective from the epoch). - * - * @param effectiveFrom date object - */ - public void setEffectiveFrom(Date effectiveFrom) - { - this.effectiveFrom = effectiveFrom; - } - - - /** - * Return the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @return date object - */ - public Date getEffectiveTo() - { - return effectiveTo; - } - - - /** - * Set the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @param effectiveTo date object - */ - public void setEffectiveTo(Date effectiveTo) - { - this.effectiveTo = effectiveTo; - } - - - /** - * Return if the contents of this profile be shared with colleagues. - * - * @return flag - */ - public boolean getIsPublic() - { - return isPublic; - } - - - /** - * Set up if the contents of this profile be shared with colleagues. - * - * @param isPublic flag - */ - public void setIsPublic(boolean isPublic) - { - this.isPublic = isPublic; - } - - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "AppointmentProperties{" + - "effectiveFrom=" + effectiveFrom + - ", effectiveTo=" + effectiveTo + - ", isPublic=" + isPublic + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - AppointmentProperties that = (AppointmentProperties) objectToCompare; - return isPublic == that.isPublic && - Objects.equals(effectiveFrom, that.effectiveFrom) && - Objects.equals(effectiveTo, that.effectiveTo); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), effectiveFrom, effectiveTo, isPublic); - } -} diff --git a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/properties/ClassificationProperties.java b/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/properties/ClassificationProperties.java deleted file mode 100644 index bb70686cbf7..00000000000 --- a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/properties/ClassificationProperties.java +++ /dev/null @@ -1,186 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.securitymanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Date; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * RelationshipProperties provides the base class for relationships items. This provides extended properties with the ability to - * set effectivity dates. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) - -public class ClassificationProperties -{ - private Date effectiveFrom = null; - private Date effectiveTo = null; - - private Map extendedProperties = null; - - - /** - * Default constructor - */ - public ClassificationProperties() - { - super(); - } - - - /** - * Copy/clone constructor. Retrieve values from the supplied template - * - * @param template element to copy - */ - public ClassificationProperties(ClassificationProperties template) - { - if (template != null) - { - effectiveFrom = template.getEffectiveFrom(); - effectiveTo = template.getEffectiveTo(); - extendedProperties = template.getExtendedProperties(); - } - } - - - /** - * Return the date/time that this element is effective from (null means effective from the epoch). - * - * @return date object - */ - public Date getEffectiveFrom() - { - return effectiveFrom; - } - - - /** - * Set up the date/time that this element is effective from (null means effective from the epoch). - * - * @param effectiveFrom date object - */ - public void setEffectiveFrom(Date effectiveFrom) - { - this.effectiveFrom = effectiveFrom; - } - - - /** - * Return the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @return date object - */ - public Date getEffectiveTo() - { - return effectiveTo; - } - - - /** - * Set the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @param effectiveTo date object - */ - public void setEffectiveTo(Date effectiveTo) - { - this.effectiveTo = effectiveTo; - } - - - /** - * Return the properties that have been defined for a subtype of this object that are not supported explicitly - * by this bean. - * - * @return property map - */ - public Map getExtendedProperties() - { - if (extendedProperties == null) - { - return null; - } - else if (extendedProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(extendedProperties); - } - } - - - /** - * Set up the properties that have been defined for a subtype of this object that are not supported explicitly - * by this bean. - * - * @param extendedProperties property map - */ - public void setExtendedProperties(Map extendedProperties) - { - this.extendedProperties = extendedProperties; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "RelationshipProperties{" + - "effectiveFrom=" + effectiveFrom + - ", effectiveTo=" + effectiveTo + - ", extendedProperties=" + extendedProperties + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ClassificationProperties that = (ClassificationProperties) objectToCompare; - return Objects.equals(effectiveFrom, that.effectiveFrom) && - Objects.equals(effectiveTo, that.effectiveTo); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(effectiveFrom, effectiveTo); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/properties/ContactMethodProperties.java b/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/properties/ContactMethodProperties.java deleted file mode 100644 index 33cfadff143..00000000000 --- a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/properties/ContactMethodProperties.java +++ /dev/null @@ -1,338 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.securitymanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Date; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ContactMethodProperties describes a single mechanism that can be used to contact an individual. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ContactMethodProperties -{ - private String name = null; - private String contactType = null; - - private ContactMethodType contactMethodType = null; - private String contactMethodService = null; - private String contactMethodValue = null; - - private Date effectiveFrom = null; - private Date effectiveTo = null; - - private String typeName = null; - private Map extendedProperties = null; - - - /** - * Default constructor - */ - public ContactMethodProperties() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ContactMethodProperties(ContactMethodProperties template) - { - if (template != null) - { - contactMethodType = template.getContactMethodType(); - contactMethodService = template.getContactMethodService(); - contactMethodValue = template.getContactMethodValue(); - effectiveFrom = template.getEffectiveFrom(); - effectiveTo = template.getEffectiveTo(); - typeName = template.getTypeName(); - extendedProperties = template.getExtendedProperties(); - } - } - - - /** - * Return the name to give this contact method (imagine a list of contact methods). - * - * @return string - */ - public String getName() - { - return name; - } - - - /** - * Set up the name to give this contact method (imagine a list of contact methods). - * - * @param name string - */ - public void setName(String name) - { - this.name = name; - } - - - /** - * Return the type of contact - is it related to work or personal etc. - * - * @return string type name - often controlled by a valid value set - */ - public String getContactType() - { - return contactType; - } - - - /** - * Set up the type of contact - is it related to work or personal etc. - * - * @param contactType string type name - often controlled by a valid value set - */ - public void setContactType(String contactType) - { - this.contactType = contactType; - } - - - /** - * Return the type of the contact method. - * - * @return contact method type enum - */ - public ContactMethodType getContactMethodType() - { - return contactMethodType; - } - - - /** - * Set up the type of the contact method. - * - * @param contactMethodType contact method type enum - */ - public void setContactMethodType(ContactMethodType contactMethodType) - { - this.contactMethodType = contactMethodType; - } - - - /** - * Return the URL of the service used to contact the individual. - * - * @return service URL - */ - public String getContactMethodService() - { - return contactMethodService; - } - - - /** - * Set up theURL of the service used to contact the individual. - * - * @param contactMethodService service URL - */ - public void setContactMethodService(String contactMethodService) - { - this.contactMethodService = contactMethodService; - } - - - /** - * Return the account name or similar value used to direct the message to the individual. - * - * @return value string - */ - public String getContactMethodValue() - { - return contactMethodValue; - } - - - /** - * Set up the account name or similar value used to direct the message to the individual. - * - * @param contactMethodValue value string - */ - public void setContactMethodValue(String contactMethodValue) - { - this.contactMethodValue = contactMethodValue; - } - - - - /** - * Return the date/time that this element is effective from (null means effective from the epoch). - * - * @return date object - */ - public Date getEffectiveFrom() - { - return effectiveFrom; - } - - - /** - * Set up the date/time that this element is effective from (null means effective from the epoch). - * - * @param effectiveFrom date object - */ - public void setEffectiveFrom(Date effectiveFrom) - { - this.effectiveFrom = effectiveFrom; - } - - - /** - * Return the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @return date object - */ - public Date getEffectiveTo() - { - return effectiveTo; - } - - - /** - * Set the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @param effectiveTo date object - */ - public void setEffectiveTo(Date effectiveTo) - { - this.effectiveTo = effectiveTo; - } - - - /** - * Return the name of the open metadata type for this metadata element. - * - * @return string name - */ - public String getTypeName() - { - return typeName; - } - - - /** - * Set up the name of the open metadata type for this element. - * - * @param typeName string name - */ - public void setTypeName(String typeName) - { - this.typeName = typeName; - } - - - /** - * Return the properties that have been defined for a subtype of this object that are not supported explicitly - * by this bean. - * - * @return property map - */ - public Map getExtendedProperties() - { - if (extendedProperties == null) - { - return null; - } - else if (extendedProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(extendedProperties); - } - } - - - /** - * Set up the properties that have been defined for a subtype of this object that are not supported explicitly - * by this bean. - * - * @param extendedProperties property map - */ - public void setExtendedProperties(Map extendedProperties) - { - this.extendedProperties = extendedProperties; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "ContactMethodProperties{" + - "type=" + contactMethodType + - ", service='" + contactMethodService + '\'' + - ", value='" + contactMethodValue + '\'' + - ", effectiveFrom=" + effectiveFrom + - ", effectiveTo=" + effectiveTo + - ", typeName='" + typeName + '\'' + - ", extendedProperties=" + extendedProperties + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ContactMethodProperties that = (ContactMethodProperties) objectToCompare; - return contactMethodType == that.contactMethodType && - Objects.equals(contactMethodService, that.contactMethodService) && - Objects.equals(contactMethodValue, that.contactMethodValue) && - Objects.equals(effectiveFrom, that.effectiveFrom) && - Objects.equals(effectiveTo, that.effectiveTo) && - Objects.equals(typeName, that.typeName) && - Objects.equals(extendedProperties, that.extendedProperties); - } - - - /** - * Hash code for this object - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(contactMethodType, contactMethodService, contactMethodValue, effectiveFrom, effectiveTo, typeName, extendedProperties); - } -} diff --git a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/properties/ContactMethodType.java b/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/properties/ContactMethodType.java deleted file mode 100644 index 495083c74ac..00000000000 --- a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/properties/ContactMethodType.java +++ /dev/null @@ -1,150 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.securitymanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ContactMethodType specifies the contact mechanism to use to contact an individual. - *
            - *
          • EMAIL
          • - *
          • PHONE
          • - *
          • CHAT
          • - *
          • PROFILE
          • - *
          • ACCOUNT
          • - *
          • OTHER
          • - *
          - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public enum ContactMethodType -{ - /** - * Send email. - */ - EMAIL (0, 0, "Email", "Send email."), - - /** - * Call by phone. - */ - PHONE (1, 1, "Phone", "Call by phone."), - - /** - * Send chat message. - */ - CHAT (2, 2, "Chat", "Send chat message."), - - /** - * Send comment to personal profile. - */ - PROFILE (3, 3, "Profile", "Send comment to personal profile."), - - /** - * Send comment to a social media account. - */ - ACCOUNT (4, 4, "Account", "Send comment to a social media account."), - - /** - * Another contact mechanism. - */ - OTHER (99,99, "Other", "Another contact mechanism."); - - - private static final String ENUM_TYPE_GUID = "30e7d8cd-df01-46e8-9247-a24c5650910d"; - private static final String ENUM_TYPE_NAME = "ContactMethodType"; - - private final int openTypeOrdinal; - - private final int ordinal; - private final String name; - private final String description; - - - /** - * Constructor to set up the instance of this enum. - * - * @param ordinal code number - * @param openTypeOrdinal code number from the equivalent Enum Type - * @param name default name - * @param description default description - */ - ContactMethodType(int ordinal, - int openTypeOrdinal, - String name, - String description) - { - this.ordinal = ordinal; - this.openTypeOrdinal = openTypeOrdinal; - this.name = name; - this.description = description; - } - - - /** - * Return the code for this enum that comes from the Open Metadata Type that this enum represents. - * - * @return int code number - */ - public int getOpenTypeOrdinal() - { - return openTypeOrdinal; - } - - - /** - * Return the unique identifier for the open metadata enum type that this enum class represents. - * - * @return string guid - */ - public String getOpenTypeGUID() { return ENUM_TYPE_GUID; } - - - /** - * Return the unique name for the open metadata enum type that this enum class represents. - * - * @return string name - */ - public String getOpenTypeName() { return ENUM_TYPE_NAME; } - - - /** - * Return the numeric representation of the enumeration. - * - * @return int ordinal - */ - public int getOrdinal() { return ordinal; } - - - /** - * Return the default name of the enumeration. - * - * @return String name - */ - public String getName() { return name; } - - - /** - * Return the default description of the enumeration. - * - * @return String description - */ - public String getDescription() { return description; } - - - /** - * toString() JSON-style - * - * @return string description - */ - @Override - public String toString() - { - return "ContactMethodType : " + name; - } -} diff --git a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/properties/GovernanceDefinitionProperties.java b/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/properties/GovernanceDefinitionProperties.java deleted file mode 100644 index 3fdc71b1ba6..00000000000 --- a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/properties/GovernanceDefinitionProperties.java +++ /dev/null @@ -1,547 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.securitymanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * GovernanceDefinitionProperties provides the base class for many of the definitions that define the data strategy - * and governance program. It includes many of the common fields: - * - *
            - *
          • Document Id
          • - *
          • Title
          • - *
          • Summary
          • - *
          • Description
          • - *
          • Scope
          • - *
          • Domain Identifier
          • - *
          • Status
          • - *
          • Priority
          • - *
          • Implications
          • - *
          • Outcomes
          • - *
          • Results
          • - *
          • AdditionalProperties
          • - *
          - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes( - { - @JsonSubTypes.Type(value = SecurityGroupProperties.class, name = "SecurityGroupProperties"), - }) -public class GovernanceDefinitionProperties -{ - private String documentIdentifier = null; - private Map additionalProperties = null; - - private String title = null; - private String summary = null; - private String description = null; - private String scope = null; - private int domainIdentifier = 0; - private GovernanceDefinitionStatus status = null; - private String priority = null; - private List implications = null; - private List outcomes = null; - private List results = null; - - private String typeName = null; - private Map extendedProperties = null; - - - /** - * Default Constructor - */ - public GovernanceDefinitionProperties() - { - super(); - } - - - /** - * Copy/clone Constructor - * - * @param template object being copied - */ - public GovernanceDefinitionProperties(GovernanceDefinitionProperties template) - { - if (template != null) - { - this.documentIdentifier = template.getDocumentIdentifier(); - this.additionalProperties = template.getAdditionalProperties(); - this.title = template.getTitle(); - this.summary = template.getSummary(); - this.description = template.getDescription(); - this.scope = template.getScope(); - this.domainIdentifier = template.getDomainIdentifier(); - this.status = template.getStatus(); - this.priority = template.getPriority(); - this.implications = template.getImplications(); - this.outcomes = template.getOutcomes(); - this.results = template.getResults(); - this.typeName = template.getTypeName(); - this.extendedProperties = template.getExtendedProperties(); - } - } - - - /** - * Return the open metadata type name of this object - this is used to create a subtype of - * the referenceable. Any properties associated with this subtype are passed as extended properties. - * - * @return string type name - */ - public String getTypeName() - { - return typeName; - } - - - /** - * Set up the open metadata type name of this object - this is used to create a subtype of - * the referenceable. Any properties associated with this subtype are passed as extended properties. - * - * @param typeName string type name - */ - public void setTypeName(String typeName) - { - this.typeName = typeName; - } - - - /** - * Returns the stored qualified name property for the metadata entity. - * If no qualified name is available then the empty string is returned. - * - * @return documentIdentifier - */ - public String getDocumentIdentifier() - { - return documentIdentifier; - } - - - /** - * Set up the fully qualified name. - * - * @param documentIdentifier String name - */ - public void setDocumentIdentifier(String documentIdentifier) - { - this.documentIdentifier = documentIdentifier; - } - - - /** - * Return a copy of the additional properties. Null means no additional properties are available. - * - * @return AdditionalProperties - */ - public Map getAdditionalProperties() - { - if (additionalProperties == null) - { - return null; - } - else if (additionalProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(additionalProperties); - } - } - - - /** - * Set up additional properties. - * - * @param additionalProperties Additional properties object - */ - public void setAdditionalProperties(Map additionalProperties) - { - this.additionalProperties = additionalProperties; - } - - - /** - * Return the properties that are defined for a subtype of referenceable but are not explicitly - * supported by the bean. - * - * @return map of properties - */ - public Map getExtendedProperties() - { - if (extendedProperties == null) - { - return null; - } - else if (extendedProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(extendedProperties); - } - } - - - /** - * Set up the properties that are defined for a subtype of referenceable but are not explicitly - * supported by the bean. - * - * @param extendedProperties map of properties - */ - public void setExtendedProperties(Map extendedProperties) - { - this.extendedProperties = extendedProperties; - } - - - - /** - * Return the title associated with this governance definition. - * - * @return String title - */ - public String getTitle() - { - return title; - } - - - /** - * Set up the title associated with this governance definition. - * - * @param title String title - */ - public void setTitle(String title) - { - this.title = title; - } - - - - /** - * Return the summary for this governance definition. This should cover its essence. Think of it as - * the executive summary. - * - * @return String short description - */ - public String getSummary() - { - return summary; - } - - - /** - * Set up the summary of the governance definition. This should cover its essence. Think of it as - * the executive summary. - * - * @param summary String description - */ - public void setSummary(String summary) - { - this.summary = summary; - } - - - /** - * Return the full description of the governance definition. - * - * @return String description - */ - public String getDescription() - { - return description; - } - - - /** - * Set up the full description of the governance definition. - * - * @param description String description - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * Return the organizational scope that this governance definition applies to. - * - * @return String organization, department or team name - */ - public String getScope() - { - return scope; - } - - - /** - * Set up the organizational scope that this governance definition applies to. - * - * @param scope String organization, department or team name - */ - public void setScope(String scope) - { - this.scope = scope; - } - - - /** - * Return the identifier of the governance domain that this definition belongs to (0=all). - * - * @return int - */ - public int getDomainIdentifier() - { - return domainIdentifier; - } - - - /** - * Set up the identifier of the governance domain that this definition belongs to (0=all). - * - * @param domainIdentifier int - */ - public void setDomainIdentifier(int domainIdentifier) - { - this.domainIdentifier = domainIdentifier; - } - - - /** - * Return the status of this governance definition. The meaning of the different values are defined in the - * GovernanceDefinitionStatus enumeration. - * - * @return GovernanceDefinitionStatus enumeration - */ - public GovernanceDefinitionStatus getStatus() - { - return status; - } - - - /** - * Set up the status of this governance definition. The meaning of the different values are defined in the - * GovernanceDefinitionStatus enumeration. - * - * @param status GovernanceDefinitionStatus enumeration - */ - public void setStatus(GovernanceDefinitionStatus status) - { - this.status = status; - } - - - /** - * Return the priority of the governance definition. This may be something like high, medium or low, - * or maybe a time frame or more detailed explanation. - * - * @return String priority - */ - public String getPriority() - { - return priority; - } - - - /** - * Set up the priority of this governance definition. This may be something like high, medium or low, - * or maybe a time frame or more detailed explanation. - * - * @param priority String priority - */ - public void setPriority(String priority) - { - this.priority = priority; - } - - - /** - * Return the list of implications for the organization that this governance definition brings. - * This is often the first enumeration of the changes that that need to be implemented to bring - * the governance definition into effect. - * - * @return list of descriptions - */ - public List getImplications() - { - return implications; - } - - - /** - * Set up the list of implications for the organization that this governance definition brings. - * This is often the first enumeration of the changes that that need to be implemented to bring - * the governance definition into effect. - * - * @param implications list of descriptions - */ - public void setImplications(List implications) - { - this.implications = implications; - } - - - /** - * Return the list of expected outcomes from implementing this governance definition. - * - * @return list of outcome descriptions - */ - public List getOutcomes() - { - if (outcomes == null) - { - return null; - } - else if (outcomes.isEmpty()) - { - return null; - } - else - { - return outcomes; - } - } - - - /** - * Set up the list of expected outcomes from implementing this governance definition. - * - * @param outcomes list of descriptions of outcomes - */ - public void setOutcomes(List outcomes) - { - this.outcomes = outcomes; - } - - - /** - * Return the list of actual results from implementing this governance definition. - * - * @return list of result descriptions - */ - public List getResults() - { - if (outcomes == null) - { - return null; - } - else if (outcomes.isEmpty()) - { - return null; - } - else - { - return outcomes; - } - } - - - /** - * Set up the list of actual results from implementing this governance definition. - * - * @param results list of description of results - */ - public void setResults(List results) - { - this.results = results; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "GovernanceDefinitionProperties{" + - "documentIdentifier='" + documentIdentifier + '\'' + - ", additionalProperties=" + additionalProperties + - ", title='" + title + '\'' + - ", summary='" + summary + '\'' + - ", description='" + description + '\'' + - ", scope='" + scope + '\'' + - ", domainIdentifier=" + domainIdentifier + - ", status=" + status + - ", priority='" + priority + '\'' + - ", implications=" + implications + - ", outcomes=" + outcomes + - ", results=" + results + - ", typeName='" + typeName + '\'' + - ", extendedProperties=" + extendedProperties + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - GovernanceDefinitionProperties that = (GovernanceDefinitionProperties) objectToCompare; - return domainIdentifier == that.domainIdentifier && - Objects.equals(documentIdentifier, that.documentIdentifier) && - Objects.equals(additionalProperties, that.additionalProperties) && - Objects.equals(title, that.title) && - Objects.equals(summary, that.summary) && - Objects.equals(description, that.description) && - Objects.equals(scope, that.scope) && - status == that.status && - Objects.equals(priority, that.priority) && - Objects.equals(implications, that.implications) && - Objects.equals(outcomes, that.outcomes) && - Objects.equals(results, that.results) && - Objects.equals(typeName, that.typeName) && - Objects.equals(extendedProperties, that.extendedProperties); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(documentIdentifier, additionalProperties, title, summary, description, scope, domainIdentifier, status, priority, - implications, outcomes, results, typeName, extendedProperties); - } -} diff --git a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/properties/GovernanceDefinitionStatus.java b/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/properties/GovernanceDefinitionStatus.java deleted file mode 100644 index e582e8cbacc..00000000000 --- a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/properties/GovernanceDefinitionStatus.java +++ /dev/null @@ -1,108 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.securitymanager.properties; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * GovernanceDefinitionStatus indicates whether the definition is complete and operational or in a state that means - * it is either under development or obsolete. - *
            - *
          • DRAFT - The governance definition is still in development.
          • - *
          • PROPOSED - The governance definition is in review and not yet active.
          • - *
          • ACTIVE - The governance definition is approved and in use.
          • - *
          • DEPRECATED - The governance definition has been superseded.
          • - *
          • OTHER - The governance definition in a locally defined state.
          • - *
          - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public enum GovernanceDefinitionStatus -{ - /** - * Draft - The governance definition is still in development. - */ - DRAFT (0, "Draft", "The governance definition is still in development."), - - /** - * Proposed - The governance definition is in review and not yet active. - */ - PROPOSED (1, "Proposed", "The governance definition is in review and not yet active."), - - /** - * Active - The governance definition is approved and in use. - */ - ACTIVE (2, "Active", "The governance definition is approved and in use."), - - /** - * Deprecated - The governance definition has been superseded. - */ - DEPRECATED (3, "Deprecated", "The governance definition has been superseded."), - - /** - * Other - The governance definition in a locally defined state. - */ - OTHER (99, "Other", "The governance definition in a locally defined state."); - - private final int ordinal; - private final String name; - private final String description; - - - /** - * Default constructor for the enumeration. - * - * @param ordinal numerical representation of the enumeration - * @param name default string name of the instance provenance type - * @param description default string description of the instance provenance type - */ - GovernanceDefinitionStatus(int ordinal, String name, String description) - { - this.ordinal = ordinal; - this.name = name; - this.description = description; - } - - - /** - * Return the numeric representation of the instance provenance type. - * - * @return int ordinal - */ - public int getOrdinal() { return ordinal; } - - - /** - * Return the default name of the instance provenance type. - * - * @return String name - */ - public String getName() { return name; } - - - /** - * Return the default description of the instance provenance type. - * - * @return String description - */ - public String getDescription() { return description; } - - - /** - * toString() JSON-style - * - * @return string description - */ - @Override - public String toString() - { - return "GovernanceDefinitionStatus : " + name; - } -} diff --git a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/properties/PersonRoleProperties.java b/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/properties/PersonRoleProperties.java deleted file mode 100644 index f45ada25656..00000000000 --- a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/properties/PersonRoleProperties.java +++ /dev/null @@ -1,162 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.securitymanager.properties; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * PersonRoleProperties covers a role that has been defined in an organization. One of more people - * can be assigned to a role. The optional headCount determines the maximum number of people that should be - * appointed (open metadata does not enforce this level but sends a notification if the headCount - * level is breached.) It also returns how many people are currently appointed to the role. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class PersonRoleProperties extends PersonalRoleProperties -{ - private boolean headCountLimitSet = false; - private int headCount = 0; - - - /** - * Default constructor - */ - public PersonRoleProperties() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public PersonRoleProperties(PersonRoleProperties template) - { - super(template); - - if (template != null) - { - - } - } - - - /** - * Return the indicator whether the head count limit is set for a person role. - * - * @return boolean flag - */ - public boolean getHeadCountLimitSet() - { - return headCountLimitSet; - } - - - /** - * Set up the indicator whether the head count limit is set for a person role. - * - * @param headCountLimitSet boolean flag - */ - public void setHeadCountLimitSet(boolean headCountLimitSet) - { - this.headCountLimitSet = headCountLimitSet; - } - - - /** - * Return the head count limit (or zero if not set). - * - * @return int - */ - public int getHeadCount() - { - return headCount; - } - - - /** - * Set up the head count limit (or zero if not set). - * - * @param headCount int - */ - public void setHeadCount(int headCount) - { - this.headCount = headCount; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "PersonRoleProperties{" + - "headCountLimitSet=" + headCountLimitSet + - ", headCount=" + headCount + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", roleId='" + getRoleId() + '\'' + - ", scope='" + getScope() + '\'' + - ", title='" + getTitle() + '\'' + - ", description='" + getDescription() + '\'' + - ", domainIdentifier=" + getDomainIdentifier() + - ", additionalProperties=" + getAdditionalProperties() + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - PersonRoleProperties that = (PersonRoleProperties) objectToCompare; - return getHeadCountLimitSet() == that.getHeadCountLimitSet() && - getHeadCount() == that.getHeadCount(); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), getHeadCountLimitSet(), getHeadCount()); - } -} diff --git a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/properties/PersonalRoleProperties.java b/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/properties/PersonalRoleProperties.java deleted file mode 100644 index 91ed48085fc..00000000000 --- a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/properties/PersonalRoleProperties.java +++ /dev/null @@ -1,414 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.securitymanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Date; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * PersonalRoleProperties provides a structure for describe a role assigned to a person. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class PersonalRoleProperties -{ - private String qualifiedName = null; /* qualifiedName */ - private String roleId = null; /* identifier */ - private String scope = null; /* scope */ - private String title = null; /* name */ - private String description = null; /* description */ - - private int domainIdentifier = 0; /* Zero means not specific to a governance domain */ - - private Map additionalProperties = null; - - private Date effectiveFrom = null; - private Date effectiveTo = null; - - private String typeName = null; - private Map extendedProperties = null; - - - /** - * Default constructor - */ - public PersonalRoleProperties() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public PersonalRoleProperties(PersonalRoleProperties template) - { - if (template != null) - { - this.qualifiedName = template.getQualifiedName(); - this.roleId = template.getRoleId(); - this.scope = template.getScope(); - this.title = template.getTitle(); - this.description = template.getDescription(); - this.domainIdentifier = template.getDomainIdentifier(); - this.additionalProperties = template.getAdditionalProperties(); - this.effectiveFrom = template.getEffectiveFrom(); - this.effectiveTo = template.getEffectiveTo(); - this.typeName = template.getTypeName(); - this.extendedProperties = template.getExtendedProperties(); - } - } - - - /** - * Return the unique name for element in open metadata ecosystem. - * - * @return unique name - */ - public String getQualifiedName() - { - return qualifiedName; - } - - - /** - * Set up the unique name for element in open metadata ecosystem. - * - * @param qualifiedName unique name - */ - public void setQualifiedName(String qualifiedName) - { - this.qualifiedName = qualifiedName; - } - - - /** - * Return the unique identifier for this job role/appointment typically from an HR system. - * - * @return unique identifier - */ - public String getRoleId() - { - return roleId; - } - - - /** - * Set up the unique identifier for this job role/appointment. - * - * @param roleId unique identifier - */ - public void setRoleId(String roleId) - { - this.roleId = roleId; - } - - - - /** - * Return the context in which the person is appointed. This may be an organizational scope, - * location, or scope of assets. - * - * @return string description - */ - public String getScope() - { - return scope; - } - - - /** - * Set up the context in which the person is appointed. This may be an organizational scope, - * location, or scope of assets. - * - * @param scope string description - */ - public void setScope(String scope) - { - this.scope = scope; - } - - - /** - * Return the job role title. - * - * @return string name - */ - public String getTitle() - { - return title; - } - - - /** - * Set up the job role title. - * - * @param title string name - */ - public void setTitle(String title) - { - this.title = title; - } - - - /** - * Return the description of the job role. - * - * @return string description - */ - public String getDescription() - { - return description; - } - - - /** - * Set up the description of the job role. - * - * @param description string description - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * Return the identifier of the governance domain that this role belongs to. Zero means that the - * role is not specific to any domain. - * - * @return int - */ - public int getDomainIdentifier() - { - return domainIdentifier; - } - - - /** - * Set up the identifier of the governance domain that this role belongs to. Zero means that the - * role is not specific to any domain. - * - * @param domainIdentifier int - */ - public void setDomainIdentifier(int domainIdentifier) - { - this.domainIdentifier = domainIdentifier; - } - - - /** - * Return a copy of the additional properties. Null means no additional properties are available. - * - * @return AdditionalProperties map - */ - public Map getAdditionalProperties() - { - if (additionalProperties == null) - { - return null; - } - else if (additionalProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(additionalProperties); - } - } - - - /** - * Set up additional properties. - * - * @param additionalProperties Additional properties map - */ - public void setAdditionalProperties(Map additionalProperties) - { - this.additionalProperties = additionalProperties; - } - - - /** - * Return the date/time that this element is effective from (null means effective from the epoch). - * - * @return date object - */ - public Date getEffectiveFrom() - { - return effectiveFrom; - } - - - /** - * Set up the date/time that this element is effective from (null means effective from the epoch). - * - * @param effectiveFrom date object - */ - public void setEffectiveFrom(Date effectiveFrom) - { - this.effectiveFrom = effectiveFrom; - } - - - /** - * Return the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @return date object - */ - public Date getEffectiveTo() - { - return effectiveTo; - } - - - /** - * Set the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @param effectiveTo date object - */ - public void setEffectiveTo(Date effectiveTo) - { - this.effectiveTo = effectiveTo; - } - - - /** - * Return the open metadata type name of this object - this is used to create a subtype of - * the referenceable. Any properties associated with this subtype are passed as extended properties. - * - * @return string type name - */ - public String getTypeName() - { - return typeName; - } - - - /** - * Set up the open metadata type name of this object - this is used to create a subtype of - * the referenceable. Any properties associated with this subtype are passed as extended properties. - * - * @param typeName string type name - */ - public void setTypeName(String typeName) - { - this.typeName = typeName; - } - - - /** - * Return the properties that are defined for a subtype of referenceable but are not explicitly - * supported by the bean. - * - * @return map of properties - */ - public Map getExtendedProperties() - { - if (extendedProperties == null) - { - return null; - } - else if (extendedProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(extendedProperties); - } - } - - - /** - * Set up the properties that are defined for a subtype of referenceable but are not explicitly - * supported by the bean. - * - * @param extendedProperties map of properties - */ - public void setExtendedProperties(Map extendedProperties) - { - this.extendedProperties = extendedProperties; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "PersonalRoleProperties{" + - "qualifiedName='" + qualifiedName + '\'' + - ", roleId='" + roleId + '\'' + - ", scope='" + scope + '\'' + - ", title='" + title + '\'' + - ", description='" + description + '\'' + - ", domainIdentifier=" + domainIdentifier + - ", additionalProperties=" + additionalProperties + - ", effectiveFrom=" + effectiveFrom + - ", effectiveTo=" + effectiveTo + - ", typeName='" + typeName + '\'' + - ", extendedProperties=" + extendedProperties + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - PersonalRoleProperties that = (PersonalRoleProperties) objectToCompare; - return domainIdentifier == that.domainIdentifier && - Objects.equals(qualifiedName, that.qualifiedName) && - Objects.equals(roleId, that.roleId) && - Objects.equals(scope, that.scope) && - Objects.equals(title, that.title) && - Objects.equals(description, that.description) && - Objects.equals(additionalProperties, that.additionalProperties) && - Objects.equals(effectiveFrom, that.effectiveFrom) && - Objects.equals(effectiveTo, that.effectiveTo) && - Objects.equals(typeName, that.typeName) && - Objects.equals(extendedProperties, that.extendedProperties); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(qualifiedName, roleId, scope, title, description, domainIdentifier, additionalProperties, effectiveFrom, effectiveTo, typeName, extendedProperties); - } -} diff --git a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/properties/ProfileIdentityProperties.java b/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/properties/ProfileIdentityProperties.java deleted file mode 100644 index 246460f0075..00000000000 --- a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/properties/ProfileIdentityProperties.java +++ /dev/null @@ -1,169 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.securitymanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ProfileIdentityElement contains the properties and header for a relationship between a profile and a user identity retrieved - * from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ProfileIdentityProperties -{ - private String roleTypeName = null; - private String roleGUID = null; - private String description = null; - - - /** - * Default constructor - */ - public ProfileIdentityProperties() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ProfileIdentityProperties(ProfileIdentityProperties template) - { - if (template != null) - { - roleTypeName = template.getRoleTypeName(); - roleGUID = template.getRoleGUID(); - description = template.getDescription(); - } - } - - - /** - * Return the type of the role. - * - * @return name - */ - public String getRoleTypeName() - { - return roleTypeName; - } - - - /** - * Set up the type of the role. - * - * @param roleTypeName name - */ - public void setRoleTypeName(String roleTypeName) - { - this.roleTypeName = roleTypeName; - } - - - /** - * Return the instance of the role. - * - * @return guid - */ - public String getRoleGUID() - { - return roleGUID; - } - - - /** - * Set up the instance of the role. - * - * @param roleGUID guid - */ - public void setRoleGUID(String roleGUID) - { - this.roleGUID = roleGUID; - } - - - /** - * Return the description of the user identity with respect to the individual. - * - * @return value string - */ - public String getDescription() - { - return description; - } - - - /** - * Set up the description of the user identity with respect to the individual. - * - * @param description value string - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "ProfileIdentityProperties{" + - "roleTypeName='" + roleTypeName + '\'' + - ", roleGUID='" + roleGUID + '\'' + - ", description='" + description + '\'' + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ProfileIdentityProperties that = (ProfileIdentityProperties) objectToCompare; - return Objects.equals(roleTypeName, that.roleTypeName) && - Objects.equals(roleGUID, that.roleGUID) && - Objects.equals(description, that.description); - } - - - /** - * Hash code for this object - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(roleTypeName, roleGUID, description); - } -} diff --git a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/properties/ProfileLocationProperties.java b/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/properties/ProfileLocationProperties.java deleted file mode 100644 index a331bf160d1..00000000000 --- a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/properties/ProfileLocationProperties.java +++ /dev/null @@ -1,117 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.securitymanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ProfileLocationProperties describes the properties for the ProfileLocation relationship between a profile - * and a location. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ProfileLocationProperties -{ - private String associationType = null; - - - /** - * Default constructor - */ - public ProfileLocationProperties() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ProfileLocationProperties(ProfileLocationProperties template) - { - if (template != null) - { - associationType = template.getAssociationType(); - } - } - - - /** - * Return the type of the association. - * - * @return string - */ - public String getAssociationType() - { - return associationType; - } - - - /** - * Set up the type of the association. - * - * @param associationType string - */ - public void setAssociationType(String associationType) - { - this.associationType = associationType; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "ProfileLocationProperties{" + - "associationType='" + associationType + '\'' + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ProfileLocationProperties that = (ProfileLocationProperties) objectToCompare; - return Objects.equals(associationType, that.associationType); - } - - - /** - * Hash code for this object - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(associationType); - } -} diff --git a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/properties/ReferenceableProperties.java b/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/properties/ReferenceableProperties.java deleted file mode 100644 index 09142b684cf..00000000000 --- a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/properties/ReferenceableProperties.java +++ /dev/null @@ -1,327 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.securitymanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; - -import java.util.Date; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * Many open metadata entities are referenceable. It means that they have a qualified name and additional - * properties. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes( - { - @JsonSubTypes.Type(value = ActorProfileProperties.class, name = "ActorProfileProperties"), - @JsonSubTypes.Type(value = UserIdentityProperties.class, name = "UserIdentityProperties"), - }) -public class ReferenceableProperties -{ - private String qualifiedName = null; - private Map additionalProperties = null; - - private Date effectiveFrom = null; - private Date effectiveTo = null; - - private Map vendorProperties = null; - - private String typeName = null; - private Map extendedProperties = null; - - /** - * Default constructor - */ - public ReferenceableProperties() - { - super(); - } - - - /** - * Copy/clone constructor. Retrieves values from the supplied template - * - * @param template element to copy - */ - public ReferenceableProperties(ReferenceableProperties template) - { - if (template != null) - { - qualifiedName = template.getQualifiedName(); - additionalProperties = template.getAdditionalProperties(); - - effectiveFrom = template.getEffectiveFrom(); - effectiveTo = template.getEffectiveTo(); - - vendorProperties = template.getVendorProperties(); - - typeName = template.getTypeName(); - extendedProperties = template.getExtendedProperties(); - } - } - - - /** - * Set up the fully qualified name. - * - * @param qualifiedName String name - */ - public void setQualifiedName(String qualifiedName) - { - this.qualifiedName = qualifiedName; - } - - - /** - * Returns the stored qualified name property for the metadata entity. - * If no qualified name is available then the empty string is returned. - * - * @return qualifiedName - */ - public String getQualifiedName() - { - return qualifiedName; - } - - - /** - * Set up additional properties. - * - * @param additionalProperties Additional properties object - */ - public void setAdditionalProperties(Map additionalProperties) - { - this.additionalProperties = additionalProperties; - } - - - /** - * Return a copy of the additional properties. Null means no additional properties are available. - * - * @return AdditionalProperties - */ - public Map getAdditionalProperties() - { - if (additionalProperties == null) - { - return null; - } - else if (additionalProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(additionalProperties); - } - } - - - /** - * Return the date/time that this element is effective from (null means effective from the epoch). - * - * @return date object - */ - public Date getEffectiveFrom() - { - return effectiveFrom; - } - - - /** - * Set up the date/time that this element is effective from (null means effective from the epoch). - * - * @param effectiveFrom date object - */ - public void setEffectiveFrom(Date effectiveFrom) - { - this.effectiveFrom = effectiveFrom; - } - - - /** - * Return the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @return date object - */ - public Date getEffectiveTo() - { - return effectiveTo; - } - - - /** - * Set the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @param effectiveTo date object - */ - public void setEffectiveTo(Date effectiveTo) - { - this.effectiveTo = effectiveTo; - } - - - /** - * Return specific properties for the data manager vendor. - * - * @return name value pairs - */ - public Map getVendorProperties() - { - if (vendorProperties == null) - { - return null; - } - else if (vendorProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(vendorProperties); - } - } - - - /** - * Set up specific properties for the data manager vendor. - * - * @param vendorProperties name value pairs - */ - public void setVendorProperties(Map vendorProperties) - { - this.vendorProperties = vendorProperties; - } - - - /** - * Return the name of the open metadata type for this metadata element. - * - * @return string name - */ - public String getTypeName() - { - return typeName; - } - - - /** - * Set up the name of the open metadata type for this element. - * - * @param typeName string name - */ - public void setTypeName(String typeName) - { - this.typeName = typeName; - } - - - /** - * Return the properties that have been defined for a subtype of this object that are not supported explicitly - * by this bean. - * - * @return property map - */ - public Map getExtendedProperties() - { - if (extendedProperties == null) - { - return null; - } - else if (extendedProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(extendedProperties); - } - } - - - /** - * Set up the properties that have been defined for a subtype of this object that are not supported explicitly - * by this bean. - * - * @param extendedProperties property map - */ - public void setExtendedProperties(Map extendedProperties) - { - this.extendedProperties = extendedProperties; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "ReferenceableProperties{" + - "qualifiedName='" + qualifiedName + '\'' + - ", additionalProperties=" + additionalProperties + - ", effectiveFrom=" + effectiveFrom + - ", effectiveTo=" + effectiveTo + - ", vendorProperties=" + vendorProperties + - ", typeName='" + typeName + '\'' + - ", extendedProperties=" + extendedProperties + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ReferenceableProperties that = (ReferenceableProperties) objectToCompare; - return Objects.equals(qualifiedName, that.qualifiedName) && - Objects.equals(additionalProperties, that.additionalProperties) && - Objects.equals(effectiveFrom, that.effectiveFrom) && - Objects.equals(effectiveTo, that.effectiveTo) && - Objects.equals(vendorProperties, that.vendorProperties) && - Objects.equals(typeName, that.typeName) && - Objects.equals(extendedProperties, that.extendedProperties); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(qualifiedName, additionalProperties, effectiveFrom, effectiveTo, vendorProperties, typeName, extendedProperties); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/properties/RelationshipProperties.java b/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/properties/RelationshipProperties.java deleted file mode 100644 index 9425f29ef0d..00000000000 --- a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/properties/RelationshipProperties.java +++ /dev/null @@ -1,185 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.securitymanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Date; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * RelationshipProperties provides the base class for relationships items. This provides extended properties with the ability to - * set effectivity dates. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class RelationshipProperties -{ - private Date effectiveFrom = null; - private Date effectiveTo = null; - - private Map extendedProperties = null; - - - /** - * Default constructor - */ - public RelationshipProperties() - { - super(); - } - - - /** - * Copy/clone constructor. Retrieve values from the supplied template - * - * @param template element to copy - */ - public RelationshipProperties(RelationshipProperties template) - { - if (template != null) - { - effectiveFrom = template.getEffectiveFrom(); - effectiveTo = template.getEffectiveTo(); - extendedProperties = template.getExtendedProperties(); - } - } - - - /** - * Return the date/time that this element is effective from (null means effective from the epoch). - * - * @return date object - */ - public Date getEffectiveFrom() - { - return effectiveFrom; - } - - - /** - * Set up the date/time that this element is effective from (null means effective from the epoch). - * - * @param effectiveFrom date object - */ - public void setEffectiveFrom(Date effectiveFrom) - { - this.effectiveFrom = effectiveFrom; - } - - - /** - * Return the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @return date object - */ - public Date getEffectiveTo() - { - return effectiveTo; - } - - - /** - * Set the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @param effectiveTo date object - */ - public void setEffectiveTo(Date effectiveTo) - { - this.effectiveTo = effectiveTo; - } - - - /** - * Return the properties that have been defined for a subtype of this object that are not supported explicitly - * by this bean. - * - * @return property map - */ - public Map getExtendedProperties() - { - if (extendedProperties == null) - { - return null; - } - else if (extendedProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(extendedProperties); - } - } - - - /** - * Set up the properties that have been defined for a subtype of this object that are not supported explicitly - * by this bean. - * - * @param extendedProperties property map - */ - public void setExtendedProperties(Map extendedProperties) - { - this.extendedProperties = extendedProperties; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "RelationshipProperties{" + - "effectiveFrom=" + effectiveFrom + - ", effectiveTo=" + effectiveTo + - ", extendedProperties=" + extendedProperties + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - RelationshipProperties that = (RelationshipProperties) objectToCompare; - return Objects.equals(effectiveFrom, that.effectiveFrom) && - Objects.equals(effectiveTo, that.effectiveTo); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(effectiveFrom, effectiveTo); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/properties/SecurityGroupProperties.java b/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/properties/SecurityGroupProperties.java deleted file mode 100644 index 6111a5efe3e..00000000000 --- a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/properties/SecurityGroupProperties.java +++ /dev/null @@ -1,136 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.securitymanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * SecurityGroupProperties defines a security group technical control. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class SecurityGroupProperties extends GovernanceDefinitionProperties -{ - private String distinguishedName = null; - - - /** - * Default Constructor - */ - public SecurityGroupProperties() - { - } - - - /** - * Copy/Clone Constructor - * - * @param template object to copy - */ - public SecurityGroupProperties(SecurityGroupProperties template) - { - super(template); - - if (template != null) - { - this.distinguishedName = template.getDistinguishedName(); - } - } - - - /** - * Return the specific distinguishedName of the license. - * - * @return string description - */ - public String getDistinguishedName() - { - return distinguishedName; - } - - - /** - * Set up the specific distinguishedName of the license. - * - * @param distinguishedName string description - */ - public void setDistinguishedName(String distinguishedName) - { - this.distinguishedName = distinguishedName; - } - - - /** - * JSON-style toString - * - * @return string containing the properties and their values - */ - @Override - public String toString() - { - return "SecurityGroupProperties{" + - "distinguishedName='" + distinguishedName + '\'' + - ", typeName='" + getTypeName() + '\'' + - ", documentIdentifier='" + getDocumentIdentifier() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", extendedProperties=" + getExtendedProperties() + - ", title='" + getTitle() + '\'' + - ", summary='" + getSummary() + '\'' + - ", description='" + getDescription() + '\'' + - ", scope='" + getScope() + '\'' + - ", domainIdentifier=" + getDomainIdentifier() + - ", status=" + getStatus() + - ", priority='" + getPriority() + '\'' + - ", implications=" + getImplications() + - ", outcomes=" + getOutcomes() + - ", results=" + getResults() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - SecurityGroupProperties that = (SecurityGroupProperties) objectToCompare; - return Objects.equals(distinguishedName, that.distinguishedName); - } - - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), distinguishedName); - } -} diff --git a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/properties/UserIdentityProperties.java b/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/properties/UserIdentityProperties.java deleted file mode 100644 index c02698ae159..00000000000 --- a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/properties/UserIdentityProperties.java +++ /dev/null @@ -1,155 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.securitymanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * UserIdentityProperties describes an element that is linked to a single userId. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class UserIdentityProperties extends ReferenceableProperties -{ - private String userId = null; - private String distinguishedName = null; - - - /** - * Default constructor - */ - public UserIdentityProperties() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public UserIdentityProperties(UserIdentityProperties template) - { - super(template); - - if (template != null) - { - this.userId = template.getUserId(); - this.distinguishedName = template.getDistinguishedName(); - } - } - - - /** - * Return the identifier of the user's account - * - * @return string - */ - public String getUserId() - { - return userId; - } - - - /** - * Return the identifier of the user's account. - * - * @param userId string - */ - public void setUserId(String userId) - { - this.userId = userId; - } - - - /** - * Return the unique name in LDAP. - * - * @return string name - */ - public String getDistinguishedName() - { - return distinguishedName; - } - - - /** - * Set up the unique name in LDAP. - * - * @param distinguishedName string name - */ - public void setDistinguishedName(String distinguishedName) - { - this.distinguishedName = distinguishedName; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "UserIdentityProperties{" + - "qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - ", userId='" + userId + '\'' + - ", distinguishedName='" + distinguishedName + '\'' + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - UserIdentityProperties that = (UserIdentityProperties) objectToCompare; - return Objects.equals(userId, that.userId) && - Objects.equals(distinguishedName, that.distinguishedName); - } - - - /** - * Just use the GUID for the hash code as it should be unique. - * - * @return int code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), userId, distinguishedName); - } -} diff --git a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/rest/ActorProfileListResponse.java b/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/rest/ActorProfileListResponse.java deleted file mode 100644 index f47a89c1cc1..00000000000 --- a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/rest/ActorProfileListResponse.java +++ /dev/null @@ -1,148 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.securitymanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.securitymanager.metadataelements.ActorProfileElement; - -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * ActorProfileListResponse is the response structure used on the OMAS REST API calls that return a - * a list of profile elements. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ActorProfileListResponse extends SecurityManagerOMASAPIResponse -{ - private List elements = null; - - - /** - * Default constructor - */ - public ActorProfileListResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ActorProfileListResponse(ActorProfileListResponse template) - { - super(template); - - if (template != null) - { - this.elements = template.getElements(); - } - } - - - /** - * Return the profile result. - * - * @return unique identifier - */ - public List getElements() - { - if (elements == null) - { - return null; - } - else if (elements.isEmpty()) - { - return null; - } - else - { - return elements; - } - } - - - /** - * Set up the profile result. - * - * @param elements - unique identifier - */ - public void setElements(List elements) - { - this.elements = elements; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ActorProfileListResponse{" + - "elements=" + elements + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof ActorProfileListResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ActorProfileListResponse that = (ActorProfileListResponse) objectToCompare; - return Objects.equals(getElements(), that.getElements()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elements); - } -} diff --git a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/rest/ActorProfileResponse.java b/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/rest/ActorProfileResponse.java deleted file mode 100644 index 28d2e9e208c..00000000000 --- a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/rest/ActorProfileResponse.java +++ /dev/null @@ -1,136 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.securitymanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.securitymanager.metadataelements.ActorProfileElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * ActorProfileResponse is the response structure used on the OMAS REST API calls that return a - * ActorProfileElement object as a response. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ActorProfileResponse extends SecurityManagerOMASAPIResponse -{ - private ActorProfileElement element = null; - - - /** - * Default constructor - */ - public ActorProfileResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ActorProfileResponse(ActorProfileResponse template) - { - super(template); - - if (template != null) - { - this.element = template.getElement(); - } - } - - - /** - * Return the element result. - * - * @return details of profile - */ - public ActorProfileElement getElement() - { - return element; - } - - - /** - * Set up the element result. - * - * @param element details of profile - */ - public void setElement(ActorProfileElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ActorProfileResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof ActorProfileResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ActorProfileResponse that = (ActorProfileResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/rest/ClassificationRequestBody.java b/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/rest/ClassificationRequestBody.java deleted file mode 100644 index 41ec914c429..00000000000 --- a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/rest/ClassificationRequestBody.java +++ /dev/null @@ -1,127 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.securitymanager.rest; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.securitymanager.properties.ClassificationProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * ClassificationRequestBody describes the request body used when attaching classification to elements. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ClassificationRequestBody extends ExternalSourceRequestBody -{ - private ClassificationProperties properties = null; - - - /** - * Default constructor - */ - public ClassificationRequestBody() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public ClassificationRequestBody(ClassificationRequestBody template) - { - super(template); - - if (template != null) - { - properties = template.getProperties(); - } - } - - - /** - * Return the properties for the classification. - * - * @return properties object - */ - public ClassificationProperties getProperties() - { - return properties; - } - - - /** - * Set up the properties for the classification. - * - * @param properties properties object - */ - public void setProperties(ClassificationProperties properties) - { - this.properties = properties; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ClassificationRequestBody{" + - "externalSourceGUID='" + getExternalSourceGUID() + '\'' + - ", externalSourceName='" + getExternalSourceName() + '\'' + - ", properties=" + properties + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ClassificationRequestBody that = (ClassificationRequestBody) objectToCompare; - return Objects.equals(getProperties(), that.getProperties()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), properties); - } -} diff --git a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/rest/EffectiveTimeRequestBody.java b/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/rest/EffectiveTimeRequestBody.java deleted file mode 100644 index eb5fd3aec91..00000000000 --- a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/rest/EffectiveTimeRequestBody.java +++ /dev/null @@ -1,118 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.securitymanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Date; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * EffectiveTimeRequestBody carries the date/time for a query. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class EffectiveTimeRequestBody -{ - private Date effectiveTime = null; - - - /** - * Default constructor - */ - public EffectiveTimeRequestBody() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public EffectiveTimeRequestBody(EffectiveTimeRequestBody template) - { - if (template != null) - { - effectiveTime = template.getEffectiveTime(); - } - } - - - /** - * Return the date/time to use for the query. - * - * @return date object - */ - public Date getEffectiveTime() - { - return effectiveTime; - } - - - /** - * Set up the date/time to use for the query. - * - * @param effectiveTime date object - */ - public void setEffectiveTime(Date effectiveTime) - { - this.effectiveTime = effectiveTime; - } - - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "EffectiveTimeRequestBody{" + - "effectiveTime=" + effectiveTime + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - EffectiveTimeRequestBody that = (EffectiveTimeRequestBody) objectToCompare; - return Objects.equals(effectiveTime, that.effectiveTime); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(effectiveTime); - } -} diff --git a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/rest/ElementStubsResponse.java b/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/rest/ElementStubsResponse.java deleted file mode 100644 index 913652ea22d..00000000000 --- a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/rest/ElementStubsResponse.java +++ /dev/null @@ -1,149 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.securitymanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * ElementStubListResponse is the response structure used on the OMAS REST API calls that return a - * list of element identifiers as a response. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ElementStubsResponse extends SecurityManagerOMASAPIResponse -{ - private List elements = null; - - - /** - * Default constructor - */ - public ElementStubsResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ElementStubsResponse(ElementStubsResponse template) - { - super(template); - - if (template != null) - { - this.elements = template.getElements(); - } - } - - - /** - * Return the list of element identifiers. - * - * @return list of objects or null - */ - public List getElements() - { - if (elements == null) - { - return null; - } - else if (elements.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elements); - } - } - - - /** - * Set up the list of element identifiers. - * - * @param elements - list of objects or null - */ - public void setElements(List elements) - { - this.elements = elements; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ElementStubListResponse{" + - "elements=" + elements + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof ElementStubsResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ElementStubsResponse that = (ElementStubsResponse) objectToCompare; - return Objects.equals(this.getElements(), that.getElements()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(elements, super.hashCode()); - } -} diff --git a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/rest/ExternalSourceRequestBody.java b/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/rest/ExternalSourceRequestBody.java deleted file mode 100644 index ca192064c3c..00000000000 --- a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/rest/ExternalSourceRequestBody.java +++ /dev/null @@ -1,143 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.securitymanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ExternalSourceRequestBody carries the parameters for marking an asset or schema as external. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ExternalSourceRequestBody extends SecurityManagerOMASAPIRequestBody -{ - private String externalSourceGUID = null; - private String externalSourceName = null; - - - /** - * Default constructor - */ - public ExternalSourceRequestBody() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ExternalSourceRequestBody(ExternalSourceRequestBody template) - { - super(template); - - if (template != null) - { - externalSourceGUID = template.getExternalSourceGUID(); - externalSourceName = template.getExternalSourceName(); - } - } - - - /** - * Return the unique identifier of the software server capability entity that represented the external source - null for local. - * - * @return string guid - */ - public String getExternalSourceGUID() - { - return externalSourceGUID; - } - - - /** - * Set up the unique identifier of the software server capability entity that represented the external source - null for local. - * - * @param externalSourceGUID string guid - */ - public void setExternalSourceGUID(String externalSourceGUID) - { - this.externalSourceGUID = externalSourceGUID; - } - - - /** - * Return the unique name of the software server capability entity that represented the external source. - * - * @return string name - */ - public String getExternalSourceName() - { - return externalSourceName; - } - - - /** - * Set up the unique name of the software server capability entity that represented the external source. - * - * @param externalSourceName string name - */ - public void setExternalSourceName(String externalSourceName) - { - this.externalSourceName = externalSourceName; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ExternalSourceRequestBody{" + - "externalSourceGUID='" + externalSourceGUID + '\'' + - ", externalSourceName='" + externalSourceName + '\'' + - '}'; - } - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ExternalSourceRequestBody that = (ExternalSourceRequestBody) objectToCompare; - return Objects.equals(externalSourceGUID, that.externalSourceGUID) && - Objects.equals(externalSourceName, that.externalSourceName); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), externalSourceGUID, externalSourceName); - } -} diff --git a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/rest/MetadataSourceRequestBody.java b/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/rest/MetadataSourceRequestBody.java deleted file mode 100644 index 33d45d39bd8..00000000000 --- a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/rest/MetadataSourceRequestBody.java +++ /dev/null @@ -1,143 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.securitymanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * MetadataSourceRequestBody carries the parameters for marking an asset or schema as external. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class MetadataSourceRequestBody extends SecurityManagerOMASAPIRequestBody -{ - private String externalSourceGUID = null; - private String externalSourceName = null; - - - /** - * Default constructor - */ - public MetadataSourceRequestBody() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public MetadataSourceRequestBody(MetadataSourceRequestBody template) - { - super(template); - - if (template != null) - { - externalSourceGUID = template.getExternalSourceGUID(); - externalSourceName = template.getExternalSourceName(); - } - } - - - /** - * Return the unique identifier of the software server capability entity that represented the external source - null for local. - * - * @return string guid - */ - public String getExternalSourceGUID() - { - return externalSourceGUID; - } - - - /** - * Set up the unique identifier of the software server capability entity that represented the external source - null for local. - * - * @param externalSourceGUID string guid - */ - public void setExternalSourceGUID(String externalSourceGUID) - { - this.externalSourceGUID = externalSourceGUID; - } - - - /** - * Return the unique name of the software server capability entity that represented the external source. - * - * @return string name - */ - public String getExternalSourceName() - { - return externalSourceName; - } - - - /** - * Set up the unique name of the software server capability entity that represented the external source. - * - * @param externalSourceName string name - */ - public void setExternalSourceName(String externalSourceName) - { - this.externalSourceName = externalSourceName; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "MetadataSourceRequestBody{" + - "externalSourceGUID='" + externalSourceGUID + '\'' + - ", externalSourceName='" + externalSourceName + '\'' + - '}'; - } - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - MetadataSourceRequestBody that = (MetadataSourceRequestBody) objectToCompare; - return Objects.equals(externalSourceGUID, that.externalSourceGUID) && - Objects.equals(externalSourceName, that.externalSourceName); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), externalSourceGUID, externalSourceName); - } -} diff --git a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/rest/PathNameRequestBody.java b/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/rest/PathNameRequestBody.java deleted file mode 100644 index 14781134ec3..00000000000 --- a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/rest/PathNameRequestBody.java +++ /dev/null @@ -1,117 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.securitymanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * PathNameRequestBody carries the parameters for creating a new FileFolder asset. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class PathNameRequestBody extends MetadataSourceRequestBody -{ - private String fullPath = null; - - - /** - * Default constructor - */ - public PathNameRequestBody() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public PathNameRequestBody(PathNameRequestBody template) - { - super(template); - - if (template != null) - { - fullPath = template.getFullPath(); - } - } - - - /** - * Return the full path of the file - this should be unique. - * - * @return string name - */ - public String getFullPath() - { - return fullPath; - } - - - /** - * Set up the full path of the file - this should be unique. - * - * @param fullPath string name - */ - public void setFullPath(String fullPath) - { - this.fullPath = fullPath; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "PathNameRequestBody{" + - ", fullPath='" + fullPath + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - PathNameRequestBody that = (PathNameRequestBody) objectToCompare; - return Objects.equals(getFullPath(), that.getFullPath()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(getFullPath()); - } -} diff --git a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/rest/PersonRoleAppointeeListResponse.java b/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/rest/PersonRoleAppointeeListResponse.java deleted file mode 100644 index d8a65852c0d..00000000000 --- a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/rest/PersonRoleAppointeeListResponse.java +++ /dev/null @@ -1,148 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.securitymanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.securitymanager.metadataelements.PersonRoleAppointee; - -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * PersonRoleListResponse is the response structure used on the OMAS REST API calls that return a - * a list of person role elements. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class PersonRoleAppointeeListResponse extends SecurityManagerOMASAPIResponse -{ - private List elements = null; - - - /** - * Default constructor - */ - public PersonRoleAppointeeListResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public PersonRoleAppointeeListResponse(PersonRoleAppointeeListResponse template) - { - super(template); - - if (template != null) - { - this.elements = template.getElements(); - } - } - - - /** - * Return the person role result. - * - * @return unique identifier - */ - public List getElements() - { - if (elements == null) - { - return null; - } - else if (elements.isEmpty()) - { - return null; - } - else - { - return elements; - } - } - - - /** - * Set up the person role result. - * - * @param elements - unique identifier - */ - public void setElements(List elements) - { - this.elements = elements; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "PersonRoleAppointeeListResponse{" + - "elements=" + elements + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof PersonRoleAppointeeListResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - PersonRoleAppointeeListResponse that = (PersonRoleAppointeeListResponse) objectToCompare; - return Objects.equals(getElements(), that.getElements()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elements); - } -} diff --git a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/rest/PersonRoleListResponse.java b/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/rest/PersonRoleListResponse.java deleted file mode 100644 index b5b7e580c7a..00000000000 --- a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/rest/PersonRoleListResponse.java +++ /dev/null @@ -1,148 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.securitymanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.securitymanager.metadataelements.PersonRoleElement; - -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * PersonRoleListResponse is the response structure used on the OMAS REST API calls that return a - * a list of person role elements. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class PersonRoleListResponse extends SecurityManagerOMASAPIResponse -{ - private List elements = null; - - - /** - * Default constructor - */ - public PersonRoleListResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public PersonRoleListResponse(PersonRoleListResponse template) - { - super(template); - - if (template != null) - { - this.elements = template.getElements(); - } - } - - - /** - * Return the person role result. - * - * @return unique identifier - */ - public List getElements() - { - if (elements == null) - { - return null; - } - else if (elements.isEmpty()) - { - return null; - } - else - { - return elements; - } - } - - - /** - * Set up the person role result. - * - * @param elements - unique identifier - */ - public void setElements(List elements) - { - this.elements = elements; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "PersonRoleListResponse{" + - "elements=" + elements + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof PersonRoleListResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - PersonRoleListResponse that = (PersonRoleListResponse) objectToCompare; - return Objects.equals(getElements(), that.getElements()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elements); - } -} diff --git a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/rest/PersonRoleResponse.java b/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/rest/PersonRoleResponse.java deleted file mode 100644 index f45f5dc8bd0..00000000000 --- a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/rest/PersonRoleResponse.java +++ /dev/null @@ -1,136 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.securitymanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.securitymanager.metadataelements.PersonRoleElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * PersonRoleResponse is the response structure used on the OMAS REST API calls that return a - * PersonRoleElement object as a response. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class PersonRoleResponse extends SecurityManagerOMASAPIResponse -{ - private PersonRoleElement element = null; - - - /** - * Default constructor - */ - public PersonRoleResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public PersonRoleResponse(PersonRoleResponse template) - { - super(template); - - if (template != null) - { - this.element = template.getElement(); - } - } - - - /** - * Return the element result. - * - * @return details of person role - */ - public PersonRoleElement getElement() - { - return element; - } - - - /** - * Set up the element result. - * - * @param element details of person role - */ - public void setElement(PersonRoleElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "PersonRoleResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof PersonRoleResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - PersonRoleResponse that = (PersonRoleResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/rest/ReferenceableRequestBody.java b/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/rest/ReferenceableRequestBody.java deleted file mode 100644 index 62e129e4a68..00000000000 --- a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/rest/ReferenceableRequestBody.java +++ /dev/null @@ -1,127 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.securitymanager.rest; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.securitymanager.properties.ReferenceableProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * RelationshipRequestBody describes the request body used when linking elements together. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ReferenceableRequestBody extends ExternalSourceRequestBody -{ - private ReferenceableProperties properties = null; - - - /** - * Default constructor - */ - public ReferenceableRequestBody() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public ReferenceableRequestBody(ReferenceableRequestBody template) - { - super(template); - - if (template != null) - { - properties = template.getProperties(); - } - } - - - /** - * Return the properties for the relationship. - * - * @return properties object - */ - public ReferenceableProperties getProperties() - { - return properties; - } - - - /** - * Set up the properties for the relationship. - * - * @param properties properties object - */ - public void setProperties(ReferenceableProperties properties) - { - this.properties = properties; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ReferenceableRequestBody{" + - "externalSourceGUID='" + getExternalSourceGUID() + '\'' + - ", externalSourceName='" + getExternalSourceName() + '\'' + - ", properties=" + properties + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ReferenceableRequestBody that = (ReferenceableRequestBody) objectToCompare; - return Objects.equals(getProperties(), that.getProperties()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), properties); - } -} diff --git a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/rest/RelatedElementListResponse.java b/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/rest/RelatedElementListResponse.java deleted file mode 100644 index 487a563c62b..00000000000 --- a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/rest/RelatedElementListResponse.java +++ /dev/null @@ -1,146 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.securitymanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.securitymanager.metadataelements.RelatedElement; - -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * RelatedElementListResponse is a response object for passing back a list of relatedElement objects. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class RelatedElementListResponse extends SecurityManagerOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public RelatedElementListResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public RelatedElementListResponse(RelatedElementListResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return elementList; - } - } - - - /** - * Set up the list of metadata elements to return. - * - * @param elements result object - */ - public void setElementList(List elements) - { - this.elementList = elements; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "RelatedElementListResponse{" + - "element=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - RelatedElementListResponse that = (RelatedElementListResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/rest/RelationshipRequestBody.java b/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/rest/RelationshipRequestBody.java deleted file mode 100644 index d39f37f438e..00000000000 --- a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/rest/RelationshipRequestBody.java +++ /dev/null @@ -1,127 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.securitymanager.rest; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.securitymanager.properties.RelationshipProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * RelationshipRequestBody describes the request body used when linking elements together. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class RelationshipRequestBody extends ExternalSourceRequestBody -{ - private RelationshipProperties properties = null; - - - /** - * Default constructor - */ - public RelationshipRequestBody() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public RelationshipRequestBody(RelationshipRequestBody template) - { - super(template); - - if (template != null) - { - properties = template.getProperties(); - } - } - - - /** - * Return the properties for the relationship. - * - * @return properties object - */ - public RelationshipProperties getProperties() - { - return properties; - } - - - /** - * Set up the properties for the relationship. - * - * @param properties properties object - */ - public void setProperties(RelationshipProperties properties) - { - this.properties = properties; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "RelationshipRequestBody{" + - "externalSourceGUID='" + getExternalSourceGUID() + '\'' + - ", externalSourceName='" + getExternalSourceName() + '\'' + - ", properties=" + properties + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - RelationshipRequestBody that = (RelationshipRequestBody) objectToCompare; - return Objects.equals(getProperties(), that.getProperties()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), properties); - } -} diff --git a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/rest/SecurityGroupResponse.java b/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/rest/SecurityGroupResponse.java deleted file mode 100644 index b2d574de8be..00000000000 --- a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/rest/SecurityGroupResponse.java +++ /dev/null @@ -1,137 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.securitymanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.securitymanager.metadataelements.SecurityGroupElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * SecurityGroupResponse is the response structure used on the OMAS REST API calls that return the properties - * for a security group. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class SecurityGroupResponse extends SecurityManagerOMASAPIResponse -{ - private SecurityGroupElement element = null; - - - /** - * Default constructor - */ - public SecurityGroupResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public SecurityGroupResponse(SecurityGroupResponse template) - { - super(template); - - if (template != null) - { - this.element = template.getElement(); - } - } - - - /** - * Return the result. - * - * @return bean - */ - public SecurityGroupElement getElement() - { - return element; - } - - - /** - * Set up the result. - * - * @param element bean - */ - public void setElement(SecurityGroupElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "SecurityGroupResponse{" + - "datafile=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof SecurityGroupResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - SecurityGroupResponse that = (SecurityGroupResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(element); - } -} diff --git a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/rest/SecurityGroupsResponse.java b/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/rest/SecurityGroupsResponse.java deleted file mode 100644 index 15467aeedc9..00000000000 --- a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/rest/SecurityGroupsResponse.java +++ /dev/null @@ -1,147 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.securitymanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.securitymanager.metadataelements.SecurityGroupElement; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * SecurityGroupsResponse is a response object for passing back a a list of security groups - * or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class SecurityGroupsResponse extends SecurityManagerOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public SecurityGroupsResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public SecurityGroupsResponse(SecurityGroupsResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elementList); - } - } - - - /** - * Set up the metadata element to return. - * - * @param elementList result object - */ - public void setElementList(List elementList) - { - this.elementList = elementList; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "SecurityGroupsResponse{" + - "elementList=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - SecurityGroupsResponse that = (SecurityGroupsResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/rest/SecurityManagerOMASAPIRequestBody.java b/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/rest/SecurityManagerOMASAPIRequestBody.java deleted file mode 100644 index d84a88d4f2d..00000000000 --- a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/rest/SecurityManagerOMASAPIRequestBody.java +++ /dev/null @@ -1,56 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.securitymanager.rest; - -import com.fasterxml.jackson.annotation.*; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * SecurityManagerOMASAPIRequestBody provides a common header for Security Manager OMAS request bodies for its REST API. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes({ - @JsonSubTypes.Type(value = MetadataSourceRequestBody.class, name = "MetadataSourceRequestBody"), - @JsonSubTypes.Type(value = PathNameRequestBody.class, name = "PathNameRequestBody") - - }) -public abstract class SecurityManagerOMASAPIRequestBody -{ - /** - * Default constructor - */ - public SecurityManagerOMASAPIRequestBody() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public SecurityManagerOMASAPIRequestBody(SecurityManagerOMASAPIRequestBody template) - { - } - - - /** - * JSON-like toString - * - * @return string containing the class name - */ - @Override - public String toString() - { - return "SecurityManagerOMASAPIRequestBody{}"; - } -} diff --git a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/rest/SecurityManagerOMASAPIResponse.java b/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/rest/SecurityManagerOMASAPIResponse.java deleted file mode 100644 index 45792425c6f..00000000000 --- a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/rest/SecurityManagerOMASAPIResponse.java +++ /dev/null @@ -1,72 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.securitymanager.rest; - -import com.fasterxml.jackson.annotation.*; -import org.odpi.openmetadata.commonservices.ffdc.rest.FFDCResponseBase; - -import java.util.Arrays; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * SecurityManagerOMASAPIResponse provides a common header for Security Manager OMAS managed rest to its REST API. - * It manages information about exceptions. If no exception has been raised exceptionClassName is null. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes( - { - @JsonSubTypes.Type(value = SecurityGroupResponse.class, name = "SecurityGroupResponse"), - @JsonSubTypes.Type(value = SecurityGroupsResponse.class, name = "SecurityGroupsResponse"), - @JsonSubTypes.Type(value = UserIdentityResponse.class, name = "UserIdentityResponse"), - @JsonSubTypes.Type(value = UserIdentitiesResponse.class, name = "UserIdentitiesResponse"), - }) -public abstract class SecurityManagerOMASAPIResponse extends FFDCResponseBase -{ - /** - * Default constructor - */ - public SecurityManagerOMASAPIResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public SecurityManagerOMASAPIResponse(SecurityManagerOMASAPIResponse template) - { - super(template); - } - - - /** - * JSON-like toString - * - * @return string containing the property names and values - */ - @Override - public String toString() - { - return "SecurityManagerOMASAPIResponse{" + - "exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } -} diff --git a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/rest/UserIdentitiesResponse.java b/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/rest/UserIdentitiesResponse.java deleted file mode 100644 index 5acf7672409..00000000000 --- a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/rest/UserIdentitiesResponse.java +++ /dev/null @@ -1,147 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.securitymanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.securitymanager.metadataelements.UserIdentityElement; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * UserIdentitiesResponse is a response object for passing back a a list of user identities - * or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class UserIdentitiesResponse extends SecurityManagerOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public UserIdentitiesResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public UserIdentitiesResponse(UserIdentitiesResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elementList); - } - } - - - /** - * Set up the metadata element to return. - * - * @param elementList result object - */ - public void setElementList(List elementList) - { - this.elementList = elementList; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "UserIdentitiesResponse{" + - "elementList=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - UserIdentitiesResponse that = (UserIdentitiesResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/rest/UserIdentityRequestBody.java b/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/rest/UserIdentityRequestBody.java deleted file mode 100644 index e2b6b95fbc9..00000000000 --- a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/rest/UserIdentityRequestBody.java +++ /dev/null @@ -1,163 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.securitymanager.rest; - -import com.fasterxml.jackson.annotation.*; -import org.odpi.openmetadata.accessservices.securitymanager.properties.UserIdentityProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * UserIdentityRequestBody carries the parameters for creating a new user identity or updating an existing one. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class UserIdentityRequestBody extends UserIdentityProperties -{ - private String externalSourceGUID = null; - private String externalSourceName = null; - - - /** - * Default constructor - */ - public UserIdentityRequestBody() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public UserIdentityRequestBody(UserIdentityRequestBody template) - { - super(template); - - if (template != null) - { - externalSourceGUID = template.getExternalSourceGUID(); - externalSourceName = template.getExternalSourceName(); - } - } - - - /** - * Copy/clone constructor for main properties - * - * @param template object to copy - */ - public UserIdentityRequestBody(UserIdentityProperties template) - { - super(template); - } - - - /** - * Return the unique identifier of the software server capability entity that represented the external source - null for local. - * - * @return string guid - */ - public String getExternalSourceGUID() - { - return externalSourceGUID; - } - - - /** - * Set up the unique identifier of the software server capability entity that represented the external source - null for local. - * - * @param externalSourceGUID string guid - */ - public void setExternalSourceGUID(String externalSourceGUID) - { - this.externalSourceGUID = externalSourceGUID; - } - - - /** - * Return the unique name of the software server capability entity that represented the external source. - * - * @return string name - */ - public String getExternalSourceName() - { - return externalSourceName; - } - - - /** - * Set up the unique name of the software server capability entity that represented the external source. - * - * @param externalSourceName string name - */ - public void setExternalSourceName(String externalSourceName) - { - this.externalSourceName = externalSourceName; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "UserIdentityRequestBody{" + - "externalSourceGUID='" + externalSourceGUID + '\'' + - ", externalSourceName='" + externalSourceName + '\'' + - ", distinguishedName='" + getDistinguishedName() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - UserIdentityRequestBody that = (UserIdentityRequestBody) objectToCompare; - return Objects.equals(externalSourceGUID, that.externalSourceGUID) && - Objects.equals(externalSourceName, that.externalSourceName); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), externalSourceGUID, externalSourceName); - } -} diff --git a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/rest/UserIdentityResponse.java b/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/rest/UserIdentityResponse.java deleted file mode 100644 index 6a912a3a207..00000000000 --- a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/rest/UserIdentityResponse.java +++ /dev/null @@ -1,137 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.securitymanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.securitymanager.metadataelements.UserIdentityElement; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * UserIdentityResponse is the response structure used on the OMAS REST API calls that return the properties - * for a user identity. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class UserIdentityResponse extends SecurityManagerOMASAPIResponse -{ - private UserIdentityElement element = null; - - - /** - * Default constructor - */ - public UserIdentityResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public UserIdentityResponse(UserIdentityResponse template) - { - super(template); - - if (template != null) - { - this.element = template.getElement(); - } - } - - - /** - * Return the user identity result. - * - * @return bean - */ - public UserIdentityElement getElement() - { - return element; - } - - - /** - * Set up the user identity result. - * - * @param element bean - */ - public void setElement(UserIdentityElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "UserIdentityResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof UserIdentityResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - UserIdentityResponse that = (UserIdentityResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(element); - } -} diff --git a/open-metadata-implementation/access-services/security-manager/security-manager-client/build.gradle b/open-metadata-implementation/access-services/security-manager/security-manager-client/build.gradle index 36803bfb8d2..cd7277a6c7c 100644 --- a/open-metadata-implementation/access-services/security-manager/security-manager-client/build.gradle +++ b/open-metadata-implementation/access-services/security-manager/security-manager-client/build.gradle @@ -15,6 +15,7 @@ dependencies { implementation project(':open-metadata-implementation:repository-services:repository-services-apis') implementation project(':open-metadata-implementation:common-services:ffdc-services') implementation project(':open-metadata-implementation:frameworks:audit-log-framework') + implementation project(':open-metadata-implementation:frameworks:open-metadata-framework') implementation project(':open-metadata-implementation:frameworks:open-connector-framework') implementation project(':open-metadata-implementation:frameworks:governance-action-framework') implementation project(':open-metadata-implementation:frameworks:open-integration-framework') diff --git a/open-metadata-implementation/access-services/security-manager/security-manager-client/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/client/MetadataSourceClient.java b/open-metadata-implementation/access-services/security-manager/security-manager-client/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/client/MetadataSourceClient.java index 853347799bb..c443034e497 100644 --- a/open-metadata-implementation/access-services/security-manager/security-manager-client/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/client/MetadataSourceClient.java +++ b/open-metadata-implementation/access-services/security-manager/security-manager-client/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/client/MetadataSourceClient.java @@ -5,13 +5,13 @@ import org.odpi.openmetadata.accessservices.securitymanager.api.MetadataSourceInterface; import org.odpi.openmetadata.accessservices.securitymanager.client.rest.SecurityManagerRESTClient; -import org.odpi.openmetadata.accessservices.securitymanager.properties.*; -import org.odpi.openmetadata.accessservices.securitymanager.rest.SecurityManagerRequestBody; +import org.odpi.openmetadata.commonservices.ffdc.rest.SecurityManagerRequestBody; import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities.SecurityManagerProperties; /** @@ -141,8 +141,8 @@ public String createExternalSecurityManager(String userId, String externalSourceName, String typeName, SecurityManagerProperties securityManagerProperties) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException + UserNotAuthorizedException, + PropertyServerException { final String methodName = "createExternalSecurityManager"; final String propertiesParameterName = "fileSystemProperties"; diff --git a/open-metadata-implementation/access-services/security-manager/security-manager-client/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/client/SecurityManagerBaseClient.java b/open-metadata-implementation/access-services/security-manager/security-manager-client/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/client/SecurityManagerBaseClient.java index 5856219ece8..4ca20e553d6 100644 --- a/open-metadata-implementation/access-services/security-manager/security-manager-client/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/client/SecurityManagerBaseClient.java +++ b/open-metadata-implementation/access-services/security-manager/security-manager-client/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/client/SecurityManagerBaseClient.java @@ -3,23 +3,18 @@ package org.odpi.openmetadata.accessservices.securitymanager.client; import org.odpi.openmetadata.accessservices.securitymanager.client.rest.SecurityManagerRESTClient; -import org.odpi.openmetadata.accessservices.securitymanager.metadataelements.RelatedElement; -import org.odpi.openmetadata.accessservices.securitymanager.properties.ClassificationProperties; -import org.odpi.openmetadata.accessservices.securitymanager.properties.ReferenceableProperties; -import org.odpi.openmetadata.accessservices.securitymanager.properties.RelationshipProperties; import org.odpi.openmetadata.accessservices.securitymanager.properties.TemplateProperties; -import org.odpi.openmetadata.accessservices.securitymanager.rest.ClassificationRequestBody; -import org.odpi.openmetadata.accessservices.securitymanager.rest.ExternalSourceRequestBody; -import org.odpi.openmetadata.accessservices.securitymanager.rest.ReferenceableRequestBody; -import org.odpi.openmetadata.accessservices.securitymanager.rest.RelatedElementListResponse; -import org.odpi.openmetadata.accessservices.securitymanager.rest.RelationshipRequestBody; import org.odpi.openmetadata.accessservices.securitymanager.rest.TemplateRequestBody; import org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.RelatedElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ClassificationProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ReferenceableProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; import java.util.List; @@ -552,15 +547,15 @@ List getRelatedElements(String userId, invalidParameterHandler.validateUserId(userId, methodName); invalidParameterHandler.validateGUID(startingElementGUID, startingElementGUIDParameterName, methodName); - RelatedElementListResponse restResult = restClient.callRelatedElementListGetRESTCall(methodName, - urlTemplate, - serverName, - userId, - startingElementGUID, - Integer.toString(startFrom), - Integer.toString(pageSize)); + RelatedElementsResponse restResult = restClient.callRelatedElementsGetRESTCall(methodName, + urlTemplate, + serverName, + userId, + startingElementGUID, + Integer.toString(startFrom), + Integer.toString(pageSize)); - return restResult.getElementList(); + return restResult.getElements(); } diff --git a/open-metadata-implementation/access-services/security-manager/security-manager-client/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/client/SecurityManagerClient.java b/open-metadata-implementation/access-services/security-manager/security-manager-client/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/client/SecurityManagerClient.java index 09674b169b6..a032bb594cd 100644 --- a/open-metadata-implementation/access-services/security-manager/security-manager-client/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/client/SecurityManagerClient.java +++ b/open-metadata-implementation/access-services/security-manager/security-manager-client/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/client/SecurityManagerClient.java @@ -3,39 +3,17 @@ package org.odpi.openmetadata.accessservices.securitymanager.client; - import org.odpi.openmetadata.accessservices.securitymanager.api.SecurityManagerInterface; import org.odpi.openmetadata.accessservices.securitymanager.client.rest.SecurityManagerRESTClient; -import org.odpi.openmetadata.accessservices.securitymanager.metadataelements.ActorProfileElement; -import org.odpi.openmetadata.accessservices.securitymanager.metadataelements.PersonRoleAppointee; -import org.odpi.openmetadata.accessservices.securitymanager.metadataelements.PersonRoleElement; -import org.odpi.openmetadata.accessservices.securitymanager.metadataelements.SecurityGroupElement; -import org.odpi.openmetadata.accessservices.securitymanager.metadataelements.UserIdentityElement; -import org.odpi.openmetadata.accessservices.securitymanager.properties.SecurityGroupProperties; -import org.odpi.openmetadata.accessservices.securitymanager.properties.UserIdentityProperties; -import org.odpi.openmetadata.accessservices.securitymanager.rest.ActorProfileListResponse; -import org.odpi.openmetadata.accessservices.securitymanager.rest.ActorProfileResponse; -import org.odpi.openmetadata.accessservices.securitymanager.rest.EffectiveTimeRequestBody; -import org.odpi.openmetadata.accessservices.securitymanager.rest.ElementStubsResponse; -import org.odpi.openmetadata.accessservices.securitymanager.rest.MetadataSourceRequestBody; -import org.odpi.openmetadata.accessservices.securitymanager.rest.PersonRoleAppointeeListResponse; -import org.odpi.openmetadata.accessservices.securitymanager.rest.PersonRoleListResponse; -import org.odpi.openmetadata.accessservices.securitymanager.rest.PersonRoleResponse; -import org.odpi.openmetadata.accessservices.securitymanager.rest.SecurityGroupResponse; -import org.odpi.openmetadata.accessservices.securitymanager.rest.SecurityGroupsResponse; -import org.odpi.openmetadata.accessservices.securitymanager.rest.UserIdentitiesResponse; -import org.odpi.openmetadata.accessservices.securitymanager.rest.UserIdentityRequestBody; -import org.odpi.openmetadata.accessservices.securitymanager.rest.UserIdentityResponse; import org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.NullRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.UserIdentityProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.security.SecurityGroupProperties; import java.util.Date; import java.util.List; @@ -47,12 +25,12 @@ */ public class SecurityManagerClient implements SecurityManagerInterface { - private String serverName; /* Initialized in constructor */ - private String serverPlatformURLRoot; /* Initialized in constructor */ - private SecurityManagerRESTClient restClient; /* Initialized in constructor */ + private final String serverName; /* Initialized in constructor */ + private final String serverPlatformURLRoot; /* Initialized in constructor */ + private final SecurityManagerRESTClient restClient; /* Initialized in constructor */ - private InvalidParameterHandler invalidParameterHandler = new InvalidParameterHandler(); - private NullRequestBody nullRequestBody = new NullRequestBody(); + private final InvalidParameterHandler invalidParameterHandler = new InvalidParameterHandler(); + private final NullRequestBody nullRequestBody = new NullRequestBody(); private final String urlTemplatePrefix = "/servers/{0}/open-metadata/access-services/security-manager/users/{1}"; @@ -345,7 +323,7 @@ public List getSecurityGroupsForDistinguishedName(String u startFrom, queryPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -436,7 +414,7 @@ public List findSecurityGroups(String userId, startFrom, queryPageSize); - return restResult.getElementList(); + return restResult.getElements(); } @@ -510,10 +488,11 @@ public String createUserIdentity(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/user-identities"; - UserIdentityRequestBody requestBody = new UserIdentityRequestBody(newIdentity); + UserIdentityRequestBody requestBody = new UserIdentityRequestBody(); requestBody.setExternalSourceGUID(externalSourceGUID); requestBody.setExternalSourceName(externalSourceName); + requestBody.setProperties(newIdentity); GUIDResponse restResult = restClient.callGUIDPostRESTCall(methodName, urlTemplate, requestBody, serverName, userId); @@ -559,10 +538,11 @@ public void updateUserIdentity(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/user-identities/{2}?isMergeUpdate={3}"; - UserIdentityRequestBody requestBody = new UserIdentityRequestBody(properties); + UserIdentityRequestBody requestBody = new UserIdentityRequestBody(); requestBody.setExternalSourceGUID(externalSourceGUID); requestBody.setExternalSourceName(externalSourceName); + requestBody.setProperties(properties); restClient.callVoidPostRESTCall(methodName, urlTemplate, requestBody, serverName, userId, userIdentityGUID, isMergeUpdate); } @@ -596,7 +576,7 @@ public void deleteUserIdentity(String userId, final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/user-identities/{2}"; - MetadataSourceRequestBody requestBody = new MetadataSourceRequestBody(); + ExternalSourceRequestBody requestBody = new ExternalSourceRequestBody(); requestBody.setExternalSourceGUID(externalSourceGUID); requestBody.setExternalSourceName(externalSourceName); @@ -648,7 +628,7 @@ public List findUserIdentities(String userId, Integer.toString(startFrom), Integer.toString(pageSize)); - return restResult.getElementList(); + return restResult.getElements(); } @@ -697,7 +677,7 @@ public List getUserIdentitiesByName(String userId, Integer.toString(startFrom), Integer.toString(pageSize)); - return restResult.getElementList(); + return restResult.getElements(); } @@ -845,13 +825,13 @@ public List getActorProfileByName(String userId, requestBody.setNamePropertyName(namePropertyName); requestBody.setNameParameterName(nameParameterName); - ActorProfileListResponse restResult = restClient.callActorProfileListPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - Integer.toString(startFrom), - Integer.toString(pageSize)); + ActorProfilesResponse restResult = restClient.callActorProfilesPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + Integer.toString(startFrom), + Integer.toString(pageSize)); return restResult.getElements(); } @@ -892,13 +872,13 @@ public List findActorProfile(String userId, requestBody.setSearchString(searchString); requestBody.setSearchStringParameterName(searchStringParameterName); - ActorProfileListResponse restResult = restClient.callActorProfileListPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - Integer.toString(startFrom), - Integer.toString(pageSize)); + ActorProfilesResponse restResult = restClient.callActorProfilesPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + Integer.toString(startFrom), + Integer.toString(pageSize)); return restResult.getElements(); } @@ -920,7 +900,7 @@ public List findActorProfile(String userId, * @throws UserNotAuthorizedException security access problem */ @Override - public List getAppointees(String userId, + public List getAppointees(String userId, String personRoleGUID, Date effectiveTime, int startFrom, @@ -940,14 +920,14 @@ public List getAppointees(String userId, requestBody.setEffectiveTime(effectiveTime); - PersonRoleAppointeeListResponse restResult = restClient.callPersonRoleAppointeeListPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - personRoleGUID, - Integer.toString(startFrom), - Integer.toString(pageSize)); + AppointeesResponse restResult = restClient.callAppointeesPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + personRoleGUID, + Integer.toString(startFrom), + Integer.toString(pageSize)); return restResult.getElements(); } @@ -1026,13 +1006,13 @@ public List getPersonRoleByName(String userId, requestBody.setNamePropertyName(namePropertyName); requestBody.setNameParameterName(nameParameterName); - PersonRoleListResponse restResult = restClient.callPersonRoleListPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - Integer.toString(startFrom), - Integer.toString(pageSize)); + PersonRolesResponse restResult = restClient.callPersonRolesPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + Integer.toString(startFrom), + Integer.toString(pageSize)); return restResult.getElements(); } @@ -1073,13 +1053,13 @@ public List findPersonRole(String userId, requestBody.setSearchString(searchString); requestBody.setSearchStringParameterName(searchStringParameterName); - PersonRoleListResponse restResult = restClient.callPersonRoleListPostRESTCall(methodName, - urlTemplate, - requestBody, - serverName, - userId, - Integer.toString(startFrom), - Integer.toString(pageSize)); + PersonRolesResponse restResult = restClient.callPersonRolesPostRESTCall(methodName, + urlTemplate, + requestBody, + serverName, + userId, + Integer.toString(startFrom), + Integer.toString(pageSize)); return restResult.getElements(); } diff --git a/open-metadata-implementation/access-services/security-manager/security-manager-client/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/client/rest/SecurityManagerRESTClient.java b/open-metadata-implementation/access-services/security-manager/security-manager-client/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/client/rest/SecurityManagerRESTClient.java index d39568c428e..96c4d55a2ab 100644 --- a/open-metadata-implementation/access-services/security-manager/security-manager-client/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/client/rest/SecurityManagerRESTClient.java +++ b/open-metadata-implementation/access-services/security-manager/security-manager-client/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/client/rest/SecurityManagerRESTClient.java @@ -3,7 +3,7 @@ package org.odpi.openmetadata.accessservices.securitymanager.client.rest; -import org.odpi.openmetadata.accessservices.securitymanager.rest.*; +import org.odpi.openmetadata.commonservices.ffdc.rest.PersonRoleAppointeesResponse; import org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.client.OCFRESTClient; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; @@ -87,460 +87,4 @@ public SecurityManagerRESTClient(String serverName, { super(serverName, serverPlatformURLRoot, userId, password); } - - - /** - * Issue a GET REST call that returns a ElementStubsResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public ElementStubsResponse callElementStubsGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ElementStubsResponse restResult = this.callGetRESTCall(methodName, ElementStubsResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - - /** - * Issue a GET REST call that returns a RelatedElementListResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate REST API call URL template with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public RelatedElementListResponse callRelatedElementListGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - RelatedElementListResponse restResult = this.callGetRESTCall(methodName, RelatedElementListResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a SecurityGroupResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public SecurityGroupResponse callSecurityGroupGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - SecurityGroupResponse restResult = this.callGetRESTCall(methodName, SecurityGroupResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a POST REST call that returns a SecurityGroupResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param requestBody object that passes additional parameters - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public SecurityGroupResponse callSecurityGroupPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - SecurityGroupResponse restResult = this.callPostRESTCall(methodName, SecurityGroupResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a SecurityGroupsResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public SecurityGroupsResponse callSecurityGroupsGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - SecurityGroupsResponse restResult = this.callGetRESTCall(methodName, SecurityGroupsResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a POST REST call that returns a SecurityGroupsResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param requestBody object that passes additional parameters - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public SecurityGroupsResponse callSecurityGroupsPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - SecurityGroupsResponse restResult = this.callPostRESTCall(methodName, SecurityGroupsResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a UserIdentityResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public UserIdentityResponse callUserIdentityGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - UserIdentityResponse restResult = this.callGetRESTCall(methodName, UserIdentityResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a POST REST call that returns a UserIdentityResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param requestBody object that passes additional parameters - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public UserIdentityResponse callUserIdentityPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - UserIdentityResponse restResult = this.callPostRESTCall(methodName, UserIdentityResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a UserIdentitiesResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public UserIdentitiesResponse callUserIdentitiesGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - UserIdentitiesResponse restResult = this.callGetRESTCall(methodName, UserIdentitiesResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a POST REST call that returns a UserIdentitiesResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param requestBody object that passes additional parameters - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public UserIdentitiesResponse callUserIdentitiesPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - UserIdentitiesResponse restResult = this.callPostRESTCall(methodName, UserIdentitiesResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - - /** - * Issue a GET REST call that returns a ActorProfileElement in a response object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException something went wrong with the REST call stack. - */ - public ActorProfileResponse callActorProfileGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ActorProfileResponse restResult = this.callGetRESTCall(methodName, ActorProfileResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a list of ActorProfileElements in a response object. - * - * @param methodName name of the method being called - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters - * @param params a list of parameters that are slotted into the url template - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException something went wrong with the REST call stack. - */ - public ActorProfileListResponse callActorProfileListGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ActorProfileListResponse restResult = this.callGetRESTCall(methodName, ActorProfileListResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a list of ActorProfileElements in a response object. - * - * @param methodName name of the method being called - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters - * @param requestBody request body for the request - * @param params a list of parameters that are slotted into the url template - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException something went wrong with the REST call stack. - */ - public ActorProfileListResponse callActorProfileListPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ActorProfileListResponse restResult = this.callPostRESTCall(methodName, ActorProfileListResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a PersonRoleElement in a response object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException something went wrong with the REST call stack. - */ - public PersonRoleResponse callPersonRoleGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - PersonRoleResponse restResult = this.callGetRESTCall(methodName, PersonRoleResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a list of PersonRoleElements in a response object. - * - * @param methodName name of the method being called - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters - * @param params a list of parameters that are slotted into the url template - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException something went wrong with the REST call stack. - */ - public PersonRoleListResponse callPersonRoleListGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - PersonRoleListResponse restResult = this.callGetRESTCall(methodName, PersonRoleListResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a POST REST call that returns a list of PersonRoleElements in a response object. - * - * @param methodName name of the method being called - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters - * @param requestBody request body for the request - * @param params a list of parameters that are slotted into the url template - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException something went wrong with the REST call stack. - */ - public PersonRoleListResponse callPersonRoleListPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - PersonRoleListResponse restResult = this.callPostRESTCall(methodName, PersonRoleListResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - - /** - * Issue a POST REST call that returns a list of PersonRoleAppointees in a response object. - * - * @param methodName name of the method being called - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters - * @param requestBody request body for the request - * @param params a list of parameters that are slotted into the url template - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException something went wrong with the REST call stack. - */ - public PersonRoleAppointeeListResponse callPersonRoleAppointeeListPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - PersonRoleAppointeeListResponse restResult = this.callPostRESTCall(methodName, PersonRoleAppointeeListResponse.class, urlTemplate, requestBody, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - } diff --git a/open-metadata-implementation/access-services/security-manager/security-manager-server/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/converters/ActorProfileConverter.java b/open-metadata-implementation/access-services/security-manager/security-manager-server/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/converters/ActorProfileConverter.java deleted file mode 100644 index fb072a5f821..00000000000 --- a/open-metadata-implementation/access-services/security-manager/security-manager-server/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/converters/ActorProfileConverter.java +++ /dev/null @@ -1,340 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.securitymanager.converters; - -import org.odpi.openmetadata.accessservices.securitymanager.metadataelements.ActorProfileElement; -import org.odpi.openmetadata.accessservices.securitymanager.metadataelements.ContactMethodElement; -import org.odpi.openmetadata.accessservices.securitymanager.metadataelements.ProfileIdentityElement; -import org.odpi.openmetadata.accessservices.securitymanager.metadataelements.ProfileLocationElement; -import org.odpi.openmetadata.accessservices.securitymanager.metadataelements.UserIdentityElement; -import org.odpi.openmetadata.accessservices.securitymanager.properties.ActorProfileProperties; -import org.odpi.openmetadata.accessservices.securitymanager.properties.ContactMethodProperties; -import org.odpi.openmetadata.accessservices.securitymanager.properties.ProfileIdentityProperties; -import org.odpi.openmetadata.accessservices.securitymanager.properties.ProfileLocationProperties; -import org.odpi.openmetadata.accessservices.securitymanager.properties.UserIdentityProperties; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityProxy; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * ActorProfileConverter generates a ActorProfileElement bean from a ActorProfile entity. - */ -public class ActorProfileConverter extends SecurityManagerOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public ActorProfileConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - /** - * Using the supplied instances, return a new instance of the bean. It is used for beans such as - * a connection bean which made up of 3 entities (Connection, ConnectorType and Endpoint) plus the - * relationships between them. The relationships may be omitted if they do not have any properties. - * - * @param beanClass name of the class to create - * @param primaryEntity entity that is the root of the collection of entities that make up the content of the bean - * @param supplementaryEntities entities connected to the primary entity by the relationships - * @param relationships relationships linking the entities - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewComplexBean(Class beanClass, - EntityDetail primaryEntity, - List supplementaryEntities, - List relationships, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof ActorProfileElement) - { - ActorProfileElement bean = (ActorProfileElement) returnBean; - ActorProfileProperties profileProperties = new ActorProfileProperties(); - - if (primaryEntity != null) - { - bean.setElementHeader(this.getMetadataElementHeader(beanClass, primaryEntity, methodName)); - - /* - * The initial set of values come from the entity. - */ - InstanceProperties instanceProperties = new InstanceProperties(primaryEntity.getProperties()); - - profileProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); - profileProperties.setKnownName(this.removeName(instanceProperties)); - profileProperties.setDescription(this.removeDescription(instanceProperties)); - profileProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); - profileProperties.setEffectiveFrom(instanceProperties.getEffectiveFromTime()); - profileProperties.setEffectiveTo(instanceProperties.getEffectiveToTime()); - - /* - * Any remaining properties are returned in the extended properties. They are - * assumed to be defined in a subtype. - */ - profileProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); - profileProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - - bean.setProfileProperties(profileProperties); - - Map userIdentities = new HashMap<>(); - - if (supplementaryEntities != null) - { - List contactMethods = new ArrayList<>(); - - for (EntityDetail entity : supplementaryEntities) - { - if ((entity != null) && (entity.getType() != null)) - { - String entityTypeName = entity.getType().getTypeDefName(); - - if (repositoryHelper.isTypeOf(serviceName, entityTypeName, OpenMetadataType.USER_IDENTITY_TYPE_NAME)) - { - UserIdentityElement userBean = new UserIdentityElement(); - UserIdentityProperties userProperties = new UserIdentityProperties(); - - bean.setElementHeader(this.getMetadataElementHeader(beanClass, entity, methodName)); - - InstanceProperties entityProperties = new InstanceProperties(entity.getProperties()); - - userProperties.setQualifiedName(this.removeQualifiedName(entityProperties)); - userProperties.setUserId(this.removeUserId(instanceProperties)); - userProperties.setDistinguishedName(this.removeDistinguishedName(instanceProperties)); - userProperties.setAdditionalProperties(this.removeAdditionalProperties(entityProperties)); - - userProperties.setEffectiveFrom(entityProperties.getEffectiveFromTime()); - userProperties.setEffectiveTo(entityProperties.getEffectiveToTime()); - - userProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); - userProperties.setExtendedProperties(this.getRemainingExtendedProperties(entityProperties)); - - userBean.setProperties(userProperties); - - userIdentities.put(entity.getGUID(), userBean); - } - else if (repositoryHelper.isTypeOf(serviceName, entityTypeName, OpenMetadataType.CONTACT_DETAILS.typeName)) - { - ContactMethodElement contactMethodBean = new ContactMethodElement(); - ContactMethodProperties contactMethodProperties = new ContactMethodProperties(); - - contactMethodBean.setElementHeader(super.getMetadataElementHeader(beanClass, entity, methodName)); - - InstanceProperties entityProperties = new InstanceProperties(entity.getProperties()); - - contactMethodProperties.setName(this.removeName(entityProperties)); - contactMethodProperties.setContactType(this.removeContactType(entityProperties)); - contactMethodProperties.setContactMethodType(this.getContactMethodTypeFromProperties(entityProperties)); - contactMethodProperties.setContactMethodService(this.removeContactMethodService(entityProperties)); - contactMethodProperties.setContactMethodValue(this.removeContactMethodValue(entityProperties)); - - contactMethodProperties.setEffectiveFrom(entityProperties.getEffectiveFromTime()); - contactMethodProperties.setEffectiveTo(entityProperties.getEffectiveToTime()); - - contactMethodProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); - contactMethodProperties.setExtendedProperties(this.getRemainingExtendedProperties(entityProperties)); - - contactMethodBean.setProperties(contactMethodProperties); - - contactMethods.add(contactMethodBean); - } - } - else - { - handleBadEntity(beanClass.getName(), entity, methodName); - } - } - - if (! contactMethods.isEmpty()) - { - bean.setContactMethods(contactMethods); - } - } - - if (relationships != null) - { - ElementStub superTeam = null; - List subTeams = new ArrayList<>(); - List teamLeaders = new ArrayList<>(); - List teamMembers = new ArrayList<>(); - List profileIdentities = new ArrayList<>(); - List locations = new ArrayList<>(); - List roles = new ArrayList<>(); - List linkedInfrastructure = new ArrayList<>(); - - for (Relationship relationship : relationships) - { - if ((relationship != null) && (relationship.getType() != null)) - { - String relationshipTypeName = relationship.getType().getTypeDefName(); - - if (repositoryHelper.isTypeOf(serviceName, relationshipTypeName, OpenMetadataType.TEAM_MEMBERSHIP_RELATIONSHIP_TYPE_NAME)) - { - EntityProxy entityProxy = repositoryHelper.getOtherEnd(serviceName, primaryEntity.getGUID(), relationship); - - ElementStub elementStub = super.getElementStub(beanClass, entityProxy, methodName); - - teamMembers.add(elementStub); - } - else if (repositoryHelper.isTypeOf(serviceName, relationshipTypeName, OpenMetadataType.TEAM_LEADERSHIP_RELATIONSHIP_TYPE_NAME)) - { - EntityProxy entityProxy = repositoryHelper.getOtherEnd(serviceName, primaryEntity.getGUID(), relationship); - - ElementStub elementStub = super.getElementStub(beanClass, entityProxy, methodName); - - teamLeaders.add(elementStub); - } - else if (repositoryHelper.isTypeOf(serviceName, relationshipTypeName, OpenMetadataType.PERSON_ROLE_APPOINTMENT_RELATIONSHIP_TYPE_NAME)) - { - EntityProxy entityProxy = repositoryHelper.getOtherEnd(serviceName, primaryEntity.getGUID(), relationship); - - ElementStub elementStub = super.getElementStub(beanClass, entityProxy, methodName); - - roles.add(elementStub); - } - else if (repositoryHelper.isTypeOf(serviceName, relationshipTypeName, OpenMetadataType.IT_INFRASTRUCTURE_PROFILE_RELATIONSHIP_TYPE_NAME)) - { - EntityProxy entityProxy = repositoryHelper.getOtherEnd(serviceName, primaryEntity.getGUID(), relationship); - - ElementStub elementStub = super.getElementStub(beanClass, entityProxy, methodName); - - linkedInfrastructure.add(elementStub); - } - else if (repositoryHelper.isTypeOf(serviceName, relationshipTypeName, OpenMetadataType.PROFILE_LOCATION_TYPE_NAME)) - { - EntityProxy entityProxy = relationship.getEntityTwoProxy(); - - ElementStub elementStub = super.getElementStub(beanClass, entityProxy, methodName); - - ProfileLocationElement locationElement = new ProfileLocationElement(); - ProfileLocationProperties locationProperties = new ProfileLocationProperties(); - - locationProperties.setAssociationType(this.removeAssociationType(relationship.getProperties())); - - locationElement.setLocation(elementStub); - locationElement.setProperties(locationProperties); - locations.add(locationElement); - } - else if (repositoryHelper.isTypeOf(serviceName, relationshipTypeName, OpenMetadataType.PROFILE_IDENTITY_RELATIONSHIP_TYPE_NAME)) - { - EntityProxy entityProxy = repositoryHelper.getOtherEnd(serviceName, primaryEntity.getGUID(), relationship); - - ProfileIdentityElement profileIdentityElement = new ProfileIdentityElement(); - ProfileIdentityProperties profileIdentityProperties = new ProfileIdentityProperties(); - - InstanceProperties relationshipProperties = relationship.getProperties(); - - profileIdentityProperties.setRoleTypeName(this.removeDescription(relationshipProperties)); - profileIdentityProperties.setRoleGUID(this.removeDescription(relationshipProperties)); - profileIdentityProperties.setDescription(this.removeDescription(relationshipProperties)); - - profileIdentityElement.setProfileIdentity(profileIdentityProperties); - profileIdentityElement.setProperties(userIdentities.get(entityProxy.getGUID())); - - profileIdentities.add(profileIdentityElement); - } - else if (repositoryHelper.isTypeOf(serviceName, relationshipTypeName, OpenMetadataType.TEAM_STRUCTURE_RELATIONSHIP_TYPE_NAME)) - { - EntityProxy entityProxy = relationship.getEntityOneProxy(); - - if (primaryEntity.getGUID().equals(entityProxy.getGUID())) - { - /* - * The primary entity is the super team - save subteam - */ - ElementStub elementStub = super.getElementStub(beanClass, relationship.getEntityTwoProxy(), methodName); - subTeams.add(elementStub); - } - else - { - superTeam = super.getElementStub(beanClass, entityProxy, methodName); - } - } - } - else - { - handleBadRelationship(beanClass.getName(), relationship, methodName); - } - } - - if (!profileIdentities.isEmpty()) - { - bean.setUserIdentities(profileIdentities); - } - - bean.setSuperTeam(superTeam); - if (! subTeams.isEmpty()) - { - bean.setSubTeams(subTeams); - } - - if (! teamLeaders.isEmpty()) - { - bean.setTeamLeaderRoles(teamLeaders); - } - - if (! teamMembers.isEmpty()) - { - bean.setTeamMemberRoles(teamMembers); - } - - if (! roles.isEmpty()) - { - bean.setPersonRoles(roles); - } - - if (! locations.isEmpty()) - { - bean.setLocations(locations); - } - - if (! linkedInfrastructure.isEmpty()) - { - bean.setLinkedInfrastructure(linkedInfrastructure); - } - } - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } -} diff --git a/open-metadata-implementation/access-services/security-manager/security-manager-server/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/converters/ContactMethodConverter.java b/open-metadata-implementation/access-services/security-manager/security-manager-server/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/converters/ContactMethodConverter.java deleted file mode 100644 index 522726b75de..00000000000 --- a/open-metadata-implementation/access-services/security-manager/security-manager-server/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/converters/ContactMethodConverter.java +++ /dev/null @@ -1,130 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.securitymanager.converters; - - -import org.odpi.openmetadata.accessservices.securitymanager.metadataelements.ContactMethodElement; -import org.odpi.openmetadata.accessservices.securitymanager.properties.ContactMethodProperties; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; - -/** - * ContactMethodConverter generates a ContactMethodProperties bean from a ContactMethodProperties entity. - */ -public class ContactMethodConverter extends SecurityManagerOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public ContactMethodConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - /** - * Using the supplied entity, return a new instance of the bean. This is used for most beans that have - * a one to one correspondence with the repository instances. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof ContactMethodElement) - { - ContactMethodElement bean = (ContactMethodElement) returnBean; - ContactMethodProperties contactMethodProperties = new ContactMethodProperties(); - - bean.setElementHeader(super.getMetadataElementHeader(beanClass, entity, methodName)); - - InstanceProperties entityProperties; - - /* - * The initial set of values come from the entity. - */ - if (entity != null) - { - entityProperties = new InstanceProperties(entity.getProperties()); - - contactMethodProperties.setName(this.removeName(entityProperties)); - contactMethodProperties.setContactType(this.removeContactType(entityProperties)); - contactMethodProperties.setContactMethodType(this.getContactMethodTypeFromProperties(entityProperties)); - contactMethodProperties.setContactMethodService(this.removeContactMethodService(entityProperties)); - contactMethodProperties.setContactMethodValue(this.removeContactMethodValue(entityProperties)); - contactMethodProperties.setEffectiveFrom(entityProperties.getEffectiveFromTime()); - contactMethodProperties.setEffectiveTo(entityProperties.getEffectiveToTime()); - - - /* - * Any remaining properties are returned in the extended properties. They are - * assumed to be defined in a subtype. - */ - contactMethodProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); - contactMethodProperties.setExtendedProperties(this.getRemainingExtendedProperties(entityProperties)); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - - bean.setProperties(contactMethodProperties); - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @SuppressWarnings(value = "unused") - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - Relationship relationship, - String methodName) throws PropertyServerException - { - return this.getNewBean(beanClass, entity, methodName); - } -} diff --git a/open-metadata-implementation/access-services/security-manager/security-manager-server/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/converters/ElementHeaderConverter.java b/open-metadata-implementation/access-services/security-manager/security-manager-server/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/converters/ElementHeaderConverter.java deleted file mode 100644 index 79ec32f0e5c..00000000000 --- a/open-metadata-implementation/access-services/security-manager/security-manager-server/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/converters/ElementHeaderConverter.java +++ /dev/null @@ -1,100 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.securitymanager.converters; - -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; - -/** - * ElementHeaderConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) - * EntityDetail object into a ElementHeader bean. - */ -public class ElementHeaderConverter extends SecurityManagerOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity/relationship objects - * @param serviceName name of this component - * @param serverName local server name - */ - public ElementHeaderConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @SuppressWarnings(value = "unchecked") - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof ElementHeader) - { - if (entity != null) - { - returnBean = (B) this.getMetadataElementHeader(beanClass, entity, methodName); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - Relationship relationship, - String methodName) throws PropertyServerException - { - return getNewBean(beanClass, entity, methodName); - } -} diff --git a/open-metadata-implementation/access-services/security-manager/security-manager-server/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/converters/PersonRoleConverter.java b/open-metadata-implementation/access-services/security-manager/security-manager-server/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/converters/PersonRoleConverter.java deleted file mode 100644 index e8d1fffaae8..00000000000 --- a/open-metadata-implementation/access-services/security-manager/security-manager-server/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/converters/PersonRoleConverter.java +++ /dev/null @@ -1,152 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.securitymanager.converters; - - -import org.odpi.openmetadata.accessservices.securitymanager.metadataelements.PersonRoleElement; -import org.odpi.openmetadata.accessservices.securitymanager.properties.PersonRoleProperties; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityProxy; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceType; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; -import java.util.ArrayList; -import java.util.List; - -/** - * PersonRoleConverter generates a PersonRoleProperties bean from an PersonRoleProperties entity and the relationships connected to it. - */ -public class PersonRoleConverter extends SecurityManagerOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public PersonRoleConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - /** - * Using the supplied instances, return a new instance of the bean. It is used for beans such as - * an Annotation or DataField bean which combine knowledge from the entity and its linked relationships. - * - * @param beanClass name of the class to create - * @param primaryEntity entity that is the root of the collection of entities that make up the - * content of the bean - * @param relationships relationships linking the entities - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewComplexBean(Class beanClass, - EntityDetail primaryEntity, - List relationships, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof PersonRoleElement) - { - PersonRoleElement bean = (PersonRoleElement) returnBean; - PersonRoleProperties roleProperties = new PersonRoleProperties(); - - if (primaryEntity != null) - { - bean.setElementHeader(this.getMetadataElementHeader(beanClass, primaryEntity, methodName)); - - /* - * The initial set of values come from the entity. - */ - InstanceProperties instanceProperties = new InstanceProperties(primaryEntity.getProperties()); - - roleProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); - roleProperties.setRoleId(this.removeIdentifier(instanceProperties)); - roleProperties.setTitle(this.removeTitle(instanceProperties)); - roleProperties.setDescription(this.removeDescription(instanceProperties)); - roleProperties.setScope(this.removeScope(instanceProperties)); - roleProperties.setDomainIdentifier(this.removeDomainIdentifier(instanceProperties)); - roleProperties.setHeadCountLimitSet(instanceProperties.getPropertyValue(OpenMetadataType.HEAD_COUNT_PROPERTY_NAME) != null); - roleProperties.setHeadCount(this.removeHeadCount(instanceProperties)); - - roleProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); - roleProperties.setEffectiveFrom(instanceProperties.getEffectiveFromTime()); - roleProperties.setEffectiveTo(instanceProperties.getEffectiveToTime()); - - - /* - * Any remaining properties are returned in the extended properties. They are - * assumed to be defined in a subtype. - */ - roleProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); - roleProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - - if (relationships != null) - { - List appointees = new ArrayList<>(); - - for (Relationship relationship : relationships) - { - if (relationship != null) - { - InstanceType instanceType = relationship.getType(); - - if (instanceType != null) - { - if (repositoryHelper.isTypeOf(serviceName, - instanceType.getTypeDefName(), - OpenMetadataType.PERSON_ROLE_APPOINTMENT_RELATIONSHIP_TYPE_NAME)) - { - EntityProxy entityProxy = repositoryHelper.getOtherEnd(serviceName, primaryEntity.getGUID(), relationship); - - ElementStub elementStub = super.getElementStub(beanClass, entityProxy, methodName); - - appointees.add(elementStub); - } - } - } - } - - if (! appointees.isEmpty()) - { - bean.setAppointees(appointees); - } - } - - bean.setProperties(roleProperties); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } -} diff --git a/open-metadata-implementation/access-services/security-manager/security-manager-server/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/converters/SecurityGroupConverter.java b/open-metadata-implementation/access-services/security-manager/security-manager-server/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/converters/SecurityGroupConverter.java deleted file mode 100644 index 0f9cb0fd407..00000000000 --- a/open-metadata-implementation/access-services/security-manager/security-manager-server/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/converters/SecurityGroupConverter.java +++ /dev/null @@ -1,116 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.securitymanager.converters; - - -import org.odpi.openmetadata.accessservices.securitymanager.metadataelements.SecurityGroupElement; -import org.odpi.openmetadata.accessservices.securitymanager.properties.SecurityGroupProperties; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; -import java.util.List; - - -/** - * GovernanceDefinitionConverter provides common methods for transferring relevant properties from an Open Metadata Repository Services (OMRS) - * EntityDetail object into a bean that inherits from GovernanceDefinition. - */ -public class SecurityGroupConverter extends SecurityManagerOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public SecurityGroupConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - /** - * Using the supplied instances, return a new instance of the bean. It is used for beans such as - * an Annotation or DataField bean which combine knowledge from the entity and its linked relationships. - * - * @param beanClass name of the class to create - * @param primaryEntity entity that is the root of the collection of entities that make up the - * content of the bean - * @param relationships relationships linking the entities - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @SuppressWarnings(value = "unused") - @Override - public B getNewComplexBean(Class beanClass, - EntityDetail primaryEntity, - List relationships, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof SecurityGroupElement) - { - SecurityGroupElement bean = (SecurityGroupElement) returnBean; - - if (primaryEntity != null) - { - bean.setElementHeader(this.getMetadataElementHeader(beanClass, primaryEntity, methodName)); - - /* - * The initial set of values come from the entity. - */ - InstanceProperties instanceProperties = new InstanceProperties(primaryEntity.getProperties()); - - String typeName = primaryEntity.getType().getTypeDefName(); - SecurityGroupProperties securityGroupProperties = new SecurityGroupProperties(); - - securityGroupProperties.setDocumentIdentifier(this.removeQualifiedName(instanceProperties)); - securityGroupProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); - securityGroupProperties.setTitle(this.removeTitle(instanceProperties)); - securityGroupProperties.setScope(this.removeScope(instanceProperties)); - securityGroupProperties.setDomainIdentifier(this.removeDomainIdentifier(instanceProperties)); - securityGroupProperties.setPriority(this.removePriority(instanceProperties)); - securityGroupProperties.setOutcomes(this.removeOutcomes(instanceProperties)); - securityGroupProperties.setResults(this.removeResults(instanceProperties)); - securityGroupProperties.setDistinguishedName(this.removeDistinguishedName(instanceProperties)); - - /* - * Any remaining properties are returned in the extended properties. They are - * assumed to be defined in a subtype. - */ - securityGroupProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); - securityGroupProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - - bean.setProperties(securityGroupProperties); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } -} diff --git a/open-metadata-implementation/access-services/security-manager/security-manager-server/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/converters/SecurityManagerOMASConverter.java b/open-metadata-implementation/access-services/security-manager/security-manager-server/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/converters/SecurityManagerOMASConverter.java index 5b937edcaad..b9eaec2395a 100644 --- a/open-metadata-implementation/access-services/security-manager/security-manager-server/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/converters/SecurityManagerOMASConverter.java +++ b/open-metadata-implementation/access-services/security-manager/security-manager-server/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/converters/SecurityManagerOMASConverter.java @@ -2,10 +2,7 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.securitymanager.converters; -import org.odpi.openmetadata.accessservices.securitymanager.properties.ContactMethodType; import org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericConverter; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.*; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; @@ -30,57 +27,4 @@ public SecurityManagerOMASConverter(OMRSRepositoryHelper repositoryHelper, { super (repositoryHelper, serviceName, serverName); } - - - /*=============================== - * Methods to fill out headers and enums - */ - - - /** - * Retrieve the ContactMethodType enum property from the instance properties of an entity - * - * @param properties entity properties - * @return ContactMethodType enum value - */ - ContactMethodType getContactMethodTypeFromProperties(InstanceProperties properties) - { - final String methodName = "getContactMethodTypeFromProperties"; - - ContactMethodType contactMethodType = ContactMethodType.OTHER; - - if (properties != null) - { - int ordinal = repositoryHelper.removeEnumPropertyOrdinal(serviceName, OpenMetadataProperty.CONTACT_METHOD_TYPE.name, properties, methodName); - - switch (ordinal) - { - case 0: - contactMethodType = ContactMethodType.EMAIL; - break; - - case 1: - contactMethodType = ContactMethodType.PHONE; - break; - - case 2: - contactMethodType = ContactMethodType.CHAT; - break; - - case 3: - contactMethodType = ContactMethodType.PROFILE; - break; - - case 4: - contactMethodType = ContactMethodType.ACCOUNT; - break; - - case 99: - contactMethodType = ContactMethodType.OTHER; - break; - } - } - - return contactMethodType; - } } diff --git a/open-metadata-implementation/access-services/security-manager/security-manager-server/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/converters/UserIdentityConverter.java b/open-metadata-implementation/access-services/security-manager/security-manager-server/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/converters/UserIdentityConverter.java deleted file mode 100644 index b47fcde5327..00000000000 --- a/open-metadata-implementation/access-services/security-manager/security-manager-server/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/converters/UserIdentityConverter.java +++ /dev/null @@ -1,124 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.securitymanager.converters; - - -import org.odpi.openmetadata.accessservices.securitymanager.metadataelements.UserIdentityElement; -import org.odpi.openmetadata.accessservices.securitymanager.properties.UserIdentityProperties; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; - - -/** - * UserIdentityConverter generates an UserIdentityElement bean from an UserIdentity entity. - */ -public class UserIdentityConverter extends SecurityManagerOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public UserIdentityConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof UserIdentityElement) - { - UserIdentityElement bean = (UserIdentityElement) returnBean; - UserIdentityProperties properties = new UserIdentityProperties(); - - if (entity != null) - { - bean.setElementHeader(this.getMetadataElementHeader(beanClass, entity, methodName)); - - /* - * The initial set of values come from the entity. - */ - InstanceProperties instanceProperties = new InstanceProperties(entity.getProperties()); - - properties.setQualifiedName(this.removeQualifiedName(instanceProperties)); - properties.setUserId(this.removeUserId(instanceProperties)); - properties.setDistinguishedName(this.removeDistinguishedName(instanceProperties)); - properties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); - - /* - * Any remaining properties are returned in the extended properties. They are - * assumed to be defined in a subtype. - */ - properties.setTypeName(bean.getElementHeader().getType().getTypeName()); - properties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - - bean.setProperties(properties); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - Relationship relationship, - String methodName) throws PropertyServerException - { - return getNewBean(beanClass, entity, methodName); - } -} diff --git a/open-metadata-implementation/access-services/security-manager/security-manager-server/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/outtopic/SecurityManagerOMRSTopicListener.java b/open-metadata-implementation/access-services/security-manager/security-manager-server/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/outtopic/SecurityManagerOMRSTopicListener.java index 294e610a846..833f0c6ab4b 100644 --- a/open-metadata-implementation/access-services/security-manager/security-manager-server/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/outtopic/SecurityManagerOMRSTopicListener.java +++ b/open-metadata-implementation/access-services/security-manager/security-manager-server/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/outtopic/SecurityManagerOMRSTopicListener.java @@ -3,7 +3,7 @@ package org.odpi.openmetadata.accessservices.securitymanager.outtopic; import org.odpi.openmetadata.accessservices.securitymanager.events.SecurityManagerEventType; -import org.odpi.openmetadata.accessservices.securitymanager.metadataelements.UserIdentityElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.UserIdentityElement; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.commonservices.generichandlers.UserIdentityHandler; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; diff --git a/open-metadata-implementation/access-services/security-manager/security-manager-server/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/outtopic/SecurityManagerOutTopicPublisher.java b/open-metadata-implementation/access-services/security-manager/security-manager-server/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/outtopic/SecurityManagerOutTopicPublisher.java index e536f73ad0b..e5cb2764b26 100644 --- a/open-metadata-implementation/access-services/security-manager/security-manager-server/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/outtopic/SecurityManagerOutTopicPublisher.java +++ b/open-metadata-implementation/access-services/security-manager/security-manager-server/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/outtopic/SecurityManagerOutTopicPublisher.java @@ -4,12 +4,12 @@ package org.odpi.openmetadata.accessservices.securitymanager.outtopic; import org.odpi.openmetadata.accessservices.securitymanager.connectors.outtopic.SecurityManagerOutTopicServerConnector; -import org.odpi.openmetadata.accessservices.securitymanager.converters.ElementHeaderConverter; import org.odpi.openmetadata.accessservices.securitymanager.events.SecurityManagerEventType; import org.odpi.openmetadata.accessservices.securitymanager.events.SecurityManagerOutTopicEvent; import org.odpi.openmetadata.accessservices.securitymanager.ffdc.SecurityManagerAuditCode; +import org.odpi.openmetadata.commonservices.generichandlers.ElementHeaderConverter; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Classification; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; diff --git a/open-metadata-implementation/access-services/security-manager/security-manager-server/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/server/SecurityManagerInstanceHandler.java b/open-metadata-implementation/access-services/security-manager/security-manager-server/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/server/SecurityManagerInstanceHandler.java index 6d5031caabe..57c0a899ffd 100644 --- a/open-metadata-implementation/access-services/security-manager/security-manager-server/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/server/SecurityManagerInstanceHandler.java +++ b/open-metadata-implementation/access-services/security-manager/security-manager-server/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/server/SecurityManagerInstanceHandler.java @@ -2,13 +2,13 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.securitymanager.server; -import org.odpi.openmetadata.accessservices.securitymanager.metadataelements.*; import org.odpi.openmetadata.adminservices.configuration.registration.AccessServiceDescription; import org.odpi.openmetadata.commonservices.generichandlers.*; import org.odpi.openmetadata.commonservices.multitenant.OMASServiceInstanceHandler; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; class SecurityManagerInstanceHandler extends OMASServiceInstanceHandler { diff --git a/open-metadata-implementation/access-services/security-manager/security-manager-server/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/server/SecurityManagerRESTServices.java b/open-metadata-implementation/access-services/security-manager/security-manager-server/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/server/SecurityManagerRESTServices.java index e8827ecc682..151934c9274 100644 --- a/open-metadata-implementation/access-services/security-manager/security-manager-server/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/server/SecurityManagerRESTServices.java +++ b/open-metadata-implementation/access-services/security-manager/security-manager-server/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/server/SecurityManagerRESTServices.java @@ -3,40 +3,17 @@ package org.odpi.openmetadata.accessservices.securitymanager.server; import org.odpi.openmetadata.accessservices.securitymanager.converters.SecurityManagerOMASConverter; -import org.odpi.openmetadata.accessservices.securitymanager.metadataelements.ActorProfileElement; -import org.odpi.openmetadata.accessservices.securitymanager.metadataelements.PersonRoleAppointee; -import org.odpi.openmetadata.accessservices.securitymanager.metadataelements.PersonRoleElement; -import org.odpi.openmetadata.accessservices.securitymanager.metadataelements.SecurityGroupElement; -import org.odpi.openmetadata.accessservices.securitymanager.metadataelements.SecurityManagerElement; -import org.odpi.openmetadata.accessservices.securitymanager.metadataelements.UserIdentityElement; -import org.odpi.openmetadata.accessservices.securitymanager.properties.AppointmentProperties; -import org.odpi.openmetadata.accessservices.securitymanager.properties.SecurityGroupProperties; -import org.odpi.openmetadata.accessservices.securitymanager.rest.ActorProfileListResponse; -import org.odpi.openmetadata.accessservices.securitymanager.rest.ActorProfileResponse; -import org.odpi.openmetadata.accessservices.securitymanager.rest.EffectiveTimeRequestBody; -import org.odpi.openmetadata.accessservices.securitymanager.rest.ElementStubsResponse; -import org.odpi.openmetadata.accessservices.securitymanager.rest.MetadataSourceRequestBody; -import org.odpi.openmetadata.accessservices.securitymanager.rest.PersonRoleAppointeeListResponse; -import org.odpi.openmetadata.accessservices.securitymanager.rest.PersonRoleListResponse; -import org.odpi.openmetadata.accessservices.securitymanager.rest.PersonRoleResponse; -import org.odpi.openmetadata.accessservices.securitymanager.rest.SecurityGroupResponse; -import org.odpi.openmetadata.accessservices.securitymanager.rest.SecurityGroupsResponse; -import org.odpi.openmetadata.accessservices.securitymanager.rest.SecurityManagerRequestBody; -import org.odpi.openmetadata.accessservices.securitymanager.rest.UserIdentitiesResponse; -import org.odpi.openmetadata.accessservices.securitymanager.rest.UserIdentityRequestBody; -import org.odpi.openmetadata.accessservices.securitymanager.rest.UserIdentityResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.PersonRoleAppointeesResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.SecurityManagerRequestBody; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; - -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.ConnectionResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.NullRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.odpi.openmetadata.commonservices.generichandlers.ActorProfileHandler; import org.odpi.openmetadata.commonservices.generichandlers.GovernanceDefinitionHandler; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.UserIdentityProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.security.SecurityGroupProperties; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.commonservices.generichandlers.PersonRoleHandler; @@ -48,7 +25,7 @@ import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; @@ -91,16 +68,16 @@ public SecurityManagerRESTServices() * UserNotAuthorizedException user not authorized to issue this request or * PropertyServerException problem retrieving the discovery engine definition. */ - public ConnectionResponse getOutTopicConnection(String serverName, - String userId, - String callerId) + public OCFConnectionResponse getOutTopicConnection(String serverName, + String userId, + String callerId) { final String methodName = "getOutTopicConnection"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - ConnectionResponse response = new ConnectionResponse(); - AuditLog auditLog = null; + OCFConnectionResponse response = new OCFConnectionResponse(); + AuditLog auditLog = null; try { @@ -488,7 +465,7 @@ public SecurityGroupsResponse getSecurityGroupsForDistinguishedName(String serve GovernanceDefinitionHandler handler = instanceHandler.getSecurityGroupHandler(userId, serverName, methodName); auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - response.setElementList(handler.getGovernanceDefinitionsByStringParameter(userId, + response.setElements(handler.getGovernanceDefinitionsByStringParameter(userId, OpenMetadataType.SECURITY_GROUP_TYPE_GUID, OpenMetadataType.SECURITY_GROUP_TYPE_NAME, distinguishedName, @@ -574,7 +551,7 @@ public SecurityGroupsResponse findSecurityGroups(String serverN GovernanceDefinitionHandler handler = instanceHandler.getSecurityGroupHandler(userId, serverName, methodName); auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - response.setElementList(handler.findGovernanceDefinitions(userId, + response.setElements(handler.findGovernanceDefinitions(userId, OpenMetadataType.SECURITY_GROUP_TYPE_NAME, requestBody.getSearchString(), searchStringParameterName, @@ -680,23 +657,31 @@ public GUIDResponse createUserIdentity(String serverName, UserIdentityHandler handler = instanceHandler.getUserIdentityHandler(userId, serverName, methodName); auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - String userIdentityGUID = handler.createUserIdentity(userId, - requestBody.getExternalSourceGUID(), - requestBody.getExternalSourceName(), - null, - null, - requestBody.getQualifiedName(), - requestBody.getUserId(), - requestBody.getDistinguishedName(), - requestBody.getAdditionalProperties(), - requestBody.getTypeName(), - requestBody.getExtendedProperties(), - false, - false, - new Date(), - methodName); - - response.setGUID(userIdentityGUID); + + if (requestBody.getProperties() instanceof UserIdentityProperties) + { + String userIdentityGUID = handler.createUserIdentity(userId, + requestBody.getExternalSourceGUID(), + requestBody.getExternalSourceName(), + null, + null, + requestBody.getProperties().getQualifiedName(), + requestBody.getProperties().getUserId(), + requestBody.getProperties().getDistinguishedName(), + requestBody.getProperties().getAdditionalProperties(), + requestBody.getProperties().getTypeName(), + requestBody.getProperties().getExtendedProperties(), + false, + false, + new Date(), + methodName); + + response.setGUID(userIdentityGUID); + } + else + { + restExceptionHandler.handleInvalidPropertiesObject(UserIdentityProperties.class.getName(), methodName); + } } else { @@ -748,24 +733,32 @@ public VoidResponse updateUserIdentity(String serverName, UserIdentityHandler handler = instanceHandler.getUserIdentityHandler(userId, serverName, methodName); auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - handler.updateUserIdentity(userId, - requestBody.getExternalSourceGUID(), - requestBody.getExternalSourceName(), - userIdentityGUID, - guidParameterName, - requestBody.getQualifiedName(), - requestBody.getUserId(), - requestBody.getDistinguishedName(), - requestBody.getAdditionalProperties(), - requestBody.getTypeName(), - requestBody.getExtendedProperties(), - isMergeUpdate, - null, - null, - false, - false, - new Date(), - methodName); + + if (requestBody.getProperties() instanceof UserIdentityProperties) + { + handler.updateUserIdentity(userId, + requestBody.getExternalSourceGUID(), + requestBody.getExternalSourceName(), + userIdentityGUID, + guidParameterName, + requestBody.getProperties().getQualifiedName(), + requestBody.getProperties().getUserId(), + requestBody.getProperties().getDistinguishedName(), + requestBody.getProperties().getAdditionalProperties(), + requestBody.getProperties().getTypeName(), + requestBody.getProperties().getExtendedProperties(), + isMergeUpdate, + null, + null, + false, + false, + new Date(), + methodName); + } + else + { + restExceptionHandler.handleInvalidPropertiesObject(UserIdentityProperties.class.getName(), methodName); + } } else { @@ -798,7 +791,7 @@ public VoidResponse updateUserIdentity(String serverName, public VoidResponse deleteUserIdentity(String serverName, String userId, String userIdentityGUID, - MetadataSourceRequestBody requestBody) + ExternalSourceRequestBody requestBody) { final String methodName = "deleteUserIdentity"; final String guidParameterName = "userIdentityGUID"; @@ -859,7 +852,7 @@ public VoidResponse addIdentityToProfile(String serverName, String userId, String userIdentityGUID, String profileGUID, - MetadataSourceRequestBody requestBody) + ExternalSourceRequestBody requestBody) { final String methodName = "addIdentityToProfile"; final String userIdentityGUIDParameterName = "userIdentityGUID"; @@ -927,7 +920,7 @@ public VoidResponse removeIdentityFromProfile(String serverNa String userId, String userIdentityGUID, String profileGUID, - MetadataSourceRequestBody requestBody) + ExternalSourceRequestBody requestBody) { final String methodName = "removeIdentityFromProfile"; final String userIdentityGUIDParameterName = "userIdentityGUID"; @@ -1020,7 +1013,7 @@ public UserIdentitiesResponse findUserIdentities(String serverN false, new Date(), methodName); - response.setElementList(elements); + response.setElements(elements); } else { @@ -1083,7 +1076,7 @@ public UserIdentitiesResponse getUserIdentitiesByName(String serverName false, new Date(), methodName); - response.setElementList(elements); + response.setElements(elements); } else { @@ -1264,19 +1257,19 @@ public ActorProfileResponse getActorProfileByUserId(String serverName, * PropertyServerException problem accessing property server * UserNotAuthorizedException security access problem */ - public ActorProfileListResponse getActorProfileByName(String serverName, - String userId, - int startFrom, - int pageSize, - NameRequestBody requestBody) + public ActorProfilesResponse getActorProfileByName(String serverName, + String userId, + int startFrom, + int pageSize, + NameRequestBody requestBody) { final String methodName = "getActorProfileByName"; final String nameParameterName = "name"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - ActorProfileListResponse response = new ActorProfileListResponse(); - AuditLog auditLog = null; + ActorProfilesResponse response = new ActorProfilesResponse(); + AuditLog auditLog = null; try { @@ -1320,19 +1313,19 @@ public ActorProfileListResponse getActorProfileByName(String serverName * PropertyServerException the server is not available. * UserNotAuthorizedException the calling user is not authorized to issue the call. */ - public ActorProfileListResponse findActorProfile(String serverName, - String userId, - int startFrom, - int pageSize, - SearchStringRequestBody requestBody) + public ActorProfilesResponse findActorProfile(String serverName, + String userId, + int startFrom, + int pageSize, + SearchStringRequestBody requestBody) { final String methodName = "findActorProfile"; final String searchStringParameterName = "searchString"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - ActorProfileListResponse response = new ActorProfileListResponse(); - AuditLog auditLog = null; + ActorProfilesResponse response = new ActorProfilesResponse(); + AuditLog auditLog = null; try { @@ -1376,20 +1369,20 @@ public ActorProfileListResponse findActorProfile(String serverN * PropertyServerException problem accessing property server * UserNotAuthorizedException security access problem */ - public PersonRoleAppointeeListResponse getAppointees(String serverName, - String userId, - String personRoleGUID, - int startFrom, - int pageSize, - EffectiveTimeRequestBody requestBody) + public AppointeesResponse getAppointees(String serverName, + String userId, + String personRoleGUID, + int startFrom, + int pageSize, + EffectiveTimeRequestBody requestBody) { final String methodName = "getAppointees"; final String personRoleGUIDParameterName = "personRoleGUID"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - PersonRoleAppointeeListResponse response = new PersonRoleAppointeeListResponse(); - AuditLog auditLog = null; + AppointeesResponse response = new AppointeesResponse(); + AuditLog auditLog = null; try { @@ -1418,10 +1411,10 @@ public PersonRoleAppointeeListResponse getAppointees(String se methodName); if (appointmentRelationships != null) { - List appointees = new ArrayList<>(); + List appointees = new ArrayList<>(); OMRSRepositoryHelper repositoryHelper = roleHandler.getRepositoryHelper(); String serviceName = roleHandler.getServiceName(); - SecurityManagerOMASConverter converter = new SecurityManagerOMASConverter<>(repositoryHelper, serviceName, serverName); + SecurityManagerOMASConverter converter = new SecurityManagerOMASConverter<>(repositoryHelper, serviceName, serverName); RepositoryErrorHandler errorHandler = new RepositoryErrorHandler(repositoryHelper, serviceName, serverName, auditLog); for (Relationship relationship : appointmentRelationships) @@ -1430,36 +1423,36 @@ public PersonRoleAppointeeListResponse getAppointees(String se { if (requestBody.getEffectiveTime() == null) { - PersonRoleAppointee appointee = getAppointeeFromRelationship(userId, - relationship, - profileHandler, - converter, - repositoryHelper, - serviceName, - errorHandler, - methodName); + Appointee appointee = getAppointeeFromRelationship(userId, + relationship, + profileHandler, + converter, + repositoryHelper, + serviceName, + errorHandler, + methodName); appointees.add(appointee); } else { - InstanceProperties properties = relationship.getProperties(); + InstanceProperties properties = relationship.getProperties(); Date effectiveTime = requestBody.getEffectiveTime(); /* * Need to retrieve the appointments that are active */ if (((properties.getEffectiveFromTime() == null) || properties.getEffectiveFromTime().before(effectiveTime)) && - ((properties.getEffectiveToTime() == null) || properties.getEffectiveToTime().after(effectiveTime))) + ((properties.getEffectiveToTime() == null) || properties.getEffectiveToTime().after(effectiveTime))) { - PersonRoleAppointee appointee = getAppointeeFromRelationship(userId, - relationship, - profileHandler, - converter, - repositoryHelper, - serviceName, - errorHandler, - methodName); + Appointee appointee = getAppointeeFromRelationship(userId, + relationship, + profileHandler, + converter, + repositoryHelper, + serviceName, + errorHandler, + methodName); appointees.add(appointee); } @@ -1507,41 +1500,38 @@ public PersonRoleAppointeeListResponse getAppointees(String se * @throws PropertyServerException the server is not available. * @throws UserNotAuthorizedException the calling user is not authorized to issue the call. */ - private PersonRoleAppointee getAppointeeFromRelationship(String userId, - Relationship relationship, - ActorProfileHandler profileHandler, - SecurityManagerOMASConverter converter, - OMRSRepositoryHelper repositoryHelper, - String serviceName, - RepositoryErrorHandler errorHandler, - String methodName) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException + private Appointee getAppointeeFromRelationship(String userId, + Relationship relationship, + ActorProfileHandler profileHandler, + SecurityManagerOMASConverter converter, + OMRSRepositoryHelper repositoryHelper, + String serviceName, + RepositoryErrorHandler errorHandler, + String methodName) throws InvalidParameterException, + PropertyServerException, + UserNotAuthorizedException { final String profileGUIDParameterName = "profileGUID"; if ((relationship != null) && (relationship.getProperties() != null) && (relationship.getEntityOneProxy() != null) && (relationship.getEntityTwoProxy() != null)) { - PersonRoleAppointee appointee = new PersonRoleAppointee(); + Appointee appointee = new Appointee(); InstanceProperties properties = relationship.getProperties(); - ElementHeader elementHeader = converter.getMetadataElementHeader(PersonRoleAppointee.class, + ElementHeader elementHeader = converter.getMetadataElementHeader(Appointee.class, relationship, null, methodName); appointee.setElementHeader(elementHeader); + appointee.setStartDate(properties.getEffectiveFromTime()); + appointee.setEndDate(properties.getEffectiveToTime()); + appointee.setIsPublic(repositoryHelper.getBooleanProperty(serviceName, + OpenMetadataProperty.IS_PUBLIC.name, + relationship.getProperties(), + methodName)); - AppointmentProperties appointmentProperties = new AppointmentProperties(); - appointmentProperties.setEffectiveFrom(properties.getEffectiveFromTime()); - appointmentProperties.setEffectiveTo(properties.getEffectiveToTime()); - appointmentProperties.setIsPublic(repositoryHelper.getBooleanProperty(serviceName, - OpenMetadataProperty.IS_PUBLIC.name, - relationship.getProperties(), - methodName)); - - appointee.setProperties(appointmentProperties); ActorProfileElement profile = profileHandler.getActorProfileByGUID(userId, relationship.getEntityOneProxy().getGUID(), @@ -1577,7 +1567,6 @@ private PersonRoleAppointee getAppointeeFromRelationship(String * @param personRoleGUID unique identifier for the person role * * @return properties of the person role - * * InvalidParameterException personRoleGUID or userId is null * PropertyServerException problem accessing property server * UserNotAuthorizedException security access problem @@ -1632,19 +1621,19 @@ public PersonRoleResponse getPersonRoleByGUID(String serverName, * PropertyServerException problem accessing property server * UserNotAuthorizedException security access problem */ - public PersonRoleListResponse getPersonRoleByName(String serverName, - String userId, - int startFrom, - int pageSize, - NameRequestBody requestBody) + public PersonRolesResponse getPersonRoleByName(String serverName, + String userId, + int startFrom, + int pageSize, + NameRequestBody requestBody) { final String methodName = "getPersonRoleByName"; final String nameParameterName = "name"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - PersonRoleListResponse response = new PersonRoleListResponse(); - AuditLog auditLog = null; + PersonRolesResponse response = new PersonRolesResponse(); + AuditLog auditLog = null; try { @@ -1685,19 +1674,19 @@ public PersonRoleListResponse getPersonRoleByName(String serverName, * PropertyServerException the server is not available. * UserNotAuthorizedException the calling user is not authorized to issue the call. */ - public PersonRoleListResponse findPersonRole(String serverName, - String userId, - int startFrom, - int pageSize, - SearchStringRequestBody requestBody) + public PersonRolesResponse findPersonRole(String serverName, + String userId, + int startFrom, + int pageSize, + SearchStringRequestBody requestBody) { final String methodName = "findPersonRole"; final String searchStringParameterName = "searchString"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - PersonRoleListResponse response = new PersonRoleListResponse(); - AuditLog auditLog = null; + PersonRolesResponse response = new PersonRolesResponse(); + AuditLog auditLog = null; try { diff --git a/open-metadata-implementation/access-services/security-manager/security-manager-server/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/server/SecurityManagerServicesInstance.java b/open-metadata-implementation/access-services/security-manager/security-manager-server/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/server/SecurityManagerServicesInstance.java index 4a8b95163da..77dd27bb2e3 100644 --- a/open-metadata-implementation/access-services/security-manager/security-manager-server/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/server/SecurityManagerServicesInstance.java +++ b/open-metadata-implementation/access-services/security-manager/security-manager-server/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/server/SecurityManagerServicesInstance.java @@ -3,9 +3,7 @@ package org.odpi.openmetadata.accessservices.securitymanager.server; import org.odpi.openmetadata.accessservices.securitymanager.connectors.outtopic.SecurityManagerOutTopicClientProvider; -import org.odpi.openmetadata.accessservices.securitymanager.converters.*; import org.odpi.openmetadata.accessservices.securitymanager.ffdc.SecurityManagerErrorCode; -import org.odpi.openmetadata.accessservices.securitymanager.metadataelements.*; import org.odpi.openmetadata.adminservices.configuration.registration.AccessServiceDescription; import org.odpi.openmetadata.commonservices.generichandlers.*; import org.odpi.openmetadata.commonservices.multitenant.OMASServiceInstance; @@ -13,6 +11,7 @@ import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryConnector; import java.util.List; diff --git a/open-metadata-implementation/access-services/security-manager/security-manager-spring/build.gradle b/open-metadata-implementation/access-services/security-manager/security-manager-spring/build.gradle index e8ed59635d3..de241628153 100644 --- a/open-metadata-implementation/access-services/security-manager/security-manager-spring/build.gradle +++ b/open-metadata-implementation/access-services/security-manager/security-manager-spring/build.gradle @@ -7,6 +7,7 @@ dependencies { implementation project(':open-metadata-implementation:access-services:security-manager:security-manager-server') implementation project(':open-metadata-implementation:access-services:security-manager:security-manager-api') + implementation project(':open-metadata-implementation:frameworks:open-metadata-framework') implementation project(':open-metadata-implementation:common-services:ffdc-services') implementation 'org.springframework:spring-web' implementation 'io.swagger.core.v3:swagger-annotations' diff --git a/open-metadata-implementation/access-services/security-manager/security-manager-spring/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/server/spring/SecurityManagerOMASResource.java b/open-metadata-implementation/access-services/security-manager/security-manager-spring/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/server/spring/SecurityManagerOMASResource.java index df89e5690f4..70e4b6b8edf 100644 --- a/open-metadata-implementation/access-services/security-manager/security-manager-spring/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/server/spring/SecurityManagerOMASResource.java +++ b/open-metadata-implementation/access-services/security-manager/security-manager-spring/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/server/spring/SecurityManagerOMASResource.java @@ -4,28 +4,9 @@ import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.accessservices.securitymanager.properties.SecurityGroupProperties; -import org.odpi.openmetadata.accessservices.securitymanager.rest.ActorProfileListResponse; -import org.odpi.openmetadata.accessservices.securitymanager.rest.ActorProfileResponse; -import org.odpi.openmetadata.accessservices.securitymanager.rest.EffectiveTimeRequestBody; -import org.odpi.openmetadata.accessservices.securitymanager.rest.ElementStubsResponse; -import org.odpi.openmetadata.accessservices.securitymanager.rest.MetadataSourceRequestBody; -import org.odpi.openmetadata.accessservices.securitymanager.rest.PersonRoleAppointeeListResponse; -import org.odpi.openmetadata.accessservices.securitymanager.rest.PersonRoleListResponse; -import org.odpi.openmetadata.accessservices.securitymanager.rest.PersonRoleResponse; -import org.odpi.openmetadata.accessservices.securitymanager.rest.SecurityGroupResponse; -import org.odpi.openmetadata.accessservices.securitymanager.rest.SecurityGroupsResponse; -import org.odpi.openmetadata.accessservices.securitymanager.rest.SecurityManagerRequestBody; -import org.odpi.openmetadata.accessservices.securitymanager.rest.UserIdentitiesResponse; -import org.odpi.openmetadata.accessservices.securitymanager.rest.UserIdentityRequestBody; -import org.odpi.openmetadata.accessservices.securitymanager.rest.UserIdentityResponse; import org.odpi.openmetadata.accessservices.securitymanager.server.SecurityManagerRESTServices; -import org.odpi.openmetadata.commonservices.ffdc.rest.ConnectionResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.NullRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.security.SecurityGroupProperties; import org.springframework.web.bind.annotation.*; /** @@ -66,9 +47,9 @@ public SecurityManagerOMASResource() */ @GetMapping(path = "/topics/out-topic-connection/{callerId}") - public ConnectionResponse getOutTopicConnection(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String callerId) + public OCFConnectionResponse getOutTopicConnection(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String callerId) { return restAPI.getOutTopicConnection(serverName, userId, callerId); } @@ -361,7 +342,7 @@ public VoidResponse updateUserIdentity(@PathVariable String ser public VoidResponse deleteUserIdentity(@PathVariable String serverName, @PathVariable String userId, @PathVariable String userIdentityGUID, - @RequestBody MetadataSourceRequestBody requestBody) + @RequestBody ExternalSourceRequestBody requestBody) { return restAPI.deleteUserIdentity(serverName, userId, userIdentityGUID, requestBody); } @@ -388,7 +369,7 @@ public VoidResponse addIdentityToProfile(@PathVariable String @PathVariable String userId, @PathVariable String userIdentityGUID, @PathVariable String profileGUID, - @RequestBody MetadataSourceRequestBody requestBody) + @RequestBody ExternalSourceRequestBody requestBody) { return restAPI.addIdentityToProfile(serverName, userId, userIdentityGUID, profileGUID, requestBody); } @@ -415,7 +396,7 @@ public VoidResponse removeIdentityFromProfile(@PathVariable String @PathVariable String userId, @PathVariable String userIdentityGUID, @PathVariable String profileGUID, - @RequestBody MetadataSourceRequestBody requestBody) + @RequestBody ExternalSourceRequestBody requestBody) { return restAPI.removeIdentityFromProfile(serverName, userId, userIdentityGUID, profileGUID, requestBody); } @@ -562,11 +543,11 @@ public ActorProfileResponse getActorProfileByUserId(@PathVariable String serverN */ @PostMapping(path = "/profiles/by-name") - public ActorProfileListResponse getActorProfileByName(@PathVariable String serverName, - @PathVariable String userId, - @RequestParam int startFrom, - @RequestParam int pageSize, - @RequestBody NameRequestBody requestBody) + public ActorProfilesResponse getActorProfileByName(@PathVariable String serverName, + @PathVariable String userId, + @RequestParam int startFrom, + @RequestParam int pageSize, + @RequestBody NameRequestBody requestBody) { return restAPI.getActorProfileByName(serverName, userId, startFrom, pageSize, requestBody); } @@ -589,11 +570,11 @@ public ActorProfileListResponse getActorProfileByName(@PathVariable String */ @PostMapping(path = "/profiles/by-search-string") - public ActorProfileListResponse findActorProfile(@PathVariable String serverName, - @PathVariable String userId, - @RequestParam int startFrom, - @RequestParam int pageSize, - @RequestBody SearchStringRequestBody requestBody) + public ActorProfilesResponse findActorProfile(@PathVariable String serverName, + @PathVariable String userId, + @RequestParam int startFrom, + @RequestParam int pageSize, + @RequestBody SearchStringRequestBody requestBody) { return restAPI.findActorProfile(serverName, userId, startFrom, pageSize, requestBody); } @@ -617,12 +598,12 @@ public ActorProfileListResponse findActorProfile(@PathVariable String */ @PostMapping(path = "/person-roles/{personRoleGUID}/appointees") - public PersonRoleAppointeeListResponse getAppointees(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String personRoleGUID, - @RequestParam int startFrom, - @RequestParam int pageSize, - @RequestBody EffectiveTimeRequestBody requestBody) + public AppointeesResponse getAppointees(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String personRoleGUID, + @RequestParam int startFrom, + @RequestParam int pageSize, + @RequestBody EffectiveTimeRequestBody requestBody) { return restAPI.getAppointees(serverName, userId, personRoleGUID, startFrom, pageSize, requestBody); } @@ -668,11 +649,11 @@ public PersonRoleResponse getPersonRoleByGUID(@PathVariable String serverName, */ @PostMapping(path = "/person-roles/by-name") - public PersonRoleListResponse getPersonRoleByName(@PathVariable String serverName, - @PathVariable String userId, - @RequestParam int startFrom, - @RequestParam int pageSize, - @RequestBody NameRequestBody requestBody) + public PersonRolesResponse getPersonRoleByName(@PathVariable String serverName, + @PathVariable String userId, + @RequestParam int startFrom, + @RequestParam int pageSize, + @RequestBody NameRequestBody requestBody) { return restAPI.getPersonRoleByName(serverName, userId, startFrom, pageSize, requestBody); } @@ -695,11 +676,11 @@ public PersonRoleListResponse getPersonRoleByName(@PathVariable String */ @PostMapping(path = "/person-roles/by-search-string") - public PersonRoleListResponse findPersonRole(@PathVariable String serverName, - @PathVariable String userId, - @RequestParam int startFrom, - @RequestParam int pageSize, - @RequestBody SearchStringRequestBody requestBody) + public PersonRolesResponse findPersonRole(@PathVariable String serverName, + @PathVariable String userId, + @RequestParam int startFrom, + @RequestParam int pageSize, + @RequestBody SearchStringRequestBody requestBody) { return restAPI.findPersonRole(serverName, userId, startFrom, pageSize, requestBody); } diff --git a/open-metadata-implementation/access-services/security-manager/security-manager-topic-connectors/build.gradle b/open-metadata-implementation/access-services/security-manager/security-manager-topic-connectors/build.gradle index 9b79f238e1a..9aa32eaa257 100644 --- a/open-metadata-implementation/access-services/security-manager/security-manager-topic-connectors/build.gradle +++ b/open-metadata-implementation/access-services/security-manager/security-manager-topic-connectors/build.gradle @@ -6,6 +6,7 @@ dependencies { implementation project(':open-metadata-implementation:frameworks:audit-log-framework') + implementation project(':open-metadata-implementation:frameworks:open-metadata-framework') implementation project(':open-metadata-implementation:frameworks:open-connector-framework') implementation project(':open-metadata-implementation:repository-services:repository-services-apis') implementation project(':open-metadata-implementation:access-services:security-manager:security-manager-api') diff --git a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/build.gradle b/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/build.gradle index fd74edf7e0b..b2d635cac88 100644 --- a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/build.gradle +++ b/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/build.gradle @@ -6,6 +6,7 @@ dependencies { compileOnly 'com.fasterxml.jackson.core:jackson-annotations' + implementation project(':open-metadata-implementation:frameworks:open-metadata-framework') implementation project(':open-metadata-implementation:frameworks:open-connector-framework') implementation project(':open-metadata-implementation:frameworks:survey-action-framework') implementation project(':open-metadata-implementation:common-services:ffdc-services') diff --git a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/api/DuplicateManagementInterface.java b/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/api/DuplicateManagementInterface.java index baa4c6732cc..e32b4786752 100644 --- a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/api/DuplicateManagementInterface.java +++ b/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/api/DuplicateManagementInterface.java @@ -3,11 +3,11 @@ package org.odpi.openmetadata.accessservices.stewardshipaction.api; -import org.odpi.openmetadata.accessservices.stewardshipaction.metadataelements.DuplicateElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.DuplicateElement; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementStub; import java.util.List; diff --git a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/api/SurveyReportInterface.java b/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/api/SurveyReportInterface.java index cfee1682aad..a7a28f961db 100644 --- a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/api/SurveyReportInterface.java +++ b/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/api/SurveyReportInterface.java @@ -7,7 +7,6 @@ import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; import org.odpi.openmetadata.frameworks.surveyaction.properties.Annotation; -import org.odpi.openmetadata.frameworks.surveyaction.properties.AnnotationStatus; import org.odpi.openmetadata.frameworks.surveyaction.properties.SurveyReport; import java.util.List; diff --git a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/events/StewardshipActionOutTopicEvent.java b/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/events/StewardshipActionOutTopicEvent.java index 6d293e7a43a..30e5c7d7d8c 100644 --- a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/events/StewardshipActionOutTopicEvent.java +++ b/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/events/StewardshipActionOutTopicEvent.java @@ -5,7 +5,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; import java.util.Date; import java.util.Map; @@ -22,17 +22,15 @@ @JsonIgnoreProperties(ignoreUnknown=true) public class StewardshipActionOutTopicEvent { - private long eventVersionId = 1L; - private StewardshipActionEventType eventType = null; - private Date eventTime = null; - private ElementHeader elementHeader = null; - private Map elementProperties = null; - - private ElementHeader previousElementHeader = null; - private Map previousElementProperties = null; - - private String classificationName = null; - private Map previousClassificationProperties = null; + private long eventVersionId = 1L; + private StewardshipActionEventType eventType = null; + private Date eventTime = null; + private ElementHeader elementHeader = null; + private Map elementProperties = null; + private ElementHeader previousElementHeader = null; + private Map previousElementProperties = null; + private String classificationName = null; + private Map previousClassificationProperties = null; diff --git a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/metadataelements/AssetElement.java b/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/metadataelements/AssetElement.java deleted file mode 100644 index fb8bcde9af8..00000000000 --- a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/metadataelements/AssetElement.java +++ /dev/null @@ -1,146 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.stewardshipaction.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.stewardshipaction.properties.AssetProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * AssetElement contains the properties and header for an asset retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class AssetElement implements MetadataElement -{ - private ElementHeader elementHeader = null; - private AssetProperties assetProperties = null; - - /** - * Default constructor - */ - public AssetElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public AssetElement(AssetElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - assetProperties = template.getAssetProperties(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - @Override - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Retrieve details of the asset itself. - * - * @return properties bean - */ - public AssetProperties getAssetProperties() - { - return assetProperties; - } - - - /** - * Save details of the asset itself - * - * @param assetProperties properties bean - */ - public void setAssetProperties(AssetProperties assetProperties) - { - this.assetProperties = assetProperties; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "AssetElement{" + - "elementHeader=" + elementHeader + - ", assetProperties=" + assetProperties + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - AssetElement that = (AssetElement) objectToCompare; - return Objects.equals(elementHeader, that.elementHeader) && - Objects.equals(assetProperties, that.assetProperties); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(elementHeader, assetProperties); - } -} diff --git a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/metadataelements/MetadataElement.java b/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/metadataelements/MetadataElement.java deleted file mode 100644 index 2f7f4ba6404..00000000000 --- a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/metadataelements/MetadataElement.java +++ /dev/null @@ -1,28 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.stewardshipaction.metadataelements; - -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -/** - * MetadataElement is the common interface for all metadata elements. It adds the header information that is stored with the properties. - * This includes detains of its unique identifier, type and origin. - */ -public interface MetadataElement -{ - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - ElementHeader getElementHeader(); - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - void setElementHeader(ElementHeader elementHeader); -} diff --git a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/metadataelements/ReferenceableElement.java b/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/metadataelements/ReferenceableElement.java deleted file mode 100644 index e77fcb56291..00000000000 --- a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/metadataelements/ReferenceableElement.java +++ /dev/null @@ -1,151 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.stewardshipaction.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.stewardshipaction.properties.ReferenceableProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ReferenceableElement contains the properties and header for a referenceable entity retrieved from the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ReferenceableElement implements MetadataElement -{ - private ElementHeader elementHeader = null; - private ReferenceableProperties referenceableProperties = null; - - - /** - * Default constructor - */ - public ReferenceableElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ReferenceableElement(ReferenceableElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - referenceableProperties = template.getReferenceableProperties(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - @Override - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - @Override - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the properties of a referenceable. - * - * @return properties bean - */ - public ReferenceableProperties getReferenceableProperties() - { - return referenceableProperties; - } - - - /** - * Set up the properties for a referenceable. - * - * @param referenceableProperties properties bean - */ - public void setReferenceableProperties(ReferenceableProperties referenceableProperties) - { - this.referenceableProperties = referenceableProperties; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ReferenceableElement{" + - "elementHeader=" + elementHeader + - ", referenceableProperties=" + referenceableProperties + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ReferenceableElement that = (ReferenceableElement) objectToCompare; - return Objects.equals(elementHeader, that.elementHeader) && - Objects.equals(referenceableProperties, that.referenceableProperties); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementHeader, referenceableProperties); - } -} diff --git a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/metadataelements/RelatedElement.java b/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/metadataelements/RelatedElement.java deleted file mode 100644 index e80f916748b..00000000000 --- a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/metadataelements/RelatedElement.java +++ /dev/null @@ -1,172 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.stewardshipaction.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.stewardshipaction.properties.RelationshipProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * RelatedElement contains the properties and header for a relationship retrieved from the metadata repository along with the stub - * of the related element. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class RelatedElement -{ - private ElementHeader relationshipHeader = null; - private RelationshipProperties relationshipProperties = null; - private ElementStub relatedElement = null; - - /** - * Default constructor - */ - public RelatedElement() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public RelatedElement(RelatedElement template) - { - if (template != null) - { - relationshipHeader = template.getRelationshipHeader(); - relationshipProperties = template.getRelationshipProperties(); - relatedElement = template.getRelatedElement(); - } - } - - - /** - * Return the element header associated with the relationship. - * - * @return element header object - */ - public ElementHeader getRelationshipHeader() - { - return relationshipHeader; - } - - - /** - * Set up the element header associated with the relationship. - * - * @param relationshipHeader element header object - */ - public void setRelationshipHeader(ElementHeader relationshipHeader) - { - this.relationshipHeader = relationshipHeader; - } - - - /** - * Return details of the relationship - * - * @return relationship properties - */ - public RelationshipProperties getRelationshipProperties() - { - return relationshipProperties; - } - - - /** - * Set up relationship properties - * - * @param relationshipProperties relationship properties - */ - public void setRelationshipProperties(RelationshipProperties relationshipProperties) - { - this.relationshipProperties = relationshipProperties; - } - - - /** - * Return the element header associated with end 1 of the relationship. - * - * @return element stub object - */ - public ElementStub getRelatedElement() - { - return relatedElement; - } - - - /** - * Set up the element header associated with end 1 of the relationship. - * - * @param relatedElement element stub object - */ - public void setRelatedElement(ElementStub relatedElement) - { - this.relatedElement = relatedElement; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "RelatedElement{" + - "relationshipHeader=" + relationshipHeader + - ", relationshipProperties=" + relationshipProperties + - ", relatedElement=" + relatedElement + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - RelatedElement that = (RelatedElement) objectToCompare; - return Objects.equals(getRelationshipHeader(), that.getRelationshipHeader()) && - Objects.equals(getRelationshipProperties(), that.getRelationshipProperties()) && - Objects.equals(getRelatedElement(), that.getRelatedElement()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), relationshipHeader, relationshipProperties, relatedElement); - } -} diff --git a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/metadataelements/package-info.java b/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/metadataelements/package-info.java deleted file mode 100644 index 0d0dfef8ef0..00000000000 --- a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/metadataelements/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -/** - * The metadata elements describe the way that metadata is returned from the repository. - */ -package org.odpi.openmetadata.accessservices.stewardshipaction.metadataelements; diff --git a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/properties/AssetProperties.java b/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/properties/AssetProperties.java deleted file mode 100644 index a2216a54578..00000000000 --- a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/properties/AssetProperties.java +++ /dev/null @@ -1,195 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.stewardshipaction.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * AssetProperties is a java bean used to describe assets managed by the governance program. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class AssetProperties extends SupplementaryProperties -{ - private String resourceName = null; - private String versionIdentifier = null; - private String resourceDescription = null; - - /** - * Default constructor - */ - public AssetProperties() - { - } - - - /** - * Copy/clone constructor. Note, this is a deep copy - * - * @param template object to copy - */ - public AssetProperties(AssetProperties template) - { - super(template); - - if (template != null) - { - resourceName = template.getDisplayName(); - versionIdentifier = template.getVersionIdentifier(); - resourceDescription = template.getResourceDescription(); - } - } - - - /** - * Returns the name of the resource as known to the technology that supports it. - * If no technical name is available then null is returned. - * - * @return String name - */ - public String getResourceName() - { - return resourceName; - } - - - /** - * Set up name of the resource as known to the technology that supports it. - * - * @param resourceName String name - */ - public void setResourceName(String resourceName) - { - this.resourceName = resourceName; - } - - - /** - * Set up the version identifier of the resource. - * - * @return string version name - */ - public String getVersionIdentifier() - { - return versionIdentifier; - } - - - /** - * Set up the version identifier of the resource. - * - * @param versionIdentifier string version name - */ - public void setVersionIdentifier(String versionIdentifier) - { - this.versionIdentifier = versionIdentifier; - } - - - - /** - * Returns the stored technical description property from the resource. - * If no description is provided then null is returned. - * - * @return description String text - */ - public String getResourceDescription() - { - return resourceDescription; - } - - - /** - * Set up the stored technical description property associated with the resource. - * - * @param resourceDescription String text - */ - public void setResourceDescription(String resourceDescription) - { - this.resourceDescription = resourceDescription; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "AssetProperties{" + - "resourceName='" + resourceName + '\'' + - ", versionIdentifier='" + versionIdentifier + '\'' + - ", resourceDescription='" + resourceDescription + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - ", displayName='" + getDisplayName() + '\'' + - ", summary='" + getSummary() + '\'' + - ", description='" + getDescription() + '\'' + - ", abbreviation='" + getAbbreviation() + '\'' + - ", usage='" + getUsage() + '\'' + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (! (objectToCompare instanceof AssetProperties)) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - - AssetProperties that = (AssetProperties) objectToCompare; - - if (resourceName != null ? ! resourceName.equals(that.resourceName) : that.resourceName != null) - { - return false; - } - if (versionIdentifier != null ? ! versionIdentifier.equals(that.versionIdentifier) : that.versionIdentifier != null) - { - return false; - } - return resourceDescription != null ? resourceDescription.equals(that.resourceDescription) : that.resourceDescription == null; - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), resourceName, versionIdentifier, resourceDescription); - } -} diff --git a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/properties/ClassificationProperties.java b/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/properties/ClassificationProperties.java deleted file mode 100644 index 569eeb112fd..00000000000 --- a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/properties/ClassificationProperties.java +++ /dev/null @@ -1,184 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.stewardshipaction.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Date; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * RelationshipProperties provides the base class for relationships items. This provides extended properties with the ability to - * set effectivity dates. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ClassificationProperties -{ - private Date effectiveFrom = null; - private Date effectiveTo = null; - private Map extendedProperties = null; - - - /** - * Default constructor - */ - public ClassificationProperties() - { - super(); - } - - - /** - * Copy/clone constructor. Retrieve values from the supplied template - * - * @param template element to copy - */ - public ClassificationProperties(ClassificationProperties template) - { - if (template != null) - { - effectiveFrom = template.getEffectiveFrom(); - effectiveTo = template.getEffectiveTo(); - extendedProperties = template.getExtendedProperties(); - } - } - - - /** - * Return the date/time that this element is effective from (null means effective from the epoch). - * - * @return date object - */ - public Date getEffectiveFrom() - { - return effectiveFrom; - } - - - /** - * Set up the date/time that this element is effective from (null means effective from the epoch). - * - * @param effectiveFrom date object - */ - public void setEffectiveFrom(Date effectiveFrom) - { - this.effectiveFrom = effectiveFrom; - } - - - /** - * Return the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @return date object - */ - public Date getEffectiveTo() - { - return effectiveTo; - } - - - /** - * Set the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @param effectiveTo date object - */ - public void setEffectiveTo(Date effectiveTo) - { - this.effectiveTo = effectiveTo; - } - - - /** - * Return the properties that have been defined for a subtype of this object that are not supported explicitly - * by this bean. - * - * @return property map - */ - public Map getExtendedProperties() - { - if (extendedProperties == null) - { - return null; - } - else if (extendedProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(extendedProperties); - } - } - - - /** - * Set up the properties that have been defined for a subtype of this object that are not supported explicitly - * by this bean. - * - * @param extendedProperties property map - */ - public void setExtendedProperties(Map extendedProperties) - { - this.extendedProperties = extendedProperties; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "RelationshipProperties{" + - "effectiveFrom=" + effectiveFrom + - ", effectiveTo=" + effectiveTo + - ", extendedProperties=" + extendedProperties + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ClassificationProperties that = (ClassificationProperties) objectToCompare; - return Objects.equals(effectiveFrom, that.effectiveFrom) && - Objects.equals(effectiveTo, that.effectiveTo); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(effectiveFrom, effectiveTo); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/properties/DuplicateProperties.java b/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/properties/DuplicateProperties.java deleted file mode 100644 index 8640d79cc3d..00000000000 --- a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/properties/DuplicateProperties.java +++ /dev/null @@ -1,274 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.stewardshipaction.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * DuplicatesProperties provides a structure for passing the properties associated with duplicates. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class DuplicateProperties -{ - private ElementStub duplicateElement = null; - private int statusIdentifier = 0; - private String steward = null; - private String stewardTypeName = null; - private String stewardPropertyName = null; - private String source = null; - private String notes = null; - - - /** - * Default constructor - */ - public DuplicateProperties() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public DuplicateProperties(DuplicateProperties template) - { - if (template != null) - { - duplicateElement = template.getDuplicateElement(); - statusIdentifier = template.getStatusIdentifier(); - steward = template.getSteward(); - stewardTypeName = template.getStewardPropertyName(); - stewardPropertyName = template.getStewardPropertyName(); - source = template.getSource(); - notes = template.getNotes(); - } - } - - - /** - * Return the unique identifier of the duplicate. - * - * @return header - */ - public ElementStub getDuplicateElement() - { - return duplicateElement; - } - - - /** - * Set up the header of the duplicate. - * - * @param duplicateElement header - */ - public void setDuplicateElement(ElementStub duplicateElement) - { - this.duplicateElement = duplicateElement; - } - - - /** - * Return the status of this duplicate - usable if greater than 0, 0=proposed, negative means invalid - * - * @return int - */ - public int getStatusIdentifier() - { - return statusIdentifier; - } - - - /** - * Set up the status of this duplicate - usable if greater than 0, 0=proposed, negative means invalid - * - * @param statusIdentifier int - */ - public void setStatusIdentifier(int statusIdentifier) - { - this.statusIdentifier = statusIdentifier; - } - - - /** - * Return the identifier of the steward that added this duplicate. - * - * @return identifier - */ - public String getSteward() - { - return steward; - } - - - /** - * Set up the identifier of the steward that added this duplicate. - * - * @param steward identifier - */ - public void setSteward(String steward) - { - this.steward = steward; - } - - - /** - * Return the type name of the element used to identify the steward. - * - * @return type name - */ - public String getStewardTypeName() - { - return stewardTypeName; - } - - - /** - * Set up the type name of the element used to identify the steward. - * - * @param stewardTypeName type name - */ - public void setStewardTypeName(String stewardTypeName) - { - this.stewardTypeName = stewardTypeName; - } - - - /** - * Return the name of the property used to identify the steward. - * - * @return property name - */ - public String getStewardPropertyName() - { - return stewardPropertyName; - } - - - /** - * Return the name of the property used to identify the steward. - * - * @param stewardPropertyName property name - */ - public void setStewardPropertyName(String stewardPropertyName) - { - this.stewardPropertyName = stewardPropertyName; - } - - - /** - * Return the details of the source that detected the duplicate. - * - * @return name - */ - public String getSource() - { - return source; - } - - - /** - * Set up the details of the source that detected the duplicate. - * - * @param source name - */ - public void setSource(String source) - { - this.source = source; - } - - - /** - * Return any notes for the steward. - * - * @return text - */ - public String getNotes() - { - return notes; - } - - - /** - * Set up any notes for the steward. - * - * @param notes text - */ - public void setNotes(String notes) - { - this.notes = notes; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "DuplicateProperties{" + - "duplicateElement='" + duplicateElement + '\'' + - ", statusIdentifier=" + statusIdentifier + - ", steward='" + steward + '\'' + - ", stewardTypeName='" + stewardTypeName + '\'' + - ", stewardPropertyName='" + stewardPropertyName + '\'' + - ", source='" + source + '\'' + - ", notes='" + notes + '\'' + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - DuplicateProperties that = (DuplicateProperties) objectToCompare; - return Objects.equals(duplicateElement, that.duplicateElement) && - statusIdentifier == that.statusIdentifier && - Objects.equals(steward, that.steward) && - Objects.equals(stewardTypeName, that.stewardTypeName) && - Objects.equals(stewardPropertyName, that.stewardPropertyName) && - Objects.equals(source, that.source) && - Objects.equals(notes, that.notes); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(duplicateElement, statusIdentifier, steward, stewardTypeName, stewardPropertyName, source, notes); - } -} diff --git a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/properties/MeaningProperties.java b/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/properties/MeaningProperties.java deleted file mode 100644 index da4a511d687..00000000000 --- a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/properties/MeaningProperties.java +++ /dev/null @@ -1,156 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.stewardshipaction.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * MeaningProperties is a cut-down summary of a glossary term to aid the stewardship action in understanding the content - * of an asset. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class MeaningProperties extends ReferenceableProperties -{ - /* - * Attributes of a meaning object definition - */ - private String name = null; - private String description = null; - - - /** - * Default constructor - */ - public MeaningProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template element to copy - */ - public MeaningProperties(MeaningProperties template) - { - super(template); - - if (template != null) - { - name = template.getName(); - description = template.getDescription(); - } - } - - - /** - * Return the glossary term name. - * - * @return String name - */ - public String getName() - { - return name; - } - - - /** - * Set up the glossary term name. - * - * @param name String name - */ - public void setName(String name) - { - this.name = name; - } - - - /** - * Return the description of the glossary term. - * - * @return String description - */ - public String getDescription() - { - return description; - } - - - /** - * Set up the description of the glossary term. - * - * @param description String description - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "MeaningProperties{" + - "name='" + name + '\'' + - ", description='" + description + '\'' + - ", typeName='" + getTypeName() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - MeaningProperties that = (MeaningProperties) objectToCompare; - return Objects.equals(name, that.name) && - Objects.equals(description, that.description); - } - - - /** - * Create a hash code for this element type. - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), name, description); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/properties/ReferenceableProperties.java b/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/properties/ReferenceableProperties.java deleted file mode 100644 index f5c853427ec..00000000000 --- a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/properties/ReferenceableProperties.java +++ /dev/null @@ -1,288 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.stewardshipaction.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; - -import java.util.Date; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ReferenceableProperties provides a structure for passing a referenceables' properties over the Java API. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes( - { - @JsonSubTypes.Type(value = SupplementaryProperties.class, name = "SupplementaryProperties"), - @JsonSubTypes.Type(value = MeaningProperties.class, name = "MeaningProperties"), - }) -public class ReferenceableProperties -{ - private String qualifiedName = null; - private Map additionalProperties = null; - - private Date effectiveFrom = null; - private Date effectiveTo = null; - - private String typeName = null; - private Map extendedProperties = null; - - /** - * Default constructor - */ - public ReferenceableProperties() - { - super(); - } - - - /** - * Copy/clone constructor. Retrieves the values from the supplied template - * - * @param template element to copy - */ - public ReferenceableProperties(ReferenceableProperties template) - { - if (template != null) - { - qualifiedName = template.getQualifiedName(); - additionalProperties = template.getAdditionalProperties(); - - effectiveFrom = template.getEffectiveFrom(); - effectiveTo = template.getEffectiveTo(); - - typeName = template.getTypeName(); - extendedProperties = template.getExtendedProperties(); - } - } - - - /** - * Set up the fully qualified name. - * - * @param qualifiedName String name - */ - public void setQualifiedName(String qualifiedName) - { - this.qualifiedName = qualifiedName; - } - - - /** - * Returns the stored qualified name property for the metadata entity. - * If no qualified name is available then the empty string is returned. - * - * @return qualifiedName - */ - public String getQualifiedName() - { - return qualifiedName; - } - - - /** - * Set up additional properties. - * - * @param additionalProperties Additional properties object - */ - public void setAdditionalProperties(Map additionalProperties) - { - this.additionalProperties = additionalProperties; - } - - - /** - * Return a copy of the additional properties. Null means no additional properties are available. - * - * @return AdditionalProperties - */ - public Map getAdditionalProperties() - { - if (additionalProperties == null) - { - return null; - } - else if (additionalProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(additionalProperties); - } - } - - - /** - * Return the date/time that this element is effective from (null means effective from the epoch). - * - * @return date object - */ - public Date getEffectiveFrom() - { - return effectiveFrom; - } - - - /** - * Set up the date/time that this element is effective from (null means effective from the epoch). - * - * @param effectiveFrom date object - */ - public void setEffectiveFrom(Date effectiveFrom) - { - this.effectiveFrom = effectiveFrom; - } - - - /** - * Return the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @return date object - */ - public Date getEffectiveTo() - { - return effectiveTo; - } - - - /** - * Set the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @param effectiveTo date object - */ - public void setEffectiveTo(Date effectiveTo) - { - this.effectiveTo = effectiveTo; - } - - - /** - * Return the name of the open metadata type for this metadata element. - * - * @return string name - */ - public String getTypeName() - { - return typeName; - } - - - /** - * Set up the name of the open metadata type for this element. - * - * @param typeName string name - */ - public void setTypeName(String typeName) - { - this.typeName = typeName; - } - - - /** - * Return the properties that have been defined for a subtype of this object that are not supported explicitly - * by this bean. - * - * @return property map - */ - public Map getExtendedProperties() - { - if (extendedProperties == null) - { - return null; - } - else if (extendedProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(extendedProperties); - } - } - - - /** - * Set up the properties that have been defined for a subtype of this object that are not supported explicitly - * by this bean. - * - * @param extendedProperties property map - */ - public void setExtendedProperties(Map extendedProperties) - { - this.extendedProperties = extendedProperties; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "ReferenceableProperties{" + - "qualifiedName='" + qualifiedName + '\'' + - ", additionalProperties=" + additionalProperties + - ", effectiveFrom=" + effectiveFrom + - ", effectiveTo=" + effectiveTo + - ", typeName='" + typeName + '\'' + - ", extendedProperties=" + extendedProperties + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ReferenceableProperties that = (ReferenceableProperties) objectToCompare; - return Objects.equals(qualifiedName, that.qualifiedName) && - Objects.equals(additionalProperties, that.additionalProperties) && - Objects.equals(effectiveFrom, that.effectiveFrom) && - Objects.equals(effectiveTo, that.effectiveTo) && - Objects.equals(typeName, that.typeName) && - Objects.equals(extendedProperties, that.extendedProperties); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(qualifiedName, additionalProperties, effectiveFrom, effectiveTo, typeName, extendedProperties); - } -} diff --git a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/properties/RelationshipProperties.java b/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/properties/RelationshipProperties.java deleted file mode 100644 index 7a0c2330fcd..00000000000 --- a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/properties/RelationshipProperties.java +++ /dev/null @@ -1,185 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.stewardshipaction.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Date; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * RelationshipProperties provides the base class for relationships items. This provides extended properties with the ability to - * set effectivity dates. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class RelationshipProperties -{ - private Date effectiveFrom = null; - private Date effectiveTo = null; - - private Map extendedProperties = null; - - - /** - * Default constructor - */ - public RelationshipProperties() - { - super(); - } - - - /** - * Copy/clone constructor. Retrieve values from the supplied template - * - * @param template element to copy - */ - public RelationshipProperties(RelationshipProperties template) - { - if (template != null) - { - effectiveFrom = template.getEffectiveFrom(); - effectiveTo = template.getEffectiveTo(); - extendedProperties = template.getExtendedProperties(); - } - } - - - /** - * Return the date/time that this element is effective from (null means effective from the epoch). - * - * @return date object - */ - public Date getEffectiveFrom() - { - return effectiveFrom; - } - - - /** - * Set up the date/time that this element is effective from (null means effective from the epoch). - * - * @param effectiveFrom date object - */ - public void setEffectiveFrom(Date effectiveFrom) - { - this.effectiveFrom = effectiveFrom; - } - - - /** - * Return the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @return date object - */ - public Date getEffectiveTo() - { - return effectiveTo; - } - - - /** - * Set the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @param effectiveTo date object - */ - public void setEffectiveTo(Date effectiveTo) - { - this.effectiveTo = effectiveTo; - } - - - /** - * Return the properties that have been defined for a subtype of this object that are not supported explicitly - * by this bean. - * - * @return property map - */ - public Map getExtendedProperties() - { - if (extendedProperties == null) - { - return null; - } - else if (extendedProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(extendedProperties); - } - } - - - /** - * Set up the properties that have been defined for a subtype of this object that are not supported explicitly - * by this bean. - * - * @param extendedProperties property map - */ - public void setExtendedProperties(Map extendedProperties) - { - this.extendedProperties = extendedProperties; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "RelationshipProperties{" + - "effectiveFrom=" + effectiveFrom + - ", effectiveTo=" + effectiveTo + - ", extendedProperties=" + extendedProperties + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - RelationshipProperties that = (RelationshipProperties) objectToCompare; - return Objects.equals(effectiveFrom, that.effectiveFrom) && - Objects.equals(effectiveTo, that.effectiveTo); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(effectiveFrom, effectiveTo); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/properties/SupplementaryProperties.java b/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/properties/SupplementaryProperties.java deleted file mode 100644 index f62102b0e92..00000000000 --- a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/properties/SupplementaryProperties.java +++ /dev/null @@ -1,243 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.stewardshipaction.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * SupplementaryProperties describe additional information about a technical element (typically assets and schemas) - * that has been added as part of a governance process. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes( - { - @JsonSubTypes.Type(value = AssetProperties.class, name = "AssetProperties"), - }) -public class SupplementaryProperties extends ReferenceableProperties -{ - private String displayName = null; - private String summary = null; - private String description = null; - private String abbreviation = null; - private String usage = null; - - - /** - * Default constructor - */ - public SupplementaryProperties() - { - } - - - /** - * Copy/clone constructor. Note, this is a deep copy - * - * @param template object to copy - */ - public SupplementaryProperties(SupplementaryProperties template) - { - super(template); - - if (template != null) - { - displayName = template.getDisplayName(); - summary = template.getSummary(); - description = template.getDescription(); - abbreviation = template.getAbbreviation(); - usage = template.getUsage(); - } - } - - - /** - * Returns the stored display name property for the technical element. - * If no display name is available then null is returned. - * - * @return String name - */ - public String getDisplayName() - { - return displayName; - } - - - /** - * Set up the stored display name property for the technical element. - * - * @param displayName String name - */ - public void setDisplayName(String displayName) - { - this.displayName = displayName; - } - - - /** - * Return the short (1-2 sentence) description of the technical element. - * - * @return string text - */ - public String getSummary() - { - return summary; - } - - - /** - * Set up the short (1-2 sentence) description of the technical element. - * - * @param summary string text - */ - public void setSummary(String summary) - { - this.summary = summary; - } - - - /** - * Returns the stored description property for the technical element. - * If no description is provided then null is returned. - * - * @return String text - */ - public String getDescription() - { - return description; - } - - - /** - * Set up the stored description property for the technical element. - * - * @param description String text - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * Return the abbreviation used for this technical element. - * - * @return string text - */ - public String getAbbreviation() - { - return abbreviation; - } - - - /** - * Set up the abbreviation used for this technical element. - * - * @param abbreviation string text - */ - public void setAbbreviation(String abbreviation) - { - this.abbreviation = abbreviation; - } - - - /** - * Return details of the expected usage of this technical element. - * - * @return string text - */ - public String getUsage() - { - return usage; - } - - - /** - * Set up details of the expected usage of this technical element. - * - * @param usage string text - */ - public void setUsage(String usage) - { - this.usage = usage; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "SupplementaryProperties{" + - "displayName='" + displayName + '\'' + - ", summary='" + summary + '\'' + - ", description='" + description + '\'' + - ", abbreviation='" + abbreviation + '\'' + - ", usage='" + usage + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - SupplementaryProperties that = (SupplementaryProperties) objectToCompare; - return Objects.equals(getDisplayName(), that.getDisplayName()) && - Objects.equals(getSummary(), that.getSummary()) && - Objects.equals(getDescription(), that.getDescription()) && - Objects.equals(getAbbreviation(), that.getAbbreviation()) && - Objects.equals(getUsage(), that.getUsage()); - } - - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), getDisplayName(), getSummary(), getDescription(), getAbbreviation(), getUsage()); - } -} diff --git a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/properties/TemplateProperties.java b/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/properties/TemplateProperties.java deleted file mode 100644 index 95b8a926839..00000000000 --- a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/properties/TemplateProperties.java +++ /dev/null @@ -1,198 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.stewardshipaction.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * TemplateProperties defined the properties that can be overridden from the template object - * when creating an object from a template. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class TemplateProperties -{ - private String qualifiedName = null; - private String displayName = null; - private String description = null; - private String networkAddress = null; - - /** - * Default constructor - */ - public TemplateProperties() - { - super(); - } - - - /** - * Copy/clone constructor for the template properties. - * - * @param template template object to copy. - */ - public TemplateProperties(TemplateProperties template) - { - if (template != null) - { - qualifiedName = template.getQualifiedName(); - displayName = template.getDisplayName(); - description = template.getDescription(); - networkAddress = template.getNetworkAddress(); - } - } - - - /** - * Returns the stored qualified name property for the metadata entity. - * If no qualified name is available then the empty string is returned. - * - * @return qualifiedName - */ - public String getQualifiedName() - { - return qualifiedName; - } - - - /** - * Set up the fully qualified name. - * - * @param qualifiedName String name - */ - public void setQualifiedName(String qualifiedName) - { - this.qualifiedName = qualifiedName; - } - - - /** - * Returns the stored display name property for the metadata entity. - * If no display name is available then null is returned. - * - * @return String name - */ - public String getDisplayName() - { - return displayName; - } - - - /** - * Set up the stored display name property for the metadata entity. - * - * @param displayName String name - */ - public void setDisplayName(String displayName) - { - this.displayName = displayName; - } - - - /** - * Returns the stored description property for the metadata entity. - * If no description is provided then null is returned. - * - * @return description String text - */ - public String getDescription() - { - return description; - } - - - /** - * Set up the stored description property associated with the metadata entity. - * - * @param description String text - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * Return the physical network address of this metadata element (if this makes sense). - * - * @return string name - */ - public String getNetworkAddress() - { - return networkAddress; - } - - - /** - * Set up the physical network address of this metadata element (if this makes sense). - * - * @param networkAddress string name - */ - public void setNetworkAddress(String networkAddress) - { - this.networkAddress = networkAddress; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "TemplateProperties{" + - "qualifiedName='" + qualifiedName + '\'' + - ", displayName='" + displayName + '\'' + - ", description='" + description + '\'' + - ", networkAddress='" + networkAddress + '\'' + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - TemplateProperties that = (TemplateProperties) objectToCompare; - return Objects.equals(qualifiedName, that.qualifiedName) && - Objects.equals(displayName, that.displayName) && - Objects.equals(description, that.description) && - Objects.equals(networkAddress, that.networkAddress); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(qualifiedName, displayName, description, networkAddress); - } -} diff --git a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/properties/package-info.java b/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/properties/package-info.java deleted file mode 100644 index 21593cd292a..00000000000 --- a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/properties/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -/** - * These beans describe the core properties that are passed to the server to create and update metadata. - */ -package org.odpi.openmetadata.accessservices.stewardshipaction.properties; diff --git a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/rest/DuplicatesResponse.java b/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/rest/DuplicatesResponse.java deleted file mode 100644 index 74940fa9f80..00000000000 --- a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/rest/DuplicatesResponse.java +++ /dev/null @@ -1,146 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.stewardshipaction.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.stewardshipaction.metadataelements.DuplicateElement; - -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * DuplicatesResponse is a response object for passing back a list of duplicates. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class DuplicatesResponse extends StewardshipActionOMASAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public DuplicatesResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public DuplicatesResponse(DuplicatesResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return elementList; - } - } - - - /** - * Set up the list of metadata elements to return. - * - * @param elementList result object - */ - public void setElementList(List elementList) - { - this.elementList = elementList; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "DuplicatesResponse{" + - "element=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - DuplicatesResponse that = (DuplicatesResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/rest/ElementStubResponse.java b/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/rest/ElementStubResponse.java deleted file mode 100644 index 5ee812103fc..00000000000 --- a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/rest/ElementStubResponse.java +++ /dev/null @@ -1,136 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.stewardshipaction.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * ElementStubResponse is the response structure used on the OMAS REST API calls that returns - * element stub object as a response. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ElementStubResponse extends StewardshipActionOMASAPIResponse -{ - private ElementStub element = null; - - - /** - * Default constructor - */ - public ElementStubResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ElementStubResponse(ElementStubResponse template) - { - super(template); - - if (template != null) - { - this.element = template.getElement(); - } - } - - - /** - * Return the element result. - * - * @return CertificationTypeProperties object - */ - public ElementStub getElement() - { - return element; - } - - - /** - * Set up the element result. - * - * @param element CertificationTypeProperties object - */ - public void setElement(ElementStub element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ElementStubResponse{" + - "element='" + getElement() + '\'' + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof ElementStubResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ElementStubResponse that = (ElementStubResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/rest/ElementStubsResponse.java b/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/rest/ElementStubsResponse.java deleted file mode 100644 index f04b138d3ff..00000000000 --- a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/rest/ElementStubsResponse.java +++ /dev/null @@ -1,149 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.stewardshipaction.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * ElementStubListResponse is the response structure used on the OMAS REST API calls that return a - * list of element identifiers as a response. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ElementStubsResponse extends StewardshipActionOMASAPIResponse -{ - private List elements = null; - - - /** - * Default constructor - */ - public ElementStubsResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ElementStubsResponse(ElementStubsResponse template) - { - super(template); - - if (template != null) - { - this.elements = template.getElements(); - } - } - - - /** - * Return the list of element identifiers. - * - * @return list of objects or null - */ - public List getElements() - { - if (elements == null) - { - return null; - } - else if (elements.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elements); - } - } - - - /** - * Set up the list of element identifiers. - * - * @param elements - list of objects or null - */ - public void setElements(List elements) - { - this.elements = elements; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ElementStubsResponse{" + - "elements=" + elements + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof ElementStubsResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ElementStubsResponse that = (ElementStubsResponse) objectToCompare; - return Objects.equals(this.getElements(), that.getElements()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(elements, super.hashCode()); - } -} diff --git a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/rest/StewardshipActionOMASAPIRequestBody.java b/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/rest/StewardshipActionOMASAPIRequestBody.java deleted file mode 100644 index 3ba83857d8d..00000000000 --- a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/rest/StewardshipActionOMASAPIRequestBody.java +++ /dev/null @@ -1,54 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.stewardshipaction.rest; - -import com.fasterxml.jackson.annotation.*; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * StewardshipActionOMASAPIRequestBody provides a common header for Stewardship Action OMAS request bodies for its REST API. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes( - { - }) -public abstract class StewardshipActionOMASAPIRequestBody -{ - - /** - * Default constructor - */ - public StewardshipActionOMASAPIRequestBody() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public StewardshipActionOMASAPIRequestBody(StewardshipActionOMASAPIRequestBody template) - { - } - - - /** - * JSON-like toString - * - * @return string containing the class name - */ - @Override - public String toString() - { - return "StewardshipActionOMASAPIRequestBody{}"; - } -} diff --git a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/rest/StewardshipActionOMASAPIResponse.java b/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/rest/StewardshipActionOMASAPIResponse.java deleted file mode 100644 index b6587c87af4..00000000000 --- a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/rest/StewardshipActionOMASAPIResponse.java +++ /dev/null @@ -1,63 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.accessservices.stewardshipaction.rest; - -import com.fasterxml.jackson.annotation.*; -import org.odpi.openmetadata.commonservices.ffdc.rest.FFDCResponseBase; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * StewardshipActionOMASAPIResponse provides a common header for Stewardship Action OMAS managed rest to its REST API. - * It manages information about exceptions. If no exception has been raised exceptionClassName is null. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes - ({ - }) -public abstract class StewardshipActionOMASAPIResponse extends FFDCResponseBase -{ - /** - * Default constructor - */ - public StewardshipActionOMASAPIResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public StewardshipActionOMASAPIResponse(StewardshipActionOMASAPIResponse template) - { - super(template); - } - - - /** - * JSON-like toString - * - * @return string containing the property names and values - */ - @Override - public String toString() - { - return "StewardshipActionOMASAPIResponse{" + - "relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } -} diff --git a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/rest/package-info.java b/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/rest/package-info.java deleted file mode 100644 index 313aa53d168..00000000000 --- a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/rest/package-info.java +++ /dev/null @@ -1,12 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -/** - * This package defines the beans used to build the REST request and response payloads. - * - * REST APIs can pass parameters in their URLs (called path variables) as well has having a RequestBody bean - * for additional, more complex, or optional parameters. Responses are returned in response beans. - * - * The response beans encode the return type of the method as well as any exceptions and associated messages. - */ -package org.odpi.openmetadata.accessservices.stewardshipaction.rest; diff --git a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/test/java/org/odpi/openmetadata/accessservices/stewardshipaction/rest/MockAPIResponse.java b/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/test/java/org/odpi/openmetadata/accessservices/stewardshipaction/rest/MockAPIResponse.java deleted file mode 100644 index 41ed7f22032..00000000000 --- a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/test/java/org/odpi/openmetadata/accessservices/stewardshipaction/rest/MockAPIResponse.java +++ /dev/null @@ -1,27 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.stewardshipaction.rest; - -/** - * MockAPIResponse enables the overridden methods of StewardshipActionOMASAPIResponse to be tested. - */ -public class MockAPIResponse extends StewardshipActionOMASAPIResponse -{ - /** - * Default constructor - */ - public MockAPIResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to clone - */ - public MockAPIResponse(MockAPIResponse template) - { - super(template); - } -} diff --git a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/test/java/org/odpi/openmetadata/accessservices/stewardshipaction/rest/OMASAPIResponseTest.java b/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/test/java/org/odpi/openmetadata/accessservices/stewardshipaction/rest/OMASAPIResponseTest.java deleted file mode 100644 index 7dbe778050e..00000000000 --- a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/test/java/org/odpi/openmetadata/accessservices/stewardshipaction/rest/OMASAPIResponseTest.java +++ /dev/null @@ -1,21 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.stewardshipaction.rest; - -import org.testng.annotations.Test; - -import static org.testng.Assert.assertTrue; - -/** - * Test the overridden methods of StewardshipActionOMASAPIResponse - */ -public class OMASAPIResponseTest -{ - @Test public void TestToString() - { - MockAPIResponse testObject = new MockAPIResponse(); - - assertTrue(testObject.toString().contains("StewardshipActionOMASAPIResponse")); - assertTrue(new MockAPIResponse(testObject).toString().contains("StewardshipActionOMASAPIResponse")); - } -} diff --git a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-client/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/client/StewardshipAction.java b/open-metadata-implementation/access-services/stewardship-action/stewardship-action-client/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/client/StewardshipAction.java index 95950479fdb..b07788adc41 100644 --- a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-client/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/client/StewardshipAction.java +++ b/open-metadata-implementation/access-services/stewardship-action/stewardship-action-client/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/client/StewardshipAction.java @@ -5,21 +5,17 @@ import org.odpi.openmetadata.accessservices.stewardshipaction.api.DuplicateManagementInterface; import org.odpi.openmetadata.accessservices.stewardshipaction.api.SurveyReportInterface; -import org.odpi.openmetadata.accessservices.stewardshipaction.client.converters.SurveyReportConverter; -import org.odpi.openmetadata.accessservices.stewardshipaction.metadataelements.DuplicateElement; -import org.odpi.openmetadata.accessservices.stewardshipaction.rest.DuplicatesRequestBody; -import org.odpi.openmetadata.accessservices.stewardshipaction.rest.DuplicatesResponse; -import org.odpi.openmetadata.accessservices.stewardshipaction.rest.ElementStubResponse; -import org.odpi.openmetadata.accessservices.stewardshipaction.rest.ElementStubsResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; +import org.odpi.openmetadata.frameworks.surveyaction.converters.SurveyReportConverter; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.DuplicateElement; import org.odpi.openmetadata.accessservices.stewardshipaction.client.rest.StewardshipActionRESTClient; import org.odpi.openmetadata.adminservices.configuration.registration.AccessServiceDescription; import org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler; -import org.odpi.openmetadata.commonservices.ffdc.rest.NullRequestBody; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementStub; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.frameworks.governanceaction.properties.RelatedMetadataElement; import org.odpi.openmetadata.frameworks.governanceaction.search.PropertyHelper; @@ -572,7 +568,7 @@ public List getPeerDuplicates(String userId, startFrom, pageSize); - return restResult.getElementList(); + return restResult.getElements(); } diff --git a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-client/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/client/converters/StewardshipActionConverterBase.java b/open-metadata-implementation/access-services/stewardship-action/stewardship-action-client/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/client/converters/StewardshipActionConverterBase.java deleted file mode 100644 index 85372f6f5d2..00000000000 --- a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-client/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/client/converters/StewardshipActionConverterBase.java +++ /dev/null @@ -1,127 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.stewardshipaction.client.converters; - -import org.odpi.openmetadata.accessservices.stewardshipaction.metadataelements.RelatedElement; -import org.odpi.openmetadata.accessservices.stewardshipaction.properties.RelationshipProperties; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; -import org.odpi.openmetadata.frameworks.governanceaction.converters.OpenMetadataConverterBase; -import org.odpi.openmetadata.frameworks.governanceaction.properties.OpenMetadataElement; -import org.odpi.openmetadata.frameworks.governanceaction.properties.RelatedMetadataElement; -import org.odpi.openmetadata.frameworks.governanceaction.properties.OpenMetadataRelationship; -import org.odpi.openmetadata.frameworks.governanceaction.search.ElementProperties; -import org.odpi.openmetadata.frameworks.governanceaction.search.PropertyHelper; - -/** - * Base class converter for Stewardship Action OMAS. - * - * @param bean class - */ -public abstract class StewardshipActionConverterBase extends OpenMetadataConverterBase -{ - /** - * Constructor - * - * @param propertyHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public StewardshipActionConverterBase(PropertyHelper propertyHelper, - String serviceName, - String serverName) - { - super(propertyHelper, serviceName, serverName); - } - - - /** - * Using the supplied instances, return a new instance of a relatedElement bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param element entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - public RelatedElement getRelatedElement(Class beanClass, - OpenMetadataElement element, - OpenMetadataRelationship relationship, - String methodName) throws PropertyServerException - { - RelatedElement relatedElement = new RelatedElement(); - - relatedElement.setRelationshipHeader(this.getMetadataElementHeader(beanClass, relationship, relationship.getRelationshipGUID(), null, methodName)); - - if (relationship != null) - { - ElementProperties instanceProperties = new ElementProperties(relationship.getRelationshipProperties()); - - RelationshipProperties relationshipProperties = new RelationshipProperties(); - - relationshipProperties.setEffectiveFrom(relationship.getEffectiveFromTime()); - relationshipProperties.setEffectiveTo(relationship.getEffectiveToTime()); - relationshipProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - - relatedElement.setRelationshipProperties(relationshipProperties); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), OpenMetadataRelationship.class.getName(), methodName); - } - - if (element != null) - { - ElementStub elementStub = this.getElementStub(beanClass, element, methodName); - - relatedElement.setRelatedElement(elementStub); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), OpenMetadataElement.class.getName(), methodName); - } - - return relatedElement; - } - - - /** - * Using the supplied instances, return a new instance of a relatedElement bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param relatedMetadataElement results containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - public RelatedElement getRelatedElement(Class beanClass, - RelatedMetadataElement relatedMetadataElement, - String methodName) throws PropertyServerException - { - RelatedElement relatedElement = new RelatedElement(); - - relatedElement.setRelationshipHeader(this.getMetadataElementHeader(beanClass, relatedMetadataElement, relatedMetadataElement.getRelationshipGUID(), null, methodName)); - - if (relatedMetadataElement != null) - { - ElementProperties instanceProperties = new ElementProperties(relatedMetadataElement.getRelationshipProperties()); - - RelationshipProperties relationshipProperties = new RelationshipProperties(); - - relationshipProperties.setEffectiveFrom(relatedMetadataElement.getEffectiveFromTime()); - relationshipProperties.setEffectiveTo(relatedMetadataElement.getEffectiveToTime()); - relationshipProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - - relatedElement.setRelationshipProperties(relationshipProperties); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), OpenMetadataRelationship.class.getName(), methodName); - } - - return relatedElement; - } -} diff --git a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-client/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/client/converters/SurveyReportConverter.java b/open-metadata-implementation/access-services/stewardship-action/stewardship-action-client/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/client/converters/SurveyReportConverter.java deleted file mode 100644 index 9516bb1ff9f..00000000000 --- a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-client/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/client/converters/SurveyReportConverter.java +++ /dev/null @@ -1,97 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.stewardshipaction.client.converters; - -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.frameworks.governanceaction.properties.OpenMetadataElement; -import org.odpi.openmetadata.frameworks.governanceaction.properties.RelatedMetadataElement; -import org.odpi.openmetadata.frameworks.governanceaction.search.ElementProperties; -import org.odpi.openmetadata.frameworks.governanceaction.search.PropertyHelper; -import org.odpi.openmetadata.frameworks.surveyaction.properties.SurveyReport; - -import java.util.List; - - -/** - * SurveyReportConverter converts GAF elements into a survey report bean. - */ -public class SurveyReportConverter extends StewardshipActionConverterBase -{ - /** - * Constructor - * - * @param propertyHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public SurveyReportConverter(PropertyHelper propertyHelper, - String serviceName, - String serverName) - { - super(propertyHelper, serviceName, serverName); - } - - - /** - * Using the supplied instances, return a new instance of the SurveyReport bean. - * - * @param beanClass class of bean that has been requested - * @param primaryElement entity that is the root of the collection of entities that make up the - * content of the bean - * @param relationships relationships linking the entities - * @param methodName calling method - * @return bean populated with properties from the instances supplied in the constructor - * @throws PropertyServerException there is a problem instantiating the bean - */ - public SurveyReport getSurveyReport(Class beanClass, - OpenMetadataElement primaryElement, - List relationships, - String methodName) throws PropertyServerException - { - if (propertyHelper.isTypeOf(primaryElement, OpenMetadataType.SURVEY_REPORT.typeName)) - { - SurveyReport surveyReport = new SurveyReport(); - surveyReport.setElementHeader(this.getMetadataElementHeader(beanClass, primaryElement, methodName)); - - - ElementProperties elementProperties = null; - if (primaryElement.getElementProperties() != null) - { - elementProperties = new ElementProperties(primaryElement.getElementProperties()); - } - - surveyReport.setQualifiedName(super.removeQualifiedName(elementProperties)); - surveyReport.setDisplayName(super.removeDisplayName(elementProperties)); - surveyReport.setDescription(super.removeDescription(elementProperties)); - surveyReport.setPurpose(super.removePurpose(elementProperties)); - surveyReport.setUser(super.removeUser(elementProperties)); - surveyReport.setAnalysisParameters(super.removeAnalysisParameters(elementProperties)); - surveyReport.setAssetGUID(super.removeAssetGUID(elementProperties)); - surveyReport.setAnalysisStep(super.removeAnalysisStep(elementProperties)); - surveyReport.setStartDate(super.removeStartDate(elementProperties)); - surveyReport.setCompletionDate(super.removeCompletionDate(elementProperties)); - surveyReport.setCompletionMessage(super.removeCompletionMessage(elementProperties)); - surveyReport.setAdditionalProperties(super.removeAdditionalProperties(elementProperties)); - - surveyReport.setExtendedProperties(this.getRemainingExtendedProperties(elementProperties)); - - if (relationships != null) - { - for (RelatedMetadataElement relationship : relationships) - { - if (relationship != null) - { - if (propertyHelper.isTypeOf(relationship, OpenMetadataType.ENGINE_ACTION_SURVEY_REPORT_RELATIONSHIP.typeName)) - { - surveyReport.setEngineActionGUID(relationship.getElement().getElementGUID()); - break; - } - } - } - } - } - - return null; - } -} diff --git a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-client/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/client/rest/StewardshipActionRESTClient.java b/open-metadata-implementation/access-services/stewardship-action/stewardship-action-client/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/client/rest/StewardshipActionRESTClient.java index 5b9a800cc71..14fcf53879d 100644 --- a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-client/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/client/rest/StewardshipActionRESTClient.java +++ b/open-metadata-implementation/access-services/stewardship-action/stewardship-action-client/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/client/rest/StewardshipActionRESTClient.java @@ -2,9 +2,8 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.stewardshipaction.client.rest; -import org.odpi.openmetadata.accessservices.stewardshipaction.rest.DuplicatesResponse; -import org.odpi.openmetadata.accessservices.stewardshipaction.rest.ElementStubResponse; -import org.odpi.openmetadata.accessservices.stewardshipaction.rest.ElementStubsResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.DuplicatesResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.ElementStubsResponse; import org.odpi.openmetadata.commonservices.ffdc.rest.FFDCRESTClient; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; @@ -144,55 +143,4 @@ public DuplicatesResponse callDuplicatesPostRESTCall(String methodName, return restResult; } - - /** - * Issue a GET REST call that returns a ElementStubResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return ElementStubResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException something went wrong with the REST call stack. - */ - public ElementStubResponse callElementStubGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ElementStubResponse restResult = this.callGetRESTCall(methodName, ElementStubResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a GET REST call that returns a ElementStubsResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. - * @param params a list of parameters that are slotted into the url template. - * - * @return ElementStubsResponse - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException something went wrong with the REST call stack. - */ - public ElementStubsResponse callElementStubsGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ElementStubsResponse restResult = this.callGetRESTCall(methodName, ElementStubsResponse.class, urlTemplate, params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } } diff --git a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-server/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/converters/ElementHeaderConverter.java b/open-metadata-implementation/access-services/stewardship-action/stewardship-action-server/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/converters/ElementHeaderConverter.java deleted file mode 100644 index 8c51c1bbbe5..00000000000 --- a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-server/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/converters/ElementHeaderConverter.java +++ /dev/null @@ -1,100 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.stewardshipaction.converters; - -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; - -/** - * ElementHeaderConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) - * EntityDetail object into a ElementHeader bean. - */ -public class ElementHeaderConverter extends StewardshipActionOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity/relationship objects - * @param serviceName name of this component - * @param serverName local server name - */ - public ElementHeaderConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @SuppressWarnings(value = "unchecked") - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof ElementHeader) - { - if (entity != null) - { - returnBean = (B) this.getMetadataElementHeader(beanClass, entity,entity.getClassifications(), methodName); - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - } - - return returnBean; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - Relationship relationship, - String methodName) throws PropertyServerException - { - return getNewBean(beanClass, entity, methodName); - } -} diff --git a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-server/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/converters/ElementStubConverter.java b/open-metadata-implementation/access-services/stewardship-action/stewardship-action-server/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/converters/ElementStubConverter.java deleted file mode 100644 index 76ccc690d93..00000000000 --- a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-server/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/converters/ElementStubConverter.java +++ /dev/null @@ -1,221 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.stewardshipaction.converters; - - -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityProxy; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.lang.reflect.InvocationTargetException; -import java.util.ArrayList; -import java.util.List; - - -/** - * ElementStubConverter provides common methods for transferring relevant properties from an Open Metadata Repository Services (OMRS) - * EntityProxy object into an ElementStub bean. - */ -public class ElementStubConverter extends StewardshipActionOMASConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName local server name - */ - public ElementStubConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super(repositoryHelper, serviceName, serverName); - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entityProxy and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entityProxy entityProxy containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @SuppressWarnings(value = "unchecked") - public B getNewBean(Class beanClass, - EntityProxy entityProxy, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - if (returnBean instanceof ElementStub) - { - returnBean = (B)super.getElementStub(beanClass, entityProxy, methodName); - - return returnBean; - } - - return null; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an relationship and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param relationship relationship containing the properties - * @param useEnd1 should the - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - public B getNewBean(Class beanClass, - Relationship relationship, - boolean useEnd1, - String methodName) throws PropertyServerException - { - if (relationship != null) - { - if (useEnd1) - { - return getNewBean(beanClass, relationship.getEntityOneProxy(), methodName); - } - else - { - return getNewBean(beanClass, relationship.getEntityTwoProxy(), methodName); - } - } - - return null; - } - - - - /** - * Using the supplied instances, return list of new instances of the bean. - * - * @param beanClass name of the class to create - * @param relationships list of relationships containing the properties - * @param useEnd1 should the - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - public List getNewBeans(Class beanClass, - List relationships, - boolean useEnd1, - String methodName) throws PropertyServerException - { - if (relationships != null) - { - List beans = new ArrayList<>(); - - for (Relationship relationship : relationships) - { - if (relationship != null) - { - B bean = getNewBean(beanClass, relationship, useEnd1, methodName); - - if (bean != null) - { - beans.add(bean); - } - } - } - - if (! beans.isEmpty()) - { - return beans; - } - } - - return null; - } - - - /** - * Using the supplied entity, return a new instance of the bean. This is used for most beans that have - * a one to one correspondence with the repository instances. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param methodName calling method - * @return bean populated with properties from the entity supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @SuppressWarnings(value = "unchecked") - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - String methodName) throws PropertyServerException - { - try - { - /* - * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. - */ - B returnBean = beanClass.getDeclaredConstructor().newInstance(); - - EntityProxy entityProxy = repositoryHelper.getNewEntityProxy(serviceName, entity); - - if (returnBean instanceof ElementStub) - { - returnBean = (B)super.getElementStub(beanClass, entityProxy, methodName); - - return returnBean; - } - - return null; - } - catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - catch (Exception error) - { - super.handleBadEntity(beanClass.getName(), entity, methodName); - } - - return null; - } - - - /** - * Using the supplied instances, return a new instance of the bean. This is used for beans that - * contain a combination of the properties from an entity and that of a connected relationship. - * - * @param beanClass name of the class to create - * @param entity entity containing the properties - * @param relationship relationship containing the properties - * @param methodName calling method - * @return bean populated with properties from the instances supplied - * @throws PropertyServerException there is a problem instantiating the bean - */ - @SuppressWarnings(value = "unused") - @Override - public B getNewBean(Class beanClass, - EntityDetail entity, - Relationship relationship, - String methodName) throws PropertyServerException - { - return this.getNewBean(beanClass, entity, methodName); - } -} diff --git a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-server/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/converters/StewardshipActionOMASConverter.java b/open-metadata-implementation/access-services/stewardship-action/stewardship-action-server/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/converters/StewardshipActionOMASConverter.java deleted file mode 100644 index 942ba733823..00000000000 --- a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-server/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/converters/StewardshipActionOMASConverter.java +++ /dev/null @@ -1,33 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.stewardshipaction.converters; - - -import org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericConverter; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - - -/** - * StewardshipActionOMASConverter provides the generic methods for the Data Manager beans converters. Generic classes - * have limited knowledge of the classes these are working on and this means creating a new instance of a - * class from within a generic is a little involved. This class provides the generic method for creating - * and initializing a Data Manager bean. - */ -public class StewardshipActionOMASConverter extends OpenMetadataAPIGenericConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName name of this server - */ - public StewardshipActionOMASConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super (repositoryHelper, serviceName, serverName); - } - - -} diff --git a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-server/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/converters/package-info.java b/open-metadata-implementation/access-services/stewardship-action/stewardship-action-server/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/converters/package-info.java deleted file mode 100644 index ef816765994..00000000000 --- a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-server/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/converters/package-info.java +++ /dev/null @@ -1,8 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -/** - * Provides the converters that take beans from the repository services (eg entities and relationships) - * and converts them into Stewardship Action OMAS beans to return to the caller. - */ -package org.odpi.openmetadata.accessservices.stewardshipaction.converters; diff --git a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-server/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/outtopic/StewardshipActionOMRSTopicListener.java b/open-metadata-implementation/access-services/stewardship-action/stewardship-action-server/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/outtopic/StewardshipActionOMRSTopicListener.java index ce40b50a49d..47aecb268b3 100644 --- a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-server/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/outtopic/StewardshipActionOMRSTopicListener.java +++ b/open-metadata-implementation/access-services/stewardship-action/stewardship-action-server/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/outtopic/StewardshipActionOMRSTopicListener.java @@ -6,7 +6,7 @@ import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.commonservices.generichandlers.ReferenceableHandler; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementStub; import org.odpi.openmetadata.repositoryservices.connectors.omrstopic.OMRSTopicListenerBase; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Classification; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; diff --git a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-server/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/outtopic/StewardshipActionOutTopicPublisher.java b/open-metadata-implementation/access-services/stewardship-action/stewardship-action-server/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/outtopic/StewardshipActionOutTopicPublisher.java index 39458ec9242..a3b56200f53 100644 --- a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-server/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/outtopic/StewardshipActionOutTopicPublisher.java +++ b/open-metadata-implementation/access-services/stewardship-action/stewardship-action-server/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/outtopic/StewardshipActionOutTopicPublisher.java @@ -5,12 +5,12 @@ import org.odpi.openmetadata.accessservices.stewardshipaction.connectors.outtopic.StewardshipActionOutTopicServerConnector; -import org.odpi.openmetadata.accessservices.stewardshipaction.converters.ElementHeaderConverter; import org.odpi.openmetadata.accessservices.stewardshipaction.events.StewardshipActionEventType; import org.odpi.openmetadata.accessservices.stewardshipaction.events.StewardshipActionOutTopicEvent; import org.odpi.openmetadata.accessservices.stewardshipaction.ffdc.StewardshipActionAuditCode; +import org.odpi.openmetadata.commonservices.generichandlers.ElementHeaderConverter; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Classification; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; diff --git a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-server/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/server/StewardshipActionInstanceHandler.java b/open-metadata-implementation/access-services/stewardship-action/stewardship-action-server/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/server/StewardshipActionInstanceHandler.java index e267cf9f3a1..8b78a4b1cea 100644 --- a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-server/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/server/StewardshipActionInstanceHandler.java +++ b/open-metadata-implementation/access-services/stewardship-action/stewardship-action-server/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/server/StewardshipActionInstanceHandler.java @@ -2,14 +2,14 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.stewardshipaction.server; -import org.odpi.openmetadata.accessservices.stewardshipaction.converters.ElementStubConverter; import org.odpi.openmetadata.adminservices.configuration.registration.AccessServiceDescription; +import org.odpi.openmetadata.commonservices.generichandlers.ElementStubConverter; import org.odpi.openmetadata.commonservices.generichandlers.ReferenceableHandler; import org.odpi.openmetadata.commonservices.multitenant.OMASServiceInstanceHandler; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementStub; /** diff --git a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-server/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/server/StewardshipActionRESTServices.java b/open-metadata-implementation/access-services/stewardship-action/stewardship-action-server/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/server/StewardshipActionRESTServices.java index 7e75df1a916..056ebda86f5 100644 --- a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-server/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/server/StewardshipActionRESTServices.java +++ b/open-metadata-implementation/access-services/stewardship-action/stewardship-action-server/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/server/StewardshipActionRESTServices.java @@ -3,24 +3,21 @@ package org.odpi.openmetadata.accessservices.stewardshipaction.server; -import org.odpi.openmetadata.accessservices.stewardshipaction.converters.ElementStubConverter; -import org.odpi.openmetadata.accessservices.stewardshipaction.metadataelements.DuplicateElement; -import org.odpi.openmetadata.accessservices.stewardshipaction.properties.DuplicateProperties; -import org.odpi.openmetadata.accessservices.stewardshipaction.rest.DuplicatesRequestBody; -import org.odpi.openmetadata.accessservices.stewardshipaction.rest.DuplicatesResponse; -import org.odpi.openmetadata.accessservices.stewardshipaction.rest.ElementStubResponse; -import org.odpi.openmetadata.accessservices.stewardshipaction.rest.ElementStubsResponse; + import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; -import org.odpi.openmetadata.commonservices.ffdc.rest.ConnectionResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.odpi.openmetadata.commonservices.ffdc.rest.NullRequestBody; import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; +import org.odpi.openmetadata.commonservices.generichandlers.ElementStubConverter; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.DuplicateElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.DuplicateProperties; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.commonservices.generichandlers.ReferenceableHandler; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementStub; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityProxy; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; @@ -66,16 +63,16 @@ public StewardshipActionRESTServices() * UserNotAuthorizedException user not authorized to issue this request or * PropertyServerException problem retrieving the discovery engine definition. */ - public ConnectionResponse getOutTopicConnection(String serverName, - String userId, - String callerId) + public OCFConnectionResponse getOutTopicConnection(String serverName, + String userId, + String callerId) { final String methodName = "getOutTopicConnection"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - ConnectionResponse response = new ConnectionResponse(); - AuditLog auditLog = null; + OCFConnectionResponse response = new OCFConnectionResponse(); + AuditLog auditLog = null; try { @@ -452,7 +449,7 @@ public DuplicatesResponse getPeerDuplicates(String serverName, peerProxy = relationship.getEntityTwoProxy(); } - duplicateProperties.setDuplicateElement(converter.getNewBean(ElementStub.class, peerProxy, methodName)); + duplicateProperties.setDuplicateGUID(peerProxy.getGUID()); duplicateElement.setDuplicateProperties(duplicateProperties); } @@ -464,7 +461,7 @@ public DuplicatesResponse getPeerDuplicates(String serverName, if (! results.isEmpty()) { - response.setElementList(results); + response.setElements(results); } } catch (Exception error) @@ -838,7 +835,7 @@ public ElementStubResponse getConsolidatedDuplicate(String serverName, { ElementStubConverter converter = instanceHandler.getElementStubConverter(userId, serverName, methodName); - ElementStub elementStub = converter.getNewBean(ElementStub.class, relationship.getEntityTwoProxy(), methodName); + ElementStub elementStub = converter.getElementStub(ElementStub.class, relationship.getEntityTwoProxy(), methodName); response.setElement(elementStub); } diff --git a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-server/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/server/StewardshipActionServicesInstance.java b/open-metadata-implementation/access-services/stewardship-action/stewardship-action-server/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/server/StewardshipActionServicesInstance.java index f67b8179cbf..a280b659de4 100644 --- a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-server/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/server/StewardshipActionServicesInstance.java +++ b/open-metadata-implementation/access-services/stewardship-action/stewardship-action-server/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/server/StewardshipActionServicesInstance.java @@ -2,14 +2,14 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.stewardshipaction.server; -import org.odpi.openmetadata.accessservices.stewardshipaction.converters.ElementStubConverter; import org.odpi.openmetadata.accessservices.stewardshipaction.ffdc.StewardshipActionErrorCode; import org.odpi.openmetadata.adminservices.configuration.registration.AccessServiceDescription; +import org.odpi.openmetadata.commonservices.generichandlers.ElementStubConverter; import org.odpi.openmetadata.commonservices.generichandlers.ReferenceableHandler; import org.odpi.openmetadata.commonservices.multitenant.OMASServiceInstance; import org.odpi.openmetadata.commonservices.multitenant.ffdc.exceptions.NewInstanceException; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementStub; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryConnector; import java.util.List; diff --git a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-spring/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/server/spring/StewardshipActionResource.java b/open-metadata-implementation/access-services/stewardship-action/stewardship-action-spring/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/server/spring/StewardshipActionResource.java index e477a0998aa..54a9f54edb1 100644 --- a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-spring/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/server/spring/StewardshipActionResource.java +++ b/open-metadata-implementation/access-services/stewardship-action/stewardship-action-spring/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/server/spring/StewardshipActionResource.java @@ -4,14 +4,8 @@ import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.accessservices.stewardshipaction.rest.DuplicatesRequestBody; -import org.odpi.openmetadata.accessservices.stewardshipaction.rest.DuplicatesResponse; -import org.odpi.openmetadata.accessservices.stewardshipaction.rest.ElementStubResponse; -import org.odpi.openmetadata.accessservices.stewardshipaction.rest.ElementStubsResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.odpi.openmetadata.accessservices.stewardshipaction.server.StewardshipActionRESTServices; -import org.odpi.openmetadata.commonservices.ffdc.rest.ConnectionResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NullRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; @@ -58,9 +52,9 @@ public StewardshipActionResource() */ @GetMapping(path = "/topics/out-topic-connection/{callerId}") - public ConnectionResponse getOutTopicConnection(@PathVariable String serverName, - @PathVariable String userId, - @PathVariable String callerId) + public OCFConnectionResponse getOutTopicConnection(@PathVariable String serverName, + @PathVariable String userId, + @PathVariable String callerId) { return restAPI.getOutTopicConnection(serverName, userId, callerId); } diff --git a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-topic-connectors/build.gradle b/open-metadata-implementation/access-services/stewardship-action/stewardship-action-topic-connectors/build.gradle index 9c2e4584d69..14627a70a7d 100644 --- a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-topic-connectors/build.gradle +++ b/open-metadata-implementation/access-services/stewardship-action/stewardship-action-topic-connectors/build.gradle @@ -6,6 +6,7 @@ dependencies { implementation project(':open-metadata-implementation:frameworks:audit-log-framework') + implementation project(':open-metadata-implementation:frameworks:open-metadata-framework') implementation project(':open-metadata-implementation:frameworks:open-connector-framework') implementation project(':open-metadata-implementation:repository-services:repository-services-apis') implementation project(':open-metadata-implementation:access-services:stewardship-action:stewardship-action-api') diff --git a/open-metadata-implementation/adapters/open-connectors/configuration-store-connectors/configuration-encrypted-file-store-connector/build.gradle b/open-metadata-implementation/adapters/open-connectors/configuration-store-connectors/configuration-encrypted-file-store-connector/build.gradle index 6493158497c..d8f9d9f5ec8 100644 --- a/open-metadata-implementation/adapters/open-connectors/configuration-store-connectors/configuration-encrypted-file-store-connector/build.gradle +++ b/open-metadata-implementation/adapters/open-connectors/configuration-store-connectors/configuration-encrypted-file-store-connector/build.gradle @@ -7,6 +7,7 @@ dependencies { implementation 'com.google.crypto.tink:tink' implementation project(':open-metadata-implementation:frameworks:audit-log-framework') + implementation project(':open-metadata-implementation:frameworks:open-metadata-framework') implementation project(':open-metadata-implementation:frameworks:open-connector-framework') implementation project(':open-metadata-implementation:admin-services:admin-services-api') implementation 'org.slf4j:slf4j-api' diff --git a/open-metadata-implementation/adapters/open-connectors/configuration-store-connectors/configuration-file-store-connector/build.gradle b/open-metadata-implementation/adapters/open-connectors/configuration-store-connectors/configuration-file-store-connector/build.gradle index 89e23011df1..73123ecd6d9 100644 --- a/open-metadata-implementation/adapters/open-connectors/configuration-store-connectors/configuration-file-store-connector/build.gradle +++ b/open-metadata-implementation/adapters/open-connectors/configuration-store-connectors/configuration-file-store-connector/build.gradle @@ -5,7 +5,8 @@ dependencies { - implementation project(':open-metadata-implementation:frameworks:audit-log-framework') + compileOnly project(':open-metadata-implementation:frameworks:audit-log-framework') + compileOnly project(':open-metadata-implementation:frameworks:open-metadata-framework') implementation project(':open-metadata-implementation:frameworks:open-connector-framework') implementation project(':open-metadata-implementation:admin-services:admin-services-api') implementation 'org.slf4j:slf4j-api' diff --git a/open-metadata-implementation/adapters/open-connectors/configuration-store-connectors/configuration-file-store-connector/src/test/java/org/odpi/openmetadata/adapters/adminservices/configurationstore/file/TestFileBasedServerConfigStoreConnector.java b/open-metadata-implementation/adapters/open-connectors/configuration-store-connectors/configuration-file-store-connector/src/test/java/org/odpi/openmetadata/adapters/adminservices/configurationstore/file/TestFileBasedServerConfigStoreConnector.java index 12dfe7df5fc..1e2639f45cc 100644 --- a/open-metadata-implementation/adapters/open-connectors/configuration-store-connectors/configuration-file-store-connector/src/test/java/org/odpi/openmetadata/adapters/adminservices/configurationstore/file/TestFileBasedServerConfigStoreConnector.java +++ b/open-metadata-implementation/adapters/open-connectors/configuration-store-connectors/configuration-file-store-connector/src/test/java/org/odpi/openmetadata/adapters/adminservices/configurationstore/file/TestFileBasedServerConfigStoreConnector.java @@ -4,18 +4,16 @@ import org.junit.jupiter.api.Test; import org.odpi.openmetadata.frameworks.connectors.ffdc.OCFRuntimeException; -import org.odpi.openmetadata.frameworks.connectors.properties.ConnectionProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.SecurityTags; -import java.io.File; -import java.io.IOException; import java.util.Set; import static org.junit.jupiter.api.Assertions.*; -public class TestFileBasedServerConfigStoreConnector { +public class TestFileBasedServerConfigStoreConnector +{ @Test - void testGetConfigsPathName() { + void testGetConfigsPathName() + { FileBasedServerConfigStoreConnector connector = new FileBasedServerConfigStoreConnector(); String templateString = "src/test/resources/test1/data/servers/{0}/config/{0}.config"; @@ -58,18 +56,24 @@ void testGetConfigsPathName() { assertEquals(1, fileNames.size()); // check for invalid templates - try { + try + { templateString = "src/test/resources/test10/data/{0}/{0}/{0}.config"; connector.getFileNames(templateString, "testMethod"); assertFalse(true, "Expected an error"); - } catch (OCFRuntimeException e) { + } + catch (OCFRuntimeException e) + { } - try { + try + { templateString = "src/test/resources/test10/data/test/my.config"; connector.getFileNames(templateString, "testMethod"); assertFalse(true, "Expected an error"); - } catch (OCFRuntimeException e) { + } + catch (OCFRuntimeException e) + { } diff --git a/open-metadata-implementation/adapters/open-connectors/connector-configuration-factory/build.gradle b/open-metadata-implementation/adapters/open-connectors/connector-configuration-factory/build.gradle index 6fed5ec9e97..2788fba8bef 100644 --- a/open-metadata-implementation/adapters/open-connectors/connector-configuration-factory/build.gradle +++ b/open-metadata-implementation/adapters/open-connectors/connector-configuration-factory/build.gradle @@ -7,6 +7,7 @@ dependencies { implementation 'org.slf4j:slf4j-api' implementation project(':open-metadata-implementation:frameworks:audit-log-framework') + implementation project(':open-metadata-implementation:frameworks:open-metadata-framework') implementation project(':open-metadata-implementation:frameworks:open-connector-framework') implementation project(':open-metadata-implementation:repository-services:repository-services-apis') compileOnly 'com.fasterxml.jackson.core:jackson-annotations' diff --git a/open-metadata-implementation/adapters/open-connectors/data-manager-connectors/postgres-server-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/postgres/catalog/PostgresServerIntegrationConnector.java b/open-metadata-implementation/adapters/open-connectors/data-manager-connectors/postgres-server-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/postgres/catalog/PostgresServerIntegrationConnector.java index bfc5a7f34c7..87857df9638 100644 --- a/open-metadata-implementation/adapters/open-connectors/data-manager-connectors/postgres-server-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/postgres/catalog/PostgresServerIntegrationConnector.java +++ b/open-metadata-implementation/adapters/open-connectors/data-manager-connectors/postgres-server-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/postgres/catalog/PostgresServerIntegrationConnector.java @@ -13,7 +13,7 @@ import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; import org.odpi.openmetadata.frameworks.connectors.properties.beans.ConnectorType; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStatus; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ElementStatus; import org.odpi.openmetadata.frameworks.openmetadata.enums.OperationalStatus; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; diff --git a/open-metadata-implementation/adapters/open-connectors/data-manager-connectors/unity-catalog-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/unitycatalog/sync/OSSUnityCatalogInsideCatalogSyncBase.java b/open-metadata-implementation/adapters/open-connectors/data-manager-connectors/unity-catalog-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/unitycatalog/sync/OSSUnityCatalogInsideCatalogSyncBase.java index 148b5e41568..6b3006d055b 100644 --- a/open-metadata-implementation/adapters/open-connectors/data-manager-connectors/unity-catalog-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/unitycatalog/sync/OSSUnityCatalogInsideCatalogSyncBase.java +++ b/open-metadata-implementation/adapters/open-connectors/data-manager-connectors/unity-catalog-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/unitycatalog/sync/OSSUnityCatalogInsideCatalogSyncBase.java @@ -12,7 +12,7 @@ import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStatus; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ElementStatus; import org.odpi.openmetadata.frameworks.governanceaction.controls.PlaceholderProperty; import org.odpi.openmetadata.frameworks.governanceaction.properties.ExternalIdentifierProperties; import org.odpi.openmetadata.frameworks.governanceaction.properties.MetadataCorrelationHeader; diff --git a/open-metadata-implementation/adapters/open-connectors/data-manager-connectors/unity-catalog-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/unitycatalog/sync/OSSUnityCatalogInsideCatalogSyncFunctions.java b/open-metadata-implementation/adapters/open-connectors/data-manager-connectors/unity-catalog-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/unitycatalog/sync/OSSUnityCatalogInsideCatalogSyncFunctions.java index efe6e77b66f..818ca14a7bf 100644 --- a/open-metadata-implementation/adapters/open-connectors/data-manager-connectors/unity-catalog-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/unitycatalog/sync/OSSUnityCatalogInsideCatalogSyncFunctions.java +++ b/open-metadata-implementation/adapters/open-connectors/data-manager-connectors/unity-catalog-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/unitycatalog/sync/OSSUnityCatalogInsideCatalogSyncFunctions.java @@ -11,7 +11,7 @@ import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStatus; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ElementStatus; import org.odpi.openmetadata.frameworks.governanceaction.controls.PlaceholderProperty; import org.odpi.openmetadata.frameworks.governanceaction.search.ElementProperties; import org.odpi.openmetadata.frameworks.integration.iterator.IntegrationIterator; diff --git a/open-metadata-implementation/adapters/open-connectors/data-manager-connectors/unity-catalog-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/unitycatalog/sync/OSSUnityCatalogInsideCatalogSyncSchema.java b/open-metadata-implementation/adapters/open-connectors/data-manager-connectors/unity-catalog-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/unitycatalog/sync/OSSUnityCatalogInsideCatalogSyncSchema.java index 645417a0250..0ef04df70b9 100644 --- a/open-metadata-implementation/adapters/open-connectors/data-manager-connectors/unity-catalog-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/unitycatalog/sync/OSSUnityCatalogInsideCatalogSyncSchema.java +++ b/open-metadata-implementation/adapters/open-connectors/data-manager-connectors/unity-catalog-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/unitycatalog/sync/OSSUnityCatalogInsideCatalogSyncSchema.java @@ -11,7 +11,7 @@ import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStatus; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ElementStatus; import org.odpi.openmetadata.frameworks.governanceaction.controls.PlaceholderProperty; import org.odpi.openmetadata.frameworks.governanceaction.search.ElementProperties; import org.odpi.openmetadata.frameworks.integration.iterator.IntegrationIterator; diff --git a/open-metadata-implementation/adapters/open-connectors/data-manager-connectors/unity-catalog-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/unitycatalog/sync/OSSUnityCatalogInsideCatalogSyncTables.java b/open-metadata-implementation/adapters/open-connectors/data-manager-connectors/unity-catalog-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/unitycatalog/sync/OSSUnityCatalogInsideCatalogSyncTables.java index 2b92b7996fe..dba918c3bba 100644 --- a/open-metadata-implementation/adapters/open-connectors/data-manager-connectors/unity-catalog-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/unitycatalog/sync/OSSUnityCatalogInsideCatalogSyncTables.java +++ b/open-metadata-implementation/adapters/open-connectors/data-manager-connectors/unity-catalog-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/unitycatalog/sync/OSSUnityCatalogInsideCatalogSyncTables.java @@ -11,9 +11,8 @@ import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStatus; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ElementStatus; import org.odpi.openmetadata.frameworks.governanceaction.controls.PlaceholderProperty; -import org.odpi.openmetadata.frameworks.governanceaction.properties.OpenMetadataElement; import org.odpi.openmetadata.frameworks.governanceaction.properties.RelatedMetadataElement; import org.odpi.openmetadata.frameworks.governanceaction.search.ElementProperties; import org.odpi.openmetadata.frameworks.integration.iterator.IntegrationIterator; diff --git a/open-metadata-implementation/adapters/open-connectors/data-manager-connectors/unity-catalog-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/unitycatalog/sync/OSSUnityCatalogInsideCatalogSyncVolumes.java b/open-metadata-implementation/adapters/open-connectors/data-manager-connectors/unity-catalog-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/unitycatalog/sync/OSSUnityCatalogInsideCatalogSyncVolumes.java index c03ffa2814c..9f179621218 100644 --- a/open-metadata-implementation/adapters/open-connectors/data-manager-connectors/unity-catalog-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/unitycatalog/sync/OSSUnityCatalogInsideCatalogSyncVolumes.java +++ b/open-metadata-implementation/adapters/open-connectors/data-manager-connectors/unity-catalog-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/unitycatalog/sync/OSSUnityCatalogInsideCatalogSyncVolumes.java @@ -13,7 +13,7 @@ import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStatus; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ElementStatus; import org.odpi.openmetadata.frameworks.governanceaction.controls.PlaceholderProperty; import org.odpi.openmetadata.frameworks.governanceaction.search.ElementProperties; import org.odpi.openmetadata.frameworks.integration.iterator.IntegrationIterator; diff --git a/open-metadata-implementation/adapters/open-connectors/data-manager-connectors/unity-catalog-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/unitycatalog/sync/OSSUnityCatalogServerSyncCatalog.java b/open-metadata-implementation/adapters/open-connectors/data-manager-connectors/unity-catalog-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/unitycatalog/sync/OSSUnityCatalogServerSyncCatalog.java index 72cf4ba884d..490bef0358c 100644 --- a/open-metadata-implementation/adapters/open-connectors/data-manager-connectors/unity-catalog-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/unitycatalog/sync/OSSUnityCatalogServerSyncCatalog.java +++ b/open-metadata-implementation/adapters/open-connectors/data-manager-connectors/unity-catalog-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/unitycatalog/sync/OSSUnityCatalogServerSyncCatalog.java @@ -11,7 +11,7 @@ import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStatus; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ElementStatus; import org.odpi.openmetadata.frameworks.governanceaction.controls.PlaceholderProperty; import org.odpi.openmetadata.frameworks.governanceaction.properties.CatalogTarget; import org.odpi.openmetadata.frameworks.governanceaction.search.ElementProperties; diff --git a/open-metadata-implementation/adapters/open-connectors/data-store-connectors/file-connectors/csv-file-connector/build.gradle b/open-metadata-implementation/adapters/open-connectors/data-store-connectors/file-connectors/csv-file-connector/build.gradle index fbb487fb1db..bf38e569a24 100644 --- a/open-metadata-implementation/adapters/open-connectors/data-store-connectors/file-connectors/csv-file-connector/build.gradle +++ b/open-metadata-implementation/adapters/open-connectors/data-store-connectors/file-connectors/csv-file-connector/build.gradle @@ -14,6 +14,7 @@ dependencies { testImplementation 'org.testng:testng' testImplementation project(':open-metadata-implementation:frameworks:audit-log-framework') testImplementation project(':open-metadata-implementation:repository-services:repository-services-apis') + testImplementation project(':open-metadata-implementation:frameworks:open-metadata-framework') testImplementation project(':open-metadata-implementation:frameworks:open-connector-framework') testImplementation project(':open-metadata-implementation:frameworks:governance-action-framework') testImplementation project(':open-metadata-test:open-metadata-ut') diff --git a/open-metadata-implementation/adapters/open-connectors/data-store-connectors/file-connectors/data-folder-connector/build.gradle b/open-metadata-implementation/adapters/open-connectors/data-store-connectors/file-connectors/data-folder-connector/build.gradle index 56d93a5c647..df2e0a6f324 100644 --- a/open-metadata-implementation/adapters/open-connectors/data-store-connectors/file-connectors/data-folder-connector/build.gradle +++ b/open-metadata-implementation/adapters/open-connectors/data-store-connectors/file-connectors/data-folder-connector/build.gradle @@ -13,6 +13,7 @@ dependencies { compileOnly 'org.slf4j:slf4j-api' testImplementation project(':open-metadata-implementation:frameworks:audit-log-framework') testImplementation project(':open-metadata-implementation:repository-services:repository-services-apis') + testImplementation project(':open-metadata-implementation:frameworks:open-metadata-framework') testImplementation project(':open-metadata-implementation:frameworks:open-connector-framework') testImplementation project(':open-metadata-implementation:frameworks:governance-action-framework') testImplementation project(':open-metadata-test:open-metadata-ut') diff --git a/open-metadata-implementation/adapters/open-connectors/event-bus-connectors/open-metadata-topic-connectors/inmemory-open-metadata-topic-connector/build.gradle b/open-metadata-implementation/adapters/open-connectors/event-bus-connectors/open-metadata-topic-connectors/inmemory-open-metadata-topic-connector/build.gradle index 753a4a3aaf2..6ed4f4e41a2 100644 --- a/open-metadata-implementation/adapters/open-connectors/event-bus-connectors/open-metadata-topic-connectors/inmemory-open-metadata-topic-connector/build.gradle +++ b/open-metadata-implementation/adapters/open-connectors/event-bus-connectors/open-metadata-topic-connectors/inmemory-open-metadata-topic-connector/build.gradle @@ -8,6 +8,7 @@ description = 'In-memory Open Metadata Topic Connector' dependencies { compileOnly project(':open-metadata-implementation:frameworks:open-connector-framework') + compileOnly project(':open-metadata-implementation:frameworks:open-metadata-framework') compileOnly project(':open-metadata-implementation:frameworks:audit-log-framework') compileOnly project(':open-metadata-implementation:repository-services:repository-services-apis') compileOnly 'com.fasterxml.jackson.core:jackson-annotations' diff --git a/open-metadata-implementation/adapters/open-connectors/file-survey-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/surveyaction/surveycsv/CSVSurveyService.java b/open-metadata-implementation/adapters/open-connectors/file-survey-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/surveyaction/surveycsv/CSVSurveyService.java index 6b92c632f9f..0678d4d4651 100644 --- a/open-metadata-implementation/adapters/open-connectors/file-survey-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/surveyaction/surveycsv/CSVSurveyService.java +++ b/open-metadata-implementation/adapters/open-connectors/file-survey-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/surveyaction/surveycsv/CSVSurveyService.java @@ -13,13 +13,13 @@ import org.odpi.openmetadata.frameworks.connectors.properties.AssetUniverse; import org.odpi.openmetadata.frameworks.connectors.properties.NestedSchemaType; import org.odpi.openmetadata.frameworks.connectors.properties.SchemaAttributes; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStatus; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ElementStatus; import org.odpi.openmetadata.frameworks.connectors.properties.beans.SchemaAttribute; import org.odpi.openmetadata.frameworks.connectors.properties.beans.SchemaType; import org.odpi.openmetadata.frameworks.governanceaction.OpenMetadataStore; -import org.odpi.openmetadata.frameworks.governanceaction.properties.ArchiveProperties; import org.odpi.openmetadata.frameworks.governanceaction.search.ElementProperties; import org.odpi.openmetadata.frameworks.governanceaction.search.PropertyHelper; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ArchiveProperties; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.frameworks.surveyaction.AnnotationStore; diff --git a/open-metadata-implementation/adapters/open-connectors/governance-action-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/governanceactions/provisioning/MoveCopyFileGovernanceActionConnector.java b/open-metadata-implementation/adapters/open-connectors/governance-action-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/governanceactions/provisioning/MoveCopyFileGovernanceActionConnector.java index 6f4ad66af2f..5597a9776cb 100644 --- a/open-metadata-implementation/adapters/open-connectors/governance-action-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/governanceactions/provisioning/MoveCopyFileGovernanceActionConnector.java +++ b/open-metadata-implementation/adapters/open-connectors/governance-action-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/governanceactions/provisioning/MoveCopyFileGovernanceActionConnector.java @@ -8,7 +8,7 @@ import org.odpi.openmetadata.adapters.connectors.governanceactions.ffdc.GovernanceActionConnectorsErrorCode; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.*; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStatus; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ElementStatus; import org.odpi.openmetadata.frameworks.governanceaction.OpenMetadataStore; import org.odpi.openmetadata.frameworks.governanceaction.ProvisioningGovernanceActionService; import org.odpi.openmetadata.frameworks.governanceaction.fileclassifier.FileClassification; diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/csv-lineage-import-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/csvlineageimporter/CSVLineageImporterConnector.java b/open-metadata-implementation/adapters/open-connectors/integration-connectors/csv-lineage-import-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/csvlineageimporter/CSVLineageImporterConnector.java index 399d5bde07d..36137a6d262 100644 --- a/open-metadata-implementation/adapters/open-connectors/integration-connectors/csv-lineage-import-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/csvlineageimporter/CSVLineageImporterConnector.java +++ b/open-metadata-implementation/adapters/open-connectors/integration-connectors/csv-lineage-import-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/csvlineageimporter/CSVLineageImporterConnector.java @@ -14,7 +14,7 @@ import org.odpi.openmetadata.frameworks.connectors.properties.EndpointProperties; import org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection; import org.odpi.openmetadata.frameworks.connectors.properties.beans.ConnectorType; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStatus; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ElementStatus; import org.odpi.openmetadata.frameworks.connectors.properties.beans.Endpoint; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; import org.odpi.openmetadata.frameworks.governanceaction.properties.OpenMetadataElement; diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/egeria-infrastructure-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/egeria/EgeriaCataloguerIntegrationConnector.java b/open-metadata-implementation/adapters/open-connectors/integration-connectors/egeria-infrastructure-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/egeria/EgeriaCataloguerIntegrationConnector.java index 0ad97c57907..986d9115427 100644 --- a/open-metadata-implementation/adapters/open-connectors/integration-connectors/egeria-infrastructure-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/egeria/EgeriaCataloguerIntegrationConnector.java +++ b/open-metadata-implementation/adapters/open-connectors/integration-connectors/egeria-infrastructure-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/egeria/EgeriaCataloguerIntegrationConnector.java @@ -6,18 +6,18 @@ import org.odpi.openmetadata.accessservices.itinfrastructure.api.ITInfrastructureEventListener; import org.odpi.openmetadata.accessservices.itinfrastructure.events.ITInfrastructureOutTopicEvent; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.DeploymentElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.EndpointElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.SoftwareServerElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.SoftwareServerPlatformElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.DataAssetProperties; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.ProcessProperties; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.ProcessStatus; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.ServerAssetUseProperties; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ProcessStatus; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.DeploymentElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.EndpointElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.SoftwareServerElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.SoftwareServerPlatformElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.DataAssetProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.processes.ProcessProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.infrastructure.ServerAssetUseProperties; import org.odpi.openmetadata.frameworks.openmetadata.enums.ServerAssetUseType; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.SoftwareCapabilityProperties; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.SoftwareServerPlatformProperties; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.SoftwareServerProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities.SoftwareCapabilityProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.infrastructure.SoftwareServerPlatformProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.infrastructure.SoftwareServerProperties; import org.odpi.openmetadata.adminservices.client.ConfigurationManagementClient; import org.odpi.openmetadata.adminservices.configuration.properties.AccessServiceConfig; import org.odpi.openmetadata.adminservices.configuration.properties.CohortConfig; @@ -749,7 +749,7 @@ private void createConnector(String serviceGUID, processProperties.setQualifiedName(serverName + ":" + serviceName + ":" + connectorName); processProperties.setName(connectorName); - processProperties.setDescription(connectorDescription); + processProperties.setResourceDescription(connectorDescription); processProperties.setImplementationLanguage("Java"); String connectorProviderClassName = connectorConnection.getConnectorType().getConnectorProviderClassName(); @@ -832,7 +832,7 @@ private SoftwareServerProperties getSoftwareServerProperties(OMAGServerConfig se softwareServerProperties.setQualifiedName(this.getServerQualifiedName(serverConfig.getLocalServerId(), serverConfig.getLocalServerName())); softwareServerProperties.setName(serverConfig.getLocalServerName()); - softwareServerProperties.setDescription(serverConfig.getLocalServerDescription()); + softwareServerProperties.setResourceDescription(serverConfig.getLocalServerDescription()); softwareServerProperties.setSoftwareServerSource("Egeria"); softwareServerProperties.setSoftwareServerVersion(serverConfig.getVersionId()); softwareServerProperties.setSoftwareServerUserId(serverConfig.getLocalServerUserId()); @@ -900,8 +900,8 @@ String createSoftwareService(String serverGUID, } properties.setQualifiedName(serverName + ":" + serviceFullName); - properties.setDisplayName(serviceFullName); - properties.setDescription(serviceDescription); + properties.setResourceName(serviceFullName); + properties.setResourceDescription(serviceDescription); Map additionalProperties = new HashMap<>(); diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/files-integration-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/basicfiles/BasicFilesMonitorIntegrationConnectorBase.java b/open-metadata-implementation/adapters/open-connectors/integration-connectors/files-integration-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/basicfiles/BasicFilesMonitorIntegrationConnectorBase.java index 3112a79f7c6..6e0aabc5368 100644 --- a/open-metadata-implementation/adapters/open-connectors/integration-connectors/files-integration-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/basicfiles/BasicFilesMonitorIntegrationConnectorBase.java +++ b/open-metadata-implementation/adapters/open-connectors/integration-connectors/files-integration-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/basicfiles/BasicFilesMonitorIntegrationConnectorBase.java @@ -4,10 +4,10 @@ package org.odpi.openmetadata.adapters.connectors.integration.basicfiles; import org.apache.commons.io.FileUtils; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.DataFileElement; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.FileFolderElement; -import org.odpi.openmetadata.accessservices.datamanager.properties.ArchiveProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.FileFolderProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.DataFileElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.FileFolderElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ArchiveProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.filesandfolders.FileFolderProperties; import org.odpi.openmetadata.adapters.connectors.integration.basicfiles.ffdc.BasicFilesIntegrationConnectorsAuditCode; import org.odpi.openmetadata.adapters.connectors.integration.basicfiles.ffdc.BasicFilesIntegrationConnectorsErrorCode; import org.odpi.openmetadata.adapters.connectors.integration.basicfiles.ffdc.exception.ConfigException; diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/files-integration-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/basicfiles/DataFilesMonitorForTarget.java b/open-metadata-implementation/adapters/open-connectors/integration-connectors/files-integration-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/basicfiles/DataFilesMonitorForTarget.java index 1d780268c2a..bffb79aca3a 100644 --- a/open-metadata-implementation/adapters/open-connectors/integration-connectors/files-integration-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/basicfiles/DataFilesMonitorForTarget.java +++ b/open-metadata-implementation/adapters/open-connectors/integration-connectors/files-integration-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/basicfiles/DataFilesMonitorForTarget.java @@ -3,9 +3,9 @@ package org.odpi.openmetadata.adapters.connectors.integration.basicfiles; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.DataFileElement; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.FileFolderElement; -import org.odpi.openmetadata.accessservices.datamanager.properties.DataFileProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.DataFileElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.FileFolderElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.filesandfolders.DataFileProperties; import org.odpi.openmetadata.accessservices.datamanager.properties.TemplateProperties; import org.odpi.openmetadata.adapters.connectors.integration.basicfiles.ffdc.BasicFilesIntegrationConnectorsAuditCode; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/files-integration-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/basicfiles/DataFilesMonitorIntegrationConnector.java b/open-metadata-implementation/adapters/open-connectors/integration-connectors/files-integration-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/basicfiles/DataFilesMonitorIntegrationConnector.java index 539c29232ca..9293f929e6f 100644 --- a/open-metadata-implementation/adapters/open-connectors/integration-connectors/files-integration-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/basicfiles/DataFilesMonitorIntegrationConnector.java +++ b/open-metadata-implementation/adapters/open-connectors/integration-connectors/files-integration-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/basicfiles/DataFilesMonitorIntegrationConnector.java @@ -3,14 +3,14 @@ package org.odpi.openmetadata.adapters.connectors.integration.basicfiles; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.DataFileElement; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.FileFolderElement; import org.odpi.openmetadata.adapters.connectors.datastore.basicfile.BasicFolderProvider; import org.odpi.openmetadata.adapters.connectors.integration.basicfiles.ffdc.BasicFilesIntegrationConnectorsAuditCode; import org.odpi.openmetadata.adapters.connectors.integration.basicfiles.ffdc.BasicFilesIntegrationConnectorsErrorCode; import org.odpi.openmetadata.adapters.connectors.integration.basicfiles.ffdc.exception.FileException; import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException; import org.odpi.openmetadata.frameworks.openmetadata.enums.DeleteMethod; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.DataFileElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.FileFolderElement; import org.odpi.openmetadata.frameworks.openmetadata.refdata.DeployedImplementationType; import java.io.File; diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/files-integration-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/basicfiles/DataFolderMonitorForTarget.java b/open-metadata-implementation/adapters/open-connectors/integration-connectors/files-integration-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/basicfiles/DataFolderMonitorForTarget.java index 15d4f3c89ad..c1b9c9cb8dc 100644 --- a/open-metadata-implementation/adapters/open-connectors/integration-connectors/files-integration-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/basicfiles/DataFolderMonitorForTarget.java +++ b/open-metadata-implementation/adapters/open-connectors/integration-connectors/files-integration-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/basicfiles/DataFolderMonitorForTarget.java @@ -3,8 +3,8 @@ package org.odpi.openmetadata.adapters.connectors.integration.basicfiles; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.FileFolderElement; -import org.odpi.openmetadata.accessservices.datamanager.properties.FileFolderProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.FileFolderElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.filesandfolders.FileFolderProperties; import org.odpi.openmetadata.adapters.connectors.integration.basicfiles.ffdc.BasicFilesIntegrationConnectorsAuditCode; import org.odpi.openmetadata.adapters.connectors.integration.basicfiles.ffdc.BasicFilesIntegrationConnectorsErrorCode; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/files-integration-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/basicfiles/DataFolderMonitorIntegrationConnector.java b/open-metadata-implementation/adapters/open-connectors/integration-connectors/files-integration-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/basicfiles/DataFolderMonitorIntegrationConnector.java index 2a409b48f5a..bab78b30797 100644 --- a/open-metadata-implementation/adapters/open-connectors/integration-connectors/files-integration-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/basicfiles/DataFolderMonitorIntegrationConnector.java +++ b/open-metadata-implementation/adapters/open-connectors/integration-connectors/files-integration-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/basicfiles/DataFolderMonitorIntegrationConnector.java @@ -3,10 +3,10 @@ package org.odpi.openmetadata.adapters.connectors.integration.basicfiles; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.FileFolderElement; import org.odpi.openmetadata.adapters.connectors.datastore.datafolder.DataFolderProvider; import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException; import org.odpi.openmetadata.frameworks.openmetadata.enums.DeleteMethod; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.FileFolderElement; import org.odpi.openmetadata.frameworks.openmetadata.refdata.DeployedImplementationType; import java.io.File; diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/files-integration-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/basicfiles/DirectoryToMonitor.java b/open-metadata-implementation/adapters/open-connectors/integration-connectors/files-integration-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/basicfiles/DirectoryToMonitor.java index 760d61e05f7..8dbd43f579c 100644 --- a/open-metadata-implementation/adapters/open-connectors/integration-connectors/files-integration-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/basicfiles/DirectoryToMonitor.java +++ b/open-metadata-implementation/adapters/open-connectors/integration-connectors/files-integration-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/basicfiles/DirectoryToMonitor.java @@ -3,14 +3,13 @@ package org.odpi.openmetadata.adapters.connectors.integration.basicfiles; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.FileFolderElement; import org.odpi.openmetadata.adapters.connectors.integration.basicfiles.ffdc.BasicFilesIntegrationConnectorsAuditCode; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException; import org.odpi.openmetadata.frameworks.integration.filelistener.FileDirectoryListenerInterface; import org.odpi.openmetadata.frameworks.openmetadata.enums.DeleteMethod; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.FileFolderElement; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.integrationservices.files.connector.FilesIntegratorConnector; import java.io.File; import java.util.Map; diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/JDBCIntegrationConnector.java b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/JDBCIntegrationConnector.java index 6484cd36336..a60384494dc 100644 --- a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/JDBCIntegrationConnector.java +++ b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/JDBCIntegrationConnector.java @@ -2,7 +2,6 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.adapters.connectors.integration.jdbc; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.DatabaseElement; import org.odpi.openmetadata.adapters.connectors.integration.jdbc.ffdc.JDBCIntegrationConnectorAuditCode; import org.odpi.openmetadata.adapters.connectors.integration.jdbc.transfer.JdbcMetadata; import org.odpi.openmetadata.adapters.connectors.integration.jdbc.transfer.JdbcMetadataTransfer; @@ -10,6 +9,7 @@ import org.odpi.openmetadata.adapters.connectors.resource.jdbc.JDBCResourceConnector; import org.odpi.openmetadata.frameworks.connectors.Connector; import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.DatabaseElement; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.frameworks.openmetadata.refdata.DeployedImplementationType; import org.odpi.openmetadata.frameworks.governanceaction.search.PropertyHelper; diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/ColumnTransfer.java b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/ColumnTransfer.java index 314fa9c87e6..c98425008dd 100644 --- a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/ColumnTransfer.java +++ b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/ColumnTransfer.java @@ -2,10 +2,10 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.adapters.connectors.integration.jdbc.transfer; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.DatabaseColumnElement; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.DatabaseTableElement; -import org.odpi.openmetadata.accessservices.datamanager.properties.DatabaseColumnProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.DatabasePrimaryKeyProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.DatabaseColumnElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.DatabaseTableElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.databases.DatabaseColumnProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.databases.DatabasePrimaryKeyProperties; import org.odpi.openmetadata.adapters.connectors.integration.jdbc.transfer.model.JdbcColumn; import org.odpi.openmetadata.adapters.connectors.integration.jdbc.transfer.model.JdbcPrimaryKey; import org.odpi.openmetadata.adapters.connectors.integration.jdbc.transfer.requests.Jdbc; @@ -24,7 +24,8 @@ /** * Transfers metadata of a column */ -public class ColumnTransfer implements Function { +public class ColumnTransfer implements Function +{ private final Omas omas; private final AuditLog auditLog; @@ -33,7 +34,8 @@ public class ColumnTransfer implements Function omasColumns, - List jdbcPrimaryKeys, DatabaseTableElement omasTable) { + List jdbcPrimaryKeys, DatabaseTableElement omasTable) + { this.omas = omas; this.auditLog = auditLog; this.omasColumns = omasColumns; @@ -49,7 +51,8 @@ public ColumnTransfer(Omas omas, AuditLog auditLog, List * @return column */ @Override - public DatabaseColumnElement apply(JdbcColumn jdbcColumn) { + public DatabaseColumnElement apply(JdbcColumn jdbcColumn) + { DatabaseColumnProperties columnProperties = buildColumnProperties(jdbcColumn, omasTable); Optional omasColumn = omasColumns.stream() diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/DatabaseTransfer.java b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/DatabaseTransfer.java index 5488e5ddf94..ecbb91137da 100644 --- a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/DatabaseTransfer.java +++ b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/DatabaseTransfer.java @@ -3,8 +3,8 @@ package org.odpi.openmetadata.adapters.connectors.integration.jdbc.transfer; import org.apache.commons.lang3.StringUtils; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.DatabaseElement; -import org.odpi.openmetadata.accessservices.datamanager.properties.DatabaseProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.DatabaseElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.databases.DatabaseProperties; import org.odpi.openmetadata.adapters.connectors.integration.jdbc.transfer.requests.Jdbc; import org.odpi.openmetadata.adapters.connectors.integration.jdbc.transfer.requests.Omas; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; @@ -22,9 +22,9 @@ public class DatabaseTransfer { private final Jdbc jdbc; private final String databaseManagerName; private final String address; - private final String catalog; + private final String catalog; private final DatabaseElement databaseElement; - private final Omas omas; + private final Omas omas; private final AuditLog auditLog; public DatabaseTransfer(Jdbc jdbc, diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/ForeignKeyTransfer.java b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/ForeignKeyTransfer.java index e8b194457b5..9467a16b701 100644 --- a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/ForeignKeyTransfer.java +++ b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/ForeignKeyTransfer.java @@ -2,9 +2,10 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.adapters.connectors.integration.jdbc.transfer; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.DatabaseColumnElement; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.DatabaseElement; -import org.odpi.openmetadata.accessservices.datamanager.properties.DatabaseForeignKeyProperties; + +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.DatabaseColumnElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.DatabaseElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.databases.DatabaseForeignKeyProperties; import org.odpi.openmetadata.adapters.connectors.integration.jdbc.transfer.model.JdbcForeignKey; import org.odpi.openmetadata.adapters.connectors.integration.jdbc.transfer.requests.Omas; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; @@ -20,7 +21,7 @@ public class ForeignKeyTransfer implements Consumer { private final Omas omas; - private final AuditLog auditLog; + private final AuditLog auditLog; private final DatabaseElement database; public ForeignKeyTransfer(Omas omas, AuditLog auditLog, DatabaseElement database) { diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/JdbcMetadataTransfer.java b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/JdbcMetadataTransfer.java index f5cabb56ff3..c9f32d2f390 100644 --- a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/JdbcMetadataTransfer.java +++ b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/JdbcMetadataTransfer.java @@ -3,17 +3,14 @@ package org.odpi.openmetadata.adapters.connectors.integration.jdbc.transfer; import org.apache.commons.lang3.StringUtils; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.DatabaseColumnElement; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.DatabaseElement; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.DatabaseSchemaElement; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.DatabaseTableElement; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.DatabaseViewElement; + import org.odpi.openmetadata.adapters.connectors.integration.jdbc.transfer.customization.TransferCustomizations; import org.odpi.openmetadata.adapters.connectors.integration.jdbc.transfer.model.JdbcForeignKey; import org.odpi.openmetadata.adapters.connectors.integration.jdbc.transfer.model.JdbcPrimaryKey; import org.odpi.openmetadata.adapters.connectors.integration.jdbc.transfer.requests.Jdbc; import org.odpi.openmetadata.adapters.connectors.integration.jdbc.transfer.requests.Omas; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; import org.odpi.openmetadata.integrationservices.database.connector.DatabaseIntegratorContext; import java.util.List; @@ -41,9 +38,9 @@ public class JdbcMetadataTransfer private static final String COLUMNS = "columns"; private final Jdbc jdbc; private final Omas omas; - private final String databaseManagerName; - private DatabaseElement databaseElement; - private final String address; + private final String databaseManagerName; + private DatabaseElement databaseElement; + private final String address; private final String catalog; private final TransferCustomizations transferCustomizations; diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/SchemaTransfer.java b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/SchemaTransfer.java index 5b295dc39eb..a1b6d08d8eb 100644 --- a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/SchemaTransfer.java +++ b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/SchemaTransfer.java @@ -2,8 +2,8 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.adapters.connectors.integration.jdbc.transfer; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.DatabaseSchemaElement; -import org.odpi.openmetadata.accessservices.datamanager.properties.DatabaseSchemaProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.DatabaseSchemaElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.databases.DatabaseSchemaProperties; import org.odpi.openmetadata.adapters.connectors.integration.jdbc.transfer.model.JdbcSchema; import org.odpi.openmetadata.adapters.connectors.integration.jdbc.transfer.requests.Jdbc; import org.odpi.openmetadata.adapters.connectors.integration.jdbc.transfer.requests.Omas; diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/TableTransfer.java b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/TableTransfer.java index dc704b3e015..d16041a1da3 100644 --- a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/TableTransfer.java +++ b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/TableTransfer.java @@ -2,8 +2,8 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.adapters.connectors.integration.jdbc.transfer; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.DatabaseTableElement; -import org.odpi.openmetadata.accessservices.datamanager.properties.DatabaseTableProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.DatabaseTableElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.databases.DatabaseTableProperties; import org.odpi.openmetadata.adapters.connectors.integration.jdbc.transfer.model.JdbcTable; import org.odpi.openmetadata.adapters.connectors.integration.jdbc.transfer.requests.Jdbc; import org.odpi.openmetadata.adapters.connectors.integration.jdbc.transfer.requests.Omas; diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/ViewTransfer.java b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/ViewTransfer.java index 78fee82fc5b..393a3b65fbb 100644 --- a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/ViewTransfer.java +++ b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/ViewTransfer.java @@ -2,8 +2,8 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.adapters.connectors.integration.jdbc.transfer; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.DatabaseViewElement; -import org.odpi.openmetadata.accessservices.datamanager.properties.DatabaseViewProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.DatabaseViewElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.databases.DatabaseViewProperties; import org.odpi.openmetadata.adapters.connectors.integration.jdbc.transfer.model.JdbcTable; import org.odpi.openmetadata.adapters.connectors.integration.jdbc.transfer.requests.Jdbc; import org.odpi.openmetadata.adapters.connectors.integration.jdbc.transfer.requests.Omas; diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/Omas.java b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/Omas.java index b96edf9f680..0c0b2308aef 100644 --- a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/Omas.java +++ b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/Omas.java @@ -2,23 +2,15 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.adapters.connectors.integration.jdbc.transfer.requests; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.ConnectionElement; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.ConnectorTypeElement; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.DatabaseColumnElement; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.DatabaseElement; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.DatabaseSchemaElement; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.DatabaseTableElement; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.DatabaseViewElement; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.EndpointElement; -import org.odpi.openmetadata.accessservices.datamanager.properties.ConnectionProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.DatabaseColumnProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.DatabaseForeignKeyProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.DatabasePrimaryKeyProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.DatabaseProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.DatabaseSchemaProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.DatabaseTableProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.DatabaseViewProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.EndpointProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.EndpointProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.databases.DatabaseColumnProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.databases.DatabaseForeignKeyProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.databases.DatabasePrimaryKeyProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.databases.DatabaseProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.databases.DatabaseSchemaProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.databases.DatabaseTableProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.databases.DatabaseViewProperties; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.integrationservices.database.connector.DatabaseIntegratorContext; diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasCreateColumn.java b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasCreateColumn.java index 1e639c6f170..3aeb6ed6319 100644 --- a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasCreateColumn.java +++ b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasCreateColumn.java @@ -2,7 +2,7 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.adapters.connectors.integration.jdbc.transfer.requests; -import org.odpi.openmetadata.accessservices.datamanager.properties.DatabaseColumnProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.databases.DatabaseColumnProperties; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasCreateConnection.java b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasCreateConnection.java index 48ac8106b9a..a1f1bf61fa0 100644 --- a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasCreateConnection.java +++ b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasCreateConnection.java @@ -2,11 +2,11 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.adapters.connectors.integration.jdbc.transfer.requests; -import org.odpi.openmetadata.accessservices.datamanager.properties.ConnectionProperties; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.ConnectionProperties; import org.odpi.openmetadata.integrationservices.database.connector.DatabaseIntegratorContext; import java.util.Optional; diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasCreateDatabase.java b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasCreateDatabase.java index adcb1f72108..3316a353f4e 100644 --- a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasCreateDatabase.java +++ b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasCreateDatabase.java @@ -2,7 +2,7 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.adapters.connectors.integration.jdbc.transfer.requests; -import org.odpi.openmetadata.accessservices.datamanager.properties.DatabaseProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.databases.DatabaseProperties; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasCreateEndpoint.java b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasCreateEndpoint.java index 863c2dcda57..0d177e28b27 100644 --- a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasCreateEndpoint.java +++ b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasCreateEndpoint.java @@ -2,11 +2,11 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.adapters.connectors.integration.jdbc.transfer.requests; -import org.odpi.openmetadata.accessservices.datamanager.properties.EndpointProperties; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.EndpointProperties; import org.odpi.openmetadata.integrationservices.database.connector.DatabaseIntegratorContext; import java.util.Optional; @@ -17,7 +17,8 @@ /** * Manages the createEndpoint call to access service */ -class OmasCreateEndpoint implements Function> { +class OmasCreateEndpoint implements Function> +{ private final DatabaseIntegratorContext databaseIntegratorContext; private final AuditLog auditLog; diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasCreateSchema.java b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasCreateSchema.java index b742a099745..1bbf5a8a092 100644 --- a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasCreateSchema.java +++ b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasCreateSchema.java @@ -2,7 +2,7 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.adapters.connectors.integration.jdbc.transfer.requests; -import org.odpi.openmetadata.accessservices.datamanager.properties.DatabaseSchemaProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.databases.DatabaseSchemaProperties; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasCreateTable.java b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasCreateTable.java index 16604164d48..d9589630d6b 100644 --- a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasCreateTable.java +++ b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasCreateTable.java @@ -2,7 +2,7 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.adapters.connectors.integration.jdbc.transfer.requests; -import org.odpi.openmetadata.accessservices.datamanager.properties.DatabaseTableProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.databases.DatabaseTableProperties; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasCreateView.java b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasCreateView.java index 41f5f124b1e..ccdb7846923 100644 --- a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasCreateView.java +++ b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasCreateView.java @@ -2,7 +2,7 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.adapters.connectors.integration.jdbc.transfer.requests; -import org.odpi.openmetadata.accessservices.datamanager.properties.DatabaseViewProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.databases.DatabaseViewProperties; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasFindDatabaseColumns.java b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasFindDatabaseColumns.java index 9552c88a753..ae1020b88da 100644 --- a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasFindDatabaseColumns.java +++ b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasFindDatabaseColumns.java @@ -2,11 +2,11 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.adapters.connectors.integration.jdbc.transfer.requests; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.DatabaseColumnElement; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.DatabaseColumnElement; import org.odpi.openmetadata.integrationservices.database.connector.DatabaseIntegratorContext; import java.util.ArrayList; diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasFindEndpoints.java b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasFindEndpoints.java index 4d11bb3fdef..3d217da3b1e 100644 --- a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasFindEndpoints.java +++ b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasFindEndpoints.java @@ -2,11 +2,11 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.adapters.connectors.integration.jdbc.transfer.requests; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.EndpointElement; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.EndpointElement; import org.odpi.openmetadata.integrationservices.database.connector.DatabaseIntegratorContext; import java.util.ArrayList; diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasGetColumns.java b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasGetColumns.java index 82f8eae0847..73764d13251 100644 --- a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasGetColumns.java +++ b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasGetColumns.java @@ -2,11 +2,11 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.adapters.connectors.integration.jdbc.transfer.requests; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.DatabaseColumnElement; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.DatabaseColumnElement; import org.odpi.openmetadata.integrationservices.database.connector.DatabaseIntegratorContext; import java.util.ArrayList; diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasGetConnectionsByName.java b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasGetConnectionsByName.java index 3095612674d..3cdb838f783 100644 --- a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasGetConnectionsByName.java +++ b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasGetConnectionsByName.java @@ -2,11 +2,11 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.adapters.connectors.integration.jdbc.transfer.requests; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.ConnectionElement; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ConnectionElement; import org.odpi.openmetadata.integrationservices.database.connector.DatabaseIntegratorContext; import java.util.ArrayList; diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasGetConnectorTypesByName.java b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasGetConnectorTypesByName.java index 44a669184ee..5db762fbf15 100644 --- a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasGetConnectorTypesByName.java +++ b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasGetConnectorTypesByName.java @@ -2,11 +2,11 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.adapters.connectors.integration.jdbc.transfer.requests; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.ConnectorTypeElement; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ConnectorTypeElement; import org.odpi.openmetadata.integrationservices.database.connector.DatabaseIntegratorContext; import java.util.ArrayList; diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasGetDatabasesByName.java b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasGetDatabasesByName.java index 02d015ae0f5..99fa22bd7de 100644 --- a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasGetDatabasesByName.java +++ b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasGetDatabasesByName.java @@ -2,11 +2,11 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.adapters.connectors.integration.jdbc.transfer.requests; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.DatabaseElement; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.DatabaseElement; import org.odpi.openmetadata.integrationservices.database.connector.DatabaseIntegratorContext; import java.util.ArrayList; @@ -19,7 +19,8 @@ /** * Manages the getDatabasesByName call to access service */ -class OmasGetDatabasesByName implements Function> { +class OmasGetDatabasesByName implements Function> +{ private final DatabaseIntegratorContext databaseIntegratorContext; private final AuditLog auditLog; diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasGetSchemas.java b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasGetSchemas.java index 6d6275c03e6..4dc5955d203 100644 --- a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasGetSchemas.java +++ b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasGetSchemas.java @@ -2,11 +2,11 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.adapters.connectors.integration.jdbc.transfer.requests; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.DatabaseSchemaElement; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.DatabaseSchemaElement; import org.odpi.openmetadata.integrationservices.database.connector.DatabaseIntegratorContext; import java.util.ArrayList; @@ -19,7 +19,8 @@ /** * Manages the getSchemasForDatabase call to access service */ -class OmasGetSchemas implements Function> { +class OmasGetSchemas implements Function> +{ private final DatabaseIntegratorContext databaseIntegratorContext; private final AuditLog auditLog; diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasGetTables.java b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasGetTables.java index c937346629f..e5d0ce3927e 100644 --- a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasGetTables.java +++ b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasGetTables.java @@ -2,11 +2,11 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.adapters.connectors.integration.jdbc.transfer.requests; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.DatabaseTableElement; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.DatabaseTableElement; import org.odpi.openmetadata.integrationservices.database.connector.DatabaseIntegratorContext; import java.util.ArrayList; diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasGetViews.java b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasGetViews.java index 10bef4b045b..5bd21ca06ce 100644 --- a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasGetViews.java +++ b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasGetViews.java @@ -2,11 +2,11 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.adapters.connectors.integration.jdbc.transfer.requests; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.DatabaseViewElement; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.DatabaseViewElement; import org.odpi.openmetadata.integrationservices.database.connector.DatabaseIntegratorContext; import java.util.ArrayList; diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasRemoveColumn.java b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasRemoveColumn.java index 971ffddce54..71d1964c683 100644 --- a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasRemoveColumn.java +++ b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasRemoveColumn.java @@ -2,11 +2,11 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.adapters.connectors.integration.jdbc.transfer.requests; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.DatabaseColumnElement; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.DatabaseColumnElement; import org.odpi.openmetadata.integrationservices.database.connector.DatabaseIntegratorContext; import java.util.function.Consumer; diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasRemoveSchema.java b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasRemoveSchema.java index 7ab94c270fa..df1148ae4bc 100644 --- a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasRemoveSchema.java +++ b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasRemoveSchema.java @@ -2,12 +2,12 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.adapters.connectors.integration.jdbc.transfer.requests; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.DatabaseSchemaElement; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.DatabaseTableElement; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.DatabaseSchemaElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.DatabaseTableElement; import org.odpi.openmetadata.integrationservices.database.connector.DatabaseIntegratorContext; import java.util.List; diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasRemoveTable.java b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasRemoveTable.java index 0eef7af5f57..1d91d34da29 100644 --- a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasRemoveTable.java +++ b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasRemoveTable.java @@ -2,12 +2,13 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.adapters.connectors.integration.jdbc.transfer.requests; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.DatabaseColumnElement; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.DatabaseTableElement; + import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.DatabaseColumnElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.DatabaseTableElement; import org.odpi.openmetadata.integrationservices.database.connector.DatabaseIntegratorContext; import java.util.List; diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasRemoveView.java b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasRemoveView.java index c1e1d810c95..b7898bbade5 100644 --- a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasRemoveView.java +++ b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasRemoveView.java @@ -2,11 +2,11 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.adapters.connectors.integration.jdbc.transfer.requests; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.DatabaseViewElement; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.DatabaseViewElement; import org.odpi.openmetadata.integrationservices.database.connector.DatabaseIntegratorContext; import java.util.function.Consumer; diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasSetForeignKey.java b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasSetForeignKey.java index 2489ca78fb5..29c974902b7 100644 --- a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasSetForeignKey.java +++ b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasSetForeignKey.java @@ -2,7 +2,7 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.adapters.connectors.integration.jdbc.transfer.requests; -import org.odpi.openmetadata.accessservices.datamanager.properties.DatabaseForeignKeyProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.databases.DatabaseForeignKeyProperties; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasSetPrimaryKey.java b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasSetPrimaryKey.java index 5e583b55e5a..c6ccd15c496 100644 --- a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasSetPrimaryKey.java +++ b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasSetPrimaryKey.java @@ -2,7 +2,7 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.adapters.connectors.integration.jdbc.transfer.requests; -import org.odpi.openmetadata.accessservices.datamanager.properties.DatabasePrimaryKeyProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.databases.DatabasePrimaryKeyProperties; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasUpdateColumn.java b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasUpdateColumn.java index 9a500b3ba0c..9bd49fc4762 100644 --- a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasUpdateColumn.java +++ b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasUpdateColumn.java @@ -2,7 +2,7 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.adapters.connectors.integration.jdbc.transfer.requests; -import org.odpi.openmetadata.accessservices.datamanager.properties.DatabaseColumnProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.databases.DatabaseColumnProperties; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasUpdateDatabase.java b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasUpdateDatabase.java index 8668203f889..1db2bc9ba77 100644 --- a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasUpdateDatabase.java +++ b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasUpdateDatabase.java @@ -2,7 +2,7 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.adapters.connectors.integration.jdbc.transfer.requests; -import org.odpi.openmetadata.accessservices.datamanager.properties.DatabaseProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.databases.DatabaseProperties; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasUpdateSchema.java b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasUpdateSchema.java index 53cff33472d..fe2bc611014 100644 --- a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasUpdateSchema.java +++ b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasUpdateSchema.java @@ -2,7 +2,7 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.adapters.connectors.integration.jdbc.transfer.requests; -import org.odpi.openmetadata.accessservices.datamanager.properties.DatabaseSchemaProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.databases.DatabaseSchemaProperties; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasUpdateTable.java b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasUpdateTable.java index c42fdb3af09..d55b57fbf73 100644 --- a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasUpdateTable.java +++ b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasUpdateTable.java @@ -2,7 +2,7 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.adapters.connectors.integration.jdbc.transfer.requests; -import org.odpi.openmetadata.accessservices.datamanager.properties.DatabaseTableProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.databases.DatabaseTableProperties; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasUpdateView.java b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasUpdateView.java index 2068629145e..507634da68a 100644 --- a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasUpdateView.java +++ b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/requests/OmasUpdateView.java @@ -2,7 +2,7 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.adapters.connectors.integration.jdbc.transfer.requests; -import org.odpi.openmetadata.accessservices.datamanager.properties.DatabaseViewProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.databases.DatabaseViewProperties; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/kafka-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/kafka/KafkaMonitorIntegrationConnector.java b/open-metadata-implementation/adapters/open-connectors/integration-connectors/kafka-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/kafka/KafkaMonitorIntegrationConnector.java index 498cbf3d675..d12849efea4 100644 --- a/open-metadata-implementation/adapters/open-connectors/integration-connectors/kafka-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/kafka/KafkaMonitorIntegrationConnector.java +++ b/open-metadata-implementation/adapters/open-connectors/integration-connectors/kafka-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/kafka/KafkaMonitorIntegrationConnector.java @@ -5,9 +5,9 @@ import org.apache.kafka.clients.admin.Admin; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.TopicElement; import org.odpi.openmetadata.accessservices.datamanager.properties.TemplateProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.TopicProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.TopicElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.topics.TopicProperties; import org.odpi.openmetadata.adapters.connectors.integration.kafka.ffdc.KafkaIntegrationConnectorAuditCode; import org.odpi.openmetadata.adapters.connectors.integration.kafka.ffdc.KafkaIntegrationConnectorErrorCode; import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException; diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/openapi-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/openapis/OpenAPIMonitorIntegrationConnector.java b/open-metadata-implementation/adapters/open-connectors/integration-connectors/openapi-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/openapis/OpenAPIMonitorIntegrationConnector.java index 8027f66c856..d218052e083 100644 --- a/open-metadata-implementation/adapters/open-connectors/integration-connectors/openapi-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/openapis/OpenAPIMonitorIntegrationConnector.java +++ b/open-metadata-implementation/adapters/open-connectors/integration-connectors/openapi-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/openapis/OpenAPIMonitorIntegrationConnector.java @@ -7,12 +7,12 @@ import com.fasterxml.jackson.databind.ObjectReader; import org.odpi.openmetadata.accessservices.datamanager.api.DataManagerEventListener; import org.odpi.openmetadata.accessservices.datamanager.events.DataManagerOutboundEvent; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.APIElement; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.APIOperationElement; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.EndpointElement; -import org.odpi.openmetadata.accessservices.datamanager.properties.APIOperationProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.APIProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.EndpointProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.APIElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.APIOperationElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.EndpointElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.EndpointProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.apis.APIOperationProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.apis.APIProperties; import org.odpi.openmetadata.adapters.connectors.integration.openapis.ffdc.OpenAPIIntegrationConnectorAuditCode; import org.odpi.openmetadata.adapters.connectors.integration.openapis.ffdc.OpenAPIIntegrationConnectorErrorCode; import org.odpi.openmetadata.adapters.connectors.integration.openapis.properties.OpenAPIOperation; @@ -24,7 +24,6 @@ import org.odpi.openmetadata.frameworks.connectors.ffdc.OCFCheckedExceptionBase; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.ConnectionProperties; import org.odpi.openmetadata.integrationservices.api.connector.APIIntegratorConnector; import org.odpi.openmetadata.integrationservices.api.connector.APIIntegratorContext; @@ -510,7 +509,7 @@ private String getEndpointGUID(String url, if (openAPISpecification.getInfo() != null) { properties.setDisplayName(openAPISpecification.getInfo().getTitle()); - properties.setDescription(openAPISpecification.getInfo().getDescription()); + properties.setResourceDescription(openAPISpecification.getInfo().getDescription()); } endpointGUID = myContext.createEndpoint(properties); @@ -567,7 +566,7 @@ private String getAPIGUID(String url, properties.setQualifiedName(apiQualifiedName); properties.setName(tag.getName()); - properties.setDescription(tag.getDescription()); + properties.setDisplayDescription(tag.getDescription()); apiGUID = myContext.createAPI(endpointGUID, properties); } diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/openlineage-integration-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/openlineage/GovernanceActionOpenLineageIntegrationConnector.java b/open-metadata-implementation/adapters/open-connectors/integration-connectors/openlineage-integration-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/openlineage/GovernanceActionOpenLineageIntegrationConnector.java index d22ced3e82c..a0024ae35c3 100644 --- a/open-metadata-implementation/adapters/open-connectors/integration-connectors/openlineage-integration-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/openlineage/GovernanceActionOpenLineageIntegrationConnector.java +++ b/open-metadata-implementation/adapters/open-connectors/integration-connectors/openlineage-integration-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/openlineage/GovernanceActionOpenLineageIntegrationConnector.java @@ -7,8 +7,8 @@ import org.odpi.openmetadata.accessservices.assetmanager.events.AssetManagerOutTopicEvent; import org.odpi.openmetadata.adapters.connectors.integration.openlineage.ffdc.OpenLineageIntegrationConnectorAuditCode; import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementClassification; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementClassification; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; import org.odpi.openmetadata.frameworks.governanceaction.properties.ActionTargetElement; import org.odpi.openmetadata.frameworks.governanceaction.properties.EngineActionElement; import org.odpi.openmetadata.integrationservices.lineage.connector.LineageIntegratorConnector; diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/openlineage-integration-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/openlineage/OpenLineageCataloguerIntegrationConnector.java b/open-metadata-implementation/adapters/open-connectors/integration-connectors/openlineage-integration-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/openlineage/OpenLineageCataloguerIntegrationConnector.java index f458f7c6ff0..91fdbc25b12 100644 --- a/open-metadata-implementation/adapters/open-connectors/integration-connectors/openlineage-integration-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/openlineage/OpenLineageCataloguerIntegrationConnector.java +++ b/open-metadata-implementation/adapters/open-connectors/integration-connectors/openlineage-integration-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/openlineage/OpenLineageCataloguerIntegrationConnector.java @@ -3,11 +3,11 @@ package org.odpi.openmetadata.adapters.connectors.integration.openlineage; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.ProcessElement; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ProcessProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ProcessStatus; import org.odpi.openmetadata.adapters.connectors.integration.openlineage.ffdc.OpenLineageIntegrationConnectorAuditCode; import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException; import org.odpi.openmetadata.frameworks.connectors.properties.ConnectorTypeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ProcessStatus; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.processes.ProcessProperties; import org.odpi.openmetadata.integrationservices.lineage.connector.LineageIntegratorConnector; import org.odpi.openmetadata.integrationservices.lineage.connector.LineageIntegratorContext; import org.odpi.openmetadata.integrationservices.lineage.connector.OpenLineageEventListener; @@ -130,7 +130,7 @@ public void processOpenLineageRunEvent(OpenLineageRunEvent event, if (documentation != null) { - processProperties.setDescription(documentation.getDescription()); + processProperties.setResourceDescription(documentation.getDescription()); } } @@ -146,7 +146,7 @@ else if (existingProcesses.size() == 1) processGUID = existingProcess.getElementHeader().getGUID(); - if (existingProcess.getProcessProperties().getDescription() == null) + if (existingProcess.getProcessProperties().getDisplayDescription() == null) { if (job.getFacets() != null) { @@ -156,7 +156,7 @@ else if (existingProcesses.size() == 1) { ProcessProperties processProperties = new ProcessProperties(); - processProperties.setDescription(documentation.getDescription()); + processProperties.setResourceDescription(documentation.getDescription()); myContext.updateProcess(processGUID, true, processProperties, null); } diff --git a/open-metadata-implementation/adapters/open-connectors/lineage-warehouse-connectors/lineage-warehouse-janus-connector/build.gradle b/open-metadata-implementation/adapters/open-connectors/lineage-warehouse-connectors/lineage-warehouse-janus-connector/build.gradle index f066380b0a3..59ae4830cb6 100644 --- a/open-metadata-implementation/adapters/open-connectors/lineage-warehouse-connectors/lineage-warehouse-janus-connector/build.gradle +++ b/open-metadata-implementation/adapters/open-connectors/lineage-warehouse-connectors/lineage-warehouse-janus-connector/build.gradle @@ -7,6 +7,7 @@ plugins { } dependencies { + compileOnly project(':open-metadata-implementation:frameworks:open-metadata-framework') compileOnly project(':open-metadata-implementation:frameworks:open-connector-framework') compileOnly project(':open-metadata-implementation:frameworks:audit-log-framework') compileOnly project(':open-metadata-implementation:repository-services:repository-services-apis') diff --git a/open-metadata-implementation/adapters/open-connectors/repository-services-connectors/audit-log-connectors/audit-log-console-connector/build.gradle b/open-metadata-implementation/adapters/open-connectors/repository-services-connectors/audit-log-connectors/audit-log-console-connector/build.gradle index 0d550a2eead..870225d6073 100644 --- a/open-metadata-implementation/adapters/open-connectors/repository-services-connectors/audit-log-connectors/audit-log-console-connector/build.gradle +++ b/open-metadata-implementation/adapters/open-connectors/repository-services-connectors/audit-log-connectors/audit-log-console-connector/build.gradle @@ -7,6 +7,7 @@ description = 'Audit Log Console Connector' dependencies { compileOnly project(':open-metadata-implementation:frameworks:audit-log-framework') + compileOnly project(':open-metadata-implementation:frameworks:open-metadata-framework') compileOnly project(':open-metadata-implementation:frameworks:open-connector-framework') compileOnly project(':open-metadata-implementation:repository-services:repository-services-apis') compileOnly 'com.fasterxml.jackson.core:jackson-annotations' diff --git a/open-metadata-implementation/adapters/open-connectors/repository-services-connectors/audit-log-connectors/audit-log-console-event-display-connector/build.gradle b/open-metadata-implementation/adapters/open-connectors/repository-services-connectors/audit-log-connectors/audit-log-console-event-display-connector/build.gradle index 18c092d7e73..0bb923d6cb0 100644 --- a/open-metadata-implementation/adapters/open-connectors/repository-services-connectors/audit-log-connectors/audit-log-console-event-display-connector/build.gradle +++ b/open-metadata-implementation/adapters/open-connectors/repository-services-connectors/audit-log-connectors/audit-log-console-event-display-connector/build.gradle @@ -6,6 +6,7 @@ dependencies { compileOnly project(':open-metadata-implementation:frameworks:audit-log-framework') + compileOnly project(':open-metadata-implementation:frameworks:open-metadata-framework') compileOnly project(':open-metadata-implementation:frameworks:open-connector-framework') compileOnly project(':open-metadata-implementation:repository-services:repository-services-apis') compileOnly 'com.fasterxml.jackson.core:jackson-annotations' diff --git a/open-metadata-implementation/adapters/open-connectors/repository-services-connectors/audit-log-connectors/audit-log-event-topic-connector/build.gradle b/open-metadata-implementation/adapters/open-connectors/repository-services-connectors/audit-log-connectors/audit-log-event-topic-connector/build.gradle index 20aae484d7e..5634cb07cfa 100644 --- a/open-metadata-implementation/adapters/open-connectors/repository-services-connectors/audit-log-connectors/audit-log-event-topic-connector/build.gradle +++ b/open-metadata-implementation/adapters/open-connectors/repository-services-connectors/audit-log-connectors/audit-log-event-topic-connector/build.gradle @@ -8,6 +8,7 @@ description = 'Event Topic Audit Log Destination Connector' dependencies { compileOnly project(':open-metadata-implementation:frameworks:open-connector-framework') + compileOnly project(':open-metadata-implementation:frameworks:open-metadata-framework') compileOnly project(':open-metadata-implementation:frameworks:audit-log-framework') compileOnly project(':open-metadata-implementation:repository-services:repository-services-apis') compileOnly 'com.fasterxml.jackson.core:jackson-annotations' diff --git a/open-metadata-implementation/adapters/open-connectors/repository-services-connectors/audit-log-connectors/audit-log-file-connector/build.gradle b/open-metadata-implementation/adapters/open-connectors/repository-services-connectors/audit-log-connectors/audit-log-file-connector/build.gradle index 9aa39f5d29d..7df9b788e64 100644 --- a/open-metadata-implementation/adapters/open-connectors/repository-services-connectors/audit-log-connectors/audit-log-file-connector/build.gradle +++ b/open-metadata-implementation/adapters/open-connectors/repository-services-connectors/audit-log-connectors/audit-log-file-connector/build.gradle @@ -6,6 +6,7 @@ dependencies { compileOnly project(':open-metadata-implementation:frameworks:open-connector-framework') + compileOnly project(':open-metadata-implementation:frameworks:open-metadata-framework') compileOnly project(':open-metadata-implementation:frameworks:audit-log-framework') compileOnly project(':open-metadata-implementation:repository-services:repository-services-apis') compileOnly 'commons-io:commons-io' diff --git a/open-metadata-implementation/adapters/open-connectors/repository-services-connectors/audit-log-connectors/audit-log-slf4j-connector/build.gradle b/open-metadata-implementation/adapters/open-connectors/repository-services-connectors/audit-log-connectors/audit-log-slf4j-connector/build.gradle index 064e7e7daa0..d775fbed8c9 100644 --- a/open-metadata-implementation/adapters/open-connectors/repository-services-connectors/audit-log-connectors/audit-log-slf4j-connector/build.gradle +++ b/open-metadata-implementation/adapters/open-connectors/repository-services-connectors/audit-log-connectors/audit-log-slf4j-connector/build.gradle @@ -7,6 +7,7 @@ dependencies { compileOnly project(':open-metadata-implementation:repository-services:repository-services-apis') compileOnly project(':open-metadata-implementation:frameworks:open-connector-framework') + compileOnly project(':open-metadata-implementation:frameworks:open-metadata-framework') compileOnly project(':open-metadata-implementation:frameworks:audit-log-framework') compileOnly 'org.slf4j:slf4j-api' compileOnly 'com.fasterxml.jackson.core:jackson-annotations' diff --git a/open-metadata-implementation/adapters/open-connectors/repository-services-connectors/cohort-registry-store-connectors/cohort-registry-file-store-connector/build.gradle b/open-metadata-implementation/adapters/open-connectors/repository-services-connectors/cohort-registry-store-connectors/cohort-registry-file-store-connector/build.gradle index e5f43fbfb7e..c235417bdea 100644 --- a/open-metadata-implementation/adapters/open-connectors/repository-services-connectors/cohort-registry-store-connectors/cohort-registry-file-store-connector/build.gradle +++ b/open-metadata-implementation/adapters/open-connectors/repository-services-connectors/cohort-registry-store-connectors/cohort-registry-file-store-connector/build.gradle @@ -7,6 +7,7 @@ dependencies { compileOnly 'org.slf4j:slf4j-api' compileOnly project(':open-metadata-implementation:frameworks:audit-log-framework') + compileOnly project(':open-metadata-implementation:frameworks:open-metadata-framework') compileOnly project(':open-metadata-implementation:frameworks:open-connector-framework') compileOnly project(':open-metadata-implementation:repository-services:repository-services-apis') compileOnly 'com.fasterxml.jackson.core:jackson-databind' @@ -15,6 +16,7 @@ dependencies { testImplementation project(':open-metadata-test:open-metadata-ut') testImplementation project(':open-metadata-implementation:frameworks:audit-log-framework') testImplementation project(':open-metadata-implementation:repository-services:repository-services-apis') + testImplementation project(':open-metadata-implementation:frameworks:open-metadata-framework') testImplementation project(':open-metadata-implementation:frameworks:open-connector-framework') compileOnly 'commons-io:commons-io' testCompileOnly 'com.fasterxml.jackson.core:jackson-annotations' diff --git a/open-metadata-implementation/adapters/open-connectors/repository-services-connectors/open-metadata-archive-connectors/open-metadata-archive-directory-connector/build.gradle b/open-metadata-implementation/adapters/open-connectors/repository-services-connectors/open-metadata-archive-connectors/open-metadata-archive-directory-connector/build.gradle index 4577571bb21..dfb07ee912b 100644 --- a/open-metadata-implementation/adapters/open-connectors/repository-services-connectors/open-metadata-archive-connectors/open-metadata-archive-directory-connector/build.gradle +++ b/open-metadata-implementation/adapters/open-connectors/repository-services-connectors/open-metadata-archive-connectors/open-metadata-archive-directory-connector/build.gradle @@ -7,6 +7,7 @@ dependencies { compileOnly 'org.slf4j:slf4j-api' compileOnly project(':open-metadata-implementation:frameworks:open-connector-framework') + compileOnly project(':open-metadata-implementation:frameworks:open-metadata-framework') compileOnly project(':open-metadata-implementation:frameworks:audit-log-framework') compileOnly project(':open-metadata-implementation:repository-services:repository-services-apis') compileOnly project(':open-metadata-implementation:repository-services:repository-services-archive-utilities') diff --git a/open-metadata-implementation/adapters/open-connectors/repository-services-connectors/open-metadata-archive-connectors/open-metadata-archive-file-connector/build.gradle b/open-metadata-implementation/adapters/open-connectors/repository-services-connectors/open-metadata-archive-connectors/open-metadata-archive-file-connector/build.gradle index f7850b377aa..51206065ca5 100644 --- a/open-metadata-implementation/adapters/open-connectors/repository-services-connectors/open-metadata-archive-connectors/open-metadata-archive-file-connector/build.gradle +++ b/open-metadata-implementation/adapters/open-connectors/repository-services-connectors/open-metadata-archive-connectors/open-metadata-archive-file-connector/build.gradle @@ -6,6 +6,7 @@ dependencies { compileOnly 'org.slf4j:slf4j-api' + compileOnly project(':open-metadata-implementation:frameworks:open-metadata-framework') compileOnly project(':open-metadata-implementation:frameworks:open-connector-framework') compileOnly project(':open-metadata-implementation:frameworks:audit-log-framework') compileOnly project(':open-metadata-implementation:repository-services:repository-services-apis') diff --git a/open-metadata-implementation/adapters/open-connectors/repository-services-connectors/open-metadata-collection-store-connectors/graph-repository-connector/build.gradle b/open-metadata-implementation/adapters/open-connectors/repository-services-connectors/open-metadata-collection-store-connectors/graph-repository-connector/build.gradle index 69662565fdf..9c49c656dc8 100644 --- a/open-metadata-implementation/adapters/open-connectors/repository-services-connectors/open-metadata-collection-store-connectors/graph-repository-connector/build.gradle +++ b/open-metadata-implementation/adapters/open-connectors/repository-services-connectors/open-metadata-collection-store-connectors/graph-repository-connector/build.gradle @@ -11,6 +11,7 @@ dependencies { compileOnly 'com.fasterxml.jackson.core:jackson-databind' compileOnly 'com.fasterxml.jackson.core:jackson-core' compileOnly project(':open-metadata-implementation:frameworks:audit-log-framework') + compileOnly project(':open-metadata-implementation:frameworks:open-metadata-framework') compileOnly project(':open-metadata-implementation:frameworks:open-connector-framework') compileOnly project(':open-metadata-implementation:repository-services:repository-services-apis') implementation 'org.apache.tinkerpop:gremlin-core' diff --git a/open-metadata-implementation/adapters/open-connectors/repository-services-connectors/open-metadata-collection-store-connectors/inmemory-repository-connector/build.gradle b/open-metadata-implementation/adapters/open-connectors/repository-services-connectors/open-metadata-collection-store-connectors/inmemory-repository-connector/build.gradle index 7b962c01976..5690d51fa07 100644 --- a/open-metadata-implementation/adapters/open-connectors/repository-services-connectors/open-metadata-collection-store-connectors/inmemory-repository-connector/build.gradle +++ b/open-metadata-implementation/adapters/open-connectors/repository-services-connectors/open-metadata-collection-store-connectors/inmemory-repository-connector/build.gradle @@ -7,6 +7,7 @@ dependencies { compileOnly project(':open-metadata-implementation:frameworks:open-connector-framework') + compileOnly project(':open-metadata-implementation:frameworks:open-metadata-framework') compileOnly project(':open-metadata-implementation:frameworks:audit-log-framework') compileOnly project(':open-metadata-implementation:repository-services:repository-services-apis') compileOnly 'org.slf4j:slf4j-api' diff --git a/open-metadata-implementation/adapters/open-connectors/repository-services-connectors/open-metadata-collection-store-connectors/omrs-rest-repository-connector/build.gradle b/open-metadata-implementation/adapters/open-connectors/repository-services-connectors/open-metadata-collection-store-connectors/omrs-rest-repository-connector/build.gradle index 4b151bef404..9801c54e0d7 100644 --- a/open-metadata-implementation/adapters/open-connectors/repository-services-connectors/open-metadata-collection-store-connectors/omrs-rest-repository-connector/build.gradle +++ b/open-metadata-implementation/adapters/open-connectors/repository-services-connectors/open-metadata-collection-store-connectors/omrs-rest-repository-connector/build.gradle @@ -5,8 +5,9 @@ dependencies { - implementation project(':open-metadata-implementation:frameworks:open-connector-framework') - implementation project(':open-metadata-implementation:frameworks:audit-log-framework') + compileOnly project(':open-metadata-implementation:frameworks:open-connector-framework') + compileOnly project(':open-metadata-implementation:frameworks:open-metadata-framework') + compileOnly project(':open-metadata-implementation:frameworks:audit-log-framework') implementation project(':open-metadata-implementation:repository-services:repository-services-client') implementation project(':open-metadata-implementation:repository-services:repository-services-apis') compileOnly 'com.fasterxml.jackson.core:jackson-annotations' diff --git a/open-metadata-implementation/adapters/open-connectors/repository-services-connectors/open-metadata-collection-store-connectors/xtdb-repository-connector/build.gradle b/open-metadata-implementation/adapters/open-connectors/repository-services-connectors/open-metadata-collection-store-connectors/xtdb-repository-connector/build.gradle index 36bb5cdf766..bfaaea65ad2 100644 --- a/open-metadata-implementation/adapters/open-connectors/repository-services-connectors/open-metadata-collection-store-connectors/xtdb-repository-connector/build.gradle +++ b/open-metadata-implementation/adapters/open-connectors/repository-services-connectors/open-metadata-collection-store-connectors/xtdb-repository-connector/build.gradle @@ -15,6 +15,7 @@ dependencies { // Dependencies provided by Egeria itself compileOnly project(':open-metadata-implementation:frameworks:audit-log-framework') + compileOnly project(':open-metadata-implementation:frameworks:open-metadata-framework') compileOnly project(':open-metadata-implementation:frameworks:open-connector-framework') compileOnly project(':open-metadata-implementation:repository-services:repository-services-apis') @@ -56,6 +57,7 @@ dependencies { testImplementation project(":open-metadata-resources:open-metadata-archives:open-metadata-types") testCompileOnly project(":open-metadata-implementation:frameworks:audit-log-framework") testCompileOnly project(":open-metadata-implementation:repository-services:repository-services-apis") + testCompileOnly project(":open-metadata-implementation:frameworks:open-metadata-framework") testCompileOnly project(":open-metadata-implementation:frameworks:open-connector-framework") testImplementation project(':open-metadata-test:open-metadata-ut') testImplementation 'org.testng:testng' diff --git a/open-metadata-implementation/adapters/open-connectors/rest-client-connectors/rest-client-connectors-api/build.gradle b/open-metadata-implementation/adapters/open-connectors/rest-client-connectors/rest-client-connectors-api/build.gradle index bb692c96edb..71f61e59db3 100644 --- a/open-metadata-implementation/adapters/open-connectors/rest-client-connectors/rest-client-connectors-api/build.gradle +++ b/open-metadata-implementation/adapters/open-connectors/rest-client-connectors/rest-client-connectors-api/build.gradle @@ -7,6 +7,7 @@ dependencies { compileOnly 'org.slf4j:slf4j-api' compileOnly project(':open-metadata-implementation:frameworks:open-connector-framework') + compileOnly project(':open-metadata-implementation:frameworks:open-metadata-framework') compileOnly project(':open-metadata-implementation:frameworks:audit-log-framework') compileOnly 'com.fasterxml.jackson.core:jackson-annotations' diff --git a/open-metadata-implementation/adapters/open-connectors/rest-client-connectors/rest-client-factory/build.gradle b/open-metadata-implementation/adapters/open-connectors/rest-client-connectors/rest-client-factory/build.gradle index b39e9937988..6a0ce2ba8ca 100644 --- a/open-metadata-implementation/adapters/open-connectors/rest-client-connectors/rest-client-factory/build.gradle +++ b/open-metadata-implementation/adapters/open-connectors/rest-client-connectors/rest-client-factory/build.gradle @@ -8,6 +8,7 @@ dependencies { compileOnly 'org.slf4j:slf4j-api' compileOnly project(':open-metadata-implementation:adapters:open-connectors:rest-client-connectors:rest-client-connectors-api') compileOnly project(':open-metadata-implementation:frameworks:open-connector-framework') + compileOnly project(':open-metadata-implementation:frameworks:open-metadata-framework') compileOnly project(':open-metadata-implementation:adapters:open-connectors:rest-client-connectors:spring-rest-client-connector') compileOnly 'com.fasterxml.jackson.core:jackson-annotations' diff --git a/open-metadata-implementation/adapters/open-connectors/rest-client-connectors/rest-client-factory/src/main/java/org/odpi/openmetadata/adapters/connectors/restclients/factory/RESTClientFactory.java b/open-metadata-implementation/adapters/open-connectors/rest-client-connectors/rest-client-factory/src/main/java/org/odpi/openmetadata/adapters/connectors/restclients/factory/RESTClientFactory.java index 808a67c671c..3d9fe476fcb 100644 --- a/open-metadata-implementation/adapters/open-connectors/rest-client-connectors/rest-client-factory/src/main/java/org/odpi/openmetadata/adapters/connectors/restclients/factory/RESTClientFactory.java +++ b/open-metadata-implementation/adapters/open-connectors/rest-client-connectors/rest-client-factory/src/main/java/org/odpi/openmetadata/adapters/connectors/restclients/factory/RESTClientFactory.java @@ -8,6 +8,8 @@ import org.odpi.openmetadata.frameworks.connectors.ConnectorBroker; import org.odpi.openmetadata.frameworks.connectors.ConnectorProvider; import org.odpi.openmetadata.frameworks.connectors.properties.beans.*; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ElementOriginCategory; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementOrigin; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/open-metadata-implementation/adapters/open-connectors/rest-client-connectors/spring-rest-client-connector/build.gradle b/open-metadata-implementation/adapters/open-connectors/rest-client-connectors/spring-rest-client-connector/build.gradle index 9d8cd96f6fe..966e53a9735 100644 --- a/open-metadata-implementation/adapters/open-connectors/rest-client-connectors/spring-rest-client-connector/build.gradle +++ b/open-metadata-implementation/adapters/open-connectors/rest-client-connectors/spring-rest-client-connector/build.gradle @@ -8,6 +8,7 @@ dependencies { compileOnly 'org.slf4j:slf4j-api' compileOnly project(':open-metadata-implementation:adapters:open-connectors:rest-client-connectors:rest-client-connectors-api') compileOnly project(':open-metadata-implementation:frameworks:open-connector-framework') + compileOnly project(':open-metadata-implementation:frameworks:open-metadata-framework') compileOnly project(':open-metadata-implementation:frameworks:audit-log-framework') implementation project(':open-metadata-implementation:user-security:token-manager') implementation 'org.springframework:spring-web' diff --git a/open-metadata-implementation/adapters/open-connectors/secrets-store-connectors/env-variable-secrets-store-connector/build.gradle b/open-metadata-implementation/adapters/open-connectors/secrets-store-connectors/env-variable-secrets-store-connector/build.gradle index d1ab6d2b4ff..54664aae3ce 100644 --- a/open-metadata-implementation/adapters/open-connectors/secrets-store-connectors/env-variable-secrets-store-connector/build.gradle +++ b/open-metadata-implementation/adapters/open-connectors/secrets-store-connectors/env-variable-secrets-store-connector/build.gradle @@ -6,6 +6,7 @@ dependencies { compileOnly project(':open-metadata-implementation:frameworks:audit-log-framework') + compileOnly project(':open-metadata-implementation:frameworks:open-metadata-framework') compileOnly project(':open-metadata-implementation:frameworks:open-connector-framework') compileOnly 'com.fasterxml.jackson.core:jackson-annotations' } diff --git a/open-metadata-implementation/adapters/open-connectors/system-connectors/apache-atlas-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/apacheatlas/integration/ApacheAtlasIntegrationConnector.java b/open-metadata-implementation/adapters/open-connectors/system-connectors/apache-atlas-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/apacheatlas/integration/ApacheAtlasIntegrationConnector.java index 5cea463cfd3..91f8261419c 100644 --- a/open-metadata-implementation/adapters/open-connectors/system-connectors/apache-atlas-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/apacheatlas/integration/ApacheAtlasIntegrationConnector.java +++ b/open-metadata-implementation/adapters/open-connectors/system-connectors/apache-atlas-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/apacheatlas/integration/ApacheAtlasIntegrationConnector.java @@ -5,8 +5,8 @@ import org.odpi.openmetadata.accessservices.assetmanager.api.AssetManagerEventListener; import org.odpi.openmetadata.accessservices.assetmanager.events.AssetManagerOutTopicEvent; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.ValidValueElement; +import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.ValidValueElement; import org.odpi.openmetadata.adapters.connectors.apacheatlas.integration.ffdc.AtlasIntegrationAuditCode; import org.odpi.openmetadata.adapters.connectors.apacheatlas.integration.ffdc.AtlasIntegrationErrorCode; import org.odpi.openmetadata.adapters.connectors.apacheatlas.integration.modules.*; @@ -28,7 +28,7 @@ import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; import org.odpi.openmetadata.frameworks.connectors.properties.EndpointProperties; import org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; import org.odpi.openmetadata.frameworks.governanceaction.properties.OpenMetadataTypeDef; import org.odpi.openmetadata.frameworks.governanceaction.properties.OpenMetadataTypeDefGallery; import org.odpi.openmetadata.frameworks.openmetadata.enums.PermittedSynchronization; diff --git a/open-metadata-implementation/adapters/open-connectors/system-connectors/apache-atlas-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/apacheatlas/integration/modules/ApacheHiveIntegrationModule.java b/open-metadata-implementation/adapters/open-connectors/system-connectors/apache-atlas-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/apacheatlas/integration/modules/ApacheHiveIntegrationModule.java index 89e8df4407d..c698244c57c 100644 --- a/open-metadata-implementation/adapters/open-connectors/system-connectors/apache-atlas-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/apacheatlas/integration/modules/ApacheHiveIntegrationModule.java +++ b/open-metadata-implementation/adapters/open-connectors/system-connectors/apache-atlas-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/apacheatlas/integration/modules/ApacheHiveIntegrationModule.java @@ -3,9 +3,7 @@ package org.odpi.openmetadata.adapters.connectors.apacheatlas.integration.modules; -import org.odpi.openmetadata.accessservices.assetmanager.properties.DataAssetProperties; import org.odpi.openmetadata.frameworks.governanceaction.properties.ExternalIdentifierProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.SchemaAttributeProperties; import org.odpi.openmetadata.frameworks.openmetadata.enums.PermittedSynchronization; import org.odpi.openmetadata.adapters.connectors.apacheatlas.resource.properties.AtlasEntity; import org.odpi.openmetadata.adapters.connectors.apacheatlas.resource.properties.AtlasEntityWithExtInfo; @@ -16,6 +14,8 @@ import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; import org.odpi.openmetadata.frameworks.connectors.properties.ConnectionProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.DataAssetProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.SchemaAttributeProperties; import org.odpi.openmetadata.integrationservices.catalog.connector.CatalogIntegratorContext; import java.util.ArrayList; diff --git a/open-metadata-implementation/adapters/open-connectors/system-connectors/apache-atlas-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/apacheatlas/integration/modules/AtlasGlossaryIntegrationModule.java b/open-metadata-implementation/adapters/open-connectors/system-connectors/apache-atlas-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/apacheatlas/integration/modules/AtlasGlossaryIntegrationModule.java index ea577123c65..c007aa743c8 100644 --- a/open-metadata-implementation/adapters/open-connectors/system-connectors/apache-atlas-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/apacheatlas/integration/modules/AtlasGlossaryIntegrationModule.java +++ b/open-metadata-implementation/adapters/open-connectors/system-connectors/apache-atlas-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/apacheatlas/integration/modules/AtlasGlossaryIntegrationModule.java @@ -9,9 +9,8 @@ import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.GlossaryElement; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.GlossaryTermElement; import org.odpi.openmetadata.frameworks.governanceaction.properties.ExternalIdentifierProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.GlossaryCategoryProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.GlossaryProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.GlossaryTermProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.glossaries.GlossaryCategoryProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.glossaries.GlossaryProperties; import org.odpi.openmetadata.frameworks.openmetadata.enums.PermittedSynchronization; import org.odpi.openmetadata.adapters.connectors.apacheatlas.integration.ApacheAtlasIntegrationProvider; import org.odpi.openmetadata.adapters.connectors.apacheatlas.integration.ffdc.AtlasIntegrationAuditCode; @@ -29,7 +28,8 @@ import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; import org.odpi.openmetadata.frameworks.connectors.properties.ConnectionProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.properties.glossaries.GlossaryTermProperties; import org.odpi.openmetadata.integrationservices.catalog.connector.CatalogIntegratorContext; import org.odpi.openmetadata.integrationservices.catalog.connector.GlossaryExchangeService; diff --git a/open-metadata-implementation/adapters/open-connectors/system-connectors/apache-atlas-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/apacheatlas/integration/modules/AtlasIntegrationModuleBase.java b/open-metadata-implementation/adapters/open-connectors/system-connectors/apache-atlas-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/apacheatlas/integration/modules/AtlasIntegrationModuleBase.java index a14f2706159..086b65f6c97 100644 --- a/open-metadata-implementation/adapters/open-connectors/system-connectors/apache-atlas-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/apacheatlas/integration/modules/AtlasIntegrationModuleBase.java +++ b/open-metadata-implementation/adapters/open-connectors/system-connectors/apache-atlas-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/apacheatlas/integration/modules/AtlasIntegrationModuleBase.java @@ -2,16 +2,14 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.adapters.connectors.apacheatlas.integration.modules; +import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.CorrelatedMetadataElement; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.DataAssetElement; import org.odpi.openmetadata.frameworks.governanceaction.properties.MetadataCorrelationHeader; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.MetadataElement; -import org.odpi.openmetadata.accessservices.assetmanager.properties.DataAssetProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.DataStoreProperties; import org.odpi.openmetadata.frameworks.governanceaction.properties.ExternalIdentifierProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.OwnerProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ProcessProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.SchemaAttributeProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.SchemaTypeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.DataAssetProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.DataStoreProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.processes.ProcessProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.OwnerProperties; import org.odpi.openmetadata.frameworks.openmetadata.enums.KeyPattern; import org.odpi.openmetadata.frameworks.openmetadata.enums.PermittedSynchronization; import org.odpi.openmetadata.adapters.connectors.apacheatlas.integration.ffdc.AtlasIntegrationAuditCode; @@ -30,9 +28,11 @@ import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; import org.odpi.openmetadata.frameworks.connectors.properties.ConnectionProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; import org.odpi.openmetadata.frameworks.governanceaction.search.PropertyHelper; import org.odpi.openmetadata.frameworks.integration.context.OpenMetadataAccess; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.SchemaAttributeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.SchemaTypeProperties; import org.odpi.openmetadata.integrationservices.catalog.connector.CatalogIntegratorContext; import org.odpi.openmetadata.integrationservices.catalog.connector.CollaborationExchangeService; import org.odpi.openmetadata.integrationservices.catalog.connector.DataAssetExchangeService; @@ -301,7 +301,7 @@ protected void saveEgeriaGUIDInAtlas(String atlasEntityGUID, * @return string guid * @throws InvalidParameterException retrieved element is null */ - protected String getAtlasGUID(MetadataElement metadataElement) throws InvalidParameterException + protected String getAtlasGUID(CorrelatedMetadataElement metadataElement) throws InvalidParameterException { MetadataCorrelationHeader myMetadataCorrelationHeader = myContext.getMetadataCorrelationHeader(metadataElement); @@ -328,7 +328,7 @@ protected String getAtlasGUID(MetadataElement metadataElement) throws InvalidPar */ protected boolean egeriaUpdateRequired(String egeriaGUID, String egeriaTypeName, - MetadataElement egeriaMetadataElement, + CorrelatedMetadataElement egeriaMetadataElement, AtlasEntity atlasEntity) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException @@ -405,7 +405,7 @@ else if ((metadataCorrelationHeader.getLastSynchronized() == null) || */ protected boolean atlasUpdateRequired(String egeriaGUID, String egeriaTypeName, - MetadataElement egeriaMetadataElement, + CorrelatedMetadataElement egeriaMetadataElement, AtlasEntity atlasEntity) throws InvalidParameterException, PropertyServerException { @@ -631,7 +631,7 @@ protected ExternalIdentifierProperties getExternalIdentifier(String * @throws UserNotAuthorizedException security problem * @throws PropertyServerException problem connecting with Egeria */ - protected void ensureAtlasExternalIdentifier(MetadataElement egeriaElement, + protected void ensureAtlasExternalIdentifier(CorrelatedMetadataElement egeriaElement, String egeriaDisplayName, AtlasEntity atlasEntity, String atlasGUID, @@ -1201,10 +1201,11 @@ protected DataAssetProperties getDataAssetProperties(AtlasEntity atlasEntity, dataAssetProperties.setTypeName(egeriaTypeName); dataAssetProperties.setDeployedImplementationType(atlasEntity.getTypeName()); dataAssetProperties.setQualifiedName(myContext.getMetadataSourceQualifiedName() + ":" + atlasEntity.getTypeName() + ":" + getAtlasStringProperty(attributes, atlasQualifiedNamePropertyName)); - dataAssetProperties.setTechnicalName(getAtlasStringProperty(attributes, atlasNamePropertyName)); - dataAssetProperties.setTechnicalDescription(getAtlasStringProperty(attributes, atlasDescriptionPropertyName)); + dataAssetProperties.setName(getAtlasStringProperty(attributes, atlasNamePropertyName)); + dataAssetProperties.setResourceName(getAtlasStringProperty(attributes, atlasNamePropertyName)); + dataAssetProperties.setResourceDescription(getAtlasStringProperty(attributes, atlasDescriptionPropertyName)); dataAssetProperties.setDisplayName(getAtlasStringProperty(attributes, atlasDisplayNamePropertyName)); - dataAssetProperties.setDescription(getAtlasStringProperty(attributes, atlasUserDescriptionPropertyName)); + dataAssetProperties.setDisplayDescription(getAtlasStringProperty(attributes, atlasUserDescriptionPropertyName)); return dataAssetProperties; } @@ -1232,10 +1233,11 @@ protected DataAssetProperties getEgeriaDataFileProperties(AtlasEntity atlasFSPat dataAssetProperties.setTypeName(egeriaTypeName); dataAssetProperties.setDeployedImplementationType(atlasFSPathEntity.getTypeName()); dataAssetProperties.setQualifiedName(myContext.getMetadataSourceQualifiedName() + ":" + atlasFSPathEntity.getTypeName() + ":" + getAtlasStringProperty(attributes, atlasQualifiedNamePropertyName)); - dataAssetProperties.setTechnicalName(getAtlasStringProperty(attributes, atlasNamePropertyName)); - dataAssetProperties.setTechnicalDescription(getAtlasStringProperty(attributes, atlasDescriptionPropertyName)); + dataAssetProperties.setName(getAtlasStringProperty(attributes, atlasNamePropertyName)); + dataAssetProperties.setResourceName(getAtlasStringProperty(attributes, atlasNamePropertyName)); + dataAssetProperties.setResourceDescription(getAtlasStringProperty(attributes, atlasDescriptionPropertyName)); dataAssetProperties.setDisplayName(getAtlasStringProperty(attributes, atlasDisplayNamePropertyName)); - dataAssetProperties.setDescription(getAtlasStringProperty(attributes, atlasUserDescriptionPropertyName)); + dataAssetProperties.setDisplayDescription(getAtlasStringProperty(attributes, atlasUserDescriptionPropertyName)); Map additionalProperties = addRemainingPropertiesToAdditionalProperties(atlasFSPathEntity.getAttributes(), @@ -1266,10 +1268,11 @@ protected ProcessProperties getProcessProperties(AtlasEntity atlasEntity, processProperties.setTypeName(egeriaTypeName); processProperties.setDeployedImplementationType(atlasEntity.getTypeName()); processProperties.setQualifiedName(myContext.getMetadataSourceQualifiedName() + ":" + atlasEntity.getTypeName() + ":" + getAtlasStringProperty(attributes, atlasQualifiedNamePropertyName)); - processProperties.setTechnicalName(getAtlasStringProperty(attributes, atlasNamePropertyName)); - processProperties.setTechnicalDescription(getAtlasStringProperty(attributes, atlasDescriptionPropertyName)); + processProperties.setName(getAtlasStringProperty(attributes, atlasNamePropertyName)); + processProperties.setResourceName(getAtlasStringProperty(attributes, atlasNamePropertyName)); + processProperties.setResourceDescription(getAtlasStringProperty(attributes, atlasDescriptionPropertyName)); processProperties.setDisplayName(getAtlasStringProperty(attributes, atlasDisplayNamePropertyName)); - processProperties.setDescription(getAtlasStringProperty(attributes, atlasUserDescriptionPropertyName)); + processProperties.setDisplayDescription(getAtlasStringProperty(attributes, atlasUserDescriptionPropertyName)); return processProperties; } diff --git a/open-metadata-implementation/adapters/open-connectors/system-connectors/apache-atlas-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/apacheatlas/integration/modules/AtlasLineageIntegrationModule.java b/open-metadata-implementation/adapters/open-connectors/system-connectors/apache-atlas-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/apacheatlas/integration/modules/AtlasLineageIntegrationModule.java index 7bde4427257..592d079ec49 100644 --- a/open-metadata-implementation/adapters/open-connectors/system-connectors/apache-atlas-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/apacheatlas/integration/modules/AtlasLineageIntegrationModule.java +++ b/open-metadata-implementation/adapters/open-connectors/system-connectors/apache-atlas-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/apacheatlas/integration/modules/AtlasLineageIntegrationModule.java @@ -5,8 +5,6 @@ import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.ProcessElement; import org.odpi.openmetadata.frameworks.governanceaction.properties.ExternalIdentifierProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ProcessProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ProcessStatus; import org.odpi.openmetadata.frameworks.openmetadata.enums.PermittedSynchronization; import org.odpi.openmetadata.adapters.connectors.apacheatlas.integration.ffdc.AtlasIntegrationAuditCode; import org.odpi.openmetadata.adapters.connectors.apacheatlas.integration.ffdc.AtlasIntegrationErrorCode; @@ -21,6 +19,8 @@ import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; import org.odpi.openmetadata.frameworks.connectors.properties.ConnectionProperties; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ProcessStatus; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.processes.ProcessProperties; import org.odpi.openmetadata.integrationservices.catalog.connector.CatalogIntegratorContext; import org.odpi.openmetadata.integrationservices.catalog.connector.LineageExchangeService; diff --git a/open-metadata-implementation/adapters/open-connectors/system-connectors/apache-atlas-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/apacheatlas/integration/modules/AtlasReferenceClassificationsIntegrationModule.java b/open-metadata-implementation/adapters/open-connectors/system-connectors/apache-atlas-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/apacheatlas/integration/modules/AtlasReferenceClassificationsIntegrationModule.java index fd8380870b0..d98e2d1a904 100644 --- a/open-metadata-implementation/adapters/open-connectors/system-connectors/apache-atlas-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/apacheatlas/integration/modules/AtlasReferenceClassificationsIntegrationModule.java +++ b/open-metadata-implementation/adapters/open-connectors/system-connectors/apache-atlas-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/apacheatlas/integration/modules/AtlasReferenceClassificationsIntegrationModule.java @@ -5,7 +5,6 @@ import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.ValidValueElement; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.ValidValueMember; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ValidValueProperties; import org.odpi.openmetadata.adapters.connectors.apacheatlas.integration.ApacheAtlasIntegrationProvider; import org.odpi.openmetadata.adapters.connectors.apacheatlas.integration.ffdc.AtlasIntegrationAuditCode; @@ -19,6 +18,7 @@ import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; import org.odpi.openmetadata.frameworks.connectors.properties.ConnectionProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues.ValidValueProperties; import org.odpi.openmetadata.integrationservices.catalog.connector.CatalogIntegratorContext; import org.odpi.openmetadata.integrationservices.catalog.connector.ValidValuesExchangeService; diff --git a/open-metadata-implementation/adapters/open-connectors/system-connectors/apache-atlas-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/apacheatlas/integration/modules/AtlasRelatedElementsIntegrationModule.java b/open-metadata-implementation/adapters/open-connectors/system-connectors/apache-atlas-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/apacheatlas/integration/modules/AtlasRelatedElementsIntegrationModule.java index a9ef43e26e4..7162aa4ad66 100644 --- a/open-metadata-implementation/adapters/open-connectors/system-connectors/apache-atlas-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/apacheatlas/integration/modules/AtlasRelatedElementsIntegrationModule.java +++ b/open-metadata-implementation/adapters/open-connectors/system-connectors/apache-atlas-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/apacheatlas/integration/modules/AtlasRelatedElementsIntegrationModule.java @@ -4,7 +4,6 @@ import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.ValidValueElement; - import org.odpi.openmetadata.adapters.connectors.apacheatlas.integration.ApacheAtlasIntegrationConnector; import org.odpi.openmetadata.adapters.connectors.apacheatlas.integration.ApacheAtlasIntegrationProvider; import org.odpi.openmetadata.adapters.connectors.apacheatlas.integration.ffdc.AtlasIntegrationAuditCode; diff --git a/open-metadata-implementation/adapters/open-connectors/system-connectors/apache-atlas-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/apacheatlas/integration/modules/DatabaseIntegrationModuleBase.java b/open-metadata-implementation/adapters/open-connectors/system-connectors/apache-atlas-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/apacheatlas/integration/modules/DatabaseIntegrationModuleBase.java index f10f9675995..e1aa2d40b04 100644 --- a/open-metadata-implementation/adapters/open-connectors/system-connectors/apache-atlas-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/apacheatlas/integration/modules/DatabaseIntegrationModuleBase.java +++ b/open-metadata-implementation/adapters/open-connectors/system-connectors/apache-atlas-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/apacheatlas/integration/modules/DatabaseIntegrationModuleBase.java @@ -7,10 +7,7 @@ import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.DataAssetElement; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.SchemaAttributeElement; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.SchemaTypeElement; -import org.odpi.openmetadata.accessservices.assetmanager.properties.DataAssetProperties; import org.odpi.openmetadata.frameworks.governanceaction.properties.ExternalIdentifierProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.SchemaAttributeProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.SchemaTypeProperties; import org.odpi.openmetadata.frameworks.openmetadata.enums.PermittedSynchronization; import org.odpi.openmetadata.adapters.connectors.apacheatlas.integration.ffdc.AtlasIntegrationAuditCode; @@ -26,6 +23,9 @@ import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; import org.odpi.openmetadata.frameworks.connectors.properties.ConnectionProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.DataAssetProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.SchemaAttributeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.SchemaTypeProperties; import org.odpi.openmetadata.integrationservices.catalog.connector.CatalogIntegratorContext; import java.util.List; diff --git a/open-metadata-implementation/adapters/open-connectors/system-connectors/apache-atlas-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/apacheatlas/integration/modules/RDBMSIntegrationModule.java b/open-metadata-implementation/adapters/open-connectors/system-connectors/apache-atlas-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/apacheatlas/integration/modules/RDBMSIntegrationModule.java index a1b9985da9d..0b1340d0729 100644 --- a/open-metadata-implementation/adapters/open-connectors/system-connectors/apache-atlas-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/apacheatlas/integration/modules/RDBMSIntegrationModule.java +++ b/open-metadata-implementation/adapters/open-connectors/system-connectors/apache-atlas-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/apacheatlas/integration/modules/RDBMSIntegrationModule.java @@ -3,14 +3,14 @@ package org.odpi.openmetadata.adapters.connectors.apacheatlas.integration.modules; -import org.odpi.openmetadata.accessservices.assetmanager.properties.DataAssetProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.SchemaAttributeProperties; import org.odpi.openmetadata.adapters.connectors.apacheatlas.resource.properties.AtlasEntity; import org.odpi.openmetadata.adapters.connectors.apacheatlas.resource.ApacheAtlasRESTConnector; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.Connector; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; import org.odpi.openmetadata.frameworks.connectors.properties.ConnectionProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.DataAssetProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.SchemaAttributeProperties; import org.odpi.openmetadata.integrationservices.catalog.connector.CatalogIntegratorContext; import java.util.ArrayList; diff --git a/open-metadata-implementation/adapters/open-connectors/system-connectors/apache-atlas-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/apacheatlas/survey/SurveyApacheAtlasConnector.java b/open-metadata-implementation/adapters/open-connectors/system-connectors/apache-atlas-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/apacheatlas/survey/SurveyApacheAtlasConnector.java index 819a28d750a..84f12d958eb 100644 --- a/open-metadata-implementation/adapters/open-connectors/system-connectors/apache-atlas-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/apacheatlas/survey/SurveyApacheAtlasConnector.java +++ b/open-metadata-implementation/adapters/open-connectors/system-connectors/apache-atlas-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/apacheatlas/survey/SurveyApacheAtlasConnector.java @@ -34,7 +34,7 @@ import org.odpi.openmetadata.frameworks.connectors.properties.AssetUniverse; import org.odpi.openmetadata.frameworks.connectors.properties.NestedSchemaType; import org.odpi.openmetadata.frameworks.connectors.properties.SchemaAttributes; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStatus; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ElementStatus; import org.odpi.openmetadata.frameworks.connectors.properties.beans.SchemaAttribute; import org.odpi.openmetadata.frameworks.governanceaction.OpenMetadataStore; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; diff --git a/open-metadata-implementation/adapters/open-connectors/system-connectors/apache-kafka-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/apachekafka/integration/KafkaTopicIntegrationConnector.java b/open-metadata-implementation/adapters/open-connectors/system-connectors/apache-kafka-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/apachekafka/integration/KafkaTopicIntegrationConnector.java index 3858488b3b2..631b45e92b7 100644 --- a/open-metadata-implementation/adapters/open-connectors/system-connectors/apache-kafka-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/apachekafka/integration/KafkaTopicIntegrationConnector.java +++ b/open-metadata-implementation/adapters/open-connectors/system-connectors/apache-kafka-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/apachekafka/integration/KafkaTopicIntegrationConnector.java @@ -5,9 +5,9 @@ import org.apache.kafka.clients.admin.Admin; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.TopicElement; import org.odpi.openmetadata.accessservices.datamanager.properties.TemplateProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.TopicProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.TopicElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.topics.TopicProperties; import org.odpi.openmetadata.adapters.connectors.apachekafka.integration.ffdc.KafkaIntegrationConnectorAuditCode; import org.odpi.openmetadata.adapters.connectors.apachekafka.resource.ApacheKafkaAdminConnector; import org.odpi.openmetadata.frameworks.connectors.Connector; @@ -16,8 +16,8 @@ import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; import org.odpi.openmetadata.frameworks.connectors.properties.EndpointProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStatus; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ElementStatus; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementStub; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.frameworks.governanceaction.properties.OpenMetadataElement; diff --git a/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/rest/AdminServicesAPIResponse.java b/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/rest/AdminServicesAPIResponse.java index 8d10ea764b4..730dce5bcde 100644 --- a/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/rest/AdminServicesAPIResponse.java +++ b/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/rest/AdminServicesAPIResponse.java @@ -27,7 +27,7 @@ @JsonSubTypes.Type(value = AccessServicesResponse.class, name = "AccessServicesResponse"), @JsonSubTypes.Type(value = CohortConfigResponse.class, name = "CohortConfigResponse"), @JsonSubTypes.Type(value = ConnectionListResponse.class, name = "ConnectionListResponse"), - @JsonSubTypes.Type(value = ConnectionResponse.class, name = "ConnectionResponse"), + @JsonSubTypes.Type(value = ConnectionResponse.class, name = "OCFConnectionResponse"), @JsonSubTypes.Type(value = EventBusConfigResponse.class, name = "EventBusConfigResponse"), @JsonSubTypes.Type(value = IntegrationServiceConfigResponse.class, name = "IntegrationServiceConfigResponse"), @JsonSubTypes.Type(value = IntegrationServicesResponse.class, name = "IntegrationServicesResponse"), diff --git a/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/rest/ConnectionResponse.java b/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/rest/ConnectionResponse.java index d7e00eb2ff2..bfcb2f64a15 100644 --- a/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/rest/ConnectionResponse.java +++ b/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/rest/ConnectionResponse.java @@ -16,7 +16,7 @@ /** - * ConnectionResponse is the response structure used on the Asset Consumer OMAS REST API calls that returns a + * OCFConnectionResponse is the response structure used on the Asset Consumer OMAS REST API calls that returns a * Connection object as a response. */ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @@ -88,7 +88,7 @@ public void setConnection(Connection connection) @Override public String toString() { - return "ConnectionResponse{" + + return "OCFConnectionResponse{" + "connection=" + connection + ", exceptionClassName='" + getExceptionClassName() + '\'' + ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + diff --git a/open-metadata-implementation/admin-services/admin-services-api/src/test/java/org/odpi/openmetadata/adminservices/rest/ConnectionResponseTest.java b/open-metadata-implementation/admin-services/admin-services-api/src/test/java/org/odpi/openmetadata/adminservices/rest/ConnectionResponseTest.java deleted file mode 100644 index 581b46564ad..00000000000 --- a/open-metadata-implementation/admin-services/admin-services-api/src/test/java/org/odpi/openmetadata/adminservices/rest/ConnectionResponseTest.java +++ /dev/null @@ -1,243 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.adminservices.rest; - -import com.fasterxml.jackson.databind.ObjectMapper; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection; -import org.testng.annotations.Test; - -import java.util.HashMap; -import java.util.Map; - -import static org.testng.Assert.assertFalse; -import static org.testng.Assert.assertTrue; - -/** - * Validate that the ConnectionResponse bean can be cloned, compared, serialized, deserialized and printed as a String. - */ -public class ConnectionResponseTest -{ - private Connection connection = new Connection(); - private Map additionalProperties = new HashMap<>(); - - - /** - * Default constructor - */ - public ConnectionResponseTest() - { - - } - - - /** - * Set up an example object to test. - * - * @return filled in object - */ - private ConnectionResponse getTestObject() - { - ConnectionResponse testObject = new ConnectionResponse(); - - testObject.setExceptionClassName(NullPointerException.class.getName()); - testObject.setExceptionErrorMessage("TestErrorMessage"); - testObject.setExceptionSystemAction("TestSystemAction"); - testObject.setExceptionUserAction("TestUserAction"); - - testObject.setRelatedHTTPCode(400); - testObject.setExceptionProperties(additionalProperties); - - testObject.setConnection(connection); - - return testObject; - } - - - /** - * Validate that the object that comes out of the test has the same content as the original test object. - * - * @param resultObject object returned by the test - */ - private void validateResultObject(ConnectionResponse resultObject) - { - assertTrue(resultObject.getExceptionClassName().equals(NullPointerException.class.getName())); - assertTrue(resultObject.getExceptionErrorMessage().equals("TestErrorMessage")); - assertTrue(resultObject.getExceptionSystemAction().equals("TestSystemAction")); - assertTrue(resultObject.getExceptionUserAction().equals("TestUserAction")); - - assertTrue(resultObject.getRelatedHTTPCode() == 400); - assertTrue(resultObject.getExceptionProperties() == null); - - assertTrue(resultObject.getConnection().equals(connection)); - - } - - - /** - * Validate that the object is initialized properly - */ - @Test public void testNullObject() - { - ConnectionResponse nullObject = new ConnectionResponse(); - - assertTrue(nullObject.getRelatedHTTPCode() == 200); - assertTrue(nullObject.getExceptionClassName() == null); - assertTrue(nullObject.getExceptionErrorMessage() == null); - assertTrue(nullObject.getExceptionSystemAction() == null); - assertTrue(nullObject.getExceptionUserAction() == null); - assertTrue(nullObject.getExceptionProperties() == null); - assertTrue(nullObject.getConnection() == null); - - nullObject = new ConnectionResponse(null); - - assertTrue(nullObject.getRelatedHTTPCode() == 200); - assertTrue(nullObject.getExceptionClassName() == null); - assertTrue(nullObject.getExceptionErrorMessage() == null); - assertTrue(nullObject.getExceptionSystemAction() == null); - assertTrue(nullObject.getExceptionUserAction() == null); - assertTrue(nullObject.getExceptionProperties() == null); - assertTrue(nullObject.getConnection() == null); - - } - - - /** - * Validate that exception properties are managed properly - */ - @Test public void testExceptionProperties() - { - Map propertyMap; - ConnectionResponse testObject = new ConnectionResponse(); - - assertTrue(testObject.getExceptionProperties() == null); - - propertyMap = null; - testObject = new ConnectionResponse(); - testObject.setExceptionProperties(propertyMap); - - assertTrue(testObject.getExceptionProperties() == null); - - propertyMap = new HashMap<>(); - testObject = new ConnectionResponse(); - testObject.setExceptionProperties(propertyMap); - - assertTrue(testObject.getExceptionProperties() == null); - - propertyMap.put("propertyName", "propertyValue"); - testObject = new ConnectionResponse(); - testObject.setExceptionProperties(propertyMap); - - Map retrievedPropertyMap = testObject.getExceptionProperties(); - - assertTrue(retrievedPropertyMap != null); - assertFalse(retrievedPropertyMap.isEmpty()); - assertTrue("propertyValue".equals(retrievedPropertyMap.get("propertyName"))); - } - - - /** - * Validate that 2 different objects with the same content are evaluated as equal. - * Also that different objects are considered not equal. - */ - @Test public void testEquals() - { - assertFalse(getTestObject().equals(null)); - assertFalse(getTestObject().equals("DummyString")); - assertTrue(getTestObject().equals(getTestObject())); - - ConnectionResponse sameObject = getTestObject(); - assertTrue(sameObject.equals(sameObject)); - - ConnectionResponse differentObject = getTestObject(); - differentObject.setExceptionErrorMessage("Different"); - assertFalse(getTestObject().equals(differentObject)); - } - - - /** - * Validate that 2 different objects with the same content have the same hash code. - */ - @Test public void testHashCode() - { - assertTrue(getTestObject().hashCode() == getTestObject().hashCode()); - - ConnectionResponse testObject = getTestObject(); - - testObject.setConnection(null); - - assertTrue(testObject.hashCode() != 0); - } - - - /** - * Validate that an object cloned from another object has the same content as the original - */ - @Test public void testClone() - { - validateResultObject(new ConnectionResponse(getTestObject())); - } - - - /** - * Validate that an object generated from a JSON String has the same content as the object used to - * create the JSON String. - */ - @Test public void testJSON() - { - ObjectMapper objectMapper = new ObjectMapper(); - String jsonString = null; - - /* - * This class - */ - try - { - jsonString = objectMapper.writeValueAsString(getTestObject()); - } - catch (Exception exc) - { - assertTrue(false, "Exception: " + exc.getMessage()); - } - - try - { - validateResultObject(objectMapper.readValue(jsonString, ConnectionResponse.class)); - } - catch (Exception exc) - { - assertTrue(false, "Exception: " + exc.getMessage()); - } - - /* - * Through superclass - */ - AdminServicesAPIResponse superObject = getTestObject(); - - try - { - jsonString = objectMapper.writeValueAsString(superObject); - } - catch (Exception exc) - { - assertTrue(false, "Exception: " + exc.getMessage()); - } - - try - { - validateResultObject((ConnectionResponse) objectMapper.readValue(jsonString, AdminServicesAPIResponse.class)); - } - catch (Exception exc) - { - assertTrue(false, "Exception: " + exc.getMessage()); - } - } - - - /** - * Test that toString is overridden. - */ - @Test public void testToString() - { - assertTrue(getTestObject().toString().contains("ConnectionResponse")); - } -} diff --git a/open-metadata-implementation/admin-services/admin-services-api/src/test/java/org/odpi/openmetadata/adminservices/rest/OCFConnectionResponseTest.java b/open-metadata-implementation/admin-services/admin-services-api/src/test/java/org/odpi/openmetadata/adminservices/rest/OCFConnectionResponseTest.java new file mode 100644 index 00000000000..13b53719a37 --- /dev/null +++ b/open-metadata-implementation/admin-services/admin-services-api/src/test/java/org/odpi/openmetadata/adminservices/rest/OCFConnectionResponseTest.java @@ -0,0 +1,243 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.adminservices.rest; + +import com.fasterxml.jackson.databind.ObjectMapper; +import org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection; +import org.testng.annotations.Test; + +import java.util.HashMap; +import java.util.Map; + +import static org.testng.Assert.assertFalse; +import static org.testng.Assert.assertTrue; + +/** + * Validate that the OCFConnectionResponse bean can be cloned, compared, serialized, deserialized and printed as a String. + */ +public class OCFConnectionResponseTest +{ + private Connection connection = new Connection(); + private Map additionalProperties = new HashMap<>(); + + + /** + * Default constructor + */ + public OCFConnectionResponseTest() + { + + } + + + /** + * Set up an example object to test. + * + * @return filled in object + */ + private ConnectionResponse getTestObject() + { + ConnectionResponse testObject = new ConnectionResponse(); + + testObject.setExceptionClassName(NullPointerException.class.getName()); + testObject.setExceptionErrorMessage("TestErrorMessage"); + testObject.setExceptionSystemAction("TestSystemAction"); + testObject.setExceptionUserAction("TestUserAction"); + + testObject.setRelatedHTTPCode(400); + testObject.setExceptionProperties(additionalProperties); + + testObject.setConnection(connection); + + return testObject; + } + + + /** + * Validate that the object that comes out of the test has the same content as the original test object. + * + * @param resultObject object returned by the test + */ + private void validateResultObject(ConnectionResponse resultObject) + { + assertTrue(resultObject.getExceptionClassName().equals(NullPointerException.class.getName())); + assertTrue(resultObject.getExceptionErrorMessage().equals("TestErrorMessage")); + assertTrue(resultObject.getExceptionSystemAction().equals("TestSystemAction")); + assertTrue(resultObject.getExceptionUserAction().equals("TestUserAction")); + + assertTrue(resultObject.getRelatedHTTPCode() == 400); + assertTrue(resultObject.getExceptionProperties() == null); + + assertTrue(resultObject.getConnection().equals(connection)); + + } + + + /** + * Validate that the object is initialized properly + */ + @Test public void testNullObject() + { + ConnectionResponse nullObject = new ConnectionResponse(); + + assertTrue(nullObject.getRelatedHTTPCode() == 200); + assertTrue(nullObject.getExceptionClassName() == null); + assertTrue(nullObject.getExceptionErrorMessage() == null); + assertTrue(nullObject.getExceptionSystemAction() == null); + assertTrue(nullObject.getExceptionUserAction() == null); + assertTrue(nullObject.getExceptionProperties() == null); + assertTrue(nullObject.getConnection() == null); + + nullObject = new ConnectionResponse(null); + + assertTrue(nullObject.getRelatedHTTPCode() == 200); + assertTrue(nullObject.getExceptionClassName() == null); + assertTrue(nullObject.getExceptionErrorMessage() == null); + assertTrue(nullObject.getExceptionSystemAction() == null); + assertTrue(nullObject.getExceptionUserAction() == null); + assertTrue(nullObject.getExceptionProperties() == null); + assertTrue(nullObject.getConnection() == null); + + } + + + /** + * Validate that exception properties are managed properly + */ + @Test public void testExceptionProperties() + { + Map propertyMap; + ConnectionResponse testObject = new ConnectionResponse(); + + assertTrue(testObject.getExceptionProperties() == null); + + propertyMap = null; + testObject = new ConnectionResponse(); + testObject.setExceptionProperties(propertyMap); + + assertTrue(testObject.getExceptionProperties() == null); + + propertyMap = new HashMap<>(); + testObject = new ConnectionResponse(); + testObject.setExceptionProperties(propertyMap); + + assertTrue(testObject.getExceptionProperties() == null); + + propertyMap.put("propertyName", "propertyValue"); + testObject = new ConnectionResponse(); + testObject.setExceptionProperties(propertyMap); + + Map retrievedPropertyMap = testObject.getExceptionProperties(); + + assertTrue(retrievedPropertyMap != null); + assertFalse(retrievedPropertyMap.isEmpty()); + assertTrue("propertyValue".equals(retrievedPropertyMap.get("propertyName"))); + } + + + /** + * Validate that 2 different objects with the same content are evaluated as equal. + * Also that different objects are considered not equal. + */ + @Test public void testEquals() + { + assertFalse(getTestObject().equals(null)); + assertFalse(getTestObject().equals("DummyString")); + assertTrue(getTestObject().equals(getTestObject())); + + ConnectionResponse sameObject = getTestObject(); + assertTrue(sameObject.equals(sameObject)); + + ConnectionResponse differentObject = getTestObject(); + differentObject.setExceptionErrorMessage("Different"); + assertFalse(getTestObject().equals(differentObject)); + } + + + /** + * Validate that 2 different objects with the same content have the same hash code. + */ + @Test public void testHashCode() + { + assertTrue(getTestObject().hashCode() == getTestObject().hashCode()); + + ConnectionResponse testObject = getTestObject(); + + testObject.setConnection(null); + + assertTrue(testObject.hashCode() != 0); + } + + + /** + * Validate that an object cloned from another object has the same content as the original + */ + @Test public void testClone() + { + validateResultObject(new ConnectionResponse(getTestObject())); + } + + + /** + * Validate that an object generated from a JSON String has the same content as the object used to + * create the JSON String. + */ + @Test public void testJSON() + { + ObjectMapper objectMapper = new ObjectMapper(); + String jsonString = null; + + /* + * This class + */ + try + { + jsonString = objectMapper.writeValueAsString(getTestObject()); + } + catch (Exception exc) + { + assertTrue(false, "Exception: " + exc.getMessage()); + } + + try + { + validateResultObject(objectMapper.readValue(jsonString, ConnectionResponse.class)); + } + catch (Exception exc) + { + assertTrue(false, "Exception: " + exc.getMessage()); + } + + /* + * Through superclass + */ + AdminServicesAPIResponse superObject = getTestObject(); + + try + { + jsonString = objectMapper.writeValueAsString(superObject); + } + catch (Exception exc) + { + assertTrue(false, "Exception: " + exc.getMessage()); + } + + try + { + validateResultObject((ConnectionResponse) objectMapper.readValue(jsonString, AdminServicesAPIResponse.class)); + } + catch (Exception exc) + { + assertTrue(false, "Exception: " + exc.getMessage()); + } + } + + + /** + * Test that toString is overridden. + */ + @Test public void testToString() + { + assertTrue(getTestObject().toString().contains("OCFConnectionResponse")); + } +} diff --git a/open-metadata-implementation/admin-services/admin-services-client/src/main/java/org/odpi/openmetadata/adminservices/client/rest/AdminServicesRESTClient.java b/open-metadata-implementation/admin-services/admin-services-client/src/main/java/org/odpi/openmetadata/adminservices/client/rest/AdminServicesRESTClient.java index 3deaeba585f..0a9d5697a03 100644 --- a/open-metadata-implementation/admin-services/admin-services-client/src/main/java/org/odpi/openmetadata/adminservices/client/rest/AdminServicesRESTClient.java +++ b/open-metadata-implementation/admin-services/admin-services-client/src/main/java/org/odpi/openmetadata/adminservices/client/rest/AdminServicesRESTClient.java @@ -396,13 +396,13 @@ public OMAGServerStatusResponse callOMAGServerStatusGetRESTCall(String method /** - * Issue a GET REST call that returns a ConnectionResponse object. + * Issue a GET REST call that returns a OCFConnectionResponse object. * * @param methodName name of the method being called. * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. * @param params a list of parameters that are slotted into the url template. * - * @return ConnectionResponse + * @return OCFConnectionResponse * @throws OMAGInvalidParameterException one of the parameters is invalid. * @throws OMAGNotAuthorizedException the user is not authorized to make this request. * @throws OMAGConfigurationErrorException something went wrong with the REST call stack. diff --git a/open-metadata-implementation/admin-services/admin-services-registration/build.gradle b/open-metadata-implementation/admin-services/admin-services-registration/build.gradle index 87ea361d500..bed74b50750 100644 --- a/open-metadata-implementation/admin-services/admin-services-registration/build.gradle +++ b/open-metadata-implementation/admin-services/admin-services-registration/build.gradle @@ -6,6 +6,7 @@ dependencies { implementation project(':open-metadata-implementation:frameworks:audit-log-framework') + implementation project(':open-metadata-implementation:frameworks:open-metadata-framework') implementation project(':open-metadata-implementation:frameworks:open-connector-framework') implementation project(':open-metadata-implementation:admin-services:admin-services-api') implementation project(':open-metadata-implementation:repository-services:repository-services-apis') diff --git a/open-metadata-implementation/admin-services/admin-services-registration/src/main/java/org/odpi/openmetadata/adminservices/registration/AccessServiceAdmin.java b/open-metadata-implementation/admin-services/admin-services-registration/src/main/java/org/odpi/openmetadata/adminservices/registration/AccessServiceAdmin.java index 7a05a144720..d4abea4aac8 100644 --- a/open-metadata-implementation/admin-services/admin-services-registration/src/main/java/org/odpi/openmetadata/adminservices/registration/AccessServiceAdmin.java +++ b/open-metadata-implementation/admin-services/admin-services-registration/src/main/java/org/odpi/openmetadata/adminservices/registration/AccessServiceAdmin.java @@ -11,6 +11,8 @@ import org.odpi.openmetadata.frameworks.connectors.ConnectorBroker; import org.odpi.openmetadata.frameworks.connectors.ConnectorProvider; import org.odpi.openmetadata.frameworks.connectors.properties.beans.*; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ElementOriginCategory; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementOrigin; import org.odpi.openmetadata.repositoryservices.auditlog.OMRSAuditLog; import org.odpi.openmetadata.repositoryservices.auditlog.OMRSAuditingComponent; import org.odpi.openmetadata.repositoryservices.connectors.omrstopic.OMRSTopicConnector; diff --git a/open-metadata-implementation/admin-services/admin-services-server/build.gradle b/open-metadata-implementation/admin-services/admin-services-server/build.gradle index 8330f4b6a53..a7f15683b33 100644 --- a/open-metadata-implementation/admin-services/admin-services-server/build.gradle +++ b/open-metadata-implementation/admin-services/admin-services-server/build.gradle @@ -6,6 +6,7 @@ dependencies { implementation project(':open-metadata-implementation:frameworks:audit-log-framework') + implementation project(':open-metadata-implementation:frameworks:open-metadata-framework') implementation project(':open-metadata-implementation:frameworks:open-connector-framework') implementation 'org.slf4j:slf4j-api' implementation project(':open-metadata-implementation:admin-services:admin-services-api') diff --git a/open-metadata-implementation/common-services/ffdc-services/build.gradle b/open-metadata-implementation/common-services/ffdc-services/build.gradle index 2d42a5ca2de..fabf44244b2 100644 --- a/open-metadata-implementation/common-services/ffdc-services/build.gradle +++ b/open-metadata-implementation/common-services/ffdc-services/build.gradle @@ -13,6 +13,7 @@ dependencies { implementation project(':open-metadata-implementation:adapters:open-connectors:rest-client-connectors:spring-rest-client-connector') implementation project(':open-metadata-implementation:repository-services:repository-services-apis') implementation project(':open-metadata-implementation:frameworks:audit-log-framework') + implementation project(':open-metadata-implementation:frameworks:open-metadata-framework') implementation project(':open-metadata-implementation:frameworks:open-connector-framework') implementation project(':open-metadata-implementation:frameworks:governance-action-framework') implementation project(':open-metadata-implementation:frameworks:survey-action-framework') diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/InvalidParameterHandler.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/InvalidParameterHandler.java index 4209e55288a..75e4620c229 100644 --- a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/InvalidParameterHandler.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/InvalidParameterHandler.java @@ -5,8 +5,8 @@ import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection; import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementBase; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementOrigin; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementOriginCategory; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ElementOriginCategory; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementOrigin; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDef; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/APIManagerRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/APIManagerRequestBody.java similarity index 82% rename from open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/APIManagerRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/APIManagerRequestBody.java index ba0779d9c44..82883d8263d 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/APIManagerRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/APIManagerRequestBody.java @@ -1,12 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.properties.APIManagerProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities.APIManagerProperties; import java.util.Objects; @@ -117,18 +117,7 @@ public String toString() return "APIManagerRequestBody{" + "externalSourceGUID='" + externalSourceGUID + '\'' + ", externalSourceName='" + externalSourceName + '\'' + - ", displayName='" + getDisplayName() + '\'' + - ", description='" + getDescription() + '\'' + - ", typeDescription='" + getDeployedImplementationType() + '\'' + - ", version='" + getVersion() + '\'' + - ", patchLevel='" + getPatchLevel() + '\'' + - ", source='" + getSource() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; + "} " + super.toString(); } diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/APIOperationRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/APIOperationRequestBody.java similarity index 75% rename from open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/APIOperationRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/APIOperationRequestBody.java index a3b6b9543ec..cc2893299da 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/APIOperationRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/APIOperationRequestBody.java @@ -1,12 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.properties.APIOperationProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.apis.APIOperationProperties; import java.util.Objects; @@ -117,24 +117,9 @@ public void setExternalSourceName(String externalSourceName) public String toString() { return "APIOperationRequestBody{" + - "externalSourceGUID='" + externalSourceGUID + '\'' + - ", externalSourceName='" + externalSourceName + '\'' + - ", path='" + getPath() + '\'' + - ", command='" + getCommand() + '\'' + - ", versionNumber='" + getVersionNumber() + '\'' + - ", author='" + getAuthor() + '\'' + - ", usage='" + getUsage() + '\'' + - ", encodingStandard='" + getEncodingStandard() + '\'' + - ", namespace='" + getNamespace() + '\'' + - ", isDeprecated=" + getIsDeprecated() + - ", displayName='" + getDisplayName() + '\'' + - ", description='" + getDescription() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; + "externalSourceGUID='" + externalSourceGUID + '\'' + + ", externalSourceName='" + externalSourceName + '\'' + + "} " + super.toString(); } diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/APIOperationResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/APIOperationResponse.java new file mode 100644 index 00000000000..382cd2e098f --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/APIOperationResponse.java @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.APIOperationElement; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * APIOperationResponse is a response object for passing back a single APIOperation + * element or an exception if the request failed. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class APIOperationResponse extends FFDCResponseBase +{ + private APIOperationElement element = null; + + + /** + * Default constructor + */ + public APIOperationResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public APIOperationResponse(APIOperationResponse template) + { + super(template); + + if (template != null) + { + element = template.getElement(); + } + } + + + /** + * Return the metadata element. + * + * @return result object + */ + public APIOperationElement getElement() + { + return element; + } + + + /** + * Set up the metadata element to return. + * + * @param element result object + */ + public void setElement(APIOperationElement element) + { + this.element = element; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "APIOperationResponse{" + + "element=" + element + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + APIOperationResponse that = (APIOperationResponse) objectToCompare; + return Objects.equals(element, that.element); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), element); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/APIOperationsResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/APIOperationsResponse.java new file mode 100644 index 00000000000..10421d28a19 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/APIOperationsResponse.java @@ -0,0 +1,126 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.APIOperationElement; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * APIOperationsResponse is a response object for passing back a a list of APIOperations + * or an exception if the request failed. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class APIOperationsResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public APIOperationsResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public APIOperationsResponse(APIOperationsResponse template) + { + super(template); + + if (template != null) + { + elements = template.getElements(); + } + } + + + /** + * Return the list of metadata elements. + * + * @return result object + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the metadata element to return. + * + * @param elements result object + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "APIOperationsResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + APIOperationsResponse that = (APIOperationsResponse) objectToCompare; + return Objects.equals(elements, that.elements); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elements); + } +} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/APIParameterListRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/APIParameterListRequestBody.java similarity index 76% rename from open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/APIParameterListRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/APIParameterListRequestBody.java index 519b35c1443..fd9189c0887 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/APIParameterListRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/APIParameterListRequestBody.java @@ -1,12 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.properties.APIParameterListProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.apis.APIParameterListProperties; import java.util.Objects; @@ -117,23 +117,9 @@ public void setExternalSourceName(String externalSourceName) public String toString() { return "APIParameterListRequestBody{" + - "externalSourceGUID='" + externalSourceGUID + '\'' + - ", externalSourceName='" + externalSourceName + '\'' + - ", required=" + getRequired() + - ", versionNumber='" + getVersionNumber() + '\'' + - ", author='" + getAuthor() + '\'' + - ", usage='" + getUsage() + '\'' + - ", encodingStandard='" + getEncodingStandard() + '\'' + - ", namespace='" + getNamespace() + '\'' + - ", isDeprecated=" + getIsDeprecated() + - ", displayName='" + getDisplayName() + '\'' + - ", description='" + getDescription() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; + "externalSourceGUID='" + externalSourceGUID + '\'' + + ", externalSourceName='" + externalSourceName + '\'' + + "} " + super.toString(); } diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/APIParameterListResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/APIParameterListResponse.java new file mode 100644 index 00000000000..abaa7aac4f0 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/APIParameterListResponse.java @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.APIParameterListElement; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * APIParameterListResponse is a response object for passing back a single APIParameterList + * element or an exception if the request failed. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class APIParameterListResponse extends FFDCResponseBase +{ + private APIParameterListElement element = null; + + + /** + * Default constructor + */ + public APIParameterListResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public APIParameterListResponse(APIParameterListResponse template) + { + super(template); + + if (template != null) + { + element = template.getElement(); + } + } + + + /** + * Return the metadata element. + * + * @return result object + */ + public APIParameterListElement getElement() + { + return element; + } + + + /** + * Set up the metadata element to return. + * + * @param element result object + */ + public void setElement(APIParameterListElement element) + { + this.element = element; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "APIParameterListResponse{" + + "element=" + element + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + APIParameterListResponse that = (APIParameterListResponse) objectToCompare; + return Objects.equals(element, that.element); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), element); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/APIParameterListsResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/APIParameterListsResponse.java new file mode 100644 index 00000000000..d19c637617c --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/APIParameterListsResponse.java @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.APIParameterListElement; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * APIParameterListsResponse is a response object for passing back a a list of APIParameterLists + * or an exception if the request failed. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class APIParameterListsResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public APIParameterListsResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public APIParameterListsResponse(APIParameterListsResponse template) + { + super(template); + + if (template != null) + { + elements = template.getElements(); + } + } + + + /** + * Return the list of metadata elements. + * + * @return result object + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the metadata element to return. + * + * @param elements result object + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "APIParameterListsResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + APIParameterListsResponse that = (APIParameterListsResponse) objectToCompare; + return Objects.equals(elements, that.elements); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elements); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/APIParameterResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/APIParameterResponse.java new file mode 100644 index 00000000000..69a18a31aca --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/APIParameterResponse.java @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.APIParameterElement; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * APIParameterResponse is a response object for passing back a single APIParameter + * element or an exception if the request failed. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class APIParameterResponse extends FFDCResponseBase +{ + private APIParameterElement element = null; + + + /** + * Default constructor + */ + public APIParameterResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public APIParameterResponse(APIParameterResponse template) + { + super(template); + + if (template != null) + { + element = template.getElement(); + } + } + + + /** + * Return the metadata element. + * + * @return result object + */ + public APIParameterElement getElement() + { + return element; + } + + + /** + * Set up the metadata element to return. + * + * @param element result object + */ + public void setElement(APIParameterElement element) + { + this.element = element; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "APIParameterResponse{" + + "element=" + element + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + APIParameterResponse that = (APIParameterResponse) objectToCompare; + return Objects.equals(element, that.element); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), element); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/APIParametersResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/APIParametersResponse.java new file mode 100644 index 00000000000..ffb664a4984 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/APIParametersResponse.java @@ -0,0 +1,126 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.APIParameterElement; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * APIParametersResponse is a response object for passing back a a list of APIParameters + * or an exception if the request failed. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class APIParametersResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public APIParametersResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public APIParametersResponse(APIParametersResponse template) + { + super(template); + + if (template != null) + { + elements = template.getElements(); + } + } + + + /** + * Return the list of metadata elements. + * + * @return result object + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the metadata element to return. + * + * @param elements result object + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "APIParametersResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + APIParametersResponse that = (APIParametersResponse) objectToCompare; + return Objects.equals(elements, that.elements); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elements); + } +} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/APIRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/APIRequestBody.java similarity index 83% rename from open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/APIRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/APIRequestBody.java index 32aadcd551d..cb4fa639134 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/APIRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/APIRequestBody.java @@ -1,12 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.properties.APIProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.apis.APIProperties; import java.util.Objects; @@ -117,16 +117,9 @@ public void setExternalSourceName(String externalSourceName) public String toString() { return "APIRequestBody{" + - "externalSourceGUID='" + externalSourceGUID + '\'' + - ", externalSourceName='" + externalSourceName + '\'' + - ", name='" + getName() + '\'' + - ", description='" + getDescription() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; + "externalSourceGUID='" + externalSourceGUID + '\'' + + ", externalSourceName='" + externalSourceName + '\'' + + "} " + super.toString(); } diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/APIResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/APIResponse.java new file mode 100644 index 00000000000..77096f6bad1 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/APIResponse.java @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.APIElement; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * APIResponse is a response object for passing back a single API + * element or an exception if the request failed. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class APIResponse extends FFDCResponseBase +{ + private APIElement element = null; + + + /** + * Default constructor + */ + public APIResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public APIResponse(APIResponse template) + { + super(template); + + if (template != null) + { + element = template.getElement(); + } + } + + + /** + * Return the metadata element. + * + * @return result object + */ + public APIElement getElement() + { + return element; + } + + + /** + * Set up the metadata element to return. + * + * @param element result object + */ + public void setElement(APIElement element) + { + this.element = element; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "APIResponse{" + + "element=" + element + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + APIResponse that = (APIResponse) objectToCompare; + return Objects.equals(element, that.element); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), element); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/APIsResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/APIsResponse.java new file mode 100644 index 00000000000..7ad689a3756 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/APIsResponse.java @@ -0,0 +1,126 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.APIElement; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * APIsResponse is a response object for passing back a a list of APIs + * or an exception if the request failed. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class APIsResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public APIsResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public APIsResponse(APIsResponse template) + { + super(template); + + if (template != null) + { + elements = template.getElements(); + } + } + + + /** + * Return the list of metadata elements. + * + * @return result object + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the metadata element to return. + * + * @param elements result object + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "APIsResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + APIsResponse that = (APIsResponse) objectToCompare; + return Objects.equals(elements, that.elements); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elements); + } +} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/ActorProfileRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ActorProfileRequestBody.java similarity index 93% rename from open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/ActorProfileRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ActorProfileRequestBody.java index 9299fde3af5..57f9875e419 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/ActorProfileRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ActorProfileRequestBody.java @@ -1,12 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ActorProfileProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ContributionRecord; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.ActorProfileProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.ContributionRecord; import java.util.Objects; diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ActorProfileResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ActorProfileResponse.java new file mode 100644 index 00000000000..2254c9a9472 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ActorProfileResponse.java @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ActorProfileElement; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * ActorProfileResponse is the response structure used on the OMAS REST API calls that return a + * ActorProfileElement object as a response. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ActorProfileResponse extends FFDCResponseBase +{ + private ActorProfileElement element = null; + + + /** + * Default constructor + */ + public ActorProfileResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public ActorProfileResponse(ActorProfileResponse template) + { + super(template); + + if (template != null) + { + this.element = template.getElement(); + } + } + + + /** + * Return the element result. + * + * @return details of profile + */ + public ActorProfileElement getElement() + { + return element; + } + + + /** + * Set up the element result. + * + * @param element details of profile + */ + public void setElement(ActorProfileElement element) + { + this.element = element; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "ActorProfileResponse{" + + "element=" + element + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof ActorProfileResponse)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + ActorProfileResponse that = (ActorProfileResponse) objectToCompare; + return Objects.equals(element, that.element); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), element); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ActorProfilesResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ActorProfilesResponse.java new file mode 100644 index 00000000000..bb814d53a6a --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ActorProfilesResponse.java @@ -0,0 +1,126 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ActorProfileElement; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * ActorProfilesResponse is the response structure used on the OMAS REST API calls that return + * a list of profile elements. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ActorProfilesResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public ActorProfilesResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public ActorProfilesResponse(ActorProfilesResponse template) + { + super(template); + + if (template != null) + { + this.elements = template.getElements(); + } + } + + + /** + * Return the profile result. + * + * @return unique identifier + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the profile result. + * + * @param elements - unique identifier + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "ActorProfilesResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof ActorProfilesResponse)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + ActorProfilesResponse that = (ActorProfilesResponse) objectToCompare; + return Objects.equals(getElements(), that.getElements()); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elements); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/AnnotationResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/AnnotationResponse.java new file mode 100644 index 00000000000..740e43f1363 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/AnnotationResponse.java @@ -0,0 +1,131 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.surveyaction.properties.Annotation; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * AnnotationResponse is the response structure used on the OMAS REST API calls that return a + * Annotation object as a response. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class AnnotationResponse extends FFDCResponseBase +{ + private Annotation annotation = null; + + /** + * Default constructor + */ + public AnnotationResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public AnnotationResponse(AnnotationResponse template) + { + super(template); + + if (template != null) + { + this.annotation = template.getAnnotation(); + } + } + + + /** + * Return the Annotation object. + * + * @return annotation + */ + public Annotation getAnnotation() + { + return annotation; + } + + + /** + * Set up the Annotation object. + * + * @param annotation - annotation object + */ + public void setAnnotation(Annotation annotation) + { + this.annotation = annotation; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "AnnotationResponse{" + + "annotation=" + annotation + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof AnnotationResponse that)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + return Objects.equals(getAnnotation(), that.getAnnotation()); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + if (annotation == null) + { + return super.hashCode(); + } + else + { + return annotation.hashCode(); + } + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/AnnotationStatusRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/AnnotationStatusRequestBody.java new file mode 100644 index 00000000000..675742cf4f4 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/AnnotationStatusRequestBody.java @@ -0,0 +1,120 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.surveyaction.properties.AnnotationStatus; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * AnnotationStatusRequestBody provides a structure for passing the annotation status of an Annotation. This value is used to + * restrict the values that are returned. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class AnnotationStatusRequestBody +{ + private AnnotationStatus annotationStatus = null; + + + /** + * Default constructor + */ + public AnnotationStatusRequestBody() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public AnnotationStatusRequestBody(AnnotationStatusRequestBody template) + { + if (template != null) + { + annotationStatus = template.getAnnotationStatus(); + } + } + + + /** + * Set up the fully qualified name. + * + * @param annotationStatus String name + */ + public void setAnnotationStatus(AnnotationStatus annotationStatus) + { + this.annotationStatus = annotationStatus; + } + + + /** + * Returns the stored qualified name property for the metadata entity. + * If no qualified name is available then the empty string is returned. + * + * @return annotationStatus + */ + public AnnotationStatus getAnnotationStatus() + { + return annotationStatus; + } + + + /** + * JSON-style toString. + * + * @return list of properties and their values. + */ + @Override + public String toString() + { + return "AnnotationStatusRequestBody{" + + "qualifiedName='" + annotationStatus + '\'' + + '}'; + } + + + /** + * Equals method that returns true if containing properties are the same. + * + * @param objectToCompare object to compare + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + AnnotationStatusRequestBody that = (AnnotationStatusRequestBody) objectToCompare; + return Objects.equals(getAnnotationStatus(), that.getAnnotationStatus()); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(getAnnotationStatus()); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/AnnotationsResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/AnnotationsResponse.java new file mode 100644 index 00000000000..ddbb541b2e6 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/AnnotationsResponse.java @@ -0,0 +1,126 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.surveyaction.properties.Annotation; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * AnnotationsResponse is the response structure used on OMAS REST API calls that return a + * list of Annotations objects as a response. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class AnnotationsResponse extends FFDCResponseBase +{ + private List elements = null; + + /** + * Default constructor + */ + public AnnotationsResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public AnnotationsResponse(AnnotationsResponse template) + { + super(template); + + if (template != null) + { + this.elements = template.getElements(); + } + } + + + /** + * Return the properties objects. + * + * @return list of properties objects + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the properties objects. + * + * @param elements list of properties objects + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "AnnotationsResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + AnnotationsResponse that = (AnnotationsResponse) objectToCompare; + return Objects.equals(getElements(), that.getElements()); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), getElements()); + } +} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/ApplicationRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ApplicationRequestBody.java similarity index 82% rename from open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/ApplicationRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ApplicationRequestBody.java index 4c976164c1e..6efa1b8baee 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/ApplicationRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ApplicationRequestBody.java @@ -1,12 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.properties.ApplicationProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities.ApplicationProperties; import java.util.Objects; @@ -117,18 +117,7 @@ public String toString() return "ApplicationRequestBody{" + "externalSourceGUID='" + externalSourceGUID + '\'' + ", externalSourceName='" + externalSourceName + '\'' + - ", displayName='" + getDisplayName() + '\'' + - ", description='" + getDescription() + '\'' + - ", typeDescription='" + getDeployedImplementationType() + '\'' + - ", version='" + getVersion() + '\'' + - ", patchLevel='" + getPatchLevel() + '\'' + - ", source='" + getSource() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; + "} " + super.toString(); } diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/AppointeesResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/AppointeesResponse.java new file mode 100644 index 00000000000..5a73fb6a92a --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/AppointeesResponse.java @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.Appointee; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * PersonRolesResponse is the response structure used on the OMAS REST API calls that return a + * a list of person role elements. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class AppointeesResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public AppointeesResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public AppointeesResponse(AppointeesResponse template) + { + super(template); + + if (template != null) + { + this.elements = template.getElements(); + } + } + + + /** + * Return the person role result. + * + * @return unique identifier + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the person role result. + * + * @param elements - unique identifier + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "AppointeesResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof AppointeesResponse that)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + return Objects.equals(getElements(), that.getElements()); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elements); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/AppointmentRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/AppointmentRequestBody.java new file mode 100644 index 00000000000..c3ee3d655a0 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/AppointmentRequestBody.java @@ -0,0 +1,123 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.AppointmentProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * AppointmentRequestBody provides the request body payload for linking roles to people. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class AppointmentRequestBody extends EffectiveTimeQueryRequestBody +{ + private AppointmentProperties properties = null; + + /** + * Default constructor + */ + public AppointmentRequestBody() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public AppointmentRequestBody(AppointmentRequestBody template) + { + super(template); + + if (template != null) + { + this.properties = template.getProperties(); + } + } + + + /** + * Return the properties. + * + * @return properties + */ + public AppointmentProperties getProperties() + { + return properties; + } + + + /** + * Set up the properties. + * + * @param properties properties + */ + public void setProperties(AppointmentProperties properties) + { + this.properties = properties; + } + + + /** + * JSON-style toString. + * + * @return list of properties and their values. + */ + @Override + public String toString() + { + return "AppointmentRequestBody{" + + "properties=" + properties + + ", externalSourceGUID='" + getExternalSourceGUID() + '\'' + + ", externalSourceName='" + getExternalSourceName() + '\'' + + '}'; + } + + + /** + * Equals method that returns true if containing properties are the same. + * + * @param objectToCompare object to compare + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (! super.equals(objectToCompare)) + { + return false; + } + AppointmentRequestBody that = (AppointmentRequestBody) objectToCompare; + return Objects.equals(properties, that.properties); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), properties); + } +} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/ArchiveRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ArchiveRequestBody.java similarity index 88% rename from open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/ArchiveRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ArchiveRequestBody.java index d6daa24f1c1..442c23f181f 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/ArchiveRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ArchiveRequestBody.java @@ -1,11 +1,11 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.properties.ArchiveProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ArchiveProperties; import java.util.Objects; @@ -114,15 +114,13 @@ public void setExternalSourceName(String externalSourceName) public String toString() { return "ArchiveRequestBody{" + - "externalSourceGUID='" + externalSourceGUID + '\'' + - ", externalSourceName='" + externalSourceName + '\'' + - ", archiveDate=" + getArchiveDate() + - ", archiveProcess='" + getArchiveProcess() + '\'' + - ", archiveProperties=" + getArchiveProperties() + - '}'; + "externalSourceGUID='" + externalSourceGUID + '\'' + + ", externalSourceName='" + externalSourceName + '\'' + + "} " + super.toString(); } + /** * Return comparison result based on the content of the properties. * diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/AssetConnectionRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/AssetConnectionRequestBody.java new file mode 100644 index 00000000000..df388f6a2ad --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/AssetConnectionRequestBody.java @@ -0,0 +1,117 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * AssetConnectionRequestBody carries the parameters for creating a new relationship between an asset and a connection. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class AssetConnectionRequestBody extends ExternalSourceRequestBody +{ + private String assetSummary = null; + + + /** + * Default constructor + */ + public AssetConnectionRequestBody() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public AssetConnectionRequestBody(AssetConnectionRequestBody template) + { + super(template); + + if (template != null) + { + assetSummary = template.getAssetSummary(); + } + } + + + /** + * Return the full path of the file - this should be unique. + * + * @return string name + */ + public String getAssetSummary() + { + return assetSummary; + } + + + /** + * Set up the full path of the file - this should be unique. + * + * @param assetSummary string name + */ + public void setAssetSummary(String assetSummary) + { + this.assetSummary = assetSummary; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "PathNameRequestBody{" + + ", assetSummary='" + assetSummary + + '}'; + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + AssetConnectionRequestBody that = (AssetConnectionRequestBody) objectToCompare; + return Objects.equals(getAssetSummary(), that.getAssetSummary()); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(getAssetSummary()); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/AssetElementResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/AssetElementResponse.java new file mode 100644 index 00000000000..7721c0fcde9 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/AssetElementResponse.java @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.AssetElement; + + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * AssetElementResponse is the response structure used on the OMAS REST API calls that return a + * AssetElement bean object as a response. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class AssetElementResponse extends FFDCResponseBase +{ + private AssetElement element = null; + + + /** + * Default constructor + */ + public AssetElementResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public AssetElementResponse(AssetElementResponse template) + { + super(template); + + if (template != null) + { + this.element = template.getElement(); + } + } + + + /** + * Return the asset result. + * + * @return unique identifier + */ + public AssetElement getElement() + { + return element; + } + + + /** + * Set up the asset result. + * + * @param element unique identifier + */ + public void setElement(AssetElement element) + { + this.element = element; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "AssetElementResponse{" + + "element=" + element + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + AssetElementResponse that = (AssetElementResponse) objectToCompare; + return Objects.equals(element, that.element); + } + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), getElement()); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/AssetElementsResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/AssetElementsResponse.java new file mode 100644 index 00000000000..dfa87158686 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/AssetElementsResponse.java @@ -0,0 +1,127 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.AssetElement; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * AssetElementsResponse returns a list of assets from the server. The list may be too long to + * retrieve in a single call so there is support for paging of replies. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class AssetElementsResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public AssetElementsResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public AssetElementsResponse(AssetElementsResponse template) + { + super(template); + + if (template != null) + { + this.elements = template.getElements(); + } + } + + + /** + * Return the list of assets in the response. + * + * @return list of assets + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the list of assets for the response. + * + * @param elements list + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "AssetElementsResponse{" + + "assets=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + AssetElementsResponse that = (AssetElementsResponse) objectToCompare; + return Objects.equals(getElements(), that.getElements()); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), getElements()); + } +} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/AssetExtensionsRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/AssetExtensionsRequestBody.java similarity index 98% rename from open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/AssetExtensionsRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/AssetExtensionsRequestBody.java index a2cbeb6c4c1..2477714fea8 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/AssetExtensionsRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/AssetExtensionsRequestBody.java @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/AssetGraphResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/AssetGraphResponse.java new file mode 100644 index 00000000000..d1a2272a187 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/AssetGraphResponse.java @@ -0,0 +1,131 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.AssetGraph; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * AssetGraphResponse is the response structure used on the Asset Consumer OMAS REST API calls that returns an + * AssetGraph object as a response. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class AssetGraphResponse extends FFDCResponseBase +{ + private AssetGraph assetGraph = null; + + /** + * Default constructor + */ + public AssetGraphResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public AssetGraphResponse(AssetGraphResponse template) + { + super(template); + + if (template != null) + { + this.assetGraph = template.getAssetGraph(); + } + } + + + /** + * Return the graph object. + * + * @return graph object + */ + public AssetGraph getAssetGraph() + { + return assetGraph; + } + + + /** + * Set up the graph object. + * + * @param assetGraph - graph object + */ + public void setAssetGraph(AssetGraph assetGraph) + { + this.assetGraph = assetGraph; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "AssetGraphResponse{" + + "assetGraph=" + assetGraph + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof AssetGraphResponse that)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + return Objects.equals(getAssetGraph(), that.getAssetGraph()); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + if (assetGraph == null) + { + return super.hashCode(); + } + else + { + return assetGraph.hashCode(); + } + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/AssetRelationshipsResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/AssetRelationshipsResponse.java new file mode 100644 index 00000000000..79a7f307dcf --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/AssetRelationshipsResponse.java @@ -0,0 +1,126 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.AssetRelationshipElement; + + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * AssetRelationshipsResponse is a response object for passing back a list of relationships between assets + * or an exception if the request failed. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class AssetRelationshipsResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public AssetRelationshipsResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public AssetRelationshipsResponse(AssetRelationshipsResponse template) + { + super(template); + + if (template != null) + { + elements = template.getElements(); + } + } + + + /** + * Return the list of metadata elements. + * + * @return result object + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the metadata element to return. + * + * @param elements result object + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "AssetRelationshipsResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + AssetRelationshipsResponse that = (AssetRelationshipsResponse) objectToCompare; + return Objects.equals(elements, that.elements); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elements); + } +} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/AssetRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/AssetRequestBody.java similarity index 95% rename from open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/AssetRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/AssetRequestBody.java index 0f72622e9b4..955314eca9d 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/AssetRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/AssetRequestBody.java @@ -1,13 +1,13 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.AssetProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStatus; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.AssetProperties; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ElementStatus; import java.util.Objects; diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/AssetSearchMatchesListResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/AssetSearchMatchesListResponse.java new file mode 100644 index 00000000000..4a9ace3b808 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/AssetSearchMatchesListResponse.java @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.AssetSearchMatches; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * AssetSearchMatchesListResponse returns the list of results from an asset domain search. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class AssetSearchMatchesListResponse extends FFDCResponseBase +{ + private List searchMatches = null; + + + /** + * Default constructor + */ + public AssetSearchMatchesListResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public AssetSearchMatchesListResponse(AssetSearchMatchesListResponse template) + { + super(template); + + if (template != null) + { + this.searchMatches = template.getSearchMatches(); + } + } + + + /** + * Return the list of matches in the response. + * + * @return list of glossary terms + */ + public List getSearchMatches() + { + return searchMatches; + } + + + /** + * Set up the list of matches for the response. + * + * @param searchMatches list + */ + public void setSearchMatches(List searchMatches) + { + this.searchMatches = searchMatches; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "AssetSearchMatchesListResponse{" + + "searchMatches=" + searchMatches + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + AssetSearchMatchesListResponse that = (AssetSearchMatchesListResponse) objectToCompare; + return Objects.equals(getSearchMatches(), that.getSearchMatches()); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), getSearchMatches()); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/BooleanResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/BooleanResponse.java index 3ce5469706b..b5d5a14fbb2 100644 --- a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/BooleanResponse.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/BooleanResponse.java @@ -6,7 +6,6 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import java.util.Arrays; import java.util.Objects; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; @@ -81,17 +80,7 @@ public String toString() { return "BooleanResponse{" + "flag=" + flag + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; + "} " + super.toString(); } @@ -108,7 +97,7 @@ public boolean equals(Object objectToCompare) { return true; } - if (!(objectToCompare instanceof BooleanResponse)) + if (!(objectToCompare instanceof BooleanResponse that)) { return false; } @@ -116,8 +105,6 @@ public boolean equals(Object objectToCompare) { return false; } - BooleanResponse - that = (BooleanResponse) objectToCompare; return getFlag() == that.getFlag(); } diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/CalculatedValueClassificationRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/CalculatedValueClassificationRequestBody.java similarity index 96% rename from open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/CalculatedValueClassificationRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/CalculatedValueClassificationRequestBody.java index 16e8b64ddd6..3cc291b0cb4 100644 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/CalculatedValueClassificationRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/CalculatedValueClassificationRequestBody.java @@ -1,11 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.commonservices.ffdc.rest.UpdateRequestBody; import java.util.Objects; diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/CertificateIdRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/CertificateIdRequestBody.java new file mode 100644 index 00000000000..23d30bb1269 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/CertificateIdRequestBody.java @@ -0,0 +1,116 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * CertificateIdRequestBody provides a structure for the unique certificate identifier. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class CertificateIdRequestBody +{ + private String certificateId = null; + + + /** + * Default constructor + */ + public CertificateIdRequestBody() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public CertificateIdRequestBody(CertificateIdRequestBody template) + { + if (template != null) + { + this.certificateId = template.getCertificateId(); + } + } + + + /** + * Return the unique identifier for the certificate from the certificate authority. + * + * @return String identifier + */ + public String getCertificateId() + { + return certificateId; + } + + + /** + * Set up the unique identifier for the certificate from the certificate authority. + * + * @param certificateId String identifier + */ + public void setCertificateId(String certificateId) + { + this.certificateId = certificateId; + } + + + + /** + * JSON-style toString. + * + * @return list of properties and their values. + */ + @Override + public String toString() + { + return "CertificateIdRequestBody{" + + "certificateId='" + certificateId + '\'' + + '}'; + } + + + /** + * Equals method that returns true if containing properties are the same. + * + * @param objectToCompare object to compare + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + CertificateIdRequestBody that = (CertificateIdRequestBody) objectToCompare; + return Objects.equals(certificateId, that.certificateId); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(certificateId); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/CertificationTypeRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/CertificationTypeRequestBody.java new file mode 100644 index 00000000000..b8bdce69104 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/CertificationTypeRequestBody.java @@ -0,0 +1,143 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.enums.GovernanceDefinitionStatus; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.CertificationTypeProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * CertificationTypeRequestBody provides a structure used when creating certification types. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class CertificationTypeRequestBody +{ + private CertificationTypeProperties properties = null; + private GovernanceDefinitionStatus initialStatus = null; + + + /** + * Default constructor + */ + public CertificationTypeRequestBody() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public CertificationTypeRequestBody(CertificationTypeRequestBody template) + { + if (template != null) + { + this.properties = template.getProperties(); + this.initialStatus = template.getInitialStatus(); + } + } + + + /** + * Return the properties of the certification type. + * + * @return properties + */ + public CertificationTypeProperties getProperties() + { + return properties; + } + + + /** + * Set up the properties of the certification type. + * + * @param properties properties + */ + public void setProperties(CertificationTypeProperties properties) + { + this.properties = properties; + } + + + /** + * Return the initial status of the certification type. + * + * @return instance status + */ + public GovernanceDefinitionStatus getInitialStatus() + { + return initialStatus; + } + + + /** + * Set up the initial status of the certification type. + * + * @param initialStatus instance status + */ + public void setInitialStatus(GovernanceDefinitionStatus initialStatus) + { + this.initialStatus = initialStatus; + } + + + /** + * JSON-style toString. + * + * @return list of properties and their values. + */ + @Override + public String toString() + { + return "CertificationTypeRequestBody{" + + "properties=" + properties + + ", initialStatus=" + initialStatus + + '}'; + } + + + /** + * Equals method that returns true if containing properties are the same. + * + * @param objectToCompare object to compare + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + CertificationTypeRequestBody that = (CertificationTypeRequestBody) objectToCompare; + return Objects.equals(properties, that.properties) && + initialStatus == that.initialStatus; + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(properties, initialStatus); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/CertificationTypeResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/CertificationTypeResponse.java new file mode 100644 index 00000000000..7b2413beb21 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/CertificationTypeResponse.java @@ -0,0 +1,123 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.CertificationTypeElement; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * CertificationTypeResponse is the response structure used on the OMAS REST API calls that returns a + * certification type object as a response. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class CertificationTypeResponse extends FFDCResponseBase +{ + private CertificationTypeElement element = null; + + + /** + * Default constructor + */ + public CertificationTypeResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public CertificationTypeResponse(CertificationTypeResponse template) + { + super(template); + + if (template != null) + { + this.element = template.getElement(); + } + } + + + /** + * Return the element result. + * + * @return CertificationTypeProperties object + */ + public CertificationTypeElement getElement() + { + return element; + } + + + /** + * Set up the element result. + * + * @param element CertificationTypeProperties object + */ + public void setElement(CertificationTypeElement element) + { + this.element = element; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "CertificationTypeResponse{" + + "element=" + element + + "} " + super.toString(); + } + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof CertificationTypeResponse that)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + return Objects.equals(element, that.element); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), element); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/CertificationTypesResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/CertificationTypesResponse.java new file mode 100644 index 00000000000..21aecfbeea5 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/CertificationTypesResponse.java @@ -0,0 +1,126 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.CertificationTypeElement; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * CertificationTypesResponse is the response structure used on the OMAS REST API calls that return a + * list of certification types as a response. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class CertificationTypesResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public CertificationTypesResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public CertificationTypesResponse(CertificationTypesResponse template) + { + super(template); + + if (template != null) + { + this.elements = template.getElements(); + } + } + + + /** + * Return the list of certification types. + * + * @return list of objects or null + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the list of certification types. + * + * @param elements - list of objects or null + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "CertificationTypesResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof CertificationTypesResponse)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + CertificationTypesResponse that = (CertificationTypesResponse) objectToCompare; + return Objects.equals(this.getElements(), that.getElements()); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(elements, super.hashCode()); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/CertificationsResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/CertificationsResponse.java new file mode 100644 index 00000000000..5b2c3de281e --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/CertificationsResponse.java @@ -0,0 +1,126 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.CertificationElement; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * CertificationTypesResponse is the response structure used on the OMAS REST API calls that return a + * list of certifications as a response. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class CertificationsResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public CertificationsResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public CertificationsResponse(CertificationsResponse template) + { + super(template); + + if (template != null) + { + this.elements = template.getElements(); + } + } + + + /** + * Return the list of certification types. + * + * @return list of objects or null + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the list of certification types. + * + * @param elements - list of objects or null + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "CertificationsResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof CertificationsResponse)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + CertificationsResponse that = (CertificationsResponse) objectToCompare; + return Objects.equals(this.getElements(), that.getElements()); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(elements, super.hashCode()); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ClassificationRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ClassificationRequestBody.java new file mode 100644 index 00000000000..878cbb44d43 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ClassificationRequestBody.java @@ -0,0 +1,127 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ClassificationProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * ClassificationRequestBody describes the request body used when attaching classification to elements. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ClassificationRequestBody extends ExternalSourceRequestBody +{ + private ClassificationProperties properties = null; + + + /** + * Default constructor + */ + public ClassificationRequestBody() + { + super(); + } + + + /** + * Copy/clone constructor. + * + * @param template object to copy + */ + public ClassificationRequestBody(ClassificationRequestBody template) + { + super(template); + + if (template != null) + { + properties = template.getProperties(); + } + } + + + /** + * Return the properties for the classification. + * + * @return properties object + */ + public ClassificationProperties getProperties() + { + return properties; + } + + + /** + * Set up the properties for the classification. + * + * @param properties properties object + */ + public void setProperties(ClassificationProperties properties) + { + this.properties = properties; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "ClassificationRequestBody{" + + "externalSourceGUID='" + getExternalSourceGUID() + '\'' + + ", externalSourceName='" + getExternalSourceName() + '\'' + + ", properties=" + properties + + '}'; + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + ClassificationRequestBody that = (ClassificationRequestBody) objectToCompare; + return Objects.equals(getProperties(), that.getProperties()); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), properties); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/CollectionMemberResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/CollectionMemberResponse.java new file mode 100644 index 00000000000..49ea7ed4f0a --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/CollectionMemberResponse.java @@ -0,0 +1,124 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.CollectionMember; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * CollectionMemberResponse is the response structure used on the OMAS REST API calls that return a + * CollectionMember object as a response. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class CollectionMemberResponse extends FFDCResponseBase +{ + private CollectionMember element = null; + + + /** + * Default constructor + */ + public CollectionMemberResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public CollectionMemberResponse(CollectionMemberResponse template) + { + super(template); + + if (template != null) + { + this.element = template.getElement(); + } + } + + + /** + * Return the element result. + * + * @return details of person role + */ + public CollectionMember getElement() + { + return element; + } + + + /** + * Set up the element result. + * + * @param element details of person role + */ + public void setElement(CollectionMember element) + { + this.element = element; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "CollectionMemberResponse{" + + "element=" + element + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof CollectionMemberResponse that)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + return Objects.equals(element, that.element); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), element); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/CollectionMembersResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/CollectionMembersResponse.java new file mode 100644 index 00000000000..c2ac0f64ee5 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/CollectionMembersResponse.java @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.CollectionMember; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * CollectionMembersResponse is the response structure used on the OMAS REST API calls that return + * a list of collection membership elements. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class CollectionMembersResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public CollectionMembersResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public CollectionMembersResponse(CollectionMembersResponse template) + { + super(template); + + if (template != null) + { + this.elements = template.getElements(); + } + } + + + /** + * Return the collection membership result. + * + * @return unique identifier + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the collection membership result. + * + * @param elements - unique identifier + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "CollectionMembersResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof CollectionMembersResponse that)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + return Objects.equals(getElements(), that.getElements()); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elements); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/CollectionResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/CollectionResponse.java new file mode 100644 index 00000000000..788ea5c1d71 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/CollectionResponse.java @@ -0,0 +1,124 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.CollectionElement; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * CollectionResponse is the response structure used on the OMAS REST API calls that return a + * CollectionElement object as a response. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class CollectionResponse extends FFDCResponseBase +{ + private CollectionElement element = null; + + + /** + * Default constructor + */ + public CollectionResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public CollectionResponse(CollectionResponse template) + { + super(template); + + if (template != null) + { + this.element = template.getElement(); + } + } + + + /** + * Return the element result. + * + * @return details of person role + */ + public CollectionElement getElement() + { + return element; + } + + + /** + * Set up the element result. + * + * @param element details of person role + */ + public void setElement(CollectionElement element) + { + this.element = element; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "CollectionResponse{" + + "element=" + element + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof CollectionResponse that)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + return Objects.equals(element, that.element); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), element); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/CollectionsResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/CollectionsResponse.java new file mode 100644 index 00000000000..cb7778399c1 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/CollectionsResponse.java @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.CollectionElement; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * CollectionsResponse is the response structure used on the OMAS REST API calls that return + * a list of collection elements. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class CollectionsResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public CollectionsResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public CollectionsResponse(CollectionsResponse template) + { + super(template); + + if (template != null) + { + this.elements = template.getElements(); + } + } + + + /** + * Return the collection result. + * + * @return unique identifier + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the collection result. + * + * @param elements - unique identifier + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "CollectionsResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof CollectionsResponse that)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + return Objects.equals(getElements(), that.getElements()); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elements); + } +} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/CombinedSchemaRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/CombinedSchemaRequestBody.java similarity index 85% rename from open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/CombinedSchemaRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/CombinedSchemaRequestBody.java index 97bbc5aa2af..5e939ef839a 100644 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/CombinedSchemaRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/CombinedSchemaRequestBody.java @@ -1,14 +1,13 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetowner.properties.SchemaAttributeProperties; -import org.odpi.openmetadata.accessservices.assetowner.properties.SchemaTypeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.SchemaAttributeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.SchemaTypeProperties; -import java.util.ArrayList; import java.util.List; import java.util.Objects; @@ -23,7 +22,7 @@ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) -public class CombinedSchemaRequestBody extends AssetOwnerOMASAPIRequestBody +public class CombinedSchemaRequestBody { protected SchemaTypeProperties schemaType = null; protected List schemaAttributes = null; @@ -44,8 +43,6 @@ public CombinedSchemaRequestBody() */ public CombinedSchemaRequestBody(CombinedSchemaRequestBody template) { - super(template); - if (template != null) { schemaType = template.getSchemaType(); @@ -83,18 +80,7 @@ public void setSchemaType(SchemaTypeProperties schemaType) */ public List getSchemaAttributes() { - if (schemaAttributes == null) - { - return null; - } - else if (schemaAttributes.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(schemaAttributes); - } + return schemaAttributes; } diff --git a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/rest/CommentRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/CommentRequestBody.java similarity index 98% rename from open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/rest/CommentRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/CommentRequestBody.java index ed049c556d1..159600a03db 100644 --- a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/rest/CommentRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/CommentRequestBody.java @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetconsumer.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -15,9 +15,7 @@ /** * The CommentRequestBody bean stores information about a comment connected to an asset. Comments provide informal feedback to assets * and can be added at any time. - * * Comments have the userId of the person who added the feedback, along with their comment text. - * * The content of the comment is a personal statement (which is why the user's id is in the comment) * and there is no formal review of the content. */ diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/CommentTypesResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/CommentTypesResponse.java new file mode 100644 index 00000000000..95407a3722d --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/CommentTypesResponse.java @@ -0,0 +1,147 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.enums.CommentType; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * CommentTypesResponse is a response object for passing back a list of enum values or an exception if the request failed. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class CommentTypesResponse extends FFDCResponseBase +{ + private List commentTypes = null; + + + /** + * Default constructor + */ + public CommentTypesResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public CommentTypesResponse(CommentTypesResponse template) + { + super(template); + + if (template != null) + { + commentTypes = template.getCommentTypes(); + } + } + + + /** + * Return the list of metadata elements. + * + * @return result object + */ + public List getCommentTypes() + { + if (commentTypes == null) + { + return null; + } + else if (commentTypes.isEmpty()) + { + return null; + } + else + { + return new ArrayList<>(commentTypes); + } + } + + + /** + * Set up the metadata element to return. + * + * @param commentTypes result object + */ + public void setCommentTypes(List commentTypes) + { + this.commentTypes = commentTypes; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "CommentTypesResponse{" + + "statuses=" + commentTypes + + ", exceptionClassName='" + getExceptionClassName() + '\'' + + ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + + ", actionDescription='" + getActionDescription() + '\'' + + ", relatedHTTPCode=" + getRelatedHTTPCode() + + ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + + ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + + ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + + ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + + ", exceptionUserAction='" + getExceptionUserAction() + '\'' + + ", exceptionProperties=" + getExceptionProperties() + + '}'; + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + CommentTypesResponse that = (CommentTypesResponse) objectToCompare; + return Objects.equals(commentTypes, that.commentTypes); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), commentTypes); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/CommunitiesResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/CommunitiesResponse.java new file mode 100644 index 00000000000..9a324d9443e --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/CommunitiesResponse.java @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.CommunityElement; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * CommunitiesResponse is the response structure used on the OMAS REST API calls that return + * a list of community elements. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class CommunitiesResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public CommunitiesResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public CommunitiesResponse(CommunitiesResponse template) + { + super(template); + + if (template != null) + { + this.elements = template.getElements(); + } + } + + + /** + * Return the community result. + * + * @return unique identifier + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the community result. + * + * @param elements - unique identifier + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "CommunitiesResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof CommunitiesResponse that)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + return Objects.equals(getElements(), that.getElements()); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elements); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/CommunityResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/CommunityResponse.java new file mode 100644 index 00000000000..eb7af3769ee --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/CommunityResponse.java @@ -0,0 +1,124 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.CommunityElement; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * CommunityResponse is the response structure used on the OMAS REST API calls that return a + * CommunityElement object as a response. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class CommunityResponse extends FFDCResponseBase +{ + private CommunityElement element = null; + + + /** + * Default constructor + */ + public CommunityResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public CommunityResponse(CommunityResponse template) + { + super(template); + + if (template != null) + { + this.element = template.getElement(); + } + } + + + /** + * Return the element result. + * + * @return details of person role + */ + public CommunityElement getElement() + { + return element; + } + + + /** + * Set up the element result. + * + * @param element details of person role + */ + public void setElement(CommunityElement element) + { + this.element = element; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "CommunityResponse{" + + "element=" + element + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof CommunityResponse that)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + return Objects.equals(element, that.element); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), element); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ConnectionRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ConnectionRequestBody.java new file mode 100644 index 00000000000..c4b832233ce --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ConnectionRequestBody.java @@ -0,0 +1,172 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.ConnectionProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * ConnectionRequestBody carries the parameters for describing a connection. + * The external source identifiers are used if the connection was created using the external source identifiers. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ConnectionRequestBody extends ConnectionProperties +{ + private String externalSourceGUID = null; + private String externalSourceName = null; + + + /** + * Default constructor + */ + public ConnectionRequestBody() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public ConnectionRequestBody(ConnectionRequestBody template) + { + super(template); + + if (template != null) + { + externalSourceGUID = template.getExternalSourceGUID(); + externalSourceName = template.getExternalSourceName(); + } + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public ConnectionRequestBody(ConnectionProperties template) + { + super(template); + } + + + /** + * Return the unique identifier of the software server capability entity that represented the external source - null for local. + * + * @return string guid + */ + public String getExternalSourceGUID() + { + return externalSourceGUID; + } + + + /** + * Set up the unique identifier of the software server capability entity that represented the external source - null for local. + * + * @param externalSourceGUID string guid + */ + public void setExternalSourceGUID(String externalSourceGUID) + { + this.externalSourceGUID = externalSourceGUID; + } + + + /** + * Return the unique name of the software server capability entity that represented the external source. + * + * @return string name + */ + public String getExternalSourceName() + { + return externalSourceName; + } + + + /** + * Set up the unique name of the software server capability entity that represented the external source. + * + * @param externalSourceName string name + */ + public void setExternalSourceName(String externalSourceName) + { + this.externalSourceName = externalSourceName; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "OCFConnectionRequestBody{" + + "externalSourceGUID='" + externalSourceGUID + '\'' + + ", externalSourceName='" + externalSourceName + '\'' + + ", displayName='" + getDisplayName() + '\'' + + ", description='" + getDescription() + '\'' + + ", userId='" + getUserId() + '\'' + + ", encryptedPassword='" + getEncryptedPassword() + '\'' + + ", clearPassword='" + getClearPassword() + '\'' + + ", configurationProperties=" + getConfigurationProperties() + + ", securedProperties=" + getSecuredProperties() + + ", qualifiedName='" + getQualifiedName() + '\'' + + ", additionalProperties=" + getAdditionalProperties() + + ", vendorProperties=" + getVendorProperties() + + ", typeName='" + getTypeName() + '\'' + + ", extendedProperties=" + getExtendedProperties() + + '}'; + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + ConnectionRequestBody that = (ConnectionRequestBody) objectToCompare; + return Objects.equals(externalSourceGUID, that.externalSourceGUID) && + Objects.equals(externalSourceName, that.externalSourceName); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), externalSourceGUID, externalSourceName); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ConnectionResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ConnectionResponse.java index f9b949f3341..f762c1c88d2 100644 --- a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ConnectionResponse.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ConnectionResponse.java @@ -6,32 +6,29 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ConnectionElement; -import java.util.Arrays; import java.util.Objects; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - /** - * ConnectionResponse is the response structure used on REST API calls that return a - * Connection object as a response. + * OCFConnectionResponse is a response object for passing back a single connection object. */ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) public class ConnectionResponse extends FFDCResponseBase { - private Connection connection = null; + private ConnectionElement element = null; + /** * Default constructor */ public ConnectionResponse() { - super(); } @@ -40,36 +37,36 @@ public ConnectionResponse() * * @param template object to copy */ - public ConnectionResponse(ConnectionResponse template) + public ConnectionResponse(ConnectionResponse template) { super(template); if (template != null) { - this.connection = template.getConnection(); + element = template.getElement(); } } /** - * Return the Connection object. + * Return the metadata element. * - * @return connection + * @return result object */ - public Connection getConnection() + public ConnectionElement getElement() { - return connection; + return element; } /** - * Set up the Connection object. + * Set up the metadata element to return. * - * @param connection - connection object + * @param element result object */ - public void setConnection(Connection connection) + public void setElement(ConnectionElement element) { - this.connection = connection; + this.element = element; } @@ -82,18 +79,8 @@ public void setConnection(Connection connection) public String toString() { return "ConnectionResponse{" + - "connection=" + connection + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; + "element=" + element + + "} " + super.toString(); } @@ -110,7 +97,7 @@ public boolean equals(Object objectToCompare) { return true; } - if (!(objectToCompare instanceof ConnectionResponse)) + if (objectToCompare == null || getClass() != objectToCompare.getClass()) { return false; } @@ -119,7 +106,7 @@ public boolean equals(Object objectToCompare) return false; } ConnectionResponse that = (ConnectionResponse) objectToCompare; - return Objects.equals(getConnection(), that.getConnection()); + return Objects.equals(element, that.element); } @@ -131,13 +118,6 @@ public boolean equals(Object objectToCompare) @Override public int hashCode() { - if (connection == null) - { - return super.hashCode(); - } - else - { - return connection.hashCode(); - } + return Objects.hash(super.hashCode(), element); } } diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ConnectionsResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ConnectionsResponse.java new file mode 100644 index 00000000000..9ade8043536 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ConnectionsResponse.java @@ -0,0 +1,124 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ConnectionElement; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * ConnectionsResponse is a response object for passing back a list of connection objects. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ConnectionsResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public ConnectionsResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public ConnectionsResponse(ConnectionsResponse template) + { + super(template); + + if (template != null) + { + elements = template.getElements(); + } + } + + + /** + * Return the list of metadata elements. + * + * @return result object + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the list of metadata elements to return. + * + * @param elements result object + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "ConnectionsResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + ConnectionsResponse that = (ConnectionsResponse) objectToCompare; + return Objects.equals(elements, that.elements); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elements); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ConnectorReportResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ConnectorReportResponse.java index 72040489711..8e6841eb0ba 100644 --- a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ConnectorReportResponse.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ConnectorReportResponse.java @@ -8,7 +8,6 @@ import com.fasterxml.jackson.annotation.JsonInclude; import org.odpi.openmetadata.commonservices.ffdc.properties.ConnectorReport; -import java.util.Arrays; import java.util.Objects; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; @@ -83,18 +82,8 @@ public void setConnectorReport(ConnectorReport connectorReport) public String toString() { return "ConnectorReportResponse{" + - "connectorReport=" + connectorReport + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; + "connectorReport=" + connectorReport + + "} " + super.toString(); } diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ConnectorTypeListResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ConnectorTypeListResponse.java deleted file mode 100644 index 839f0a968a6..00000000000 --- a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ConnectorTypeListResponse.java +++ /dev/null @@ -1,149 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.commonservices.ffdc.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ConnectorType; - -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * ConnectorTypeListResponse is the response structure used on the OMAS REST API calls that return a - * list of connector types as a response. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ConnectorTypeListResponse extends FFDCResponseBase -{ - private List connectorTypes = null; - - - /** - * Default constructor - */ - public ConnectorTypeListResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ConnectorTypeListResponse(ConnectorTypeListResponse template) - { - super(template); - - if (template != null) - { - this.connectorTypes = template.getConnectorTypes(); - } - } - - - /** - * Return the list result. - * - * @return list of connector types - */ - public List getConnectorTypes() - { - if (connectorTypes == null) - { - return null; - } - else if (connectorTypes.isEmpty()) - { - return null; - } - else - { - return connectorTypes; - } - } - - - /** - * Set up the list result. - * - * @param connectorTypes list of connector types - */ - public void setConnectorTypes(List connectorTypes) - { - this.connectorTypes = connectorTypes; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ConnectorTypeListResponse{" + - "connectorTypes=" + connectorTypes + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof ConnectorTypeListResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ConnectorTypeListResponse that = (ConnectorTypeListResponse) objectToCompare; - return Objects.equals(connectorTypes, that.connectorTypes); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(connectorTypes); - } -} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ConnectorTypeRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ConnectorTypeRequestBody.java new file mode 100644 index 00000000000..e44c031feac --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ConnectorTypeRequestBody.java @@ -0,0 +1,171 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.ConnectorTypeProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * ConnectorTypeRequestBody carries the parameters for describing a connector type. + * The external source identifiers are used if the connector type was created using the external source identifiers. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ConnectorTypeRequestBody extends ConnectorTypeProperties +{ + private String externalSourceGUID = null; + private String externalSourceName = null; + + + /** + * Default constructor + */ + public ConnectorTypeRequestBody() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public ConnectorTypeRequestBody(ConnectorTypeRequestBody template) + { + super(template); + + if (template != null) + { + externalSourceGUID = template.getExternalSourceGUID(); + externalSourceName = template.getExternalSourceName(); + } + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public ConnectorTypeRequestBody(ConnectorTypeProperties template) + { + super(template); + } + + + /** + * Return the unique identifier of the software server capability entity that represented the external source - null for local. + * + * @return string guid + */ + public String getExternalSourceGUID() + { + return externalSourceGUID; + } + + + /** + * Set up the unique identifier of the software server capability entity that represented the external source - null for local. + * + * @param externalSourceGUID string guid + */ + public void setExternalSourceGUID(String externalSourceGUID) + { + this.externalSourceGUID = externalSourceGUID; + } + + + /** + * Return the unique name of the software server capability entity that represented the external source. + * + * @return string name + */ + public String getExternalSourceName() + { + return externalSourceName; + } + + + /** + * Set up the unique name of the software server capability entity that represented the external source. + * + * @param externalSourceName string name + */ + public void setExternalSourceName(String externalSourceName) + { + this.externalSourceName = externalSourceName; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "ConnectorTypeRequestBody{" + + "externalSourceGUID='" + externalSourceGUID + '\'' + + ", externalSourceName='" + externalSourceName + '\'' + + ", displayName='" + getDisplayName() + '\'' + + ", description='" + getDescription() + '\'' + + ", connectorProviderClassName='" + getConnectorProviderClassName() + '\'' + + ", recognizedAdditionalProperties=" + getRecognizedAdditionalProperties() + + ", recognizedConfigurationProperties=" + getRecognizedConfigurationProperties() + + ", recognizedSecuredProperties=" + getRecognizedSecuredProperties() + + ", qualifiedName='" + getQualifiedName() + '\'' + + ", additionalProperties=" + getAdditionalProperties() + + ", vendorProperties=" + getVendorProperties() + + ", typeName='" + getTypeName() + '\'' + + ", extendedProperties=" + getExtendedProperties() + + '}'; + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + ConnectorTypeRequestBody that = (ConnectorTypeRequestBody) objectToCompare; + return Objects.equals(externalSourceGUID, that.externalSourceGUID) && + Objects.equals(externalSourceName, that.externalSourceName); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), externalSourceGUID, externalSourceName); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ConnectorTypeResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ConnectorTypeResponse.java index cc7fb6a1a40..123bca6fab9 100644 --- a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ConnectorTypeResponse.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ConnectorTypeResponse.java @@ -6,34 +6,29 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ConnectorType; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ConnectorTypeElement; -import java.util.Arrays; import java.util.Objects; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - /** - * ConnectorTypeResponse is the response structure used on REST API calls that return a - * ConnectorType object as a response. + * ConnectorReportResponse is a response object for passing back a single connector type object. */ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) public class ConnectorTypeResponse extends FFDCResponseBase { - private ConnectorType connectorType = null; + private ConnectorTypeElement element = null; + /** * Default constructor */ public ConnectorTypeResponse() { - super(); } @@ -48,45 +43,30 @@ public ConnectorTypeResponse(ConnectorTypeResponse template) if (template != null) { - this.connectorType = template.getConnectorType(); + element = template.getElement(); } } /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ConnectorTypeResponse(ConnectorType template) - { - super(null); - - if (template != null) - { - this.connectorType = template; - } - } - - /** - * Return the ConnectorType object. + * Return the metadata element. * - * @return connectorType + * @return result object */ - public ConnectorType getConnectorType() + public ConnectorTypeElement getElement() { - return connectorType; + return element; } /** - * Set up the ConnectorType object. + * Set up the metadata element to return. * - * @param connectorType - connectorType object + * @param element result object */ - public void setConnectorType(ConnectorType connectorType) + public void setElement(ConnectorTypeElement element) { - this.connectorType = connectorType; + this.element = element; } @@ -99,18 +79,8 @@ public void setConnectorType(ConnectorType connectorType) public String toString() { return "ConnectorTypeResponse{" + - "connectorType=" + connectorType + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; + "element=" + element + + "} " + super.toString(); } @@ -127,18 +97,16 @@ public boolean equals(Object objectToCompare) { return true; } - if (! (objectToCompare instanceof ConnectorTypeResponse)) + if (objectToCompare == null || getClass() != objectToCompare.getClass()) { return false; } - if (! super.equals(objectToCompare)) + if (!super.equals(objectToCompare)) { return false; } - - ConnectorTypeResponse response = (ConnectorTypeResponse) objectToCompare; - - return connectorType != null ? connectorType.equals(response.connectorType) : response.connectorType == null; + ConnectorTypeResponse that = (ConnectorTypeResponse) objectToCompare; + return Objects.equals(element, that.element); } @@ -150,6 +118,6 @@ public boolean equals(Object objectToCompare) @Override public int hashCode() { - return Objects.hash(super.hashCode(), connectorType); + return Objects.hash(super.hashCode(), element); } } diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ConnectorTypesResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ConnectorTypesResponse.java new file mode 100644 index 00000000000..d6c2f39833e --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ConnectorTypesResponse.java @@ -0,0 +1,124 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ConnectorTypeElement; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * ConnectorTypesResponse is a response object for passing back a list of connector type objects. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ConnectorTypesResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public ConnectorTypesResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public ConnectorTypesResponse(ConnectorTypesResponse template) + { + super(template); + + if (template != null) + { + elements = template.getElements(); + } + } + + + /** + * Return the list of metadata elements. + * + * @return result object + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the list of metadata elements to return. + * + * @param elements result object + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "ConnectorTypesResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + ConnectorTypesResponse that = (ConnectorTypesResponse) objectToCompare; + return Objects.equals(elements, that.elements); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elements); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ContactMethodRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ContactMethodRequestBody.java new file mode 100644 index 00000000000..a60097d4a2c --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ContactMethodRequestBody.java @@ -0,0 +1,121 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.ContactMethodProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * ContactMethodRequestBody provides the request body payload for working on ContactMethod entities. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ContactMethodRequestBody extends ExternalSourceRequestBody +{ + private ContactMethodProperties properties = null; + + /** + * Default constructor + */ + public ContactMethodRequestBody() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public ContactMethodRequestBody(ContactMethodRequestBody template) + { + super(template); + + if (template != null) + { + this.properties = template.getProperties(); + } + } + + + /** + * Return the properties for this contact method. + * + * @return properties bean + */ + public ContactMethodProperties getProperties() + { + return properties; + } + + + /** + * Set up the properties for this contact method. + * + * @param properties properties bean + */ + public void setProperties(ContactMethodProperties properties) + { + this.properties = properties; + } + + + /** + * JSON-style toString. + * + * @return list of properties and their values. + */ + @Override + public String toString() + { + return "ContactMethodRequestBody{" + + "properties=" + properties + + "} " + super.toString(); + } + + + /** + * Equals method that returns true if containing properties are the same. + * + * @param objectToCompare object to compare + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + ContactMethodRequestBody that = (ContactMethodRequestBody) objectToCompare; + return Objects.equals(properties, that.properties); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), properties); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ControlFlowElementResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ControlFlowElementResponse.java new file mode 100644 index 00000000000..cc685a55873 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ControlFlowElementResponse.java @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ControlFlowElement; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * ControlFlowElementResponse is the response structure used on the OMAS REST API calls that return the properties + * for a element. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ControlFlowElementResponse extends FFDCResponseBase +{ + private ControlFlowElement element = null; + + + /** + * Default constructor + */ + public ControlFlowElementResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public ControlFlowElementResponse(ControlFlowElementResponse template) + { + super(template); + + if (template != null) + { + this.element = template.getElement(); + } + } + + + /** + * Return the element result. + * + * @return bean + */ + public ControlFlowElement getElement() + { + return element; + } + + + /** + * Set up the element result. + * + * @param element bean + */ + public void setElement(ControlFlowElement element) + { + this.element = element; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "ControlFlowElementResponse{" + + "element=" + element + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof ControlFlowElementResponse that)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + return Objects.equals(element, that.element); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(element); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ControlFlowElementsResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ControlFlowElementsResponse.java new file mode 100644 index 00000000000..f012f58357c --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ControlFlowElementsResponse.java @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ControlFlowElement; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * ControlFlowElementsResponse is a response object for passing back a a list of control flow relationships + * or an exception if the request failed. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ControlFlowElementsResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public ControlFlowElementsResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public ControlFlowElementsResponse(ControlFlowElementsResponse template) + { + super(template); + + if (template != null) + { + elements = template.getElements(); + } + } + + + /** + * Return the list of metadata elements. + * + * @return result object + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the metadata element to return. + * + * @param elements result object + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "ControlFlowElementsResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + ControlFlowElementsResponse that = (ControlFlowElementsResponse) objectToCompare; + return Objects.equals(elements, that.elements); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elements); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ControlFlowRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ControlFlowRequestBody.java new file mode 100644 index 00000000000..cc4b32961bc --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ControlFlowRequestBody.java @@ -0,0 +1,128 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.lineage.ControlFlowProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * ControlFlowRequestBody describes the request body used when linking elements within processes. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ControlFlowRequestBody extends EffectiveTimeQueryRequestBody +{ + private ControlFlowProperties properties = null; + + + /** + * Default constructor + */ + public ControlFlowRequestBody() + { + super(); + } + + + /** + * Copy/clone constructor. + * + * @param template object to copy + */ + public ControlFlowRequestBody(ControlFlowRequestBody template) + { + super(template); + + if (template != null) + { + properties = template.getProperties(); + } + } + + + /** + * Return the properties for the relationship. + * + * @return properties object + */ + public ControlFlowProperties getProperties() + { + return properties; + } + + + /** + * Set up the properties for the relationship. + * + * @param properties properties object + */ + public void setProperties(ControlFlowProperties properties) + { + this.properties = properties; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "ControlFlowRequestBody{" + + "properties=" + properties + + ", effectiveTime=" + getEffectiveTime() + + ", externalSourceGUID='" + getExternalSourceGUID() + '\'' + + ", externalSourceName='" + getExternalSourceName() + '\'' + + '}'; + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + ControlFlowRequestBody that = (ControlFlowRequestBody) objectToCompare; + return Objects.equals(getProperties(), that.getProperties()); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), properties); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/CountResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/CountResponse.java index 23b2628343c..df26908fd2a 100644 --- a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/CountResponse.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/CountResponse.java @@ -6,7 +6,6 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import java.util.Arrays; import java.util.Objects; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; @@ -80,17 +79,7 @@ public String toString() { return "CountResponse{" + "count=" + count + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; + "} " + super.toString(); } @@ -107,7 +96,7 @@ public boolean equals(Object objectToCompare) { return true; } - if (!(objectToCompare instanceof CountResponse)) + if (!(objectToCompare instanceof CountResponse that)) { return false; } @@ -115,7 +104,6 @@ public boolean equals(Object objectToCompare) { return false; } - CountResponse that = (CountResponse) objectToCompare; return Objects.equals(count, that.count); } diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/DataContainerRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DataContainerRequestBody.java similarity index 78% rename from open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/DataContainerRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DataContainerRequestBody.java index 25536355308..1432a308234 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/DataContainerRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DataContainerRequestBody.java @@ -1,12 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.properties.DataContainerProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.display.DataContainerProperties; import java.util.Objects; @@ -117,20 +117,9 @@ public void setExternalSourceName(String externalSourceName) public String toString() { return "DataContainerRequestBody{" + - "externalSourceGUID='" + externalSourceGUID + '\'' + - ", externalSourceName='" + externalSourceName + '\'' + - ", elementPosition=" + getElementPosition() + - ", minCardinality=" + getMinCardinality() + - ", maxCardinality=" + getMaxCardinality() + - ", isDeprecated=" + getIsDeprecated() + - ", displayName='" + getDisplayName() + '\'' + - ", description='" + getDescription() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; + "externalSourceGUID='" + externalSourceGUID + '\'' + + ", externalSourceName='" + externalSourceName + '\'' + + "} " + super.toString(); } diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DataContainerResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DataContainerResponse.java new file mode 100644 index 00000000000..8f5d78a5c23 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DataContainerResponse.java @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.DataContainerElement; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * DataContainerResponse is a response object for passing back a single data container + * element or an exception if the request failed. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class DataContainerResponse extends FFDCResponseBase +{ + private DataContainerElement element = null; + + + /** + * Default constructor + */ + public DataContainerResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public DataContainerResponse(DataContainerResponse template) + { + super(template); + + if (template != null) + { + element = template.getElement(); + } + } + + + /** + * Return the metadata element. + * + * @return result object + */ + public DataContainerElement getElement() + { + return element; + } + + + /** + * Set up the metadata element to return. + * + * @param element result object + */ + public void setElement(DataContainerElement element) + { + this.element = element; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "DataContainerResponse{" + + "element=" + element + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + DataContainerResponse that = (DataContainerResponse) objectToCompare; + return Objects.equals(element, that.element); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), element); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DataContainersResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DataContainersResponse.java new file mode 100644 index 00000000000..932c2356b23 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DataContainersResponse.java @@ -0,0 +1,127 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.DataContainerElement; + + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * DataContainersResponse is a response object for passing back a a list of data containers + * or an exception if the request failed. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class DataContainersResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public DataContainersResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public DataContainersResponse(DataContainersResponse template) + { + super(template); + + if (template != null) + { + elements = template.getElements(); + } + } + + + /** + * Return the list of metadata elements. + * + * @return result object + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the metadata element to return. + * + * @param elements result object + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "DataContainersResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + DataContainersResponse that = (DataContainersResponse) objectToCompare; + return Objects.equals(elements, that.elements); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elements); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DataFieldRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DataFieldRequestBody.java new file mode 100644 index 00000000000..901ca6e5b1b --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DataFieldRequestBody.java @@ -0,0 +1,163 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.display.DataFieldProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * DataFieldRequestBody describes the properties of the data field plus the optional identifiers for an + * owning software server capability. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class DataFieldRequestBody extends DataFieldProperties +{ + private String externalSourceGUID = null; + private String externalSourceName = null; + + + /** + * Default constructor + */ + public DataFieldRequestBody() + { + super(); + } + + + /** + * Copy/clone constructor. + * + * @param template object to copy + */ + public DataFieldRequestBody(DataFieldRequestBody template) + { + super(template); + + if (template != null) + { + externalSourceGUID = template.getExternalSourceGUID(); + externalSourceName = template.getExternalSourceName(); + } + } + + + /** + * Copy/clone constructor. + * + * @param template object to copy + */ + public DataFieldRequestBody(DataFieldProperties template) + { + super(template); + } + + + /** + * Return the unique identifier of the software server capability entity that represented the external source - null for local. + * + * @return string guid + */ + public String getExternalSourceGUID() + { + return externalSourceGUID; + } + + + /** + * Set up the unique identifier of the software server capability entity that represented the external source - null for local. + * + * @param externalSourceGUID string guid + */ + public void setExternalSourceGUID(String externalSourceGUID) + { + this.externalSourceGUID = externalSourceGUID; + } + + + /** + * Return the unique name of the software server capability entity that represented the external source. + * + * @return string name + */ + public String getExternalSourceName() + { + return externalSourceName; + } + + + /** + * Set up the unique name of the software server capability entity that represented the external source. + * + * @param externalSourceName string name + */ + public void setExternalSourceName(String externalSourceName) + { + this.externalSourceName = externalSourceName; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "DataFieldRequestBody{" + + "externalSourceGUID='" + externalSourceGUID + '\'' + + ", externalSourceName='" + externalSourceName + '\'' + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + DataFieldRequestBody that = (DataFieldRequestBody) objectToCompare; + return Objects.equals(externalSourceGUID, that.externalSourceGUID) && + Objects.equals(externalSourceName, that.externalSourceName); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), externalSourceGUID, externalSourceName); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DataFieldResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DataFieldResponse.java new file mode 100644 index 00000000000..aeb329629cf --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DataFieldResponse.java @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.DataFieldElement; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * DataFieldResponse is a response object for passing back a single data field + * element or an exception if the request failed. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class DataFieldResponse extends FFDCResponseBase +{ + private DataFieldElement element = null; + + + /** + * Default constructor + */ + public DataFieldResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public DataFieldResponse(DataFieldResponse template) + { + super(template); + + if (template != null) + { + element = template.getElement(); + } + } + + + /** + * Return the metadata element. + * + * @return result object + */ + public DataFieldElement getElement() + { + return element; + } + + + /** + * Set up the metadata element to return. + * + * @param element result object + */ + public void setElement(DataFieldElement element) + { + this.element = element; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "DataFieldResponse{" + + "element=" + element + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + DataFieldResponse that = (DataFieldResponse) objectToCompare; + return Objects.equals(element, that.element); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), element); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DataFieldsResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DataFieldsResponse.java new file mode 100644 index 00000000000..1fb4c05e2d5 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DataFieldsResponse.java @@ -0,0 +1,126 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.DataFieldElement; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * DataFieldsResponse is a response object for passing back a a list of data fields + * or an exception if the request failed. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class DataFieldsResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public DataFieldsResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public DataFieldsResponse(DataFieldsResponse template) + { + super(template); + + if (template != null) + { + elements = template.getElements(); + } + } + + + /** + * Return the list of metadata elements. + * + * @return result object + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the metadata element to return. + * + * @param elements result object + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "DataFieldsResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + DataFieldsResponse that = (DataFieldsResponse) objectToCompare; + return Objects.equals(elements, that.elements); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elements); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DataFileRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DataFileRequestBody.java new file mode 100644 index 00000000000..64536678853 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DataFileRequestBody.java @@ -0,0 +1,185 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.filesandfolders.DataFileProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * DataFileRequestBody carries the parameters for creating a new file asset. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class DataFileRequestBody extends DataFileProperties +{ + private String externalSourceGUID = null; + private String externalSourceName = null; + private String connectorProviderClassName = null; + + + /** + * Default constructor + */ + public DataFileRequestBody() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public DataFileRequestBody(DataFileRequestBody template) + { + super(template); + + if (template != null) + { + externalSourceGUID = template.getExternalSourceGUID(); + externalSourceName = template.getExternalSourceName(); + connectorProviderClassName = template.getConnectorProviderClassName(); + } + } + + + /** + * Copy/clone constructor for main properties + * + * @param template object to copy + */ + public DataFileRequestBody(DataFileProperties template) + { + super(template); + } + + + /** + * Return the unique identifier of the software server capability entity that represented the external source - null for local. + * + * @return string guid + */ + public String getExternalSourceGUID() + { + return externalSourceGUID; + } + + + /** + * Set up the unique identifier of the software server capability entity that represented the external source - null for local. + * + * @param externalSourceGUID string guid + */ + public void setExternalSourceGUID(String externalSourceGUID) + { + this.externalSourceGUID = externalSourceGUID; + } + + + /** + * Return the unique name of the software server capability entity that represented the external source. + * + * @return string name + */ + public String getExternalSourceName() + { + return externalSourceName; + } + + + /** + * Set up the unique name of the software server capability entity that represented the external source. + * + * @param externalSourceName string name + */ + public void setExternalSourceName(String externalSourceName) + { + this.externalSourceName = externalSourceName; + } + + + /** + * Return the fully qualified class name of the connector provider for this type of file. If null is + * passed, the server uses the default file connector. + * + * @return string name + */ + public String getConnectorProviderClassName() + { + return connectorProviderClassName; + } + + + /** + * Set up the fully qualified class name of the connector provider for this type of file. If null is + * passed, the server uses the default file connector. + * + * @param connectorProviderClassName string name + */ + public void setConnectorProviderClassName(String connectorProviderClassName) + { + this.connectorProviderClassName = connectorProviderClassName; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "DataFileRequestBody{" + + "externalSourceGUID='" + externalSourceGUID + '\'' + + ", externalSourceName='" + externalSourceName + '\'' + + ", connectorProviderClassName='" + connectorProviderClassName + '\'' + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + DataFileRequestBody that = (DataFileRequestBody) objectToCompare; + return Objects.equals(externalSourceGUID, that.externalSourceGUID) && + Objects.equals(externalSourceName, that.externalSourceName) && + Objects.equals(connectorProviderClassName, that.connectorProviderClassName); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), externalSourceGUID, externalSourceName, connectorProviderClassName); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DataFileResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DataFileResponse.java new file mode 100644 index 00000000000..a7328492e9a --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DataFileResponse.java @@ -0,0 +1,127 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.DataFileElement; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * DataFileResponse is the response structure used on the OMAS REST API calls that return the properties + * for a file. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class DataFileResponse extends FFDCResponseBase +{ + private DataFileElement dataFile = null; + + + /** + * Default constructor + */ + public DataFileResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public DataFileResponse(DataFileResponse template) + { + super(template); + + if (template != null) + { + this.dataFile = template.getDataFile(); + } + } + + + /** + * Return the file result. + * + * @return bean + */ + public DataFileElement getDataFile() + { + return dataFile; + } + + + /** + * Set up the file result. + * + * @param dataFile bean + */ + public void setDataFile(DataFileElement dataFile) + { + this.dataFile = dataFile; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "DataFileResponse{" + + "dataFile=" + dataFile + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof DataFileResponse)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + DataFileResponse that = (DataFileResponse) objectToCompare; + return Objects.equals(dataFile, that.dataFile); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(dataFile); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DataFilesResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DataFilesResponse.java new file mode 100644 index 00000000000..b11746aa93e --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DataFilesResponse.java @@ -0,0 +1,126 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.DataFileElement; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * DataFilesResponse is a response object for passing back a a list of database views + * or an exception if the request failed. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class DataFilesResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public DataFilesResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public DataFilesResponse(DataFilesResponse template) + { + super(template); + + if (template != null) + { + elements = template.getElements(); + } + } + + + /** + * Return the list of metadata elements. + * + * @return result object + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the metadata element to return. + * + * @param elements result object + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "DataFilesResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + DataFilesResponse that = (DataFilesResponse) objectToCompare; + return Objects.equals(elements, that.elements); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elements); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DataFlowElementResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DataFlowElementResponse.java new file mode 100644 index 00000000000..a804a0d4726 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DataFlowElementResponse.java @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.DataFlowElement; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * DataFlowElementResponse is the response structure used on the OMAS REST API calls that return the properties + * for a element. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class DataFlowElementResponse extends FFDCResponseBase +{ + private DataFlowElement element = null; + + + /** + * Default constructor + */ + public DataFlowElementResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public DataFlowElementResponse(DataFlowElementResponse template) + { + super(template); + + if (template != null) + { + this.element = template.getElement(); + } + } + + + /** + * Return the element result. + * + * @return bean + */ + public DataFlowElement getElement() + { + return element; + } + + + /** + * Set up the element result. + * + * @param element bean + */ + public void setElement(DataFlowElement element) + { + this.element = element; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "DataFlowElementResponse{" + + "element=" + element + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof DataFlowElementResponse that)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + return Objects.equals(element, that.element); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(element); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DataFlowElementsResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DataFlowElementsResponse.java new file mode 100644 index 00000000000..d61db1672a0 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DataFlowElementsResponse.java @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.DataFlowElement; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * DataFlowElementsResponse is a response object for passing back a a list of data flow relationships + * or an exception if the request failed. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class DataFlowElementsResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public DataFlowElementsResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public DataFlowElementsResponse(DataFlowElementsResponse template) + { + super(template); + + if (template != null) + { + elements = template.getElements(); + } + } + + + /** + * Return the list of metadata elements. + * + * @return result object + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the metadata element to return. + * + * @param elements result object + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "DataFlowElementsResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + DataFlowElementsResponse that = (DataFlowElementsResponse) objectToCompare; + return Objects.equals(elements, that.elements); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elements); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DataFlowRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DataFlowRequestBody.java new file mode 100644 index 00000000000..1aebedb0f7e --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DataFlowRequestBody.java @@ -0,0 +1,128 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.lineage.DataFlowProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * DataFlowRequestBody describes the request body used when linking elements within processes. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class DataFlowRequestBody extends EffectiveTimeQueryRequestBody +{ + private DataFlowProperties properties = null; + + + /** + * Default constructor + */ + public DataFlowRequestBody() + { + super(); + } + + + /** + * Copy/clone constructor. + * + * @param template object to copy + */ + public DataFlowRequestBody(DataFlowRequestBody template) + { + super(template); + + if (template != null) + { + properties = template.getProperties(); + } + } + + + /** + * Return the properties for the relationship. + * + * @return properties object + */ + public DataFlowProperties getProperties() + { + return properties; + } + + + /** + * Set up the properties for the relationship. + * + * @param properties properties object + */ + public void setProperties(DataFlowProperties properties) + { + this.properties = properties; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "DataFlowRequestBody{" + + "properties=" + properties + + ", effectiveTime=" + getEffectiveTime() + + ", externalSourceGUID='" + getExternalSourceGUID() + '\'' + + ", externalSourceName='" + getExternalSourceName() + '\'' + + '}'; + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + DataFlowRequestBody that = (DataFlowRequestBody) objectToCompare; + return Objects.equals(getProperties(), that.getProperties()); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), properties); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DataFolderRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DataFolderRequestBody.java new file mode 100644 index 00000000000..4c67b2431ce --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DataFolderRequestBody.java @@ -0,0 +1,188 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.filesandfolders.FileFolderProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * DataFileRequestBody carries the parameters for creating a new file asset. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class DataFolderRequestBody extends FileFolderProperties +{ + private String externalSourceGUID = null; + private String externalSourceName = null; + private String connectorProviderClassName = null; + + + /** + * Default constructor + */ + public DataFolderRequestBody() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public DataFolderRequestBody(DataFolderRequestBody template) + { + super(template); + + if (template != null) + { + externalSourceGUID = template.getExternalSourceGUID(); + externalSourceName = template.getExternalSourceName(); + connectorProviderClassName = template.getConnectorProviderClassName(); + } + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public DataFolderRequestBody(FileFolderProperties template) + { + super(template); + } + + + /** + * Return the unique identifier of the software server capability entity that represented the external source - null for local. + * + * @return string guid + */ + public String getExternalSourceGUID() + { + return externalSourceGUID; + } + + + /** + * Set up the unique identifier of the software server capability entity that represented the external source - null for local. + * + * @param externalSourceGUID string guid + */ + public void setExternalSourceGUID(String externalSourceGUID) + { + this.externalSourceGUID = externalSourceGUID; + } + + + /** + * Return the unique name of the software server capability entity that represented the external source. + * + * @return string name + */ + public String getExternalSourceName() + { + return externalSourceName; + } + + + /** + * Set up the unique name of the software server capability entity that represented the external source. + * + * @param externalSourceName string name + */ + public void setExternalSourceName(String externalSourceName) + { + this.externalSourceName = externalSourceName; + } + + + + /** + * Return the fully qualified class name of the connector provider for this type of file. If null is + * passed, the server uses the default file connector. + * + * @return string name + */ + public String getConnectorProviderClassName() + { + return connectorProviderClassName; + } + + + /** + * Set up the fully qualified class name of the connector provider for this type of file. If null is + * passed, the server uses the default file connector. + * + * @param connectorProviderClassName string name + */ + public void setConnectorProviderClassName(String connectorProviderClassName) + { + this.connectorProviderClassName = connectorProviderClassName; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "DataFolderRequestBody{" + + "externalSourceGUID='" + externalSourceGUID + '\'' + + ", externalSourceName='" + externalSourceName + '\'' + + ", connectorProviderClassName='" + connectorProviderClassName + '\'' + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + DataFolderRequestBody that = (DataFolderRequestBody) objectToCompare; + return Objects.equals(externalSourceGUID, that.externalSourceGUID) && + Objects.equals(externalSourceName, that.externalSourceName) && + Objects.equals(connectorProviderClassName, that.connectorProviderClassName); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), externalSourceGUID, externalSourceName, connectorProviderClassName); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DataManagerOMASAPIRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DataManagerOMASAPIRequestBody.java new file mode 100644 index 00000000000..c56d7bcbece --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DataManagerOMASAPIRequestBody.java @@ -0,0 +1,48 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.*; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * DataManagerOMASAPIRequestBody provides a common header for Data Manager OMAS request bodies for its REST API. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) + +public abstract class DataManagerOMASAPIRequestBody +{ + /** + * Default constructor + */ + public DataManagerOMASAPIRequestBody() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public DataManagerOMASAPIRequestBody(DataManagerOMASAPIRequestBody template) + { + } + + + /** + * JSON-like toString + * + * @return string containing the class name + */ + @Override + public String toString() + { + return "DataManagerOMASAPIRequestBody{}"; + } +} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/DataManagerOMASAPIResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DataManagerOMASAPIResponse.java similarity index 93% rename from open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/DataManagerOMASAPIResponse.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DataManagerOMASAPIResponse.java index c07df3569c6..eecb24c4d79 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/DataManagerOMASAPIResponse.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DataManagerOMASAPIResponse.java @@ -1,9 +1,9 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.*; -import org.odpi.openmetadata.commonservices.ffdc.rest.FFDCResponseBase; + import java.util.Arrays; @@ -11,7 +11,7 @@ import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; /** - * DataManagerOMASAPIResponse provides a common header for Data Manager OMAS managed rest to its REST API. + * FFDCResponseBase provides a common header for Data Manager OMAS managed rest to its REST API. * It manages information about exceptions. If no exception has been raised exceptionClassName is null. */ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/DataProcessingEngineRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DataProcessingEngineRequestBody.java similarity index 78% rename from open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/DataProcessingEngineRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DataProcessingEngineRequestBody.java index bc510c21735..f60ad98f40b 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/DataProcessingEngineRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DataProcessingEngineRequestBody.java @@ -1,12 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.properties.DataProcessingEngineProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities.DataProcessingEngineProperties; import java.util.Objects; @@ -115,20 +115,9 @@ public void setExternalSourceName(String externalSourceName) public String toString() { return "DataProcessingEngineRequestBody{" + - "externalSourceGUID='" + externalSourceGUID + '\'' + - ", externalSourceName='" + externalSourceName + '\'' + - ", displayName='" + getDisplayName() + '\'' + - ", description='" + getDescription() + '\'' + - ", typeDescription='" + getDeployedImplementationType() + '\'' + - ", version='" + getVersion() + '\'' + - ", patchLevel='" + getPatchLevel() + '\'' + - ", source='" + getSource() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; + "externalSourceGUID='" + externalSourceGUID + '\'' + + ", externalSourceName='" + externalSourceName + '\'' + + "} " + super.toString(); } diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DatabaseColumnResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DatabaseColumnResponse.java new file mode 100644 index 00000000000..5110b5cf386 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DatabaseColumnResponse.java @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.DatabaseColumnElement; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * DatabaseColumnResponse is a response object for passing back a single database column + * element or an exception if the request failed. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class DatabaseColumnResponse extends FFDCResponseBase +{ + private DatabaseColumnElement element = null; + + + /** + * Default constructor + */ + public DatabaseColumnResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public DatabaseColumnResponse(DatabaseColumnResponse template) + { + super(template); + + if (template != null) + { + element = template.getElement(); + } + } + + + /** + * Return the metadata element. + * + * @return result object + */ + public DatabaseColumnElement getElement() + { + return element; + } + + + /** + * Set up the metadata element to return. + * + * @param element result object + */ + public void setElement(DatabaseColumnElement element) + { + this.element = element; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "DatabaseColumnResponse{" + + "element=" + element + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + DatabaseColumnResponse that = (DatabaseColumnResponse) objectToCompare; + return Objects.equals(element, that.element); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), element); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DatabaseColumnsResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DatabaseColumnsResponse.java new file mode 100644 index 00000000000..42ba4152ae6 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DatabaseColumnsResponse.java @@ -0,0 +1,126 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.DatabaseColumnElement; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * DatabaseColumnsResponse is a response object for passing back a a list of database columns + * or an exception if the request failed. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class DatabaseColumnsResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public DatabaseColumnsResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public DatabaseColumnsResponse(DatabaseColumnsResponse template) + { + super(template); + + if (template != null) + { + elements = template.getElements(); + } + } + + + /** + * Return the list of metadata elements. + * + * @return result object + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the metadata element to return. + * + * @param elements result object + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "DatabaseColumnsResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + DatabaseColumnsResponse that = (DatabaseColumnsResponse) objectToCompare; + return Objects.equals(elements, that.elements); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elements); + } +} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/DatabaseManagerRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DatabaseManagerRequestBody.java similarity index 82% rename from open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/DatabaseManagerRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DatabaseManagerRequestBody.java index 176736f2cdf..7d76252d290 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/DatabaseManagerRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DatabaseManagerRequestBody.java @@ -1,12 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.properties.DatabaseManagerProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities.DatabaseManagerProperties; import java.util.Objects; @@ -117,18 +117,7 @@ public String toString() return "DatabaseManagerRequestBody{" + "externalSourceGUID='" + externalSourceGUID + '\'' + ", externalSourceName='" + externalSourceName + '\'' + - ", displayName='" + getDisplayName() + '\'' + - ", description='" + getDescription() + '\'' + - ", typeDescription='" + getDeployedImplementationType() + '\'' + - ", version='" + getVersion() + '\'' + - ", patchLevel='" + getPatchLevel() + '\'' + - ", source='" + getSource() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; + "} " + super.toString(); } diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DatabaseResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DatabaseResponse.java new file mode 100644 index 00000000000..7f34b336fb2 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DatabaseResponse.java @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.DatabaseElement; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * DatabaseResponse is a response object for passing back a single database + * element or an exception if the request failed. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class DatabaseResponse extends FFDCResponseBase +{ + private DatabaseElement element = null; + + + /** + * Default constructor + */ + public DatabaseResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public DatabaseResponse(DatabaseResponse template) + { + super(template); + + if (template != null) + { + element = template.getElement(); + } + } + + + /** + * Return the metadata element. + * + * @return result object + */ + public DatabaseElement getElement() + { + return element; + } + + + /** + * Set up the metadata element to return. + * + * @param element result object + */ + public void setElement(DatabaseElement element) + { + this.element = element; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "DatabaseResponse{" + + "element=" + element + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + DatabaseResponse that = (DatabaseResponse) objectToCompare; + return Objects.equals(element, that.element); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), element); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DatabaseSchemaResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DatabaseSchemaResponse.java new file mode 100644 index 00000000000..cc6f1aeea4b --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DatabaseSchemaResponse.java @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.DatabaseSchemaElement; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * DatabaseSchemaResponse is a response object for passing back a single database schema + * element or an exception if the request failed. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class DatabaseSchemaResponse extends FFDCResponseBase +{ + private DatabaseSchemaElement element = null; + + + /** + * Default constructor + */ + public DatabaseSchemaResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public DatabaseSchemaResponse(DatabaseSchemaResponse template) + { + super(template); + + if (template != null) + { + element = template.getElement(); + } + } + + + /** + * Return the metadata element. + * + * @return result object + */ + public DatabaseSchemaElement getElement() + { + return element; + } + + + /** + * Set up the metadata element to return. + * + * @param element result object + */ + public void setElement(DatabaseSchemaElement element) + { + this.element = element; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "DatabaseSchemaResponse{" + + "element=" + element + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + DatabaseSchemaResponse that = (DatabaseSchemaResponse) objectToCompare; + return Objects.equals(element, that.element); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), element); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DatabaseSchemasResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DatabaseSchemasResponse.java new file mode 100644 index 00000000000..886130ff7f5 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DatabaseSchemasResponse.java @@ -0,0 +1,126 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.DatabaseSchemaElement; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * DatabaseSchemasResponse is a response object for passing back a a list of database schemas + * or an exception if the request failed. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class DatabaseSchemasResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public DatabaseSchemasResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public DatabaseSchemasResponse(DatabaseSchemasResponse template) + { + super(template); + + if (template != null) + { + elements = template.getElements(); + } + } + + + /** + * Return the list of metadata elements. + * + * @return result object + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the metadata element to return. + * + * @param elements result object + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "DatabaseSchemasResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + DatabaseSchemasResponse that = (DatabaseSchemasResponse) objectToCompare; + return Objects.equals(elements, that.elements); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elements); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DatabaseTableResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DatabaseTableResponse.java new file mode 100644 index 00000000000..d8f03a48ed4 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DatabaseTableResponse.java @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.DatabaseTableElement; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * DatabaseTableResponse is a response object for passing back a single database table + * element or an exception if the request failed. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class DatabaseTableResponse extends FFDCResponseBase +{ + private DatabaseTableElement element = null; + + + /** + * Default constructor + */ + public DatabaseTableResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public DatabaseTableResponse(DatabaseTableResponse template) + { + super(template); + + if (template != null) + { + element = template.getElement(); + } + } + + + /** + * Return the metadata element. + * + * @return result object + */ + public DatabaseTableElement getElement() + { + return element; + } + + + /** + * Set up the metadata element to return. + * + * @param element result object + */ + public void setElement(DatabaseTableElement element) + { + this.element = element; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "DatabaseTableResponse{" + + "element=" + element + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + DatabaseTableResponse that = (DatabaseTableResponse) objectToCompare; + return Objects.equals(element, that.element); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), element); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DatabaseTablesResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DatabaseTablesResponse.java new file mode 100644 index 00000000000..9617207d05a --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DatabaseTablesResponse.java @@ -0,0 +1,126 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.DatabaseTableElement; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * DatabaseTablesResponse is a response object for passing back a a list of database tables + * or an exception if the request failed. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class DatabaseTablesResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public DatabaseTablesResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public DatabaseTablesResponse(DatabaseTablesResponse template) + { + super(template); + + if (template != null) + { + elements = template.getElements(); + } + } + + + /** + * Return the list of metadata elements. + * + * @return result object + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the metadata element to return. + * + * @param elements result object + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "DatabaseTablesResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + DatabaseTablesResponse that = (DatabaseTablesResponse) objectToCompare; + return Objects.equals(elements, that.elements); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elements); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DatabaseViewResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DatabaseViewResponse.java new file mode 100644 index 00000000000..f16f3aca309 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DatabaseViewResponse.java @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.DatabaseViewElement; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * DatabaseViewResponse is a response object for passing back a single database view + * element or an exception if the request failed. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class DatabaseViewResponse extends FFDCResponseBase +{ + private DatabaseViewElement element = null; + + + /** + * Default constructor + */ + public DatabaseViewResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public DatabaseViewResponse(DatabaseViewResponse template) + { + super(template); + + if (template != null) + { + element = template.getElement(); + } + } + + + /** + * Return the metadata element. + * + * @return result object + */ + public DatabaseViewElement getElement() + { + return element; + } + + + /** + * Set up the metadata element to return. + * + * @param element result object + */ + public void setElement(DatabaseViewElement element) + { + this.element = element; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "DatabaseViewResponse{" + + "element=" + element + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + DatabaseViewResponse that = (DatabaseViewResponse) objectToCompare; + return Objects.equals(element, that.element); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), element); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DatabaseViewsResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DatabaseViewsResponse.java new file mode 100644 index 00000000000..0ce5f1f8cd6 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DatabaseViewsResponse.java @@ -0,0 +1,126 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.DatabaseViewElement; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * DatabaseViewsResponse is a response object for passing back a a list of database views + * or an exception if the request failed. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class DatabaseViewsResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public DatabaseViewsResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public DatabaseViewsResponse(DatabaseViewsResponse template) + { + super(template); + + if (template != null) + { + elements = template.getElements(); + } + } + + + /** + * Return the list of metadata elements. + * + * @return result object + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the metadata element to return. + * + * @param elements result object + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "DatabaseViewsResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + DatabaseViewsResponse that = (DatabaseViewsResponse) objectToCompare; + return Objects.equals(elements, that.elements); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elements); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DatabasesResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DatabasesResponse.java new file mode 100644 index 00000000000..b2b76c2d9da --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DatabasesResponse.java @@ -0,0 +1,126 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.DatabaseElement; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * DatabasesResponse is a response object for passing back a a list of databases + * or an exception if the request failed. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class DatabasesResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public DatabasesResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public DatabasesResponse(DatabasesResponse template) + { + super(template); + + if (template != null) + { + elements = template.getElements(); + } + } + + + /** + * Return the list of metadata elements. + * + * @return result object + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the metadata element to return. + * + * @param elements result object + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "DatabasesResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + DatabasesResponse that = (DatabasesResponse) objectToCompare; + return Objects.equals(elements, that.elements); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elements); + } +} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/DeploymentRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DeploymentRequestBody.java similarity index 93% rename from open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/DeploymentRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DeploymentRequestBody.java index a5c38e60268..57bb33eeb8a 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/DeploymentRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DeploymentRequestBody.java @@ -1,11 +1,11 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.DeploymentProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.infrastructure.DeploymentProperties; import java.util.Objects; @@ -19,7 +19,7 @@ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) -public class DeploymentRequestBody extends MetadataSourceRequestBody +public class DeploymentRequestBody extends ExternalSourceRequestBody { private DeploymentProperties properties = null; diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/DerivedSchemaTypeQueryTargetRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DerivedSchemaTypeQueryTargetRequestBody.java similarity index 88% rename from open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/DerivedSchemaTypeQueryTargetRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DerivedSchemaTypeQueryTargetRequestBody.java index 47f15324e7b..749cdca6c89 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/DerivedSchemaTypeQueryTargetRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DerivedSchemaTypeQueryTargetRequestBody.java @@ -1,12 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.properties.DerivedSchemaTypeQueryTargetProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.DerivedSchemaTypeQueryTargetProperties; import java.util.Objects; @@ -117,12 +117,9 @@ public void setExternalSourceName(String externalSourceName) public String toString() { return "DerivedSchemaTypeQueryTargetRequestBody{" + - "externalSourceGUID='" + externalSourceGUID + '\'' + - ", externalSourceName='" + externalSourceName + '\'' + - ", queryId='" + getQueryId() + '\'' + - ", query='" + getQuery() + '\'' + - ", queryTargetGUID='" + getQueryTargetGUID() + '\'' + - '}'; + "externalSourceGUID='" + externalSourceGUID + '\'' + + ", externalSourceName='" + externalSourceName + '\'' + + "} " + super.toString(); } diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/DigitalLocationRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DigitalLocationRequestBody.java similarity index 97% rename from open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/DigitalLocationRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DigitalLocationRequestBody.java index 811ac2cc247..5313ececed6 100644 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/DigitalLocationRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DigitalLocationRequestBody.java @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalarchitecture.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DigitalServiceResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DigitalServiceResponse.java new file mode 100644 index 00000000000..4b1a254fd9a --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DigitalServiceResponse.java @@ -0,0 +1,123 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.DigitalServiceElement; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * DigitalServiceResponse is a response object for passing back a single digital service object. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class DigitalServiceResponse extends FFDCResponseBase +{ + private DigitalServiceElement element = null; + + + /** + * Default constructor + */ + public DigitalServiceResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public DigitalServiceResponse(DigitalServiceResponse template) + { + super(template); + + if (template != null) + { + element = template.getElement(); + } + } + + + /** + * Return the metadata element. + * + * @return result object + */ + public DigitalServiceElement getElement() + { + return element; + } + + + /** + * Set up the metadata element to return. + * + * @param element result object + */ + public void setElement(DigitalServiceElement element) + { + this.element = element; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "DigitalServiceResponse{" + + "element=" + element + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + DigitalServiceResponse that = (DigitalServiceResponse) objectToCompare; + return Objects.equals(element, that.element); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), element); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DigitalServicesResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DigitalServicesResponse.java new file mode 100644 index 00000000000..1a465dd4ba2 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DigitalServicesResponse.java @@ -0,0 +1,124 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.DigitalServiceElement; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * DigitalServicesResponse is a response object for passing back a list of digital service elements. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class DigitalServicesResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public DigitalServicesResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public DigitalServicesResponse(DigitalServicesResponse template) + { + super(template); + + if (template != null) + { + elements = template.getElements(); + } + } + + + /** + * Return the list of metadata elements. + * + * @return result object + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the list of metadata elements to return. + * + * @param elements result object + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "DigitalServicesResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + DigitalServicesResponse that = (DigitalServicesResponse) objectToCompare; + return Objects.equals(elements, that.elements); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elements); + } +} diff --git a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/rest/DuplicatesRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DuplicatesRequestBody.java similarity index 97% rename from open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/rest/DuplicatesRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DuplicatesRequestBody.java index b49a6bef51e..c67f4112b1b 100644 --- a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/rest/DuplicatesRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DuplicatesRequestBody.java @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.stewardshipaction.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -18,7 +18,7 @@ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) -public class DuplicatesRequestBody extends StewardshipActionOMASAPIRequestBody +public class DuplicatesRequestBody { private int statusIdentifier = 0; private String steward = null; @@ -44,8 +44,6 @@ public DuplicatesRequestBody() */ public DuplicatesRequestBody(DuplicatesRequestBody template) { - super(template); - if (template != null) { statusIdentifier = template.getStatusIdentifier(); diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DuplicatesResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DuplicatesResponse.java new file mode 100644 index 00000000000..6170b60f881 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/DuplicatesResponse.java @@ -0,0 +1,124 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.DuplicateElement; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * DuplicatesResponse is a response object for passing back a list of duplicates. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class DuplicatesResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public DuplicatesResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public DuplicatesResponse(DuplicatesResponse template) + { + super(template); + + if (template != null) + { + elements = template.getElements(); + } + } + + + /** + * Return the list of metadata elements. + * + * @return result object + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the list of metadata elements to return. + * + * @param elements result object + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "DuplicatesResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + DuplicatesResponse that = (DuplicatesResponse) objectToCompare; + return Objects.equals(elements, that.elements); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elements); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/EffectiveDatesRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/EffectiveDatesRequestBody.java new file mode 100644 index 00000000000..e6abefb5636 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/EffectiveDatesRequestBody.java @@ -0,0 +1,148 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import java.util.Date; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * ExternalSourceRequestBody carries the parameters for marking an asset or schema as external. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class EffectiveDatesRequestBody extends ExternalSourceRequestBody +{ + private Date effectiveFrom = null; + private Date effectiveTo = null; + + + /** + * Default constructor + */ + public EffectiveDatesRequestBody() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public EffectiveDatesRequestBody(EffectiveDatesRequestBody template) + { + super(template); + + if (template != null) + { + effectiveFrom = template.getEffectiveFrom(); + effectiveTo = template.getEffectiveTo(); + } + } + + + /** + * Return the date/time that this element is effective from (null means effective from the epoch). + * + * @return date object + */ + public Date getEffectiveFrom() + { + return effectiveFrom; + } + + + /** + * Set up the date/time that this element is effective from (null means effective from the epoch). + * + * @param effectiveFrom date object + */ + public void setEffectiveFrom(Date effectiveFrom) + { + this.effectiveFrom = effectiveFrom; + } + + + /** + * Return the date/time that element is effective to (null means that it is effective indefinitely into the future). + * + * @return date object + */ + public Date getEffectiveTo() + { + return effectiveTo; + } + + + /** + * Set the date/time that element is effective to (null means that it is effective indefinitely into the future). + * + * @param effectiveTo date object + */ + public void setEffectiveTo(Date effectiveTo) + { + this.effectiveTo = effectiveTo; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "EffectiveDatesRequestBody{" + + "effectiveFrom=" + effectiveFrom + + ", effectiveTo=" + effectiveTo + + "} " + super.toString(); + } + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (! super.equals(objectToCompare)) + { + return false; + } + EffectiveDatesRequestBody that = (EffectiveDatesRequestBody) objectToCompare; + return Objects.equals(effectiveFrom, that.effectiveFrom) && + Objects.equals(effectiveTo, that.effectiveTo); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), effectiveFrom, effectiveTo); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/EffectiveTimeQueryRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/EffectiveTimeQueryRequestBody.java new file mode 100644 index 00000000000..9946c3db208 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/EffectiveTimeQueryRequestBody.java @@ -0,0 +1,118 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import java.util.Date; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * EffectiveTimeQueryRequestBody carries the date/time for a query. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class EffectiveTimeQueryRequestBody extends ExternalSourceRequestBody +{ + private Date effectiveTime = null; + + + /** + * Default constructor + */ + public EffectiveTimeQueryRequestBody() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public EffectiveTimeQueryRequestBody(EffectiveTimeQueryRequestBody template) + { + if (template != null) + { + effectiveTime = template.getEffectiveTime(); + } + } + + + /** + * Return the date/time to use for the query. + * + * @return date object + */ + public Date getEffectiveTime() + { + return effectiveTime; + } + + + /** + * Set up the date/time to use for the query. + * + * @param effectiveTime date object + */ + public void setEffectiveTime(Date effectiveTime) + { + this.effectiveTime = effectiveTime; + } + + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "EffectiveTimeQueryRequestBody{" + + "effectiveTime=" + effectiveTime + + '}'; + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + EffectiveTimeQueryRequestBody that = (EffectiveTimeQueryRequestBody) objectToCompare; + return Objects.equals(effectiveTime, that.effectiveTime); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(effectiveTime); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ElementHeaderResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ElementHeaderResponse.java new file mode 100644 index 00000000000..ff3c7d3c44f --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ElementHeaderResponse.java @@ -0,0 +1,126 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * ElementHeaderResponse is the response structure used on the OMAS REST API calls that return the header + * for a element. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ElementHeaderResponse extends FFDCResponseBase +{ + private ElementHeader element = null; + + + /** + * Default constructor + */ + public ElementHeaderResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public ElementHeaderResponse(ElementHeaderResponse template) + { + super(template); + + if (template != null) + { + this.element = template.getElement(); + } + } + + + /** + * Return the element result. + * + * @return bean + */ + public ElementHeader getElement() + { + return element; + } + + + /** + * Set up the element result. + * + * @param element bean + */ + public void setElement(ElementHeader element) + { + this.element = element; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "ElementHeaderResponse{" + + "element=" + element + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof ElementHeaderResponse)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + ElementHeaderResponse that = (ElementHeaderResponse) objectToCompare; + return Objects.equals(element, that.element); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(element); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ElementHeadersResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ElementHeadersResponse.java new file mode 100644 index 00000000000..671e761e28f --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ElementHeadersResponse.java @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * ElementHeadersResponse is a response object for passing back a list of element headers + * or an exception if the request failed. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ElementHeadersResponse extends FFDCResponseBase +{ + private List elementHeaders = null; + + + /** + * Default constructor + */ + public ElementHeadersResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public ElementHeadersResponse(ElementHeadersResponse template) + { + super(template); + + if (template != null) + { + elementHeaders = template.getElementHeaders(); + } + } + + + /** + * Return the list of metadata elements. + * + * @return result object + */ + public List getElementHeaders() + { + return elementHeaders; + } + + + /** + * Set up the metadata element to return. + * + * @param elementHeaders result object + */ + public void setElementHeaders(List elementHeaders) + { + this.elementHeaders = elementHeaders; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "ElementHeadersResponse{" + + "elementHeaders=" + elementHeaders + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + ElementHeadersResponse that = (ElementHeadersResponse) objectToCompare; + return Objects.equals(elementHeaders, that.elementHeaders); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elementHeaders); + } +} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ElementStatusRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ElementStatusRequestBody.java similarity index 90% rename from open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ElementStatusRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ElementStatusRequestBody.java index 1427f0bbc54..be186258eb6 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ElementStatusRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ElementStatusRequestBody.java @@ -1,13 +1,13 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import org.odpi.openmetadata.commonservices.ffdc.rest.EffectiveTimeRequestBody; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStatus; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ElementStatus; import java.util.Objects; @@ -129,14 +129,12 @@ public void setElementStatus(ElementStatus elementStatus) public String toString() { return "ElementStatusRequestBody{" + - "externalSourceGUID='" + externalSourceGUID + '\'' + - ", externalSourceName='" + externalSourceName + '\'' + - ", elementStatus=" + elementStatus + - ", effectiveTime=" + getEffectiveTime() + - '}'; + "externalSourceGUID='" + externalSourceGUID + '\'' + + ", externalSourceName='" + externalSourceName + '\'' + + ", elementStatus=" + elementStatus + + "} " + super.toString(); } - /** * Return comparison result based on the content of the properties. * diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ElementStubResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ElementStubResponse.java new file mode 100644 index 00000000000..03a6c5967dc --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ElementStubResponse.java @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementStub; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * ElementStubResponse is a response object for passing back the header of a Referenceable + * element or an exception if the request failed. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ElementStubResponse extends FFDCResponseBase +{ + private ElementStub element = null; + + + /** + * Default constructor + */ + public ElementStubResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public ElementStubResponse(ElementStubResponse template) + { + super(template); + + if (template != null) + { + element = template.getElement(); + } + } + + + /** + * Return the metadata element. + * + * @return result object + */ + public ElementStub getElement() + { + return element; + } + + + /** + * Set up the metadata element to return. + * + * @param element result object + */ + public void setElement(ElementStub element) + { + this.element = element; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "ElementStubResponse{" + + "element=" + element + + "} " + super.toString(); + } + + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + ElementStubResponse that = (ElementStubResponse) objectToCompare; + return Objects.equals(element, that.element); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), element); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ElementStubsResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ElementStubsResponse.java new file mode 100644 index 00000000000..7617b875a3e --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ElementStubsResponse.java @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementStub; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * ElementStubsResponse is the response structure used on the OMAS REST API calls that return a + * list of element identifiers as a response. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ElementStubsResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public ElementStubsResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public ElementStubsResponse(ElementStubsResponse template) + { + super(template); + + if (template != null) + { + this.elements = template.getElements(); + } + } + + + /** + * Return the list of element identifiers. + * + * @return list of objects or null + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the list of element identifiers. + * + * @param elements - list of objects or null + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "ElementStubsResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof ElementStubsResponse that)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + return Objects.equals(this.getElements(), that.getElements()); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(elements, super.hashCode()); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/EmbeddedConnectionRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/EmbeddedConnectionRequestBody.java new file mode 100644 index 00000000000..8365a7ba27f --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/EmbeddedConnectionRequestBody.java @@ -0,0 +1,184 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * The EmbeddedConnection is used within a VirtualConnection to link to the embedded connections. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class EmbeddedConnectionRequestBody extends ExternalSourceRequestBody +{ + protected int position = 0; + protected String displayName = null; + protected Map arguments = null; + + + /** + * Default constructor + */ + public EmbeddedConnectionRequestBody() + { + super(); + } + + + /** + * Copy/clone constructor. + * + * @param template element to copy + */ + public EmbeddedConnectionRequestBody(EmbeddedConnectionRequestBody template) + { + if (template != null) + { + position = template.getPosition(); + displayName = template.getDisplayName(); + arguments = template.getArguments(); + } + } + + + /** + * Return the position that this connector is in the list of embedded connectors. + * + * @return int + */ + public int getPosition() + { + return position; + } + + + /** + * Set up the position that this connector is in the list of embedded connectors. + * + * @param position int + */ + public void setPosition(int position) + { + this.position = position; + } + + + /** + * Return the printable name of the embedded connection. + * + * @return String name + */ + public String getDisplayName() + { + return displayName; + } + + + /** + * Set up the printable name of the embedded connection. + * + * @param displayName String name + */ + public void setDisplayName(String displayName) + { + this.displayName = displayName; + } + + + /** + * Return the arguments for the embedded connection. + * + * @return property map + */ + public Map getArguments() + { + if (arguments == null) + { + return null; + } + else if (arguments.isEmpty()) + { + return null; + } + else + { + return new HashMap<>(arguments); + } + } + + + /** + * Set up the arguments for the embedded connection. + * + * @param arguments property map + */ + public void setArguments(Map arguments) + { + this.arguments = arguments; + } + + + + + /** + * Standard toString method. + * + * @return print out of variables in a JSON-style + */ + @Override + public String toString() + { + return "EmbeddedConnection{" + + "position=" + position + + ", displayName='" + displayName + '\'' + + ", arguments=" + arguments + + '}'; + } + + + /** + * Compare the values of the supplied object with those stored in the current object. + * + * @param objectToCompare supplied object + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + EmbeddedConnectionRequestBody that = (EmbeddedConnectionRequestBody) objectToCompare; + return position == that.position && + Objects.equals(displayName, that.displayName) && + Objects.equals(arguments, that.arguments); + } + + + /** + * Create a hash code for this element type. + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(position, displayName, arguments); + } +} \ No newline at end of file diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/EndpointRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/EndpointRequestBody.java new file mode 100644 index 00000000000..db66630b8b4 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/EndpointRequestBody.java @@ -0,0 +1,170 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.EndpointProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * EndpointRequestBody carries the parameters for describing an endpoint. + * The external source identifiers are used if the endpoint was created using the external source identifiers. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class EndpointRequestBody extends EndpointProperties +{ + private String externalSourceGUID = null; + private String externalSourceName = null; + + + /** + * Default constructor + */ + public EndpointRequestBody() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public EndpointRequestBody(EndpointRequestBody template) + { + super(template); + + if (template != null) + { + externalSourceGUID = template.getExternalSourceGUID(); + externalSourceName = template.getExternalSourceName(); + } + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public EndpointRequestBody(EndpointProperties template) + { + super(template); + } + + + /** + * Return the unique identifier of the software server capability entity that represented the external source - null for local. + * + * @return string guid + */ + public String getExternalSourceGUID() + { + return externalSourceGUID; + } + + + /** + * Set up the unique identifier of the software server capability entity that represented the external source - null for local. + * + * @param externalSourceGUID string guid + */ + public void setExternalSourceGUID(String externalSourceGUID) + { + this.externalSourceGUID = externalSourceGUID; + } + + + /** + * Return the unique name of the software server capability entity that represented the external source. + * + * @return string name + */ + public String getExternalSourceName() + { + return externalSourceName; + } + + + /** + * Set up the unique name of the software server capability entity that represented the external source. + * + * @param externalSourceName string name + */ + public void setExternalSourceName(String externalSourceName) + { + this.externalSourceName = externalSourceName; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "EndpointRequestBody{" + + "externalSourceGUID='" + externalSourceGUID + '\'' + + ", externalSourceName='" + externalSourceName + '\'' + + ", name='" + getName() + '\'' + + ", description='" + getResourceDescription() + '\'' + + ", address='" + getAddress() + '\'' + + ", protocol='" + getProtocol() + '\'' + + ", encryptionMethod='" + getEncryptionMethod() + '\'' + + ", qualifiedName='" + getQualifiedName() + '\'' + + ", additionalProperties=" + getAdditionalProperties() + + ", vendorProperties=" + getVendorProperties() + + ", typeName='" + getTypeName() + '\'' + + ", extendedProperties=" + getExtendedProperties() + + '}'; + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + EndpointRequestBody that = (EndpointRequestBody) objectToCompare; + return Objects.equals(externalSourceGUID, that.externalSourceGUID) && + Objects.equals(externalSourceName, that.externalSourceName); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), externalSourceGUID, externalSourceName); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/EndpointResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/EndpointResponse.java new file mode 100644 index 00000000000..bca420b0444 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/EndpointResponse.java @@ -0,0 +1,123 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.EndpointElement; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * EndpointResponse is a response object for passing back a single endpoint object. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class EndpointResponse extends FFDCResponseBase +{ + private EndpointElement element = null; + + + /** + * Default constructor + */ + public EndpointResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public EndpointResponse(EndpointResponse template) + { + super(template); + + if (template != null) + { + element = template.getElement(); + } + } + + + /** + * Return the metadata element. + * + * @return result object + */ + public EndpointElement getElement() + { + return element; + } + + + /** + * Set up the metadata element to return. + * + * @param element result object + */ + public void setElement(EndpointElement element) + { + this.element = element; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "EndpointResponse{" + + "element=" + element + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + EndpointResponse that = (EndpointResponse) objectToCompare; + return Objects.equals(element, that.element); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), element); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/EndpointsResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/EndpointsResponse.java new file mode 100644 index 00000000000..459748c902a --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/EndpointsResponse.java @@ -0,0 +1,124 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.EndpointElement; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * EndpointsResponse is a response object for passing back a list of endpoint objects. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class EndpointsResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public EndpointsResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public EndpointsResponse(EndpointsResponse template) + { + super(template); + + if (template != null) + { + elements = template.getElements(); + } + } + + + /** + * Return the list of metadata elements. + * + * @return result object + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the list of metadata elements to return. + * + * @param elements result object + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "EndpointsResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + EndpointsResponse that = (EndpointsResponse) objectToCompare; + return Objects.equals(elements, that.elements); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elements); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/EnumSchemaTypeRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/EnumSchemaTypeRequestBody.java new file mode 100644 index 00000000000..1cb3df248ee --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/EnumSchemaTypeRequestBody.java @@ -0,0 +1,163 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.EnumSchemaTypeProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * EnumSchemaTypeRequestBody describes the properties of the schema type plus the optional identifiers for an + * owning software server capability. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class EnumSchemaTypeRequestBody extends EnumSchemaTypeProperties +{ + private String externalSourceGUID = null; + private String externalSourceName = null; + + + /** + * Default constructor + */ + public EnumSchemaTypeRequestBody() + { + super(); + } + + + /** + * Copy/clone constructor. + * + * @param template object to copy + */ + public EnumSchemaTypeRequestBody(EnumSchemaTypeRequestBody template) + { + super(template); + + if (template != null) + { + externalSourceGUID = template.getExternalSourceGUID(); + externalSourceName = template.getExternalSourceName(); + } + } + + + /** + * Copy/clone constructor. + * + * @param template object to copy + */ + public EnumSchemaTypeRequestBody(EnumSchemaTypeProperties template) + { + super(template); + } + + + /** + * Return the unique identifier of the software server capability entity that represented the external source - null for local. + * + * @return string guid + */ + public String getExternalSourceGUID() + { + return externalSourceGUID; + } + + + /** + * Set up the unique identifier of the software server capability entity that represented the external source - null for local. + * + * @param externalSourceGUID string guid + */ + public void setExternalSourceGUID(String externalSourceGUID) + { + this.externalSourceGUID = externalSourceGUID; + } + + + /** + * Return the unique name of the software server capability entity that represented the external source. + * + * @return string name + */ + public String getExternalSourceName() + { + return externalSourceName; + } + + + /** + * Set up the unique name of the software server capability entity that represented the external source. + * + * @param externalSourceName string name + */ + public void setExternalSourceName(String externalSourceName) + { + this.externalSourceName = externalSourceName; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "EnumSchemaTypeRequestBody{" + + "externalSourceGUID='" + externalSourceGUID + '\'' + + ", externalSourceName='" + externalSourceName + '\'' + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + EnumSchemaTypeRequestBody that = (EnumSchemaTypeRequestBody) objectToCompare; + return Objects.equals(externalSourceGUID, that.externalSourceGUID) && + Objects.equals(externalSourceName, that.externalSourceName); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), externalSourceGUID, externalSourceName); + } +} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/EventBrokerRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/EventBrokerRequestBody.java similarity index 82% rename from open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/EventBrokerRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/EventBrokerRequestBody.java index 815a139ddd4..ada417a9215 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/EventBrokerRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/EventBrokerRequestBody.java @@ -1,12 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.properties.EventBrokerProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities.EventBrokerProperties; import java.util.Objects; @@ -117,18 +117,7 @@ public String toString() return "EventBrokerRequestBody{" + "externalSourceGUID='" + externalSourceGUID + '\'' + ", externalSourceName='" + externalSourceName + '\'' + - ", displayName='" + getDisplayName() + '\'' + - ", description='" + getDescription() + '\'' + - ", typeDescription='" + getDeployedImplementationType() + '\'' + - ", version='" + getVersion() + '\'' + - ", patchLevel='" + getPatchLevel() + '\'' + - ", source='" + getSource() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; + "} " + super.toString(); } diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/EventTypeRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/EventTypeRequestBody.java similarity index 76% rename from open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/EventTypeRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/EventTypeRequestBody.java index f9499225dc6..15d45991056 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/EventTypeRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/EventTypeRequestBody.java @@ -1,12 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.properties.EventTypeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.events.EventTypeProperties; import java.util.Objects; @@ -117,22 +117,9 @@ public void setExternalSourceName(String externalSourceName) public String toString() { return "EventTypeRequestBody{" + - "externalSourceGUID='" + externalSourceGUID + '\'' + - ", externalSourceName='" + externalSourceName + '\'' + - ", versionNumber='" + getVersionNumber() + '\'' + - ", author='" + getAuthor() + '\'' + - ", usage='" + getUsage() + '\'' + - ", encodingStandard='" + getEncodingStandard() + '\'' + - ", namespace='" + getNamespace() + '\'' + - ", isDeprecated=" + getIsDeprecated() + - ", displayName='" + getDisplayName() + '\'' + - ", description='" + getDescription() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; + "externalSourceGUID='" + externalSourceGUID + '\'' + + ", externalSourceName='" + externalSourceName + '\'' + + "} " + super.toString(); } diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/EventTypeResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/EventTypeResponse.java new file mode 100644 index 00000000000..101d5ade8ae --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/EventTypeResponse.java @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.EventTypeElement; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * EventTypeResponse is a response object for passing back a single EventType + * element or an exception if the request failed. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class EventTypeResponse extends FFDCResponseBase +{ + private EventTypeElement element = null; + + + /** + * Default constructor + */ + public EventTypeResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public EventTypeResponse(EventTypeResponse template) + { + super(template); + + if (template != null) + { + element = template.getElement(); + } + } + + + /** + * Return the metadata element. + * + * @return result object + */ + public EventTypeElement getElement() + { + return element; + } + + + /** + * Set up the metadata element to return. + * + * @param element result object + */ + public void setElement(EventTypeElement element) + { + this.element = element; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "EventTypeResponse{" + + "element=" + element + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + EventTypeResponse that = (EventTypeResponse) objectToCompare; + return Objects.equals(element, that.element); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), element); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/EventTypesResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/EventTypesResponse.java new file mode 100644 index 00000000000..257bd98a704 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/EventTypesResponse.java @@ -0,0 +1,126 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.EventTypeElement; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * EventTypesResponse is a response object for passing back a a list of EventTypes + * or an exception if the request failed. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class EventTypesResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public EventTypesResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public EventTypesResponse(EventTypesResponse template) + { + super(template); + + if (template != null) + { + elements = template.getElements(); + } + } + + + /** + * Return the list of metadata elements. + * + * @return result object + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the metadata element to return. + * + * @param elements result object + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "EventTypesResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + EventTypesResponse that = (EventTypesResponse) objectToCompare; + return Objects.equals(elements, that.elements); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elements); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ExternalReferenceIdRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ExternalReferenceIdRequestBody.java new file mode 100644 index 00000000000..86176c4c46e --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ExternalReferenceIdRequestBody.java @@ -0,0 +1,116 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * ExternalReferenceIdRequestBody provides a structure for the unique external reference identifier. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ExternalReferenceIdRequestBody +{ + private String referenceId = null; + + + /** + * Default constructor + */ + public ExternalReferenceIdRequestBody() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public ExternalReferenceIdRequestBody(ExternalReferenceIdRequestBody template) + { + if (template != null) + { + this.referenceId = template.getReferenceId(); + } + } + + + /** + * Return the unique identifier for the certificate from the certificate authority. + * + * @return String identifier + */ + public String getReferenceId() + { + return referenceId; + } + + + /** + * Set up the unique identifier for the certificate from the certificate authority. + * + * @param referenceId String identifier + */ + public void setReferenceId(String referenceId) + { + this.referenceId = referenceId; + } + + + + /** + * JSON-style toString. + * + * @return list of properties and their values. + */ + @Override + public String toString() + { + return "CertificateIdRequestBody{" + + "referenceId='" + referenceId + '\'' + + '}'; + } + + + /** + * Equals method that returns true if containing properties are the same. + * + * @param objectToCompare object to compare + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + ExternalReferenceIdRequestBody that = (ExternalReferenceIdRequestBody) objectToCompare; + return Objects.equals(referenceId, that.referenceId); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(referenceId); + } +} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/ExternalReferenceLinkRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ExternalReferenceLinkRequestBody.java similarity index 95% rename from open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/ExternalReferenceLinkRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ExternalReferenceLinkRequestBody.java index fac77255a1f..10650b36d64 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/ExternalReferenceLinkRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ExternalReferenceLinkRequestBody.java @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; @@ -20,7 +20,7 @@ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) -public class ExternalReferenceLinkRequestBody extends DataManagerOMASAPIRequestBody +public class ExternalReferenceLinkRequestBody { private String linkId = null; private String linkDescription = null; @@ -42,8 +42,6 @@ public ExternalReferenceLinkRequestBody() */ public ExternalReferenceLinkRequestBody(ExternalReferenceLinkRequestBody template) { - super(template); - if (template != null) { linkId = template.getLinkId(); diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ExternalReferenceRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ExternalReferenceRequestBody.java new file mode 100644 index 00000000000..9b7338eba52 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ExternalReferenceRequestBody.java @@ -0,0 +1,142 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.externalreferences.ExternalReferenceProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * ExternalReferenceRequestBody provides a structure for a new ExternalReference. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ExternalReferenceRequestBody +{ + private String anchorGUID = null; + private ExternalReferenceProperties properties = null; + + + /** + * Default constructor + */ + public ExternalReferenceRequestBody() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public ExternalReferenceRequestBody(ExternalReferenceRequestBody template) + { + if (template != null) + { + this.anchorGUID = template.getAnchorGUID(); + this.properties = template.getProperties(); + } + } + + + /** + * Return the optional anchor unique identifier. + * + * @return String guid + */ + public String getAnchorGUID() + { + return anchorGUID; + } + + + /** + * Set up the optional anchor unique identifier. + * + * @param guid String guid + */ + public void setAnchorGUID(String guid) + { + this.anchorGUID = guid; + } + + + /** + * Return the properties for this external reference. + * + * @return date + */ + public ExternalReferenceProperties getProperties() + { + return properties; + } + + + /** + * Set up the properties for this external reference. + * + * @param properties date + */ + public void setProperties(ExternalReferenceProperties properties) + { + this.properties = properties; + } + + + /** + * JSON-style toString. + * + * @return list of properties and their values. + */ + @Override + public String toString() + { + return "ExternalReferenceRequestBody{" + + "anchorGUID='" + anchorGUID + '\'' + + ", properties=" + properties + + '}'; + } + + + /** + * Equals method that returns true if containing properties are the same. + * + * @param objectToCompare object to compare + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + ExternalReferenceRequestBody that = (ExternalReferenceRequestBody) objectToCompare; + return Objects.equals(anchorGUID, that.anchorGUID) && + Objects.equals(properties, that.properties); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(anchorGUID, properties); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ExternalReferenceResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ExternalReferenceResponse.java new file mode 100644 index 00000000000..a41060c1252 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ExternalReferenceResponse.java @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ExternalReferenceElement; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * ExternalReferenceResponse is the response structure used on the OMAS REST API calls that returns a + * external reference object as a response. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ExternalReferenceResponse extends FFDCResponseBase +{ + private ExternalReferenceElement element = null; + + + /** + * Default constructor + */ + public ExternalReferenceResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public ExternalReferenceResponse(ExternalReferenceResponse template) + { + super(template); + + if (template != null) + { + this.element = template.getElement(); + } + } + + + /** + * Return the element result. + * + * @return external reference object + */ + public ExternalReferenceElement getElement() + { + return element; + } + + + /** + * Set up the element result. + * + * @param element external reference object + */ + public void setElement(ExternalReferenceElement element) + { + this.element = element; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "ExternalReferenceResponse{" + + "element=" + element + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof ExternalReferenceResponse)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + ExternalReferenceResponse that = (ExternalReferenceResponse) objectToCompare; + return Objects.equals(element, that.element); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), element); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ExternalReferencesResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ExternalReferencesResponse.java new file mode 100644 index 00000000000..13bb9b863ca --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ExternalReferencesResponse.java @@ -0,0 +1,126 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ExternalReferenceElement; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * ExternalReferencesResponse is the response structure used on the OMAS REST API calls that return a + * list of external references as a response. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ExternalReferencesResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public ExternalReferencesResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public ExternalReferencesResponse(ExternalReferencesResponse template) + { + super(template); + + if (template != null) + { + this.elements = template.getElements(); + } + } + + + /** + * Return the list of external references. + * + * @return list of objects or null + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the list of external references. + * + * @param elements - list of objects or null + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "ExternalReferencesResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof ExternalReferencesResponse)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + ExternalReferencesResponse that = (ExternalReferencesResponse) objectToCompare; + return Objects.equals(this.getElements(), that.getElements()); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(elements, super.hashCode()); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ExternalSourceRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ExternalSourceRequestBody.java new file mode 100644 index 00000000000..06fb74da8a7 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ExternalSourceRequestBody.java @@ -0,0 +1,141 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * ExternalSourceRequestBody carries the parameters for marking an asset or schema as external. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ExternalSourceRequestBody +{ + private String externalSourceGUID = null; + private String externalSourceName = null; + + + /** + * Default constructor + */ + public ExternalSourceRequestBody() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public ExternalSourceRequestBody(ExternalSourceRequestBody template) + { + if (template != null) + { + externalSourceGUID = template.getExternalSourceGUID(); + externalSourceName = template.getExternalSourceName(); + } + } + + + /** + * Return the unique identifier of the software server capability entity that represented the external source - null for local. + * + * @return string guid + */ + public String getExternalSourceGUID() + { + return externalSourceGUID; + } + + + /** + * Set up the unique identifier of the software server capability entity that represented the external source - null for local. + * + * @param externalSourceGUID string guid + */ + public void setExternalSourceGUID(String externalSourceGUID) + { + this.externalSourceGUID = externalSourceGUID; + } + + + /** + * Return the unique name of the software server capability entity that represented the external source. + * + * @return string name + */ + public String getExternalSourceName() + { + return externalSourceName; + } + + + /** + * Set up the unique name of the software server capability entity that represented the external source. + * + * @param externalSourceName string name + */ + public void setExternalSourceName(String externalSourceName) + { + this.externalSourceName = externalSourceName; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "ExternalSourceRequestBody{" + + "externalSourceGUID='" + externalSourceGUID + '\'' + + ", externalSourceName='" + externalSourceName + '\'' + + '}'; + } + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + ExternalSourceRequestBody that = (ExternalSourceRequestBody) objectToCompare; + return Objects.equals(externalSourceGUID, that.externalSourceGUID) && + Objects.equals(externalSourceName, that.externalSourceName); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(externalSourceGUID, externalSourceName); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/FFDCRESTClient.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/FFDCRESTClient.java index 0dca5cb7990..3b4a446d04f 100644 --- a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/FFDCRESTClient.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/FFDCRESTClient.java @@ -367,31 +367,4419 @@ public CountResponse callCountGetRESTCall(String methodName, } + + + /** + * Issue a GET REST call that returns a ConnectionResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. + * @param params a list of parameters that are slotted into the url template. + * + * @return OCFConnectionResponse + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public ConnectionResponse callConnectionGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + ConnectionResponse restResult = this.callGetRESTCall(methodName, ConnectionResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a POST REST call that returns a ConnectionsResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. + * @param params a list of parameters that are slotted into the url template. + * + * @return ConnectionsResponse + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public ConnectionsResponse callConnectionsGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + ConnectionsResponse restResult = this.callGetRESTCall(methodName, ConnectionsResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + + /** + * Issue a POST REST call that returns a ConnectionsResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. + * @param requestBody properties describing the valid value definition/set + * @param params a list of parameters that are slotted into the url template. + * + * @return ConnectionsResponse + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public ConnectionsResponse callConnectionsPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + ConnectionsResponse restResult = this.callPostRESTCall(methodName, ConnectionsResponse.class, urlTemplate, requestBody, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + /** * Issue a GET REST call that returns a ConnectorReportResponse object. * * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. + * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. * @param params a list of parameters that are slotted into the url template. * * @return ConnectorReportResponse * @throws InvalidParameterException one of the parameters is invalid. * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException something went wrong with the REST call stack. + * @throws PropertyServerException the repository is not available or not working properly. */ - public ConnectorReportResponse callOCFConnectorReportGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, + public ConnectorTypeResponse callConnectorTypeGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + ConnectorTypeResponse restResult = this.callGetRESTCall(methodName, ConnectorTypeResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a POST REST call that returns a ConnectorTypesResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. + * @param requestBody properties describing the valid value definition/set + * @param params a list of parameters that are slotted into the url template. + * + * @return ConnectorTypesResponse + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public ConnectorTypesResponse callConnectorTypesPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - ConnectorReportResponse restResult = this.callGetRESTCall(methodName, - ConnectorReportResponse.class, - urlTemplate, - params); + ConnectorTypesResponse restResult = this.callPostRESTCall(methodName, ConnectorTypesResponse.class, urlTemplate, requestBody, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a GET REST call that returns a EndpointResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. + * @param params a list of parameters that are slotted into the url template. + * + * @return EndpointResponse + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public EndpointResponse callEndpointGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + EndpointResponse restResult = this.callGetRESTCall(methodName, EndpointResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a GET REST call that returns a EndpointsResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. + * @param params a list of parameters that are slotted into the url template. + * + * @return EndpointsResponse + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public EndpointsResponse callEndpointsGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + EndpointsResponse restResult = this.callGetRESTCall(methodName, EndpointsResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a POST REST call that returns a EndpointsResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. + * @param requestBody properties describing the valid value definition/set + * @param params a list of parameters that are slotted into the url template. + * + * @return EndpointsResponse + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public EndpointsResponse callEndpointsPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + EndpointsResponse restResult = this.callPostRESTCall(methodName, EndpointsResponse.class, urlTemplate, requestBody, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a GET REST call that returns a FileSystemResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. + * @param params a list of parameters that are slotted into the url template. + * + * @return FileSystemResponse + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public FileSystemResponse callFileSystemGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + FileSystemResponse restResult = this.callGetRESTCall(methodName, FileSystemResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a GET REST call that returns a FolderResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. + * @param params a list of parameters that are slotted into the url template. + * + * @return FolderResponse + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public FolderResponse callFolderGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + FolderResponse restResult = this.callGetRESTCall(methodName, FolderResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + + /** + * Issue a GET REST call that returns a ProjectElement in a response object. + * + * @param methodName name of the method being called. + * @param urlTemplate REST API call URL template with place-holders for the parameters. + * @param params a list of parameters that are slotted into the url template. + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException something went wrong with the REST call stack. + */ + public ProjectResponse callProjectGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + ProjectResponse restResult = this.callGetRESTCall(methodName, ProjectResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a GET REST call that returns a list of ProjectElements in a response object. + * + * @param methodName name of the method being called + * @param urlTemplate REST API call URL template with place-holders for the parameters + * @param params a list of parameters that are slotted into the url template + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException something went wrong with the REST call stack. + */ + public ProjectsResponse callProjectsGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + ProjectsResponse restResult = this.callGetRESTCall(methodName, ProjectsResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a GET REST call that returns a list of ProjectElements in a response object. + * + * @param methodName name of the method being called + * @param urlTemplate REST API call URL template with place-holders for the parameters + * @param requestBody request body for the request + * @param params a list of parameters that are slotted into the url template + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException something went wrong with the REST call stack. + */ + public ProjectsResponse callProjectsPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + ProjectsResponse restResult = this.callPostRESTCall(methodName, ProjectsResponse.class, urlTemplate, requestBody, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + + + /** + * Issue a GET REST call that returns a MetadataSourceResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate REST API call URL template with place-holders for the parameters. + * @param params a list of parameters that are slotted into the url template. + * + * @return MetadataSourceResponse + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException something went wrong with the REST call stack. + */ + public MetadataSourceResponse callMetadataSourceGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + MetadataSourceResponse restResult = this.callGetRESTCall(methodName, MetadataSourceResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + /** + * Issue a GET REST call that returns a CollectionElement in a response object. + * + * @param methodName name of the method being called. + * @param urlTemplate REST API call URL template with place-holders for the parameters. + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException something went wrong with the REST call stack. + */ + public CollectionResponse callCollectionGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + CollectionResponse restResult = this.callGetRESTCall(methodName, CollectionResponse.class, urlTemplate, params); exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); return restResult; } + + + /** + * Issue a GET REST call that returns a list of CollectionElements in a response object. + * + * @param methodName name of the method being called + * @param urlTemplate REST API call URL template with place-holders for the parameters + * @param params a list of parameters that are slotted into the url template + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException something went wrong with the REST call stack. + */ + public CollectionsResponse callCollectionListGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + CollectionsResponse restResult = this.callGetRESTCall(methodName, CollectionsResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a GET REST call that returns a list of CollectionMembers in a response object. + * + * @param methodName name of the method being called + * @param urlTemplate REST API call URL template with place-holders for the parameters + * @param params a list of parameters that are slotted into the url template + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException something went wrong with the REST call stack. + */ + public CollectionMembersResponse callCollectionMemberListGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + CollectionMembersResponse restResult = this.callGetRESTCall(methodName, CollectionMembersResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a GET REST call that returns a CollectionMember in a response object. + * + * @param methodName name of the method being called. + * @param urlTemplate REST API call URL template with place-holders for the parameters. + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException something went wrong with the REST call stack. + */ + public CollectionMemberResponse callCollectionMemberGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + CollectionMemberResponse restResult = this.callGetRESTCall(methodName, CollectionMemberResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + /** + * Issue a GET REST call that returns a list of CollectionElements in a response object. + * + * @param methodName name of the method being called + * @param urlTemplate REST API call URL template with place-holders for the parameters + * @param requestBody request body for the request + * @param params a list of parameters that are slotted into the url template + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException something went wrong with the REST call stack. + */ + public CollectionsResponse callCollectionListPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + CollectionsResponse restResult = this.callPostRESTCall(methodName, CollectionsResponse.class, urlTemplate, requestBody, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + /** + * Issue a GET REST call that returns a DatabaseColumnResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public DatabaseColumnResponse callDatabaseColumnGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + DatabaseColumnResponse restResult = this.callGetRESTCall(methodName, DatabaseColumnResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a GET REST call that returns a DatabaseColumnsResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public DatabaseColumnsResponse callDatabaseColumnsGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + DatabaseColumnsResponse restResult = this.callGetRESTCall(methodName, DatabaseColumnsResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a POST REST call that returns a DatabaseColumnsResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. + * @param requestBody object that passes additional parameters + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public DatabaseColumnsResponse callDatabaseColumnsPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + DatabaseColumnsResponse restResult = this.callPostRESTCall(methodName, DatabaseColumnsResponse.class, urlTemplate, requestBody, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a GET REST call that returns a DatabaseResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public DatabaseResponse callDatabaseGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + DatabaseResponse restResult = this.callGetRESTCall(methodName, DatabaseResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a GET REST call that returns a DatabasesResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. + * @param requestBody object that passes additional parameters + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public DatabasesResponse callDatabasesPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + DatabasesResponse restResult = this.callPostRESTCall(methodName, DatabasesResponse.class, urlTemplate, requestBody, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a GET REST call that returns a DatabaseSchemaResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public DatabaseSchemaResponse callDatabaseSchemaGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + DatabaseSchemaResponse restResult = this.callGetRESTCall(methodName, DatabaseSchemaResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a GET REST call that returns a DatabaseSchemasResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public DatabaseSchemasResponse callDatabaseSchemasGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + DatabaseSchemasResponse restResult = this.callGetRESTCall(methodName, DatabaseSchemasResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a POST REST call that returns a DatabaseSchemasResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. + * @param requestBody object that passes additional parameters + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public DatabaseSchemasResponse callDatabaseSchemasPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + DatabaseSchemasResponse restResult = this.callPostRESTCall(methodName, DatabaseSchemasResponse.class, urlTemplate, requestBody, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a GET REST call that returns a DatabaseTableResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public DatabaseTableResponse callDatabaseTableGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + DatabaseTableResponse restResult = this.callGetRESTCall(methodName, DatabaseTableResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a GET REST call that returns a DatabaseTablesResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public DatabaseTablesResponse callDatabaseTablesGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + DatabaseTablesResponse restResult = this.callGetRESTCall(methodName, DatabaseTablesResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a POST REST call that returns a DatabaseTablesResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. + * @param requestBody object that passes additional parameters + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public DatabaseTablesResponse callDatabaseTablesPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + DatabaseTablesResponse restResult = this.callPostRESTCall(methodName, DatabaseTablesResponse.class, urlTemplate, requestBody, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a GET REST call that returns a DatabaseViewResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public DatabaseViewResponse callDatabaseViewGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + DatabaseViewResponse restResult = this.callGetRESTCall(methodName, DatabaseViewResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a GET REST call that returns a DatabaseViewsResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public DatabaseViewsResponse callDatabaseViewsGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + DatabaseViewsResponse restResult = this.callGetRESTCall(methodName, DatabaseViewsResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a POST REST call that returns a DatabaseViewsResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. + * @param requestBody object that passes additional parameters + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public DatabaseViewsResponse callDatabaseViewsPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + DatabaseViewsResponse restResult = this.callPostRESTCall(methodName, DatabaseViewsResponse.class, urlTemplate, requestBody, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a GET REST call that returns a DataContainerResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public DataContainerResponse callDataContainerGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + DataContainerResponse restResult = this.callGetRESTCall(methodName,DataContainerResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a GET REST call that returns a DataContainersResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public DataContainersResponse callDataContainersGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + DataContainersResponse restResult = this.callGetRESTCall(methodName, DataContainersResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + + /** + * Issue a POST REST call that returns a DataContainersResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. + * @param requestBody object that passes additional parameters + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public DataContainersResponse callDataContainersPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + DataContainersResponse restResult = this.callPostRESTCall(methodName, DataContainersResponse.class, urlTemplate, requestBody, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a GET REST call that returns a DataFileResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public DataFileResponse callDataFileGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + DataFileResponse restResult = this.callGetRESTCall(methodName, DataFileResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a POST REST call that returns a DataFileResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. + * @param requestBody object that passes additional parameters + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public DataFileResponse callDataFilePostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + DataFileResponse restResult = this.callPostRESTCall(methodName, DataFileResponse.class, urlTemplate, requestBody, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a GET REST call that returns a DataFilesResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public DataFilesResponse callDataFilesGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + DataFilesResponse restResult = this.callGetRESTCall(methodName, DataFilesResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a POST REST call that returns a DataFilesResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. + * @param requestBody object that passes additional parameters + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public DataFilesResponse callDataFilesPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + DataFilesResponse restResult = this.callPostRESTCall(methodName, DataFilesResponse.class, urlTemplate, requestBody, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a GET REST call that returns a FileFolderResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public FileFolderResponse callFileFolderGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + FileFolderResponse restResult = this.callGetRESTCall(methodName, FileFolderResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a POST REST call that returns a FileFolderResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. + * @param requestBody object that passes additional parameters + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public FileFolderResponse callFileFolderPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + FileFolderResponse restResult = this.callPostRESTCall(methodName, FileFolderResponse.class, urlTemplate, requestBody, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a GET REST call that returns a FileFoldersResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public FileFoldersResponse callFileFoldersGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + FileFoldersResponse restResult = this.callGetRESTCall(methodName, FileFoldersResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a GET REST call that returns a FormResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public FormResponse callFormGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + FormResponse restResult = this.callGetRESTCall(methodName, FormResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a GET REST call that returns a FormsResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public FormsResponse callFormsGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + FormsResponse restResult = this.callGetRESTCall(methodName, FormsResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a POST REST call that returns a FormsResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. + * @param requestBody object that passes additional parameters + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public FormsResponse callFormsPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + FormsResponse restResult = this.callPostRESTCall(methodName, FormsResponse.class, urlTemplate, requestBody, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a GET REST call that returns a QueryResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public QueryResponse callQueryGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + QueryResponse restResult = this.callGetRESTCall(methodName, QueryResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a GET REST call that returns a QueriesResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public QueriesResponse callQueriesGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + QueriesResponse restResult = this.callGetRESTCall(methodName, QueriesResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + + /** + * Issue a POST REST call that returns a QueriesResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. + * @param requestBody object that passes additional parameters + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public QueriesResponse callQueriesPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + QueriesResponse restResult = this.callPostRESTCall(methodName, QueriesResponse.class, urlTemplate, requestBody, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + + /** + * Issue a GET REST call that returns a ReportResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public ReportResponse callReportGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + ReportResponse restResult = this.callGetRESTCall(methodName, ReportResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a GET REST call that returns a ReportsResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public ReportsResponse callReportsGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + ReportsResponse restResult = this.callGetRESTCall(methodName, ReportsResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + + /** + * Issue a POST REST call that returns a ReportsResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. + * @param requestBody object that passes additional parameters + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public ReportsResponse callReportsPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + ReportsResponse restResult = this.callPostRESTCall(methodName, ReportsResponse.class, urlTemplate, requestBody, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a GET REST call that returns a TopicResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public TopicResponse callTopicGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + TopicResponse restResult = this.callGetRESTCall(methodName, TopicResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a GET REST call that returns a TopicsResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public TopicsResponse callTopicsGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + TopicsResponse restResult = this.callGetRESTCall(methodName, TopicsResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a POST REST call that returns a TopicsResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. + * @param requestBody object that passes additional parameters + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public TopicsResponse callTopicsPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + TopicsResponse restResult = this.callPostRESTCall(methodName, TopicsResponse.class, urlTemplate, requestBody, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a GET REST call that returns a EventTypeResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public EventTypeResponse callEventTypeGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + EventTypeResponse restResult = this.callGetRESTCall(methodName, EventTypeResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a GET REST call that returns a EventTypesResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public EventTypesResponse callEventTypesGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + EventTypesResponse restResult = this.callGetRESTCall(methodName, EventTypesResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + + /** + * Issue a POST REST call that returns a EventTypesResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. + * @param requestBody object that passes additional parameters + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public EventTypesResponse callEventTypesPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + EventTypesResponse restResult = this.callPostRESTCall(methodName, EventTypesResponse.class, urlTemplate, requestBody, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a GET REST call that returns a APIResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public APIResponse callAPIGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + APIResponse restResult = this.callGetRESTCall(methodName, APIResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a GET REST call that returns a APIsResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public APIsResponse callAPIsGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + APIsResponse restResult = this.callGetRESTCall(methodName, APIsResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + + /** + * Issue a POST REST call that returns a APIsResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. + * @param requestBody request body for the request. + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public APIsResponse callAPIsPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + APIsResponse restResult = this.callPostRESTCall(methodName, APIsResponse.class, urlTemplate, requestBody, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a GET REST call that returns a APIOperationResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public APIOperationResponse callAPIOperationGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + APIOperationResponse restResult = this.callGetRESTCall(methodName, APIOperationResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a GET REST call that returns a APIOperationsResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public APIOperationsResponse callAPIOperationsGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + APIOperationsResponse restResult = this.callGetRESTCall(methodName, APIOperationsResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + + /** + * Issue a POST REST call that returns a APIOperationsResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. + * @param requestBody request body for the request. + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public APIOperationsResponse callAPIOperationsPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + APIOperationsResponse restResult = this.callPostRESTCall(methodName, APIOperationsResponse.class, urlTemplate, requestBody, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a GET REST call that returns a APIParametersResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public APIParametersResponse callAPIParametersGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + APIParametersResponse restResult = this.callGetRESTCall(methodName, APIParametersResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a GET REST call that returns a APIParameterListsResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public APIParameterListsResponse callAPIParameterListsGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + APIParameterListsResponse restResult = this.callGetRESTCall(methodName, APIParameterListsResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a GET REST call that returns a APIParameterListsResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public APIParameterListResponse callAPIParameterListGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + APIParameterListResponse restResult = this.callGetRESTCall(methodName, APIParameterListResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + + + + /** + * Issue a GET REST call that returns a APIParameterListsResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. + * @param requestBody request body for the request. + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public APIParameterListsResponse callAPIParameterListsPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + APIParameterListsResponse restResult = this.callPostRESTCall(methodName, APIParameterListsResponse.class, urlTemplate, requestBody, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a GET REST call that returns a SchemaAttributeResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public SchemaAttributeResponse callSchemaAttributeGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + SchemaAttributeResponse restResult = this.callGetRESTCall(methodName, SchemaAttributeResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a GET REST call that returns a SchemaAttributesResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public SchemaAttributesResponse callSchemaAttributesGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + SchemaAttributesResponse restResult = this.callGetRESTCall(methodName, SchemaAttributesResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a GET REST call that returns a SchemaTypeResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public SchemaTypeResponse callSchemaTypeGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + SchemaTypeResponse restResult = this.callGetRESTCall(methodName, SchemaTypeResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a POST REST call that returns a ValidValueSetsResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. + * @param requestBody object that passes additional parameters + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public ValidValueSetsResponse callValidValueSetsPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + ValidValueSetsResponse restResult = this.callGetRESTCall(methodName, ValidValueSetsResponse.class, urlTemplate, requestBody, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + /** + * Issue a GET REST call that returns a ValidValuesResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. + * @param params a list of parameters that are slotted into the url template. + * + * @return ValidValueResponse + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public ValidValueResponse callValidValueGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + ValidValueResponse restResult = this.callGetRESTCall(methodName, ValidValueResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + + + /** + * Issue a GET REST call that returns a list of ValidValueElements in a response object. + * + * @param methodName name of the method being called + * @param urlTemplate REST API call URL template with place-holders for the parameters + * @param params a list of parameters that are slotted into the url template + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException something went wrong with the REST call stack. + */ + public ValidValuesResponse callValidValueListGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + ValidValuesResponse restResult = this.callGetRESTCall(methodName, ValidValuesResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a GET REST call that returns a list of ValidValueElements in a response object. + * + * @param methodName name of the method being called + * @param urlTemplate REST API call URL template with place-holders for the parameters + * @param requestBody request body for the request + * @param params a list of parameters that are slotted into the url template + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException something went wrong with the REST call stack. + */ + public ValidValuesResponse callValidValueListPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + ValidValuesResponse restResult = this.callPostRESTCall(methodName, ValidValuesResponse.class, urlTemplate, requestBody, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + /** + * Issue a GET REST call that returns a ValidValuesResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. + * @param params a list of parameters that are slotted into the url template. + * + * @return ValidValuesResponse + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public ValidValuesResponse callValidValuesGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + ValidValuesResponse restResult = this.callGetRESTCall(methodName, ValidValuesResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a POST REST call that returns a ValidValuesResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. + * @param requestBody additional parameters + * @param params a list of parameters that are slotted into the url template. + * + * @return ValidValuesResponse + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public ValidValuesResponse callValidValuesPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + ValidValuesResponse restResult = this.callPostRESTCall(methodName, ValidValuesResponse.class, urlTemplate, requestBody, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + + /** + * Issue a GET REST call that returns a ValidValueAssignmentConsumersResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. + * @param params a list of parameters that are slotted into the url template. + * + * @return ValidValueAssignmentConsumersResponse + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public ValidValueAssignmentConsumersResponse callValidValueAssignmentConsumersGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + ValidValueAssignmentConsumersResponse restResult = this.callGetRESTCall(methodName, + ValidValueAssignmentConsumersResponse.class, + urlTemplate, + params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a GET REST call that returns a ValidValueAssignmentDefinitionsResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. + * @param params a list of parameters that are slotted into the url template. + * + * @return ValidValueAssignmentConsumersResponse + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public ValidValueAssignmentDefinitionsResponse callValidValueAssignmentDefinitionsGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + ValidValueAssignmentDefinitionsResponse restResult = this.callGetRESTCall(methodName, + ValidValueAssignmentDefinitionsResponse.class, + urlTemplate, + params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a GET REST call that returns a ValidValuesImplAssetsResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. + * @param params a list of parameters that are slotted into the url template. + * + * @return ValidValuesImplAssetsResponse + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException something went wrong with the REST call stack. + */ + public ValidValuesImplAssetsResponse callValidValuesImplAssetsGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + ValidValuesImplAssetsResponse restResult = this.callGetRESTCall(methodName, ValidValuesImplAssetsResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a GET REST call that returns a ValidValuesImplDefinitionsResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. + * @param params a list of parameters that are slotted into the url template. + * + * @return ValidValuesImplAssetsResponse + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException something went wrong with the REST call stack. + */ + public ValidValuesImplDefinitionsResponse callValidValuesImplDefinitionsGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + ValidValuesImplDefinitionsResponse restResult = this.callGetRESTCall(methodName, + ValidValuesImplDefinitionsResponse.class, + urlTemplate, + params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a GET REST call that returns a ReferenceValueAssignmentDefinitionsResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. + * @param params a list of parameters that are slotted into the url template. + * + * @return ValidValuesImplAssetsResponse + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException something went wrong with the REST call stack. + */ + public ReferenceValueAssignmentDefinitionsResponse callReferenceValueAssignmentDefinitionsGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + ReferenceValueAssignmentDefinitionsResponse restResult = this.callGetRESTCall(methodName, + ReferenceValueAssignmentDefinitionsResponse.class, + urlTemplate, + params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a GET REST call that returns a ReferenceValueAssignmentItemsResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. + * @param params a list of parameters that are slotted into the url template. + * + * @return ValidValuesImplAssetsResponse + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException something went wrong with the REST call stack. + */ + public ReferenceValueAssignmentItemsResponse callReferenceValueAssignmentItemsGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + ReferenceValueAssignmentItemsResponse restResult = this.callGetRESTCall(methodName, + ReferenceValueAssignmentItemsResponse.class, + urlTemplate, + params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a GET REST call that returns a ValidValueMappingsResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. + * @param params a list of parameters that are slotted into the url template. + * + * @return ValidValuesImplAssetsResponse + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException something went wrong with the REST call stack. + */ + public ValidValueMappingsResponse callValidValueMappingsGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + ValidValueMappingsResponse restResult = this.callGetRESTCall(methodName, + ValidValueMappingsResponse.class, + urlTemplate, + params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a GET REST call that returns a ValidValueMappingsResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. + * @param params a list of parameters that are slotted into the url template. + * + * @return ValidValuesImplAssetsResponse + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException something went wrong with the REST call stack. + */ + public ValidValuesMappingsResponse callValidValuesMappingsGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + ValidValuesMappingsResponse restResult = this.callGetRESTCall(methodName, + ValidValuesMappingsResponse.class, + urlTemplate, + params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + /** + * Issue a GET REST call that returns an AssetElementResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. + * @param params a list of parameters that are slotted into the url template. + * + * @return AssetElementResponse + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException something went wrong with the REST call stack. + */ + public AssetElementResponse callAssetElementGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + AssetElementResponse restResult = this.callGetRESTCall(methodName, AssetElementResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a GET REST call that returns an AssetElementsResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. + * @param params a list of parameters that are slotted into the url template. + * + * @return AssetElementsResponse + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException something went wrong with the REST call stack. + */ + public AssetElementsResponse callAssetElementsGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + AssetElementsResponse restResult = this.callGetRESTCall(methodName, AssetElementsResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a POST REST call that returns an AssetElementsResponse object. + * + * @param methodName name of the method being called. + * @param requestBody request body for the REST call - contains most of the parameters + * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. + * @param params a list of parameters that are slotted into the url template. + * + * @return AssetElementsResponse + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException something went wrong with the REST call stack. + */ + public AssetElementsResponse callAssetElementsPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + AssetElementsResponse restResult = this.callPostRESTCall(methodName, AssetElementsResponse.class, urlTemplate, requestBody, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + + + /** + * Issue a POST REST call that returns a list of AssetRelationshipsResponse in a response object. + * + * @param methodName name of the method being called + * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters + * @param requestBody request body for the request + * @param params a list of parameters that are slotted into the url template + * @return response objects + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException something went wrong with the REST call stack. + */ + public AssetRelationshipsResponse callAssetRelationshipsPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + AssetRelationshipsResponse restResult = this.callPostRESTCall(methodName, AssetRelationshipsResponse.class, urlTemplate, requestBody, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a POST REST call that returns a list of AssetRelationshipsResponse in a response object. + * + * @param methodName name of the method being called + * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters + * @param requestBody request body for the request + * @param params a list of parameters that are slotted into the url template + * @return response objects + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException something went wrong with the REST call stack. + */ + public RelatedAssetsResponse callRelatedAssetsPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + RelatedAssetsResponse restResult = this.callPostRESTCall(methodName, RelatedAssetsResponse.class, urlTemplate, requestBody, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + + /** + * Issue a GET REST call that returns a ServerAssetUseElement in a response object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException something went wrong with the REST call stack. + */ + public ServerAssetUseResponse callServerAssetUseGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + ServerAssetUseResponse restResult = this.callGetRESTCall(methodName, ServerAssetUseResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a GET REST call that returns a list of ServerAssetUseElements in a response object. + * + * @param methodName name of the method being called + * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters + * @param params a list of parameters that are slotted into the url template + * @return response objects + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException something went wrong with the REST call stack. + */ + public ServerAssetUsesResponse callServerAssetUseListGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + ServerAssetUsesResponse restResult = this.callGetRESTCall(methodName, ServerAssetUsesResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a POST REST call that returns a list of ServerAssetUseElements in a response object. + * + * @param methodName name of the method being called + * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters + * @param requestBody request body for the request + * @param params a list of parameters that are slotted into the url template + * @return response objects + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException something went wrong with the REST call stack. + */ + public ServerAssetUsesResponse callServerAssetUseListPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + ServerAssetUsesResponse restResult = this.callPostRESTCall(methodName, ServerAssetUsesResponse.class, urlTemplate, requestBody, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a POST REST call that returns a list of SupportedCapabilityElements in a response object. + * + * @param methodName name of the method being called + * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters + * @param requestBody request body for the request + * @param params a list of parameters that are slotted into the url template + * @return response objects + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException something went wrong with the REST call stack. + */ + public SupportedCapabilitiesResponse callSupportedCapabilityListPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + SupportedCapabilitiesResponse restResult = this.callPostRESTCall(methodName, SupportedCapabilitiesResponse.class, urlTemplate, requestBody, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + + /** + * Issue a POST REST call that returns a DataFlowElementResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. + * @param requestBody object that passes additional parameters + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public DataFlowElementResponse callDataFlowPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + DataFlowElementResponse restResult = this.callPostRESTCall(methodName, DataFlowElementResponse.class, urlTemplate, requestBody, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a POST REST call that returns a DataFlowElementsResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. + * @param requestBody object that passes additional parameters + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public DataFlowElementsResponse callDataFlowsPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + DataFlowElementsResponse restResult = this.callPostRESTCall(methodName, DataFlowElementsResponse.class, urlTemplate, requestBody, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a POST REST call that returns a ControlFlowElementResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. + * @param requestBody object that passes additional parameters + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public ControlFlowElementResponse callControlFlowPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + ControlFlowElementResponse restResult = this.callPostRESTCall(methodName, ControlFlowElementResponse.class, urlTemplate, requestBody, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a POST REST call that returns a ControlFlowElementsResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. + * @param requestBody object that passes additional parameters + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public ControlFlowElementsResponse callControlFlowsPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + ControlFlowElementsResponse restResult = this.callPostRESTCall(methodName, ControlFlowElementsResponse.class, urlTemplate, requestBody, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a POST REST call that returns a ProcessCallElementResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. + * @param requestBody object that passes additional parameters + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public ProcessCallElementResponse callProcessCallPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + ProcessCallElementResponse restResult = this.callPostRESTCall(methodName, ProcessCallElementResponse.class, urlTemplate, requestBody, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a POST REST call that returns a ProcessCallElementsResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. + * @param requestBody object that passes additional parameters + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public ProcessCallElementsResponse callProcessCallsPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + ProcessCallElementsResponse restResult = this.callPostRESTCall(methodName, ProcessCallElementsResponse.class, urlTemplate, requestBody, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a POST REST call that returns a LineageMappingElementResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. + * @param requestBody object that passes additional parameters + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public LineageMappingElementResponse callLineageMappingPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + LineageMappingElementResponse restResult = this.callPostRESTCall(methodName, LineageMappingElementResponse.class, urlTemplate, requestBody, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a POST REST call that returns a LineageMappingElementsResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. + * @param requestBody object that passes additional parameters + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public LineageMappingElementsResponse callLineageMappingsPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + LineageMappingElementsResponse restResult = this.callPostRESTCall(methodName, LineageMappingElementsResponse.class, urlTemplate, requestBody, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a GET REST call that returns a DiscoveryAnalysisReportListResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. + * @param params a list of parameters that are slotted into the url template. + * + * @return DiscoveryAnalysisReportResponse + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException something went wrong with the REST call stack. + */ + public SurveyReportsResponse callSurveyReportListGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + SurveyReportsResponse restResult = this.callGetRESTCall(methodName, + SurveyReportsResponse.class, + urlTemplate, + params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a POST REST call that returns a DiscoveryAnalysisReportListResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. + * @param requestBody request body for the REST call - contains most of the parameters + * @param params a list of parameters that are slotted into the url template. + * + * @return DiscoveryAnalysisReportResponse + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException something went wrong with the REST call stack. + */ + public SurveyReportsResponse callDiscoveryAnalysisReportListPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + SurveyReportsResponse restResult = this.callPostRESTCall(methodName, + SurveyReportsResponse.class, + urlTemplate, + requestBody, + params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a GET REST call that returns an AnnotationsResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. + * @param params a list of parameters that are slotted into the url template. + * + * @return AnnotationsResponse + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException something went wrong with the REST call stack. + */ + public AnnotationsResponse callAnnotationListGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + AnnotationsResponse restResult = this.callGetRESTCall(methodName, AnnotationsResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a POST REST call that returns an AnnotationResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. + * @param requestBody request body for the REST call - contains most of the parameters + * @param params a list of parameters that are slotted into the url template. + * + * @return AnnotationResponse + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException something went wrong with the REST call stack. + */ + public AnnotationsResponse callAnnotationListPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + AnnotationsResponse restResult = this.callPostRESTCall(methodName, AnnotationsResponse.class, urlTemplate, requestBody, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a GET REST call that returns an AnnotationResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. + * @param params a list of parameters that are slotted into the url template. + * + * @return AnnotationResponse + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException something went wrong with the REST call stack. + */ + public AnnotationResponse callAnnotationGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + AnnotationResponse restResult = this.callGetRESTCall(methodName, AnnotationResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a POST REST call that returns an AnnotationResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. + * @param requestBody request body for the REST call - contains most of the parameters + * @param params a list of parameters that are slotted into the url template. + * + * @return AnnotationResponse + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException something went wrong with the REST call stack. + */ + public AnnotationResponse callAnnotationPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + AnnotationResponse restResult = this.callPostRESTCall(methodName, AnnotationResponse.class, urlTemplate, requestBody, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a GET REST call that returns a CertificationTypeResponse object. + * + * @param methodName name of the method being called + * @param urlTemplate template of the URL with place-holders for the parameters + * @param params a list of parameters that are slotted into the url template + * @return CertificationTypeResponse + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public CertificationTypeResponse callCertificationTypeGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + PropertyServerException, + UserNotAuthorizedException + { + CertificationTypeResponse restResult = this.callGetRESTCall(methodName, CertificationTypeResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a GET REST call that returns a list of CertificationTypeElement objects. + * + * @param methodName name of the method being called + * @param urlTemplate template of the URL with place-holders for the parameters + * @param params a list of parameters that are slotted into the url template + * @return CertificationTypesResponse + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public CertificationTypesResponse callCertificationTypeListGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + PropertyServerException, + UserNotAuthorizedException + { + CertificationTypesResponse restResult = this.callGetRESTCall(methodName, CertificationTypesResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a POST REST call that returns a list of CertificationTypeElement objects. + * + * @param methodName name of the method being called + * @param urlTemplate template of the URL with place-holders for the parameters + * @param requestBody request body for the REST call - contains most of the parameters + * @param params a list of parameters that are slotted into the url template + * @return CertificationTypesResponse + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public CertificationTypesResponse callCertificationTypeListPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + PropertyServerException, + UserNotAuthorizedException + { + CertificationTypesResponse restResult = this.callPostRESTCall(methodName, CertificationTypesResponse.class, urlTemplate, requestBody, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a GET REST call that returns a ElementStubsResponse object. + * + * @param methodName name of the method being called + * @param urlTemplate template of the URL with place-holders for the parameters + * @param params a list of parameters that are slotted into the url template + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public ElementStubsResponse callElementStubsGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + PropertyServerException, + UserNotAuthorizedException + { + ElementStubsResponse restResult = this.callGetRESTCall(methodName, ElementStubsResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + + + /** + * Issue a POST REST call that returns a ElementStubsResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. + * @param requestBody object that passes additional parameters + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public ElementStubsResponse callElementStubsPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + ElementStubsResponse restResult = this.callPostRESTCall(methodName, ElementStubsResponse.class, urlTemplate, requestBody, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a GET REST call that returns a ExternalReferenceResponse object. + * + * @param methodName name of the method being called + * @param urlTemplate template of the URL with place-holders for the parameters + * @param params a list of parameters that are slotted into the url template + * @return ExternalReferenceResponse + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public ExternalReferenceResponse callExternalReferenceGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + PropertyServerException, + UserNotAuthorizedException + { + ExternalReferenceResponse restResult = this.callGetRESTCall(methodName, ExternalReferenceResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a GET REST call that returns a list of ExternalReferenceElement objects. + * + * @param methodName name of the method being called + * @param urlTemplate template of the URL with place-holders for the parameters + * @param params a list of parameters that are slotted into the url template + * @return ExternalReferencesResponse + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public ExternalReferencesResponse callExternalReferencesGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + PropertyServerException, + UserNotAuthorizedException + { + ExternalReferencesResponse restResult = this.callGetRESTCall(methodName, ExternalReferencesResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a POST REST call that returns a list of ExternalReferenceElement objects. + * + * @param methodName name of the method being called + * @param urlTemplate template of the URL with place-holders for the parameters + * @param requestBody request body for the REST call - contains most of the parameters + * @param params a list of parameters that are slotted into the url template + * @return ExternalReferencesResponse + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public ExternalReferencesResponse callExternalReferencesPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + PropertyServerException, + UserNotAuthorizedException + { + ExternalReferencesResponse restResult = this.callPostRESTCall(methodName, ExternalReferencesResponse.class, urlTemplate, requestBody, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a GET REST call that returns a RelatedElementsResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate REST API call URL template with place-holders for the parameters. + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public RelatedElementsResponse callRelatedElementsGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + RelatedElementsResponse restResult = this.callGetRESTCall(methodName, RelatedElementsResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a POST REST call that returns a ElementHeadersResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. + * @param requestBody object that passes additional parameters + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public ElementHeadersResponse callElementHeadersPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + ElementHeadersResponse restResult = this.callPostRESTCall(methodName, + ElementHeadersResponse.class, + urlTemplate, + requestBody, + params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + + + /** + * Issue a POST REST call that returns a ElementHeadersResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. + * @param requestBody object that passes additional parameters + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public RelatedElementsResponse callRelatedElementsPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + RelatedElementsResponse restResult = this.callPostRESTCall(methodName, + RelatedElementsResponse.class, + urlTemplate, + requestBody, + params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + + /** + * Issue a GET REST call that returns a LicenseTypeResponse object. + * + * @param methodName name of the method being called + * @param urlTemplate template of the URL with place-holders for the parameters + * @param params a list of parameters that are slotted into the url template + * @return LicenseTypeResponse + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public LicenseTypeResponse callLicenseTypeGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + PropertyServerException, + UserNotAuthorizedException + { + LicenseTypeResponse restResult = this.callGetRESTCall(methodName, LicenseTypeResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a GET REST call that returns a list of LicenseTypeElement objects. + * + * @param methodName name of the method being called + * @param urlTemplate template of the URL with place-holders for the parameters + * @param params a list of parameters that are slotted into the url template + * @return LicenseTypesResponse + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public LicenseTypesResponse callLicenseTypesGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + PropertyServerException, + UserNotAuthorizedException + { + LicenseTypesResponse restResult = this.callGetRESTCall(methodName, LicenseTypesResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + + /** + * Issue a GET REST call that returns a list of LicenseElement objects. + * + * @param methodName name of the method being called + * @param urlTemplate template of the URL with place-holders for the parameters + * @param params a list of parameters that are slotted into the url template + * @return LicensesResponse + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public LicensesResponse callLicensesGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + PropertyServerException, + UserNotAuthorizedException + { + LicensesResponse restResult = this.callGetRESTCall(methodName, LicensesResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a POST REST call that returns a list of LicenseTypeElement objects. + * + * @param methodName name of the method being called + * @param urlTemplate template of the URL with place-holders for the parameters + * @param requestBody request body for the REST call - contains most of the parameters + * @param params a list of parameters that are slotted into the url template + * @return LicenseTypesResponse + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public LicenseTypesResponse callLicenseTypeListPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + PropertyServerException, + UserNotAuthorizedException + { + LicenseTypesResponse restResult = this.callPostRESTCall(methodName, LicenseTypesResponse.class, urlTemplate, requestBody, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + + /** + * Issue a POST REST call that returns a SchemaAttributeResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. + * @param requestBody object that passes additional parameters + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public SchemaAttributeResponse callSchemaAttributePostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + SchemaAttributeResponse restResult = this.callPostRESTCall(methodName, SchemaAttributeResponse.class, urlTemplate, requestBody, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a POST REST call that returns a SchemaAttributesResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. + * @param requestBody object that passes additional parameters + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public SchemaAttributesResponse callSchemaAttributesPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + SchemaAttributesResponse restResult = this.callPostRESTCall(methodName, SchemaAttributesResponse.class, urlTemplate, requestBody, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a POST REST call that returns a SchemaTypeElementResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. + * @param requestBody object that passes additional parameters + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public SchemaTypeElementResponse callSchemaTypePostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + SchemaTypeElementResponse restResult = this.callPostRESTCall(methodName, SchemaTypeElementResponse.class, urlTemplate, requestBody, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a POST REST call that returns a SchemaTypeElementsResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. + * @param requestBody object that passes additional parameters + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public SchemaTypeElementsResponse callSchemaTypesPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + SchemaTypeElementsResponse restResult = this.callPostRESTCall(methodName, SchemaTypeElementsResponse.class, urlTemplate, requestBody, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + /** + * Issue a POST REST call that returns a ElementHeaderResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. + * @param requestBody object that passes additional parameters + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public ElementHeaderResponse callElementHeaderPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + ElementHeaderResponse restResult = this.callPostRESTCall(methodName, + ElementHeaderResponse.class, + urlTemplate, + requestBody, + params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + /** + * Issue a POST REST call that returns a RelationshipElementResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. + * @param requestBody object that passes additional parameters + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public RelationshipElementResponse callRelationshipPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + RelationshipElementResponse restResult = this.callPostRESTCall(methodName, RelationshipElementResponse.class, urlTemplate, requestBody, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a POST REST call that returns a RelationshipElementsResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. + * @param requestBody object that passes additional parameters + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public RelationshipElementsResponse callRelationshipsPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + RelationshipElementsResponse restResult = this.callPostRESTCall(methodName, RelationshipElementsResponse.class, urlTemplate, requestBody, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a GET REST call that returns a ElementStubResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public ElementStubResponse callElementStubGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + ElementStubResponse restResult = this.callGetRESTCall(methodName, ElementStubResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a GET REST call that returns a ConnectorReportResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. + * @param params a list of parameters that are slotted into the url template. + * + * @return ConnectorReportResponse + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException something went wrong with the REST call stack. + */ + public ConnectorReportResponse callOCFConnectorReportGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + ConnectorReportResponse restResult = this.callGetRESTCall(methodName, + ConnectorReportResponse.class, + urlTemplate, + params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + + /** + * Issue a GET REST call that returns a ITProfileElement in a response object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException something went wrong with the REST call stack. + */ + public ITProfileResponse callITProfileGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + ITProfileResponse restResult = this.callGetRESTCall(methodName, ITProfileResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a GET REST call that returns a list of ITProfileElements in a response object. + * + * @param methodName name of the method being called + * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters + * @param params a list of parameters that are slotted into the url template + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException something went wrong with the REST call stack. + */ + public ITProfilesResponse callITProfileListGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + ITProfilesResponse restResult = this.callGetRESTCall(methodName, ITProfilesResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a GET REST call that returns a list of ITProfileElements in a response object. + * + * @param methodName name of the method being called + * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters + * @param requestBody request body for the request + * @param params a list of parameters that are slotted into the url template + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException something went wrong with the REST call stack. + */ + public ITProfilesResponse callITProfileListPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + ITProfilesResponse restResult = this.callPostRESTCall(methodName, ITProfilesResponse.class, urlTemplate, requestBody, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a GET REST call that returns a UserIdentityElement in a response object. + * + * @param methodName name of the method being called. + * @param urlTemplate REST API call URL template with place-holders for the parameters. + * @param params a list of parameters that are slotted into the url template. + * + * @return UserIdentityResponse + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException something went wrong with the REST call stack. + */ + public UserIdentityResponse callUserIdentityGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + UserIdentityResponse restResult = this.callGetRESTCall(methodName, UserIdentityResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + + /** + * Issue a POST REST call that returns a UserIdentityResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. + * @param requestBody object that passes additional parameters + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public UserIdentityResponse callUserIdentityPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + UserIdentityResponse restResult = this.callPostRESTCall(methodName, UserIdentityResponse.class, urlTemplate, requestBody, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a POST REST call that returns a UserIdentitiesResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. + * @param requestBody object that passes additional parameters + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public UserIdentitiesResponse callUserIdentitiesPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + UserIdentitiesResponse restResult = this.callPostRESTCall(methodName, UserIdentitiesResponse.class, urlTemplate, requestBody, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + + /** + * Issue a GET REST call that returns a list of UserIdentityElements in a response object. + * + * @param methodName name of the method being called + * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters + * @param params a list of parameters that are slotted into the url template + * @return UserIdentitiesResponse + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException something went wrong with the REST call stack. + */ + public UserIdentitiesResponse callUserIdentitiesGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + UserIdentitiesResponse restResult = this.callGetRESTCall(methodName, UserIdentitiesResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a POST REST call that returns a list of UserIdentityElements in a response object. + * + * @param methodName name of the method being called + * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters + * @param requestBody request body for the request + * @param params a list of parameters that are slotted into the url template + * @return UserIdentitiesResponse + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException something went wrong with the REST call stack. + */ + public UserIdentitiesResponse callUserIdentityListPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + UserIdentitiesResponse restResult = this.callPostRESTCall(methodName, UserIdentitiesResponse.class, urlTemplate, requestBody, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + + + /** + * Issue a GET REST call that returns a SoftwareCapabilityElement in a response object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException something went wrong with the REST call stack. + */ + public SoftwareCapabilityResponse callSoftwareServerCapabilityGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + SoftwareCapabilityResponse restResult = this.callGetRESTCall(methodName, SoftwareCapabilityResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a GET REST call that returns a list of SoftwareServerCapabilityElements in a response object. + * + * @param methodName name of the method being called + * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters + * @param params a list of parameters that are slotted into the url template + * @return response objects + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException something went wrong with the REST call stack. + */ + public SoftwareCapabilitiesResponse callSoftwareServerCapabilitiesGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + SoftwareCapabilitiesResponse restResult = this.callGetRESTCall(methodName, SoftwareCapabilitiesResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a POST REST call that returns a list of SoftwareServerCapabilityElements in a response object. + * + * @param methodName name of the method being called + * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters + * @param requestBody request body for the request + * @param params a list of parameters that are slotted into the url template + * @return response objects + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException something went wrong with the REST call stack. + */ + public SoftwareCapabilitiesResponse callSoftwareServerCapabilitiesPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + SoftwareCapabilitiesResponse restResult = this.callPostRESTCall(methodName, SoftwareCapabilitiesResponse.class, urlTemplate, requestBody, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + + /** + * Issue a GET REST call that returns a DigitalServiceElement in a response object. + * + * @param methodName name of the method being called. + * @param urlTemplate REST API call URL template with place-holders for the parameters. + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException something went wrong with the REST call stack. + */ + public DigitalServiceResponse callDigitalServiceGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + DigitalServiceResponse restResult = this.callGetRESTCall(methodName, DigitalServiceResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a GET REST call that returns a list of DigitalServiceElements in a response object. + * + * @param methodName name of the method being called + * @param urlTemplate REST API call URL template with place-holders for the parameters + * @param params a list of parameters that are slotted into the url template + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException something went wrong with the REST call stack. + */ + public DigitalServicesResponse callDigitalServicesGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + DigitalServicesResponse restResult = this.callGetRESTCall(methodName, DigitalServicesResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a GET REST call that returns a list of DigitalServiceElements in a response object. + * + * @param methodName name of the method being called + * @param urlTemplate REST API call URL template with place-holders for the parameters + * @param requestBody request body for the request + * @param params a list of parameters that are slotted into the url template + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException something went wrong with the REST call stack. + */ + public DigitalServicesResponse callDigitalServicesPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + DigitalServicesResponse restResult = this.callPostRESTCall(methodName, DigitalServicesResponse.class, urlTemplate, requestBody, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + + + /** + * Issue a GET REST call that returns a ActorProfileElement in a response object. + * + * @param methodName name of the method being called. + * @param urlTemplate REST API call URL template with place-holders for the parameters. + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException something went wrong with the REST call stack. + */ + public ActorProfileResponse callActorProfileGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + ActorProfileResponse restResult = this.callGetRESTCall(methodName, ActorProfileResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a GET REST call that returns a list of ActorProfileElements in a response object. + * + * @param methodName name of the method being called + * @param urlTemplate REST API call URL template with place-holders for the parameters + * @param params a list of parameters that are slotted into the url template + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException something went wrong with the REST call stack. + */ + public ActorProfilesResponse callActorProfilesGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + ActorProfilesResponse restResult = this.callGetRESTCall(methodName, ActorProfilesResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a GET REST call that returns a list of ActorProfileElements in a response object. + * + * @param methodName name of the method being called + * @param urlTemplate REST API call URL template with place-holders for the parameters + * @param requestBody request body for the request + * @param params a list of parameters that are slotted into the url template + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException something went wrong with the REST call stack. + */ + public ActorProfilesResponse callActorProfilesPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + ActorProfilesResponse restResult = this.callPostRESTCall(methodName, ActorProfilesResponse.class, urlTemplate, requestBody, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + + /** + * Issue a GET REST call that returns a PersonRoleElement in a response object. + * + * @param methodName name of the method being called. + * @param urlTemplate REST API call URL template with place-holders for the parameters. + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException something went wrong with the REST call stack. + */ + public PersonRoleResponse callPersonRoleGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + PersonRoleResponse restResult = this.callGetRESTCall(methodName, PersonRoleResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a GET REST call that returns a list of PersonRoleElements in a response object. + * + * @param methodName name of the method being called + * @param urlTemplate REST API call URL template with place-holders for the parameters + * @param params a list of parameters that are slotted into the url template + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException something went wrong with the REST call stack. + */ + public PersonRolesResponse callPersonRolesGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + PersonRolesResponse restResult = this.callGetRESTCall(methodName, PersonRolesResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a POST REST call that returns a list of PersonRoleElements in a response object. + * + * @param methodName name of the method being called + * @param urlTemplate REST API call URL template with place-holders for the parameters + * @param requestBody request body for the request + * @param params a list of parameters that are slotted into the url template + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException something went wrong with the REST call stack. + */ + public PersonRolesResponse callPersonRolesPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + PersonRolesResponse restResult = this.callPostRESTCall(methodName, PersonRolesResponse.class, urlTemplate, requestBody, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + + /** + * Issue a POST REST call that returns a list of PersonRoleAppointees in a response object. + * + * @param methodName name of the method being called + * @param urlTemplate REST API call URL template with place-holders for the parameters + * @param requestBody request body for the request + * @param params a list of parameters that are slotted into the url template + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException something went wrong with the REST call stack. + */ + public AppointeesResponse callAppointeesPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + AppointeesResponse restResult = this.callPostRESTCall(methodName, AppointeesResponse.class, urlTemplate, requestBody, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + + + /** + * Issue a GET REST call that returns a CommunityElement in a response object. + * + * @param methodName name of the method being called. + * @param urlTemplate REST API call URL template with place-holders for the parameters. + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException something went wrong with the REST call stack. + */ + public CommunityResponse callCommunityGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + CommunityResponse restResult = this.callGetRESTCall(methodName, CommunityResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a GET REST call that returns a list of CommunityElements in a response object. + * + * @param methodName name of the method being called + * @param urlTemplate REST API call URL template with place-holders for the parameters + * @param params a list of parameters that are slotted into the url template + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException something went wrong with the REST call stack. + */ + public CommunitiesResponse callCommunitiesGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + CommunitiesResponse restResult = this.callGetRESTCall(methodName, CommunitiesResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a GET REST call that returns a list of CommunityElements in a response object. + * + * @param methodName name of the method being called + * @param urlTemplate REST API call URL template with place-holders for the parameters + * @param requestBody request body for the request + * @param params a list of parameters that are slotted into the url template + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException something went wrong with the REST call stack. + */ + public CommunitiesResponse callCommunitiesPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + CommunitiesResponse restResult = this.callPostRESTCall(methodName, CommunitiesResponse.class, urlTemplate, requestBody, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + + /** + * Issue a GET REST call that returns a SecurityGroupResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate REST API call URL template with place-holders for the parameters. + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public SecurityGroupResponse callSecurityGroupGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + SecurityGroupResponse restResult = this.callGetRESTCall(methodName, SecurityGroupResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a POST REST call that returns a SecurityGroupResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate REST API call URL template with place-holders for the parameters. + * @param requestBody object that passes additional parameters + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public SecurityGroupResponse callSecurityGroupPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + SecurityGroupResponse restResult = this.callPostRESTCall(methodName, SecurityGroupResponse.class, urlTemplate, requestBody, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a GET REST call that returns a SecurityGroupsResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate REST API call URL template with place-holders for the parameters. + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public SecurityGroupsResponse callSecurityGroupsGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + SecurityGroupsResponse restResult = this.callGetRESTCall(methodName, SecurityGroupsResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a POST REST call that returns a SecurityGroupsResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate REST API call URL template with place-holders for the parameters. + * @param requestBody object that passes additional parameters + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public SecurityGroupsResponse callSecurityGroupsPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + SecurityGroupsResponse restResult = this.callPostRESTCall(methodName, SecurityGroupsResponse.class, urlTemplate, requestBody, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + + + /** + * Issue a GET REST call that returns a LocationResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate REST API call URL template with place-holders for the parameters. + * @param params a list of parameters that are slotted into the url template. + * + * @return LocationResponse + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public LocationResponse callLocationGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + LocationResponse restResult = this.callGetRESTCall(methodName, LocationResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a GET REST call that returns a LocationsResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate REST API call URL template with place-holders for the parameters. + * @param params a list of parameters that are slotted into the url template. + * + * @return LocationsResponse + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public LocationsResponse callLocationsGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + LocationsResponse restResult = this.callGetRESTCall(methodName, LocationsResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + /** + * Issue a POST REST call that returns a LocationsResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate REST API call URL template with place-holders for the parameters. + * @param requestBody properties describing the valid value definition/set + * @param params a list of parameters that are slotted into the url template. + * + * @return LocationsResponse + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public LocationsResponse callLocationsPostRESTCall(String methodName, + String urlTemplate, + Object requestBody, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + LocationsResponse restResult = this.callPostRESTCall(methodName, LocationsResponse.class, urlTemplate, requestBody, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + + + } diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/FFDCResponseBase.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/FFDCResponseBase.java index 64ebbc2c490..9cbcad60934 100644 --- a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/FFDCResponseBase.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/FFDCResponseBase.java @@ -26,8 +26,8 @@ @JsonSubTypes({ @JsonSubTypes.Type(value = BooleanResponse.class, name = "BooleanResponse"), @JsonSubTypes.Type(value = CountResponse.class, name = "CountResponse"), - @JsonSubTypes.Type(value = ConnectionResponse.class, name = "ConnectionResponse"), - @JsonSubTypes.Type(value = ConnectorTypeResponse.class, name = "ConnectorTypeResponse"), + @JsonSubTypes.Type(value = OCFConnectionResponse.class, name = "OCFConnectionResponse"), + @JsonSubTypes.Type(value = OCFConnectorTypeResponse.class, name = "OCFConnectorTypeResponse"), @JsonSubTypes.Type(value = GUIDListResponse.class, name = "GUIDListResponse"), @JsonSubTypes.Type(value = GUIDResponse.class, name = "GUIDResponse"), @JsonSubTypes.Type(value = NameListResponse.class, name = "NameListResponse"), diff --git a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/rest/FeedbackRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/FeedbackRequestBody.java similarity index 93% rename from open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/rest/FeedbackRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/FeedbackRequestBody.java index 912e391dfd9..03531c333a3 100644 --- a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/rest/FeedbackRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/FeedbackRequestBody.java @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetconsumer.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.*; @@ -15,7 +15,7 @@ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) -public class FeedbackRequestBody extends AssetConsumerOMASAPIRequestBody +public class FeedbackRequestBody { private boolean isPublic = false; @@ -35,8 +35,6 @@ public FeedbackRequestBody() */ public FeedbackRequestBody(FeedbackRequestBody template) { - super(template); - if (template != null) { this.isPublic = template.getIsPublic(); diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/FileFolderResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/FileFolderResponse.java new file mode 100644 index 00000000000..589d1a7f59e --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/FileFolderResponse.java @@ -0,0 +1,127 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.FileFolderElement; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * FileFolderResponse is the response structure used on the OMAS REST API calls that return the properties + * for a folder. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class FileFolderResponse extends FFDCResponseBase +{ + private FileFolderElement folder = null; + + + /** + * Default constructor + */ + public FileFolderResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public FileFolderResponse(FileFolderResponse template) + { + super(template); + + if (template != null) + { + this.folder = template.getFolder(); + } + } + + + /** + * Return the folder result. + * + * @return bean + */ + public FileFolderElement getFolder() + { + return folder; + } + + + /** + * Set up the folder result. + * + * @param folder bean + */ + public void setFolder(FileFolderElement folder) + { + this.folder = folder; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "FileFolderResponse{" + + "folder=" + folder + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof FileFolderResponse)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + FileFolderResponse that = (FileFolderResponse) objectToCompare; + return Objects.equals(folder, that.folder); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(folder); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/FileFoldersResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/FileFoldersResponse.java new file mode 100644 index 00000000000..f510ede5935 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/FileFoldersResponse.java @@ -0,0 +1,127 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.FileFolderElement; + + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * FileFoldersResponse is a response object for passing back a a list of database views + * or an exception if the request failed. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class FileFoldersResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public FileFoldersResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public FileFoldersResponse(FileFoldersResponse template) + { + super(template); + + if (template != null) + { + elements = template.getElements(); + } + } + + + /** + * Return the list of metadata elements. + * + * @return result object + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the metadata element to return. + * + * @param elements result object + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "FileFoldersResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + FileFoldersResponse that = (FileFoldersResponse) objectToCompare; + return Objects.equals(elements, that.elements); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elements); + } +} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/FileManagerRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/FileManagerRequestBody.java similarity index 82% rename from open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/FileManagerRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/FileManagerRequestBody.java index 29e5b95921f..5cb5175e98d 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/FileManagerRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/FileManagerRequestBody.java @@ -1,12 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.properties.FileManagerProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities.FileManagerProperties; import java.util.Objects; @@ -119,18 +119,7 @@ public String toString() return "FileManagerRequestBody{" + "externalSourceGUID='" + externalSourceGUID + '\'' + ", externalSourceName='" + externalSourceName + '\'' + - ", displayName='" + getDisplayName() + '\'' + - ", description='" + getDescription() + '\'' + - ", typeDescription='" + getDeployedImplementationType() + '\'' + - ", version='" + getVersion() + '\'' + - ", patchLevel='" + getPatchLevel() + '\'' + - ", source='" + getSource() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; + "} " + super.toString(); } diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/FileSystemRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/FileSystemRequestBody.java similarity index 81% rename from open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/FileSystemRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/FileSystemRequestBody.java index ec33264ec7f..f516cfb6796 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/FileSystemRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/FileSystemRequestBody.java @@ -1,12 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.properties.FileSystemProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities.FileSystemProperties; import java.util.Objects; @@ -119,20 +119,7 @@ public String toString() return "FileSystemRequestBody{" + "externalSourceGUID='" + externalSourceGUID + '\'' + ", externalSourceName='" + externalSourceName + '\'' + - ", format='" + getFormat() + '\'' + - ", encryption='" + getEncryption() + '\'' + - ", displayName='" + getDisplayName() + '\'' + - ", description='" + getDescription() + '\'' + - ", typeDescription='" + getDeployedImplementationType() + '\'' + - ", version='" + getVersion() + '\'' + - ", patchLevel='" + getPatchLevel() + '\'' + - ", source='" + getSource() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; + "} " + super.toString(); } diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/FileSystemResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/FileSystemResponse.java new file mode 100644 index 00000000000..59b8bb02d9c --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/FileSystemResponse.java @@ -0,0 +1,124 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.FileSystemElement; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * FileSystemResponse is the response structure used on the OMAS REST API calls that return the properties + * for a file system. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class FileSystemResponse extends FFDCResponseBase +{ + private FileSystemElement element = null; + + + /** + * Default constructor + */ + public FileSystemResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public FileSystemResponse(FileSystemResponse template) + { + super(template); + + if (template != null) + { + this.element = template.getElement(); + } + } + + + /** + * Return the fileSystem result. + * + * @return bean + */ + public FileSystemElement getElement() + { + return element; + } + + + /** + * Set up the fileSystem result. + * + * @param element - bean + */ + public void setElement(FileSystemElement element) + { + this.element = element; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "FileSystemResponse{" + + "element=" + element + + "} " + super.toString(); + } + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof FileSystemResponse that)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + return Objects.equals(element, that.element); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(element); + } +} diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/FixedLocationRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/FixedLocationRequestBody.java similarity index 98% rename from open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/FixedLocationRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/FixedLocationRequestBody.java index 19a77e64f56..7f1c325e357 100644 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/FixedLocationRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/FixedLocationRequestBody.java @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalarchitecture.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/FolderResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/FolderResponse.java new file mode 100644 index 00000000000..8bae094805a --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/FolderResponse.java @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.FolderElement; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * FolderResponse is the response structure used on the OMAS REST API calls that return the properties + * for a folder. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class FolderResponse extends FFDCResponseBase +{ + private FolderElement element = null; + + + /** + * Default constructor + */ + public FolderResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public FolderResponse(FolderResponse template) + { + super(template); + + if (template != null) + { + this.element = template.getElement(); + } + } + + + /** + * Return the folder result. + * + * @return bean + */ + public FolderElement getElement() + { + return element; + } + + + /** + * Set up the folder result. + * + * @param element - bean + */ + public void setElement(FolderElement element) + { + this.element = element; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "FolderResponse{" + + "element=" + element + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof FolderResponse that)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + return Objects.equals(element, that.element); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(element); + } +} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/FormRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/FormRequestBody.java similarity index 83% rename from open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/FormRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/FormRequestBody.java index fb65c6c5564..ce38448c62e 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/FormRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/FormRequestBody.java @@ -1,12 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.properties.FormProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.display.FormProperties; import java.util.Objects; @@ -117,16 +117,9 @@ public void setExternalSourceName(String externalSourceName) public String toString() { return "FormRequestBody{" + - "externalSourceGUID='" + externalSourceGUID + '\'' + - ", externalSourceName='" + externalSourceName + '\'' + - ", name='" + getName() + '\'' + - ", description='" + getDescription() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; + "externalSourceGUID='" + externalSourceGUID + '\'' + + ", externalSourceName='" + externalSourceName + '\'' + + "} " + super.toString(); } diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/FormResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/FormResponse.java new file mode 100644 index 00000000000..bf79a0e29bf --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/FormResponse.java @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.FormElement; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * FormResponse is a response object for passing back a single form + * element or an exception if the request failed. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class FormResponse extends FFDCResponseBase +{ + private FormElement element = null; + + + /** + * Default constructor + */ + public FormResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public FormResponse(FormResponse template) + { + super(template); + + if (template != null) + { + element = template.getElement(); + } + } + + + /** + * Return the metadata element. + * + * @return result object + */ + public FormElement getElement() + { + return element; + } + + + /** + * Set up the metadata element to return. + * + * @param element result object + */ + public void setElement(FormElement element) + { + this.element = element; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "FormResponse{" + + "element=" + element + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + FormResponse that = (FormResponse) objectToCompare; + return Objects.equals(element, that.element); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), element); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/FormsResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/FormsResponse.java new file mode 100644 index 00000000000..87805c3cf3e --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/FormsResponse.java @@ -0,0 +1,126 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.FormElement; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * FormsResponse is a response object for passing back a a list of forms + * or an exception if the request failed. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class FormsResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public FormsResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public FormsResponse(FormsResponse template) + { + super(template); + + if (template != null) + { + elements = template.getElements(); + } + } + + + /** + * Return the list of metadata elements. + * + * @return result object + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the metadata element to return. + * + * @param elements result object + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "FormsResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + FormsResponse that = (FormsResponse) objectToCompare; + return Objects.equals(elements, that.elements); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elements); + } +} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/FormulaRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/FormulaRequestBody.java similarity index 96% rename from open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/FormulaRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/FormulaRequestBody.java index 4d162e3685d..81c37dd9c99 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/FormulaRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/FormulaRequestBody.java @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -17,7 +17,7 @@ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) -public class FormulaRequestBody extends DataManagerOMASAPIRequestBody +public class FormulaRequestBody { private String externalSourceGUID = null; private String externalSourceName = null; @@ -39,8 +39,6 @@ public FormulaRequestBody() */ public FormulaRequestBody(FormulaRequestBody template) { - super(template); - if (template != null) { externalSourceGUID = template.getExternalSourceGUID(); diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GUIDListResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GUIDListResponse.java index 50b39e1d241..ee7225af1dc 100644 --- a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GUIDListResponse.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GUIDListResponse.java @@ -7,7 +7,6 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import java.util.Arrays; import java.util.List; import java.util.Objects; @@ -59,18 +58,7 @@ public GUIDListResponse(GUIDListResponse template) */ public List getGUIDs() { - if (guids == null) - { - return null; - } - else if (guids.isEmpty()) - { - return null; - } - else - { - return guids; - } + return guids; } @@ -94,21 +82,10 @@ public void setGUIDs(List guids) public String toString() { return "GUIDListResponse{" + - "GUIDs=" + getGUIDs() + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; + "guids=" + guids + + "} " + super.toString(); } - /** * Return comparison result based on the content of the properties. * @@ -122,7 +99,7 @@ public boolean equals(Object objectToCompare) { return true; } - if (!(objectToCompare instanceof GUIDListResponse)) + if (!(objectToCompare instanceof GUIDListResponse that)) { return false; } @@ -130,7 +107,6 @@ public boolean equals(Object objectToCompare) { return false; } - GUIDListResponse that = (GUIDListResponse) objectToCompare; return Objects.equals(guids, that.guids); } diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GUIDResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GUIDResponse.java index c996731e64a..d6a7215eee5 100644 --- a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GUIDResponse.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GUIDResponse.java @@ -7,7 +7,6 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import java.util.Arrays; import java.util.Objects; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; @@ -82,21 +81,10 @@ public void setGUID(String guid) public String toString() { return "GUIDResponse{" + - "GUID='" + getGUID() + '\'' + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; + "guid='" + guid + + "} " + super.toString(); } - /** * Return comparison result based on the content of the properties. * @@ -110,7 +98,7 @@ public boolean equals(Object objectToCompare) { return true; } - if (!(objectToCompare instanceof GUIDResponse)) + if (!(objectToCompare instanceof GUIDResponse that)) { return false; } @@ -118,7 +106,6 @@ public boolean equals(Object objectToCompare) { return false; } - GUIDResponse that = (GUIDResponse) objectToCompare; return Objects.equals(guid, that.guid); } diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GenericResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GenericResponse.java deleted file mode 100644 index 21278bb6933..00000000000 --- a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GenericResponse.java +++ /dev/null @@ -1,47 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.commonservices.ffdc.rest; - -import java.util.Collection; -import java.util.List; -import java.util.Optional; - -/** - * If an OMAS uses Generic types to implement it's Java API, then the responses can implement this interface. - */ -public interface GenericResponse extends FFDCResponse { - - /** - * Add several results for the response - * @param results collection with results - * */ - void addAllResults(Collection results); - - /** - * Add single result for the response - * @param result - one result - * */ - void addResult(R result); - - /** - * Get all results of the response - * - * @return results - **/ - List results(); - - /** - * Get head element from result array. - * Needed when we know for sure that the answer is single object - * - * @return result - **/ - default Optional head() { - final List results = results(); - if (results != null && !results.isEmpty()) { - return Optional.of(results.get(0)); - } - - return Optional.empty(); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceDefinitionGraphResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceDefinitionGraphResponse.java new file mode 100644 index 00000000000..e6ef0cbcb15 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceDefinitionGraphResponse.java @@ -0,0 +1,124 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.GovernanceDefinitionGraph; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * GovernanceDefinitionGraphResponse is the response structure used on the OMAS REST API calls that returns a + * governance definition graph object as a response. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class GovernanceDefinitionGraphResponse extends FFDCResponseBase +{ + private GovernanceDefinitionGraph element = null; + + + /** + * Default constructor + */ + public GovernanceDefinitionGraphResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public GovernanceDefinitionGraphResponse(GovernanceDefinitionGraphResponse template) + { + super(template); + + if (template != null) + { + this.element = template.getElement(); + } + } + + + /** + * Return the element result. + * + * @return governance definition graph object + */ + public GovernanceDefinitionGraph getElement() + { + return element; + } + + + /** + * Set up the element result. + * + * @param element governance definition graph object + */ + public void setElement(GovernanceDefinitionGraph element) + { + this.element = element; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "GovernanceDefinitionGraphResponse{" + + "element=" + element + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof GovernanceDefinitionGraphResponse that)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + return Objects.equals(element, that.element); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), element); + } +} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceDefinitionRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceDefinitionRequestBody.java similarity index 90% rename from open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceDefinitionRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceDefinitionRequestBody.java index 6b15a1b7d38..76d429c7b89 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceDefinitionRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceDefinitionRequestBody.java @@ -1,12 +1,13 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceDefinitionProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceDefinitionStatus; +import org.odpi.openmetadata.commonservices.ffdc.rest.ExternalSourceRequestBody; +import org.odpi.openmetadata.frameworks.openmetadata.enums.GovernanceDefinitionStatus; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.GovernanceDefinitionProperties; import java.util.Objects; @@ -21,7 +22,7 @@ @JsonIgnoreProperties(ignoreUnknown=true) public class GovernanceDefinitionRequestBody extends ExternalSourceRequestBody { - private GovernanceDefinitionProperties properties = null; + private GovernanceDefinitionProperties properties = null; private GovernanceDefinitionStatus initialStatus = null; diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceDefinitionResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceDefinitionResponse.java new file mode 100644 index 00000000000..24d820769ee --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceDefinitionResponse.java @@ -0,0 +1,124 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.GovernanceDefinitionElement; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * GovernanceDefinitionResponse is the response structure used on the OMAS REST API calls that returns a + * governance definition object as a response. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class GovernanceDefinitionResponse extends FFDCResponseBase +{ + private GovernanceDefinitionElement element = null; + + + /** + * Default constructor + */ + public GovernanceDefinitionResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public GovernanceDefinitionResponse(GovernanceDefinitionResponse template) + { + super(template); + + if (template != null) + { + this.element = template.getElement(); + } + } + + + /** + * Return the element result. + * + * @return definition object + */ + public GovernanceDefinitionElement getElement() + { + return element; + } + + + /** + * Set up the element result. + * + * @param element definition object + */ + public void setElement(GovernanceDefinitionElement element) + { + this.element = element; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "GovernanceDefinitionResponse{" + + "element=" + element + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof GovernanceDefinitionResponse that)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + return Objects.equals(element, that.element); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), element); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceDefinitionsResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceDefinitionsResponse.java new file mode 100644 index 00000000000..bb292b31ebd --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceDefinitionsResponse.java @@ -0,0 +1,124 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.GovernanceDefinitionElement; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * GovernanceDefinitionsResponse is the response structure used on the OMAS REST API calls that return a + * list of governance definitions as a response. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class GovernanceDefinitionsResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public GovernanceDefinitionsResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public GovernanceDefinitionsResponse(GovernanceDefinitionsResponse template) + { + super(template); + + if (template != null) + { + this.elements = template.getElements(); + } + } + + + /** + * Return the list of governance definitions. + * + * @return list of objects or null + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the list of governance definitions. + * + * @param elements - list of objects or null + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "GovernanceDefinitionsResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof GovernanceDefinitionsResponse that)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + return Objects.equals(this.getElements(), that.getElements()); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(elements, super.hashCode()); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceDomainResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceDomainResponse.java new file mode 100644 index 00000000000..e631f712b9e --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceDomainResponse.java @@ -0,0 +1,124 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.GovernanceDomainElement; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * GovernanceDomainResponse is the response structure used on the OMAS REST API calls that returns a + * governance domain definition object as a response. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class GovernanceDomainResponse extends FFDCResponseBase +{ + private GovernanceDomainElement element = null; + + + /** + * Default constructor + */ + public GovernanceDomainResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public GovernanceDomainResponse(GovernanceDomainResponse template) + { + super(template); + + if (template != null) + { + this.element = template.getElement(); + } + } + + + /** + * Return the element result. + * + * @return Governance domain definition object + */ + public GovernanceDomainElement getElement() + { + return element; + } + + + /** + * Set up the element result. + * + * @param element Governance domain definition object + */ + public void setElement(GovernanceDomainElement element) + { + this.element = element; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "GovernanceDomainResponse{" + + "element=" + element + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof GovernanceDomainResponse that)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + return Objects.equals(element, that.element); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), element); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceDomainSetResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceDomainSetResponse.java new file mode 100644 index 00000000000..2e215a5e411 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceDomainSetResponse.java @@ -0,0 +1,124 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.GovernanceDomainSetElement; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * GovernanceDomainResponse is the response structure used on the OMAS REST API calls that returns a + * governance domain definition object as a response. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class GovernanceDomainSetResponse extends FFDCResponseBase +{ + private GovernanceDomainSetElement element = null; + + + /** + * Default constructor + */ + public GovernanceDomainSetResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public GovernanceDomainSetResponse(GovernanceDomainSetResponse template) + { + super(template); + + if (template != null) + { + this.element = template.getElement(); + } + } + + + /** + * Return the element result. + * + * @return Governance domain definition set object + */ + public GovernanceDomainSetElement getElement() + { + return element; + } + + + /** + * Set up the element result. + * + * @param element Governance domain definition set object + */ + public void setElement(GovernanceDomainSetElement element) + { + this.element = element; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "GovernanceDomainSetResponse{" + + "element=" + element + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof GovernanceDomainSetResponse that)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + return Objects.equals(element, that.element); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), element); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceDomainSetsResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceDomainSetsResponse.java new file mode 100644 index 00000000000..e458031e97e --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceDomainSetsResponse.java @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.GovernanceDomainSetElement; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * GovernanceDomainSetsResponse is the response structure used on the OMAS REST API calls that return a + * list of governance domain definition sets as a response. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class GovernanceDomainSetsResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public GovernanceDomainSetsResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public GovernanceDomainSetsResponse(GovernanceDomainSetsResponse template) + { + super(template); + + if (template != null) + { + this.elements = template.getElements(); + } + } + + + /** + * Return the list of governance domain definition sets. + * + * @return list of objects or null + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the list of governance domain definition sets. + * + * @param elements - list of objects or null + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "GovernanceDomainSetsResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof GovernanceDomainSetsResponse that)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + return Objects.equals(this.getElements(), that.getElements()); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(elements, super.hashCode()); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceDomainsResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceDomainsResponse.java new file mode 100644 index 00000000000..fedccad87d0 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceDomainsResponse.java @@ -0,0 +1,126 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.GovernanceDomainElement; + + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * GovernanceDomainsResponse is the response structure used on the OMAS REST API calls that return a + * list of governance domain definitions as a response. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class GovernanceDomainsResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public GovernanceDomainsResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public GovernanceDomainsResponse(GovernanceDomainsResponse template) + { + super(template); + + if (template != null) + { + this.elements = template.getElements(); + } + } + + + /** + * Return the list of governance domain definitions. + * + * @return list of objects or null + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the list of governance domain definitions. + * + * @param elements - list of objects or null + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "GovernanceDomainsResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof GovernanceDomainsResponse that)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + return Objects.equals(this.getElements(), that.getElements()); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(elements, super.hashCode()); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceLevelIdentifierResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceLevelIdentifierResponse.java new file mode 100644 index 00000000000..6e35db6c6e5 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceLevelIdentifierResponse.java @@ -0,0 +1,124 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.GovernanceLevelIdentifierElement; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * GovernanceLevelIdentifierSetResponse is the response structure used on the OMAS REST API calls that returns a + * governance classification level identifier object as a response. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class GovernanceLevelIdentifierResponse extends FFDCResponseBase +{ + private GovernanceLevelIdentifierElement element = null; + + + /** + * Default constructor + */ + public GovernanceLevelIdentifierResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public GovernanceLevelIdentifierResponse(GovernanceLevelIdentifierResponse template) + { + super(template); + + if (template != null) + { + this.element = template.getElement(); + } + } + + + /** + * Return the element result. + * + * @return GovernanceLevelIdentifierProperties object + */ + public GovernanceLevelIdentifierElement getElement() + { + return element; + } + + + /** + * Set up the element result. + * + * @param element GovernanceLevelIdentifierProperties object + */ + public void setElement(GovernanceLevelIdentifierElement element) + { + this.element = element; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "GovernanceLevelIdentifierResponse{" + + "element=" + element + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof GovernanceLevelIdentifierResponse that)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + return Objects.equals(element, that.element); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), element); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceLevelIdentifierSetResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceLevelIdentifierSetResponse.java new file mode 100644 index 00000000000..e6741a34c17 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceLevelIdentifierSetResponse.java @@ -0,0 +1,124 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.GovernanceLevelIdentifierSetElement; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * GovernanceLevelIdentifierSetResponse is the response structure used on the OMAS REST API calls that returns a + * governance classification level identifier set object as a response. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class GovernanceLevelIdentifierSetResponse extends FFDCResponseBase +{ + private GovernanceLevelIdentifierSetElement element = null; + + + /** + * Default constructor + */ + public GovernanceLevelIdentifierSetResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public GovernanceLevelIdentifierSetResponse(GovernanceLevelIdentifierSetResponse template) + { + super(template); + + if (template != null) + { + this.element = template.getElement(); + } + } + + + /** + * Return the element result. + * + * @return GovernanceLevelIdentifierSetProperties object + */ + public GovernanceLevelIdentifierSetElement getElement() + { + return element; + } + + + /** + * Set up the element result. + * + * @param element GovernanceLevelIdentifierSetProperties object + */ + public void setElement(GovernanceLevelIdentifierSetElement element) + { + this.element = element; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "GovernanceLevelIdentifierSetResponse{" + + "element=" + element + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof GovernanceLevelIdentifierSetResponse that)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + return Objects.equals(element, that.element); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), element); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceLevelIdentifierSetsResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceLevelIdentifierSetsResponse.java new file mode 100644 index 00000000000..6ecb9f8af52 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceLevelIdentifierSetsResponse.java @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.GovernanceLevelIdentifierSetElement; +; +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * GovernanceLevelIdentifierSetsResponse is the response structure used on the OMAS REST API calls that return a + * list of governance classification level identifier sets as a response. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class GovernanceLevelIdentifierSetsResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public GovernanceLevelIdentifierSetsResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public GovernanceLevelIdentifierSetsResponse(GovernanceLevelIdentifierSetsResponse template) + { + super(template); + + if (template != null) + { + this.elements = template.getElements(); + } + } + + + /** + * Return the list of governance classification level identifier sets. + * + * @return list of objects or null + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the list of governance classification level identifier sets. + * + * @param elements - list of objects or null + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "GovernanceLevelIdentifierSetsResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof GovernanceLevelIdentifierSetsResponse that)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + return Objects.equals(this.getElements(), that.getElements()); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(elements, super.hashCode()); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceLevelIdentifiersResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceLevelIdentifiersResponse.java new file mode 100644 index 00000000000..e31ef70de17 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceLevelIdentifiersResponse.java @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.GovernanceLevelIdentifierElement; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * GovernanceLevelIdentifiersResponse is the response structure used on the OMAS REST API calls that return a + * list of governance classification level identifiers as a response. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class GovernanceLevelIdentifiersResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public GovernanceLevelIdentifiersResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public GovernanceLevelIdentifiersResponse(GovernanceLevelIdentifiersResponse template) + { + super(template); + + if (template != null) + { + this.elements = template.getElements(); + } + } + + + /** + * Return the list of governance classification level identifiers. + * + * @return list of objects or null + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the list of governance classification level identifiers. + * + * @param elements - list of objects or null + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "GovernanceLevelIdentifiersResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof GovernanceLevelIdentifiersResponse that)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + return Objects.equals(this.getElements(), that.getElements()); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(elements, super.hashCode()); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceMetricImplementationsResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceMetricImplementationsResponse.java new file mode 100644 index 00000000000..c7365dadd79 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceMetricImplementationsResponse.java @@ -0,0 +1,124 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.GovernanceMetricImplementation; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * GovernanceMetricsResponse is the response structure used on the OMAS REST API calls that return a + * list of governance metrics along with details of the data sets where measurements are kept as a response. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class GovernanceMetricImplementationsResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public GovernanceMetricImplementationsResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public GovernanceMetricImplementationsResponse(GovernanceMetricImplementationsResponse template) + { + super(template); + + if (template != null) + { + this.elements = template.getElements(); + } + } + + + /** + * Return the list of governance metrics. + * + * @return list of objects or null + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the list of governance metrics. + * + * @param elements - list of objects or null + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "GovernanceMetricImplementationsResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof GovernanceMetricImplementationsResponse that)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + return Objects.equals(this.getElements(), that.getElements()); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(elements, super.hashCode()); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceMetricResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceMetricResponse.java new file mode 100644 index 00000000000..4a08ceee8aa --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceMetricResponse.java @@ -0,0 +1,124 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.GovernanceMetricElement; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * GovernanceMetricResponse is the response structure used on the OMAS REST API calls that returns a + * governance metric object as a response. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class GovernanceMetricResponse extends FFDCResponseBase +{ + private GovernanceMetricElement element = null; + + + /** + * Default constructor + */ + public GovernanceMetricResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public GovernanceMetricResponse(GovernanceMetricResponse template) + { + super(template); + + if (template != null) + { + this.element = template.getElement(); + } + } + + + /** + * Return the element result. + * + * @return governance metric object + */ + public GovernanceMetricElement getElement() + { + return element; + } + + + /** + * Set up the element result. + * + * @param element governance metric object + */ + public void setElement(GovernanceMetricElement element) + { + this.element = element; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "GovernanceMetricResponse{" + + "element=" + element + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof GovernanceMetricResponse that)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + return Objects.equals(element, that.element); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), element); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceMetricsResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceMetricsResponse.java new file mode 100644 index 00000000000..3f358537935 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceMetricsResponse.java @@ -0,0 +1,124 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.GovernanceMetricElement; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * GovernanceMetricsResponse is the response structure used on the OMAS REST API calls that return a + * list of governance metric as a response. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class GovernanceMetricsResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public GovernanceMetricsResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public GovernanceMetricsResponse(GovernanceMetricsResponse template) + { + super(template); + + if (template != null) + { + this.elements = template.getElements(); + } + } + + + /** + * Return the list of governance metrics. + * + * @return list of objects or null + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the list of governance metrics. + * + * @param elements - list of objects or null + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "GovernanceMetricsResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof GovernanceMetricsResponse that)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + return Objects.equals(this.getElements(), that.getElements()); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(elements, super.hashCode()); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceRoleAppointeesResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceRoleAppointeesResponse.java new file mode 100644 index 00000000000..5b4cdfe29be --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceRoleAppointeesResponse.java @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.GovernanceRoleAppointee; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * GovernanceRoleAppointeesResponse is the response structure used on the OMAS REST API calls that return a + * list of governance roles and their appointees as a response. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class GovernanceRoleAppointeesResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public GovernanceRoleAppointeesResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public GovernanceRoleAppointeesResponse(GovernanceRoleAppointeesResponse template) + { + super(template); + + if (template != null) + { + this.elements = template.getElements(); + } + } + + + /** + * Return the list of governance roles. + * + * @return list of objects or null + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the list of governance roles. + * + * @param elements - list of objects or null + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "GovernanceRoleAppointeesResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof GovernanceRoleAppointeesResponse that)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + return Objects.equals(this.getElements(), that.getElements()); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(elements, super.hashCode()); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceRoleHistoryResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceRoleHistoryResponse.java new file mode 100644 index 00000000000..235a5fc7929 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceRoleHistoryResponse.java @@ -0,0 +1,124 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.GovernanceRoleHistory; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * GovernanceRoleHistoryResponse is the response structure used on the OMAS REST API calls that return a + * governance role object with details of who is and has been appointed to the role as a response. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class GovernanceRoleHistoryResponse extends FFDCResponseBase +{ + private GovernanceRoleHistory element = null; + + + /** + * Default constructor + */ + public GovernanceRoleHistoryResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public GovernanceRoleHistoryResponse(GovernanceRoleHistoryResponse template) + { + super(template); + + if (template != null) + { + this.element = template.getElement(); + } + } + + + /** + * Return the result. + * + * @return GovernanceRoleHistory object + */ + public GovernanceRoleHistory getElement() + { + return element; + } + + + /** + * Set up the result. + * + * @param element GovernanceRoleHistory object + */ + public void setElement(GovernanceRoleHistory element) + { + this.element = element; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "GovernanceRoleHistoryResponse{" + + "element=" + element + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof GovernanceRoleHistoryResponse that)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + return Objects.equals(element, that.element); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), element); + } +} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceRoleRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceRoleRequestBody.java similarity index 89% rename from open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceRoleRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceRoleRequestBody.java index cc7b12f1021..6ca9da2f2b2 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceRoleRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceRoleRequestBody.java @@ -1,13 +1,11 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceDefinitionProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceDefinitionStatus; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceRoleProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.GovernanceRoleProperties; import java.util.Objects; diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceRoleResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceRoleResponse.java new file mode 100644 index 00000000000..8fd4b0a86a3 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceRoleResponse.java @@ -0,0 +1,124 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.GovernanceRoleElement; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * GovernanceRoleResponse is the response structure used on the OMAS REST API calls that returns a + * governance role object as a response. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class GovernanceRoleResponse extends FFDCResponseBase +{ + private GovernanceRoleElement element = null; + + + /** + * Default constructor + */ + public GovernanceRoleResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public GovernanceRoleResponse(GovernanceRoleResponse template) + { + super(template); + + if (template != null) + { + this.element = template.getElement(); + } + } + + + /** + * Return the element result. + * + * @return GovernanceRoleProperties object + */ + public GovernanceRoleElement getElement() + { + return element; + } + + + /** + * Set up the element result. + * + * @param element GovernanceRoleProperties object + */ + public void setElement(GovernanceRoleElement element) + { + this.element = element; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "GovernanceRoleResponse{" + + "element=" + element + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof GovernanceRoleResponse that)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + return Objects.equals(element, that.element); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), element); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceRolesResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceRolesResponse.java new file mode 100644 index 00000000000..abcdccd62bd --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceRolesResponse.java @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.GovernanceRoleElement; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * GovernanceRolesResponse is the response structure used on the OMAS REST API calls that return a + * list of governance roles as a response. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class GovernanceRolesResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public GovernanceRolesResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public GovernanceRolesResponse(GovernanceRolesResponse template) + { + super(template); + + if (template != null) + { + this.elements = template.getElements(); + } + } + + + /** + * Return the list of governance roles. + * + * @return list of objects or null + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the list of governance roles. + * + * @param elements - list of objects or null + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "GovernanceRolesResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof GovernanceRolesResponse that)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + return Objects.equals(this.getElements(), that.getElements()); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(elements, super.hashCode()); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceStatusIdentifierResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceStatusIdentifierResponse.java new file mode 100644 index 00000000000..f8461ec2136 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceStatusIdentifierResponse.java @@ -0,0 +1,124 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.GovernanceStatusIdentifierElement; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * GovernanceStatusIdentifierSetResponse is the response structure used on the OMAS REST API calls that returns a + * governance classification level identifier object as a response. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class GovernanceStatusIdentifierResponse extends FFDCResponseBase +{ + private GovernanceStatusIdentifierElement element = null; + + + /** + * Default constructor + */ + public GovernanceStatusIdentifierResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public GovernanceStatusIdentifierResponse(GovernanceStatusIdentifierResponse template) + { + super(template); + + if (template != null) + { + this.element = template.getElement(); + } + } + + + /** + * Return the element result. + * + * @return GovernanceStatusIdentifierProperties object + */ + public GovernanceStatusIdentifierElement getElement() + { + return element; + } + + + /** + * Set up the element result. + * + * @param element GovernanceStatusIdentifierProperties object + */ + public void setElement(GovernanceStatusIdentifierElement element) + { + this.element = element; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "GovernanceStatusIdentifierResponse{" + + "element=" + element + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof GovernanceStatusIdentifierResponse that)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + return Objects.equals(element, that.element); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), element); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceStatusIdentifierSetResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceStatusIdentifierSetResponse.java new file mode 100644 index 00000000000..28cab2788da --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceStatusIdentifierSetResponse.java @@ -0,0 +1,124 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.GovernanceStatusIdentifierSetElement; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * GovernanceStatusIdentifierSetResponse is the response structure used on the OMAS REST API calls that returns a + * governance classification level identifier set object as a response. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class GovernanceStatusIdentifierSetResponse extends FFDCResponseBase +{ + private GovernanceStatusIdentifierSetElement element = null; + + + /** + * Default constructor + */ + public GovernanceStatusIdentifierSetResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public GovernanceStatusIdentifierSetResponse(GovernanceStatusIdentifierSetResponse template) + { + super(template); + + if (template != null) + { + this.element = template.getElement(); + } + } + + + /** + * Return the element result. + * + * @return GovernanceStatusIdentifierSetProperties object + */ + public GovernanceStatusIdentifierSetElement getElement() + { + return element; + } + + + /** + * Set up the element result. + * + * @param element GovernanceStatusIdentifierSetProperties object + */ + public void setElement(GovernanceStatusIdentifierSetElement element) + { + this.element = element; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "GovernanceStatusIdentifierSetResponse{" + + "element=" + element + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof GovernanceStatusIdentifierSetResponse that)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + return Objects.equals(element, that.element); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), element); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceStatusIdentifierSetsResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceStatusIdentifierSetsResponse.java new file mode 100644 index 00000000000..e6411c63bc0 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceStatusIdentifierSetsResponse.java @@ -0,0 +1,126 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.GovernanceStatusIdentifierSetElement; + + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * GovernanceStatusIdentifierSetsResponse is the response structure used on the OMAS REST API calls that return a + * list of governance classification level identifier sets as a response. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class GovernanceStatusIdentifierSetsResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public GovernanceStatusIdentifierSetsResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public GovernanceStatusIdentifierSetsResponse(GovernanceStatusIdentifierSetsResponse template) + { + super(template); + + if (template != null) + { + this.elements = template.getElements(); + } + } + + + /** + * Return the list of governance classification level identifier sets. + * + * @return list of objects or null + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the list of governance classification level identifier sets. + * + * @param elements - list of objects or null + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "GovernanceStatusIdentifierSetsResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof GovernanceStatusIdentifierSetsResponse that)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + return Objects.equals(this.getElements(), that.getElements()); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(elements, super.hashCode()); + } +} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceStatusRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceStatusRequestBody.java similarity index 84% rename from open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceStatusRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceStatusRequestBody.java index 5cd51a188a8..ac44661d7ea 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/rest/GovernanceStatusRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceStatusRequestBody.java @@ -1,11 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceDefinitionStatus; +import org.odpi.openmetadata.commonservices.ffdc.rest.ExternalSourceRequestBody; +import org.odpi.openmetadata.frameworks.openmetadata.enums.GovernanceDefinitionStatus; import java.util.Objects; @@ -78,10 +79,8 @@ public void setStatus(GovernanceDefinitionStatus status) public String toString() { return "GovernanceStatusRequestBody{" + - "externalSourceGUID='" + getExternalSourceGUID() + '\'' + - ", externalSourceName='" + getExternalSourceName() + '\'' + - ", initialStatus=" + status + - '}'; + "status=" + status + + "} " + super.toString(); } @@ -98,7 +97,7 @@ public boolean equals(Object objectToCompare) { return true; } - if (! (objectToCompare instanceof GovernanceStatusRequestBody)) + if (! (objectToCompare instanceof GovernanceStatusRequestBody that)) { return false; } @@ -106,7 +105,6 @@ public boolean equals(Object objectToCompare) { return false; } - GovernanceStatusRequestBody that = (GovernanceStatusRequestBody) objectToCompare; return status == that.status; } diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceZoneDefinitionResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceZoneDefinitionResponse.java new file mode 100644 index 00000000000..7de92499ea1 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceZoneDefinitionResponse.java @@ -0,0 +1,124 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.GovernanceZoneDefinition; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * GovernanceZoneDefinitionResponse is the response structure used on the OMAS REST API calls that return the properties + * for a governance zone with the linked governance definitions. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class GovernanceZoneDefinitionResponse extends FFDCResponseBase +{ + private GovernanceZoneDefinition properties = null; + + + /** + * Default constructor + */ + public GovernanceZoneDefinitionResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public GovernanceZoneDefinitionResponse(GovernanceZoneDefinitionResponse template) + { + super(template); + + if (template != null) + { + this.properties = template.getProperties(); + } + } + + + /** + * Return the properties result. + * + * @return bean + */ + public GovernanceZoneDefinition getProperties() + { + return properties; + } + + + /** + * Set up the properties result. + * + * @param properties - bean + */ + public void setProperties(GovernanceZoneDefinition properties) + { + this.properties = properties; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "GovernanceZoneDefinitionResponse{" + + "properties=" + properties + + "} " + super.toString(); + } + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof GovernanceZoneDefinitionResponse that)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + return Objects.equals(properties, that.properties); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(properties); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceZoneResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceZoneResponse.java new file mode 100644 index 00000000000..9d27ce8c0a2 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceZoneResponse.java @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.GovernanceZoneElement; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * GovernanceZoneResponse is the response structure used on the OMAS REST API calls that return the properties + * for a governance zone. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class GovernanceZoneResponse extends FFDCResponseBase +{ + private GovernanceZoneElement element = null; + + + /** + * Default constructor + */ + public GovernanceZoneResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public GovernanceZoneResponse(GovernanceZoneResponse template) + { + super(template); + + if (template != null) + { + this.element = template.getElement(); + } + } + + + /** + * Return the element result. + * + * @return bean + */ + public GovernanceZoneElement getElement() + { + return element; + } + + + /** + * Set up the element result. + * + * @param element - bean + */ + public void setElement(GovernanceZoneElement element) + { + this.element = element; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "GovernanceZoneResponse{" + + "element=" + element + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof GovernanceZoneResponse that)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + return Objects.equals(element, that.element); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(element); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceZonesResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceZonesResponse.java new file mode 100644 index 00000000000..710347e9947 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/GovernanceZonesResponse.java @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.GovernanceZoneElement; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * GovernanceZonesResponse is the response structure used on the OMAS REST API calls that return a list of governance zones. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class GovernanceZonesResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public GovernanceZonesResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public GovernanceZonesResponse(GovernanceZonesResponse template) + { + super(template); + + if (template != null) + { + this.elements = template.getElements(); + } + } + + + /** + * Return the resulting elements. + * + * @return list of elements + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the resulting elements. + * + * @param elements list of results + */ + public void setGovernanceZone(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "GovernanceZonesResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof GovernanceZonesResponse that)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + return Objects.equals(elements, that.elements); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(elements); + } +} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/HostRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/HostRequestBody.java similarity index 96% rename from open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/HostRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/HostRequestBody.java index f1d5ea68844..9b8647511e9 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/HostRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/HostRequestBody.java @@ -1,12 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.HostProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.infrastructure.HostProperties; import java.util.Objects; diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/HostResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/HostResponse.java new file mode 100644 index 00000000000..5494949c20b --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/HostResponse.java @@ -0,0 +1,124 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.HostElement; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * HostResponse is a response object for passing back a single host + * element or an exception if the request failed. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class HostResponse extends FFDCResponseBase +{ + private HostElement element = null; + + + /** + * Default constructor + */ + public HostResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public HostResponse(HostResponse template) + { + super(template); + + if (template != null) + { + element = template.getElement(); + } + } + + + /** + * Return the metadata element. + * + * @return result object + */ + public HostElement getElement() + { + return element; + } + + + /** + * Set up the metadata element to return. + * + * @param element result object + */ + public void setElement(HostElement element) + { + this.element = element; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "HostResponse{" + + "element=" + element + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + HostResponse that = (HostResponse) objectToCompare; + return Objects.equals(element, that.element); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), element); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/HostsResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/HostsResponse.java new file mode 100644 index 00000000000..80498e1cf3d --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/HostsResponse.java @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.HostElement; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * HostsResponse is a response object for passing back a a list of hosts + * or an exception if the request failed. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class HostsResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public HostsResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public HostsResponse(HostsResponse template) + { + super(template); + + if (template != null) + { + elements = template.getElements(); + } + } + + + /** + * Return the list of metadata elements. + * + * @return result object + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the metadata element to return. + * + * @param elements result object + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "HostsResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + HostsResponse that = (HostsResponse) objectToCompare; + return Objects.equals(elements, that.elements); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elements); + } +} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ITProfileRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ITProfileRequestBody.java similarity index 94% rename from open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ITProfileRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ITProfileRequestBody.java index 4fb0a0a3116..729298f8580 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ITProfileRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ITProfileRequestBody.java @@ -1,11 +1,11 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.ITProfileProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.ITProfileProperties; import java.util.Objects; @@ -18,7 +18,7 @@ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) -public class ITProfileRequestBody extends MetadataSourceRequestBody +public class ITProfileRequestBody extends ExternalSourceRequestBody { private String itInfrastructureGUID = null; private String itUserId = null; diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ITProfileResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ITProfileResponse.java new file mode 100644 index 00000000000..653e4cf8f82 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ITProfileResponse.java @@ -0,0 +1,124 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ITProfileElement; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * ITProfileResponse is the response structure used on the OMAS REST API calls that return a + * ActorProfileElement object as a response. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ITProfileResponse extends FFDCResponseBase +{ + private ITProfileElement element = null; + + + /** + * Default constructor + */ + public ITProfileResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public ITProfileResponse(ITProfileResponse template) + { + super(template); + + if (template != null) + { + this.element = template.getElement(); + } + } + + + /** + * Return the element result. + * + * @return details of profile + */ + public ITProfileElement getElement() + { + return element; + } + + + /** + * Set up the element result. + * + * @param element details of profile + */ + public void setElement(ITProfileElement element) + { + this.element = element; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "ITProfileResponse{" + + "element=" + element + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof ITProfileResponse that)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + return Objects.equals(element, that.element); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), element); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ITProfilesResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ITProfilesResponse.java new file mode 100644 index 00000000000..8ec01458798 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ITProfilesResponse.java @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ITProfileElement; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * ITProfilesResponse is the response structure used on the OMAS REST API calls that return a + * a list of profile elements. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ITProfilesResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public ITProfilesResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public ITProfilesResponse(ITProfilesResponse template) + { + super(template); + + if (template != null) + { + this.elements = template.getElements(); + } + } + + + /** + * Return the profile result. + * + * @return unique identifier + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the profile result. + * + * @param elements - unique identifier + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "ITProfilesResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof ITProfilesResponse that)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + return Objects.equals(getElements(), that.getElements()); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elements); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/InformalTagResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/InformalTagResponse.java new file mode 100644 index 00000000000..d6210c28025 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/InformalTagResponse.java @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.InformalTagElement; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * InformalTagResponse is the response structure used on the Asset Consumer OMAS REST API calls that returns a + * Tag object as a response. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class InformalTagResponse extends FFDCResponseBase +{ + private InformalTagElement element = null; + + /** + * Default constructor + */ + public InformalTagResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public InformalTagResponse(InformalTagResponse template) + { + super(template); + + if (template != null) + { + this.element = template.getElement(); + } + } + + + /** + * Return the Tag object. + * + * @return tag + */ + public InformalTagElement getElement() + { + return element; + } + + + /** + * Set up the Tag object. + * + * @param element tag object + */ + public void setElement(InformalTagElement element) + { + this.element = element; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "InformalTagResponse{" + + "element=" + element + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + InformalTagResponse that = (InformalTagResponse) objectToCompare; + return Objects.equals(getElement(), that.getElement()); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), getElement()); + } +} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/InformalTagUpdateRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/InformalTagUpdateRequestBody.java similarity index 95% rename from open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/InformalTagUpdateRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/InformalTagUpdateRequestBody.java index ea9f0013346..30015078104 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/InformalTagUpdateRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/InformalTagUpdateRequestBody.java @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetmanager.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -102,13 +102,11 @@ public boolean equals(Object objectToCompare) { return true; } - if (! (objectToCompare instanceof InformalTagUpdateRequestBody)) + if (! (objectToCompare instanceof InformalTagUpdateRequestBody that)) { return false; } - InformalTagUpdateRequestBody that = (InformalTagUpdateRequestBody) objectToCompare; - return description != null ? description.equals(that.description) : that.description == null; } diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/InformalTagsResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/InformalTagsResponse.java new file mode 100644 index 00000000000..a8770867809 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/InformalTagsResponse.java @@ -0,0 +1,115 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.InformalTagElement; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * InformalTagsResponse returns a list of tags from the server. The list may be too long to + * retrieve in a single call so there is support for paging of replies. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class InformalTagsResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public InformalTagsResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public InformalTagsResponse(InformalTagsResponse template) + { + super(template); + + if (template != null) + { + this.elements = template.getElements(); + } + } + + + /** + * Return the list of informal tags in the response. + * + * @return list of informal tags + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the list of informal tags for the response. + * + * @param elements list + */ + public void setElements(List elements) + { + this.elements = elements; + } + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "InformalTagsResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) return true; + if (objectToCompare == null || getClass() != objectToCompare.getClass()) return false; + if (!super.equals(objectToCompare)) return false; + InformalTagsResponse that = (InformalTagsResponse) objectToCompare; + return Objects.equals(elements, that.elements); + } + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), getElements()); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/LicenseIdRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/LicenseIdRequestBody.java new file mode 100644 index 00000000000..8b2b4b34784 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/LicenseIdRequestBody.java @@ -0,0 +1,116 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * LicenseIdRequestBody provides a structure for the unique certificate identifier. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class LicenseIdRequestBody +{ + private String licenseId = null; + + + /** + * Default constructor + */ + public LicenseIdRequestBody() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public LicenseIdRequestBody(LicenseIdRequestBody template) + { + if (template != null) + { + this.licenseId = template.getLicenseId(); + } + } + + + /** + * Return the unique identifier for the license. + * + * @return String identifier + */ + public String getLicenseId() + { + return licenseId; + } + + + /** + * Set up the unique identifier for the license. + * + * @param licenseId String identifier + */ + public void setLicenseId(String licenseId) + { + this.licenseId = licenseId; + } + + + + /** + * JSON-style toString. + * + * @return list of properties and their values. + */ + @Override + public String toString() + { + return "LicenseIdRequestBody{" + + "licenseId='" + licenseId + '\'' + + '}'; + } + + + /** + * Equals method that returns true if containing properties are the same. + * + * @param objectToCompare object to compare + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + LicenseIdRequestBody that = (LicenseIdRequestBody) objectToCompare; + return Objects.equals(licenseId, that.licenseId); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(licenseId); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/LicenseTypeRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/LicenseTypeRequestBody.java new file mode 100644 index 00000000000..5de6b62f0e0 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/LicenseTypeRequestBody.java @@ -0,0 +1,143 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.enums.GovernanceDefinitionStatus; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.LicenseTypeProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * LicenseTypeRequestBody provides a structure used when creating license types. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class LicenseTypeRequestBody +{ + private LicenseTypeProperties properties = null; + private GovernanceDefinitionStatus initialStatus = null; + + + /** + * Default constructor + */ + public LicenseTypeRequestBody() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public LicenseTypeRequestBody(LicenseTypeRequestBody template) + { + if (template != null) + { + this.properties = template.getProperties(); + this.initialStatus = template.getInitialStatus(); + } + } + + + /** + * Return the properties of the license type. + * + * @return properties + */ + public LicenseTypeProperties getProperties() + { + return properties; + } + + + /** + * Set up the properties of the license type. + * + * @param properties properties + */ + public void setProperties(LicenseTypeProperties properties) + { + this.properties = properties; + } + + + /** + * Return the initial status of the license type. + * + * @return instance status + */ + public GovernanceDefinitionStatus getInitialStatus() + { + return initialStatus; + } + + + /** + * Set up the initial status of the license type. + * + * @param initialStatus instance status + */ + public void setInitialStatus(GovernanceDefinitionStatus initialStatus) + { + this.initialStatus = initialStatus; + } + + + /** + * JSON-style toString. + * + * @return list of properties and their values. + */ + @Override + public String toString() + { + return "LicenseTypeRequestBody{" + + "properties=" + properties + + ", initialStatus=" + initialStatus + + '}'; + } + + + /** + * Equals method that returns true if containing properties are the same. + * + * @param objectToCompare object to compare + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + LicenseTypeRequestBody that = (LicenseTypeRequestBody) objectToCompare; + return Objects.equals(properties, that.properties) && + initialStatus == that.initialStatus; + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(properties, initialStatus); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/LicenseTypeResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/LicenseTypeResponse.java new file mode 100644 index 00000000000..34252a20fd8 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/LicenseTypeResponse.java @@ -0,0 +1,123 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.LicenseTypeElement; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * LicenseTypeResponse is the response structure used on the OMAS REST API calls that returns a + * license type object as a response. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class LicenseTypeResponse extends FFDCResponseBase +{ + private LicenseTypeElement element = null; + + + /** + * Default constructor + */ + public LicenseTypeResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public LicenseTypeResponse(LicenseTypeResponse template) + { + super(template); + + if (template != null) + { + this.element = template.getElement(); + } + } + + + /** + * Return the element result. + * + * @return LicenseTypeProperties object + */ + public LicenseTypeElement getElement() + { + return element; + } + + + /** + * Set up the element result. + * + * @param element LicenseTypeProperties object + */ + public void setElement(LicenseTypeElement element) + { + this.element = element; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "LicenseTypeResponse{" + + "element=" + element + + "} " + super.toString(); + } + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof LicenseTypeResponse that)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + return Objects.equals(element, that.element); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), element); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/LicenseTypesResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/LicenseTypesResponse.java new file mode 100644 index 00000000000..cf7306c321b --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/LicenseTypesResponse.java @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.LicenseTypeElement; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * LicenseTypesResponse is the response structure used on the OMAS REST API calls that return a + * list of license types as a response. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class LicenseTypesResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public LicenseTypesResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public LicenseTypesResponse(LicenseTypesResponse template) + { + super(template); + + if (template != null) + { + this.elements = template.getElements(); + } + } + + + /** + * Return the list of license types. + * + * @return list of objects or null + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the list of license types. + * + * @param elements - list of objects or null + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "LicenseTypesResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof LicenseTypesResponse that)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + return Objects.equals(this.getElements(), that.getElements()); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(elements, super.hashCode()); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/LicensesResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/LicensesResponse.java new file mode 100644 index 00000000000..7e5ee686972 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/LicensesResponse.java @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.LicenseElement; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * LicensesResponse is the response structure used on the OMAS REST API calls that return a + * list of licenses as a response. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class LicensesResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public LicensesResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public LicensesResponse(LicensesResponse template) + { + super(template); + + if (template != null) + { + this.elements = template.getElements(); + } + } + + + /** + * Return the list of license types. + * + * @return list of objects or null + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the list of license types. + * + * @param elements - list of objects or null + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "LicensesResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof LicensesResponse that)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + return Objects.equals(this.getElements(), that.getElements()); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(elements, super.hashCode()); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/LineageMappingElementResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/LineageMappingElementResponse.java new file mode 100644 index 00000000000..bb1e636fc52 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/LineageMappingElementResponse.java @@ -0,0 +1,126 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.LineageMappingElement; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * LineageMappingElementResponse is the response structure used on the OMAS REST API calls that return the properties + * for a relationship. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class LineageMappingElementResponse extends FFDCResponseBase +{ + private LineageMappingElement element = null; + + + /** + * Default constructor + */ + public LineageMappingElementResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public LineageMappingElementResponse(LineageMappingElementResponse template) + { + super(template); + + if (template != null) + { + this.element = template.getElement(); + } + } + + + /** + * Return the element result. + * + * @return bean + */ + public LineageMappingElement getElement() + { + return element; + } + + + /** + * Set up the element result. + * + * @param element bean + */ + public void setElement(LineageMappingElement element) + { + this.element = element; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "LineageMappingElementResponse{" + + "element=" + element + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof LineageMappingElementResponse)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + LineageMappingElementResponse that = (LineageMappingElementResponse) objectToCompare; + return Objects.equals(element, that.element); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(element); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/LineageMappingElementsResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/LineageMappingElementsResponse.java new file mode 100644 index 00000000000..3d5b808bc82 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/LineageMappingElementsResponse.java @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.LineageMappingElement; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * LineageMappingElementsResponse is a response object for passing back a a list of lineage mapping relationships + * or an exception if the request failed. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class LineageMappingElementsResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public LineageMappingElementsResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public LineageMappingElementsResponse(LineageMappingElementsResponse template) + { + super(template); + + if (template != null) + { + elements = template.getElements(); + } + } + + + /** + * Return the list of metadata elements. + * + * @return result object + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the metadata element to return. + * + * @param elements result object + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "LineageMappingElementsResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + LineageMappingElementsResponse that = (LineageMappingElementsResponse) objectToCompare; + return Objects.equals(elements, that.elements); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elements); + } +} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/LineageMappingRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/LineageMappingRequestBody.java similarity index 92% rename from open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/LineageMappingRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/LineageMappingRequestBody.java index 2087401529e..3ffaa83e909 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/LineageMappingRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/LineageMappingRequestBody.java @@ -1,12 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.LineageMappingProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.lineage.LineageMappingProperties; import java.util.Objects; @@ -20,7 +20,7 @@ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) -public class LineageMappingRequestBody extends EffectiveTimeMetadataSourceRequestBody +public class LineageMappingRequestBody extends EffectiveTimeQueryRequestBody { private LineageMappingProperties properties = null; diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/LinkedExternalReferenceRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/LinkedExternalReferenceRequestBody.java new file mode 100644 index 00000000000..0909356ad13 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/LinkedExternalReferenceRequestBody.java @@ -0,0 +1,134 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import java.util.Objects; + +public class LinkedExternalReferenceRequestBody extends ExternalReferenceRequestBody +{ + private String linkId = null; + private String linkDescription = null; + + + /** + * Default constructor + */ + public LinkedExternalReferenceRequestBody() + { + super(); + } + + + /** + * Copy/clone constructor. + * + * @param template object to copy + */ + public LinkedExternalReferenceRequestBody(LinkedExternalReferenceRequestBody template) + { + if (template != null) + { + linkId = template.getLinkId(); + linkDescription = template.getLinkDescription(); + } + } + + + /** + * Return the link id. + * + * @return string identifier + */ + public String getLinkId() + { + return linkId; + } + + + /** + * Set up the link id. + * + * @param linkId string identifier + */ + public void setLinkId(String linkId) + { + this.linkId = linkId; + } + + + /** + * Return the link description. + * + * @return string description + */ + public String getLinkDescription() + { + return linkDescription; + } + + + /** + * Set up the link description. + * + * @param linkDescription string description + */ + public void setLinkDescription(String linkDescription) + { + this.linkDescription = linkDescription; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "LinkedExternalReferenceRequestBody{" + + "linkId='" + linkId + '\'' + + ", linkDescription='" + linkDescription + '\'' + + '}'; + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + LinkedExternalReferenceRequestBody that = (LinkedExternalReferenceRequestBody) objectToCompare; + return Objects.equals(linkId, that.linkId) && + Objects.equals(linkDescription, that.linkDescription); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), linkId, linkDescription); + } +} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/LiteralSchemaTypeRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/LiteralSchemaTypeRequestBody.java similarity index 75% rename from open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/LiteralSchemaTypeRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/LiteralSchemaTypeRequestBody.java index d0745213ae0..94f3c39f4e1 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/LiteralSchemaTypeRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/LiteralSchemaTypeRequestBody.java @@ -1,12 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.properties.LiteralSchemaTypeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.LiteralSchemaTypeProperties; import java.util.Objects; @@ -117,24 +117,9 @@ public void setExternalSourceName(String externalSourceName) public String toString() { return "LiteralSchemaTypeRequestBody{" + - "externalSourceGUID='" + externalSourceGUID + '\'' + - ", externalSourceName='" + externalSourceName + '\'' + - ", dataType='" + getDataType() + '\'' + - ", fixedValue='" + getFixedValue() + '\'' + - ", versionNumber='" + getVersionNumber() + '\'' + - ", author='" + getAuthor() + '\'' + - ", usage='" + getUsage() + '\'' + - ", encodingStandard='" + getEncodingStandard() + '\'' + - ", namespace='" + getNamespace() + '\'' + - ", isDeprecated=" + getIsDeprecated() + - ", displayName='" + getDisplayName() + '\'' + - ", description='" + getDescription() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; + "externalSourceGUID='" + externalSourceGUID + '\'' + + ", externalSourceName='" + externalSourceName + '\'' + + "} " + super.toString(); } diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/LocationResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/LocationResponse.java new file mode 100644 index 00000000000..37e8aeff90f --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/LocationResponse.java @@ -0,0 +1,123 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.LocationElement; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * LocationResponse is a response object for passing back a single location object. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class LocationResponse extends FFDCResponseBase +{ + private LocationElement element = null; + + + /** + * Default constructor + */ + public LocationResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public LocationResponse(LocationResponse template) + { + super(template); + + if (template != null) + { + element = template.getElement(); + } + } + + + /** + * Return the metadata element. + * + * @return result object + */ + public LocationElement getElement() + { + return element; + } + + + /** + * Set up the metadata element to return. + * + * @param element result object + */ + public void setElement(LocationElement element) + { + this.element = element; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "LocationResponse{" + + "element=" + element + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + LocationResponse that = (LocationResponse) objectToCompare; + return Objects.equals(element, that.element); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), element); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/LocationsResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/LocationsResponse.java new file mode 100644 index 00000000000..19ed4d0e048 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/LocationsResponse.java @@ -0,0 +1,124 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.LocationElement; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * LocationsResponse is a response object for passing back a list of location objects. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class LocationsResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public LocationsResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public LocationsResponse(LocationsResponse template) + { + super(template); + + if (template != null) + { + elements = template.getElements(); + } + } + + + /** + * Return the list of metadata elements. + * + * @return result object + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the list of metadata elements to return. + * + * @param elements result object + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "LocationsResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + LocationsResponse that = (LocationsResponse) objectToCompare; + return Objects.equals(elements, that.elements); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elements); + } +} diff --git a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/rest/LogRecordRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/LogRecordRequestBody.java similarity index 97% rename from open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/rest/LogRecordRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/LogRecordRequestBody.java index 28fe0fa1d32..7a8e87a7253 100644 --- a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/rest/LogRecordRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/LogRecordRequestBody.java @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetconsumer.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -17,7 +17,7 @@ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) -public class LogRecordRequestBody extends AssetConsumerOMASAPIRequestBody +public class LogRecordRequestBody { private String connectorInstanceId = null; private String connectionName = null; @@ -40,8 +40,6 @@ public LogRecordRequestBody() */ public LogRecordRequestBody(LogRecordRequestBody template) { - super(template); - if (template != null) { this.connectorInstanceId = template.getConnectorInstanceId(); diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/MapSchemaTypeRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/MapSchemaTypeRequestBody.java similarity index 76% rename from open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/MapSchemaTypeRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/MapSchemaTypeRequestBody.java index aca80e963c4..4ea3a515827 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/MapSchemaTypeRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/MapSchemaTypeRequestBody.java @@ -1,12 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.properties.MapSchemaTypeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.MapSchemaTypeProperties; import java.util.Objects; @@ -117,22 +117,9 @@ public void setExternalSourceName(String externalSourceName) public String toString() { return "MapSchemaTypeRequestBody{" + - "externalSourceGUID='" + externalSourceGUID + '\'' + - ", externalSourceName='" + externalSourceName + '\'' + - ", versionNumber='" + getVersionNumber() + '\'' + - ", author='" + getAuthor() + '\'' + - ", usage='" + getUsage() + '\'' + - ", encodingStandard='" + getEncodingStandard() + '\'' + - ", namespace='" + getNamespace() + '\'' + - ", isDeprecated=" + getIsDeprecated() + - ", displayName='" + getDisplayName() + '\'' + - ", description='" + getDescription() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; + "externalSourceGUID='" + externalSourceGUID + '\'' + + ", externalSourceName='" + externalSourceName + '\'' + + "} " + super.toString(); } diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/MeaningResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/MeaningResponse.java new file mode 100644 index 00000000000..9fc52bb9946 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/MeaningResponse.java @@ -0,0 +1,132 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.MeaningElement; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * MeaningResponse is the response structure used on the Asset Consumer OMAS REST API calls that returns a + * Glossary Term object as a response. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class MeaningResponse extends FFDCResponseBase +{ + private MeaningElement meaning = null; + + /** + * Default constructor + */ + public MeaningResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public MeaningResponse(MeaningResponse template) + { + super(template); + + if (template != null) + { + this.meaning = template.getMeaning(); + } + } + + + /** + * Return the glossary term object. + * + * @return glossary term object + */ + public MeaningElement getMeaning() + { + return meaning; + } + + + /** + * Set up the glossary term object. + * + * @param meaning - glossary term object + */ + public void setMeaning(MeaningElement meaning) + { + this.meaning = meaning; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "MeaningResponse{" + + "meaning=" + meaning + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof MeaningResponse that)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + return Objects.equals(getMeaning(), that.getMeaning()); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + if (meaning == null) + { + return super.hashCode(); + } + else + { + return meaning.hashCode(); + } + } + +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/MeaningsResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/MeaningsResponse.java new file mode 100644 index 00000000000..f07b86ec3cf --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/MeaningsResponse.java @@ -0,0 +1,126 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.MeaningElement; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * MeaningsResponse returns a list of meanings from the server. The list may be too long to + * retrieve in a single call so there is support for paging of replies. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class MeaningsResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public MeaningsResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public MeaningsResponse(MeaningsResponse template) + { + super(template); + + if (template != null) + { + this.elements = template.getElements(); + } + } + + + /** + * Return the list of glossary terms in the response. + * + * @return list of glossary terms + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the list of glossary terms for the response. + * + * @param elements list + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "MeaningsResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + MeaningsResponse that = (MeaningsResponse) objectToCompare; + return Objects.equals(getElements(), that.getElements()); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), getElements()); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/MetadataSourceRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/MetadataSourceRequestBody.java new file mode 100644 index 00000000000..91a5b21c1b1 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/MetadataSourceRequestBody.java @@ -0,0 +1,141 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * MetadataSourceRequestBody carries the parameters for marking an asset or schema as external. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class MetadataSourceRequestBody +{ + private String externalSourceGUID = null; + private String externalSourceName = null; + + + /** + * Default constructor + */ + public MetadataSourceRequestBody() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public MetadataSourceRequestBody(MetadataSourceRequestBody template) + { + if (template != null) + { + externalSourceGUID = template.getExternalSourceGUID(); + externalSourceName = template.getExternalSourceName(); + } + } + + + /** + * Return the unique identifier of the software server capability entity that represented the external source - null for local. + * + * @return string guid + */ + public String getExternalSourceGUID() + { + return externalSourceGUID; + } + + + /** + * Set up the unique identifier of the software server capability entity that represented the external source - null for local. + * + * @param externalSourceGUID string guid + */ + public void setExternalSourceGUID(String externalSourceGUID) + { + this.externalSourceGUID = externalSourceGUID; + } + + + /** + * Return the unique name of the software server capability entity that represented the external source. + * + * @return string name + */ + public String getExternalSourceName() + { + return externalSourceName; + } + + + /** + * Set up the unique name of the software server capability entity that represented the external source. + * + * @param externalSourceName string name + */ + public void setExternalSourceName(String externalSourceName) + { + this.externalSourceName = externalSourceName; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "MetadataSourceRequestBody{" + + "externalSourceGUID='" + externalSourceGUID + '\'' + + ", externalSourceName='" + externalSourceName + '\'' + + '}'; + } + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + MetadataSourceRequestBody that = (MetadataSourceRequestBody) objectToCompare; + return Objects.equals(externalSourceGUID, that.externalSourceGUID) && + Objects.equals(externalSourceName, that.externalSourceName); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), externalSourceGUID, externalSourceName); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/MetadataSourceResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/MetadataSourceResponse.java new file mode 100644 index 00000000000..0d6550bcf1e --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/MetadataSourceResponse.java @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.MetadataSourceElement; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * MetadataSourceResponse is the response structure used on the OMAS REST API calls that return a + * MetadataSourceElement object as a response. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class MetadataSourceResponse extends FFDCResponseBase +{ + private MetadataSourceElement element = null; + + + /** + * Default constructor + */ + public MetadataSourceResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public MetadataSourceResponse(MetadataSourceResponse template) + { + super(template); + + if (template != null) + { + this.element = template.getElement(); + } + } + + + /** + * Return the element result. + * + * @return details of metadata source + */ + public MetadataSourceElement getElement() + { + return element; + } + + + /** + * Set up the element result. + * + * @param element details of metadata source + */ + public void setElement(MetadataSourceElement element) + { + this.element = element; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "MetadataSourceResponse{" + + "element=" + element + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof MetadataSourceResponse)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + MetadataSourceResponse that = (MetadataSourceResponse) objectToCompare; + return Objects.equals(element, that.element); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), element); + } +} diff --git a/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/rest/MyProfileRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/MyProfileRequestBody.java similarity index 97% rename from open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/rest/MyProfileRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/MyProfileRequestBody.java index a62c3c30bf6..aa6c4ef0085 100644 --- a/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/rest/MyProfileRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/MyProfileRequestBody.java @@ -1,11 +1,10 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.myprofile.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.communityprofile.rest.CommunityProfileOMASAPIRequestBody; import java.util.HashMap; import java.util.Map; @@ -21,7 +20,7 @@ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) -public class MyProfileRequestBody extends CommunityProfileOMASAPIRequestBody +public class MyProfileRequestBody { private String qualifiedName = null; private String fullName = null; @@ -47,8 +46,6 @@ public MyProfileRequestBody() */ public MyProfileRequestBody(MyProfileRequestBody template) { - super(template); - if (template != null) { this.qualifiedName = template.getQualifiedName(); diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/NameListResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/NameListResponse.java index 11063b4b545..9f7109ee921 100644 --- a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/NameListResponse.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/NameListResponse.java @@ -7,7 +7,6 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import java.util.Arrays; import java.util.List; import java.util.Objects; @@ -59,18 +58,7 @@ public NameListResponse(NameListResponse template) */ public List getNames() { - if (names == null) - { - return null; - } - else if (names.isEmpty()) - { - return null; - } - else - { - return names; - } + return names; } @@ -95,17 +83,7 @@ public String toString() { return "NameListResponse{" + "names=" + names + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; + "} " + super.toString(); } @@ -122,7 +100,7 @@ public boolean equals(Object objectToCompare) { return true; } - if (!(objectToCompare instanceof NameListResponse)) + if (!(objectToCompare instanceof NameListResponse that)) { return false; } @@ -130,7 +108,6 @@ public boolean equals(Object objectToCompare) { return false; } - NameListResponse that = (NameListResponse) objectToCompare; return Objects.equals(names, that.names); } diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/NewCSVFileAssetRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/NewCSVFileAssetRequestBody.java similarity index 98% rename from open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/NewCSVFileAssetRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/NewCSVFileAssetRequestBody.java index 388650d1b80..b7d561704c7 100644 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/NewCSVFileAssetRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/NewCSVFileAssetRequestBody.java @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; diff --git a/open-metadata-implementation/view-services/collection-manager/collection-manager-server/src/main/java/org/odpi/openmetadata/viewservices/collectionmanager/rest/NewCollectionRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/NewCollectionRequestBody.java similarity index 94% rename from open-metadata-implementation/view-services/collection-manager/collection-manager-server/src/main/java/org/odpi/openmetadata/viewservices/collectionmanager/rest/NewCollectionRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/NewCollectionRequestBody.java index 3cd5691a9d1..a711ae65dc6 100644 --- a/open-metadata-implementation/view-services/collection-manager/collection-manager-server/src/main/java/org/odpi/openmetadata/viewservices/collectionmanager/rest/NewCollectionRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/NewCollectionRequestBody.java @@ -1,12 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.collectionmanager.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.digitalservice.properties.CollectionProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.collections.CollectionProperties; import java.util.Objects; diff --git a/open-metadata-implementation/view-services/collection-manager/collection-manager-server/src/main/java/org/odpi/openmetadata/viewservices/collectionmanager/rest/NewDigitalProductRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/NewDigitalProductRequestBody.java similarity index 92% rename from open-metadata-implementation/view-services/collection-manager/collection-manager-server/src/main/java/org/odpi/openmetadata/viewservices/collectionmanager/rest/NewDigitalProductRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/NewDigitalProductRequestBody.java index 8e568d48077..a9ae78079b0 100644 --- a/open-metadata-implementation/view-services/collection-manager/collection-manager-server/src/main/java/org/odpi/openmetadata/viewservices/collectionmanager/rest/NewDigitalProductRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/NewDigitalProductRequestBody.java @@ -1,13 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.collectionmanager.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.digitalservice.properties.CollectionProperties; -import org.odpi.openmetadata.accessservices.digitalservice.properties.DigitalProductProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.digitalbusiness.DigitalProductProperties; import java.util.Objects; diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/NewElementRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/NewElementRequestBody.java new file mode 100644 index 00000000000..e031dfb0aa9 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/NewElementRequestBody.java @@ -0,0 +1,256 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.governanceaction.search.ElementProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * NewElementRequestBody provides a structure for the common properties when creating an element. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class NewElementRequestBody +{ + private String anchorGUID = null; + private boolean isOwnAnchor = false; + private String parentGUID = null; + private String parentRelationshipTypeName = null; + private ElementProperties parentRelationshipProperties = null; + private boolean parentAtEnd1 = true; + + + /** + * Default constructor + */ + public NewElementRequestBody() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public NewElementRequestBody(NewElementRequestBody template) + { + if (template != null) + { + anchorGUID = template.getAnchorGUID(); + isOwnAnchor = template.getIsOwnAnchor(); + parentGUID = template.getParentGUID(); + parentRelationshipTypeName = template.getParentRelationshipTypeName(); + parentRelationshipProperties = template.getParentRelationshipProperties(); + parentAtEnd1 = template.getParentAtEnd1(); + } + } + + + /** + * Return the unique identifier of the element that should be the anchor for the new element. It is set to null if no anchor, + * or the Anchors classification is included in the initial classifications. + * + * @return string guid + */ + public String getAnchorGUID() + { + return anchorGUID; + } + + + /** + * Set up the unique identifier of the element that should be the anchor for the new element. Set to null if no anchor, + * or the new collection should be its own anchor. + * + * @param anchorGUID string guid + */ + public void setAnchorGUID(String anchorGUID) + { + this.anchorGUID = anchorGUID; + } + + + /** + * Return whether this element should be classified as its own anchor or not. The default is false. + * + * @return boolean + */ + public boolean getIsOwnAnchor() + { + return isOwnAnchor; + } + + + /** + * Set up whether this element should be classified as its own anchor or not. The default is false. + * + * @param ownAnchor boolean + */ + public void setIsOwnAnchor(boolean ownAnchor) + { + isOwnAnchor = ownAnchor; + } + + + /** + * Return the optional unique identifier for an element that should be connected to the newly created element. + * If this property is specified, parentRelationshipTypeName must also be specified. + * + * @return string guid + */ + public String getParentGUID() + { + return parentGUID; + } + + + /** + * Set up the optional unique identifier for an element that should be connected to the newly created element. + * If this property is specified, parentRelationshipTypeName must also be specified. + * + * @param parentGUID string guid + */ + public void setParentGUID(String parentGUID) + { + this.parentGUID = parentGUID; + } + + + /** + * Return the name of the relationship, if any, that should be established between the new element and the parent element. + * + * @return string type name + */ + public String getParentRelationshipTypeName() + { + return parentRelationshipTypeName; + } + + + /** + * Set up the name of the optional relationship from the newly created element to a parent element. + * + * @param parentRelationshipTypeName string type name + */ + public void setParentRelationshipTypeName(String parentRelationshipTypeName) + { + this.parentRelationshipTypeName = parentRelationshipTypeName; + } + + + /** + * Return any properties that should be included in the parent relationship. + * + * @return element properties + */ + public ElementProperties getParentRelationshipProperties() + { + return parentRelationshipProperties; + } + + + /** + * Set up any properties that should be included in the parent relationship. + * + * @param parentRelationshipProperties element properties + */ + public void setParentRelationshipProperties(ElementProperties parentRelationshipProperties) + { + this.parentRelationshipProperties = parentRelationshipProperties; + } + + + /** + * Return which end any parent entity sits on the relationship. + * + * @return boolean + */ + public boolean getParentAtEnd1() + { + return parentAtEnd1; + } + + + /** + * Set up which end any parent entity sits on the relationship. + * + * @param parentAtEnd1 boolean + */ + public void setParentAtEnd1(boolean parentAtEnd1) + { + this.parentAtEnd1 = parentAtEnd1; + } + + + /** + * JSON-style toString. + * + * @return list of properties and their values. + */ + @Override + public String toString() + { + return "NewElementRequestBody{" + + ", anchorGUID='" + anchorGUID + '\'' + + ", isOwnAnchor='" + isOwnAnchor + '\'' + + ", parentGUID='" + parentGUID + '\'' + + ", parentRelationshipTypeName='" + parentRelationshipTypeName + '\'' + + ", parentRelationshipProperties=" + parentRelationshipProperties + + ", parentAtEnd1=" + parentAtEnd1 + + '}'; + } + + + /** + * Equals method that returns true if containing properties are the same. + * + * @param objectToCompare object to compare + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (! (objectToCompare instanceof NewElementRequestBody that)) + { + return false; + } + if (! super.equals(objectToCompare)) + { + return false; + } + return parentAtEnd1 == that.parentAtEnd1 && + isOwnAnchor == that.isOwnAnchor && + Objects.equals(anchorGUID, that.anchorGUID) && + Objects.equals(parentGUID, that.parentGUID) && + Objects.equals(parentRelationshipTypeName, that.parentRelationshipTypeName) && + Objects.equals(parentRelationshipProperties, that.parentRelationshipProperties); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), anchorGUID, isOwnAnchor, parentGUID, + parentRelationshipTypeName, parentRelationshipProperties, parentAtEnd1); + } +} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/NewFileAssetRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/NewFileAssetRequestBody.java similarity index 87% rename from open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/NewFileAssetRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/NewFileAssetRequestBody.java index 08036489b45..a87e47760af 100644 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/NewFileAssetRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/NewFileAssetRequestBody.java @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.*; @@ -23,10 +23,10 @@ @JsonSubTypes.Type(value = NewCSVFileAssetRequestBody.class, name = "NewCSVFileAssetRequestBody") }) -public class NewFileAssetRequestBody extends AssetOwnerOMASAPIRequestBody +public class NewFileAssetRequestBody { private String name = null; - private String displayName = null; + private String resourceName = null; private String versionIdentifier = null; private String description = null; private String fullPath = null; @@ -47,13 +47,11 @@ public NewFileAssetRequestBody() */ public NewFileAssetRequestBody(NewFileAssetRequestBody template) { - super(template); - if (template != null) { - name = template.getName(); - displayName = template.getDisplayName(); - description = template.getDescription(); + name = template.getName(); + resourceName = template.getResourceName(); + description = template.getDescription(); fullPath = template.getFullPath(); } } @@ -68,7 +66,7 @@ public String getName() { if (name == null) { - return displayName; + return resourceName; } return name; @@ -110,29 +108,29 @@ public void setVersionIdentifier(String versionIdentifier) /** * Returns the stored display name property for the asset. - * If no display name is available then name is returned. + * If no resource name is available then name is returned. * * @return String name */ - public String getDisplayName() + public String getResourceName() { - if (displayName == null) + if (resourceName == null) { return name; } - return displayName; + return resourceName; } /** * Set up the stored display name property for the asset. * - * @param displayName String name + * @param resourceName String name */ - public void setDisplayName(String displayName) + public void setResourceName(String resourceName) { - this.displayName = displayName; + this.resourceName = resourceName; } diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/NewFileSystemRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/NewFileSystemRequestBody.java similarity index 98% rename from open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/NewFileSystemRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/NewFileSystemRequestBody.java index 41809956f47..c50d9116ee7 100644 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/NewFileSystemRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/NewFileSystemRequestBody.java @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; @@ -21,7 +21,7 @@ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) -public class NewFileSystemRequestBody extends AssetOwnerOMASAPIRequestBody +public class NewFileSystemRequestBody { private String displayName = null; private String description = null; @@ -51,8 +51,6 @@ public NewFileSystemRequestBody() */ public NewFileSystemRequestBody(NewFileSystemRequestBody template) { - super(template); - if (template != null) { displayName = template.getDisplayName(); diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/NewMetadataElementRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/NewMetadataElementRequestBody.java new file mode 100644 index 00000000000..0c73da5526d --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/NewMetadataElementRequestBody.java @@ -0,0 +1,167 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ElementStatus; +import org.odpi.openmetadata.frameworks.governanceaction.search.ElementProperties; + +import java.util.Map; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * NewMetadataElementRequestBody provides a structure for passing the properties for a new metadata element. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class NewMetadataElementRequestBody extends NewElementRequestBody +{ + private String typeName = null; + private ElementStatus initialStatus = null; + private Map initialClassifications = null; + + + + /** + * Default constructor + */ + public NewMetadataElementRequestBody() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public NewMetadataElementRequestBody(NewMetadataElementRequestBody template) + { + super(template); + + if (template != null) + { + typeName = template.getTypeName(); + initialStatus = template.getInitialStatus(); + initialClassifications = template.getInitialClassifications(); + } + } + + + /** + * Return the open metadata type name for the new metadata element. + * + * @return string name + */ + public String getTypeName() + { + return typeName; + } + + + /** + * Set up the open metadata type name for the new metadata element. + * + * @param typeName string name + */ + public void setTypeName(String typeName) + { + this.typeName = typeName; + } + + + /** + * Return the initial status of the metadata element (typically ACTIVE). + * + * @return element status enum value + */ + public ElementStatus getInitialStatus() + { + return initialStatus; + } + + + /** + * Return the map of classification name to properties describing the initial classification for the new metadata element. + * + * @return map of classification name to classification properties (or null for none) + */ + public Map getInitialClassifications() + { + return initialClassifications; + } + + + /** + * Set up the map of classification name to properties describing the initial classification for the new metadata element. + * + * @param initialClassifications map of classification name to classification properties (or null for none) + */ + public void setInitialClassifications(Map initialClassifications) + { + this.initialClassifications = initialClassifications; + } + + + /** + * JSON-style toString. + * + * @return list of properties and their values. + */ + @Override + public String toString() + { + return "NewMetadataElementRequestBody{" + + "typeName='" + typeName + '\'' + + ", initialStatus=" + initialStatus + + ", initialClassifications=" + initialClassifications + + "} " + super.toString(); + } + + + /** + * Equals method that returns true if containing properties are the same. + * + * @param objectToCompare object to compare + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (! (objectToCompare instanceof NewMetadataElementRequestBody that)) + { + return false; + } + if (! super.equals(objectToCompare)) + { + return false; + } + return Objects.equals(typeName, that.typeName) && + initialStatus == that.initialStatus && + Objects.equals(initialClassifications, that.initialClassifications); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), typeName, initialStatus, initialClassifications); + } +} diff --git a/open-metadata-implementation/view-services/project-manager/project-manager-server/src/main/java/org/odpi/openmetadata/viewservices/projectmanager/rest/NewProjectRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/NewProjectRequestBody.java similarity index 97% rename from open-metadata-implementation/view-services/project-manager/project-manager-server/src/main/java/org/odpi/openmetadata/viewservices/projectmanager/rest/NewProjectRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/NewProjectRequestBody.java index 85346d1397d..72cafe1c2fa 100644 --- a/open-metadata-implementation/view-services/project-manager/project-manager-server/src/main/java/org/odpi/openmetadata/viewservices/projectmanager/rest/NewProjectRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/NewProjectRequestBody.java @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.projectmanager.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/OCFConnectionRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/OCFConnectionRequestBody.java new file mode 100644 index 00000000000..a4536da8ccc --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/OCFConnectionRequestBody.java @@ -0,0 +1,151 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * OCFConnectionRequestBody carries the parameters for created a new asset. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class OCFConnectionRequestBody +{ + protected String shortDescription = null; + protected Connection connection = null; + + /** + * Default constructor + */ + public OCFConnectionRequestBody() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public OCFConnectionRequestBody(OCFConnectionRequestBody template) + { + if (template != null) + { + shortDescription = template.getShortDescription(); + connection = template.getConnection(); + } + } + + + /** + * Returns the short description of the asset from relationship with Connection. + * + * @return shortDescription String + */ + public String getShortDescription() + { + return shortDescription; + } + + + /** + * Set up the short description of the asset from relationship with Connection. + * + * @param shortDescription String text + */ + public void setShortDescription(String shortDescription) + { + this.shortDescription = shortDescription; + } + + + /** + * Return the Connection object. + * + * @return connection + */ + public Connection getConnection() + { + if (connection == null) + { + return null; + } + else + { + return connection; + } + } + + + /** + * Set up the Connection object. + * + * @param connection - connection object + */ + public void setConnection(Connection connection) + { + this.connection = connection; + } + + + + /** + * Standard toString method. + * + * @return print out of variables in a JSON-style + */ + @Override + public String toString() + { + return "OCFConnectionRequestBody{" + + "shortDescription='" + shortDescription + '\'' + + ", connection=" + connection + + '}'; + } + + + + /** + * Compare the values of the supplied object with those stored in the current object. + * + * @param objectToCompare supplied object + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + OCFConnectionRequestBody that = (OCFConnectionRequestBody) objectToCompare; + return Objects.equals(getShortDescription(), that.getShortDescription()) && + Objects.equals(getConnection(), that.getConnection()); + } + + + + /** + * Return hash code based on properties. + * + * @return int + */ + @Override + public int hashCode() + { + return Objects.hash(getShortDescription(), getConnection()); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/OCFConnectionResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/OCFConnectionResponse.java new file mode 100644 index 00000000000..dfea4b0ca7b --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/OCFConnectionResponse.java @@ -0,0 +1,132 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * OCFConnectionResponse is the response structure used on REST API calls that return a + * Connection object as a response. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class OCFConnectionResponse extends FFDCResponseBase +{ + private Connection connection = null; + + /** + * Default constructor + */ + public OCFConnectionResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public OCFConnectionResponse(OCFConnectionResponse template) + { + super(template); + + if (template != null) + { + this.connection = template.getConnection(); + } + } + + + /** + * Return the Connection object. + * + * @return connection + */ + public Connection getConnection() + { + return connection; + } + + + /** + * Set up the Connection object. + * + * @param connection - connection object + */ + public void setConnection(Connection connection) + { + this.connection = connection; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "OCFConnectionResponse{" + + "connection=" + connection + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof OCFConnectionResponse)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + OCFConnectionResponse that = (OCFConnectionResponse) objectToCompare; + return Objects.equals(getConnection(), that.getConnection()); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + if (connection == null) + { + return super.hashCode(); + } + else + { + return connection.hashCode(); + } + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/OCFConnectorTypeResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/OCFConnectorTypeResponse.java new file mode 100644 index 00000000000..68569fbb62a --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/OCFConnectorTypeResponse.java @@ -0,0 +1,140 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.connectors.properties.beans.ConnectorType; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * OCFConnectorTypeResponse is the response structure used on REST API calls that return a + * ConnectorType object as a response. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class OCFConnectorTypeResponse extends FFDCResponseBase +{ + private ConnectorType connectorType = null; + + /** + * Default constructor + */ + public OCFConnectorTypeResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public OCFConnectorTypeResponse(OCFConnectorTypeResponse template) + { + super(template); + + if (template != null) + { + this.connectorType = template.getConnectorType(); + } + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public OCFConnectorTypeResponse(ConnectorType template) + { + super(null); + + if (template != null) + { + this.connectorType = template; + } + } + + /** + * Return the ConnectorType object. + * + * @return connectorType + */ + public ConnectorType getConnectorType() + { + return connectorType; + } + + + /** + * Set up the ConnectorType object. + * + * @param connectorType - connectorType object + */ + public void setConnectorType(ConnectorType connectorType) + { + this.connectorType = connectorType; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "OCFConnectorTypeResponse{" + + "connectorType=" + connectorType + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (! (objectToCompare instanceof OCFConnectorTypeResponse response)) + { + return false; + } + if (! super.equals(objectToCompare)) + { + return false; + } + + return connectorType != null ? connectorType.equals(response.connectorType) : response.connectorType == null; + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), connectorType); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/OCFConnectorTypesResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/OCFConnectorTypesResponse.java new file mode 100644 index 00000000000..7c64e2b77f5 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/OCFConnectorTypesResponse.java @@ -0,0 +1,136 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.connectors.properties.beans.ConnectorType; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * OCFConnectorTypesResponse is the response structure used on the OMAS REST API calls that return a + * list of connector types as a response. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class OCFConnectorTypesResponse extends FFDCResponseBase +{ + private List connectorTypes = null; + + + /** + * Default constructor + */ + public OCFConnectorTypesResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public OCFConnectorTypesResponse(OCFConnectorTypesResponse template) + { + super(template); + + if (template != null) + { + this.connectorTypes = template.getConnectorTypes(); + } + } + + + /** + * Return the list result. + * + * @return list of connector types + */ + public List getConnectorTypes() + { + if (connectorTypes == null) + { + return null; + } + else if (connectorTypes.isEmpty()) + { + return null; + } + else + { + return connectorTypes; + } + } + + + /** + * Set up the list result. + * + * @param connectorTypes list of connector types + */ + public void setConnectorTypes(List connectorTypes) + { + this.connectorTypes = connectorTypes; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "OCFConnectorTypesResponse{" + + "connectorTypes=" + connectorTypes + + "} " + super.toString(); + } + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof OCFConnectorTypesResponse that)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + return Objects.equals(connectorTypes, that.connectorTypes); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(connectorTypes); + } +} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/OriginRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/OriginRequestBody.java similarity index 96% rename from open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/OriginRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/OriginRequestBody.java index c2dc918c923..2a6f95dd486 100644 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/OriginRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/OriginRequestBody.java @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -21,7 +21,7 @@ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) -public class OriginRequestBody extends AssetOwnerOMASAPIRequestBody +public class OriginRequestBody { private String organizationGUID = null; private String businessCapabilityGUID = null; @@ -43,8 +43,6 @@ public OriginRequestBody() */ public OriginRequestBody(OriginRequestBody template) { - super(template); - if (template != null) { this.organizationGUID = template.getOrganizationGUID(); diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/OwnerRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/OwnerRequestBody.java similarity index 96% rename from open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/OwnerRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/OwnerRequestBody.java index 1daefe7746c..f6c7411e303 100644 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/OwnerRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/OwnerRequestBody.java @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -18,7 +18,7 @@ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) -public class OwnerRequestBody extends AssetOwnerOMASAPIRequestBody +public class OwnerRequestBody { private String ownerId = null; private String ownerTypeName = null; @@ -39,8 +39,6 @@ public OwnerRequestBody() */ public OwnerRequestBody(OwnerRequestBody template) { - super(template); - if (template != null) { this.ownerId = template.getOwnerId(); diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/PathNameRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/PathNameRequestBody.java new file mode 100644 index 00000000000..f0b9d82b361 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/PathNameRequestBody.java @@ -0,0 +1,109 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.*; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * PathNameRequestBody carries the parameters for creating a new FolderProperties asset. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class PathNameRequestBody extends ExternalSourceRequestBody +{ + private String pathName = null; + + + /** + * Default constructor + */ + public PathNameRequestBody() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public PathNameRequestBody(PathNameRequestBody template) + { + super(template); + + if (template != null) + { + pathName = template.getPathName(); + } + } + + + /** + * Return the full path of the file - this should be unique. + * + * @return string name + */ + public String getPathName() + { + return pathName; + } + + + /** + * Set up the full path of the file - this should be unique. + * + * @param pathName string name + */ + public void setPathName(String pathName) + { + this.pathName = pathName; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "PathNameRequestBody{" + + "pathName='" + pathName + '\'' + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) return true; + if (objectToCompare == null || getClass() != objectToCompare.getClass()) return false; + if (!super.equals(objectToCompare)) return false; + PathNameRequestBody that = (PathNameRequestBody) objectToCompare; + return Objects.equals(pathName, that.pathName); + } + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), pathName); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/PersonRoleAppointeesResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/PersonRoleAppointeesResponse.java new file mode 100644 index 00000000000..57a98b8f89f --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/PersonRoleAppointeesResponse.java @@ -0,0 +1,126 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.PersonRoleAppointee; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * PersonRolesResponse is the response structure used on the OMAS REST API calls that return a + * a list of person role elements. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class PersonRoleAppointeesResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public PersonRoleAppointeesResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public PersonRoleAppointeesResponse(PersonRoleAppointeesResponse template) + { + super(template); + + if (template != null) + { + this.elements = template.getElements(); + } + } + + + /** + * Return the person role result. + * + * @return unique identifier + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the person role result. + * + * @param elements - unique identifier + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "PersonRoleAppointeesResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof PersonRoleAppointeesResponse)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + PersonRoleAppointeesResponse that = (PersonRoleAppointeesResponse) objectToCompare; + return Objects.equals(getElements(), that.getElements()); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elements); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/PersonRoleRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/PersonRoleRequestBody.java new file mode 100644 index 00000000000..545b1a31872 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/PersonRoleRequestBody.java @@ -0,0 +1,122 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.PersonRoleProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * PersonRoleRequestBody provides the request body payload for working on PersonRole entities. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class PersonRoleRequestBody extends ExternalSourceRequestBody +{ + private PersonRoleProperties properties = null; + + + /** + * Default constructor + */ + public PersonRoleRequestBody() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public PersonRoleRequestBody(PersonRoleRequestBody template) + { + super(template); + + if (template != null) + { + properties = template.getProperties(); + } + } + + + /** + * Return the properties for this person role. + * + * @return properties bean + */ + public PersonRoleProperties getProperties() + { + return properties; + } + + + /** + * Set up the properties for this person role. + * + * @param properties properties bean + */ + public void setProperties(PersonRoleProperties properties) + { + this.properties = properties; + } + + + /** + * JSON-style toString. + * + * @return list of properties and their values. + */ + @Override + public String toString() + { + return "PersonRoleRequestBody{" + + "properties=" + properties + + "} " + super.toString(); + } + + + /** + * Equals method that returns true if containing properties are the same. + * + * @param objectToCompare object to compare + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + PersonRoleRequestBody that = (PersonRoleRequestBody) objectToCompare; + return Objects.equals(properties, that.properties); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), properties); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/PersonRoleResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/PersonRoleResponse.java new file mode 100644 index 00000000000..c406d4fda2c --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/PersonRoleResponse.java @@ -0,0 +1,124 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.PersonRoleElement; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * PersonRoleResponse is the response structure used on the OMAS REST API calls that return a + * PersonRoleElement object as a response. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class PersonRoleResponse extends FFDCResponseBase +{ + private PersonRoleElement element = null; + + + /** + * Default constructor + */ + public PersonRoleResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public PersonRoleResponse(PersonRoleResponse template) + { + super(template); + + if (template != null) + { + this.element = template.getElement(); + } + } + + + /** + * Return the element result. + * + * @return details of person role + */ + public PersonRoleElement getElement() + { + return element; + } + + + /** + * Set up the element result. + * + * @param element details of person role + */ + public void setElement(PersonRoleElement element) + { + this.element = element; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "PersonRoleResponse{" + + "element=" + element + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof PersonRoleResponse that)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + return Objects.equals(element, that.element); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), element); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/PersonRolesResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/PersonRolesResponse.java new file mode 100644 index 00000000000..8de5f0e11a4 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/PersonRolesResponse.java @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.PersonRoleElement; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * PersonRolesResponse is the response structure used on the OMAS REST API calls that return + * a list of person role elements. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class PersonRolesResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public PersonRolesResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public PersonRolesResponse(PersonRolesResponse template) + { + super(template); + + if (template != null) + { + this.elements = template.getElements(); + } + } + + + /** + * Return the person role result. + * + * @return unique identifier + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the person role result. + * + * @param elements - unique identifier + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "PersonRolesResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof PersonRolesResponse that)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + return Objects.equals(getElements(), that.getElements()); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elements); + } +} diff --git a/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/rest/PersonalProfileRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/PersonalProfileRequestBody.java similarity index 89% rename from open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/rest/PersonalProfileRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/PersonalProfileRequestBody.java index 496f13ec41a..dad090f796e 100644 --- a/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/rest/PersonalProfileRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/PersonalProfileRequestBody.java @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.myprofile.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -140,14 +140,7 @@ public String toString() "profileUserId='" + profileUserId + '\'' + ", originatingSystemGUID='" + originatingSystemGUID + '\'' + ", originatingSystemName='" + originatingSystemName + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", fullName='" + getFullName() + '\'' + - ", knownName='" + getKnownName() + '\'' + - ", jobTitle='" + getJobTitle() + '\'' + - ", jobRoleDescription='" + getJobRoleDescription() + '\'' + - ", profileProperties=" + getProfileProperties() + - ", additionalProperties=" + getAdditionalProperties() + - '}'; + "} " + super.toString(); } diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/PersonalProfileResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/PersonalProfileResponse.java new file mode 100644 index 00000000000..76b1537324a --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/PersonalProfileResponse.java @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.PersonalProfileUniverse; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * PersonalProfileResponse is the response structure used on the OMAS REST API calls that return a + * PersonalProfileUniverse object as a response. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class PersonalProfileResponse extends FFDCResponseBase +{ + private PersonalProfileUniverse personalProfile = null; + + + /** + * Default constructor + */ + public PersonalProfileResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public PersonalProfileResponse(PersonalProfileResponse template) + { + super(template); + + if (template != null) + { + this.personalProfile = template.getPersonalProfile(); + } + } + + + /** + * Return the personalProfile result. + * + * @return details of individual + */ + public PersonalProfileUniverse getPersonalProfile() + { + return personalProfile; + } + + + /** + * Set up the personalProfile result. + * + * @param personalProfile details of individual + */ + public void setPersonalProfile(PersonalProfileUniverse personalProfile) + { + this.personalProfile = personalProfile; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "PersonalProfileResponse{" + + "personalProfile=" + personalProfile + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof PersonalProfileResponse)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + PersonalProfileResponse that = (PersonalProfileResponse) objectToCompare; + return Objects.equals(personalProfile, that.personalProfile); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), personalProfile); + } +} diff --git a/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/rest/PersonalProfileValidatorRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/PersonalProfileValidatorRequestBody.java similarity index 93% rename from open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/rest/PersonalProfileValidatorRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/PersonalProfileValidatorRequestBody.java index a6326b3dadc..a6cccffad47 100644 --- a/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/rest/PersonalProfileValidatorRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/PersonalProfileValidatorRequestBody.java @@ -1,11 +1,10 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.myprofile.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.communityprofile.rest.CommunityProfileOMASAPIRequestBody; import java.util.Objects; @@ -19,7 +18,7 @@ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) -public class PersonalProfileValidatorRequestBody extends CommunityProfileOMASAPIRequestBody +public class PersonalProfileValidatorRequestBody { private String originatingSystemGUID = null; private String originatingSystemName = null; @@ -40,8 +39,6 @@ public PersonalProfileValidatorRequestBody() */ public PersonalProfileValidatorRequestBody(PersonalProfileValidatorRequestBody template) { - super(template); - if (template != null) { this.originatingSystemGUID = template.getOriginatingSystemGUID(); diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/PersonalProfilesResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/PersonalProfilesResponse.java new file mode 100644 index 00000000000..ce3b1e3d2ed --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/PersonalProfilesResponse.java @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.PersonalProfileUniverse; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * PersonalProfilesResponse is the response structure used on the OMAS REST API calls that return + * a list of personal profile objects. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class PersonalProfilesResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public PersonalProfilesResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public PersonalProfilesResponse(PersonalProfilesResponse template) + { + super(template); + + if (template != null) + { + this.elements = template.getElements(); + } + } + + + /** + * Return the personalProfile result. + * + * @return unique identifier + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the personalProfile result. + * + * @param elements - unique identifier + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "PersonalProfilesResponse{" + + "personalProfiles=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof PersonalProfilesResponse that)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + return Objects.equals(getElements(), that.getElements()); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elements); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/PortElementResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/PortElementResponse.java new file mode 100644 index 00000000000..b54089a460c --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/PortElementResponse.java @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.PortElement; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * PortElementResponse is the response structure used on the OMAS REST API calls that return the properties + * for a element. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class PortElementResponse extends FFDCResponseBase +{ + private PortElement element = null; + + + /** + * Default constructor + */ + public PortElementResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public PortElementResponse(PortElementResponse template) + { + super(template); + + if (template != null) + { + this.element = template.getElement(); + } + } + + + /** + * Return the element result. + * + * @return bean + */ + public PortElement getElement() + { + return element; + } + + + /** + * Set up the element result. + * + * @param element bean + */ + public void setElement(PortElement element) + { + this.element = element; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "PortElementResponse{" + + "element=" + element + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof PortElementResponse that)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + return Objects.equals(element, that.element); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(element); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/PortElementsResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/PortElementsResponse.java new file mode 100644 index 00000000000..d605a608c4e --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/PortElementsResponse.java @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.PortElement; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * PortElementsResponse is a response object for passing back a a list of glossaries + * or an exception if the request failed. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class PortElementsResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public PortElementsResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public PortElementsResponse(PortElementsResponse template) + { + super(template); + + if (template != null) + { + elements = template.getElements(); + } + } + + + /** + * Return the list of metadata elements. + * + * @return result object + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the metadata element to return. + * + * @param elements result object + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "PortElementsResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + PortElementsResponse that = (PortElementsResponse) objectToCompare; + return Objects.equals(elements, that.elements); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elements); + } +} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/PortRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/PortRequestBody.java similarity index 91% rename from open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/PortRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/PortRequestBody.java index e39ec1c7ec1..0db69b5d3be 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/PortRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/PortRequestBody.java @@ -1,12 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.PortProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.processes.PortProperties; import java.util.Objects; @@ -20,9 +20,9 @@ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) -public class PortRequestBody extends MetadataSourceRequestBody +public class PortRequestBody extends ExternalSourceRequestBody { - private PortProperties elementProperties = null; + private PortProperties elementProperties = null; /** diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/PrimaryKeyClassificationRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/PrimaryKeyClassificationRequestBody.java similarity index 86% rename from open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/PrimaryKeyClassificationRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/PrimaryKeyClassificationRequestBody.java index 3bf527cc636..206f6d7950e 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/PrimaryKeyClassificationRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/PrimaryKeyClassificationRequestBody.java @@ -1,12 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetmanager.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.PrimaryKeyProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.PrimaryKeyProperties; import java.util.Objects; @@ -23,8 +23,6 @@ public class PrimaryKeyClassificationRequestBody extends EffectiveTimeQueryReque { private PrimaryKeyProperties primaryKeyProperties = null; - - /** * Default constructor */ @@ -81,11 +79,8 @@ public void setPrimaryKeyProperties(PrimaryKeyProperties primaryKeyProperties) public String toString() { return "PrimaryKeyClassificationRequestBody{" + - "assetManagerGUID='" + getAssetManagerGUID() + '\'' + - ", assetManagerName='" + getAssetManagerName() + '\'' + - ", effectiveTime=" + getEffectiveTime() + - ", primaryKeyProperties=" + primaryKeyProperties + - '}'; + "primaryKeyProperties=" + primaryKeyProperties + + "} " + super.toString(); } diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/PrimitiveSchemaTypeRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/PrimitiveSchemaTypeRequestBody.java similarity index 75% rename from open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/PrimitiveSchemaTypeRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/PrimitiveSchemaTypeRequestBody.java index 06cd5bb5467..5e3fe7c2cc8 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/PrimitiveSchemaTypeRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/PrimitiveSchemaTypeRequestBody.java @@ -1,12 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.properties.PrimitiveSchemaTypeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.PrimitiveSchemaTypeProperties; import java.util.Objects; @@ -117,24 +117,9 @@ public void setExternalSourceName(String externalSourceName) public String toString() { return "PrimitiveSchemaTypeRequestBody{" + - "externalSourceGUID='" + externalSourceGUID + '\'' + - ", externalSourceName='" + externalSourceName + '\'' + - ", dataType='" + getDataType() + '\'' + - ", defaultValue='" + getDefaultValue() + '\'' + - ", versionNumber='" + getVersionNumber() + '\'' + - ", author='" + getAuthor() + '\'' + - ", usage='" + getUsage() + '\'' + - ", encodingStandard='" + getEncodingStandard() + '\'' + - ", namespace='" + getNamespace() + '\'' + - ", isDeprecated=" + getIsDeprecated() + - ", displayName='" + getDisplayName() + '\'' + - ", description='" + getDescription() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; + "externalSourceGUID='" + externalSourceGUID + '\'' + + ", externalSourceName='" + externalSourceName + '\'' + + "} " + super.toString(); } diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ProcessCallElementResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ProcessCallElementResponse.java new file mode 100644 index 00000000000..398d5271ded --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ProcessCallElementResponse.java @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ProcessCallElement; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * ProcessCallElementResponse is the response structure used on the OMAS REST API calls that return the properties + * for a element. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ProcessCallElementResponse extends FFDCResponseBase +{ + private ProcessCallElement element = null; + + + /** + * Default constructor + */ + public ProcessCallElementResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public ProcessCallElementResponse(ProcessCallElementResponse template) + { + super(template); + + if (template != null) + { + this.element = template.getElement(); + } + } + + + /** + * Return the element result. + * + * @return bean + */ + public ProcessCallElement getElement() + { + return element; + } + + + /** + * Set up the element result. + * + * @param element bean + */ + public void setElement(ProcessCallElement element) + { + this.element = element; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "ProcessCallElementResponse{" + + "element=" + element + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof ProcessCallElementResponse that)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + return Objects.equals(element, that.element); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(element); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ProcessCallElementsResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ProcessCallElementsResponse.java new file mode 100644 index 00000000000..33345eaff7c --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ProcessCallElementsResponse.java @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ProcessCallElement; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * ProcessCallElementsResponse is a response object for passing back a a list of process call relationships + * or an exception if the request failed. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ProcessCallElementsResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public ProcessCallElementsResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public ProcessCallElementsResponse(ProcessCallElementsResponse template) + { + super(template); + + if (template != null) + { + elements = template.getElements(); + } + } + + + /** + * Return the list of metadata elements. + * + * @return result object + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the metadata element to return. + * + * @param elements result object + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "ProcessCallElementsResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + ProcessCallElementsResponse that = (ProcessCallElementsResponse) objectToCompare; + return Objects.equals(elements, that.elements); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elements); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ProcessCallRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ProcessCallRequestBody.java new file mode 100644 index 00000000000..edb634b825e --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ProcessCallRequestBody.java @@ -0,0 +1,127 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.lineage.ProcessCallProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * ProcessCallRequestBody describes the request body used when linking elements within processes. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ProcessCallRequestBody extends EffectiveTimeQueryRequestBody +{ + private ProcessCallProperties properties = null; + + + /** + * Default constructor + */ + public ProcessCallRequestBody() + { + super(); + } + + + /** + * Copy/clone constructor. + * + * @param template object to copy + */ + public ProcessCallRequestBody(ProcessCallRequestBody template) + { + super(template); + + if (template != null) + { + properties = template.getProperties(); + } + } + + + /** + * Return the properties for the relationship. + * + * @return properties object + */ + public ProcessCallProperties getProperties() + { + return properties; + } + + + /** + * Set up the properties for the relationship. + * + * @param properties properties object + */ + public void setProperties(ProcessCallProperties properties) + { + this.properties = properties; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "ProcessCallRequestBody{" + + "properties=" + properties + + ", externalSourceGUID='" + getExternalSourceGUID() + '\'' + + ", externalSourceName='" + getExternalSourceName() + '\'' + + '}'; + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + ProcessCallRequestBody that = (ProcessCallRequestBody) objectToCompare; + return Objects.equals(getProperties(), that.getProperties()); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), properties); + } +} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ProcessContainmentTypeRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ProcessContainmentTypeRequestBody.java similarity index 94% rename from open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ProcessContainmentTypeRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ProcessContainmentTypeRequestBody.java index 60d0f440b5a..1ffc55675f1 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ProcessContainmentTypeRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ProcessContainmentTypeRequestBody.java @@ -1,10 +1,11 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.commonservices.ffdc.rest.ExternalSourceRequestBody; import org.odpi.openmetadata.frameworks.openmetadata.enums.ProcessContainmentType; import java.util.Objects; @@ -19,7 +20,7 @@ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) -public class ProcessContainmentTypeRequestBody extends MetadataSourceRequestBody +public class ProcessContainmentTypeRequestBody extends ExternalSourceRequestBody { private ProcessContainmentType processContainmentType = null; diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ProcessElementResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ProcessElementResponse.java new file mode 100644 index 00000000000..7d5a3d5b71b --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ProcessElementResponse.java @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ProcessElement; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * ProcessElementResponse is the response structure used on the OMAS REST API calls that return the properties + * for a element. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ProcessElementResponse extends FFDCResponseBase +{ + private ProcessElement element = null; + + + /** + * Default constructor + */ + public ProcessElementResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public ProcessElementResponse(ProcessElementResponse template) + { + super(template); + + if (template != null) + { + this.element = template.getElement(); + } + } + + + /** + * Return the element result. + * + * @return bean + */ + public ProcessElement getElement() + { + return element; + } + + + /** + * Set up the element result. + * + * @param element bean + */ + public void setElement(ProcessElement element) + { + this.element = element; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "ProcessElementResponse{" + + "element=" + element + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof ProcessElementResponse that)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + return Objects.equals(element, that.element); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(element); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ProcessElementsResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ProcessElementsResponse.java new file mode 100644 index 00000000000..ca0390857f4 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ProcessElementsResponse.java @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ProcessElement; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * ProcessElementsResponse is a response object for passing back a a list of glossaries + * or an exception if the request failed. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ProcessElementsResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public ProcessElementsResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public ProcessElementsResponse(ProcessElementsResponse template) + { + super(template); + + if (template != null) + { + elements = template.getElements(); + } + } + + + /** + * Return the list of metadata elements. + * + * @return result object + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the metadata element to return. + * + * @param elements result object + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "ProcessElementsResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + ProcessElementsResponse that = (ProcessElementsResponse) objectToCompare; + return Objects.equals(elements, that.elements); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elements); + } +} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ProcessRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ProcessRequestBody.java similarity index 89% rename from open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ProcessRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ProcessRequestBody.java index 35fdd069da8..baa988bde30 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ProcessRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ProcessRequestBody.java @@ -1,13 +1,13 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.ProcessProperties; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.ProcessStatus; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ProcessStatus; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.processes.ProcessProperties; import java.util.Objects; @@ -23,8 +23,8 @@ @JsonIgnoreProperties(ignoreUnknown=true) public class ProcessRequestBody { - private ProcessStatus processStatus = null; - private ProcessProperties elementProperties = null; + private ProcessStatus processStatus = null; + private ProcessProperties elementProperties = null; /** diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ProcessStatusRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ProcessStatusRequestBody.java similarity index 94% rename from open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ProcessStatusRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ProcessStatusRequestBody.java index bd588b9a0ef..74470ddb5e6 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ProcessStatusRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ProcessStatusRequestBody.java @@ -1,12 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.ProcessStatus; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ProcessStatus; import java.util.Objects; diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ProfileIdentityRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ProfileIdentityRequestBody.java similarity index 92% rename from open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ProfileIdentityRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ProfileIdentityRequestBody.java index ae4594d3087..0a3309d59fc 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ProfileIdentityRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ProfileIdentityRequestBody.java @@ -1,11 +1,11 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.ProfileIdentityProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.ProfileIdentityProperties; import java.util.Objects; @@ -18,7 +18,7 @@ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) -public class ProfileIdentityRequestBody extends MetadataSourceRequestBody +public class ProfileIdentityRequestBody extends ExternalSourceRequestBody { private ProfileIdentityProperties properties = null; diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ProjectMemberResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ProjectMemberResponse.java new file mode 100644 index 00000000000..04aa67b78c3 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ProjectMemberResponse.java @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ProjectTeamMember; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * ProjectMemberResponse is the response structure used on the OMAS REST API calls that return a + * ProjectTeamMember object as a response. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ProjectMemberResponse extends FFDCResponseBase +{ + private ProjectTeamMember element = null; + + + /** + * Default constructor + */ + public ProjectMemberResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public ProjectMemberResponse(ProjectMemberResponse template) + { + super(template); + + if (template != null) + { + this.element = template.getElement(); + } + } + + + /** + * Return the element result. + * + * @return details of person role + */ + public ProjectTeamMember getElement() + { + return element; + } + + + /** + * Set up the element result. + * + * @param element details of person role + */ + public void setElement(ProjectTeamMember element) + { + this.element = element; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "ProjectMemberResponse{" + + "element=" + element + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof ProjectMemberResponse)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + ProjectMemberResponse that = (ProjectMemberResponse) objectToCompare; + return Objects.equals(element, that.element); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), element); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ProjectMembersResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ProjectMembersResponse.java new file mode 100644 index 00000000000..46998f3eb94 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ProjectMembersResponse.java @@ -0,0 +1,126 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ProjectTeamMember; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * ProjectMembersResponse is the response structure used on the OMAS REST API calls that return + * a list of project membership elements. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ProjectMembersResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public ProjectMembersResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public ProjectMembersResponse(ProjectMembersResponse template) + { + super(template); + + if (template != null) + { + this.elements = template.getElements(); + } + } + + + /** + * Return the project membership result. + * + * @return unique identifier + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the project membership result. + * + * @param elements - unique identifier + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "ProjectMembersResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof ProjectMembersResponse)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + ProjectMembersResponse that = (ProjectMembersResponse) objectToCompare; + return Objects.equals(getElements(), that.getElements()); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elements); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ProjectResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ProjectResponse.java new file mode 100644 index 00000000000..ed934257165 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ProjectResponse.java @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ProjectElement; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * ProjectResponse is the response structure used on the OMAS REST API calls that return a + * ProjectElement object as a response. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ProjectResponse extends FFDCResponseBase +{ + private ProjectElement element = null; + + + /** + * Default constructor + */ + public ProjectResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public ProjectResponse(ProjectResponse template) + { + super(template); + + if (template != null) + { + this.element = template.getElement(); + } + } + + + /** + * Return the element result. + * + * @return details of person role + */ + public ProjectElement getElement() + { + return element; + } + + + /** + * Set up the element result. + * + * @param element details of person role + */ + public void setElement(ProjectElement element) + { + this.element = element; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "ProjectResponse{" + + "element=" + element + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof ProjectResponse)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + ProjectResponse that = (ProjectResponse) objectToCompare; + return Objects.equals(element, that.element); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), element); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ProjectsResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ProjectsResponse.java new file mode 100644 index 00000000000..3d0e1c9e5a0 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ProjectsResponse.java @@ -0,0 +1,126 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ProjectElement; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * ProjectsResponse is the response structure used on the OMAS REST API calls that return + * a list of project elements. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ProjectsResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public ProjectsResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public ProjectsResponse(ProjectsResponse template) + { + super(template); + + if (template != null) + { + this.elements = template.getElements(); + } + } + + + /** + * Return the project result. + * + * @return unique identifier + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the project result. + * + * @param elements - unique identifier + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "ProjectsResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof ProjectsResponse)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + ProjectsResponse that = (ProjectsResponse) objectToCompare; + return Objects.equals(getElements(), that.getElements()); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elements); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/PropertiesResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/PropertiesResponse.java index 9b759767b0a..8f7aa750034 100644 --- a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/PropertiesResponse.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/PropertiesResponse.java @@ -7,7 +7,6 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import java.util.Arrays; import java.util.Map; import java.util.Objects; @@ -94,20 +93,9 @@ public String toString() { return "PropertiesResponse{" + "properties=" + properties + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; + "} " + super.toString(); } - /** * Return comparison result based on the content of the properties. * @@ -121,7 +109,7 @@ public boolean equals(Object objectToCompare) { return true; } - if (!(objectToCompare instanceof PropertiesResponse)) + if (!(objectToCompare instanceof PropertiesResponse that)) { return false; } @@ -129,7 +117,6 @@ public boolean equals(Object objectToCompare) { return false; } - PropertiesResponse that = (PropertiesResponse) objectToCompare; return Objects.equals(getProperties(), that.getProperties()); } diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/QueriesResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/QueriesResponse.java new file mode 100644 index 00000000000..905b2052040 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/QueriesResponse.java @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.QueryElement; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * QueriesResponse is a response object for passing back a a list of queries + * or an exception if the request failed. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class QueriesResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public QueriesResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public QueriesResponse(QueriesResponse template) + { + super(template); + + if (template != null) + { + elements = template.getElements(); + } + } + + + /** + * Return the list of metadata elements. + * + * @return result object + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the metadata element to return. + * + * @param elements result object + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "QueriesResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + QueriesResponse that = (QueriesResponse) objectToCompare; + return Objects.equals(elements, that.elements); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elements); + } +} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/QueryRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/QueryRequestBody.java similarity index 83% rename from open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/QueryRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/QueryRequestBody.java index 9a5a9150788..b50a43f8d55 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/QueryRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/QueryRequestBody.java @@ -1,12 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.properties.QueryProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.display.QueryProperties; import java.util.Objects; @@ -117,16 +117,9 @@ public void setExternalSourceName(String externalSourceName) public String toString() { return "QueryRequestBody{" + - "externalSourceGUID='" + externalSourceGUID + '\'' + - ", externalSourceName='" + externalSourceName + '\'' + - ", name='" + getName() + '\'' + - ", description='" + getDescription() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; + "externalSourceGUID='" + externalSourceGUID + '\'' + + ", externalSourceName='" + externalSourceName + '\'' + + "} " + super.toString(); } diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/QueryResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/QueryResponse.java new file mode 100644 index 00000000000..9f4430cb98e --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/QueryResponse.java @@ -0,0 +1,124 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.QueryElement; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * QueryResponse is a response object for passing back a single query + * element or an exception if the request failed. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class QueryResponse extends FFDCResponseBase +{ + private QueryElement element = null; + + + /** + * Default constructor + */ + public QueryResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public QueryResponse(QueryResponse template) + { + super(template); + + if (template != null) + { + element = template.getElement(); + } + } + + + /** + * Return the metadata element. + * + * @return result object + */ + public QueryElement getElement() + { + return element; + } + + + /** + * Set up the metadata element to return. + * + * @param element result object + */ + public void setElement(QueryElement element) + { + this.element = element; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "QueryResponse{" + + "element=" + element + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + QueryResponse that = (QueryResponse) objectToCompare; + return Objects.equals(element, that.element); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), element); + } +} diff --git a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/rest/RatingRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/RatingRequestBody.java similarity index 98% rename from open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/rest/RatingRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/RatingRequestBody.java index 53968b6843c..d53b191b70d 100644 --- a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/rest/RatingRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/RatingRequestBody.java @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetconsumer.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -15,9 +15,7 @@ /** * RatingRequestBody stores information about a rating connected to an asset. Ratings provide informal feedback on the quality of assets * and can be added at any time. - * * Ratings have the userId of the person who added it, a star rating and an optional review comment. - * * The content of the rating is a personal judgement (which is why the user's id is in the object) * and there is no formal review of the ratings. However, they can be used as a basis for crowd-sourcing * feedback to asset owners. diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ReferenceValueAssignmentDefinitionsResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ReferenceValueAssignmentDefinitionsResponse.java new file mode 100644 index 00000000000..ea3cae8d085 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ReferenceValueAssignmentDefinitionsResponse.java @@ -0,0 +1,124 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ReferenceValueAssignmentDefinitionElement; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * ReferenceValueAssignmentDefinitionsResponse is a response object for passing back a list of elements. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ReferenceValueAssignmentDefinitionsResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public ReferenceValueAssignmentDefinitionsResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public ReferenceValueAssignmentDefinitionsResponse(ReferenceValueAssignmentDefinitionsResponse template) + { + super(template); + + if (template != null) + { + elements = template.getElements(); + } + } + + + /** + * Return the metadata element. + * + * @return result object + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the metadata element to return. + * + * @param elements result object + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "ReferenceValueAssignmentDefinitionsResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + ReferenceValueAssignmentDefinitionsResponse that = (ReferenceValueAssignmentDefinitionsResponse) objectToCompare; + return Objects.equals(elements, that.elements); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elements); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ReferenceValueAssignmentItemsResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ReferenceValueAssignmentItemsResponse.java new file mode 100644 index 00000000000..5d7fa7dcdcb --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ReferenceValueAssignmentItemsResponse.java @@ -0,0 +1,124 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ReferenceValueAssignmentItemElement; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * ReferenceValueAssignmentItemsResponse is a response object for passing back a list of elements. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ReferenceValueAssignmentItemsResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public ReferenceValueAssignmentItemsResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public ReferenceValueAssignmentItemsResponse(ReferenceValueAssignmentItemsResponse template) + { + super(template); + + if (template != null) + { + elements = template.getElements(); + } + } + + + /** + * Return the metadata element. + * + * @return result object + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the metadata element to return. + * + * @param elements result object + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "ReferenceValueAssignmentItemsResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + ReferenceValueAssignmentItemsResponse that = (ReferenceValueAssignmentItemsResponse) objectToCompare; + return Objects.equals(elements, that.elements); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elements); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ReferenceableRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ReferenceableRequestBody.java new file mode 100644 index 00000000000..fb10a380ac6 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ReferenceableRequestBody.java @@ -0,0 +1,170 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ReferenceableProperties; + +import java.util.*; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * ReferenceableRequestBody provides a structure for passing a referenceables' properties as a request body over a REST API. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ReferenceableRequestBody extends ExternalSourceRequestBody +{ + private String anchorGUID = null; + private String parentGUID = null; + private ReferenceableProperties properties = null; + + + + /** + * Default constructor + */ + public ReferenceableRequestBody() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public ReferenceableRequestBody(ReferenceableRequestBody template) + { + if (template != null) + { + anchorGUID = template.getAnchorGUID(); + parentGUID = template.getParentGUID(); + properties = template.getProperties(); + } + } + + + + /** + * Return the properties for the relationship. + * + * @return properties object + */ + public ReferenceableProperties getProperties() + { + return properties; + } + + + /** + * Set up the properties for the relationship. + * + * @param properties properties object + */ + public void setProperties(ReferenceableProperties properties) + { + this.properties = properties; + } + + + /** + * Return an optional anchor GUID to attach the new element to. + * + * @return guid + */ + public String getAnchorGUID() + { + return anchorGUID; + } + + + /** + * Set up an optional anchor GUID to attach the new element to. + * + * @param anchorGUID guid + */ + public void setAnchorGUID(String anchorGUID) + { + this.anchorGUID = anchorGUID; + } + + + /** + * Return an optional anchor GUID to attach the new element to. + * + * @return guid + */ + public String getParentGUID() + { + return parentGUID; + } + + + /** + * Set up an optional anchor GUID to attach the new element to. + * + * @param parentGUID guid + */ + public void setParentGUID(String parentGUID) + { + this.parentGUID = parentGUID; + } + + + /** + * JSON-style toString. + * + * @return list of properties and their values. + */ + @Override + public String toString() + { + return "ReferenceableRequestBody{" + + "anchorGUID='" + anchorGUID + '\'' + + ", parentGUID='" + parentGUID + '\'' + + ", properties=" + properties + + "} " + super.toString(); + } + + + + /** + * Equals method that returns true if containing properties are the same. + * + * @param objectToCompare object to compare + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (! (objectToCompare instanceof ReferenceableRequestBody that)) + { + return false; + } + return Objects.equals(anchorGUID, that.anchorGUID) && + Objects.equals(parentGUID, that.parentGUID) && + Objects.equals(properties, that.properties); + } + + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(anchorGUID, parentGUID, properties); + } +} diff --git a/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/rest/ReferenceableUpdateRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ReferenceableUpdateRequestBody.java similarity index 90% rename from open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/rest/ReferenceableUpdateRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ReferenceableUpdateRequestBody.java index e240ff083fe..8b83b9830d6 100644 --- a/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/rest/ReferenceableUpdateRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ReferenceableUpdateRequestBody.java @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.myprofile.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -103,11 +103,9 @@ public void setUpdateDescription(String updateDescription) public String toString() { return "ReferenceableUpdateRequestBody{" + - "effectiveTime=" + effectiveTime + - ", updateDescription='" + updateDescription + '\'' + - ", elementProperties=" + getElementProperties() + - ", parentGUID='" + getParentGUID() + '\'' + - '}'; + "effectiveTime=" + effectiveTime + + ", updateDescription='" + updateDescription + '\'' + + "} " + super.toString(); } diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/RegisteredOMAGServicesResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/RegisteredOMAGServicesResponse.java index 46edcc47971..a35a6affa72 100644 --- a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/RegisteredOMAGServicesResponse.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/RegisteredOMAGServicesResponse.java @@ -6,7 +6,6 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import java.util.Arrays; import java.util.List; import java.util.Objects; @@ -56,18 +55,7 @@ public RegisteredOMAGServicesResponse(RegisteredOMAGServicesResponse template) */ public List getServices() { - if (services == null) - { - return null; - } - else if (services.isEmpty()) - { - return null; - } - else - { - return services; - } + return services; } @@ -92,17 +80,7 @@ public String toString() { return "RegisteredOMAGServicesResponse{" + "services=" + services + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; + "} " + super.toString(); } diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/RelatedAssetsResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/RelatedAssetsResponse.java new file mode 100644 index 00000000000..2bb88bb0df5 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/RelatedAssetsResponse.java @@ -0,0 +1,126 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.RelatedAssetElement; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * RelatedAssetsResponse is a response object for passing back a list of related assets with te properties from the relationship + * or an exception if the request failed. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class RelatedAssetsResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public RelatedAssetsResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public RelatedAssetsResponse(RelatedAssetsResponse template) + { + super(template); + + if (template != null) + { + elements = template.getElements(); + } + } + + + /** + * Return the list of metadata elements. + * + * @return result object + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the metadata element to return. + * + * @param elements result object + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "RelatedAssetsResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + RelatedAssetsResponse that = (RelatedAssetsResponse) objectToCompare; + return Objects.equals(elements, that.elements); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elements); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/RelatedElementsResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/RelatedElementsResponse.java new file mode 100644 index 00000000000..b36e08a5296 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/RelatedElementsResponse.java @@ -0,0 +1,124 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.RelatedElement; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * RelatedElementsResponse is a response object for passing back a list of relatedElement objects. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class RelatedElementsResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public RelatedElementsResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public RelatedElementsResponse(RelatedElementsResponse template) + { + super(template); + + if (template != null) + { + elements = template.getElements(); + } + } + + + /** + * Return the list of metadata elements. + * + * @return result object + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the list of metadata elements to return. + * + * @param elements result object + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "RelatedElementsResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + RelatedElementsResponse that = (RelatedElementsResponse) objectToCompare; + return Objects.equals(elements, that.elements); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elements); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/RelationshipElementResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/RelationshipElementResponse.java new file mode 100644 index 00000000000..1b001d58b09 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/RelationshipElementResponse.java @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.RelationshipElement; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * RelationshipElementResponse is the response structure used on the OMAS REST API calls that return the properties + * for a relationship. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class RelationshipElementResponse extends FFDCResponseBase +{ + private RelationshipElement element = null; + + + /** + * Default constructor + */ + public RelationshipElementResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public RelationshipElementResponse(RelationshipElementResponse template) + { + super(template); + + if (template != null) + { + this.element = template.getElement(); + } + } + + + /** + * Return the element result. + * + * @return bean + */ + public RelationshipElement getElement() + { + return element; + } + + + /** + * Set up the element result. + * + * @param element bean + */ + public void setElement(RelationshipElement element) + { + this.element = element; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "RelationshipElementResponse{" + + "element=" + element + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof RelationshipElementResponse that)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + return Objects.equals(element, that.element); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(element); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/RelationshipElementsResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/RelationshipElementsResponse.java new file mode 100644 index 00000000000..05c27e32cf4 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/RelationshipElementsResponse.java @@ -0,0 +1,127 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.RelationshipElement; + + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * RelationshipElementsResponse is a response object for passing back a list of relationships + * or an exception if the request failed. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class RelationshipElementsResponse extends FFDCResponseBase +{ + + private List elements = null; + + + /** + * Default constructor + */ + public RelationshipElementsResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public RelationshipElementsResponse(RelationshipElementsResponse template) + { + super(template); + + if (template != null) + { + elements = template.getElements(); + } + } + + + /** + * Return the list of metadata elements. + * + * @return result object + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the metadata element to return. + * + * @param elements result object + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "RelationshipElementsResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + RelationshipElementsResponse that = (RelationshipElementsResponse) objectToCompare; + return Objects.equals(elements, that.elements); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elements); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/RelationshipRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/RelationshipRequestBody.java new file mode 100644 index 00000000000..913fcc4e8fb --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/RelationshipRequestBody.java @@ -0,0 +1,151 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * RelationshipRequestBody describes the request body used when linking elements together. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class RelationshipRequestBody extends EffectiveTimeQueryRequestBody +{ + private String relationshipName = null; + private RelationshipProperties properties = null; + + + /** + * Default constructor + */ + public RelationshipRequestBody() + { + super(); + } + + + /** + * Copy/clone constructor. + * + * @param template object to copy + */ + public RelationshipRequestBody(RelationshipRequestBody template) + { + super(template); + + if (template != null) + { + relationshipName = template.getRelationshipName(); + properties = template.getProperties(); + } + } + + + /** + * Return the name of the relationship type. + * + * @return type name + */ + public String getRelationshipName() + { + return relationshipName; + } + + + /** + * Set up the name of the relationship type. + * + * @param relationshipName type name + */ + public void setRelationshipName(String relationshipName) + { + this.relationshipName = relationshipName; + } + + + /** + * Return the properties for the relationship. + * + * @return properties object + */ + public RelationshipProperties getProperties() + { + return properties; + } + + + /** + * Set up the properties for the relationship. + * + * @param properties properties object + */ + public void setProperties(RelationshipProperties properties) + { + this.properties = properties; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "RelationshipRequestBody{" + + "relationshipName='" + relationshipName + '\'' + + ", properties=" + properties + + ", effectiveTime=" + getEffectiveTime() + + '}'; + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + RelationshipRequestBody that = (RelationshipRequestBody) objectToCompare; + return Objects.equals(getProperties(), that.getProperties()); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), relationshipName, properties); + } +} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/ReportRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ReportRequestBody.java similarity index 77% rename from open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/ReportRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ReportRequestBody.java index a11c16e9603..7e36e633f33 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/ReportRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ReportRequestBody.java @@ -1,12 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.properties.ReportProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.display.ReportProperties; import java.util.Objects; @@ -117,22 +117,9 @@ public void setExternalSourceName(String externalSourceName) public String toString() { return "ReportRequestBody{" + - "externalSourceGUID='" + externalSourceGUID + '\'' + - ", externalSourceName='" + externalSourceName + '\'' + - ", id='" + getId() + '\'' + - ", author='" + getAuthor() + '\'' + - ", url='" + getUrl() + '\'' + - ", createTime=" + getCreateTime() + - ", lastModifiedTime=" + getLastModifiedTime() + - ", lastModifier='" + getLastModifier() + '\'' + - ", name='" + getName() + '\'' + - ", description='" + getDescription() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; + "externalSourceGUID='" + externalSourceGUID + '\'' + + ", externalSourceName='" + externalSourceName + '\'' + + "} " + super.toString(); } diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ReportResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ReportResponse.java new file mode 100644 index 00000000000..27f10cfb55a --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ReportResponse.java @@ -0,0 +1,124 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ReportElement; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * ReportResponse is a response object for passing back a single report + * element or an exception if the request failed. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ReportResponse extends FFDCResponseBase +{ + private ReportElement element = null; + + + /** + * Default constructor + */ + public ReportResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public ReportResponse(ReportResponse template) + { + super(template); + + if (template != null) + { + element = template.getElement(); + } + } + + + /** + * Return the metadata element. + * + * @return result object + */ + public ReportElement getElement() + { + return element; + } + + + /** + * Set up the metadata element to return. + * + * @param element result object + */ + public void setElement(ReportElement element) + { + this.element = element; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "ReportResponse{" + + "element=" + element + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + ReportResponse that = (ReportResponse) objectToCompare; + return Objects.equals(element, that.element); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), element); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ReportsResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ReportsResponse.java new file mode 100644 index 00000000000..1e9712027eb --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ReportsResponse.java @@ -0,0 +1,126 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ReportElement; + + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * ReportsResponse is a response object for passing back a a list of reports + * or an exception if the request failed. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ReportsResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public ReportsResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public ReportsResponse(ReportsResponse template) + { + super(template); + + if (template != null) + { + elements = template.getElements(); + } + } + + + /** + * Return the list of metadata elements. + * + * @return result object + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the metadata element to return. + * + * @param elements result object + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "ReportsResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + ReportsResponse that = (ReportsResponse) objectToCompare; + return Objects.equals(elements, that.elements); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elements); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ResponseParameterization.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ResponseParameterization.java deleted file mode 100644 index 224850efd68..00000000000 --- a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ResponseParameterization.java +++ /dev/null @@ -1,44 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.commonservices.ffdc.rest; - -import org.springframework.core.GenericTypeResolver; -import org.springframework.core.ParameterizedTypeReference; -import org.springframework.core.ResolvableType; - -/** - * @param The type of the parameterized class whose objects will be returned in responses. - * The purpose of this interface is to enable capturing and passing a generic result. */ -public interface ResponseParameterization { - /** - * @return the response class type inherited from {@link GenericResponse} - */ - @SuppressWarnings("rawtypes") - Class responseType(); - - /** - * Default method for return class type for Result - * - * This only works for classes where the first generic parameter matches the return type Result. - * If your class has different logic, you can override the method and writing your own logic detecting the class type - * or explicitly specify the returned class. - * - * @return class type for Result - * @throws IllegalArgumentException if actualTypeArguments length is not equal one. - */ - @SuppressWarnings("unchecked") - default Class resultType() { - return (Class) GenericTypeResolver.resolveTypeArgument(getClass(), ResponseParameterization.class); - } - - /** - * Default method for return {@link ParameterizedTypeReference} - * - * @return {@link ParameterizedTypeReference} {@link GenericResponse} - * with the necessary universal type to use universal queries in RestTemplate used in SpringRESTClientConnector. - */ - default ParameterizedTypeReference> getParameterizedType() { - ResolvableType resolvableType = ResolvableType.forClassWithGenerics(responseType(), resultType()); - return ParameterizedTypeReference.forType(resolvableType.getType()); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SchemaAttributeRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SchemaAttributeRequestBody.java new file mode 100644 index 00000000000..5dfde5a49f1 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SchemaAttributeRequestBody.java @@ -0,0 +1,163 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.SchemaAttributeProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * SchemaAttributeRequestBody describes the properties of the schema attribute plus the optional identifiers for an + * owning software server capability. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class SchemaAttributeRequestBody extends SchemaAttributeProperties +{ + private String externalSourceGUID = null; + private String externalSourceName = null; + + + /** + * Default constructor + */ + public SchemaAttributeRequestBody() + { + super(); + } + + + /** + * Copy/clone constructor. + * + * @param template object to copy + */ + public SchemaAttributeRequestBody(SchemaAttributeRequestBody template) + { + super(template); + + if (template != null) + { + externalSourceGUID = template.getExternalSourceGUID(); + externalSourceName = template.getExternalSourceName(); + } + } + + + /** + * Copy/clone constructor. + * + * @param template object to copy + */ + public SchemaAttributeRequestBody(SchemaAttributeProperties template) + { + super(template); + } + + + /** + * Return the unique identifier of the software server capability entity that represented the external source - null for local. + * + * @return string guid + */ + public String getExternalSourceGUID() + { + return externalSourceGUID; + } + + + /** + * Set up the unique identifier of the software server capability entity that represented the external source - null for local. + * + * @param externalSourceGUID string guid + */ + public void setExternalSourceGUID(String externalSourceGUID) + { + this.externalSourceGUID = externalSourceGUID; + } + + + /** + * Return the unique name of the software server capability entity that represented the external source. + * + * @return string name + */ + public String getExternalSourceName() + { + return externalSourceName; + } + + + /** + * Set up the unique name of the software server capability entity that represented the external source. + * + * @param externalSourceName string name + */ + public void setExternalSourceName(String externalSourceName) + { + this.externalSourceName = externalSourceName; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "SchemaAttributeRequestBody{" + + "externalSourceGUID='" + externalSourceGUID + '\'' + + ", externalSourceName='" + externalSourceName + '\'' + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + SchemaAttributeRequestBody that = (SchemaAttributeRequestBody) objectToCompare; + return Objects.equals(externalSourceGUID, that.externalSourceGUID) && + Objects.equals(externalSourceName, that.externalSourceName); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), externalSourceGUID, externalSourceName); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SchemaAttributeResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SchemaAttributeResponse.java new file mode 100644 index 00000000000..5742f64811b --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SchemaAttributeResponse.java @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.SchemaAttributeElement; + + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * SchemaAttributeResponse is a response object for passing back a single schema attribute + * element or an exception if the request failed. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class SchemaAttributeResponse extends FFDCResponseBase +{ + private SchemaAttributeElement element = null; + + + /** + * Default constructor + */ + public SchemaAttributeResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public SchemaAttributeResponse(SchemaAttributeResponse template) + { + super(template); + + if (template != null) + { + element = template.getElement(); + } + } + + + /** + * Return the metadata element. + * + * @return result object + */ + public SchemaAttributeElement getElement() + { + return element; + } + + + /** + * Set up the metadata element to return. + * + * @param element result object + */ + public void setElement(SchemaAttributeElement element) + { + this.element = element; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "SchemaAttributeResponse{" + + "element=" + element + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + SchemaAttributeResponse that = (SchemaAttributeResponse) objectToCompare; + return Objects.equals(element, that.element); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), element); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SchemaAttributesResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SchemaAttributesResponse.java new file mode 100644 index 00000000000..eddffa1408f --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SchemaAttributesResponse.java @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.SchemaAttributeElement; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * SchemaAttributesResponse is a response object for passing back a a list of schema attributes + * or an exception if the request failed. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class SchemaAttributesResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public SchemaAttributesResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public SchemaAttributesResponse(SchemaAttributesResponse template) + { + super(template); + + if (template != null) + { + elements = template.getElements(); + } + } + + + /** + * Return the list of metadata elements. + * + * @return result object + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the metadata element to return. + * + * @param elements result object + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "SchemaAttributesResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + SchemaAttributesResponse that = (SchemaAttributesResponse) objectToCompare; + return Objects.equals(elements, that.elements); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elements); + } +} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/SchemaTypeChoiceRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SchemaTypeChoiceRequestBody.java similarity index 79% rename from open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/SchemaTypeChoiceRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SchemaTypeChoiceRequestBody.java index fcb7cded79e..f3640b7722a 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/SchemaTypeChoiceRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SchemaTypeChoiceRequestBody.java @@ -1,12 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.properties.SchemaTypeChoiceProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.SchemaTypeChoiceProperties; import java.util.List; import java.util.Objects; @@ -141,23 +141,10 @@ public void setSchemaTypeOptionGUIDs(List schemaTypeOptionGUIDs) public String toString() { return "SchemaTypeChoiceRequestBody{" + - "externalSourceGUID='" + externalSourceGUID + '\'' + - ", externalSourceName='" + externalSourceName + '\'' + - ", schemaTypeOptionGUIDs=" + schemaTypeOptionGUIDs + - ", versionNumber='" + getVersionNumber() + '\'' + - ", author='" + getAuthor() + '\'' + - ", usage='" + getUsage() + '\'' + - ", encodingStandard='" + getEncodingStandard() + '\'' + - ", namespace='" + getNamespace() + '\'' + - ", isDeprecated=" + getIsDeprecated() + - ", displayName='" + getDisplayName() + '\'' + - ", description='" + getDescription() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; + "externalSourceGUID='" + externalSourceGUID + '\'' + + ", externalSourceName='" + externalSourceName + '\'' + + ", schemaTypeOptionGUIDs=" + schemaTypeOptionGUIDs + + "} " + super.toString(); } diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SchemaTypeElementResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SchemaTypeElementResponse.java new file mode 100644 index 00000000000..e85f5a5ac1a --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SchemaTypeElementResponse.java @@ -0,0 +1,124 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.SchemaTypeElement; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * SchemaTypeElementResponse is the response structure used on the OMAS REST API calls that return the properties for an element. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class SchemaTypeElementResponse extends FFDCResponseBase +{ + private SchemaTypeElement element = null; + + + /** + * Default constructor + */ + public SchemaTypeElementResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public SchemaTypeElementResponse(SchemaTypeElementResponse template) + { + super(template); + + if (template != null) + { + this.element = template.getElement(); + } + } + + + /** + * Return the element result. + * + * @return bean + */ + public SchemaTypeElement getElement() + { + return element; + } + + + /** + * Set up the element result. + * + * @param element bean + */ + public void setElement(SchemaTypeElement element) + { + this.element = element; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "SchemaTypeElementResponse{" + + "element=" + element + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof SchemaTypeElementResponse that)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + return Objects.equals(element, that.element); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), element); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SchemaTypeElementsResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SchemaTypeElementsResponse.java new file mode 100644 index 00000000000..7f18e91b6d3 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SchemaTypeElementsResponse.java @@ -0,0 +1,124 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.SchemaTypeElement; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * SchemaTypeElementsResponse is a response object for passing back a list of elements or an exception if the request failed. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class SchemaTypeElementsResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public SchemaTypeElementsResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public SchemaTypeElementsResponse(SchemaTypeElementsResponse template) + { + super(template); + + if (template != null) + { + elements = template.getElements(); + } + } + + + /** + * Return the list of metadata elements. + * + * @return result object + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the metadata element to return. + * + * @param elements result object + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "SchemaTypeElementsResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + SchemaTypeElementsResponse that = (SchemaTypeElementsResponse) objectToCompare; + return Objects.equals(elements, that.elements); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elements); + } +} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/SchemaTypeRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SchemaTypeRequestBody.java similarity index 76% rename from open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/SchemaTypeRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SchemaTypeRequestBody.java index 2215602300a..a8ea2a9d549 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/SchemaTypeRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SchemaTypeRequestBody.java @@ -1,12 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.properties.SchemaTypeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.SchemaTypeProperties; import java.util.Objects; @@ -117,22 +117,9 @@ public void setExternalSourceName(String externalSourceName) public String toString() { return "SchemaTypeRequestBody{" + - "externalSourceGUID='" + externalSourceGUID + '\'' + - ", externalSourceName='" + externalSourceName + '\'' + - ", versionNumber='" + getVersionNumber() + '\'' + - ", author='" + getAuthor() + '\'' + - ", usage='" + getUsage() + '\'' + - ", encodingStandard='" + getEncodingStandard() + '\'' + - ", namespace='" + getNamespace() + '\'' + - ", isDeprecated=" + getIsDeprecated() + - ", displayName='" + getDisplayName() + '\'' + - ", description='" + getDescription() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; + "externalSourceGUID='" + externalSourceGUID + '\'' + + ", externalSourceName='" + externalSourceName + '\'' + + "} " + super.toString(); } diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SchemaTypeResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SchemaTypeResponse.java new file mode 100644 index 00000000000..138259b9731 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SchemaTypeResponse.java @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.SchemaTypeElement; + + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * SchemaTypeResponse is a response object for passing back a single topic + * element or an exception if the request failed. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class SchemaTypeResponse extends FFDCResponseBase +{ + private SchemaTypeElement element = null; + + + /** + * Default constructor + */ + public SchemaTypeResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public SchemaTypeResponse(SchemaTypeResponse template) + { + super(template); + + if (template != null) + { + element = template.getElement(); + } + } + + + /** + * Return the metadata element. + * + * @return result object + */ + public SchemaTypeElement getElement() + { + return element; + } + + + /** + * Set up the metadata element to return. + * + * @param element result object + */ + public void setElement(SchemaTypeElement element) + { + this.element = element; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "SchemaTypeResponse{" + + "element=" + element + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + SchemaTypeResponse that = (SchemaTypeResponse) objectToCompare; + return Objects.equals(element, that.element); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), element); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SchemaTypesResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SchemaTypesResponse.java new file mode 100644 index 00000000000..715b7d9444d --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SchemaTypesResponse.java @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.SchemaTypeElement; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * SchemaTypesResponse is a response object for passing back a a list of schema types + * or an exception if the request failed. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class SchemaTypesResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public SchemaTypesResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public SchemaTypesResponse(SchemaTypesResponse template) + { + super(template); + + if (template != null) + { + elements = template.getElements(); + } + } + + + /** + * Return the list of metadata elements. + * + * @return result object + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the metadata element to return. + * + * @param elements result object + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "SchemaTypesResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + SchemaTypesResponse that = (SchemaTypesResponse) objectToCompare; + return Objects.equals(elements, that.elements); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elements); + } +} diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/SecureLocationRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SecureLocationRequestBody.java similarity index 97% rename from open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/SecureLocationRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SecureLocationRequestBody.java index 50d5ed341bb..cc705511798 100644 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/rest/SecureLocationRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SecureLocationRequestBody.java @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalarchitecture.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SecurityGroupResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SecurityGroupResponse.java new file mode 100644 index 00000000000..87ee86de62b --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SecurityGroupResponse.java @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.SecurityGroupElement; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * SecurityGroupResponse is the response structure used on the OMAS REST API calls that return the properties + * for a security group. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class SecurityGroupResponse extends FFDCResponseBase +{ + private SecurityGroupElement element = null; + + + /** + * Default constructor + */ + public SecurityGroupResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public SecurityGroupResponse(SecurityGroupResponse template) + { + super(template); + + if (template != null) + { + this.element = template.getElement(); + } + } + + + /** + * Return the result. + * + * @return bean + */ + public SecurityGroupElement getElement() + { + return element; + } + + + /** + * Set up the result. + * + * @param element bean + */ + public void setElement(SecurityGroupElement element) + { + this.element = element; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "SecurityGroupResponse{" + + "element=" + element + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof SecurityGroupResponse that)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + return Objects.equals(element, that.element); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(element); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SecurityGroupsResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SecurityGroupsResponse.java new file mode 100644 index 00000000000..009de876532 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SecurityGroupsResponse.java @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.SecurityGroupElement; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * SecurityGroupsResponse is a response object for passing back a a list of security groups + * or an exception if the request failed. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class SecurityGroupsResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public SecurityGroupsResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public SecurityGroupsResponse(SecurityGroupsResponse template) + { + super(template); + + if (template != null) + { + elements = template.getElements(); + } + } + + + /** + * Return the list of metadata elements. + * + * @return result object + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the metadata element to return. + * + * @param elements result object + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "SecurityGroupsResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + SecurityGroupsResponse that = (SecurityGroupsResponse) objectToCompare; + return Objects.equals(elements, that.elements); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elements); + } +} diff --git a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/rest/SecurityManagerRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SecurityManagerRequestBody.java similarity index 96% rename from open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/rest/SecurityManagerRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SecurityManagerRequestBody.java index 5cb226e15c2..18fdcfe39f5 100644 --- a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/rest/SecurityManagerRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SecurityManagerRequestBody.java @@ -1,12 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.securitymanager.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.securitymanager.properties.SecurityManagerProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities.SecurityManagerProperties; import java.util.Objects; diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/SecurityTagsRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SecurityTagsRequestBody.java similarity index 83% rename from open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/SecurityTagsRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SecurityTagsRequestBody.java index 495083a4fbc..baa2e2e7722 100644 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/SecurityTagsRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SecurityTagsRequestBody.java @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -19,7 +19,7 @@ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) -public class SecurityTagsRequestBody extends AssetOwnerOMASAPIRequestBody +public class SecurityTagsRequestBody { private List securityLabels = null; private Map securityProperties = null; @@ -41,8 +41,6 @@ public SecurityTagsRequestBody() */ public SecurityTagsRequestBody(SecurityTagsRequestBody template) { - super(template); - if (template != null) { this.securityLabels = template.getSecurityLabels(); @@ -58,18 +56,7 @@ public SecurityTagsRequestBody(SecurityTagsRequestBody template) */ public List getSecurityLabels() { - if (securityLabels == null) - { - return null; - } - else if (securityLabels.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(securityLabels); - } + return securityLabels; } @@ -91,18 +78,7 @@ public void setSecurityLabels(List securityLabels) */ public Map getSecurityProperties() { - if (securityProperties == null) - { - return null; - } - else if (securityProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(securityProperties); - } + return securityProperties; } @@ -124,14 +100,6 @@ public void setSecurityProperties(Map securityProperties) */ public Map> getAccessGroups() { - if (accessGroups == null) - { - return null; - } - if (accessGroups.isEmpty()) - { - return null; - } return accessGroups; } diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ServerAssetUseRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ServerAssetUseRequestBody.java similarity index 85% rename from open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ServerAssetUseRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ServerAssetUseRequestBody.java index 286f8daaeae..18f06c72880 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/ServerAssetUseRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ServerAssetUseRequestBody.java @@ -1,11 +1,11 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.ServerAssetUseProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.infrastructure.ServerAssetUseProperties; import java.util.Objects; @@ -19,7 +19,7 @@ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) -public class ServerAssetUseRequestBody extends MetadataSourceRequestBody +public class ServerAssetUseRequestBody extends ExternalSourceRequestBody { private ServerAssetUseProperties properties = null; @@ -78,10 +78,8 @@ public void setProperties(ServerAssetUseProperties properties) public String toString() { return "ServerAssetUseRequestBody{" + - "properties=" + properties + - ", externalSourceGUID='" + getExternalSourceGUID() + '\'' + - ", externalSourceName='" + getExternalSourceName() + '\'' + - '}'; + "properties=" + properties + + "} " + super.toString(); } diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ServerAssetUseResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ServerAssetUseResponse.java new file mode 100644 index 00000000000..f46aa090bdb --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ServerAssetUseResponse.java @@ -0,0 +1,124 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ServerAssetUseElement; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * ServerAssetUseResponse is a response object for passing back a single relationship between a software server + * capability and an asset (or an exception if the request failed). + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ServerAssetUseResponse extends FFDCResponseBase +{ + private ServerAssetUseElement element = null; + + + /** + * Default constructor + */ + public ServerAssetUseResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public ServerAssetUseResponse(ServerAssetUseResponse template) + { + super(template); + + if (template != null) + { + element = template.getElement(); + } + } + + + /** + * Return the metadata element. + * + * @return result object + */ + public ServerAssetUseElement getElement() + { + return element; + } + + + /** + * Set up the metadata element to return. + * + * @param element result object + */ + public void setElement(ServerAssetUseElement element) + { + this.element = element; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "ServerAssetUseResponse{" + + "element=" + element + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + ServerAssetUseResponse that = (ServerAssetUseResponse) objectToCompare; + return Objects.equals(element, that.element); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), element); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ServerAssetUsesResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ServerAssetUsesResponse.java new file mode 100644 index 00000000000..b54664aebbc --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ServerAssetUsesResponse.java @@ -0,0 +1,124 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ServerAssetUseElement; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * ServerAssetUsesResponse returns a list of serverAssetUse relationships from the server. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ServerAssetUsesResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public ServerAssetUsesResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public ServerAssetUsesResponse(ServerAssetUsesResponse template) + { + super(template); + + if (template != null) + { + this.elements = template.getElements(); + } + } + + + /** + * Return the list of assets in the response. + * + * @return list of assets + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the list of assets for the response. + * + * @param elements list of assets + */ + public void setElements(List elements) + { + this.elements = elements; + } + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "ServerAssetUsesResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (! super.equals(objectToCompare)) + { + return false; + } + ServerAssetUsesResponse that = (ServerAssetUsesResponse) objectToCompare; + return Objects.equals(elements, that.elements); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elements); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SoftwareCapabilitiesResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SoftwareCapabilitiesResponse.java new file mode 100644 index 00000000000..fb5f20ff0d2 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SoftwareCapabilitiesResponse.java @@ -0,0 +1,126 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.SoftwareCapabilityElement; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * SoftwareCapabilitiesResponse is a response object for passing back a a list of software server capabilities + * or an exception if the request failed. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class SoftwareCapabilitiesResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public SoftwareCapabilitiesResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public SoftwareCapabilitiesResponse(SoftwareCapabilitiesResponse template) + { + super(template); + + if (template != null) + { + elements = template.getElements(); + } + } + + + /** + * Return the list of metadata elements. + * + * @return result object + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the metadata element to return. + * + * @param elements result object + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "SoftwareCapabilitiesResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + SoftwareCapabilitiesResponse that = (SoftwareCapabilitiesResponse) objectToCompare; + return Objects.equals(elements, that.elements); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elements); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SoftwareCapabilityRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SoftwareCapabilityRequestBody.java new file mode 100644 index 00000000000..eb45a787718 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SoftwareCapabilityRequestBody.java @@ -0,0 +1,202 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities.SoftwareCapabilityProperties; + + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * SoftwareCapabilityRequestBody describes the properties of the software server capability for creation and update. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class SoftwareCapabilityRequestBody extends SoftwareCapabilityProperties +{ + private String externalSourceGUID = null; + private String externalSourceName = null; + private String classificationName = null; + + + /** + * Default constructor + */ + public SoftwareCapabilityRequestBody() + { + super(); + } + + + /** + * Copy/clone constructor. + * + * @param template object to copy + */ + public SoftwareCapabilityRequestBody(SoftwareCapabilityRequestBody template) + { + super(template); + + if (template != null) + { + externalSourceGUID = template.getExternalSourceGUID(); + externalSourceName = template.getExternalSourceName(); + classificationName = template.getClassificationName(); + } + } + + + /** + * Copy/clone constructor. + * + * @param template object to copy + */ + public SoftwareCapabilityRequestBody(SoftwareCapabilityProperties template) + { + super(template); + } + + + /** + * Return the unique identifier of the software server capability entity that represented the external source - null for local. + * + * @return string guid + */ + public String getExternalSourceGUID() + { + return externalSourceGUID; + } + + + /** + * Set up the unique identifier of the software server capability entity that represented the external source - null for local. + * + * @param externalSourceGUID string guid + */ + public void setExternalSourceGUID(String externalSourceGUID) + { + this.externalSourceGUID = externalSourceGUID; + } + + + /** + * Return the unique name of the software server capability entity that represented the external source. + * + * @return string name + */ + public String getExternalSourceName() + { + return externalSourceName; + } + + + /** + * Set up the unique name of the software server capability entity that represented the external source. + * + * @param externalSourceName string name + */ + public void setExternalSourceName(String externalSourceName) + { + this.externalSourceName = externalSourceName; + } + + + /** + * Return the optional classification name for the software server capability. + * + * @return string name + */ + public String getClassificationName() + { + return classificationName; + } + + + /** + * Set up the optional classification name for the software server capability. + * + * @param classificationName string name + */ + public void setClassificationName(String classificationName) + { + this.classificationName = classificationName; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "SoftwareCapabilityRequestBody{" + + "externalSourceGUID='" + externalSourceGUID + '\'' + + ", externalSourceName='" + externalSourceName + '\'' + + ", classificationName='" + classificationName + '\'' + + ", displayName='" + getResourceName() + '\'' + + ", description='" + getResourceDescription() + '\'' + + ", typeDescription='" + getDeployedImplementationType() + '\'' + + ", version='" + getVersion() + '\'' + + ", patchLevel='" + getPatchLevel() + '\'' + + ", source='" + getSource() + '\'' + + ", effectiveFrom=" + getEffectiveFrom() + + ", effectiveTo=" + getEffectiveTo() + + ", qualifiedName='" + getQualifiedName() + '\'' + + ", additionalProperties=" + getAdditionalProperties() + + ", vendorProperties=" + getVendorProperties() + + ", typeName='" + getTypeName() + '\'' + + ", extendedProperties=" + getExtendedProperties() + + '}'; + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (! super.equals(objectToCompare)) + { + return false; + } + SoftwareCapabilityRequestBody that = (SoftwareCapabilityRequestBody) objectToCompare; + return Objects.equals(externalSourceGUID, that.externalSourceGUID) && + Objects.equals(externalSourceName, that.externalSourceName) && + Objects.equals(classificationName, that.classificationName); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), externalSourceGUID, externalSourceName, classificationName); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SoftwareCapabilityResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SoftwareCapabilityResponse.java new file mode 100644 index 00000000000..0f7956a927b --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SoftwareCapabilityResponse.java @@ -0,0 +1,123 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.SoftwareCapabilityElement; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * SoftwareCapabilityResponse is a response object for passing back a single software server capability + * element or an exception if the request failed. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class SoftwareCapabilityResponse extends FFDCResponseBase +{ + private SoftwareCapabilityElement element = null; + + + /** + * Default constructor + */ + public SoftwareCapabilityResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public SoftwareCapabilityResponse(SoftwareCapabilityResponse template) + { + super(template); + + if (template != null) + { + element = template.getElement(); + } + } + + + /** + * Return the metadata element. + * + * @return result object + */ + public SoftwareCapabilityElement getElement() + { + return element; + } + + + /** + * Set up the metadata element to return. + * + * @param element result object + */ + public void setElement(SoftwareCapabilityElement element) + { + this.element = element; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "SoftwareCapabilityResponse{" + + "element=" + element + + "} " + super.toString(); + } + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + SoftwareCapabilityResponse that = (SoftwareCapabilityResponse) objectToCompare; + return Objects.equals(element, that.element); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), element); + } +} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/SoftwareServerPlatformRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SoftwareServerPlatformRequestBody.java similarity index 96% rename from open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/SoftwareServerPlatformRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SoftwareServerPlatformRequestBody.java index ec735cf34c3..446728e0c96 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/SoftwareServerPlatformRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SoftwareServerPlatformRequestBody.java @@ -1,12 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.SoftwareServerPlatformProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.infrastructure.SoftwareServerPlatformProperties; import java.util.Objects; diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SoftwareServerPlatformResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SoftwareServerPlatformResponse.java new file mode 100644 index 00000000000..7ea7157a5d7 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SoftwareServerPlatformResponse.java @@ -0,0 +1,124 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.SoftwareServerPlatformElement; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * SoftwareServerPlatformResponse is a response object for passing back a single software server platform + * element or an exception if the request failed. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class SoftwareServerPlatformResponse extends FFDCResponseBase +{ + private SoftwareServerPlatformElement element = null; + + + /** + * Default constructor + */ + public SoftwareServerPlatformResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public SoftwareServerPlatformResponse(SoftwareServerPlatformResponse template) + { + super(template); + + if (template != null) + { + element = template.getElement(); + } + } + + + /** + * Return the metadata element. + * + * @return result object + */ + public SoftwareServerPlatformElement getElement() + { + return element; + } + + + /** + * Set up the metadata element to return. + * + * @param element result object + */ + public void setElement(SoftwareServerPlatformElement element) + { + this.element = element; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "SoftwareServerPlatformResponse{" + + "element=" + element + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + SoftwareServerPlatformResponse that = (SoftwareServerPlatformResponse) objectToCompare; + return Objects.equals(element, that.element); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), element); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SoftwareServerPlatformsResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SoftwareServerPlatformsResponse.java new file mode 100644 index 00000000000..cc49041c7d9 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SoftwareServerPlatformsResponse.java @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.SoftwareServerPlatformElement; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * SoftwareServerPlatformsResponse is a response object for passing back a a list of software server platforms + * or an exception if the request failed. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class SoftwareServerPlatformsResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public SoftwareServerPlatformsResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public SoftwareServerPlatformsResponse(SoftwareServerPlatformsResponse template) + { + super(template); + + if (template != null) + { + elements = template.getElements(); + } + } + + + /** + * Return the list of metadata elements. + * + * @return result object + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the metadata element to return. + * + * @param elements result object + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "SoftwareServerPlatformsResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + SoftwareServerPlatformsResponse that = (SoftwareServerPlatformsResponse) objectToCompare; + return Objects.equals(elements, that.elements); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elements); + } +} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/SoftwareServerRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SoftwareServerRequestBody.java similarity index 96% rename from open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/SoftwareServerRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SoftwareServerRequestBody.java index 119db34738d..03e511253b0 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/SoftwareServerRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SoftwareServerRequestBody.java @@ -1,12 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.SoftwareServerProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.infrastructure.SoftwareServerProperties; import java.util.Objects; diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SoftwareServerResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SoftwareServerResponse.java new file mode 100644 index 00000000000..fff047e51c1 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SoftwareServerResponse.java @@ -0,0 +1,124 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.SoftwareServerElement; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * SoftwareServerResponse is a response object for passing back a single software server + * element or an exception if the request failed. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class SoftwareServerResponse extends FFDCResponseBase +{ + private SoftwareServerElement element = null; + + + /** + * Default constructor + */ + public SoftwareServerResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public SoftwareServerResponse(SoftwareServerResponse template) + { + super(template); + + if (template != null) + { + element = template.getElement(); + } + } + + + /** + * Return the metadata element. + * + * @return result object + */ + public SoftwareServerElement getElement() + { + return element; + } + + + /** + * Set up the metadata element to return. + * + * @param element result object + */ + public void setElement(SoftwareServerElement element) + { + this.element = element; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "SoftwareServerResponse{" + + "element=" + element + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + SoftwareServerResponse that = (SoftwareServerResponse) objectToCompare; + return Objects.equals(element, that.element); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), element); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SoftwareServersResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SoftwareServersResponse.java new file mode 100644 index 00000000000..4b9e11e0c79 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SoftwareServersResponse.java @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.SoftwareServerElement; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * SoftwareServersResponse is a response object for passing back a a list of software servers + * or an exception if the request failed. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class SoftwareServersResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public SoftwareServersResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public SoftwareServersResponse(SoftwareServersResponse template) + { + super(template); + + if (template != null) + { + elements = template.getElements(); + } + } + + + /** + * Return the list of metadata elements. + * + * @return result object + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the metadata element to return. + * + * @param elements result object + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "SoftwareServersResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + SoftwareServersResponse that = (SoftwareServersResponse) objectToCompare; + return Objects.equals(elements, that.elements); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elements); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/StringMapResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/StringMapResponse.java index 4589f3a9d19..895685937cc 100644 --- a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/StringMapResponse.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/StringMapResponse.java @@ -7,7 +7,6 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import java.util.Arrays; import java.util.Map; import java.util.Objects; @@ -84,20 +83,9 @@ public String toString() { return "StringMapResponse{" + "stringMap=" + stringMap + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; + "} " + super.toString(); } - /** * Return comparison result based on the content of the properties. * @@ -111,7 +99,7 @@ public boolean equals(Object objectToCompare) { return true; } - if (!(objectToCompare instanceof StringMapResponse)) + if (!(objectToCompare instanceof StringMapResponse that)) { return false; } @@ -119,7 +107,6 @@ public boolean equals(Object objectToCompare) { return false; } - StringMapResponse that = (StringMapResponse) objectToCompare; return Objects.equals(stringMap, that.stringMap); } diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/StringResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/StringResponse.java index 1d31898fad9..3d80b194364 100644 --- a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/StringResponse.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/StringResponse.java @@ -7,7 +7,6 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import java.util.Arrays; import java.util.Objects; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; @@ -83,17 +82,7 @@ public String toString() { return "StringResponse{" + "resultString='" + resultString + '\'' + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; + "} " + super.toString(); } diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/StructSchemaTypeRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/StructSchemaTypeRequestBody.java similarity index 77% rename from open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/StructSchemaTypeRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/StructSchemaTypeRequestBody.java index 139e7afdae3..f2104ab1756 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/StructSchemaTypeRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/StructSchemaTypeRequestBody.java @@ -1,12 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.properties.StructSchemaTypeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.StructSchemaTypeProperties; import java.util.Objects; @@ -117,22 +117,9 @@ public void setExternalSourceName(String externalSourceName) public String toString() { return "StructSchemaTypeRequestBody{" + - "externalSourceGUID='" + externalSourceGUID + '\'' + - ", externalSourceName='" + externalSourceName + '\'' + - ", versionNumber='" + getVersionNumber() + '\'' + - ", author='" + getAuthor() + '\'' + - ", usage='" + getUsage() + '\'' + - ", encodingStandard='" + getEncodingStandard() + '\'' + - ", namespace='" + getNamespace() + '\'' + - ", isDeprecated=" + getIsDeprecated() + - ", displayName='" + getDisplayName() + '\'' + - ", description='" + getDescription() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; + "externalSourceGUID='" + externalSourceGUID + '\'' + + ", externalSourceName='" + externalSourceName + '\'' + + "} " + super.toString(); } diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SubjectAreaDefinitionResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SubjectAreaDefinitionResponse.java new file mode 100644 index 00000000000..9a5a70fc07b --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SubjectAreaDefinitionResponse.java @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.SubjectAreaDefinition; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * SubjectAreaDefinitionResponse is the response structure used on the OMAS REST API calls that return the properties + * for a subject area with the linked governance definitions. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class SubjectAreaDefinitionResponse extends FFDCResponseBase +{ + private SubjectAreaDefinition properties = null; + + + /** + * Default constructor + */ + public SubjectAreaDefinitionResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public SubjectAreaDefinitionResponse(SubjectAreaDefinitionResponse template) + { + super(template); + + if (template != null) + { + this.properties = template.getProperties(); + } + } + + + /** + * Return the properties result. + * + * @return bean + */ + public SubjectAreaDefinition getProperties() + { + return properties; + } + + + /** + * Set up the properties result. + * + * @param properties - bean + */ + public void setProperties(SubjectAreaDefinition properties) + { + this.properties = properties; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "SubjectAreaDefinitionResponse{" + + "properties=" + properties + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof SubjectAreaDefinitionResponse that)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + return Objects.equals(properties, that.properties); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(properties); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SubjectAreaResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SubjectAreaResponse.java new file mode 100644 index 00000000000..3efab36e05b --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SubjectAreaResponse.java @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.SubjectAreaElement; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * SubjectAreaResponse is the response structure used on the OMAS REST API calls that return the properties + * for a subject area. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class SubjectAreaResponse extends FFDCResponseBase +{ + private SubjectAreaElement element = null; + + + /** + * Default constructor + */ + public SubjectAreaResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public SubjectAreaResponse(SubjectAreaResponse template) + { + super(template); + + if (template != null) + { + this.element = template.getElement(); + } + } + + + /** + * Return the element result. + * + * @return bean + */ + public SubjectAreaElement getElement() + { + return element; + } + + + /** + * Set up the element result. + * + * @param element - bean + */ + public void setElement(SubjectAreaElement element) + { + this.element = element; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "SubjectAreaResponse{" + + "element=" + element + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof SubjectAreaResponse that)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + return Objects.equals(element, that.element); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(element); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SubjectAreasResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SubjectAreasResponse.java new file mode 100644 index 00000000000..239ac5bd621 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SubjectAreasResponse.java @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.SubjectAreaElement; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * SubjectAreasResponse is the response structure used on the OMAS REST API calls that return a list of subject area descriptions. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class SubjectAreasResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public SubjectAreasResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public SubjectAreasResponse(SubjectAreasResponse template) + { + super(template); + + if (template != null) + { + this.elements = template.getElements(); + } + } + + + /** + * Return the list of elements. + * + * @return list of results + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the list of elements to return. + * + * @param elements list of results + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "SubjectAreasResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof SubjectAreasResponse that)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + return Objects.equals(elements, that.elements); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(elements); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SupportedCapabilitiesResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SupportedCapabilitiesResponse.java new file mode 100644 index 00000000000..2f0da73c5ab --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SupportedCapabilitiesResponse.java @@ -0,0 +1,124 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.DeployedCapabilityElement; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * SupportedCapabilitiesResponse returns a list of SoftwareServerSupportedCapability relationships from the server. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class SupportedCapabilitiesResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public SupportedCapabilitiesResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public SupportedCapabilitiesResponse(SupportedCapabilitiesResponse template) + { + super(template); + + if (template != null) + { + this.elements = template.getElements(); + } + } + + + /** + * Return the list of assets in the response. + * + * @return list of assets + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the list of assets for the response. + * + * @param elements list of assets + */ + public void setElements(List elements) + { + this.elements = elements; + } + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "SupportedCapabilitiesResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (! super.equals(objectToCompare)) + { + return false; + } + SupportedCapabilitiesResponse that = (SupportedCapabilitiesResponse) objectToCompare; + return Objects.equals(elements, that.elements); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elements); + } +} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/SupportedCapabilityRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SupportedCapabilityRequestBody.java similarity index 90% rename from open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/SupportedCapabilityRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SupportedCapabilityRequestBody.java index 72475ef66d9..1ce734945e8 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/SupportedCapabilityRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SupportedCapabilityRequestBody.java @@ -1,11 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.CapabilityDeploymentProperties; +import org.odpi.openmetadata.commonservices.ffdc.rest.ExternalSourceRequestBody; +import org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities.CapabilityDeploymentProperties; import java.util.Objects; @@ -19,7 +20,7 @@ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) -public class SupportedCapabilityRequestBody extends MetadataSourceRequestBody +public class SupportedCapabilityRequestBody extends ExternalSourceRequestBody { private CapabilityDeploymentProperties properties = null; diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SurveyReportsResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SurveyReportsResponse.java new file mode 100644 index 00000000000..8f203703317 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/SurveyReportsResponse.java @@ -0,0 +1,126 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.surveyaction.properties.SurveyReport; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * SurveyReportsResponse is the response structure used on OMAS REST API calls that return a + * list of SurveyReport properties objects as a response. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class SurveyReportsResponse extends FFDCResponseBase +{ + private List surveyReports = null; + + /** + * Default constructor + */ + public SurveyReportsResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public SurveyReportsResponse(SurveyReportsResponse template) + { + super(template); + + if (template != null) + { + this.surveyReports = template.getSurveyReports(); + } + } + + + /** + * Return the properties objects. + * + * @return list of properties objects + */ + public List getSurveyReports() + { + return surveyReports; + } + + + /** + * Set up the properties objects. + * + * @param surveyReports list of properties objects + */ + public void setSurveyReports(List surveyReports) + { + this.surveyReports = surveyReports; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "SurveyReportsResponse{" + + "surveyReports=" + surveyReports + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + SurveyReportsResponse that = (SurveyReportsResponse) objectToCompare; + return Objects.equals(getSurveyReports(), that.getSurveyReports()); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), getSurveyReports()); + } +} diff --git a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/rest/TagUpdateRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/TagUpdateRequestBody.java similarity index 93% rename from open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/rest/TagUpdateRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/TagUpdateRequestBody.java index 6a15a463132..7525dcf257b 100644 --- a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/rest/TagUpdateRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/TagUpdateRequestBody.java @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetconsumer.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -14,13 +14,10 @@ * InformalTagProperties stores information about a tag connected to an asset. * InformalTags provide informal classifications to assets * and can be added at any time. - * * InformalTags have the userId of the person who added the tag, the name of the tag and its description. - * * The content of the tag is a personal judgement (which is why the user's id is in the tag) * and there is no formal review of the tags. However, they can be used as a basis for crowd-sourcing * Glossary terms. - * * Private InformalTags are only returned to the user that created them. */ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @@ -102,13 +99,10 @@ public boolean equals(Object objectToCompare) { return true; } - if (! (objectToCompare instanceof TagUpdateRequestBody)) + if (! (objectToCompare instanceof TagUpdateRequestBody that)) { return false; } - - TagUpdateRequestBody that = (TagUpdateRequestBody) objectToCompare; - return description != null ? description.equals(that.description) : that.description == null; } diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/TeamPlayerRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/TeamPlayerRequestBody.java similarity index 88% rename from open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/TeamPlayerRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/TeamPlayerRequestBody.java index 83ad9f7230f..312398d695f 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/rest/TeamPlayerRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/TeamPlayerRequestBody.java @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -100,12 +100,10 @@ public void setPosition(String position) public String toString() { return "TeamPlayerRequestBody{" + - "leadershipRole=" + leadershipRole + - ", position='" + position + '\'' + - ", isLeadershipRole=" + getIsLeadershipRole() + - ", externalSourceGUID='" + getExternalSourceGUID() + '\'' + - ", externalSourceName='" + getExternalSourceName() + '\'' + - '}'; + "leadershipRole=" + leadershipRole + + ", position='" + position + '\'' + + ", isLeadershipRole=" + getIsLeadershipRole() + + "} " + super.toString(); } diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/TemplateClassificationRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/TemplateClassificationRequestBody.java similarity index 94% rename from open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/TemplateClassificationRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/TemplateClassificationRequestBody.java index fad9683d623..69e1f034d9c 100644 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/TemplateClassificationRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/TemplateClassificationRequestBody.java @@ -1,12 +1,11 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import java.util.HashMap; import java.util.Map; import java.util.Objects; @@ -19,7 +18,7 @@ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) -public class TemplateClassificationRequestBody extends AssetOwnerOMASAPIRequestBody +public class TemplateClassificationRequestBody { private String name = null; private String description = null; @@ -43,8 +42,6 @@ public TemplateClassificationRequestBody() */ public TemplateClassificationRequestBody(TemplateClassificationRequestBody template) { - super(template); - if (template != null) { name = template.getName(); @@ -195,6 +192,6 @@ public boolean equals(Object objectToCompare) @Override public int hashCode() { - return Objects.hash(super.hashCode(), name, description, versionIdentifier, additionalProperties); + return Objects.hash(name, description, versionIdentifier, additionalProperties); } } diff --git a/open-metadata-implementation/view-services/project-manager/project-manager-server/src/main/java/org/odpi/openmetadata/viewservices/projectmanager/rest/TemplateRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/TemplateRequestBody.java similarity index 96% rename from open-metadata-implementation/view-services/project-manager/project-manager-server/src/main/java/org/odpi/openmetadata/viewservices/projectmanager/rest/TemplateRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/TemplateRequestBody.java index 353ef4c653e..2daaee1eced 100644 --- a/open-metadata-implementation/view-services/project-manager/project-manager-server/src/main/java/org/odpi/openmetadata/viewservices/projectmanager/rest/TemplateRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/TemplateRequestBody.java @@ -1,15 +1,13 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.projectmanager.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStatus; import org.odpi.openmetadata.frameworks.governanceaction.search.ElementProperties; -import java.util.Date; import java.util.Map; import java.util.Objects; diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/TermAssignmentStatusesResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/TermAssignmentStatusesResponse.java new file mode 100644 index 00000000000..2b891db4d2c --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/TermAssignmentStatusesResponse.java @@ -0,0 +1,124 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.enums.GlossaryTermAssignmentStatus; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * TermAssignmentStatusesResponse is a response object for passing back a list of enum values or an exception if the request failed. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class TermAssignmentStatusesResponse extends FFDCResponseBase +{ + private List statuses = null; + + + /** + * Default constructor + */ + public TermAssignmentStatusesResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public TermAssignmentStatusesResponse(TermAssignmentStatusesResponse template) + { + super(template); + + if (template != null) + { + statuses = template.getStatuses(); + } + } + + + /** + * Return the list of metadata elements. + * + * @return result object + */ + public List getStatuses() + { + return statuses; + } + + + /** + * Set up the metadata element to return. + * + * @param statuses result object + */ + public void setStatuses(List statuses) + { + this.statuses = statuses; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "TermAssignmentStatusesResponse{" + + "statuses=" + statuses + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + TermAssignmentStatusesResponse that = (TermAssignmentStatusesResponse) objectToCompare; + return Objects.equals(statuses, that.statuses); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), statuses); + } +} diff --git a/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/rest/ToDoRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ToDoRequestBody.java similarity index 80% rename from open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/rest/ToDoRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ToDoRequestBody.java index 6214f64e2b7..8c2b7a84937 100644 --- a/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/rest/ToDoRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ToDoRequestBody.java @@ -1,13 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.myprofile.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.communityprofile.properties.NewActionTargetProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ToDoProperties; -import org.odpi.openmetadata.accessservices.communityprofile.rest.CommunityProfileOMASAPIRequestBody; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actions.NewToDoActionTargetProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actions.ToDoProperties; import java.util.List; import java.util.Objects; @@ -22,13 +21,13 @@ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) -public class ToDoRequestBody extends CommunityProfileOMASAPIRequestBody +public class ToDoRequestBody { - private List newActionTargetProperties = null; - private ToDoProperties properties = null; - private String originatorGUID = null; - private String actionSponsorGUID = null; - private String assignToActorGUID = null; + private List newActionTargetProperties = null; + private ToDoProperties properties = null; + private String originatorGUID = null; + private String actionSponsorGUID = null; + private String assignToActorGUID = null; /** * Default constructor */ @@ -45,15 +44,13 @@ public ToDoRequestBody() */ public ToDoRequestBody(ToDoRequestBody template) { - super(template); - if (template != null) { this.newActionTargetProperties = template.getNewActionTargetProperties(); this.properties = template.getProperties(); - this.originatorGUID = template.getOriginatorGUID(); - this.actionSponsorGUID = template.getActionSponsorGUID(); - this.assignToActorGUID = template.getAssignToActorGUID(); + this.originatorGUID = template.getOriginatorGUID(); + this.actionSponsorGUID = template.getActionSponsorGUID(); + this.assignToActorGUID = template.getAssignToActorGUID(); } } @@ -63,7 +60,7 @@ public ToDoRequestBody(ToDoRequestBody template) * * @return list */ - public List getNewActionTargetProperties() + public List getNewActionTargetProperties() { return newActionTargetProperties; } @@ -74,7 +71,7 @@ public List getNewActionTargetProperties() * * @param newActionTargetProperties list */ - public void setNewActionTargetProperties(List newActionTargetProperties) + public void setNewActionTargetProperties(List newActionTargetProperties) { this.newActionTargetProperties = newActionTargetProperties; } diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ToDoResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ToDoResponse.java new file mode 100644 index 00000000000..ffe40826769 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ToDoResponse.java @@ -0,0 +1,124 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ToDoElement; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * ToDoResponse is the response structure used on the OMAS REST API calls that returns a + * "to do" object as a response. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ToDoResponse extends FFDCResponseBase +{ + private ToDoElement element = null; + + + /** + * Default constructor + */ + public ToDoResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public ToDoResponse(ToDoResponse template) + { + super(template); + + if (template != null) + { + this.element = template.getElement(); + } + } + + + /** + * Return the to do result. + * + * @return details of individual + */ + public ToDoElement getElement() + { + return element; + } + + + /** + * Set up the to do result. + * + * @param element details of individual + */ + public void setElement(ToDoElement element) + { + this.element = element; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "ToDoResponse{" + + "element=" + element + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof ToDoResponse that)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + return Objects.equals(element, that.element); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), element); + } +} diff --git a/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/rest/ToDoStatusRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ToDoStatusRequestBody.java similarity index 97% rename from open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/rest/ToDoStatusRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ToDoStatusRequestBody.java index 54b01bb2e79..956cbac627c 100644 --- a/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/rest/ToDoStatusRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ToDoStatusRequestBody.java @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.myprofile.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; diff --git a/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/rest/ToDoStatusSearchString.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ToDoStatusSearchString.java similarity index 97% rename from open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/rest/ToDoStatusSearchString.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ToDoStatusSearchString.java index 091ede4d6cb..80db2373bb8 100644 --- a/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/rest/ToDoStatusSearchString.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ToDoStatusSearchString.java @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.myprofile.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import java.util.Objects; diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ToDosResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ToDosResponse.java new file mode 100644 index 00000000000..797177cd5b2 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ToDosResponse.java @@ -0,0 +1,126 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ToDoElement; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * ToDosResponse is the response structure used on the OMAS REST API calls that return + * a list of to do objects. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ToDosResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public ToDosResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public ToDosResponse(ToDosResponse template) + { + super(template); + + if (template != null) + { + this.elements = template.getElements(); + } + } + + + /** + * Return the to do result. + * + * @return unique identifier + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the to do result. + * + * @param elements - unique identifier + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "ToDosResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof ToDosResponse that)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + return Objects.equals(getElements(), that.getElements()); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elements); + } +} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/TopicRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/TopicRequestBody.java similarity index 80% rename from open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/TopicRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/TopicRequestBody.java index 1529dc59f8f..e990721f24e 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/rest/TopicRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/TopicRequestBody.java @@ -1,12 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.properties.TopicProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.topics.TopicProperties; import java.util.Objects; @@ -117,18 +117,9 @@ public void setExternalSourceName(String externalSourceName) public String toString() { return "TopicRequestBody{" + - "externalSourceGUID='" + externalSourceGUID + '\'' + - ", externalSourceName='" + externalSourceName + '\'' + - ", topicType='" + getTopicType() + '\'' + - ", topicName='" + getTopicName() + '\'' + - ", name='" + getName() + '\'' + - ", description='" + getDescription() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; + "externalSourceGUID='" + externalSourceGUID + '\'' + + ", externalSourceName='" + externalSourceName + '\'' + + "} " + super.toString(); } diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/TopicResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/TopicResponse.java new file mode 100644 index 00000000000..f73582cb189 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/TopicResponse.java @@ -0,0 +1,124 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.TopicElement; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * TopicResponse is a response object for passing back a single topic + * element or an exception if the request failed. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class TopicResponse extends FFDCResponseBase +{ + private TopicElement element = null; + + + /** + * Default constructor + */ + public TopicResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public TopicResponse(TopicResponse template) + { + super(template); + + if (template != null) + { + element = template.getElement(); + } + } + + + /** + * Return the metadata element. + * + * @return result object + */ + public TopicElement getElement() + { + return element; + } + + + /** + * Set up the metadata element to return. + * + * @param element result object + */ + public void setElement(TopicElement element) + { + this.element = element; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "TopicResponse{" + + "element=" + element + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + TopicResponse that = (TopicResponse) objectToCompare; + return Objects.equals(element, that.element); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), element); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/TopicsResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/TopicsResponse.java new file mode 100644 index 00000000000..c9e91101dad --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/TopicsResponse.java @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.TopicElement; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * TopicsResponse is a response object for passing back a a list of topics + * or an exception if the request failed. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class TopicsResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public TopicsResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public TopicsResponse(TopicsResponse template) + { + super(template); + + if (template != null) + { + elements = template.getElements(); + } + } + + + /** + * Return the list of metadata elements. + * + * @return result object + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the metadata element to return. + * + * @param elements result object + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "TopicsResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + TopicsResponse that = (TopicsResponse) objectToCompare; + return Objects.equals(elements, that.elements); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elements); + } +} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/UpdateRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/UpdateRequestBody.java similarity index 97% rename from open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/UpdateRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/UpdateRequestBody.java index 02c8feae045..b2b6910ba54 100644 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/UpdateRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/UpdateRequestBody.java @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/UseTypeRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/UseTypeRequestBody.java similarity index 97% rename from open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/UseTypeRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/UseTypeRequestBody.java index 2c2def846de..360b9c6d56d 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/rest/UseTypeRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/UseTypeRequestBody.java @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/UserIdentitiesResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/UserIdentitiesResponse.java new file mode 100644 index 00000000000..19b8b02a5cf --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/UserIdentitiesResponse.java @@ -0,0 +1,126 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.UserIdentityElement; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * UserIdentitiesResponse is the response structure used on the OMAS REST API calls that return a + * a list of user identity elements. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class UserIdentitiesResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public UserIdentitiesResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public UserIdentitiesResponse(UserIdentitiesResponse template) + { + super(template); + + if (template != null) + { + this.elements = template.getElements(); + } + } + + + /** + * Return the user identity result. + * + * @return unique identifier + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the user identity result. + * + * @param elements - unique identifier + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "UserIdentitiesResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof UserIdentitiesResponse)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + UserIdentitiesResponse that = (UserIdentitiesResponse) objectToCompare; + return Objects.equals(getElements(), that.getElements()); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elements); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/UserIdentityRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/UserIdentityRequestBody.java new file mode 100644 index 00000000000..c16be3efedb --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/UserIdentityRequestBody.java @@ -0,0 +1,122 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.UserIdentityProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * UserIdentityRequestBody provides the request body payload for working on UserIdentity entities and their + * link to profiles. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class UserIdentityRequestBody extends ExternalSourceRequestBody +{ + private UserIdentityProperties properties = null; + + /** + * Default constructor + */ + public UserIdentityRequestBody() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public UserIdentityRequestBody(UserIdentityRequestBody template) + { + super(template); + + if (template != null) + { + this.properties = template.getProperties(); + } + } + + + /** + * Return the properties for this user identity. + * + * @return properties bean + */ + public UserIdentityProperties getProperties() + { + return properties; + } + + + /** + * Set up the properties for this user identity. + * + * @param properties properties bean + */ + public void setProperties(UserIdentityProperties properties) + { + this.properties = properties; + } + + + /** + * JSON-style toString. + * + * @return list of properties and their values. + */ + @Override + public String toString() + { + return "UserIdentityRequestBody{" + + "properties=" + properties + + "} " + super.toString(); + } + + + /** + * Equals method that returns true if containing properties are the same. + * + * @param objectToCompare object to compare + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + UserIdentityRequestBody that = (UserIdentityRequestBody) objectToCompare; + return Objects.equals(properties, that.properties); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), properties); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/UserIdentityResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/UserIdentityResponse.java new file mode 100644 index 00000000000..f96a8893581 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/UserIdentityResponse.java @@ -0,0 +1,124 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.UserIdentityElement; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * UserIdentityResponse is the response structure used on the OMAS REST API calls that return a + * UserIdentityElement object as a response. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class UserIdentityResponse extends FFDCResponseBase +{ + private UserIdentityElement element = null; + + + /** + * Default constructor + */ + public UserIdentityResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public UserIdentityResponse(UserIdentityResponse template) + { + super(template); + + if (template != null) + { + this.element = template.getElement(); + } + } + + + /** + * Return the element result. + * + * @return details of user identity + */ + public UserIdentityElement getElement() + { + return element; + } + + + /** + * Set up the element result. + * + * @param element details of user identity + */ + public void setElement(UserIdentityElement element) + { + this.element = element; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "UserIdentityResponse{" + + "element=" + element + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof UserIdentityResponse that)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + return Objects.equals(element, that.element); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), element); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ValidValueAssignmentConsumersResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ValidValueAssignmentConsumersResponse.java new file mode 100644 index 00000000000..7013a535b05 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ValidValueAssignmentConsumersResponse.java @@ -0,0 +1,124 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ValidValueAssignmentConsumerElement; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * ValidValueAssignmentConsumersResponse is a response object for passing back a list of elements. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ValidValueAssignmentConsumersResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public ValidValueAssignmentConsumersResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public ValidValueAssignmentConsumersResponse(ValidValueAssignmentConsumersResponse template) + { + super(template); + + if (template != null) + { + elements = template.getElements(); + } + } + + + /** + * Return the metadata element. + * + * @return result object + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the metadata element to return. + * + * @param elements result object + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "ValidValueAssignmentConsumersResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + ValidValueAssignmentConsumersResponse that = (ValidValueAssignmentConsumersResponse) objectToCompare; + return Objects.equals(elements, that.elements); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elements); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ValidValueAssignmentDefinitionsResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ValidValueAssignmentDefinitionsResponse.java new file mode 100644 index 00000000000..9501b98c199 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ValidValueAssignmentDefinitionsResponse.java @@ -0,0 +1,124 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ValidValueAssignmentDefinitionElement; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * ValidValueAssignmentDefinitionsResponse is a response object for passing back a list of elements. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ValidValueAssignmentDefinitionsResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public ValidValueAssignmentDefinitionsResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public ValidValueAssignmentDefinitionsResponse(ValidValueAssignmentDefinitionsResponse template) + { + super(template); + + if (template != null) + { + elements = template.getElements(); + } + } + + + /** + * Return the metadata element. + * + * @return result object + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the metadata element to return. + * + * @param elements result object + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "ValidValueAssignmentDefinitionsResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + ValidValueAssignmentDefinitionsResponse that = (ValidValueAssignmentDefinitionsResponse) objectToCompare; + return Objects.equals(elements, that.elements); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elements); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ValidValueMappingsResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ValidValueMappingsResponse.java new file mode 100644 index 00000000000..c94b5a933fd --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ValidValueMappingsResponse.java @@ -0,0 +1,124 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ValidValueMappingElement; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * ValidValueMappingsResponse is a response object for passing back a list of valid value mappings. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ValidValueMappingsResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public ValidValueMappingsResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public ValidValueMappingsResponse(ValidValueMappingsResponse template) + { + super(template); + + if (template != null) + { + elements = template.getElements(); + } + } + + + /** + * Return the metadata element. + * + * @return result object + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the metadata element to return. + * + * @param elements result object + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "ValidValueMappingsResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + ValidValueMappingsResponse that = (ValidValueMappingsResponse) objectToCompare; + return Objects.equals(elements, that.elements); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elements); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ValidValueResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ValidValueResponse.java new file mode 100644 index 00000000000..2dfff6f81c3 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ValidValueResponse.java @@ -0,0 +1,123 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ValidValueElement; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * ValidValueResponse is a response object for passing back a single valid value object. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ValidValueResponse extends FFDCResponseBase +{ + private ValidValueElement element = null; + + + /** + * Default constructor + */ + public ValidValueResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public ValidValueResponse(ValidValueResponse template) + { + super(template); + + if (template != null) + { + element = template.getElement(); + } + } + + + /** + * Return the metadata element. + * + * @return result object + */ + public ValidValueElement getElement() + { + return element; + } + + + /** + * Set up the metadata element to return. + * + * @param element result object + */ + public void setElement(ValidValueElement element) + { + this.element = element; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "ValidValueResponse{" + + "element=" + element + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + ValidValueResponse that = (ValidValueResponse) objectToCompare; + return Objects.equals(element, that.element); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), element); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ValidValueSetsResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ValidValueSetsResponse.java new file mode 100644 index 00000000000..beeadee3e97 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ValidValueSetsResponse.java @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ValidValueSetElement; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * ValidValueSetsResponse is a response object for passing back a a list of valid value sets + * or an exception if the request failed. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ValidValueSetsResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public ValidValueSetsResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public ValidValueSetsResponse(ValidValueSetsResponse template) + { + super(template); + + if (template != null) + { + elements = template.getElements(); + } + } + + + /** + * Return the list of metadata elements. + * + * @return result object + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the metadata element to return. + * + * @param elements result object + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "ValidValueSetsResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + ValidValueSetsResponse that = (ValidValueSetsResponse) objectToCompare; + return Objects.equals(elements, that.elements); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elements); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ValidValuesImplAssetsResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ValidValuesImplAssetsResponse.java new file mode 100644 index 00000000000..b3bfa0bd155 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ValidValuesImplAssetsResponse.java @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ValidValueImplAssetElement; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * ValidValuesImplAssetsResponse is a response object for passing back a list of assets (reference data sets) + * that use the valid value in their implementation. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ValidValuesImplAssetsResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public ValidValuesImplAssetsResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public ValidValuesImplAssetsResponse(ValidValuesImplAssetsResponse template) + { + super(template); + + if (template != null) + { + elements = template.getElements(); + } + } + + + /** + * Return the metadata element. + * + * @return result object + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the metadata element to return. + * + * @param elements result object + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "ValidValuesImplAssetsResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + ValidValuesImplAssetsResponse that = (ValidValuesImplAssetsResponse) objectToCompare; + return Objects.equals(elements, that.elements); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elements); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ValidValuesImplDefinitionsResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ValidValuesImplDefinitionsResponse.java new file mode 100644 index 00000000000..38a0eb73022 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ValidValuesImplDefinitionsResponse.java @@ -0,0 +1,124 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ValidValueImplDefinitionElement; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * ValidValuesImplDefinitionsResponse is a response object for passing back a list of elements. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ValidValuesImplDefinitionsResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public ValidValuesImplDefinitionsResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public ValidValuesImplDefinitionsResponse(ValidValuesImplDefinitionsResponse template) + { + super(template); + + if (template != null) + { + elements = template.getElements(); + } + } + + + /** + * Return the metadata element. + * + * @return result object + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the metadata element to return. + * + * @param elements result object + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "ValidValuesImplDefinitionsResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + ValidValuesImplDefinitionsResponse that = (ValidValuesImplDefinitionsResponse) objectToCompare; + return Objects.equals(elements, that.elements); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elements); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ValidValuesMappingsResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ValidValuesMappingsResponse.java new file mode 100644 index 00000000000..db62a0641f7 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ValidValuesMappingsResponse.java @@ -0,0 +1,124 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ValidValuesMappingElement; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * ValidValuesMappingsResponse is a response object for passing back a list of valid value mappings. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ValidValuesMappingsResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public ValidValuesMappingsResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public ValidValuesMappingsResponse(ValidValuesMappingsResponse template) + { + super(template); + + if (template != null) + { + elements = template.getElements(); + } + } + + + /** + * Return the metadata element. + * + * @return result object + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the metadata element to return. + * + * @param elements result object + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "ValidValuesMappingsResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + ValidValuesMappingsResponse that = (ValidValuesMappingsResponse) objectToCompare; + return Objects.equals(elements, that.elements); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elements); + } +} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/ValidValuesRequestBody.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ValidValuesRequestBody.java similarity index 96% rename from open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/ValidValuesRequestBody.java rename to open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ValidValuesRequestBody.java index d8ba08ff9d2..301bd2d646a 100644 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/rest/ValidValuesRequestBody.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ValidValuesRequestBody.java @@ -1,11 +1,11 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.rest; +package org.odpi.openmetadata.commonservices.ffdc.rest; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementClassification; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementClassification; import java.util.HashMap; import java.util.List; @@ -21,7 +21,7 @@ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) -public class ValidValuesRequestBody extends AssetOwnerOMASAPIRequestBody +public class ValidValuesRequestBody { private String typeName = null; private List classifications = null; @@ -54,8 +54,6 @@ public ValidValuesRequestBody() */ public ValidValuesRequestBody(ValidValuesRequestBody template) { - super(template); - if (template != null) { this.typeName = template.getTypeName(); @@ -433,10 +431,6 @@ public boolean equals(Object objectToCompare) { return false; } - if (!super.equals(objectToCompare)) - { - return false; - } ValidValuesRequestBody that = (ValidValuesRequestBody) objectToCompare; return Objects.equals(getTypeName(), that.getTypeName()) && Objects.equals(getClassifications(), that.getClassifications()) && @@ -462,7 +456,7 @@ public boolean equals(Object objectToCompare) @Override public int hashCode() { - return Objects.hash(super.hashCode(), getTypeName(), getClassifications(), getQualifiedName(), + return Objects.hash(getTypeName(), getClassifications(), getQualifiedName(), getAdditionalProperties(), getExtendedProperties(), displayName, description, category, usage, scope, isDeprecated, preferredValue, dataType); } diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ValidValuesResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ValidValuesResponse.java new file mode 100644 index 00000000000..b7c56a06439 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/ValidValuesResponse.java @@ -0,0 +1,124 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.commonservices.ffdc.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ValidValueElement; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * ValidValuesResponse is a response object for passing back a list of valid value objects. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ValidValuesResponse extends FFDCResponseBase +{ + private List elements = null; + + + /** + * Default constructor + */ + public ValidValuesResponse() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public ValidValuesResponse(ValidValuesResponse template) + { + super(template); + + if (template != null) + { + elements = template.getElements(); + } + } + + + /** + * Return the list of metadata elements. + * + * @return result object + */ + public List getElements() + { + return elements; + } + + + /** + * Set up the list of metadata elements to return. + * + * @param elements result object + */ + public void setElements(List elements) + { + this.elements = elements; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "ValidValuesResponse{" + + "elements=" + elements + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + ValidValuesResponse that = (ValidValuesResponse) objectToCompare; + return Objects.equals(elements, that.elements); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elements); + } +} diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/VoidResponse.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/VoidResponse.java index 5c4b6c55e97..274d4c08663 100644 --- a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/VoidResponse.java +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/VoidResponse.java @@ -7,8 +7,6 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import java.util.Arrays; - import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; @@ -49,17 +47,6 @@ public VoidResponse(VoidResponse template) @Override public String toString() { - return "VoidResponse{" + - "exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; + return "VoidResponse{} " + super.toString(); } } diff --git a/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/package-info.java b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/package-info.java new file mode 100644 index 00000000000..cbea62fa384 --- /dev/null +++ b/open-metadata-implementation/common-services/ffdc-services/src/main/java/org/odpi/openmetadata/commonservices/ffdc/rest/package-info.java @@ -0,0 +1,10 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +/** + * This package defines the beans used to build the REST request and response payloads. + * REST APIs can pass parameters in their URLs (called path variables) as well has having a RequestBody bean + * for additional, more complex, or optional parameters. Responses are returned in response beans. + * The response beans encode the return type of the method as well as any exceptions and associated messages. + */ +package org.odpi.openmetadata.commonservices.ffdc.rest; diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/APIConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/APIConverter.java similarity index 90% rename from open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/APIConverter.java rename to open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/APIConverter.java index 2e899d84392..b103da2d653 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/APIConverter.java +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/APIConverter.java @@ -1,9 +1,10 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.converters; +package org.odpi.openmetadata.commonservices.generichandlers; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.APIElement; -import org.odpi.openmetadata.accessservices.datamanager.properties.APIProperties; +import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.APIElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.apis.APIProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; @@ -17,7 +18,7 @@ * APIConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) * EntityDetail object into a API bean. */ -public class APIConverter extends DataManagerOMASConverter +public class APIConverter extends OMFConverter { /** * Constructor @@ -72,8 +73,9 @@ public B getNewBean(Class beanClass, apiProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); apiProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); apiProperties.setName(this.removeName(instanceProperties)); + apiProperties.setResourceName(this.removeResourceName(instanceProperties)); apiProperties.setVersionIdentifier(this.removeVersionIdentifier(instanceProperties)); - apiProperties.setDescription(this.removeDescription(instanceProperties)); + apiProperties.setResourceDescription(this.removeDescription(instanceProperties)); apiProperties.setDeployedImplementationType(this.removeDeployedImplementationType(instanceProperties)); /* diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/APIOperationConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/APIOperationConverter.java similarity index 91% rename from open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/APIOperationConverter.java rename to open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/APIOperationConverter.java index ae20712aca7..e387f58b306 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/APIOperationConverter.java +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/APIOperationConverter.java @@ -1,27 +1,25 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.converters; +package org.odpi.openmetadata.commonservices.generichandlers; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.APIOperationElement; -import org.odpi.openmetadata.accessservices.datamanager.properties.APIOperationProperties; +import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.APIOperationElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.apis.APIOperationProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Classification; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceHeader; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; import java.lang.reflect.InvocationTargetException; -import java.util.List; /** * EventTypeConverter provides common methods for transferring relevant properties from an Open Metadata Repository Services (OMRS) * EntityDetail object into a bean that inherits from EventTypeElement. It is working with a ComplexSchemaType. */ -public class APIOperationConverter extends DataManagerOMASConverter +public class APIOperationConverter extends OMFConverter { /** * Constructor diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/APIParameterConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/APIParameterConverter.java similarity index 91% rename from open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/APIParameterConverter.java rename to open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/APIParameterConverter.java index 9fab93429d4..03ebbf46cf1 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/APIParameterConverter.java +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/APIParameterConverter.java @@ -1,10 +1,11 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.converters; +package org.odpi.openmetadata.commonservices.generichandlers; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.APIParameterElement; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.SchemaTypeElement; -import org.odpi.openmetadata.accessservices.datamanager.properties.APIParameterProperties; +import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.APIParameterElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.SchemaTypeElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.apis.APIParameterProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; @@ -19,7 +20,7 @@ * APIParameterConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) * EntityDetail object into a APIParameterElement bean. */ -public class APIParameterConverter extends DataManagerOMASConverter +public class APIParameterConverter extends OMFConverter { /** * Constructor @@ -98,10 +99,8 @@ public B getNewSchemaAttributeBean(Class beanClass, properties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - if (schemaType instanceof SchemaTypeElement) + if (schemaType instanceof SchemaTypeElement schemaTypeElement) { - SchemaTypeElement schemaTypeElement = (SchemaTypeElement) schemaType; - this.addSchemaTypeToAttribute(schemaTypeElement, properties); } diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/APIParameterListConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/APIParameterListConverter.java similarity index 94% rename from open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/APIParameterListConverter.java rename to open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/APIParameterListConverter.java index dda63b1ee42..841818aef4b 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/APIParameterListConverter.java +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/APIParameterListConverter.java @@ -1,10 +1,11 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.converters; +package org.odpi.openmetadata.commonservices.generichandlers; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.APIParameterListElement; -import org.odpi.openmetadata.accessservices.datamanager.properties.APIParameterListProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.APIParameterListType; +import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.APIParameterListElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.apis.APIParameterListProperties; +import org.odpi.openmetadata.frameworks.openmetadata.enums.APIParameterListType; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.*; @@ -19,7 +20,7 @@ * EventTypeConverter provides common methods for transferring relevant properties from an Open Metadata Repository Services (OMRS) * EntityDetail object into a bean that inherits from EventTypeElement. It is working with a ComplexSchemaType. */ -public class APIParameterListConverter extends DataManagerOMASConverter +public class APIParameterListConverter extends OMFConverter { /** * Constructor diff --git a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ActorProfileConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ActorProfileConverter.java new file mode 100644 index 00000000000..69e097adb82 --- /dev/null +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ActorProfileConverter.java @@ -0,0 +1,384 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.generichandlers; + + +import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; +import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.locations.ProfileLocationProperties; +import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityProxy; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; + +import java.lang.reflect.InvocationTargetException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * ActorProfileConverter generates a ActorProfileElement bean from a ActorProfile entity. + */ +public class ActorProfileConverter extends OMFConverter +{ + /** + * Constructor + * + * @param repositoryHelper helper object to parse entity + * @param serviceName name of this component + * @param serverName local server name + */ + public ActorProfileConverter(OMRSRepositoryHelper repositoryHelper, + String serviceName, + String serverName) + { + super(repositoryHelper, serviceName, serverName); + } + + + /** + * Using the supplied instances, return a new instance of the bean. It is used for beans such as + * a connection bean which made up of 3 entities (Connection, ConnectorType and Endpoint) plus the + * relationships between them. The relationships may be omitted if they do not have any properties. + * + * @param beanClass name of the class to create + * @param primaryEntity entity that is the root of the collection of entities that make up the content of the bean + * @param supplementaryEntities entities connected to the primary entity by the relationships + * @param relationships relationships linking the entities + * @param methodName calling method + * @return bean populated with properties from the instances supplied + * @throws PropertyServerException there is a problem instantiating the bean + */ + @Override + public B getNewComplexBean(Class beanClass, + EntityDetail primaryEntity, + List supplementaryEntities, + List relationships, + String methodName) throws PropertyServerException + { + try + { + /* + * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. + */ + B returnBean = beanClass.getDeclaredConstructor().newInstance(); + + if (returnBean instanceof ActorProfileElement bean) + { + ActorProfileProperties profileProperties = new ActorProfileProperties(); + + if (primaryEntity != null) + { + bean.setElementHeader(this.getMetadataElementHeader(beanClass, primaryEntity, methodName)); + + /* + * The initial set of values come from the entity. + */ + InstanceProperties instanceProperties = new InstanceProperties(primaryEntity.getProperties()); + + profileProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); + profileProperties.setKnownName(this.removeName(instanceProperties)); + profileProperties.setDescription(this.removeDescription(instanceProperties)); + profileProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); + profileProperties.setEffectiveFrom(instanceProperties.getEffectiveFromTime()); + profileProperties.setEffectiveTo(instanceProperties.getEffectiveToTime()); + + /* + * Any remaining properties are returned in the extended properties. They are + * assumed to be defined in a subtype. + */ + profileProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); + profileProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); + + bean.setProfileProperties(profileProperties); + + Map userIdentities = new HashMap<>(); + + if (supplementaryEntities != null) + { + List contactMethods = new ArrayList<>(); + + for (EntityDetail entity : supplementaryEntities) + { + if ((entity != null) && (entity.getType() != null)) + { + String entityTypeName = entity.getType().getTypeDefName(); + + if (repositoryHelper.isTypeOf(serviceName, entityTypeName, OpenMetadataType.USER_IDENTITY_TYPE_NAME)) + { + UserIdentityElement userBean = new UserIdentityElement(); + UserIdentityProperties userProperties = new UserIdentityProperties(); + + bean.setElementHeader(this.getMetadataElementHeader(beanClass, entity, methodName)); + + InstanceProperties entityProperties = new InstanceProperties(entity.getProperties()); + + userProperties.setQualifiedName(this.removeQualifiedName(entityProperties)); + userProperties.setUserId(this.removeUserId(entityProperties)); + userProperties.setDistinguishedName(this.removeDistinguishedName(entityProperties)); + userProperties.setAdditionalProperties(this.removeAdditionalProperties(entityProperties)); + + userProperties.setEffectiveFrom(entityProperties.getEffectiveFromTime()); + userProperties.setEffectiveTo(entityProperties.getEffectiveToTime()); + + userProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); + userProperties.setExtendedProperties(this.getRemainingExtendedProperties(entityProperties)); + + userBean.setProperties(userProperties); + + userIdentities.put(entity.getGUID(), userBean); + } + else if (repositoryHelper.isTypeOf(serviceName, entityTypeName, OpenMetadataType.CONTRIBUTION_RECORD_TYPE_NAME)) + { + ContributionRecordElement contributionBean = new ContributionRecordElement(); + ContributionRecord contributionRecord = new ContributionRecord(); + + contributionBean.setElementHeader(super.getMetadataElementHeader(beanClass, entity, methodName)); + + InstanceProperties entityProperties = new InstanceProperties(entity.getProperties()); + + contributionRecord.setQualifiedName(this.removeQualifiedName(entityProperties)); + contributionRecord.setAdditionalProperties(this.removeAdditionalProperties(entityProperties)); + contributionRecord.setKarmaPoints(this.removeKarmaPoints(entityProperties)); + if ((contributionRecord.getKarmaPoints() > 0) && (karmaPointPlateau > 0)) + { + contributionRecord.setKarmaPointPlateau(contributionRecord.getKarmaPoints() / karmaPointPlateau); + } + contributionRecord.setIsPublic(this.removeIsPublic(entityProperties)); + contributionRecord.setTypeName(bean.getElementHeader().getType().getTypeName()); + contributionRecord.setExtendedProperties(this.getRemainingExtendedProperties(entityProperties)); + + contributionBean.setProperties(contributionRecord); + bean.setContributionRecord(contributionBean); + } + else if (repositoryHelper.isTypeOf(serviceName, entityTypeName, OpenMetadataType.CONTACT_DETAILS.typeName)) + { + ContactMethodElement contactMethodBean = new ContactMethodElement(); + ContactMethodProperties contactMethodProperties = new ContactMethodProperties(); + + contactMethodBean.setElementHeader(super.getMetadataElementHeader(beanClass, entity, methodName)); + + InstanceProperties entityProperties = new InstanceProperties(entity.getProperties()); + + contactMethodProperties.setName(this.removeName(entityProperties)); + contactMethodProperties.setContactType(this.removeContactType(entityProperties)); + contactMethodProperties.setContactMethodType(this.getContactMethodTypeFromProperties(entityProperties)); + contactMethodProperties.setContactMethodService(this.removeContactMethodService(entityProperties)); + contactMethodProperties.setContactMethodValue(this.removeContactMethodValue(entityProperties)); + + contactMethodProperties.setEffectiveFrom(entityProperties.getEffectiveFromTime()); + contactMethodProperties.setEffectiveTo(entityProperties.getEffectiveToTime()); + + contactMethodProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); + contactMethodProperties.setExtendedProperties(this.getRemainingExtendedProperties(entityProperties)); + + contactMethodBean.setProperties(contactMethodProperties); + + contactMethods.add(contactMethodBean); + } + } + else + { + handleBadEntity(beanClass.getName(), entity, methodName); + } + } + + if (! contactMethods.isEmpty()) + { + bean.setContactMethods(contactMethods); + } + } + + if (relationships != null) + { + List peers = new ArrayList<>(); + ElementStub superTeam = null; + List subTeams = new ArrayList<>(); + List teamLeaders = new ArrayList<>(); + List teamMembers = new ArrayList<>(); + List profileIdentities = new ArrayList<>(); + List locations = new ArrayList<>(); + List roles = new ArrayList<>(); + List businessCapabilities = new ArrayList<>(); + List linkedInfrastructure = new ArrayList<>(); + + for (Relationship relationship : relationships) + { + if ((relationship != null) && (relationship.getType() != null)) + { + String relationshipTypeName = relationship.getType().getTypeDefName(); + + if (repositoryHelper.isTypeOf(serviceName, relationshipTypeName, OpenMetadataType.PEER_RELATIONSHIP_TYPE_NAME)) + { + EntityProxy entityProxy = repositoryHelper.getOtherEnd(serviceName, primaryEntity.getGUID(), relationship); + + ElementStub elementStub = super.getElementStub(beanClass, entityProxy, methodName); + + peers.add(elementStub); + } + else if (repositoryHelper.isTypeOf(serviceName, relationshipTypeName, OpenMetadataType.TEAM_MEMBERSHIP_RELATIONSHIP_TYPE_NAME)) + { + EntityProxy entityProxy = repositoryHelper.getOtherEnd(serviceName, primaryEntity.getGUID(), relationship); + + ElementStub elementStub = super.getElementStub(beanClass, entityProxy, methodName); + + teamMembers.add(elementStub); + } + else if (repositoryHelper.isTypeOf(serviceName, relationshipTypeName, OpenMetadataType.TEAM_LEADERSHIP_RELATIONSHIP_TYPE_NAME)) + { + EntityProxy entityProxy = repositoryHelper.getOtherEnd(serviceName, primaryEntity.getGUID(), relationship); + + ElementStub elementStub = super.getElementStub(beanClass, entityProxy, methodName); + + teamLeaders.add(elementStub); + } + else if (repositoryHelper.isTypeOf(serviceName, relationshipTypeName, OpenMetadataType.PERSON_ROLE_APPOINTMENT_RELATIONSHIP_TYPE_NAME)) + { + EntityProxy entityProxy = repositoryHelper.getOtherEnd(serviceName, primaryEntity.getGUID(), relationship); + + ElementStub elementStub = super.getElementStub(beanClass, entityProxy, methodName); + + roles.add(elementStub); + } + else if (repositoryHelper.isTypeOf(serviceName, relationshipTypeName, OpenMetadataType.IT_INFRASTRUCTURE_PROFILE_RELATIONSHIP_TYPE_NAME)) + { + EntityProxy entityProxy = repositoryHelper.getOtherEnd(serviceName, primaryEntity.getGUID(), relationship); + + ElementStub elementStub = super.getElementStub(beanClass, entityProxy, methodName); + + linkedInfrastructure.add(elementStub); + } + else if (repositoryHelper.isTypeOf(serviceName, relationshipTypeName, OpenMetadataType.ORGANIZATIONAL_CAPABILITY_TYPE_NAME)) + { + EntityProxy entityProxy = repositoryHelper.getOtherEnd(serviceName, primaryEntity.getGUID(), relationship); + + RelatedElement relatedElement = super.getRelatedElement(beanClass, relationship, entityProxy, methodName); + + businessCapabilities.add(relatedElement); + } + else if (repositoryHelper.isTypeOf(serviceName, relationshipTypeName, OpenMetadataType.PROFILE_LOCATION_TYPE_NAME)) + { + EntityProxy entityProxy = relationship.getEntityTwoProxy(); + + ElementStub elementStub = super.getElementStub(beanClass, entityProxy, methodName); + + ProfileLocationElement locationElement = new ProfileLocationElement(); + ProfileLocationProperties locationProperties = new ProfileLocationProperties(); + + locationProperties.setAssociationType(this.removeAssociationType(relationship.getProperties())); + + locationElement.setLocation(elementStub); + locationElement.setProperties(locationProperties); + locations.add(locationElement); + } + else if (repositoryHelper.isTypeOf(serviceName, relationshipTypeName, OpenMetadataType.PROFILE_IDENTITY_RELATIONSHIP_TYPE_NAME)) + { + EntityProxy entityProxy = repositoryHelper.getOtherEnd(serviceName, primaryEntity.getGUID(), relationship); + + ProfileIdentityElement profileIdentityElement = new ProfileIdentityElement(); + ProfileIdentityProperties profileIdentityProperties = new ProfileIdentityProperties(); + + InstanceProperties relationshipProperties = relationship.getProperties(); + + profileIdentityProperties.setRoleTypeName(this.removeDescription(relationshipProperties)); + profileIdentityProperties.setRoleGUID(this.removeDescription(relationshipProperties)); + profileIdentityProperties.setDescription(this.removeDescription(relationshipProperties)); + + profileIdentityElement.setProfileIdentity(profileIdentityProperties); + profileIdentityElement.setUserIdentity(userIdentities.get(entityProxy.getGUID())); + + profileIdentities.add(profileIdentityElement); + } + else if (repositoryHelper.isTypeOf(serviceName, relationshipTypeName, OpenMetadataType.TEAM_STRUCTURE_RELATIONSHIP_TYPE_NAME)) + { + EntityProxy entityProxy = relationship.getEntityOneProxy(); + + if (primaryEntity.getGUID().equals(entityProxy.getGUID())) + { + /* + * The primary entity is the super team - save subteam + */ + ElementStub elementStub = super.getElementStub(beanClass, relationship.getEntityTwoProxy(), methodName); + subTeams.add(elementStub); + } + else + { + superTeam = super.getElementStub(beanClass, entityProxy, methodName); + } + } + } + else + { + handleBadRelationship(beanClass.getName(), relationship, methodName); + } + } + + if (!profileIdentities.isEmpty()) + { + bean.setUserIdentities(profileIdentities); + } + + bean.setSuperTeam(superTeam); + if (! subTeams.isEmpty()) + { + bean.setSubTeams(subTeams); + } + + if (! peers.isEmpty()) + { + bean.setPeers(peers); + } + + if (! teamLeaders.isEmpty()) + { + bean.setTeamLeaderRoles(teamLeaders); + } + + if (! teamMembers.isEmpty()) + { + bean.setTeamMemberRoles(teamMembers); + } + + if (! roles.isEmpty()) + { + bean.setPersonRoles(roles); + } + + if (! businessCapabilities.isEmpty()) + { + bean.setBusinessCapability(businessCapabilities); + } + + if (! locations.isEmpty()) + { + bean.setLocations(locations); + } + + if (! linkedInfrastructure.isEmpty()) + { + bean.setLinkedInfrastructure(linkedInfrastructure); + } + } + } + else + { + handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); + } + } + + return returnBean; + } + catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) + { + super.handleInvalidBeanClass(beanClass.getName(), error, methodName); + } + + return null; + } +} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/converters/AnnotationConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/AnnotationConverter.java similarity index 96% rename from open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/converters/AnnotationConverter.java rename to open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/AnnotationConverter.java index 550bdbe3baf..5cf81402022 100644 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/converters/AnnotationConverter.java +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/AnnotationConverter.java @@ -1,8 +1,7 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.converters; +package org.odpi.openmetadata.commonservices.generichandlers; -import org.odpi.openmetadata.commonservices.generichandlers.SAFConverter; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.surveyaction.properties.Annotation; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.*; diff --git a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/AssetBuilder.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/AssetBuilder.java index 5ab465b1fbe..605da1e5760 100644 --- a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/AssetBuilder.java +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/AssetBuilder.java @@ -17,9 +17,10 @@ */ public class AssetBuilder extends ReferenceableBuilder { - private String technicalName = null; - private String versionIdentifier = null; - private String technicalDescription = null; + private String name = null; + private String resourceName = null; + private String versionIdentifier = null; + private String technicalDescription = null; private String deployedImplementationType = null; @@ -69,7 +70,8 @@ protected AssetBuilder(String typeGUID, * Constructor supporting all entity properties. (Classifications are added separately.) * * @param qualifiedName unique name - * @param technicalName new value for the name + * @param name new value for the name + * @param resourceName the full name from the resource * @param versionIdentifier new value for the versionIdentifier * @param technicalDescription new description for the asset * @param deployedImplementationType technology type @@ -82,7 +84,8 @@ protected AssetBuilder(String typeGUID, * @param serverName name of local server */ protected AssetBuilder(String qualifiedName, - String technicalName, + String name, + String resourceName, String versionIdentifier, String technicalDescription, String deployedImplementationType, @@ -103,9 +106,10 @@ protected AssetBuilder(String qualifiedName, serviceName, serverName); - this.technicalName = technicalName; - this.versionIdentifier = versionIdentifier; - this.technicalDescription = technicalDescription; + this.name = name; + this.resourceName = resourceName; + this.versionIdentifier = versionIdentifier; + this.technicalDescription = technicalDescription; this.deployedImplementationType = deployedImplementationType; } @@ -114,7 +118,8 @@ protected AssetBuilder(String qualifiedName, * Constructor supporting all entity properties. (Classifications are added separately.) * * @param qualifiedName unique name - * @param technicalName new value for the name + * @param name new value for the name + * @param resourceName the full name from the resource * @param versionIdentifier new value for the versionIdentifier * @param technicalDescription new description for the asset * @param deployedImplementationType technology type @@ -128,7 +133,8 @@ protected AssetBuilder(String qualifiedName, * @param serverName name of local server */ protected AssetBuilder(String qualifiedName, - String technicalName, + String name, + String resourceName, String versionIdentifier, String technicalDescription, String deployedImplementationType, @@ -151,9 +157,10 @@ protected AssetBuilder(String qualifiedName, serviceName, serverName); - this.technicalName = technicalName; - this.versionIdentifier = versionIdentifier; - this.technicalDescription = technicalDescription; + this.name = name; + this.resourceName = resourceName; + this.versionIdentifier = versionIdentifier; + this.technicalDescription = technicalDescription; this.deployedImplementationType = deployedImplementationType; } @@ -441,7 +448,12 @@ public InstanceProperties getInstanceProperties(String methodName) throws Inval properties = repositoryHelper.addStringPropertyToInstance(serviceName, properties, OpenMetadataProperty.NAME.name, - technicalName, + name, + methodName); + properties = repositoryHelper.addStringPropertyToInstance(serviceName, + properties, + OpenMetadataProperty.RESOURCE_NAME.name, + resourceName, methodName); properties = repositoryHelper.addStringPropertyToInstance(serviceName, properties, diff --git a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/AssetConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/AssetConverter.java new file mode 100644 index 00000000000..0a484acfb22 --- /dev/null +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/AssetConverter.java @@ -0,0 +1,235 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.generichandlers; + +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.AssetElement; +import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.AssetProperties; +import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.*; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; + +import java.lang.reflect.InvocationTargetException; +import java.util.List; + + +/** + * AssetConverter provides common methods for transferring relevant properties from an Open Metadata Repository Services (OMRS) + * EntityDetail object into a bean that inherits from AssetProperties. + */ +public class AssetConverter extends OMFConverter +{ + /** + * Constructor + * + * @param repositoryHelper helper object to parse entity + * @param serviceName name of this component + * @param serverName local server name + */ + public AssetConverter(OMRSRepositoryHelper repositoryHelper, + String serviceName, + String serverName) + { + super(repositoryHelper, serviceName, serverName); + } + + + /** + * Using the supplied instances, return a new instance of the bean. This is used for beans that + * contain a combination of the properties from an entity and that of a connected relationship. + * + * @param beanClass name of the class to create + * @param entity entity containing the properties + * @param methodName calling method + * @return bean populated with properties from the instances supplied + * @throws PropertyServerException there is a problem instantiating the bean + */ + @Override + public B getNewBean(Class beanClass, + EntityDetail entity, + String methodName) throws PropertyServerException + { + try + { + /* + * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. + */ + B returnBean = beanClass.getDeclaredConstructor().newInstance(); + + if (returnBean instanceof AssetElement bean) + { + AssetProperties assetProperties = new AssetProperties(); + + if (entity != null) + { + bean.setElementHeader(super.getMetadataElementHeader(beanClass, entity, methodName)); + + /* + * The initial set of values come from the entity. + */ + InstanceProperties instanceProperties = new InstanceProperties(entity.getProperties()); + + assetProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); + assetProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); + assetProperties.setName(this.removeName(instanceProperties)); + assetProperties.setResourceName(this.removeResourceName(instanceProperties)); + assetProperties.setDisplayName(assetProperties.getName()); + assetProperties.setVersionIdentifier(this.removeVersionIdentifier(instanceProperties)); + assetProperties.setResourceDescription(this.removeDescription(instanceProperties)); + assetProperties.setDeployedImplementationType(this.removeDeployedImplementationType(instanceProperties)); + + /* + * Any remaining properties are returned in the extended properties. They are + * assumed to be defined in a subtype. + */ + assetProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); + assetProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); + + bean.setProperties(assetProperties); + } + else + { + handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); + } + } + + return returnBean; + } + catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) + { + super.handleInvalidBeanClass(beanClass.getName(), error, methodName); + } + + return null; + } + + + /** + * Using the supplied instances, return a new instance of the bean. This is used for beans that + * contain a combination of the properties from an entity and that of a connected relationship. + * + * @param beanClass name of the class to create + * @param entity entity containing the properties + * @param relationship relationship containing the properties + * @param methodName calling method + * @return bean populated with properties from the instances supplied + * @throws PropertyServerException there is a problem instantiating the bean + */ + @Override + public B getNewBean(Class beanClass, + EntityDetail entity, + Relationship relationship, + String methodName) throws PropertyServerException + { + return getNewBean(beanClass, entity, methodName); + } + + + + + /** + * Using the supplied instances, return a new instance of the bean. It is used for beans such as + * a connection bean which made up of 3 entities (Connection, ConnectorType and Endpoint) plus the + * relationships between them. The relationships may be omitted if they do not have any properties. + * + * @param beanClass name of the class to create + * @param primaryEntity entity that is the root of the collection of entities that make up the content of the bean + * @param supplementaryEntities entities connected to the primary entity by the relationships + * @param relationships relationships linking the entities + * @param methodName calling method + * @return bean populated with properties from the instances supplied + * @throws PropertyServerException there is a problem instantiating the bean + */ + @Override + public B getNewComplexBean(Class beanClass, + EntityDetail primaryEntity, + List supplementaryEntities, + List relationships, + String methodName) throws PropertyServerException + { + try + { + /* + * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. + */ + B returnBean = beanClass.getDeclaredConstructor().newInstance(); + + if (returnBean instanceof AssetElement bean) + { + AssetProperties assetProperties = new AssetProperties(); + + if (primaryEntity != null) + { + bean.setElementHeader(super.getMetadataElementHeader(beanClass, primaryEntity, primaryEntity.getClassifications(), methodName)); + + /* + * The initial set of values come from the entity. + */ + InstanceProperties instanceProperties = new InstanceProperties(primaryEntity.getProperties()); + + assetProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); + assetProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); + assetProperties.setResourceName(this.removeName(instanceProperties)); + assetProperties.setResourceDescription(this.removeDescription(instanceProperties)); + + /* + * Any remaining properties are returned in the extended properties. They are + * assumed to be defined in a subtype. + */ + assetProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); + assetProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); + + if ((relationships != null) && (supplementaryEntities != null)) + { + for (Relationship relationship : relationships) + { + if (relationship != null) + { + if (repositoryHelper.isTypeOf(serviceName, + relationship.getType().getTypeDefName(), + OpenMetadataType.SUPPLEMENTARY_PROPERTIES_TYPE_NAME)) + { + EntityProxy termProxy = relationship.getEntityTwoProxy(); + + if (termProxy != null) + { + for (EntityDetail entity : supplementaryEntities) + { + if (entity != null) + { + if (termProxy.getGUID().equals(entity.getGUID())) + { + instanceProperties = entity.getProperties(); + assetProperties.setDisplayName(this.getDisplayName(instanceProperties)); + assetProperties.setDisplaySummary(this.getSummary(instanceProperties)); + assetProperties.setDisplayDescription(this.getDescription(instanceProperties)); + assetProperties.setAbbreviation(this.getAbbreviation(instanceProperties)); + assetProperties.setUsage(this.getUsage(instanceProperties)); + } + } + } + } + } + } + } + } + + bean.setProperties(assetProperties); + } + else + { + handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); + } + } + + return returnBean; + } + catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) + { + super.handleInvalidBeanClass(beanClass.getName(), error, methodName); + } + + return null; + } +} diff --git a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/AssetHandler.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/AssetHandler.java index 769a5935bf1..c6976209f39 100644 --- a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/AssetHandler.java +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/AssetHandler.java @@ -639,6 +639,7 @@ public String addAssetFromTemplate(String userId, } AssetBuilder builder = new AssetBuilder(qualifiedName, + name, name, versionIdentifier, description, @@ -766,9 +767,9 @@ public String addAssetFromTemplate(String userId, * @param externalSourceGUID unique identifier of software capability representing the caller * @param externalSourceName unique name of software capability representing the caller * @param qualifiedName unique name for this asset - * @param technicalName the stored name property for the asset + * @param name the stored name property for the asset * @param versionIdentifier the stored versionIdentifier property for the asset - * @param technicalDescription the stored description property associated with the asset + * @param resourceDescription the stored description property associated with the asset * @param deployedImplementationType type of technology * @param additionalProperties any arbitrary properties not part of the type system * @param typeName name of the type that is a subtype of asset - or null to create standard type @@ -789,9 +790,61 @@ public String createAssetInRepository(String userId, String externalSourceGUID, String externalSourceName, String qualifiedName, - String technicalName, + String name, String versionIdentifier, - String technicalDescription, + String resourceDescription, + String deployedImplementationType, + Map additionalProperties, + String typeName, + Map extendedProperties, + InstanceStatus instanceStatus, + Date effectiveFrom, + Date effectiveTo, + Date effectiveTime, + String methodName) throws InvalidParameterException, + PropertyServerException, + UserNotAuthorizedException + { + return createAssetInRepository(userId, externalSourceGUID, externalSourceName, qualifiedName, name, name, versionIdentifier, resourceDescription, deployedImplementationType, additionalProperties, typeName, extendedProperties, instanceStatus, effectiveFrom, effectiveTo, effectiveTime, methodName); + } + + + /** + * Add a simple asset description to the metadata repository. Null values for requested typename, ownership, + * zone membership and latest change are filled in with default values. + * + * @param userId calling user + * @param externalSourceGUID unique identifier of software capability representing the caller + * @param externalSourceName unique name of software capability representing the caller + * @param qualifiedName unique name for this asset + * @param name the stored name property for the asset + * @param resourceName the full name from the resource + * @param versionIdentifier the stored versionIdentifier property for the asset + * @param resourceDescription the stored description property associated with the asset + * @param deployedImplementationType type of technology + * @param additionalProperties any arbitrary properties not part of the type system + * @param typeName name of the type that is a subtype of asset - or null to create standard type + * @param extendedProperties properties from any subtype + * @param instanceStatus initial status of the Asset in the metadata repository + * @param effectiveFrom starting time for this relationship (null for all time) + * @param effectiveTo ending time for this relationship (null for all time) + * @param effectiveTime the time that the retrieved elements must be effective for (null for any time, new Date() for now) + * @param methodName calling method + * + * @return unique identifier of the new asset + * + * @throws InvalidParameterException the bean properties are invalid + * @throws UserNotAuthorizedException user not authorized to issue this request + * @throws PropertyServerException problem accessing the property server + */ + public String createAssetInRepository(String userId, + String externalSourceGUID, + String externalSourceName, + String qualifiedName, + String name, + String resourceName, + String versionIdentifier, + String resourceDescription, String deployedImplementationType, Map additionalProperties, String typeName, @@ -818,9 +871,10 @@ public String createAssetInRepository(String userId, repositoryHelper); AssetBuilder builder = new AssetBuilder(qualifiedName, - technicalName, + name, + resourceName, versionIdentifier, - technicalDescription, + resourceDescription, deployedImplementationType, additionalProperties, assetTypeId, @@ -860,9 +914,9 @@ public String createAssetInRepository(String userId, * @param externalSourceName unique name of software capability representing the caller * @param assetGUIDParameterName parameter name of the resulting asset's GUID * @param assetQualifiedName unique name for this asset - * @param technicalName the stored name property for the asset + * @param name the stored name property for the asset * @param versionIdentifier the stored versionIdentifier property for the asset - * @param technicalDescription the stored description property associated with the asset + * @param resourceDescription the stored description property associated with the asset * @param deployedImplementationType type of technology * @param additionalProperties any arbitrary properties not part of the type system * @param assetTypeName name of the type that is a subtype of asset - or null to create standard type @@ -894,9 +948,10 @@ public String createAssetWithConnection(String userId, String externalSourceName, String assetGUIDParameterName, String assetQualifiedName, - String technicalName, + String name, + String resourceName, String versionIdentifier, - String technicalDescription, + String resourceDescription, String deployedImplementationType, Map additionalProperties, String assetTypeName, @@ -922,9 +977,10 @@ public String createAssetWithConnection(String userId, externalSourceGUID, externalSourceName, assetQualifiedName, - technicalName, + name, + resourceName, versionIdentifier, - technicalDescription, + resourceDescription, deployedImplementationType, additionalProperties, assetTypeName, @@ -973,7 +1029,8 @@ public String createAssetWithConnection(String userId, * @param assetGUID unique identifier of the metadata element to update * @param assetGUIDParameterName parameter name that supplied the assetGUID * @param qualifiedName unique name for this database - * @param technicalName the stored name property for the asset + * @param name the stored name property for the asset + * @param resourceName full name of the resource * @param versionIdentifier the stored versionIdentifier property for the asset * @param technicalDescription the stored description property associated with the asset * @param deployedImplementationType type of technology @@ -998,7 +1055,8 @@ public void updateAsset(String userId, String assetGUID, String assetGUIDParameterName, String qualifiedName, - String technicalName, + String name, + String resourceName, String versionIdentifier, String technicalDescription, String deployedImplementationType, @@ -1027,7 +1085,8 @@ public void updateAsset(String userId, assetGUID, assetGUIDParameterName, qualifiedName, - technicalName, + name, + resourceName, versionIdentifier, technicalDescription, deployedImplementationType, @@ -1106,6 +1165,7 @@ public void updateAsset(String userId, assetGUIDParameterName, qualifiedName, technicalName, + technicalName, versionIdentifier, technicalDescription, deployedImplementationType, @@ -1124,6 +1184,8 @@ public void updateAsset(String userId, } + + /** * Update an asset's properties. * @@ -1133,9 +1195,10 @@ public void updateAsset(String userId, * @param assetGUID unique identifier of the metadata element to update * @param assetGUIDParameterName parameter name that supplied the assetGUID * @param qualifiedName unique name for this database - * @param technicalName the stored name property for the asset + * @param name the stored name property for the asset + * @param resourceName full name of the resource * @param versionIdentifier the stored versionIdentifier property for the asset - * @param technicalDescription the stored description property associated with the asset + * @param resourceDescription the stored description property associated with the asset * @param deployedImplementationType type of technology * @param additionalProperties any arbitrary properties not part of the type system * @param typeGUID identifier of the type that is a subtype of Asset - or null to create standard type @@ -1160,9 +1223,10 @@ public void updateAsset(String userId, String assetGUID, String assetGUIDParameterName, String qualifiedName, - String technicalName, + String name, + String resourceName, String versionIdentifier, - String technicalDescription, + String resourceDescription, String deployedImplementationType, Map additionalProperties, String typeGUID, @@ -1180,9 +1244,10 @@ public void updateAsset(String userId, PropertyServerException { AssetBuilder builder = new AssetBuilder(qualifiedName, - technicalName, + name, + resourceName, versionIdentifier, - technicalDescription, + resourceDescription, deployedImplementationType, additionalProperties, typeGUID, @@ -1220,7 +1285,8 @@ public void updateAsset(String userId, * @param assetGUID unique identifier of the metadata element to update * @param assetGUIDParameterName parameter name that supplied the assetGUID * @param qualifiedName unique name for this asset - * @param name the stored name property for the asset + * @param name the short name property for the asset + * @param resourceName the resource name property for the asset * @param versionIdentifier the stored versionIdentifier property for the asset * @param description the stored description property associated with the asset * @param deployedImplementationType type of technology @@ -1251,6 +1317,7 @@ public void updateAssetWithConnection(String userId, String assetGUIDParameterName, String qualifiedName, String name, + String resourceName, String versionIdentifier, String description, String deployedImplementationType, @@ -1278,6 +1345,7 @@ public void updateAssetWithConnection(String userId, assetGUIDParameterName, qualifiedName, name, + resourceName, versionIdentifier, description, deployedImplementationType, diff --git a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/CertificationTypeConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/CertificationTypeConverter.java new file mode 100644 index 00000000000..fc9f9b97b6a --- /dev/null +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/CertificationTypeConverter.java @@ -0,0 +1,138 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.generichandlers; + + +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.CertificationTypeElement; +import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.CertificationTypeProperties; +import java.lang.reflect.InvocationTargetException; + + +/** + * CertificationTypeConverter provides common methods for transferring relevant properties from an Open Metadata Repository Services (OMRS) + * EntityDetail object into a bean that inherits from CertificationTypeElement. + */ +public class CertificationTypeConverter extends OMFConverter +{ + /** + * Constructor + * + * @param repositoryHelper helper object to parse entity + * @param serviceName name of this component + * @param serverName local server name + */ + public CertificationTypeConverter(OMRSRepositoryHelper repositoryHelper, + String serviceName, + String serverName) + { + super(repositoryHelper, serviceName, serverName); + } + + + + /** + * Using the supplied entity, return a new instance of the bean. This is used for most beans that have + * a one to one correspondence with the repository instances. + * + * @param beanClass name of the class to create + * @param primaryEntity entity containing the properties + * @param methodName calling method + * @return bean populated with properties from the entity supplied + * @throws PropertyServerException there is a problem instantiating the bean + */ + public B getNewBean(Class beanClass, + EntityDetail primaryEntity, + String methodName) throws PropertyServerException + { + try + { + /* + * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. + */ + B returnBean = beanClass.getDeclaredConstructor().newInstance(); + + if (returnBean instanceof CertificationTypeElement bean) + { + if (primaryEntity != null) + { + bean.setElementHeader(this.getMetadataElementHeader(beanClass, primaryEntity, primaryEntity.getClassifications(), methodName)); + + /* + * The initial set of values come from the entity. + */ + InstanceProperties instanceProperties = new InstanceProperties(primaryEntity.getProperties()); + + CertificationTypeProperties governanceDefinitionProperties = new CertificationTypeProperties(); + + governanceDefinitionProperties.setDocumentIdentifier(this.removeQualifiedName(instanceProperties)); + governanceDefinitionProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); + governanceDefinitionProperties.setTitle(this.removeTitle(instanceProperties)); + governanceDefinitionProperties.setScope(this.removeScope(instanceProperties)); + governanceDefinitionProperties.setDomainIdentifier(this.removeDomainIdentifier(instanceProperties)); + governanceDefinitionProperties.setPriority(this.removePriority(instanceProperties)); + governanceDefinitionProperties.setOutcomes(this.removeOutcomes(instanceProperties)); + governanceDefinitionProperties.setResults(this.removeResults(instanceProperties)); + governanceDefinitionProperties.setDetails(this.removeDetails(instanceProperties)); + + /* + * Any remaining properties are returned in the extended properties. They are + * assumed to be defined in a subtype. + */ + governanceDefinitionProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); + governanceDefinitionProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); + + bean.setProperties(governanceDefinitionProperties); + } + else + { + handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); + } + } + + return returnBean; + } + catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) + { + super.handleInvalidBeanClass(beanClass.getName(), error, methodName); + } + + return null; + } + + + /** + * Using the supplied instances, return a new instance of the bean. This is used for beans that + * contain a combination of the properties from an entity and that of a connected relationship. + * + * @param beanClass name of the class to create + * @param entity entity containing the properties + * @param relationship relationship containing the properties + * @param methodName calling method + * @return bean populated with properties from the instances supplied + * @throws PropertyServerException there is a problem instantiating the bean + */ + @SuppressWarnings(value = "unused") + public B getNewBean(Class beanClass, + EntityDetail entity, + Relationship relationship, + String methodName) throws PropertyServerException + { + final String thisMethodName = "getNewBean(entity, relationship)"; + B returnBean = this.getNewBean(beanClass, entity, methodName); + + if (returnBean instanceof CertificationTypeElement) + { + CertificationTypeElement bean = (CertificationTypeElement) returnBean; + + bean.setRelatedElement(super.getRelatedElement(beanClass, entity, relationship, methodName)); + } + + return returnBean; + } +} diff --git a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/CollectionConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/CollectionConverter.java new file mode 100644 index 00000000000..50122b8c0f3 --- /dev/null +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/CollectionConverter.java @@ -0,0 +1,135 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.generichandlers; + +import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; +import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.CollectionElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.collections.CollectionProperties; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; + +import java.lang.reflect.InvocationTargetException; + + +/** + * CollectionConverter generates a CollectionElement from a Collection entity + */ +public class CollectionConverter extends OMFConverter +{ + /** + * Constructor + * + * @param repositoryHelper helper object to parse entity + * @param serviceName name of this component + * @param serverName local server name + */ + public CollectionConverter(OMRSRepositoryHelper repositoryHelper, + String serviceName, + String serverName) + { + super(repositoryHelper, serviceName, serverName); + } + + + /** + * Using the supplied entity, return a new instance of the bean. This is used for most beans that have + * a one to one correspondence with the repository instances. + * + * @param beanClass name of the class to create + * @param entity entity containing the properties + * @param methodName calling method + * @return bean populated with properties from the instances supplied + * @throws PropertyServerException there is a problem instantiating the bean + */ + @Override + public B getNewBean(Class beanClass, + EntityDetail entity, + String methodName) throws PropertyServerException + { + try + { + /* + * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. + */ + B returnBean = beanClass.getDeclaredConstructor().newInstance(); + + if (returnBean instanceof CollectionElement bean) + { + CollectionProperties collectionProperties = new CollectionProperties(); + + bean.setElementHeader(super.getMetadataElementHeader(beanClass, entity, methodName)); + + InstanceProperties instanceProperties; + + /* + * The initial set of values come from the entity. + */ + if (entity != null) + { + instanceProperties = new InstanceProperties(entity.getProperties()); + + collectionProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); + collectionProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); + collectionProperties.setName(this.removeName(instanceProperties)); + collectionProperties.setDescription(this.removeDescription(instanceProperties)); + collectionProperties.setCollectionType(this.removeCollectionType(instanceProperties)); + collectionProperties.setEffectiveFrom(instanceProperties.getEffectiveFromTime()); + collectionProperties.setEffectiveTo(instanceProperties.getEffectiveToTime()); + + /* + * Any remaining properties are returned in the extended properties. They are + * assumed to be defined in a subtype. + */ + collectionProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); + collectionProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); + } + else + { + handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); + } + + bean.setProperties(collectionProperties); + } + + return returnBean; + } + catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) + { + super.handleInvalidBeanClass(beanClass.getName(), error, methodName); + } + + return null; + } + + + /** + * Using the supplied instances, return a new instance of the bean. This is used for beans that + * contain a combination of the properties from an entity and that of a connected relationship. + * + * @param beanClass name of the class to create + * @param entity entity containing the properties + * @param relationship relationship containing the properties + * @param methodName calling method + * @return bean populated with properties from the instances supplied + * @throws PropertyServerException there is a problem instantiating the bean + */ + public B getNewBean(Class beanClass, + EntityDetail entity, + Relationship relationship, + String methodName) throws PropertyServerException + { + B returnBean = this.getNewBean(beanClass, entity, methodName); + + if (returnBean instanceof CollectionElement bean) + { + + bean.setRelatedElement(super.getRelatedElement(beanClass, entity, relationship, methodName)); + } + + return returnBean; + } +} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/converters/CollectionMembershipConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/CollectionMembershipConverter.java similarity index 90% rename from open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/converters/CollectionMembershipConverter.java rename to open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/CollectionMembershipConverter.java index 26214aa42e0..59d9b408e94 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/converters/CollectionMembershipConverter.java +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/CollectionMembershipConverter.java @@ -1,10 +1,11 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.converters; +package org.odpi.openmetadata.commonservices.generichandlers; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.CollectionElement; -import org.odpi.openmetadata.accessservices.communityprofile.properties.CollectionProperties; +import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.CollectionElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.collections.CollectionProperties; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; @@ -17,7 +18,7 @@ /** * CollectionMembershipConverter generates a CollectionBean from a CollectionMembership relationship and Collection entity */ -public class CollectionMembershipConverter extends CommunityProfileOMASConverter +public class CollectionMembershipConverter extends OMFConverter { /** * Constructor @@ -57,9 +58,8 @@ public B getNewBean(Class beanClass, */ B returnBean = beanClass.getDeclaredConstructor().newInstance(); - if (returnBean instanceof CollectionElement) + if (returnBean instanceof CollectionElement bean) { - CollectionElement bean = (CollectionElement) returnBean; CollectionProperties collectionProperties = new CollectionProperties(); bean.setElementHeader(super.getMetadataElementHeader(beanClass, entity, methodName)); diff --git a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/CommentConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/CommentConverter.java new file mode 100644 index 00000000000..7d61b6f8707 --- /dev/null +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/CommentConverter.java @@ -0,0 +1,210 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.generichandlers; + + +import org.odpi.openmetadata.frameworks.openmetadata.enums.CommentType; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.CommentElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.FeedbackTargetElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.feedback.CommentProperties; +import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; +import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EnumPropertyValue; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstancePropertyValue; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; + +import java.lang.reflect.InvocationTargetException; +import java.util.Map; + + +/** + * CommentConverter provides common methods for transferring relevant properties from an Open Metadata Repository Services (OMRS) + * EntityDetail object into an CommentElement bean. + */ +public class CommentConverter extends OMFConverter +{ + /** + * Constructor + * + * @param repositoryHelper helper object to parse entity + * @param serviceName name of this component + * @param serverName local server name + */ + public CommentConverter(OMRSRepositoryHelper repositoryHelper, + String serviceName, + String serverName) + { + super(repositoryHelper, serviceName, serverName); + } + + + /** + * Using the supplied instances, return a new instance of the bean. This is used for beans that + * contain a combination of the properties from an entity and that of a connected relationship. + * + * @param beanClass name of the class to create + * @param entity entity containing the properties + * @param relationship relationship containing the properties + * @param methodName calling method + * @return bean populated with properties from the instances supplied + * @throws PropertyServerException there is a problem instantiating the bean + */ + @Override + public B getNewBean(Class beanClass, + EntityDetail entity, + Relationship relationship, + String methodName) throws PropertyServerException + { + try + { + /* + * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. + */ + B returnBean = beanClass.getDeclaredConstructor().newInstance(); + + if (returnBean instanceof CommentElement bean) + { + CommentProperties properties = new CommentProperties(); + + bean.setElementHeader(super.getMetadataElementHeader(beanClass, entity, methodName)); + + InstanceProperties instanceProperties; + + /* + * The initial set of values come from the entity. + */ + if (entity != null) + { + instanceProperties = new InstanceProperties(entity.getProperties()); + + properties.setQualifiedName(this.removeQualifiedName(instanceProperties)); + properties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); + properties.setCommentText(this.removeCommentText(instanceProperties)); + properties.setCommentType(this.removeCommentTypeFromProperties(instanceProperties)); + + /* + * Any remaining properties are returned in the extended properties. They are + * assumed to be defined in a subtype. + */ + properties.setTypeName(bean.getElementHeader().getType().getTypeName()); + properties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); + } + else + { + handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); + } + + bean.setProperties(properties); + + if (relationship != null) + { + FeedbackTargetElement feedbackTargetElement = new FeedbackTargetElement(); + + instanceProperties = new InstanceProperties(relationship.getProperties()); + + feedbackTargetElement.setRelationshipHeader(super.getMetadataElementHeader(beanClass, relationship, null, methodName)); + feedbackTargetElement.setRelatedElement(super.getElementStub(beanClass, relationship.getEntityOneProxy(), methodName)); + feedbackTargetElement.setIsPublic(this.getIsPublic(instanceProperties)); + + bean.setFeedbackTargetElement(feedbackTargetElement); + } + + } + + return returnBean; + } + catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) + { + super.handleInvalidBeanClass(beanClass.getName(), error, methodName); + } + + return null; + } + + + /** + * Using the supplied instances, return a new instance of the bean. This is used for beans that + * contain a combination of the properties from an entity and that of a connected relationship. + * + * @param beanClass name of the class to create + * @param entity entity containing the properties + * @param methodName calling method + * @return bean populated with properties from the instances supplied + * @throws PropertyServerException there is a problem instantiating the bean + */ + @Override + public B getNewBean(Class beanClass, + EntityDetail entity, + String methodName) throws PropertyServerException + { + return getNewBean(beanClass, entity, null, methodName); + } + + + /** + * Retrieve and delete the CommentType enum property from the instance properties of an entity + * + * @param properties entity properties + * @return CommentType enum value + */ + private CommentType removeCommentTypeFromProperties(InstanceProperties properties) + { + CommentType commentType = this.getCommentTypeFromProperties(properties); + + if (properties != null) + { + Map instancePropertiesMap = properties.getInstanceProperties(); + + if (instancePropertiesMap != null) + { + instancePropertiesMap.remove(OpenMetadataProperty.COMMENT_TYPE.name); + } + + properties.setInstanceProperties(instancePropertiesMap); + } + + return commentType; + } + + + /** + * Retrieve the CommentType enum property from the instance properties of an entity + * + * @param properties entity properties + * @return CommentType enum value + */ + private CommentType getCommentTypeFromProperties(InstanceProperties properties) + { + CommentType commentType = CommentType.STANDARD_COMMENT; + + if (properties != null) + { + Map instancePropertiesMap = properties.getInstanceProperties(); + + if (instancePropertiesMap != null) + { + InstancePropertyValue instancePropertyValue = instancePropertiesMap.get(OpenMetadataProperty.COMMENT_TYPE.name); + + if (instancePropertyValue instanceof EnumPropertyValue enumPropertyValue) + { + commentType = switch (enumPropertyValue.getOrdinal()) + { + case 0 -> CommentType.STANDARD_COMMENT; + case 1 -> CommentType.QUESTION; + case 2 -> CommentType.ANSWER; + case 3 -> CommentType.SUGGESTION; + case 4 -> CommentType.USAGE_EXPERIENCE; + case 99 -> CommentType.OTHER; + default -> commentType; + }; + } + } + } + + return commentType; + } +} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/converters/CommunityConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/CommunityConverter.java similarity index 93% rename from open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/converters/CommunityConverter.java rename to open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/CommunityConverter.java index 73deb431045..d65a15b856e 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/converters/CommunityConverter.java +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/CommunityConverter.java @@ -1,10 +1,11 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.converters; +package org.odpi.openmetadata.commonservices.generichandlers; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.CommunityElement; -import org.odpi.openmetadata.accessservices.communityprofile.properties.CommunityProperties; +import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.CommunityElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.communities.CommunityProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; @@ -18,7 +19,7 @@ /** * CommunityConverter generates an CommunityElement bean from an CommunityProperties entity. */ -public class CommunityConverter extends CommunityProfileOMASConverter +public class CommunityConverter extends OMFConverter { /** * Constructor diff --git a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ConnectionConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ConnectionConverter.java index 1c4b2825421..e7307a49797 100644 --- a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ConnectionConverter.java +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ConnectionConverter.java @@ -2,20 +2,26 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.commonservices.generichandlers; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ConnectionElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.EmbeddedConnection; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.ConnectionProperties; +import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; import java.lang.reflect.InvocationTargetException; +import java.util.ArrayList; import java.util.List; /** - * ConnectionConverter transfers the relevant properties from some Open Metadata Repository Services (OMRS) + * OCFConnectionConverter transfers the relevant properties from some Open Metadata Repository Services (OMRS) * EntityDetail and Relationship objects into a Connection bean (or a VirtualConnection bean). */ -public class ConnectionConverter extends OCFConverter +public class ConnectionConverter extends OMFConverter { /** * Constructor @@ -61,13 +67,83 @@ public B getNewComplexBean(Class beanClass, */ B returnBean = beanClass.getDeclaredConstructor().newInstance(); - if (returnBean instanceof Connection) + if (returnBean instanceof ConnectionElement bean) { - /* - * This cast should not fail due to the checking we have done above, but ClassCastException is caught just in case. - */ - return (B) getEmbeddedConnection(beanClass, primaryEntity, supplementaryEntities, relationships, methodName); + ConnectionProperties connectionProperties = new ConnectionProperties(); + + if (primaryEntity != null) + { + bean.setElementHeader(this.getMetadataElementHeader(beanClass, primaryEntity, methodName)); + + /* + * The initial set of values come from the entity. + */ + InstanceProperties instanceProperties = new InstanceProperties(primaryEntity.getProperties()); + + connectionProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); + connectionProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); + connectionProperties.setDisplayName(this.removeDisplayName(instanceProperties)); + connectionProperties.setDescription(this.removeDescription(instanceProperties)); + connectionProperties.setSecuredProperties(this.removeSecuredProperties(instanceProperties)); + connectionProperties.setConfigurationProperties(this.removeConfigurationProperties(instanceProperties)); + connectionProperties.setUserId(this.removeUserId(instanceProperties)); + connectionProperties.setClearPassword(this.removeClearPassword(instanceProperties)); + connectionProperties.setEncryptedPassword(this.removeEncryptedPassword(instanceProperties)); + /* + * Any remaining properties are returned in the extended properties. They are + * assumed to be defined in a subtype. + */ + connectionProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); + connectionProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); + + bean.setConnectionProperties(connectionProperties); + } + else + { + handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); + } + + if (relationships != null) + { + List embeddedConnections = new ArrayList<>(); + + for (Relationship relationship : relationships) + { + if ((relationship != null) && (relationship.getType() != null)) + { + if (repositoryHelper.isTypeOf(serviceName, relationship.getType().getTypeDefName(), OpenMetadataType.EMBEDDED_CONNECTION_TYPE_NAME)) + { + EmbeddedConnection embeddedConnection = new EmbeddedConnection(); + + InstanceProperties relationshipProperties = relationship.getProperties(); + + embeddedConnection.setPosition(this.getPosition(relationshipProperties)); + embeddedConnection.setDisplayName(this.getDisplayName(relationshipProperties)); + embeddedConnection.setArguments(this.getArguments(relationshipProperties)); + + embeddedConnection.setEmbeddedConnection(getElementStub(beanClass, relationship.getEntityTwoProxy(), methodName)); + + embeddedConnections.add(embeddedConnection); + } + else if (repositoryHelper.isTypeOf(serviceName, relationship.getType().getTypeDefName(), OpenMetadataType.CONNECTION_CONNECTOR_TYPE_TYPE_NAME)) + { + bean.setConnectorType(getElementStub(beanClass, relationship.getEntityTwoProxy(), methodName)); + } + else if (repositoryHelper.isTypeOf(serviceName, relationship.getType().getTypeDefName(), OpenMetadataType.CONNECTION_ENDPOINT_TYPE_NAME)) + { + bean.setEndpoint(getElementStub(beanClass, relationship.getEntityOneProxy(), methodName)); + } + } + } + + if (! embeddedConnections.isEmpty()) + { + bean.setEmbeddedConnections(embeddedConnections); + } + } } + + return returnBean; } catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) { diff --git a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ConnectorTypeConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ConnectorTypeConverter.java new file mode 100644 index 00000000000..22263f2bdbc --- /dev/null +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ConnectorTypeConverter.java @@ -0,0 +1,135 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.generichandlers; + +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ConnectorTypeElement; +import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.ConnectorTypeProperties; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; + +import java.lang.reflect.InvocationTargetException; + +/** + * ConnectorTypeConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) + * EntityDetail object into a ConnectorTypeElement bean. + */ +public class ConnectorTypeConverter extends OMFConverter +{ + /** + * Constructor + * + * @param repositoryHelper helper object to parse entity/relationship objects + * @param serviceName name of this component + * @param serverName local server name + */ + public ConnectorTypeConverter(OMRSRepositoryHelper repositoryHelper, + String serviceName, + String serverName) + { + super(repositoryHelper, serviceName, serverName); + } + + + /** + * Using the supplied instances, return a new instance of the bean. This is used for beans that + * contain a combination of the properties from an entity and that of a connected relationship. + * + * @param beanClass name of the class to create + * @param entity entity containing the properties + * @param methodName calling method + * @return bean populated with properties from the instances supplied + * @throws PropertyServerException there is a problem instantiating the bean + */ + @Override + public B getNewBean(Class beanClass, + EntityDetail entity, + String methodName) throws PropertyServerException + { + try + { + /* + * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. + */ + B returnBean = beanClass.getDeclaredConstructor().newInstance(); + + if (returnBean instanceof ConnectorTypeElement bean) + { + ConnectorTypeProperties connectorTypeProperties = new ConnectorTypeProperties(); + + if (entity != null) + { + bean.setElementHeader(this.getMetadataElementHeader(beanClass, entity, methodName)); + + /* + * The initial set of values come from the entity. + */ + InstanceProperties instanceProperties = new InstanceProperties(entity.getProperties()); + + connectorTypeProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); + connectorTypeProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); + connectorTypeProperties.setDisplayName(this.removeDisplayName(instanceProperties)); + connectorTypeProperties.setDescription(this.removeDescription(instanceProperties)); + connectorTypeProperties.setSupportedAssetTypeName(this.removeSupportedAssetTypeName(instanceProperties)); + connectorTypeProperties.setExpectedDataFormat(this.removeExpectedDataFormat(instanceProperties)); + connectorTypeProperties.setConnectorProviderClassName(this.removeConnectorProviderClassName(instanceProperties)); + connectorTypeProperties.setConnectorFrameworkName(this.removeConnectorFrameworkName(instanceProperties)); + connectorTypeProperties.setConnectorInterfaceLanguage(this.removeConnectorInterfaceLanguage(instanceProperties)); + connectorTypeProperties.setConnectorInterfaces(this.removeConnectorInterfaces(instanceProperties)); + connectorTypeProperties.setTargetTechnologySource(this.removeTargetTechnologySource(instanceProperties)); + connectorTypeProperties.setTargetTechnologyName(this.removeTargetTechnologyName(instanceProperties)); + connectorTypeProperties.setTargetTechnologyInterfaces(this.removeTargetTechnologyInterfaces(instanceProperties)); + connectorTypeProperties.setTargetTechnologyVersions(this.removeTargetTechnologyVersions(instanceProperties)); + connectorTypeProperties.setRecognizedAdditionalProperties(this.removeRecognizedAdditionalProperties(instanceProperties)); + connectorTypeProperties.setRecognizedSecuredProperties(this.removeRecognizedSecuredProperties(instanceProperties)); + connectorTypeProperties.setRecognizedConfigurationProperties(this.removeRecognizedConfigurationProperties(instanceProperties)); + + /* + * Any remaining properties are returned in the extended properties. They are + * assumed to be defined in a subtype. + */ + connectorTypeProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); + connectorTypeProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); + + bean.setConnectorTypeProperties(connectorTypeProperties); + } + else + { + handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); + } + } + + return returnBean; + } + catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) + { + super.handleInvalidBeanClass(beanClass.getName(), error, methodName); + } + + return null; + } + + + /** + * Using the supplied instances, return a new instance of the bean. This is used for beans that + * contain a combination of the properties from an entity and that of a connected relationship. + * + * @param beanClass name of the class to create + * @param entity entity containing the properties + * @param relationship relationship containing the properties + * @param methodName calling method + * @return bean populated with properties from the instances supplied + * @throws PropertyServerException there is a problem instantiating the bean + */ + @Override + public B getNewBean(Class beanClass, + EntityDetail entity, + Relationship relationship, + String methodName) throws PropertyServerException + { + return getNewBean(beanClass, entity, methodName); + } +} diff --git a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ContactMethodConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ContactMethodConverter.java new file mode 100644 index 00000000000..a34c0cdf235 --- /dev/null +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ContactMethodConverter.java @@ -0,0 +1,131 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.generichandlers; + + +import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; +import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ContactMethodElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.ContactMethodProperties; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; + + +import java.lang.reflect.InvocationTargetException; + +/** + * ContactMethodConverter generates a ContactMethodProperties bean from a ContactMethodProperties entity. + */ +public class ContactMethodConverter extends OMFConverter +{ + /** + * Constructor + * + * @param repositoryHelper helper object to parse entity + * @param serviceName name of this component + * @param serverName local server name + */ + public ContactMethodConverter(OMRSRepositoryHelper repositoryHelper, + String serviceName, + String serverName) + { + super(repositoryHelper, serviceName, serverName); + } + + + /** + * Using the supplied entity, return a new instance of the bean. This is used for most beans that have + * a one to one correspondence with the repository instances. + * + * @param beanClass name of the class to create + * @param entity entity containing the properties + * @param methodName calling method + * @return bean populated with properties from the instances supplied + * @throws PropertyServerException there is a problem instantiating the bean + */ + @Override + public B getNewBean(Class beanClass, + EntityDetail entity, + String methodName) throws PropertyServerException + { + try + { + /* + * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. + */ + B returnBean = beanClass.getDeclaredConstructor().newInstance(); + + if (returnBean instanceof ContactMethodElement bean) + { + ContactMethodProperties contactMethodProperties = new ContactMethodProperties(); + + bean.setElementHeader(super.getMetadataElementHeader(beanClass, entity, methodName)); + + InstanceProperties entityProperties; + + /* + * The initial set of values come from the entity. + */ + if (entity != null) + { + entityProperties = new InstanceProperties(entity.getProperties()); + + contactMethodProperties.setName(this.removeName(entityProperties)); + contactMethodProperties.setContactType(this.removeContactType(entityProperties)); + contactMethodProperties.setContactMethodType(this.getContactMethodTypeFromProperties(entityProperties)); + contactMethodProperties.setContactMethodService(this.removeContactMethodService(entityProperties)); + contactMethodProperties.setContactMethodValue(this.removeContactMethodValue(entityProperties)); + contactMethodProperties.setEffectiveFrom(entityProperties.getEffectiveFromTime()); + contactMethodProperties.setEffectiveTo(entityProperties.getEffectiveToTime()); + + + /* + * Any remaining properties are returned in the extended properties. They are + * assumed to be defined in a subtype. + */ + contactMethodProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); + contactMethodProperties.setExtendedProperties(this.getRemainingExtendedProperties(entityProperties)); + } + else + { + handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); + } + + bean.setProperties(contactMethodProperties); + } + + return returnBean; + } + catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) + { + super.handleInvalidBeanClass(beanClass.getName(), error, methodName); + } + + return null; + } + + + /** + * Using the supplied instances, return a new instance of the bean. This is used for beans that + * contain a combination of the properties from an entity and that of a connected relationship. + * + * @param beanClass name of the class to create + * @param entity entity containing the properties + * @param relationship relationship containing the properties + * @param methodName calling method + * @return bean populated with properties from the instances supplied + * @throws PropertyServerException there is a problem instantiating the bean + */ + @SuppressWarnings(value = "unused") + @Override + public B getNewBean(Class beanClass, + EntityDetail entity, + Relationship relationship, + String methodName) throws PropertyServerException + { + return this.getNewBean(beanClass, entity, methodName); + } +} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/converters/ContributionRecordConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ContributionRecordConverter.java similarity index 90% rename from open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/converters/ContributionRecordConverter.java rename to open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ContributionRecordConverter.java index fedd9d75faa..1773e4df02f 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/converters/ContributionRecordConverter.java +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ContributionRecordConverter.java @@ -1,11 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.converters; +package org.odpi.openmetadata.commonservices.generichandlers; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.ContributionRecordElement; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ContributionRecord; +import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ContributionRecordElement; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.ContributionRecord; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; @@ -18,7 +19,7 @@ /** * ContributionRecordConverter generates a ContributionRecordProperties bean from a ContributionRecord entity. */ -public class ContributionRecordConverter extends CommunityProfileOMASConverter +public class ContributionRecordConverter extends OMFConverter { /** * Constructor @@ -60,10 +61,9 @@ public B getNewBean(Class beanClass, */ B returnBean = beanClass.getDeclaredConstructor().newInstance(); - if (returnBean instanceof ContributionRecordElement) + if (returnBean instanceof ContributionRecordElement bean) { - ContributionRecordElement bean = (ContributionRecordElement) returnBean; - ContributionRecord contributionRecord = new ContributionRecord(); + ContributionRecord contributionRecord = new ContributionRecord(); bean.setElementHeader(super.getMetadataElementHeader(beanClass, entity, methodName)); diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/converters/ControlFlowConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ControlFlowConverter.java similarity index 92% rename from open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/converters/ControlFlowConverter.java rename to open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ControlFlowConverter.java index 9191d19e21f..5e798d8e9c4 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/converters/ControlFlowConverter.java +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ControlFlowConverter.java @@ -1,9 +1,10 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.converters; +package org.odpi.openmetadata.commonservices.generichandlers; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.ControlFlowElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.ControlFlowProperties; +import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ControlFlowElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.lineage.ControlFlowProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityProxy; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; @@ -18,7 +19,7 @@ * ControlFlowConverter provides common methods for transferring relevant properties from an Open Metadata Repository Services (OMRS) * Relationship object into a ControlFlowElement bean. */ -public class ControlFlowConverter extends ITInfrastructureOMASConverter +public class ControlFlowConverter extends OMFConverter { /** * Constructor diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/DataContainerConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/DataContainerConverter.java similarity index 92% rename from open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/DataContainerConverter.java rename to open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/DataContainerConverter.java index 69685e7100c..056a4f588f8 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/DataContainerConverter.java +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/DataContainerConverter.java @@ -1,10 +1,10 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.converters; +package org.odpi.openmetadata.commonservices.generichandlers; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.DataContainerElement; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.SchemaTypeElement; -import org.odpi.openmetadata.accessservices.datamanager.properties.DataContainerProperties; +import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.DataContainerElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.display.DataContainerProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; @@ -19,7 +19,7 @@ * DataContainerConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) * EntityDetail object into a DataContainerElement bean. */ -public class DataContainerConverter extends DataManagerOMASConverter +public class DataContainerConverter extends OMFConverter { /** * Constructor diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/DataFieldConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/DataFieldConverter.java similarity index 91% rename from open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/DataFieldConverter.java rename to open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/DataFieldConverter.java index 347168f0fff..12a595792a5 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/DataFieldConverter.java +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/DataFieldConverter.java @@ -1,10 +1,11 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.converters; +package org.odpi.openmetadata.commonservices.generichandlers; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.DataFieldElement; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.SchemaTypeElement; -import org.odpi.openmetadata.accessservices.datamanager.properties.DataFieldProperties; +import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.DataFieldElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.SchemaTypeElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.display.DataFieldProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; @@ -19,7 +20,7 @@ * DataFieldConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) * EntityDetail object into a DataFieldElement bean. */ -public class DataFieldConverter extends DataManagerOMASConverter +public class DataFieldConverter extends OMFConverter { /** * Constructor @@ -97,10 +98,8 @@ public B getNewSchemaAttributeBean(Class beanClass, properties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - if (schemaType instanceof SchemaTypeElement) + if (schemaType instanceof SchemaTypeElement schemaTypeElement) { - SchemaTypeElement schemaTypeElement = (SchemaTypeElement) schemaType; - this.addSchemaTypeToAttribute(schemaTypeElement, properties); } diff --git a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/DataFileConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/DataFileConverter.java new file mode 100644 index 00000000000..ebd209490a1 --- /dev/null +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/DataFileConverter.java @@ -0,0 +1,142 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.generichandlers; + +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.FileElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.filesandfolders.FileProperties; +import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; +import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; + +import java.lang.reflect.InvocationTargetException; + +/** + * DataFileConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) + * EntityDetail object into a DataFileElement bean. + */ +public class DataFileConverter extends OMFConverter +{ + /** + * Constructor + * + * @param repositoryHelper helper object to parse entity/relationship objects + * @param serviceName name of this component + * @param serverName local server name + */ + public DataFileConverter(OMRSRepositoryHelper repositoryHelper, + String serviceName, + String serverName) + { + super(repositoryHelper, serviceName, serverName); + } + + + /** + * Using the supplied instances, return a new instance of the bean. This is used for beans that + * contain a combination of the properties from an entity and that of a connected relationship. + * + * @param beanClass name of the class to create + * @param entity entity containing the properties + * @param methodName calling method + * @return bean populated with properties from the instances supplied + * @throws PropertyServerException there is a problem instantiating the bean + */ + @Override + @SuppressWarnings(value = "deprecation") + public B getNewBean(Class beanClass, + EntityDetail entity, + String methodName) throws PropertyServerException + { + try + { + /* + * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. + */ + B returnBean = beanClass.getDeclaredConstructor().newInstance(); + + if (returnBean instanceof FileElement bean) + { + FileProperties fileProperties = new FileProperties(); + + bean.setElementHeader(super.getMetadataElementHeader(beanClass, entity, methodName)); + + InstanceProperties instanceProperties; + + /* + * The initial set of values come from the entity. + */ + if (entity != null) + { + instanceProperties = new InstanceProperties(entity.getProperties()); + + fileProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); + fileProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); + fileProperties.setName(this.removeName(instanceProperties)); + fileProperties.setResourceName(this.removeResourceName(instanceProperties)); + fileProperties.setVersionIdentifier(this.removeVersionIdentifier(instanceProperties)); + fileProperties.setResourceDescription(this.removeDescription(instanceProperties)); + fileProperties.setPathName(this.removePathName(instanceProperties)); + fileProperties.setCreateTime(this.removeStoreCreateTime(instanceProperties)); + fileProperties.setModifiedTime(this.removeStoreUpdateTime(instanceProperties)); + fileProperties.setDeployedImplementationType(this.removeDeployedImplementationType(instanceProperties)); + fileProperties.setFileName(this.removeFileName(instanceProperties)); + fileProperties.setFileType(this.removeFileType(instanceProperties)); + fileProperties.setFileExtension(this.removeFileExtension(instanceProperties)); + + /* + * Any remaining properties are returned in the extended properties. They are + * assumed to be defined in a subtype. + */ + fileProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); + fileProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); + + instanceProperties = super.getClassificationProperties(OpenMetadataType.DATA_ASSET_ENCODING_CLASSIFICATION.typeName, entity); + + fileProperties.setEncodingType(this.getDataStoreEncodingType(instanceProperties)); + fileProperties.setEncodingLanguage(this.getDataStoreEncodingLanguage(instanceProperties)); + fileProperties.setEncodingDescription(this.getDataStoreEncodingDescription(instanceProperties)); + fileProperties.setEncodingProperties(this.getEncodingProperties(instanceProperties)); + + bean.setFileProperties(fileProperties); + } + else + { + handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); + } + } + + return returnBean; + } + catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) + { + super.handleInvalidBeanClass(beanClass.getName(), error, methodName); + } + + return null; + } + + + /** + * Using the supplied instances, return a new instance of the bean. This is used for beans that + * contain a combination of the properties from an entity and that of a connected relationship. + * + * @param beanClass name of the class to create + * @param entity entity containing the properties + * @param relationship relationship containing the properties + * @param methodName calling method + * @return bean populated with properties from the instances supplied + * @throws PropertyServerException there is a problem instantiating the bean + */ + @Override + public B getNewBean(Class beanClass, + EntityDetail entity, + Relationship relationship, + String methodName) throws PropertyServerException + { + return getNewBean(beanClass, entity, methodName); + } +} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/converters/DataFlowConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/DataFlowConverter.java similarity index 92% rename from open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/converters/DataFlowConverter.java rename to open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/DataFlowConverter.java index eeafddcdcc6..f50aff2eb8a 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/converters/DataFlowConverter.java +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/DataFlowConverter.java @@ -1,9 +1,10 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.converters; +package org.odpi.openmetadata.commonservices.generichandlers; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.DataFlowElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.DataFlowProperties; +import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.DataFlowElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.lineage.DataFlowProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityProxy; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; @@ -18,7 +19,7 @@ * DataFlowConverter provides common methods for transferring relevant properties from an Open Metadata Repository Services (OMRS) * Relationship object into a DataFlowElement bean. */ -public class DataFlowConverter extends ITInfrastructureOMASConverter +public class DataFlowConverter extends OMFConverter { /** * Constructor diff --git a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/DataManagerOMASConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/DataManagerOMASConverter.java new file mode 100644 index 00000000000..821a85eaf6b --- /dev/null +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/DataManagerOMASConverter.java @@ -0,0 +1,48 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.generichandlers; + +import org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericConverter; +import org.odpi.openmetadata.frameworks.openmetadata.enums.DataItemSortOrder; +import org.odpi.openmetadata.frameworks.openmetadata.enums.KeyPattern; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.RelatedElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.SchemaTypeElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.*; +import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; +import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementStub; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.*; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; + + +/** + * DataManagerOMASConverter provides the generic methods for the Data Manager beans converters. Generic classes + * have limited knowledge of the classes these are working on and this means creating a new instance of a + * class from within a generic is a little involved. This class provides the generic method for creating + * and initializing a Data Manager bean. + */ +public class DataManagerOMASConverter extends OpenMetadataAPIGenericConverter +{ + /** + * Constructor + * + * @param repositoryHelper helper object to parse entity + * @param serviceName name of this component + * @param serverName name of this server + */ + public DataManagerOMASConverter(OMRSRepositoryHelper repositoryHelper, + String serviceName, + String serverName) + { + super (repositoryHelper, serviceName, serverName); + } + + + /*=============================== + * Methods to fill out headers and enums + */ + + +} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/DatabaseColumnConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/DatabaseColumnConverter.java similarity index 90% rename from open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/DatabaseColumnConverter.java rename to open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/DatabaseColumnConverter.java index b699ef39044..691899a4dae 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/DatabaseColumnConverter.java +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/DatabaseColumnConverter.java @@ -1,10 +1,15 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.converters; +package org.odpi.openmetadata.commonservices.generichandlers; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.DatabaseColumnElement; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.SchemaTypeElement; -import org.odpi.openmetadata.accessservices.datamanager.properties.*; + +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.DatabaseColumnElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.SchemaTypeElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.DerivedSchemaTypeQueryTargetProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.databases.DatabaseColumnProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.databases.DatabaseForeignKeyProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.databases.DatabasePrimaryKeyProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.databases.DatabaseQueryProperties; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; @@ -21,7 +26,7 @@ * DatabaseColumnConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) * EntityDetail object into a DatabaseColumnElement bean. */ -public class DatabaseColumnConverter extends DataManagerOMASConverter +public class DatabaseColumnConverter extends OMFConverter { /** * Constructor @@ -67,7 +72,7 @@ public B getNewSchemaAttributeBean(Class beanClass, B returnBean = beanClass.getDeclaredConstructor().newInstance(); if (returnBean instanceof DatabaseColumnElement bean) { - DatabaseColumnProperties properties = new DatabaseColumnProperties(); + DatabaseColumnProperties properties = new DatabaseColumnProperties(); if (schemaAttributeEntity != null) { @@ -76,10 +81,8 @@ public B getNewSchemaAttributeBean(Class beanClass, properties.setTypeName(bean.getElementHeader().getType().getTypeName()); - if (schemaType instanceof SchemaTypeElement) + if (schemaType instanceof SchemaTypeElement schemaTypeElement) { - SchemaTypeElement schemaTypeElement = (SchemaTypeElement)schemaType; - super.addSchemaTypeToAttribute(schemaTypeElement, properties); properties.setFormula(schemaTypeElement.getFormula()); diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/DatabaseConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/DatabaseConverter.java similarity index 91% rename from open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/DatabaseConverter.java rename to open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/DatabaseConverter.java index ba461069d21..9cffdea79b9 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/DatabaseConverter.java +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/DatabaseConverter.java @@ -1,9 +1,10 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.converters; +package org.odpi.openmetadata.commonservices.generichandlers; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.DatabaseElement; -import org.odpi.openmetadata.accessservices.datamanager.properties.DatabaseProperties; +import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.DatabaseElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.databases.DatabaseProperties; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.*; @@ -16,7 +17,7 @@ * DatabaseConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) * EntityDetail object into a DatabaseElement bean. */ -public class DatabaseConverter extends DataManagerOMASConverter +public class DatabaseConverter extends OMFConverter { /** * Constructor @@ -71,8 +72,9 @@ public B getNewBean(Class beanClass, databaseProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); databaseProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); databaseProperties.setName(this.removeName(instanceProperties)); + databaseProperties.setResourceName(this.removeResourceName(instanceProperties)); databaseProperties.setVersionIdentifier(this.removeVersionIdentifier(instanceProperties)); - databaseProperties.setDescription(this.removeDescription(instanceProperties)); + databaseProperties.setResourceDescription(this.removeDescription(instanceProperties)); databaseProperties.setPathName(this.removePathName(instanceProperties)); databaseProperties.setCreateTime(this.removeStoreCreateTime(instanceProperties)); databaseProperties.setModifiedTime(this.removeStoreUpdateTime(instanceProperties)); diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/DatabaseManagerConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/DatabaseManagerConverter.java similarity index 89% rename from open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/DatabaseManagerConverter.java rename to open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/DatabaseManagerConverter.java index 7ec9eb218fc..8c0dd4c6a16 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/DatabaseManagerConverter.java +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/DatabaseManagerConverter.java @@ -1,9 +1,9 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.converters; +package org.odpi.openmetadata.commonservices.generichandlers; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.SoftwareCapabilityElement; -import org.odpi.openmetadata.accessservices.datamanager.properties.DatabaseManagerProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.SoftwareCapabilityElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities.DatabaseManagerProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; @@ -17,7 +17,7 @@ * DatabaseManagerConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) * EntityDetail object into a SoftwareCapabilityElement bean. */ -public class DatabaseManagerConverter extends DataManagerOMASConverter +public class DatabaseManagerConverter extends OMFConverter { /** * Constructor @@ -68,8 +68,8 @@ public B getNewBean(Class beanClass, databaseManagerProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); databaseManagerProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); - databaseManagerProperties.setDisplayName(this.removeName(instanceProperties)); - databaseManagerProperties.setDescription(this.removeDescription(instanceProperties)); + databaseManagerProperties.setResourceName(this.removeName(instanceProperties)); + databaseManagerProperties.setResourceDescription(this.removeDescription(instanceProperties)); databaseManagerProperties.setDeployedImplementationType(this.removeCapabilityType(instanceProperties)); databaseManagerProperties.setVersion(this.removeCapabilityVersion(instanceProperties)); databaseManagerProperties.setPatchLevel(this.removePatchLevel(instanceProperties)); @@ -82,7 +82,7 @@ public B getNewBean(Class beanClass, databaseManagerProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); databaseManagerProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - bean.setSoftwareCapabilitiesProperties(databaseManagerProperties); + bean.setProperties(databaseManagerProperties); } else { diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/DatabaseSchemaConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/DatabaseSchemaConverter.java similarity index 90% rename from open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/DatabaseSchemaConverter.java rename to open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/DatabaseSchemaConverter.java index 0284e890356..44fbeea0d3c 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/DatabaseSchemaConverter.java +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/DatabaseSchemaConverter.java @@ -1,9 +1,10 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.converters; +package org.odpi.openmetadata.commonservices.generichandlers; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.DatabaseSchemaElement; -import org.odpi.openmetadata.accessservices.datamanager.properties.DatabaseSchemaProperties; +import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.DatabaseSchemaElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.databases.DatabaseSchemaProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; @@ -17,7 +18,7 @@ * DatabaseSchemaConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) * EntityDetail object into a DatabaseSchemaElement bean. */ -public class DatabaseSchemaConverter extends DataManagerOMASConverter +public class DatabaseSchemaConverter extends OMFConverter { /** * Constructor @@ -72,8 +73,9 @@ public B getNewBean(Class beanClass, databaseSchemaProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); databaseSchemaProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); databaseSchemaProperties.setName(this.removeName(instanceProperties)); + databaseSchemaProperties.setResourceName(this.removeResourceName(instanceProperties)); databaseSchemaProperties.setVersionIdentifier(this.removeVersionIdentifier(instanceProperties)); - databaseSchemaProperties.setDescription(this.removeDescription(instanceProperties)); + databaseSchemaProperties.setResourceDescription(this.removeDescription(instanceProperties)); databaseSchemaProperties.setDeployedImplementationType(this.removeDeployedImplementationType(instanceProperties)); /* diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/DatabaseTableConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/DatabaseTableConverter.java similarity index 90% rename from open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/DatabaseTableConverter.java rename to open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/DatabaseTableConverter.java index bfffcc1d1b8..69d0b021caa 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/DatabaseTableConverter.java +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/DatabaseTableConverter.java @@ -1,10 +1,11 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.converters; +package org.odpi.openmetadata.commonservices.generichandlers; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.DatabaseTableElement; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.SchemaTypeElement; -import org.odpi.openmetadata.accessservices.datamanager.properties.DatabaseTableProperties; +import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.DatabaseTableElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.SchemaTypeElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.databases.DatabaseTableProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.*; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; @@ -18,7 +19,7 @@ * DatabaseTableConverter transfers the relevant properties from some Open Metadata Repository Services (OMRS) * EntityDetail object into an DatabaseTable bean. */ -public class DatabaseTableConverter extends DataManagerOMASConverter +public class DatabaseTableConverter extends OMFConverter { /** * Constructor @@ -95,10 +96,8 @@ public B getNewSchemaAttributeBean(Class beanClass, bean.setDatabaseTableProperties(databaseTableProperties); - if (schemaType instanceof SchemaTypeElement) + if (schemaType instanceof SchemaTypeElement schemaTypeElement) { - SchemaTypeElement schemaTypeElement = (SchemaTypeElement)schemaType; - bean.setDatabaseColumnCount(schemaTypeElement.getAttributeCount()); } } diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/DatabaseViewConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/DatabaseViewConverter.java similarity index 92% rename from open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/DatabaseViewConverter.java rename to open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/DatabaseViewConverter.java index bf327191e2b..a0b13aa0daa 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/DatabaseViewConverter.java +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/DatabaseViewConverter.java @@ -1,10 +1,10 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.converters; +package org.odpi.openmetadata.commonservices.generichandlers; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.DatabaseViewElement; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.SchemaTypeElement; -import org.odpi.openmetadata.accessservices.datamanager.properties.DatabaseViewProperties; +import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.DatabaseViewElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.databases.DatabaseViewProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; @@ -19,7 +19,7 @@ * TabularColumnConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) * EntityDetail object into a TabularColumnElement bean. */ -public class DatabaseViewConverter extends DataManagerOMASConverter +public class DatabaseViewConverter extends OMFConverter { /** * Constructor diff --git a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ElementHeaderConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ElementHeaderConverter.java new file mode 100644 index 00000000000..62f14294f35 --- /dev/null +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ElementHeaderConverter.java @@ -0,0 +1,191 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.generichandlers; + +import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityProxy; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; + +import java.lang.reflect.InvocationTargetException; + +/** + * ElementHeaderConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) + * EntityDetail object into a ElementHeader bean. + */ +public class ElementHeaderConverter extends OMFConverter +{ + /** + * Constructor + * + * @param repositoryHelper helper object to parse entity/relationship objects + * @param serviceName name of this component + * @param serverName local server name + */ + public ElementHeaderConverter(OMRSRepositoryHelper repositoryHelper, + String serviceName, + String serverName) + { + super(repositoryHelper, serviceName, serverName); + } + + + /** + * Using the supplied instances, return a new instance of the bean. This is used for beans that + * contain a combination of the properties from an entity and that of a connected relationship. + * + * @param beanClass name of the class to create + * @param entity entity containing the properties + * @param methodName calling method + * @return bean populated with properties from the instances supplied + * @throws PropertyServerException there is a problem instantiating the bean + */ + @SuppressWarnings(value = "unchecked") + @Override + public B getNewBean(Class beanClass, + EntityDetail entity, + String methodName) throws PropertyServerException + { + try + { + /* + * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. + */ + B returnBean = beanClass.getDeclaredConstructor().newInstance(); + + if (returnBean instanceof ElementHeader) + { + if (entity != null) + { + returnBean = (B) this.getMetadataElementHeader(beanClass, entity, methodName); + } + else + { + handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); + } + } + + return returnBean; + } + catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) + { + super.handleInvalidBeanClass(beanClass.getName(), error, methodName); + } + + return null; + } + + + /** + * Using the supplied instances, return a new instance of the bean. This is used for beans that + * contain a combination of the properties from an entity and that of a connected relationship. + * + * @param beanClass name of the class to create + * @param entity entity containing the properties + * @param methodName calling method + * @return bean populated with properties from the instances supplied + * @throws PropertyServerException there is a problem instantiating the bean + */ + @SuppressWarnings(value = "unchecked") + public B getNewBean(Class beanClass, + EntityProxy entity, + String methodName) throws PropertyServerException + { + try + { + /* + * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. + */ + B returnBean = beanClass.getDeclaredConstructor().newInstance(); + + if (returnBean instanceof ElementHeader) + { + if (entity != null) + { + returnBean = (B) this.getMetadataElementHeader(beanClass, entity, null, methodName); + } + else + { + handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); + } + } + + return returnBean; + } + catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) + { + super.handleInvalidBeanClass(beanClass.getName(), error, methodName); + } + + return null; + } + + + /** + * Using the supplied instances, return a new instance of the bean. This is used for beans that + * contain a combination of the properties from a relationship and that of a connected relationship. + * + * @param beanClass name of the class to create + * @param relationship relationship containing the properties + * @param methodName calling method + * @return bean populated with properties from the instances supplied + * @throws PropertyServerException there is a problem instantiating the bean + */ + @SuppressWarnings(value = "unchecked") + public B getNewBean(Class beanClass, + Relationship relationship, + String methodName) throws PropertyServerException + { + try + { + /* + * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. + */ + B returnBean = beanClass.getDeclaredConstructor().newInstance(); + + if (returnBean instanceof ElementHeader) + { + if (relationship != null) + { + returnBean = (B) this.getMetadataElementHeader(beanClass, relationship, null, methodName); + } + else + { + handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); + } + } + + return returnBean; + } + catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) + { + super.handleInvalidBeanClass(beanClass.getName(), error, methodName); + } + + return null; + } + + + /** + * Using the supplied instances, return a new instance of the bean. This is used for beans that + * contain a combination of the properties from an entity and that of a connected relationship. + * + * @param beanClass name of the class to create + * @param entity entity containing the properties + * @param relationship relationship containing the properties + * @param methodName calling method + * @return bean populated with properties from the instances supplied + * @throws PropertyServerException there is a problem instantiating the bean + */ + @Override + public B getNewBean(Class beanClass, + EntityDetail entity, + Relationship relationship, + String methodName) throws PropertyServerException + { + return getNewBean(beanClass, entity, methodName); + } +} diff --git a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ElementStubConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ElementStubConverter.java new file mode 100644 index 00000000000..8566e3b5657 --- /dev/null +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ElementStubConverter.java @@ -0,0 +1,221 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.generichandlers; + + +import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementStub; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityProxy; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; + +import java.lang.reflect.InvocationTargetException; +import java.util.ArrayList; +import java.util.List; + + +/** + * ElementStubConverter provides common methods for transferring relevant properties from an Open Metadata Repository Services (OMRS) + * EntityProxy object into an ElementStub bean. + */ +public class ElementStubConverter extends OMFConverter +{ + /** + * Constructor + * + * @param repositoryHelper helper object to parse entity + * @param serviceName name of this component + * @param serverName local server name + */ + public ElementStubConverter(OMRSRepositoryHelper repositoryHelper, + String serviceName, + String serverName) + { + super(repositoryHelper, serviceName, serverName); + } + + + /** + * Using the supplied instances, return a new instance of the bean. This is used for beans that + * contain a combination of the properties from an entityProxy and that of a connected relationship. + * + * @param beanClass name of the class to create + * @param entityProxy entityProxy containing the properties + * @param methodName calling method + * @return bean populated with properties from the instances supplied + * @throws PropertyServerException there is a problem instantiating the bean + */ + @SuppressWarnings(value = "unchecked") + private B getNewBean(Class beanClass, + EntityProxy entityProxy, + String methodName) throws PropertyServerException + { + try + { + /* + * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. + */ + B returnBean = beanClass.getDeclaredConstructor().newInstance(); + + if (returnBean instanceof ElementStub) + { + returnBean = (B)super.getElementStub(beanClass, entityProxy, methodName); + + return returnBean; + } + + return null; + } + catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) + { + super.handleInvalidBeanClass(beanClass.getName(), error, methodName); + } + + return null; + } + + + /** + * Using the supplied instances, return a new instance of the bean. This is used for beans that + * contain a combination of the properties from an relationship and that of a connected relationship. + * + * @param beanClass name of the class to create + * @param relationship relationship containing the properties + * @param useEnd1 should the + * @param methodName calling method + * @return bean populated with properties from the instances supplied + * @throws PropertyServerException there is a problem instantiating the bean + */ + public B getNewBean(Class beanClass, + Relationship relationship, + boolean useEnd1, + String methodName) throws PropertyServerException + { + if (relationship != null) + { + if (useEnd1) + { + return getNewBean(beanClass, relationship.getEntityOneProxy(), methodName); + } + else + { + return getNewBean(beanClass, relationship.getEntityTwoProxy(), methodName); + } + } + + return null; + } + + + /** + * Using the supplied instances, return list of new instances of the bean. + * + * @param beanClass name of the class to create + * @param relationships list of relationships containing the properties + * @param useEnd1 should the + * @param methodName calling method + * @return bean populated with properties from the instances supplied + * @throws PropertyServerException there is a problem instantiating the bean + */ + public List getNewBeans(Class beanClass, + List relationships, + boolean useEnd1, + String methodName) throws PropertyServerException + { + if (relationships != null) + { + List beans = new ArrayList<>(); + + for (Relationship relationship : relationships) + { + if (relationship != null) + { + B bean = getNewBean(beanClass, relationship, useEnd1, methodName); + + if (bean != null) + { + beans.add(bean); + } + } + } + + if (! beans.isEmpty()) + { + return beans; + } + } + + return null; + } + + + + /** + * Using the supplied entity, return a new instance of the bean. This is used for most beans that have + * a one to one correspondence with the repository instances. + * + * @param beanClass name of the class to create + * @param entity entity containing the properties + * @param methodName calling method + * @return bean populated with properties from the entity supplied + * @throws PropertyServerException there is a problem instantiating the bean + */ + @SuppressWarnings(value = "unchecked") + @Override + public B getNewBean(Class beanClass, + EntityDetail entity, + String methodName) throws PropertyServerException + { + try + { + /* + * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. + */ + B returnBean = beanClass.getDeclaredConstructor().newInstance(); + + EntityProxy entityProxy = repositoryHelper.getNewEntityProxy(serviceName, entity); + + if (returnBean instanceof ElementStub) + { + returnBean = (B)super.getElementStub(beanClass, entityProxy, methodName); + + return returnBean; + } + + return null; + } + catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) + { + super.handleInvalidBeanClass(beanClass.getName(), error, methodName); + } + catch (Exception error) + { + super.handleBadEntity(beanClass.getName(), entity, methodName); + } + + return null; + } + + + /** + * Using the supplied instances, return a new instance of the bean. This is used for beans that + * contain a combination of the properties from an entity and that of a connected relationship. + * + * @param beanClass name of the class to create + * @param entity entity containing the properties + * @param relationship relationship containing the properties + * @param methodName calling method + * @return bean populated with properties from the instances supplied + * @throws PropertyServerException there is a problem instantiating the bean + */ + @SuppressWarnings(value = "unused") + @Override + public B getNewBean(Class beanClass, + EntityDetail entity, + Relationship relationship, + String methodName) throws PropertyServerException + { + return this.getNewBean(beanClass, entity, methodName); + } +} diff --git a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/EndpointConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/EndpointConverter.java new file mode 100644 index 00000000000..1297a2a9e1f --- /dev/null +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/EndpointConverter.java @@ -0,0 +1,126 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.generichandlers; + +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.EndpointElement; +import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.EndpointProperties; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; + +import java.lang.reflect.InvocationTargetException; + +/** + * EndpointConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) + * EntityDetail object into a EndpointElement bean. + */ +public class EndpointConverter extends OMFConverter +{ + /** + * Constructor + * + * @param repositoryHelper helper object to parse entity/relationship objects + * @param serviceName name of this component + * @param serverName local server name + */ + public EndpointConverter(OMRSRepositoryHelper repositoryHelper, + String serviceName, + String serverName) + { + super(repositoryHelper, serviceName, serverName); + } + + + /** + * Using the supplied instances, return a new instance of the bean. This is used for beans that + * contain a combination of the properties from an entity and that of a connected relationship. + * + * @param beanClass name of the class to create + * @param entity entity containing the properties + * @param methodName calling method + * @return bean populated with properties from the instances supplied + * @throws PropertyServerException there is a problem instantiating the bean + */ + @Override + public B getNewBean(Class beanClass, + EntityDetail entity, + String methodName) throws PropertyServerException + { + try + { + /* + * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. + */ + B returnBean = beanClass.getDeclaredConstructor().newInstance(); + + if (returnBean instanceof EndpointElement bean) + { + EndpointProperties endpointProperties = new EndpointProperties(); + + if (entity != null) + { + bean.setElementHeader(this.getMetadataElementHeader(beanClass, entity, methodName)); + + /* + * The initial set of values come from the entity. + */ + InstanceProperties instanceProperties = new InstanceProperties(entity.getProperties()); + + endpointProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); + endpointProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); + endpointProperties.setName(this.removeName(instanceProperties)); + endpointProperties.setResourceDescription(this.removeDescription(instanceProperties)); + endpointProperties.setAddress(this.removeNetworkAddress(instanceProperties)); + endpointProperties.setProtocol(this.removeProtocol(instanceProperties)); + endpointProperties.setEncryptionMethod(this.removeEncryptionMethod(instanceProperties)); + + + /* + * Any remaining properties are returned in the extended properties. They are + * assumed to be defined in a subtype. + */ + endpointProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); + endpointProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); + + bean.setEndpointProperties(endpointProperties); + } + else + { + handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); + } + } + + return returnBean; + } + catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) + { + super.handleInvalidBeanClass(beanClass.getName(), error, methodName); + } + + return null; + } + + + /** + * Using the supplied instances, return a new instance of the bean. This is used for beans that + * contain a combination of the properties from an entity and that of a connected relationship. + * + * @param beanClass name of the class to create + * @param entity entity containing the properties + * @param relationship relationship containing the properties + * @param methodName calling method + * @return bean populated with properties from the instances supplied + * @throws PropertyServerException there is a problem instantiating the bean + */ + @Override + public B getNewBean(Class beanClass, + EntityDetail entity, + Relationship relationship, + String methodName) throws PropertyServerException + { + return getNewBean(beanClass, entity, methodName); + } +} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/EventTypeConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/EventTypeConverter.java similarity index 93% rename from open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/EventTypeConverter.java rename to open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/EventTypeConverter.java index f4d17204f92..9b668030985 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/EventTypeConverter.java +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/EventTypeConverter.java @@ -1,10 +1,11 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.converters; +package org.odpi.openmetadata.commonservices.generichandlers; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.EventTypeElement; -import org.odpi.openmetadata.accessservices.datamanager.properties.*; +import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.EventTypeElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.events.EventTypeProperties; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; @@ -18,7 +19,7 @@ * EventTypeConverter provides common methods for transferring relevant properties from an Open Metadata Repository Services (OMRS) * EntityDetail object into a bean that inherits from EventTypeElement. It is working with a ComplexSchemaType. */ -public class EventTypeConverter extends DataManagerOMASConverter +public class EventTypeConverter extends OMFConverter { /** * Constructor diff --git a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ExternalReferenceConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ExternalReferenceConverter.java new file mode 100644 index 00000000000..23dd6adfc17 --- /dev/null +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ExternalReferenceConverter.java @@ -0,0 +1,133 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.generichandlers; + + +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ExternalReferenceElement; +import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; +import org.odpi.openmetadata.frameworks.openmetadata.properties.externalreferences.ExternalReferenceProperties; +import java.lang.reflect.InvocationTargetException; + + +/** + * ExternalReferenceConverter provides common methods for transferring relevant properties from an Open Metadata Repository Services (OMRS) + * EntityDetail object into a bean that inherits from ExternalReferenceElement. + */ +public class ExternalReferenceConverter extends OMFConverter +{ + /** + * Constructor + * + * @param repositoryHelper helper object to parse entity + * @param serviceName name of this component + * @param serverName local server name + */ + public ExternalReferenceConverter(OMRSRepositoryHelper repositoryHelper, + String serviceName, + String serverName) + { + super(repositoryHelper, serviceName, serverName); + } + + + /** + * Using the supplied instances, return a new instance of the bean. This is used for beans that + * contain a combination of the properties from an entity and that of a connected relationship. + * + * @param beanClass name of the class to create + * @param entity entity containing the properties + * @param methodName calling method + * @return bean populated with properties from the instances supplied + * @throws PropertyServerException there is a problem instantiating the bean + */ + @Override + public B getNewBean(Class beanClass, + EntityDetail entity, + String methodName) throws PropertyServerException + { + return getNewBean(beanClass, entity, null, methodName); + } + + + /** + * Using the supplied instances, return a new instance of the bean. This is used for beans that + * contain a combination of the properties from an entity and that of a connected relationship. + * + * @param beanClass name of the class to create + * @param entity entity containing the properties + * @param relationship relationship containing the properties + * @param methodName calling method + * @return bean populated with properties from the instances supplied + * @throws PropertyServerException there is a problem instantiating the bean + */ + @Override + public B getNewBean(Class beanClass, + EntityDetail entity, + Relationship relationship, + String methodName) throws PropertyServerException + { + try + { + /* + * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. + */ + B returnBean = beanClass.getDeclaredConstructor().newInstance(); + + if (returnBean instanceof ExternalReferenceElement bean) + { + if (entity != null) + { + bean.setElementHeader(this.getMetadataElementHeader(beanClass, entity, entity.getClassifications(), methodName)); + ExternalReferenceProperties externalReferenceProperties = new ExternalReferenceProperties(); + + /* + * The initial set of values come from the entity. + */ + InstanceProperties instanceProperties = new InstanceProperties(entity.getProperties()); + + externalReferenceProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); + externalReferenceProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); + externalReferenceProperties.setDisplayName(this.removeDisplayName(instanceProperties)); + externalReferenceProperties.setURI(this.removeURL(instanceProperties)); + externalReferenceProperties.setVersion(this.removeReferenceVersion(instanceProperties)); + externalReferenceProperties.setResourceDescription(this.removeDescription(instanceProperties)); + externalReferenceProperties.setOrganization(this.removeOwningOrganization(instanceProperties)); + + /* + * Any remaining properties are returned in the extended properties. They are + * assumed to be defined in a subtype. + */ + externalReferenceProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); + externalReferenceProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); + + if (relationship != null) + { + instanceProperties = relationship.getProperties(); + + externalReferenceProperties.setLinkDescription(this.getDescription(instanceProperties)); + externalReferenceProperties.setLocalReferenceId(this.getReferenceId(instanceProperties)); + } + + bean.setProperties(externalReferenceProperties); + } + else + { + handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); + } + } + + return returnBean; + } + catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) + { + super.handleInvalidBeanClass(beanClass.getName(), error, methodName); + } + + return null; + } +} diff --git a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/FileFolderConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/FileFolderConverter.java new file mode 100644 index 00000000000..70bad8ce67d --- /dev/null +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/FileFolderConverter.java @@ -0,0 +1,138 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.generichandlers; + +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.FolderElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.filesandfolders.FolderProperties; +import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; +import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; + +import java.lang.reflect.InvocationTargetException; + +/** + * FileFolderConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) + * EntityDetail object into a FileFolderElement bean. + */ +public class FileFolderConverter extends AssetConverter +{ + /** + * Constructor + * + * @param repositoryHelper helper object to parse entity/relationship objects + * @param serviceName name of this component + * @param serverName local server name + */ + public FileFolderConverter(OMRSRepositoryHelper repositoryHelper, + String serviceName, + String serverName) + { + super(repositoryHelper, serviceName, serverName); + } + + + /** + * Using the supplied instances, return a new instance of the bean. This is used for beans that + * contain a combination of the properties from an entity and that of a connected relationship. + * + * @param beanClass name of the class to create + * @param entity entity containing the properties + * @param methodName calling method + * @return bean populated with properties from the instances supplied + * @throws PropertyServerException there is a problem instantiating the bean + */ + @Override + public B getNewBean(Class beanClass, + EntityDetail entity, + String methodName) throws PropertyServerException + { + try + { + /* + * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. + */ + B returnBean = beanClass.getDeclaredConstructor().newInstance(); + + if (returnBean instanceof FolderElement bean) + { + FolderProperties folderProperties = new FolderProperties(); + + bean.setElementHeader(super.getMetadataElementHeader(beanClass, entity, methodName)); + + InstanceProperties instanceProperties; + + /* + * The initial set of values come from the entity. + */ + if (entity != null) + { + instanceProperties = new InstanceProperties(entity.getProperties()); + + folderProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); + folderProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); + folderProperties.setName(this.removeName(instanceProperties)); + folderProperties.setResourceName(this.removeResourceName(instanceProperties)); + folderProperties.setDisplayName(folderProperties.getName()); + folderProperties.setVersionIdentifier(this.removeVersionIdentifier(instanceProperties)); + folderProperties.setResourceDescription(this.removeDescription(instanceProperties)); + folderProperties.setPathName(this.removePathName(instanceProperties)); + folderProperties.setCreateTime(this.removeStoreCreateTime(instanceProperties)); + folderProperties.setModifiedTime(this.removeStoreUpdateTime(instanceProperties)); + + /* + * Any remaining properties are returned in the extended properties. They are + * assumed to be defined in a subtype. + */ + folderProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); + folderProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); + + instanceProperties = super.getClassificationProperties(OpenMetadataType.DATA_ASSET_ENCODING_CLASSIFICATION.typeName, entity); + + folderProperties.setEncodingType(this.getDataStoreEncodingType(instanceProperties)); + folderProperties.setEncodingLanguage(this.getDataStoreEncodingLanguage(instanceProperties)); + folderProperties.setEncodingDescription(this.getDataStoreEncodingDescription(instanceProperties)); + folderProperties.setEncodingProperties(this.getEncodingProperties(instanceProperties)); + + bean.setFolderProperties(folderProperties); + } + else + { + handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); + } + } + + return returnBean; + } + catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) + { + super.handleInvalidBeanClass(beanClass.getName(), error, methodName); + } + + return null; + } + + + /** + * Using the supplied instances, return a new instance of the bean. This is used for beans that + * contain a combination of the properties from an entity and that of a connected relationship. + * + * @param beanClass name of the class to create + * @param entity entity containing the properties + * @param relationship relationship containing the properties + * @param methodName calling method + * @return bean populated with properties from the instances supplied + * @throws PropertyServerException there is a problem instantiating the bean + */ + @Override + public B getNewBean(Class beanClass, + EntityDetail entity, + Relationship relationship, + String methodName) throws PropertyServerException + { + return getNewBean(beanClass, entity, methodName); + } +} diff --git a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/FileSystemConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/FileSystemConverter.java new file mode 100644 index 00000000000..467d2cb7a87 --- /dev/null +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/FileSystemConverter.java @@ -0,0 +1,130 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.generichandlers; + +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.FileSystemElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities.FileSystemProperties; +import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; +import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; + +import java.lang.reflect.InvocationTargetException; + +/** + * FileSystemConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) + * EntityDetail object into a FileSystemElement bean. + */ +public class FileSystemConverter extends OMFConverter +{ + /** + * Constructor + * + * @param repositoryHelper helper object to parse entity + * @param serviceName name of this component + * @param serverName local server name + */ + public FileSystemConverter(OMRSRepositoryHelper repositoryHelper, + String serviceName, + String serverName) + { + super(repositoryHelper, serviceName, serverName); + } + + + /** + * Using the supplied instances, return a new instance of the bean. This is used for beans that + * contain a combination of the properties from an entity and that of a connected relationship. + * + * @param beanClass name of the class to create + * @param entity entity containing the properties + * @param methodName calling method + * @return bean populated with properties from the instances supplied + * @throws PropertyServerException there is a problem instantiating the bean + */ + @Override + public B getNewBean(Class beanClass, + EntityDetail entity, + String methodName) throws PropertyServerException + { + try + { + /* + * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. + */ + B returnBean = beanClass.getDeclaredConstructor().newInstance(); + + if (returnBean instanceof FileSystemElement bean) + { + FileSystemProperties fileSystemProperties = new FileSystemProperties(); + + if (entity != null) + { + /* + * The initial set of values come from the entity. + */ + InstanceProperties instanceProperties = new InstanceProperties(entity.getProperties()); + + fileSystemProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); + fileSystemProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); + fileSystemProperties.setResourceName(this.removeName(instanceProperties)); + fileSystemProperties.setResourceDescription(this.removeDescription(instanceProperties)); + fileSystemProperties.setDeployedImplementationType(this.removeCapabilityType(instanceProperties)); + fileSystemProperties.setVersion(this.removeCapabilityVersion(instanceProperties)); + fileSystemProperties.setPatchLevel(this.removePatchLevel(instanceProperties)); + fileSystemProperties.setSource(this.removeSource(instanceProperties)); + + /* + * Any remaining properties are returned in the extended properties. They are + * assumed to be defined in a subtype. + */ + fileSystemProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); + fileSystemProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); + + instanceProperties = super.getClassificationProperties(OpenMetadataType.FILE_SYSTEM_CLASSIFICATION_TYPE_NAME, entity); + + fileSystemProperties.setFormat(this.getFormat(instanceProperties)); + fileSystemProperties.setEncryption(this.getEncryption(instanceProperties)); + + bean.setFileSystemProperties(fileSystemProperties); + } + else + { + handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); + } + } + + return returnBean; + } + catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) + { + super.handleInvalidBeanClass(beanClass.getName(), error, methodName); + } + + return null; + } + + + /** + * Using the supplied instances, return a new instance of the bean. This is used for beans that + * contain a combination of the properties from an entity and that of a connected relationship. + * + * @param beanClass name of the class to create + * @param entity entity containing the properties + * @param relationship relationship containing the properties + * @param methodName calling method + * @return bean populated with properties from the instances supplied + * @throws PropertyServerException there is a problem instantiating the bean + */ + @Override + public B getNewBean(Class beanClass, + EntityDetail entity, + Relationship relationship, + String methodName) throws PropertyServerException + { + return getNewBean(beanClass, entity, methodName); + } +} diff --git a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/FilesAndFoldersHandler.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/FilesAndFoldersHandler.java index 5e6463bc5c4..a170171e9bb 100644 --- a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/FilesAndFoldersHandler.java +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/FilesAndFoldersHandler.java @@ -303,7 +303,6 @@ private String getFileExtension(String pathName) */ private String getFileType(String pathName) { - // todo move lookup logic for filetypes from integration connector List specificMatchPropertyNames = new ArrayList<>(); specificMatchPropertyNames.add(OpenMetadataProperty.QUALIFIED_NAME.name); @@ -421,6 +420,7 @@ public String createFileSystem(String userId, * @param externalSourceName name of the software capability entity that represented the external source * @param pathName full path name for the file system * @param name short display name + * @param resourceName name from the resource * @param versionIdentifier version identifier for the folder * @param description description of the file system * @param deployedImplementationType technology type @@ -443,6 +443,7 @@ private String createFolder(String userId, String externalSourceName, String pathName, String name, + String resourceName, String versionIdentifier, String description, String deployedImplementationType, @@ -474,6 +475,7 @@ private String createFolder(String userId, folderAssetGUIDParameterName, this.createQualifiedName(folderAssetTypeName, null, pathName, versionIdentifier), name, + resourceName, versionIdentifier, description, deployedImplementationType, @@ -507,7 +509,8 @@ private String createFolder(String userId, * @param fileName name of the file * @param fileExtension extension if provided * @param pathName qualified name for the file - * @param displayName short display name + * @param name short display name + * @param resourceName name of the resource * @param versionIdentifier version identifier for the file * @param description description of the file * @param deployedImplementationType technology type @@ -534,7 +537,8 @@ private String createFileAsset(String userId, String fileName, String fileExtension, String pathName, - String displayName, + String name, + String resourceName, String versionIdentifier, String description, String deployedImplementationType, @@ -574,7 +578,8 @@ private String createFileAsset(String userId, externalSourceName, fileAssetGUIDParameterName, this.createQualifiedName(fileAssetTypeName, null, pathName, versionIdentifier), - displayName, + name, + resourceName, versionIdentifier, description, deployedImplementationType, @@ -679,6 +684,7 @@ private String createFolderInCatalog(String userId, externalSourceName, pathName, folderName, + folderName, versionIdentifier, null, deployedImplementationType, @@ -1557,6 +1563,7 @@ public List addFileAssetPath(String userId, * @param externalSourceGUID guid of the software capability entity that represented the external source - null for local * @param externalSourceName name of the software capability entity that represented the external source * @param name name for the folder in the catalog + * @param resourceName from the resource * @param versionIdentifier version identifier for the folder in the catalog * @param description description of the folder in the catalog * @param pathName pathname of the file @@ -1577,6 +1584,7 @@ public List addDataFileAssetToCatalog(String userId, String externalSourceGUID, String externalSourceName, String name, + String resourceName, String versionIdentifier, String description, String deployedImplementationType, @@ -1607,6 +1615,7 @@ public List addDataFileAssetToCatalog(String userId, fileExtension, pathName, name, + resourceName, versionIdentifier, description, deployedImplementationType, @@ -1715,6 +1724,7 @@ private Map getExtendedProperties(String pathName, * @param qualifiedName optional qualified name * @param pathName pathname of the file * @param name name for the folder in the catalog + * @param resourceName name for the folder in the catalog * @param versionIdentifier version identifier for the folder in the catalog * @param description description of the folder in the catalog * @param deployedImplementationType technology type @@ -1747,6 +1757,7 @@ public List addDataFolderAssetToCatalog(String userId, String qualifiedName, String pathName, String name, + String resourceName, String versionIdentifier, String description, String deployedImplementationType, @@ -1796,6 +1807,7 @@ public List addDataFolderAssetToCatalog(String userId, folderAssetParameterName, createQualifiedName(folderAssetTypeName, qualifiedName, pathName, versionIdentifier), name, + resourceName, versionIdentifier, description, deployedImplementationType, @@ -1869,6 +1881,7 @@ public List addDataFolderAssetToCatalog(String userId, * @param externalSourceGUID guid of the software capability entity that represented the external source - null for local * @param externalSourceName name of the software capability entity that represented the external source * @param name name for the folder in the catalog + * @param resourceName name for the folder from tje resource * @param versionIdentifier versionIdentifier for the folder in the catalog * @param description description of the folder in the catalog * @param deployedImplementationType technology type @@ -1891,6 +1904,7 @@ public List addDataFolderAssetToCatalog(String userId, String externalSourceName, String pathName, String name, + String resourceName, String versionIdentifier, String description, String deployedImplementationType, @@ -1914,6 +1928,7 @@ public List addDataFolderAssetToCatalog(String userId, externalSourceName, pathName, name, + resourceName, versionIdentifier, description, deployedImplementationType, @@ -1948,6 +1963,7 @@ public List addDataFolderAssetToCatalog(String userId, * @param externalSourceName name of the software capability entity that represented the external source * @param qualifiedName unique name for the file - typically path and file name * @param name short name for file (defaults to the file name without the path) + * @param resourceName long name for the file * @param versionIdentifier version identifier for the file * @param description description of the file * @param pathName the fully qualified physical location of the data store - default is qualified name @@ -1983,6 +1999,7 @@ public List addFileToCatalog(String userId, String externalSourceName, String qualifiedName, String name, + String resourceName, String versionIdentifier, String description, String pathName, @@ -2076,6 +2093,7 @@ else if (FileExtension.AVRO_FILE.getFileExtension().equals(fileExtension)) fileAssetParameterName, createQualifiedName(fileAssetTypeName, qualifiedName, pathName, versionIdentifier), name, + resourceName, versionIdentifier, description, deployedImplementationType, @@ -2320,6 +2338,7 @@ public List addFolderToCatalogFromTemplate(String userId, * @param externalSourceGUID guid of the software capability entity that represented the external source - null for local * @param externalSourceName name of the software capability entity that represented the external source * @param name display name for the file in the catalog + * @param resourceName name for the file in the resource * @param versionIdentifier version identifier for the file * @param description description of the file in the catalog * @param deployedImplementationType technology type @@ -2341,6 +2360,7 @@ public List addAvroFileToCatalog(String userId, String externalSourceGUID, String externalSourceName, String name, + String resourceName, String versionIdentifier, String description, String deployedImplementationType, @@ -2372,6 +2392,7 @@ public List addAvroFileToCatalog(String userId, fileExtension, fullPath, name, + resourceName, versionIdentifier, description, deployedImplementationType, @@ -2407,6 +2428,7 @@ public List addAvroFileToCatalog(String userId, * @param externalSourceGUID guid of the software capability entity that represented the external source - null for local * @param externalSourceName name of the software capability entity that represented the external source * @param name name for the file in the catalog + * @param resourceName name for the file in the resource * @param versionIdentifier version identifier for the file * @param description description of the file in the catalog * @param fullPath full path of the file - used to access the file through the connector @@ -2430,6 +2452,7 @@ public List addCSVFileToCatalog(String userId, String externalSourceGUID, String externalSourceName, String name, + String resourceName, String versionIdentifier, String description, String deployedImplementationType, @@ -2491,6 +2514,7 @@ public List addCSVFileToCatalog(String userId, fileExtension, fullPath, name, + resourceName, versionIdentifier, description, deployedImplementationType, @@ -2622,7 +2646,8 @@ public List addCSVFileToCatalog(String userId, * @param dataFileGUID guid of the file asset * @param isMergeUpdate should the new properties be merged with the existing properties or completely replace them? * @param fullPath unique path and file name for file - * @param displayName short display name for file (defaults to the file name without the path) + * @param name short display name for file (defaults to the file name without the path) + * @param resourceName name of the resource * @param versionIdentifier versionIdentifier property * @param description description of the file * @param createTime the time that the file was created @@ -2652,7 +2677,8 @@ public void updateFileInCatalog(String userId, String dataFileGUID, boolean isMergeUpdate, String fullPath, - String displayName, + String name, + String resourceName, String versionIdentifier, String description, Date createTime, @@ -2727,12 +2753,12 @@ public void updateFileInCatalog(String userId, dataFileGUID, dataFileGUIDParameterName, qualifiedName, - displayName, + name, + resourceName, versionIdentifier, description, deployedImplementationType, additionalProperties, - OpenMetadataType.DATA_FILE.typeGUID, OpenMetadataType.DATA_FILE.typeName, assetExtendedProperties, effectiveFrom, @@ -2825,7 +2851,8 @@ private InstanceProperties getEncodingProperties(String encodingTy * @param isMergeUpdate should the new properties be merged with the existing properties or completely replace them? * @param fullPath unique path and file name for file * @param versionIdentifier version identifier for the file - * @param displayName short name for file + * @param name short name for file + * @param resourceName resource name for file * @param description description of the file * @param createTime the time that the file was created * @param modifiedTime the time of the latest change to the file @@ -2852,7 +2879,8 @@ public void updateFolderInCatalog(String userId, String dataFileGUID, boolean isMergeUpdate, String fullPath, - String displayName, + String name, + String resourceName, String versionIdentifier, String description, Date createTime, @@ -2899,12 +2927,12 @@ public void updateFolderInCatalog(String userId, dataFileGUID, dataFileGUIDParameterName, qualifiedName, - displayName, + name, + resourceName, versionIdentifier, description, DeployedImplementationType.FILE_FOLDER.getDeployedImplementationType(), additionalProperties, - OpenMetadataType.DATA_FOLDER.typeGUID, OpenMetadataType.DATA_FOLDER.typeName, assetExtendedProperties, effectiveFrom, diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/FormConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/FormConverter.java similarity index 90% rename from open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/FormConverter.java rename to open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/FormConverter.java index 67b4a0e66ce..51c0d4234d7 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/FormConverter.java +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/FormConverter.java @@ -1,9 +1,10 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.converters; +package org.odpi.openmetadata.commonservices.generichandlers; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.FormElement; -import org.odpi.openmetadata.accessservices.datamanager.properties.FormProperties; +import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.FormElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.display.FormProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; @@ -17,7 +18,7 @@ * FormConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) * EntityDetail object into a Form bean. */ -public class FormConverter extends DataManagerOMASConverter +public class FormConverter extends OMFConverter { /** * Constructor @@ -72,8 +73,9 @@ public B getNewBean(Class beanClass, formProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); formProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); formProperties.setName(this.removeName(instanceProperties)); + formProperties.setResourceName(this.removeResourceName(instanceProperties)); formProperties.setVersionIdentifier(this.removeVersionIdentifier(instanceProperties)); - formProperties.setDescription(this.removeDescription(instanceProperties)); + formProperties.setResourceDescription(this.removeDescription(instanceProperties)); formProperties.setDeployedImplementationType(this.removeDeployedImplementationType(instanceProperties)); /* diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/converters/GovernanceDefinitionConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/GovernanceDefinitionConverter.java similarity index 93% rename from open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/converters/GovernanceDefinitionConverter.java rename to open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/GovernanceDefinitionConverter.java index 5f8425286e0..4a96a35d753 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/converters/GovernanceDefinitionConverter.java +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/GovernanceDefinitionConverter.java @@ -1,10 +1,13 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.converters; - - -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceDefinitionElement; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.*; +package org.odpi.openmetadata.commonservices.generichandlers; + +import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.GovernanceDefinitionElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.CertificationTypeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.GovernanceDefinitionProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.LicenseTypeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.security.SecurityGroupProperties; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; @@ -21,7 +24,7 @@ * GovernanceDefinitionConverter provides common methods for transferring relevant properties from an Open Metadata Repository Services (OMRS) * EntityDetail object into a bean that inherits from GovernanceDefinitionElement. */ -public class GovernanceDefinitionConverter extends GovernanceProgramOMASConverter +public class GovernanceDefinitionConverter extends OMFConverter { /** * Constructor @@ -63,9 +66,8 @@ public B getNewBean(Class beanClass, */ B returnBean = beanClass.getDeclaredConstructor().newInstance(); - if (returnBean instanceof GovernanceDefinitionElement) + if (returnBean instanceof GovernanceDefinitionElement bean) { - GovernanceDefinitionElement bean = (GovernanceDefinitionElement) returnBean; if (primaryEntity != null) { @@ -76,7 +78,7 @@ public B getNewBean(Class beanClass, */ InstanceProperties instanceProperties = new InstanceProperties(primaryEntity.getProperties()); - String typeName = primaryEntity.getType().getTypeDefName(); + String typeName = primaryEntity.getType().getTypeDefName(); GovernanceDefinitionProperties governanceDefinitionProperties; if (repositoryHelper.isTypeOf(serviceName, typeName, OpenMetadataType.CERTIFICATION_TYPE_TYPE_NAME)) @@ -157,10 +159,8 @@ public B getNewBean(Class beanClass, final String thisMethodName = "getNewBean(entity, relationship)"; B returnBean = this.getNewBean(beanClass, entity, methodName); - if (returnBean instanceof GovernanceDefinitionElement) + if (returnBean instanceof GovernanceDefinitionElement bean) { - GovernanceDefinitionElement bean = (GovernanceDefinitionElement) returnBean; - bean.setRelatedElement(super.getRelatedElement(beanClass, entity, relationship, methodName)); } @@ -194,10 +194,8 @@ public B getNewComplexBean(Class beanClass, */ B returnBean = beanClass.getDeclaredConstructor().newInstance(); - if (returnBean instanceof GovernanceDefinitionElement) + if (returnBean instanceof GovernanceDefinitionElement bean) { - GovernanceDefinitionElement bean = (GovernanceDefinitionElement) returnBean; - if (primaryEntity != null) { bean.setElementHeader(this.getMetadataElementHeader(beanClass, primaryEntity, primaryEntity.getClassifications(), methodName)); diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/converters/GovernanceDefinitionGraphConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/GovernanceDefinitionGraphConverter.java similarity index 92% rename from open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/converters/GovernanceDefinitionGraphConverter.java rename to open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/GovernanceDefinitionGraphConverter.java index 61cf0622656..c76887fdeaa 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/converters/GovernanceDefinitionGraphConverter.java +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/GovernanceDefinitionGraphConverter.java @@ -1,14 +1,15 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.converters; +package org.odpi.openmetadata.commonservices.generichandlers; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceDefinitionGraph; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.RelatedElement; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.CertificationTypeProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceDefinitionProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.LicenseTypeProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.SecurityGroupProperties; +import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.GovernanceDefinitionGraph; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.RelatedElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.CertificationTypeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.GovernanceDefinitionProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.LicenseTypeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.security.SecurityGroupProperties; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; @@ -27,7 +28,7 @@ * GovernanceDefinitionConverter provides common methods for transferring relevant properties from an Open Metadata Repository Services (OMRS) * EntityDetail object into a bean that inherits from GovernanceDefinitionGraph. */ -public class GovernanceDefinitionGraphConverter extends GovernanceProgramOMASConverter +public class GovernanceDefinitionGraphConverter extends OMFConverter { /** * Constructor @@ -82,7 +83,7 @@ public B getNewComplexBean(Class beanClass, */ InstanceProperties instanceProperties = new InstanceProperties(primaryEntity.getProperties()); - String typeName = primaryEntity.getType().getTypeDefName(); + String typeName = primaryEntity.getType().getTypeDefName(); GovernanceDefinitionProperties governanceDefinitionProperties; if (repositoryHelper.isTypeOf(serviceName, typeName, OpenMetadataType.CERTIFICATION_TYPE_TYPE_NAME)) diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/converters/GovernanceDomainConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/GovernanceDomainConverter.java similarity index 93% rename from open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/converters/GovernanceDomainConverter.java rename to open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/GovernanceDomainConverter.java index 82aedce604e..698d4def9d4 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/converters/GovernanceDomainConverter.java +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/GovernanceDomainConverter.java @@ -1,10 +1,11 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.converters; +package org.odpi.openmetadata.commonservices.generichandlers; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceDomainElement; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceDomainProperties; +import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.GovernanceDomainElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.GovernanceDomainProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; @@ -19,7 +20,7 @@ * GovernanceDomainConverter provides common methods for transferring relevant properties from an Open Metadata Repository Services (OMRS) * EntityDetail object into a bean that inherits from GovernanceDomainElement. */ -public class GovernanceDomainConverter extends GovernanceProgramOMASConverter +public class GovernanceDomainConverter extends OMFConverter { /** * Constructor diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/converters/GovernanceDomainSetConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/GovernanceDomainSetConverter.java similarity index 91% rename from open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/converters/GovernanceDomainSetConverter.java rename to open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/GovernanceDomainSetConverter.java index 6fcdb86a51f..6a23255e537 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/converters/GovernanceDomainSetConverter.java +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/GovernanceDomainSetConverter.java @@ -1,10 +1,11 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.converters; +package org.odpi.openmetadata.commonservices.generichandlers; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceDomainSetElement; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceDomainSetProperties; +import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.GovernanceDomainSetElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.GovernanceDomainSetProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; @@ -18,7 +19,7 @@ * GovernanceDomainSetConverter provides common methods for transferring relevant properties from an Open Metadata Repository Services (OMRS) * EntityDetail object into a bean that inherits from GovernanceDomainSetElement. */ -public class GovernanceDomainSetConverter extends GovernanceProgramOMASConverter +public class GovernanceDomainSetConverter extends OMFConverter { /** * Constructor diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/converters/GovernanceMetricConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/GovernanceMetricConverter.java similarity index 93% rename from open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/converters/GovernanceMetricConverter.java rename to open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/GovernanceMetricConverter.java index 009fd5a2a9d..0a6420f7ee4 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/converters/GovernanceMetricConverter.java +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/GovernanceMetricConverter.java @@ -1,10 +1,11 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.converters; +package org.odpi.openmetadata.commonservices.generichandlers; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceMetricElement; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceMetricProperties; +import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.GovernanceMetricElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.GovernanceMetricProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; @@ -19,7 +20,7 @@ * GovernanceMetricConverter provides common methods for transferring relevant properties from an Open Metadata Repository Services (OMRS) * EntityDetail object into a bean that inherits from GovernanceMetricElement. */ -public class GovernanceMetricConverter extends GovernanceProgramOMASConverter +public class GovernanceMetricConverter extends OMFConverter { /** * Constructor diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/converters/GovernanceMetricImplementationConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/GovernanceMetricImplementationConverter.java similarity index 96% rename from open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/converters/GovernanceMetricImplementationConverter.java rename to open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/GovernanceMetricImplementationConverter.java index 519e32caccf..7f2ab9c4aa7 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/converters/GovernanceMetricImplementationConverter.java +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/GovernanceMetricImplementationConverter.java @@ -1,11 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.converters; +package org.odpi.openmetadata.commonservices.generichandlers; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceMetricImplementation; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.RelatedElement; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceMetricProperties; +import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.GovernanceMetricImplementation; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.RelatedElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.GovernanceMetricProperties; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; @@ -23,7 +24,7 @@ * GovernanceMetricConverter provides common methods for transferring relevant properties from an Open Metadata Repository Services (OMRS) * EntityDetail object into a bean that inherits from GovernanceMetricImplementation. */ -public class GovernanceMetricImplementationConverter extends GovernanceProgramOMASConverter +public class GovernanceMetricImplementationConverter extends OMFConverter { /** * Constructor diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/converters/GovernanceRoleConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/GovernanceRoleConverter.java similarity index 94% rename from open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/converters/GovernanceRoleConverter.java rename to open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/GovernanceRoleConverter.java index e5245cea10d..19371b9fd5f 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/converters/GovernanceRoleConverter.java +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/GovernanceRoleConverter.java @@ -1,10 +1,11 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.converters; +package org.odpi.openmetadata.commonservices.generichandlers; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceRoleElement; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceRoleProperties; +import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.GovernanceRoleElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.GovernanceRoleProperties; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; @@ -20,7 +21,7 @@ * GovernanceRoleConverter provides common methods for transferring relevant properties from an Open Metadata Repository Services (OMRS) * EntityDetail object into an GovernanceRoleElement bean. Note it needs to support basic PersonRole elements as well as ite subtypes. */ -public class GovernanceRoleConverter extends GovernanceProgramOMASConverter +public class GovernanceRoleConverter extends OMFConverter { /** * Constructor diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/converters/GovernanceZoneConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/GovernanceZoneConverter.java similarity index 93% rename from open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/converters/GovernanceZoneConverter.java rename to open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/GovernanceZoneConverter.java index 17b5f7224bd..734595475bd 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/converters/GovernanceZoneConverter.java +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/GovernanceZoneConverter.java @@ -1,10 +1,11 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.converters; +package org.odpi.openmetadata.commonservices.generichandlers; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceZoneElement; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceZoneProperties; +import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.GovernanceZoneElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.GovernanceZoneProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.*; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; @@ -17,7 +18,7 @@ * GovernanceZoneConverter provides common methods for transferring relevant properties from an Open Metadata Repository Services (OMRS) * EntityDetail object into a bean that inherits from GovernanceZoneElement. */ -public class GovernanceZoneConverter extends GovernanceProgramOMASConverter +public class GovernanceZoneConverter extends OMFConverter { /** * Constructor diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/converters/ITProfileConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ITProfileConverter.java similarity index 91% rename from open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/converters/ITProfileConverter.java rename to open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ITProfileConverter.java index 6db405fe3a2..81e3cd08c6b 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/converters/ITProfileConverter.java +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ITProfileConverter.java @@ -1,19 +1,15 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.converters; - - -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.ContactMethodElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.ITProfileElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.ProfileIdentityElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.UserIdentityElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.ContactMethodProperties; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.ITProfileProperties; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.ProfileIdentityProperties; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.UserIdentityProperties; +package org.odpi.openmetadata.commonservices.generichandlers; + +import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.ContactMethodProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.ITProfileProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.ProfileIdentityProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.UserIdentityProperties; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityProxy; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; @@ -30,7 +26,7 @@ /** * ActorProfileConverter generates a ActorProfileElement bean from a ActorProfile entity. */ -public class ITProfileConverter extends ITInfrastructureOMASConverter +public class ITProfileConverter extends OMFConverter { /** * Constructor @@ -205,7 +201,7 @@ else if (repositoryHelper.isTypeOf(serviceName, relationshipTypeName, OpenMetada profileIdentityProperties.setDescription(this.removeDescription(relationshipProperties)); profileIdentityElement.setProfileIdentity(profileIdentityProperties); - profileIdentityElement.setProperties(userIdentities.get(entityProxy.getGUID())); + profileIdentityElement.setUserIdentity(userIdentities.get(entityProxy.getGUID())); profileIdentities.add(profileIdentityElement); } diff --git a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/InformalTagConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/InformalTagConverter.java new file mode 100644 index 00000000000..829bd1f5e73 --- /dev/null +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/InformalTagConverter.java @@ -0,0 +1,133 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.generichandlers; + +import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.FeedbackTargetElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.InformalTagElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.feedback.InformalTagProperties; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; + +import java.lang.reflect.InvocationTargetException; + + +/** + * InformalTagConverter provides common methods for transferring relevant properties from an Open Metadata Repository Services (OMRS) + * EntityDetail object into an InformalTagElement bean. + */ +public class InformalTagConverter extends OMFConverter +{ + /** + * Constructor + * + * @param repositoryHelper helper object to parse entity + * @param serviceName name of this component + * @param serverName local server name + */ + public InformalTagConverter(OMRSRepositoryHelper repositoryHelper, + String serviceName, + String serverName) + { + super(repositoryHelper, serviceName, serverName); + } + + + /** + * Using the supplied instances, return a new instance of the bean. This is used for beans that + * contain a combination of the properties from an entity and that of a connected relationship. + * + * @param beanClass name of the class to create + * @param entity entity containing the properties + * @param relationship relationship containing the properties + * @param methodName calling method + * @return bean populated with properties from the instances supplied + * @throws PropertyServerException there is a problem instantiating the bean + */ + @Override + public B getNewBean(Class beanClass, + EntityDetail entity, + Relationship relationship, + String methodName) throws PropertyServerException + { + try + { + /* + * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. + */ + B returnBean = beanClass.getDeclaredConstructor().newInstance(); + + if (returnBean instanceof InformalTagElement bean) + { + InformalTagProperties properties = new InformalTagProperties(); + + bean.setElementHeader(super.getMetadataElementHeader(beanClass, entity, methodName)); + + InstanceProperties instanceProperties; + + /* + * The initial set of values come from the entity. + */ + if (entity != null) + { + instanceProperties = new InstanceProperties(entity.getProperties()); + properties.setUser(entity.getCreatedBy()); + + properties.setName(this.removeTagName(instanceProperties)); + properties.setDescription(this.removeTagDescription(instanceProperties)); + properties.setIsPrivateTag(! this.removeIsPublic(instanceProperties)); + } + else + { + handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); + } + + bean.setProperties(properties); + + if (relationship != null) + { + FeedbackTargetElement feedbackTargetElement = new FeedbackTargetElement(); + + instanceProperties = new InstanceProperties(relationship.getProperties()); + + feedbackTargetElement.setRelationshipHeader(super.getMetadataElementHeader(beanClass, relationship, null, methodName)); + feedbackTargetElement.setRelatedElement(super.getElementStub(beanClass, relationship.getEntityOneProxy(), methodName)); + feedbackTargetElement.setIsPublic(this.getIsPublic(instanceProperties)); + + bean.setFeedbackTargetElement(feedbackTargetElement); + } + + } + + return returnBean; + } + catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) + { + super.handleInvalidBeanClass(beanClass.getName(), error, methodName); + } + + return null; + } + + + /** + * Using the supplied instances, return a new instance of the bean. This is used for beans that + * contain a combination of the properties from an entity and that of a connected relationship. + * + * @param beanClass name of the class to create + * @param entity entity containing the properties + * @param methodName calling method + * @return bean populated with properties from the instances supplied + * @throws PropertyServerException there is a problem instantiating the bean + */ + @Override + public B getNewBean(Class beanClass, + EntityDetail entity, + String methodName) throws PropertyServerException + { + return getNewBean(beanClass, entity, null, methodName); + } +} diff --git a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/LicenseTypeConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/LicenseTypeConverter.java new file mode 100644 index 00000000000..31757790620 --- /dev/null +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/LicenseTypeConverter.java @@ -0,0 +1,138 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.generichandlers; + + +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.LicenseTypeElement; +import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.LicenseTypeProperties; +import java.lang.reflect.InvocationTargetException; + + +/** + * LicenseTypeConverter provides common methods for transferring relevant properties from an Open Metadata Repository Services (OMRS) + * EntityDetail object into a bean that inherits from LicenseTypeElement. + */ +public class LicenseTypeConverter extends OMFConverter +{ + /** + * Constructor + * + * @param repositoryHelper helper object to parse entity + * @param serviceName name of this component + * @param serverName local server name + */ + public LicenseTypeConverter(OMRSRepositoryHelper repositoryHelper, + String serviceName, + String serverName) + { + super(repositoryHelper, serviceName, serverName); + } + + + + /** + * Using the supplied entity, return a new instance of the bean. This is used for most beans that have + * a one to one correspondence with the repository instances. + * + * @param beanClass name of the class to create + * @param primaryEntity entity containing the properties + * @param methodName calling method + * @return bean populated with properties from the entity supplied + * @throws PropertyServerException there is a problem instantiating the bean + */ + public B getNewBean(Class beanClass, + EntityDetail primaryEntity, + String methodName) throws PropertyServerException + { + try + { + /* + * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. + */ + B returnBean = beanClass.getDeclaredConstructor().newInstance(); + + if (returnBean instanceof LicenseTypeElement bean) + { + if (primaryEntity != null) + { + bean.setElementHeader(this.getMetadataElementHeader(beanClass, primaryEntity, primaryEntity.getClassifications(), methodName)); + + /* + * The initial set of values come from the entity. + */ + InstanceProperties instanceProperties = new InstanceProperties(primaryEntity.getProperties()); + + LicenseTypeProperties licenseTypeProperties = new LicenseTypeProperties(); + + licenseTypeProperties.setDocumentIdentifier(this.removeQualifiedName(instanceProperties)); + licenseTypeProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); + licenseTypeProperties.setTitle(this.removeTitle(instanceProperties)); + licenseTypeProperties.setScope(this.removeScope(instanceProperties)); + licenseTypeProperties.setDomainIdentifier(this.removeDomainIdentifier(instanceProperties)); + licenseTypeProperties.setPriority(this.removePriority(instanceProperties)); + licenseTypeProperties.setOutcomes(this.removeOutcomes(instanceProperties)); + licenseTypeProperties.setResults(this.removeResults(instanceProperties)); + licenseTypeProperties.setDetails(this.removeDetails(instanceProperties)); + + /* + * Any remaining properties are returned in the extended properties. They are + * assumed to be defined in a subtype. + */ + licenseTypeProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); + licenseTypeProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); + + bean.setProperties(licenseTypeProperties); + } + else + { + handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); + } + } + + return returnBean; + } + catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) + { + super.handleInvalidBeanClass(beanClass.getName(), error, methodName); + } + + return null; + } + + + /** + * Using the supplied instances, return a new instance of the bean. This is used for beans that + * contain a combination of the properties from an entity and that of a connected relationship. + * + * @param beanClass name of the class to create + * @param entity entity containing the properties + * @param relationship relationship containing the properties + * @param methodName calling method + * @return bean populated with properties from the instances supplied + * @throws PropertyServerException there is a problem instantiating the bean + */ + @SuppressWarnings(value = "unused") + public B getNewBean(Class beanClass, + EntityDetail entity, + Relationship relationship, + String methodName) throws PropertyServerException + { + final String thisMethodName = "getNewBean(entity, relationship)"; + B returnBean = this.getNewBean(beanClass, entity, methodName); + + if (returnBean instanceof LicenseTypeElement) + { + LicenseTypeElement bean = (LicenseTypeElement) returnBean; + + bean.setRelatedElement(super.getRelatedElement(beanClass, entity, relationship, methodName)); + } + + return returnBean; + } +} diff --git a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/LikeConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/LikeConverter.java new file mode 100644 index 00000000000..72b26648e4e --- /dev/null +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/LikeConverter.java @@ -0,0 +1,126 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.generichandlers; + +import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.FeedbackTargetElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.LikeElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.feedback.LikeProperties; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; + +import java.lang.reflect.InvocationTargetException; + + +/** + * LikeConverter provides common methods for transferring relevant properties from an Open Metadata Repository Services (OMRS) + * EntityDetail object into an LikeElement bean. + */ +public class LikeConverter extends OMFConverter +{ + /** + * Constructor + * + * @param repositoryHelper helper object to parse entity + * @param serviceName name of this component + * @param serverName local server name + */ + public LikeConverter(OMRSRepositoryHelper repositoryHelper, + String serviceName, + String serverName) + { + super(repositoryHelper, serviceName, serverName); + } + + + /** + * Using the supplied instances, return a new instance of the bean. This is used for beans that + * contain a combination of the properties from an entity and that of a connected relationship. + * + * @param beanClass name of the class to create + * @param entity entity containing the properties + * @param relationship relationship containing the properties + * @param methodName calling method + * @return bean populated with properties from the instances supplied + * @throws PropertyServerException there is a problem instantiating the bean + */ + @Override + public B getNewBean(Class beanClass, + EntityDetail entity, + Relationship relationship, + String methodName) throws PropertyServerException + { + try + { + /* + * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. + */ + B returnBean = beanClass.getDeclaredConstructor().newInstance(); + + if (returnBean instanceof LikeElement bean) + { + LikeProperties properties = new LikeProperties(); + + bean.setElementHeader(super.getMetadataElementHeader(beanClass, entity, methodName)); + + /* + * The initial set of values come from the entity. + */ + if (entity != null) + { + properties.setUser(entity.getCreatedBy()); + } + else + { + handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); + } + + bean.setProperties(properties); + + if (relationship != null) + { + FeedbackTargetElement feedbackTargetElement = new FeedbackTargetElement(); + + InstanceProperties instanceProperties = new InstanceProperties(relationship.getProperties()); + + feedbackTargetElement.setRelationshipHeader(super.getMetadataElementHeader(beanClass, relationship, null, methodName)); + feedbackTargetElement.setRelatedElement(super.getElementStub(beanClass, relationship.getEntityOneProxy(), methodName)); + feedbackTargetElement.setIsPublic(this.getIsPublic(instanceProperties)); + + bean.setFeedbackTargetElement(feedbackTargetElement); + } + + } + + return returnBean; + } + catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) + { + super.handleInvalidBeanClass(beanClass.getName(), error, methodName); + } + + return null; + } + + + /** + * Using the supplied instances, return a new instance of the bean. This is used for beans that + * contain a combination of the properties from an entity and that of a connected relationship. + * + * @param beanClass name of the class to create + * @param entity entity containing the properties + * @param methodName calling method + * @return bean populated with properties from the instances supplied + * @throws PropertyServerException there is a problem instantiating the bean + */ + @Override + public B getNewBean(Class beanClass, + EntityDetail entity, + String methodName) throws PropertyServerException + { + return getNewBean(beanClass, entity, null, methodName); + } +} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/converters/LineageMappingConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/LineageMappingConverter.java similarity index 92% rename from open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/converters/LineageMappingConverter.java rename to open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/LineageMappingConverter.java index f2b54eda832..9a7f0d4c696 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/converters/LineageMappingConverter.java +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/LineageMappingConverter.java @@ -1,9 +1,10 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.converters; +package org.odpi.openmetadata.commonservices.generichandlers; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.LineageMappingElement; +import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.LineageMappingElement; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityProxy; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; @@ -16,7 +17,7 @@ * LineageMappingConverter provides common methods for transferring relevant header from an Open Metadata Repository Services (OMRS) * Relationship object into a LineageMappingElement bean. */ -public class LineageMappingConverter extends ITInfrastructureOMASConverter +public class LineageMappingConverter extends OMFConverter { /** * Constructor diff --git a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/LocationConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/LocationConverter.java new file mode 100644 index 00000000000..986f5f0527f --- /dev/null +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/LocationConverter.java @@ -0,0 +1,158 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.generichandlers; + +import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.LocationElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.locations.LocationProperties; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; + +import java.lang.reflect.InvocationTargetException; + + +/** + * LocationConverter provides common methods for transferring relevant properties from an Open Metadata Repository Services (OMRS) + * EntityDetail object into a bean that inherits from LocationElement. + */ +public class LocationConverter extends OMFConverter +{ + /** + * Constructor + * + * @param repositoryHelper helper object to parse entity + * @param serviceName name of this component + * @param serverName local server name + */ + public LocationConverter(OMRSRepositoryHelper repositoryHelper, + String serviceName, + String serverName) + { + super(repositoryHelper, serviceName, serverName); + } + + + /** + * Using the supplied instances, return a new instance of the bean. This is used for beans that + * contain a combination of the properties from an entity and that of a connected relationship. + * + * @param beanClass name of the class to create + * @param entity entity containing the properties + * @param relationship relationship containing the properties + * @param methodName calling method + * @return bean populated with properties from the instances supplied + * @throws PropertyServerException there is a problem instantiating the bean + */ + @Override + public B getNewBean(Class beanClass, + EntityDetail entity, + Relationship relationship, + String methodName) throws PropertyServerException + { + try + { + /* + * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. + */ + B returnBean = beanClass.getDeclaredConstructor().newInstance(); + + if (returnBean instanceof LocationElement) + { + this.updateSimpleMetadataElement(beanClass, (LocationElement) returnBean, entity, methodName); + } + + return returnBean; + } + catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) + { + super.handleInvalidBeanClass(beanClass.getName(), error, methodName); + } + + return null; + } + + + /** + * Using the supplied instances, return a new instance of the bean. This is used for beans that + * contain a combination of the properties from an entity and that of a connected relationship. + * + * @param beanClass name of the class to create + * @param entity entity containing the properties + * @param methodName calling method + * @return bean populated with properties from the instances supplied + * @throws PropertyServerException there is a problem instantiating the bean + */ + @Override + public B getNewBean(Class beanClass, + EntityDetail entity, + String methodName) throws PropertyServerException + { + try + { + /* + * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. + */ + B returnBean = beanClass.getDeclaredConstructor().newInstance(); + + if (returnBean instanceof LocationElement) + { + this.updateSimpleMetadataElement(beanClass, ( LocationElement) returnBean, entity, methodName); + } + + return returnBean; + } + catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) + { + super.handleInvalidBeanClass(beanClass.getName(), error, methodName); + } + + return null; + } + + + /** + * Extract the properties from the entity. Each concrete DataManager OMAS converter implements this method. + * The top level fills in the header + * + * @param beanClass name of the class to create + * @param bean output bean + * @param entity entity containing the properties + * @param methodName calling method + * @throws PropertyServerException there is a problem instantiating the bean + */ + void updateSimpleMetadataElement(Class beanClass, + LocationElement bean, + EntityDetail entity, + String methodName) throws PropertyServerException + { + if (entity != null) + { + bean.setElementHeader(this.getMetadataElementHeader(beanClass, entity, methodName)); + LocationProperties locationProperties = new LocationProperties(); + + InstanceProperties instanceProperties = new InstanceProperties(entity.getProperties()); + + locationProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); + locationProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); + locationProperties.setIdentifier(this.removeIdentifier(instanceProperties)); + locationProperties.setDisplayName(this.removeDisplayName(instanceProperties)); + locationProperties.setDescription(this.removeDescription(instanceProperties)); + + /* + * Any remaining properties are returned in the extended properties. They are + * assumed to be defined in a subtype. + */ + locationProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); + locationProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); + + bean.setLocationProperties(locationProperties); + } + else + { + handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); + } + } +} diff --git a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-server/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/converters/MeaningConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/MeaningConverter.java similarity index 92% rename from open-metadata-implementation/access-services/asset-consumer/asset-consumer-server/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/converters/MeaningConverter.java rename to open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/MeaningConverter.java index 5a4f00fa058..3c969df0605 100644 --- a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-server/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/converters/MeaningConverter.java +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/MeaningConverter.java @@ -1,10 +1,11 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetconsumer.converters; +package org.odpi.openmetadata.commonservices.generichandlers; -import org.odpi.openmetadata.accessservices.assetconsumer.elements.MeaningElement; -import org.odpi.openmetadata.accessservices.assetconsumer.properties.MeaningProperties; +import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.MeaningElement; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; +import org.odpi.openmetadata.frameworks.openmetadata.properties.glossaries.MeaningProperties; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.*; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; @@ -16,7 +17,7 @@ * MeaningConverter provides common methods for transferring relevant properties from an Open Metadata Repository Services (OMRS) * EntityDetail object into a MeaningElement bean. */ -public class MeaningConverter extends AssetConsumerOMASConverter +public class MeaningConverter extends OMFConverter { /** * Constructor @@ -55,9 +56,8 @@ public B getNewBean(Class beanClass, */ B returnBean = beanClass.getDeclaredConstructor().newInstance(); - if (returnBean instanceof MeaningElement) + if (returnBean instanceof MeaningElement bean) { - MeaningElement bean = (MeaningElement) returnBean; MeaningProperties meaningProperties = new MeaningProperties(); bean.setElementHeader(super.getMetadataElementHeader(beanClass, entity, methodName)); diff --git a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-server/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/converters/MetadataElementConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/MetadataElementConverter.java similarity index 75% rename from open-metadata-implementation/access-services/asset-consumer/asset-consumer-server/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/converters/MetadataElementConverter.java rename to open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/MetadataElementConverter.java index 15cb5529c84..3b96187d592 100644 --- a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-server/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/converters/MetadataElementConverter.java +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/MetadataElementConverter.java @@ -1,24 +1,27 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetconsumer.converters; +package org.odpi.openmetadata.commonservices.generichandlers; -import org.odpi.openmetadata.accessservices.assetconsumer.properties.MetadataElement; -import org.odpi.openmetadata.commonservices.generichandlers.OCFConverter; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.MetadataElementSummary; +import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstancePropertyValue; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; import java.lang.reflect.InvocationTargetException; +import java.util.HashMap; +import java.util.Iterator; +import java.util.Map; /** * MetadataElementConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) - * EntityDetail object into a MetadataElement bean. + * EntityDetail object into a MetadataElementSummary bean. */ -public class MetadataElementConverter extends OCFConverter +public class MetadataElementConverter extends OMFConverter { /** * Constructor @@ -57,7 +60,7 @@ public B getNewBean(Class beanClass, */ B returnBean = beanClass.getDeclaredConstructor().newInstance(); - if (returnBean instanceof MetadataElement bean) + if (returnBean instanceof MetadataElementSummary bean) { /* * Check that the entity is of the correct type. @@ -67,7 +70,23 @@ public B getNewBean(Class beanClass, /* * Save the properties as a map. */ - bean.setProperties(this.getRemainingExtendedProperties(entity.getProperties())); + if (entity.getProperties() != null) + { + Iterator propertyNames = entity.getProperties().getPropertyNames(); + + Map propertyValues = new HashMap<>(); + + while (propertyNames.hasNext()) + { + String propertyName = propertyNames.next(); + + InstancePropertyValue instancePropertyValue = entity.getProperties().getPropertyValue(propertyName); + + propertyValues.put(propertyName, instancePropertyValue.valueAsString()); + } + + bean.setProperties(propertyValues); + } } return returnBean; diff --git a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-server/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/converters/MetadataRelationshipConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/MetadataRelationshipConverter.java similarity index 78% rename from open-metadata-implementation/access-services/asset-consumer/asset-consumer-server/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/converters/MetadataRelationshipConverter.java rename to open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/MetadataRelationshipConverter.java index 0500083e1ea..66fa3b0bbd6 100644 --- a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-server/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/converters/MetadataRelationshipConverter.java +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/MetadataRelationshipConverter.java @@ -1,24 +1,28 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetconsumer.converters; +package org.odpi.openmetadata.commonservices.generichandlers; -import org.odpi.openmetadata.accessservices.assetconsumer.properties.MetadataElement; -import org.odpi.openmetadata.accessservices.assetconsumer.properties.MetadataRelationship; -import org.odpi.openmetadata.commonservices.generichandlers.OCFConverter; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.MetadataElementSummary; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.MetadataRelationship; +import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstancePropertyValue; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; import java.lang.reflect.InvocationTargetException; +import java.util.HashMap; +import java.util.Iterator; +import java.util.Map; /** * MetadataRelationshipConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) * Relationship object into a MetadataRelationship bean. */ -public class MetadataRelationshipConverter extends OCFConverter +public class MetadataRelationshipConverter extends OMFConverter { /** * Constructor @@ -57,7 +61,7 @@ public B getNewBean(Class beanClass, */ B returnBean = beanClass.getDeclaredConstructor().newInstance(); - if (returnBean instanceof MetadataElement bean) + if (returnBean instanceof MetadataElementSummary bean) { /* * Check that the entity is of the correct type. @@ -67,7 +71,23 @@ public B getNewBean(Class beanClass, /* * Save the properties as a map. */ - bean.setProperties(this.getRemainingExtendedProperties(entity.getProperties())); + if (entity.getProperties() != null) + { + Iterator propertyNames = entity.getProperties().getPropertyNames(); + + Map propertyValues = new HashMap<>(); + + while (propertyNames.hasNext()) + { + String propertyName = propertyNames.next(); + + InstancePropertyValue instancePropertyValue = entity.getProperties().getPropertyValue(propertyName); + + propertyValues.put(propertyName, instancePropertyValue.valueAsString()); + } + + bean.setProperties(propertyValues); + } } return returnBean; diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/converters/MetadataSourceConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/MetadataSourceConverter.java similarity index 92% rename from open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/converters/MetadataSourceConverter.java rename to open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/MetadataSourceConverter.java index 9a656ec7c9d..5aa90f20a69 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-server/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/converters/MetadataSourceConverter.java +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/MetadataSourceConverter.java @@ -1,9 +1,10 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.converters; +package org.odpi.openmetadata.commonservices.generichandlers; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.MetadataSourceElement; -import org.odpi.openmetadata.accessservices.communityprofile.properties.MetadataSourceProperties; + +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.MetadataSourceElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities.MetadataSourceProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; @@ -17,7 +18,7 @@ * MetadataSourceConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) * EntityDetail object into a MetadataSourceElement bean. */ -public class MetadataSourceConverter extends CommunityProfileOMASConverter +public class MetadataSourceConverter extends OMFConverter { /** * Constructor @@ -56,9 +57,8 @@ public B getNewBean(Class beanClass, */ B returnBean = beanClass.getDeclaredConstructor().newInstance(); - if (returnBean instanceof MetadataSourceElement) + if (returnBean instanceof MetadataSourceElement bean) { - MetadataSourceElement bean = (MetadataSourceElement) returnBean; MetadataSourceProperties metadataSourceProperties = new MetadataSourceProperties(); if (entity != null) diff --git a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/OCFConnectionConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/OCFConnectionConverter.java new file mode 100644 index 00000000000..6b54281c396 --- /dev/null +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/OCFConnectionConverter.java @@ -0,0 +1,79 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.generichandlers; + +import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; +import org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; + +import java.lang.reflect.InvocationTargetException; +import java.util.List; + +/** + * OCFConnectionConverter transfers the relevant properties from some Open Metadata Repository Services (OMRS) + * EntityDetail and Relationship objects into a Connection bean (or a VirtualConnection bean). + */ +public class OCFConnectionConverter extends OMFConverter +{ + /** + * Constructor + * + * @param repositoryHelper helper object to parse entity + * @param serviceName name of this component + * @param serverName local server name + */ + public OCFConnectionConverter(OMRSRepositoryHelper repositoryHelper, + String serviceName, + String serverName) + { + super(repositoryHelper, serviceName, serverName); + } + + + /** + * Using the supplied instances, return a new instance of the bean. It is used for beans such as + * a connection bean which made up of 3 entities (Connection, ConnectorType and Endpoint) plus the + * relationships between them. The relationships may be omitted if they do not have an properties. + * + * @param beanClass name of the class to create + * @param primaryEntity entity that is the root of the collection of entities that make up the + * content of the bean + * @param supplementaryEntities entities connected to the primary entity by the relationships + * @param relationships relationships linking the entities + * @param methodName calling method + * @return bean populated with properties from the instances supplied + * @throws PropertyServerException there is a problem instantiating the bean + */ + @Override + @SuppressWarnings(value = "unchecked") + public B getNewComplexBean(Class beanClass, + EntityDetail primaryEntity, + List supplementaryEntities, + List relationships, + String methodName) throws PropertyServerException + { + try + { + /* + * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. + */ + B returnBean = beanClass.getDeclaredConstructor().newInstance(); + + if (returnBean instanceof Connection) + { + /* + * This cast should not fail due to the checking we have done above, but ClassCastException is caught just in case. + */ + return (B) getEmbeddedConnection(beanClass, primaryEntity, supplementaryEntities, relationships, methodName); + } + } + catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) + { + super.handleInvalidBeanClass(beanClass.getName(), error, methodName); + } + + return null; + } +} diff --git a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/OCFConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/OCFConverter.java deleted file mode 100644 index 0a8dbdb7e2b..00000000000 --- a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/OCFConverter.java +++ /dev/null @@ -1,611 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.commonservices.generichandlers; - -import org.odpi.openmetadata.frameworks.openmetadata.enums.DataItemSortOrder; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.*; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.*; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; -import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - - -/** - * OCFConverter provides the generic methods for the OCF beans converters. Generic classes - * have limited knowledge of the classes these are working on and this means creating a new instance of a - * class from within a generic is a little involved. This class provides the generic method for creating - * and initializing a Data Manager bean. - */ -public abstract class OCFConverter extends OpenMetadataAPIGenericConverter -{ - /** - * Constructor - * - * @param repositoryHelper helper object to parse entity - * @param serviceName name of this component - * @param serverName name of this server - */ - protected OCFConverter(OMRSRepositoryHelper repositoryHelper, - String serviceName, - String serverName) - { - super (repositoryHelper, serviceName, serverName); - } - - - /*=============================== - * Methods to fill out headers and enums - */ - - - /** - * Extract the properties from the entity. - * - * @param elementHeader the header for the bean - * @param entity entity containing the properties - * @param expectedTypeName type that the entity must match (or it may be a subtype) - * @param methodName calling method - * @throws PropertyServerException the supplied entity is not of the expected type - */ - protected void setUpElementHeader(ElementHeader elementHeader, - EntityDetail entity, - String expectedTypeName, - String methodName) throws PropertyServerException - { - if (entity != null) - { - super.validateInstanceType(expectedTypeName, - elementHeader.getClass().getName(), - entity, - methodName); - - elementHeader.setGUID(entity.getGUID()); - elementHeader.setType(this.getElementType(entity)); - elementHeader.setClassifications(this.getEntityClassifications(entity)); - - ElementOrigin elementOrigin = new ElementOrigin(); - - elementOrigin.setSourceServer(serverName); - elementOrigin.setOriginCategory(this.getElementOriginCategory(entity.getInstanceProvenanceType())); - elementOrigin.setHomeMetadataCollectionId(entity.getMetadataCollectionId()); - elementOrigin.setHomeMetadataCollectionName(entity.getMetadataCollectionName()); - elementOrigin.setLicense(entity.getInstanceLicense()); - - elementHeader.setOrigin(elementOrigin); - - elementHeader.setVersions(this.getElementVersions(entity)); - } - else - { - super.handleMissingMetadataInstance(elementHeader.getClass().getName(), - TypeDefCategory.ENTITY_DEF, - methodName); - } - } - - - /** - * Extract the properties from the entity. - * - * @param elementHeader the header for the bean - * @param instanceHeader header of entity - * @param classifications classifications from the entity - * @param methodName calling method - * @throws PropertyServerException the supplied entity is not of the expected type - */ - protected void setUpElementHeader(ElementHeader elementHeader, - InstanceHeader instanceHeader, - List classifications, - String methodName) throws PropertyServerException - { - if (instanceHeader != null) - { - elementHeader.setGUID(instanceHeader.getGUID()); - elementHeader.setType(this.getElementType(instanceHeader)); - elementHeader.setClassifications(this.getElementClassifications(classifications)); - - ElementOrigin elementOrigin = new ElementOrigin(); - - elementOrigin.setSourceServer(serverName); - elementOrigin.setOriginCategory(this.getElementOriginCategory(instanceHeader.getInstanceProvenanceType())); - elementOrigin.setHomeMetadataCollectionId(instanceHeader.getMetadataCollectionId()); - elementOrigin.setHomeMetadataCollectionName(instanceHeader.getMetadataCollectionName()); - elementOrigin.setLicense(instanceHeader.getInstanceLicense()); - - elementHeader.setOrigin(elementOrigin); - - elementHeader.setVersions(this.getElementVersions(instanceHeader)); - } - else - { - super.handleMissingMetadataInstance(elementHeader.getClass().getName(), - TypeDefCategory.ENTITY_DEF, - methodName); - } - } - - - /** - * Retrieve a specific named classification. - * - * @param classificationName name of classification - * @param beanClassifications list of classifications retrieved from the repositories - * @return null or the requested classification - */ - protected ElementClassification getClassification(String classificationName, - List beanClassifications) - { - if ((classificationName != null) && (beanClassifications != null)) - { - for (ElementClassification classification : beanClassifications) - { - if (classification != null) - { - if (classification.getClassificationName().equals(classificationName)) - { - return classification; - } - } - } - } - - return null; - } - - - /** - * Remove the requested classification from the bean classifications and return the resulting list. - * - * @param classificationName name of the classification - * @param beanClassifications list of classifications retrieved from the repositories - * @return null or a list of classifications - */ - protected List removeClassification(String classificationName, - List beanClassifications) - { - if ((classificationName != null) && (beanClassifications != null)) - { - List results = new ArrayList<>(); - - for (ElementClassification classification : beanClassifications) - { - if (classification != null) - { - if (! classification.getClassificationName().equals(classificationName)) - { - results.add(classification); - } - } - } - - if (! results.isEmpty()) - { - return results; - } - } - - return null; - } - - - /** - * Extract and delete the sortOrder property from the supplied instance properties. - * - * @param instanceProperties properties from entity - * @return DataItemSortOrder enum - */ - protected DataItemSortOrder removeSortOrder(InstanceProperties instanceProperties) - { - final String methodName = "removeSortOrder"; - - if (instanceProperties != null) - { - int ordinal = repositoryHelper.removeEnumPropertyOrdinal(serviceName, - OpenMetadataProperty.SORT_ORDER.name, - instanceProperties, - methodName); - - for (DataItemSortOrder dataItemSortOrder : DataItemSortOrder.values()) - { - if (dataItemSortOrder.getOrdinal() == ordinal) - { - return dataItemSortOrder; - } - } - } - - return DataItemSortOrder.UNSORTED; - } - - - /** - * Using the supplied instances, return a new instance of the Connection bean. It may be a Connection or a VirtualConnection. - * - * @param beanClass class name for the bean - * @param primaryEntity entity that is the root of the collection of entities that make up the - * content of the bean - * @param supplementaryEntities entities connected to the primary entity by the relationships - * @param relationships relationships linking the entities - * @param methodName calling method - * @return bean populated with properties from the instances supplied in the constructor - * @throws PropertyServerException there is a problem instantiating the bean - */ - protected Connection getEmbeddedConnection(Class beanClass, - EntityDetail primaryEntity, - List supplementaryEntities, - List relationships, - String methodName) throws PropertyServerException - { - /* - * The entities and relationships may describe either a Connection or a VirtualConnection. - * This next piece of logic sorts out which type of bean to create. - */ - if ((primaryEntity != null) && (primaryEntity.getType() != null)) - { - String actualTypeName = primaryEntity.getType().getTypeDefName(); - - if (repositoryHelper.isTypeOf(serviceName, actualTypeName, OpenMetadataType.VIRTUAL_CONNECTION_TYPE_NAME)) - { - return getNewVirtualConnection(beanClass, primaryEntity, supplementaryEntities, relationships, methodName); - } - else if (repositoryHelper.isTypeOf(serviceName, actualTypeName, OpenMetadataType.CONNECTION_TYPE_NAME)) - { - return getNewConnection(beanClass, primaryEntity, supplementaryEntities, relationships, methodName); - } - else - { - /* - * This will throw an exception - */ - super.validateInstanceType(OpenMetadataType.CONNECTION_TYPE_NAME, - beanClass.getName(), - primaryEntity, - methodName); - } - } - else - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - } - - return null; - } - - /** - * Using the supplied instances, return a new instance of the VirtualConnection bean. Virtual connections nest other connections - * inside themselves to allow for connectors that use other connectors. This means the converter needs to walk the - * relationships to assemble the virtual connection accurately. - * - * @param beanClass name of the class to create - * @param primaryEntity entity that is the root of the collection of entities that make up the - * content of the bean - * @param supplementaryEntities entities connected to the primary entity by the relationships - * @param relationships relationships linking the entities - * @param methodName calling method - * @return bean populated with properties from the instances supplied in the constructor - * @throws PropertyServerException there is a problem instantiating the bean - */ - private Connection getNewVirtualConnection(Class beanClass, - EntityDetail primaryEntity, - List supplementaryEntities, - List relationships, - String methodName) throws PropertyServerException - { - try - { - VirtualConnection connection = new VirtualConnection(); - - fillInConnectionProperties(connection, primaryEntity, relationships, methodName); - - /* - * To fill out the rest of the virtual connection it is necessary to follow the relationships - * because connections can be embedded inside one another to multiple depths. Verify that there are - * relationships to follow. - */ - if ((relationships == null) || (relationships.isEmpty())) - { - return null; - } - - /* - * The next step is to build a map of the entities so that they can be selected as we walk through the relationships. - */ - Map entityDetailMap = new HashMap<>(); - - if (supplementaryEntities != null) - { - for (EntityDetail entity : supplementaryEntities) - { - if ((entity != null) && (entity.getGUID() != null)) - { - entityDetailMap.put(entity.getGUID(), entity); - } - } - } - - if (entityDetailMap.isEmpty()) - { - handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); - return null; - } - - /* - * Step through the relationships looking for embedded connection relationships. If the embedded relationship is for this - * connection then create it; otherwise ignore the relationship - other relationships will be picked up by the iterative - * processing. - */ - List embeddedConnections = new ArrayList<>(); - for (Relationship relationship : relationships) - { - if ((relationship != null) && (relationship.getType() != null)) - { - if (repositoryHelper.isTypeOf(serviceName, relationship.getType().getTypeDefName(), OpenMetadataType.EMBEDDED_CONNECTION_TYPE_NAME)) - { - EntityProxy parentConnectionProxy = relationship.getEntityOneProxy(); - - if ((parentConnectionProxy != null) && (primaryEntity.getGUID().equals(parentConnectionProxy.getGUID()))) - { - EntityProxy embeddedConnectionProxy = relationship.getEntityTwoProxy(); - - if ((embeddedConnectionProxy != null) && (embeddedConnectionProxy.getGUID() != null)) - { - EntityDetail embeddedConnectionEntity = entityDetailMap.get((embeddedConnectionProxy.getGUID())); - - if (embeddedConnectionEntity != null) - { - InstanceProperties properties = relationship.getProperties(); - EmbeddedConnection embeddedConnection = new EmbeddedConnection(); - - embeddedConnection.setPosition(getPosition(properties)); - embeddedConnection.setDisplayName(getDisplayName(properties)); - embeddedConnection.setArguments(getArguments(properties)); - embeddedConnection.setEmbeddedConnection(this.getEmbeddedConnection(beanClass, - primaryEntity, - supplementaryEntities, - relationships, - methodName)); - - embeddedConnections.add(embeddedConnection); - } - } - } - } - } - } - - if (! embeddedConnections.isEmpty()) - { - connection.setEmbeddedConnections(embeddedConnections); - } - - return connection; - } - catch (ClassCastException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - /** - * Using the supplied instances, return a new instance of the Connection bean. The - * connection bean is made up of 3 entities (Connection, ConnectorType and Endpoint) plus the - * relationships between them. The relationships may be omitted as they do not have any properties. - * The Endpoint is optional. If the ConnectorType is missing the bean is still returned even - * though this is technically an error. - * - * @param beanClass name of the class to create - * @param primaryEntity entity that is the root of the collection of entities that make up the - * content of the bean - * @param supplementaryEntities entities connected to the primary entity by the relationships - * @param relationships relationships linking the entities - * @param methodName calling method - * @return bean populated with properties from the instances supplied in the constructor - * @throws PropertyServerException there is a problem instantiating the bean - */ - private Connection getNewConnection(Class beanClass, - EntityDetail primaryEntity, - List supplementaryEntities, - List relationships, - String methodName) throws PropertyServerException - { - try - { - Connection connection = new Connection(); - - fillInConnectionProperties(connection, primaryEntity, relationships, methodName); - - /* - * The other entities should include the ConnectorType and Endpoint - */ - if (supplementaryEntities != null) - { - for (EntityDetail entity : supplementaryEntities) - { - if ((entity != null) && (entity.getType() != null)) - { - String actualTypeName = entity.getType().getTypeDefName(); - - if (repositoryHelper.isTypeOf(serviceName, actualTypeName, OpenMetadataType.ENDPOINT.typeName)) - { - Endpoint endpoint = getEndpoint(entity, methodName); - - /* - * Add the endpoint to the connection - */ - connection.setEndpoint(endpoint); - } - else if (repositoryHelper.isTypeOf(serviceName, actualTypeName, OpenMetadataType.CONNECTOR_TYPE_TYPE_NAME)) - { - ConnectorType connectorType = getConnectorType(entity, methodName); - - /* - * Add the connector type to the connection - */ - connection.setConnectorType(connectorType); - } - } - } - } - - return connection; - } - catch (ClassCastException error) - { - super.handleInvalidBeanClass(beanClass.getName(), error, methodName); - } - - return null; - } - - - /** - * Retrieve the connection properties from an entity and save them in the supplied bean - * - * @param connection bean to fill - * @param entity entity to trawl for values - * @param relationships relationships linking the entities - * @param methodName calling method - * @throws PropertyServerException there was a problem unpacking the entity - */ - private void fillInConnectionProperties(Connection connection, - EntityDetail entity, - List relationships, - String methodName) throws PropertyServerException - { - this.setUpElementHeader(connection, entity, OpenMetadataType.CONNECTION_TYPE_NAME, methodName); - - /* - * The initial set of values come from the entity properties. The super class properties are removed from a copy of the entities - * properties, leaving any subclass properties to be stored in extended properties. - */ - InstanceProperties instanceProperties = new InstanceProperties(entity.getProperties()); - - connection.setQualifiedName(this.removeQualifiedName(instanceProperties)); - connection.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); - connection.setDisplayName(this.removeDisplayName(instanceProperties)); - connection.setDescription(this.removeDescription(instanceProperties)); - connection.setSecuredProperties(this.removeSecuredProperties(instanceProperties)); - connection.setConfigurationProperties(this.removeConfigurationProperties(instanceProperties)); - connection.setUserId(this.removeUserId(instanceProperties)); - connection.setClearPassword(this.removeClearPassword(instanceProperties)); - connection.setEncryptedPassword(this.removeEncryptedPassword(instanceProperties)); - - /* - * Any remaining properties are returned in the extended properties. They are - * assumed to be defined in a subtype. - */ - connection.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - - if (relationships != null) - { - for (Relationship relationship : relationships) - { - if (relationship != null) - { - if (repositoryHelper.isTypeOf(serviceName, relationship.getType().getTypeDefName(), OpenMetadataType.ASSET_TO_CONNECTION_TYPE_NAME)) - { - connection.setAssetSummary(this.getAssetSummary(instanceProperties)); - } - } - } - } - } - - - - /** - * Retrieve the endpoint from an entity. - * - * @param entity entity to trawl for values - * @param methodName calling method - * @return new endpoint object - * @throws PropertyServerException there was a problem unpacking the entity - */ - private Endpoint getEndpoint(EntityDetail entity, - String methodName) throws PropertyServerException - { - Endpoint endpoint = new Endpoint(); - - this.setUpElementHeader(endpoint, entity, OpenMetadataType.ENDPOINT.typeName, methodName); - - /* - * The initial set of values come from the entity. - */ - InstanceProperties instanceProperties = new InstanceProperties(entity.getProperties()); - - endpoint.setQualifiedName(this.removeQualifiedName(instanceProperties)); - endpoint.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); - endpoint.setDisplayName(this.removeName(instanceProperties)); - endpoint.setDescription(this.removeDescription(instanceProperties)); - endpoint.setAddress(this.removeNetworkAddress(instanceProperties)); - endpoint.setProtocol(this.removeProtocol(instanceProperties)); - endpoint.setEncryptionMethod(this.removeEncryptionMethod(instanceProperties)); - - /* - * Any remaining properties are returned in the extended properties. They are - * assumed to be defined in a subtype. - */ - endpoint.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - - return endpoint; - } - - - /** - * Retrieve the connector type from an entity. - * - * @param entity entity to trawl for values - * @param methodName calling method - * @return new endpoint object - * @throws PropertyServerException there was a problem unpacking the entity - */ - private ConnectorType getConnectorType(EntityDetail entity, - String methodName) throws PropertyServerException - { - ConnectorType connectorType = new ConnectorType(); - - this.setUpElementHeader(connectorType, entity, OpenMetadataType.CONNECTOR_TYPE_TYPE_NAME, methodName); - - /* - * The initial set of values come from the entity. - */ - InstanceProperties instanceProperties = new InstanceProperties(entity.getProperties()); - - connectorType.setQualifiedName(this.removeQualifiedName(instanceProperties)); - connectorType.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); - connectorType.setDisplayName(this.removeDisplayName(instanceProperties)); - connectorType.setDescription(this.removeDescription(instanceProperties)); - connectorType.setSupportedAssetTypeName(this.removeSupportedAssetTypeName(instanceProperties)); - connectorType.setSupportedDeployedImplementationType(this.removeSupportedDeployedImplementationType(instanceProperties)); - connectorType.setExpectedDataFormat(this.removeExpectedDataFormat(instanceProperties)); - connectorType.setConnectorProviderClassName(this.removeConnectorProviderClassName(instanceProperties)); - connectorType.setConnectorFrameworkName(this.removeConnectorFrameworkName(instanceProperties)); - connectorType.setConnectorInterfaceLanguage(this.removeConnectorInterfaceLanguage(instanceProperties)); - connectorType.setConnectorInterfaces(this.removeConnectorInterfaces(instanceProperties)); - connectorType.setTargetTechnologySource(this.removeTargetTechnologySource(instanceProperties)); - connectorType.setTargetTechnologyName(this.removeTargetTechnologyName(instanceProperties)); - connectorType.setTargetTechnologyInterfaces(this.removeTargetTechnologyInterfaces(instanceProperties)); - connectorType.setTargetTechnologyVersions(this.removeTargetTechnologyVersions(instanceProperties)); - connectorType.setRecognizedAdditionalProperties(this.removeRecognizedAdditionalProperties(instanceProperties)); - connectorType.setRecognizedSecuredProperties(this.removeRecognizedSecuredProperties(instanceProperties)); - connectorType.setRecognizedConfigurationProperties(this.removeRecognizedConfigurationProperties(instanceProperties)); - - /* - * Any remaining properties are returned in the extended properties. They are - * assumed to be defined in a subtype. - */ - connectorType.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); - - return connectorType; - } -} diff --git a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/OMFConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/OMFConverter.java new file mode 100644 index 00000000000..922c5dd0a75 --- /dev/null +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/OMFConverter.java @@ -0,0 +1,818 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.generichandlers; + +import org.odpi.openmetadata.frameworks.connectors.properties.beans.EmbeddedConnection; +import org.odpi.openmetadata.frameworks.openmetadata.enums.*; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; +import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; +import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; +import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; +import org.odpi.openmetadata.frameworks.connectors.properties.beans.*; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.*; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + + +/** + * OMFConverter provides the generic methods for the OCF beans converters. Generic classes + * have limited knowledge of the classes these are working on and this means creating a new instance of a + * class from within a generic is a little involved. This class provides the generic method for creating + * and initializing a Data Manager bean. + */ +public abstract class OMFConverter extends OpenMetadataAPIGenericConverter +{ + protected long karmaPointPlateau = 0; + + /** + * Constructor + * + * @param repositoryHelper helper object to parse entity + * @param serviceName name of this component + * @param serverName name of this server + */ + protected OMFConverter(OMRSRepositoryHelper repositoryHelper, + String serviceName, + String serverName) + { + super(repositoryHelper, serviceName, serverName); + } + + + /** + * Constructor + * + * @param repositoryHelper helper object to parse entity + * @param serviceName name of this component + * @param serverName local server name + * @param karmaPointPlateau how many karma points to a plateau + */ + public OMFConverter(OMRSRepositoryHelper repositoryHelper, + String serviceName, + String serverName, + int karmaPointPlateau) + { + this(repositoryHelper, serviceName, serverName); + + this.karmaPointPlateau = karmaPointPlateau; + } + + + + /*=============================== + * Methods to fill out headers and enums + */ + + + /** + * Extract the properties from the entity. + * + * @param elementHeader the header for the bean + * @param entity entity containing the properties + * @param expectedTypeName type that the entity must match (or it may be a subtype) + * @param methodName calling method + * @throws PropertyServerException the supplied entity is not of the expected type + */ + protected void setUpElementHeader(ElementHeader elementHeader, + EntityDetail entity, + String expectedTypeName, + String methodName) throws PropertyServerException + { + if (entity != null) + { + super.validateInstanceType(expectedTypeName, + elementHeader.getClass().getName(), + entity, + methodName); + + elementHeader.setGUID(entity.getGUID()); + elementHeader.setType(this.getElementType(entity)); + elementHeader.setClassifications(this.getEntityClassifications(entity)); + + ElementOrigin elementOrigin = new ElementOrigin(); + + elementOrigin.setSourceServer(serverName); + elementOrigin.setOriginCategory(this.getElementOriginCategory(entity.getInstanceProvenanceType())); + elementOrigin.setHomeMetadataCollectionId(entity.getMetadataCollectionId()); + elementOrigin.setHomeMetadataCollectionName(entity.getMetadataCollectionName()); + elementOrigin.setLicense(entity.getInstanceLicense()); + + elementHeader.setOrigin(elementOrigin); + + elementHeader.setVersions(this.getElementVersions(entity)); + } + else + { + super.handleMissingMetadataInstance(elementHeader.getClass().getName(), + TypeDefCategory.ENTITY_DEF, + methodName); + } + } + + + /** + * Extract the properties from the entity. + * + * @param elementHeader the header for the bean + * @param instanceHeader header of entity + * @param classifications classifications from the entity + * @param methodName calling method + * @throws PropertyServerException the supplied entity is not of the expected type + */ + protected void setUpElementHeader(ElementHeader elementHeader, + InstanceHeader instanceHeader, + List classifications, + String methodName) throws PropertyServerException + { + if (instanceHeader != null) + { + elementHeader.setGUID(instanceHeader.getGUID()); + elementHeader.setType(this.getElementType(instanceHeader)); + elementHeader.setClassifications(this.getElementClassifications(classifications)); + + ElementOrigin elementOrigin = new ElementOrigin(); + + elementOrigin.setSourceServer(serverName); + elementOrigin.setOriginCategory(this.getElementOriginCategory(instanceHeader.getInstanceProvenanceType())); + elementOrigin.setHomeMetadataCollectionId(instanceHeader.getMetadataCollectionId()); + elementOrigin.setHomeMetadataCollectionName(instanceHeader.getMetadataCollectionName()); + elementOrigin.setLicense(instanceHeader.getInstanceLicense()); + + elementHeader.setOrigin(elementOrigin); + + elementHeader.setVersions(this.getElementVersions(instanceHeader)); + } + else + { + super.handleMissingMetadataInstance(elementHeader.getClass().getName(), + TypeDefCategory.ENTITY_DEF, + methodName); + } + } + + + /** + * Retrieve a specific named classification. + * + * @param classificationName name of classification + * @param beanClassifications list of classifications retrieved from the repositories + * @return null or the requested classification + */ + protected ElementClassification getClassification(String classificationName, + List beanClassifications) + { + if ((classificationName != null) && (beanClassifications != null)) + { + for (ElementClassification classification : beanClassifications) + { + if (classification != null) + { + if (classification.getClassificationName().equals(classificationName)) + { + return classification; + } + } + } + } + + return null; + } + + + /** + * Remove the requested classification from the bean classifications and return the resulting list. + * + * @param classificationName name of the classification + * @param beanClassifications list of classifications retrieved from the repositories + * @return null or a list of classifications + */ + protected List removeClassification(String classificationName, + List beanClassifications) + { + if ((classificationName != null) && (beanClassifications != null)) + { + List results = new ArrayList<>(); + + for (ElementClassification classification : beanClassifications) + { + if (classification != null) + { + if (!classification.getClassificationName().equals(classificationName)) + { + results.add(classification); + } + } + } + + if (!results.isEmpty()) + { + return results; + } + } + + return null; + } + + + /** + * Using the supplied instances, return a new instance of a relatedElement bean. This is used for beans that + * contain a combination of the properties from an entity and that of a connected relationship. + * + * @param beanClass name of the class to create + * @param entity entity containing the properties + * @param relationship relationship containing the properties + * @param methodName calling method + * @return bean populated with properties from the instances supplied + * @throws PropertyServerException there is a problem instantiating the bean + */ + public RelatedElement getRelatedElement(Class beanClass, + EntityDetail entity, + Relationship relationship, + String methodName) throws PropertyServerException + { + RelatedElement relatedElement = new RelatedElement(); + + relatedElement.setRelationshipHeader(this.getMetadataElementHeader(beanClass, relationship, null, methodName)); + + if (relationship != null) + { + InstanceProperties instanceProperties = new InstanceProperties(relationship.getProperties()); + + RelationshipProperties relationshipProperties = new RelationshipProperties(); + + relationshipProperties.setEffectiveFrom(instanceProperties.getEffectiveFromTime()); + relationshipProperties.setEffectiveTo(instanceProperties.getEffectiveToTime()); + relationshipProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); + + relatedElement.setRelationshipProperties(relationshipProperties); + } + else + { + handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.RELATIONSHIP_DEF, methodName); + } + + + if (entity != null) + { + ElementStub elementStub = this.getElementStub(beanClass, entity, methodName); + + relatedElement.setRelatedElement(elementStub); + } + else + { + handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); + } + + return relatedElement; + } + + + /** + * Using the supplied instances, return a new instance of a relatedElement bean. This is used for beans that + * contain a combination of the properties from an entityProxy and that of a connected relationship. + * + * @param beanClass name of the class to create + * @param entityProxy entityProxy containing the properties + * @param relationship relationship containing the properties + * @param methodName calling method + * @return bean populated with properties from the instances supplied + * @throws PropertyServerException there is a problem instantiating the bean + */ + public RelatedElement getRelatedElement(Class beanClass, + Relationship relationship, + EntityProxy entityProxy, + String methodName) throws PropertyServerException + { + RelatedElement relatedElement = new RelatedElement(); + + relatedElement.setRelationshipHeader(this.getMetadataElementHeader(beanClass, relationship, null, methodName)); + + if (relationship != null) + { + InstanceProperties instanceProperties = new InstanceProperties(relationship.getProperties()); + + RelationshipProperties relationshipProperties = new RelationshipProperties(); + + relationshipProperties.setEffectiveFrom(instanceProperties.getEffectiveFromTime()); + relationshipProperties.setEffectiveTo(instanceProperties.getEffectiveToTime()); + relationshipProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); + + relatedElement.setRelationshipProperties(relationshipProperties); + } + else + { + handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.RELATIONSHIP_DEF, methodName); + } + + + if (entityProxy != null) + { + ElementStub elementStub = this.getElementStub(beanClass, entityProxy, methodName); + + relatedElement.setRelatedElement(elementStub); + } + else + { + handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); + } + + return relatedElement; + } + + + /** + * Using the supplied instances, return a new instance of the Connection bean. It may be a Connection or a VirtualConnection. + * + * @param beanClass class name for the bean + * @param primaryEntity entity that is the root of the collection of entities that make up the + * content of the bean + * @param supplementaryEntities entities connected to the primary entity by the relationships + * @param relationships relationships linking the entities + * @param methodName calling method + * @return bean populated with properties from the instances supplied in the constructor + * @throws PropertyServerException there is a problem instantiating the bean + */ + protected Connection getEmbeddedConnection(Class beanClass, + EntityDetail primaryEntity, + List supplementaryEntities, + List relationships, + String methodName) throws PropertyServerException + { + /* + * The entities and relationships may describe either a Connection or a VirtualConnection. + * This next piece of logic sorts out which type of bean to create. + */ + if ((primaryEntity != null) && (primaryEntity.getType() != null)) + { + String actualTypeName = primaryEntity.getType().getTypeDefName(); + + if (repositoryHelper.isTypeOf(serviceName, actualTypeName, OpenMetadataType.VIRTUAL_CONNECTION_TYPE_NAME)) + { + return getNewVirtualConnection(beanClass, primaryEntity, supplementaryEntities, relationships, methodName); + } + else if (repositoryHelper.isTypeOf(serviceName, actualTypeName, OpenMetadataType.CONNECTION_TYPE_NAME)) + { + return getNewConnection(beanClass, primaryEntity, supplementaryEntities, relationships, methodName); + } + else + { + /* + * This will throw an exception + */ + super.validateInstanceType(OpenMetadataType.CONNECTION_TYPE_NAME, + beanClass.getName(), + primaryEntity, + methodName); + } + } + else + { + handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); + } + + return null; + } + + /** + * Using the supplied instances, return a new instance of the VirtualConnection bean. Virtual connections nest other connections + * inside themselves to allow for connectors that use other connectors. This means the converter needs to walk the + * relationships to assemble the virtual connection accurately. + * + * @param beanClass name of the class to create + * @param primaryEntity entity that is the root of the collection of entities that make up the + * content of the bean + * @param supplementaryEntities entities connected to the primary entity by the relationships + * @param relationships relationships linking the entities + * @param methodName calling method + * @return bean populated with properties from the instances supplied in the constructor + * @throws PropertyServerException there is a problem instantiating the bean + */ + private Connection getNewVirtualConnection(Class beanClass, + EntityDetail primaryEntity, + List supplementaryEntities, + List relationships, + String methodName) throws PropertyServerException + { + try + { + VirtualConnection connection = new VirtualConnection(); + + fillInConnectionProperties(connection, primaryEntity, relationships, methodName); + + /* + * To fill out the rest of the virtual connection it is necessary to follow the relationships + * because connections can be embedded inside one another to multiple depths. Verify that there are + * relationships to follow. + */ + if ((relationships == null) || (relationships.isEmpty())) + { + return null; + } + + /* + * The next step is to build a map of the entities so that they can be selected as we walk through the relationships. + */ + Map entityDetailMap = new HashMap<>(); + + if (supplementaryEntities != null) + { + for (EntityDetail entity : supplementaryEntities) + { + if ((entity != null) && (entity.getGUID() != null)) + { + entityDetailMap.put(entity.getGUID(), entity); + } + } + } + + if (entityDetailMap.isEmpty()) + { + handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); + return null; + } + + /* + * Step through the relationships looking for embedded connection relationships. If the embedded relationship is for this + * connection then create it; otherwise ignore the relationship - other relationships will be picked up by the iterative + * processing. + */ + List embeddedConnections = new ArrayList<>(); + for (Relationship relationship : relationships) + { + if ((relationship != null) && (relationship.getType() != null)) + { + if (repositoryHelper.isTypeOf(serviceName, relationship.getType().getTypeDefName(), OpenMetadataType.EMBEDDED_CONNECTION_TYPE_NAME)) + { + EntityProxy parentConnectionProxy = relationship.getEntityOneProxy(); + + if ((parentConnectionProxy != null) && (primaryEntity.getGUID().equals(parentConnectionProxy.getGUID()))) + { + EntityProxy embeddedConnectionProxy = relationship.getEntityTwoProxy(); + + if ((embeddedConnectionProxy != null) && (embeddedConnectionProxy.getGUID() != null)) + { + EntityDetail embeddedConnectionEntity = entityDetailMap.get((embeddedConnectionProxy.getGUID())); + + if (embeddedConnectionEntity != null) + { + InstanceProperties properties = relationship.getProperties(); + EmbeddedConnection embeddedConnection = new EmbeddedConnection(); + + embeddedConnection.setPosition(getPosition(properties)); + embeddedConnection.setDisplayName(getDisplayName(properties)); + embeddedConnection.setArguments(getArguments(properties)); + embeddedConnection.setEmbeddedConnection(this.getEmbeddedConnection(beanClass, + primaryEntity, + supplementaryEntities, + relationships, + methodName)); + + embeddedConnections.add(embeddedConnection); + } + } + } + } + } + } + + if (!embeddedConnections.isEmpty()) + { + connection.setEmbeddedConnections(embeddedConnections); + } + + return connection; + } + catch (ClassCastException error) + { + super.handleInvalidBeanClass(beanClass.getName(), error, methodName); + } + + return null; + } + + + /** + * Using the supplied instances, return a new instance of the Connection bean. The + * connection bean is made up of 3 entities (Connection, ConnectorType and Endpoint) plus the + * relationships between them. The relationships may be omitted as they do not have any properties. + * The Endpoint is optional. If the ConnectorType is missing the bean is still returned even + * though this is technically an error. + * + * @param beanClass name of the class to create + * @param primaryEntity entity that is the root of the collection of entities that make up the + * content of the bean + * @param supplementaryEntities entities connected to the primary entity by the relationships + * @param relationships relationships linking the entities + * @param methodName calling method + * @return bean populated with properties from the instances supplied in the constructor + * @throws PropertyServerException there is a problem instantiating the bean + */ + private Connection getNewConnection(Class beanClass, + EntityDetail primaryEntity, + List supplementaryEntities, + List relationships, + String methodName) throws PropertyServerException + { + try + { + Connection connection = new Connection(); + + fillInConnectionProperties(connection, primaryEntity, relationships, methodName); + + /* + * The other entities should include the ConnectorType and Endpoint + */ + if (supplementaryEntities != null) + { + for (EntityDetail entity : supplementaryEntities) + { + if ((entity != null) && (entity.getType() != null)) + { + String actualTypeName = entity.getType().getTypeDefName(); + + if (repositoryHelper.isTypeOf(serviceName, actualTypeName, OpenMetadataType.ENDPOINT.typeName)) + { + Endpoint endpoint = getEndpoint(entity, methodName); + + /* + * Add the endpoint to the connection + */ + connection.setEndpoint(endpoint); + } + else if (repositoryHelper.isTypeOf(serviceName, actualTypeName, OpenMetadataType.CONNECTOR_TYPE_TYPE_NAME)) + { + ConnectorType connectorType = getConnectorType(entity, methodName); + + /* + * Add the connector type to the connection + */ + connection.setConnectorType(connectorType); + } + } + } + } + + return connection; + } + catch (ClassCastException error) + { + super.handleInvalidBeanClass(beanClass.getName(), error, methodName); + } + + return null; + } + + + /** + * Retrieve the connection properties from an entity and save them in the supplied bean + * + * @param connection bean to fill + * @param entity entity to trawl for values + * @param relationships relationships linking the entities + * @param methodName calling method + * @throws PropertyServerException there was a problem unpacking the entity + */ + private void fillInConnectionProperties(Connection connection, + EntityDetail entity, + List relationships, + String methodName) throws PropertyServerException + { + this.setUpElementHeader(connection, entity, OpenMetadataType.CONNECTION_TYPE_NAME, methodName); + + /* + * The initial set of values come from the entity properties. The super class properties are removed from a copy of the entities + * properties, leaving any subclass properties to be stored in extended properties. + */ + InstanceProperties instanceProperties = new InstanceProperties(entity.getProperties()); + + connection.setQualifiedName(this.removeQualifiedName(instanceProperties)); + connection.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); + connection.setDisplayName(this.removeDisplayName(instanceProperties)); + connection.setDescription(this.removeDescription(instanceProperties)); + connection.setSecuredProperties(this.removeSecuredProperties(instanceProperties)); + connection.setConfigurationProperties(this.removeConfigurationProperties(instanceProperties)); + connection.setUserId(this.removeUserId(instanceProperties)); + connection.setClearPassword(this.removeClearPassword(instanceProperties)); + connection.setEncryptedPassword(this.removeEncryptedPassword(instanceProperties)); + + /* + * Any remaining properties are returned in the extended properties. They are + * assumed to be defined in a subtype. + */ + connection.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); + + if (relationships != null) + { + for (Relationship relationship : relationships) + { + if (relationship != null) + { + if (repositoryHelper.isTypeOf(serviceName, relationship.getType().getTypeDefName(), OpenMetadataType.ASSET_TO_CONNECTION_TYPE_NAME)) + { + connection.setAssetSummary(this.getAssetSummary(instanceProperties)); + } + } + } + } + } + + + /** + * Retrieve the endpoint from an entity. + * + * @param entity entity to trawl for values + * @param methodName calling method + * @return new endpoint object + * @throws PropertyServerException there was a problem unpacking the entity + */ + private Endpoint getEndpoint(EntityDetail entity, + String methodName) throws PropertyServerException + { + Endpoint endpoint = new Endpoint(); + + this.setUpElementHeader(endpoint, entity, OpenMetadataType.ENDPOINT.typeName, methodName); + + /* + * The initial set of values come from the entity. + */ + InstanceProperties instanceProperties = new InstanceProperties(entity.getProperties()); + + endpoint.setQualifiedName(this.removeQualifiedName(instanceProperties)); + endpoint.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); + endpoint.setDisplayName(this.removeName(instanceProperties)); + endpoint.setDescription(this.removeDescription(instanceProperties)); + endpoint.setAddress(this.removeNetworkAddress(instanceProperties)); + endpoint.setProtocol(this.removeProtocol(instanceProperties)); + endpoint.setEncryptionMethod(this.removeEncryptionMethod(instanceProperties)); + + /* + * Any remaining properties are returned in the extended properties. They are + * assumed to be defined in a subtype. + */ + endpoint.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); + + return endpoint; + } + + + /** + * Retrieve the connector type from an entity. + * + * @param entity entity to trawl for values + * @param methodName calling method + * @return new endpoint object + * @throws PropertyServerException there was a problem unpacking the entity + */ + private ConnectorType getConnectorType(EntityDetail entity, + String methodName) throws PropertyServerException + { + ConnectorType connectorType = new ConnectorType(); + + this.setUpElementHeader(connectorType, entity, OpenMetadataType.CONNECTOR_TYPE_TYPE_NAME, methodName); + + /* + * The initial set of values come from the entity. + */ + InstanceProperties instanceProperties = new InstanceProperties(entity.getProperties()); + + connectorType.setQualifiedName(this.removeQualifiedName(instanceProperties)); + connectorType.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); + connectorType.setDisplayName(this.removeDisplayName(instanceProperties)); + connectorType.setDescription(this.removeDescription(instanceProperties)); + connectorType.setSupportedAssetTypeName(this.removeSupportedAssetTypeName(instanceProperties)); + connectorType.setSupportedDeployedImplementationType(this.removeSupportedDeployedImplementationType(instanceProperties)); + connectorType.setExpectedDataFormat(this.removeExpectedDataFormat(instanceProperties)); + connectorType.setConnectorProviderClassName(this.removeConnectorProviderClassName(instanceProperties)); + connectorType.setConnectorFrameworkName(this.removeConnectorFrameworkName(instanceProperties)); + connectorType.setConnectorInterfaceLanguage(this.removeConnectorInterfaceLanguage(instanceProperties)); + connectorType.setConnectorInterfaces(this.removeConnectorInterfaces(instanceProperties)); + connectorType.setTargetTechnologySource(this.removeTargetTechnologySource(instanceProperties)); + connectorType.setTargetTechnologyName(this.removeTargetTechnologyName(instanceProperties)); + connectorType.setTargetTechnologyInterfaces(this.removeTargetTechnologyInterfaces(instanceProperties)); + connectorType.setTargetTechnologyVersions(this.removeTargetTechnologyVersions(instanceProperties)); + connectorType.setRecognizedAdditionalProperties(this.removeRecognizedAdditionalProperties(instanceProperties)); + connectorType.setRecognizedSecuredProperties(this.removeRecognizedSecuredProperties(instanceProperties)); + connectorType.setRecognizedConfigurationProperties(this.removeRecognizedConfigurationProperties(instanceProperties)); + + /* + * Any remaining properties are returned in the extended properties. They are + * assumed to be defined in a subtype. + */ + connectorType.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); + + return connectorType; + } + + + /** + * Extract and delete the permittedSynchronization property from the supplied instance properties. + * + * @param instanceProperties properties from entity + * @return PermittedSynchronization enum + */ + protected PermittedSynchronization removePermittedSynchronization(InstanceProperties instanceProperties) + { + final String methodName = "removePermittedSynchronization"; + + if (instanceProperties != null) + { + int ordinal = repositoryHelper.removeEnumPropertyOrdinal(serviceName, + OpenMetadataProperty.PERMITTED_SYNCHRONIZATION.name, + instanceProperties, + methodName); + + for (PermittedSynchronization permittedSynchronization : PermittedSynchronization.values()) + { + if (permittedSynchronization.getOrdinal() == ordinal) + { + return permittedSynchronization; + } + } + } + + return PermittedSynchronization.BOTH_DIRECTIONS; + } + + + /** + * Extract and delete the portType property from the supplied instance properties. + * + * @param instanceProperties properties from entity + * @return PortType enum + */ + protected PortType removePortType(InstanceProperties instanceProperties) + { + final String methodName = "removePortType"; + + if (instanceProperties != null) + { + int ordinal = repositoryHelper.removeEnumPropertyOrdinal(serviceName, + OpenMetadataType.PORT_TYPE_PROPERTY_NAME, + instanceProperties, + methodName); + + for (PortType portType : PortType.values()) + { + if (portType.getOpenTypeOrdinal() == ordinal) + { + return portType; + } + } + } + + return PortType.OTHER; + } + + /** + * Retrieve the ContactMethodType enum property from the instance properties of an entity + * + * @param properties entity properties + * @return ContactMethodType enum value + */ + protected ContactMethodType getContactMethodTypeFromProperties(InstanceProperties properties) + { + final String methodName = "getContactMethodTypeFromProperties"; + + ContactMethodType contactMethodType = ContactMethodType.OTHER; + + if (properties != null) + { + int ordinal = repositoryHelper.removeEnumPropertyOrdinal(serviceName, OpenMetadataProperty.CONTACT_METHOD_TYPE.name, properties, methodName); + + switch (ordinal) + { + case 0: + contactMethodType = ContactMethodType.EMAIL; + break; + + case 1: + contactMethodType = ContactMethodType.PHONE; + break; + + case 2: + contactMethodType = ContactMethodType.CHAT; + break; + + case 3: + contactMethodType = ContactMethodType.PROFILE; + break; + + case 4: + contactMethodType = ContactMethodType.ACCOUNT; + break; + + case 99: + break; + } + } + + return contactMethodType; + } + +} \ No newline at end of file diff --git a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/OpenMetadataAPIGenericConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/OpenMetadataAPIGenericConverter.java index aeeb10d1a2b..401597eda3e 100644 --- a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/OpenMetadataAPIGenericConverter.java +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/OpenMetadataAPIGenericConverter.java @@ -2,18 +2,17 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.commonservices.generichandlers; +import org.odpi.openmetadata.frameworks.openmetadata.enums.DataItemSortOrder; +import org.odpi.openmetadata.frameworks.openmetadata.enums.KeyPattern; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.*; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.commonservices.generichandlers.ffdc.GenericHandlersErrorCode; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementClassification; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementOrigin; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementOriginCategory; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStatus; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementType; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementVersions; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ElementOriginCategory; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ElementStatus; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Classification; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityProxy; @@ -1075,6 +1074,234 @@ protected ElementOriginCategory getElementOriginCategory(InstanceProvenanceType + /** + * Extract and delete the sortOrder property from the supplied instance properties. + * + * @param instanceProperties properties from entity + * @return DataItemSortOrder enum + */ + public DataItemSortOrder removeSortOrder(InstanceProperties instanceProperties) + { + final String methodName = "removeSortOrder"; + + if (instanceProperties != null) + { + int ordinal = repositoryHelper.removeEnumPropertyOrdinal(serviceName, + OpenMetadataProperty.SORT_ORDER.name, + instanceProperties, + methodName); + + for (DataItemSortOrder dataItemSortOrder : DataItemSortOrder.values()) + { + if (dataItemSortOrder.getOrdinal() == ordinal) + { + return dataItemSortOrder; + } + } + } + + return null; + } + + + /** + * Extract and delete the KeyPattern property from the supplied instance properties. + * + * @param instanceProperties properties from entity + * @return KeyPattern enum + */ + public KeyPattern removeKeyPattern(InstanceProperties instanceProperties) + { + final String methodName = "removeKeyPattern"; + + if (instanceProperties != null) + { + int ordinal = repositoryHelper.removeEnumPropertyOrdinal(serviceName, + OpenMetadataProperty.KEY_PATTERN.name, + instanceProperties, + methodName); + + for (KeyPattern keyPattern : KeyPattern.values()) + { + if (keyPattern.getOrdinal() == ordinal) + { + return keyPattern; + } + } + } + + return null; + } + + + /** + * Set up the properties that can be extracted form the schema type. + * + * @param schemaAttributeEntity entity to unpack + * @param schemaTypeElement schema type properties + * @param properties output column properties + */ + public void setUpSchemaAttribute(EntityDetail schemaAttributeEntity, + SchemaTypeElement schemaTypeElement, + SchemaAttributeProperties properties) + { + /* + * The initial set of values come from the entity. + */ + InstanceProperties instanceProperties = new InstanceProperties(schemaAttributeEntity.getProperties()); + + properties.setQualifiedName(this.removeQualifiedName(instanceProperties)); + properties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); + properties.setDisplayName(this.removeDisplayName(instanceProperties)); + properties.setDescription(this.removeDescription(instanceProperties)); + + properties.setElementPosition(this.removePosition(instanceProperties)); + properties.setMinCardinality(this.removeMinCardinality(instanceProperties)); + properties.setMaxCardinality(this.removeMaxCardinality(instanceProperties)); + properties.setAllowsDuplicateValues(this.removeAllowsDuplicateValues(instanceProperties)); + properties.setOrderedValues(this.removeOrderedValues(instanceProperties)); + properties.setDefaultValueOverride(this.removeDefaultValueOverride(instanceProperties)); + properties.setSortOrder(this.removeSortOrder(instanceProperties)); + properties.setMinimumLength(this.removeMinimumLength(instanceProperties)); + properties.setLength(this.removeLength(instanceProperties)); + properties.setPrecision(this.removePrecision(instanceProperties)); + properties.setSignificantDigits(this.removeSignificantDigits(instanceProperties)); + properties.setIsNullable(this.removeIsNullable(instanceProperties)); + properties.setNativeJavaClass(this.removeNativeClass(instanceProperties)); + properties.setAliases(this.removeAliases(instanceProperties)); + + /* + * Any remaining properties are returned in the extended properties. They are assumed to be defined in a subtype. + */ + properties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); + + if (schemaTypeElement != null) + { + this.addSchemaTypeToAttribute(schemaTypeElement, properties); + } + } + + + /** + * Set up the properties that can be extracted form the schema type. There are two strategies to try. + * The Schema Type Converter in the OCF creates a bean of a specific type to reflect the type of schema. + * The Schema Type Converter in the generic handler always creates a bean of type SchemaTypeProperties with the + * subtype's properties in extendedProperties. + * + * @param schemaTypeElement schema type properties + * @param attributeProperties output column properties + */ + public void addSchemaTypeToAttribute(SchemaTypeElement schemaTypeElement, + SchemaAttributeProperties attributeProperties) + { + SchemaTypeProperties schemaTypeProperties = schemaTypeElement.getSchemaTypeProperties(); + + if (schemaTypeProperties instanceof PrimitiveSchemaTypeProperties) + { + attributeProperties.setDataType(((PrimitiveSchemaTypeProperties) schemaTypeProperties).getDataType()); + attributeProperties.setDefaultValue(((PrimitiveSchemaTypeProperties) schemaTypeProperties).getDefaultValue()); + } + else if (schemaTypeProperties instanceof LiteralSchemaTypeProperties) + { + attributeProperties.setDataType(((LiteralSchemaTypeProperties) schemaTypeProperties).getDataType()); + attributeProperties.setFixedValue(((LiteralSchemaTypeProperties) schemaTypeProperties).getFixedValue()); + } + else if (schemaTypeProperties instanceof EnumSchemaTypeProperties) + { + attributeProperties.setDataType(((EnumSchemaTypeProperties) schemaTypeProperties).getDataType()); + attributeProperties.setDefaultValue(((EnumSchemaTypeProperties) schemaTypeProperties).getDefaultValue()); + attributeProperties.setValidValuesSetGUID(((EnumSchemaTypeProperties) schemaTypeProperties).getValidValueSetGUID()); + } + else if (schemaTypeProperties instanceof ExternalSchemaTypeProperties) + { + SchemaTypeElement externalSchemaType = schemaTypeElement.getExternalSchemaType(); + attributeProperties.setExternalTypeGUID(externalSchemaType.getElementHeader().getGUID()); + } + else + { + /* + * The schema type is unspecialized, so just pull any additional properties out of extended properties. + */ + if (schemaTypeProperties.getExtendedProperties() != null) + { + Map extendedProperties = schemaTypeProperties.getExtendedProperties(); + + Object propertyObject = extendedProperties.get(OpenMetadataProperty.DATA_TYPE.name); + if (propertyObject != null) + { + attributeProperties.setDataType(propertyObject.toString()); + } + + propertyObject = extendedProperties.get(OpenMetadataProperty.FIXED_VALUE.name); + if (propertyObject != null) + { + attributeProperties.setFixedValue(propertyObject.toString()); + } + + propertyObject = extendedProperties.get(OpenMetadataProperty.DEFAULT_VALUE.name); + if (propertyObject != null) + { + attributeProperties.setDefaultValue(propertyObject.toString()); + } + } + } + + attributeProperties.setSchemaType(schemaTypeProperties); + } + + + /** + * Using the supplied instances, return a new instance of a relatedElement bean. This is used for beans that + * contain a combination of the properties from an entity and that of a connected relationship. + * + * @param beanClass name of the class to create + * @param entity entity containing the properties + * @param relationship relationship containing the properties + * @param methodName calling method + * @return bean populated with properties from the instances supplied + * @throws PropertyServerException there is a problem instantiating the bean + */ + public RelatedElement getRelatedElement(Class beanClass, + EntityDetail entity, + Relationship relationship, + String methodName) throws PropertyServerException + { + RelatedElement relatedElement = new RelatedElement(); + + relatedElement.setRelationshipHeader(this.getMetadataElementHeader(beanClass, relationship, null, methodName)); + + if (relationship != null) + { + InstanceProperties instanceProperties = new InstanceProperties(relationship.getProperties()); + + RelationshipProperties relationshipProperties = new RelationshipProperties(); + + relationshipProperties.setEffectiveFrom(instanceProperties.getEffectiveFromTime()); + relationshipProperties.setEffectiveTo(instanceProperties.getEffectiveToTime()); + relationshipProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); + + relatedElement.setRelationshipProperties(relationshipProperties); + } + else + { + handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.RELATIONSHIP_DEF, methodName); + } + + + if (entity != null) + { + ElementStub elementStub = this.getElementStub(beanClass, entity, methodName); + + relatedElement.setRelatedElement(elementStub); + } + else + { + handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); + } + + return relatedElement; + } + /** * Extract the qualifiedName property from the supplied instance properties. @@ -1153,7 +1380,12 @@ protected Map getRemainingExtendedProperties(InstanceProperties { if (instanceProperties != null) { - return repositoryHelper.getInstancePropertiesAsMap(instanceProperties); + Map extendedProperties = repositoryHelper.getInstancePropertiesAsMap(instanceProperties); + + if ((extendedProperties != null) && (! extendedProperties.isEmpty())) + { + return extendedProperties; + } } return null; @@ -1226,6 +1458,28 @@ protected String removeName(InstanceProperties instanceProperties) } + /** + * Extract and delete the name property from the supplied instance properties. + * + * @param instanceProperties properties from entity + * @return string name or null + */ + protected String removeResourceName(InstanceProperties instanceProperties) + { + final String methodName = "removeName"; + + if (instanceProperties != null) + { + return repositoryHelper.removeStringProperty(serviceName, + OpenMetadataProperty.RESOURCE_NAME.name, + instanceProperties, + methodName); + } + + return null; + } + + /** * Extract and delete the version identifier property from the supplied instance properties. * diff --git a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/OpenMetadataAPIRootHandler.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/OpenMetadataAPIRootHandler.java index fb3b6bae611..a9567532008 100644 --- a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/OpenMetadataAPIRootHandler.java +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/OpenMetadataAPIRootHandler.java @@ -8,7 +8,7 @@ import org.odpi.openmetadata.commonservices.repositoryhandler.RepositoryHandler; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementStub; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; import org.odpi.openmetadata.metadatasecurity.server.OpenMetadataServerSecurityVerifier; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityProxy; diff --git a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/PersonRoleConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/PersonRoleConverter.java new file mode 100644 index 00000000000..90eb9f5ff6d --- /dev/null +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/PersonRoleConverter.java @@ -0,0 +1,142 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.generichandlers; + + +import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.PersonRoleElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.PersonRoleProperties; +import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; +import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; + + +import java.lang.reflect.InvocationTargetException; + +/** + * PersonRoleConverter generates a PersonRoleProperties bean from an PersonRoleProperties entity and the relationships connected to it. + */ +public class PersonRoleConverter extends OMFConverter +{ + /** + * Constructor + * + * @param repositoryHelper helper object to parse entity + * @param serviceName name of this component + * @param serverName local server name + */ + public PersonRoleConverter(OMRSRepositoryHelper repositoryHelper, + String serviceName, + String serverName) + { + super(repositoryHelper, serviceName, serverName); + } + + + /** + * Using the supplied entity, return a new instance of the bean. This is used for most beans that have + * a one to one correspondence with the repository instances. + * + * @param beanClass name of the class to create + * @param entity entity containing the properties + * @param methodName calling method + * @return bean populated with properties from the entity supplied + * @throws PropertyServerException there is a problem instantiating the bean + */ + @Override + public B getNewBean(Class beanClass, + EntityDetail entity, + String methodName) throws PropertyServerException + { + try + { + /* + * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. + */ + B returnBean = beanClass.getDeclaredConstructor().newInstance(); + + if (returnBean instanceof PersonRoleElement bean) + { + PersonRoleProperties roleProperties = new PersonRoleProperties(); + + if (entity != null) + { + bean.setElementHeader(this.getMetadataElementHeader(beanClass, entity, methodName)); + + /* + * The initial set of values come from the entity. + */ + InstanceProperties instanceProperties = new InstanceProperties(entity.getProperties()); + + roleProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); + roleProperties.setRoleId(this.removeIdentifier(instanceProperties)); + roleProperties.setTitle(this.removeName(instanceProperties)); + roleProperties.setDescription(this.removeDescription(instanceProperties)); + roleProperties.setScope(this.removeScope(instanceProperties)); + roleProperties.setDomainIdentifier(this.removeDomainIdentifier(instanceProperties)); + roleProperties.setHeadCountLimitSet(instanceProperties.getPropertyValue(OpenMetadataType.HEAD_COUNT_PROPERTY_NAME) != null); + roleProperties.setHeadCount(this.removeHeadCount(instanceProperties)); + + roleProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); + roleProperties.setEffectiveFrom(instanceProperties.getEffectiveFromTime()); + roleProperties.setEffectiveTo(instanceProperties.getEffectiveToTime()); + + + /* + * Any remaining properties are returned in the extended properties. They are + * assumed to be defined in a subtype. + */ + roleProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); + roleProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); + + bean.setProperties(roleProperties); + } + else + { + handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); + } + } + + return returnBean; + } + catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) + { + super.handleInvalidBeanClass(beanClass.getName(), error, methodName); + } + + return null; + } + + + /** + * Using the supplied instances, return a new instance of the bean. This is used for beans that + * contain a combination of the properties from an entity and that of a connected relationship. + * + * @param beanClass name of the class to create + * @param entity entity containing the properties + * @param relationship relationship containing the properties + * @param methodName calling method + * @return bean populated with properties from the instances supplied + * @throws PropertyServerException there is a problem instantiating the bean + */ + @Override + public B getNewBean(Class beanClass, + EntityDetail entity, + Relationship relationship, + String methodName) throws PropertyServerException + { + B returnBean = this.getNewBean(beanClass, entity, methodName); + + if (returnBean instanceof PersonRoleElement bean) + { + + bean.setRelatedElement(super.getRelatedElement(beanClass, entity, relationship, methodName)); + } + + return returnBean; + } +} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/converters/PortConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/PortConverter.java similarity index 94% rename from open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/converters/PortConverter.java rename to open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/PortConverter.java index 8c5d266c4fd..8fe6dae4033 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/converters/PortConverter.java +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/PortConverter.java @@ -1,9 +1,9 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.converters; +package org.odpi.openmetadata.commonservices.generichandlers; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.PortElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.PortProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.PortElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.processes.PortProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; @@ -18,7 +18,7 @@ * PortConverter provides common methods for transferring relevant properties from an Open Metadata Repository Services (OMRS) * EntityDetail object into a bean that includes the PortProperties. */ -public class PortConverter extends ITInfrastructureOMASConverter +public class PortConverter extends OMFConverter { /** * Constructor diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/converters/ProcessCallConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ProcessCallConverter.java similarity index 92% rename from open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/converters/ProcessCallConverter.java rename to open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ProcessCallConverter.java index 4121bb7b42e..bdd99d02066 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/converters/ProcessCallConverter.java +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ProcessCallConverter.java @@ -1,9 +1,10 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.converters; +package org.odpi.openmetadata.commonservices.generichandlers; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.ProcessCallElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.ProcessCallProperties; +import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ProcessCallElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.lineage.ProcessCallProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityProxy; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; @@ -18,7 +19,7 @@ * ProcessCallConverter provides common methods for transferring relevant properties from an Open Metadata Repository Services (OMRS) * Relationship object into a bean that includes the ProcessCallProperties. */ -public class ProcessCallConverter extends ITInfrastructureOMASConverter +public class ProcessCallConverter extends OMFConverter { /** * Constructor diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/converters/ProcessConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ProcessConverter.java similarity index 92% rename from open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/converters/ProcessConverter.java rename to open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ProcessConverter.java index 0f4a0e60cb7..c82d336e41a 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/converters/ProcessConverter.java +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ProcessConverter.java @@ -1,9 +1,9 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.converters; +package org.odpi.openmetadata.commonservices.generichandlers; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.ProcessElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.ProcessProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ProcessElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.processes.ProcessProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; @@ -18,7 +18,7 @@ * ProcessConverter provides common methods for transferring relevant properties from an Open Metadata Repository Services (OMRS) * EntityDetail object into a bean that includes the ProcessProperties. */ -public class ProcessConverter extends ITInfrastructureOMASConverter +public class ProcessConverter extends OMFConverter { /** * Constructor @@ -74,7 +74,7 @@ public B getNewBean(Class beanClass, processProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); processProperties.setName(this.removeName(instanceProperties)); processProperties.setDeployedImplementationType(processProperties.getDeployedImplementationType()); - processProperties.setDescription(this.removeDescription(instanceProperties)); + processProperties.setResourceDescription(this.removeDescription(instanceProperties)); processProperties.setFormula(this.removeFormulaType(instanceProperties)); processProperties.setFormulaType(this.removeFormulaType(instanceProperties)); diff --git a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ProcessHandler.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ProcessHandler.java index 65dbdb03af1..d15ba910d18 100644 --- a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ProcessHandler.java +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ProcessHandler.java @@ -145,7 +145,7 @@ public ProcessHandler(OpenMetadataAPIGenericConverter converter /* ===================================================================================================================== - * A process describes a well defined series of steps that gets something done. + * A process describes a well-defined series of steps that gets something done. */ /** @@ -155,7 +155,8 @@ public ProcessHandler(OpenMetadataAPIGenericConverter converter * @param externalSourceGUID unique identifier of software capability representing the caller * @param externalSourceName unique name of software capability representing the caller * @param qualifiedName unique name for this asset - * @param technicalName the stored name property for the process + * @param name the short name property for the process + * @param resourceName the full name property for the process * @param versionIdentifier the stored version identifier property for the process * @param technicalDescription the stored description property associated with the process * @param deployedImplementationType technology type @@ -181,7 +182,8 @@ public String createProcess(String userId, String externalSourceGUID, String externalSourceName, String qualifiedName, - String technicalName, + String name, + String resourceName, String versionIdentifier, String technicalDescription, String deployedImplementationType, @@ -248,7 +250,8 @@ public String createProcess(String userId, externalSourceGUID, externalSourceName, qualifiedName, - technicalName, + name, + resourceName, versionIdentifier, technicalDescription, deployedImplementationType, @@ -336,7 +339,8 @@ public String createProcessFromTemplate(String userId, * @param processGUIDParameterName unique identifier of the process in the external process manager * @param isMergeUpdate should the new properties be merged with existing properties (true) or completely replace them (false)? * @param qualifiedName unique name for this asset - * @param technicalName the stored name property for the process + * @param name the display name property for the process + * @param resourceName the full name property for the process * @param versionIdentifier version identifier for the process * @param technicalDescription the stored description property associated with the process * @param deployedImplementationType technology type @@ -363,7 +367,8 @@ public void updateProcess(String userId, String processGUIDParameterName, boolean isMergeUpdate, String qualifiedName, - String technicalName, + String name, + String resourceName, String versionIdentifier, String technicalDescription, String deployedImplementationType, @@ -422,7 +427,8 @@ public void updateProcess(String userId, processGUID, processGUIDParameterName, qualifiedName, - technicalName, + name, + resourceName, versionIdentifier, technicalDescription, deployedImplementationType, diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/converters/ProfileConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ProfileConverter.java similarity index 79% rename from open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/converters/ProfileConverter.java rename to open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ProfileConverter.java index af54d816196..dde8e850789 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/converters/ProfileConverter.java +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ProfileConverter.java @@ -1,15 +1,14 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.converters; - -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.ContactMethodElement; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.ProfileElement; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.UserIdentityElement; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.ActorProfileProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.ContactMethodProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.UserIdentityProperties; -import org.odpi.openmetadata.frameworks.openmetadata.enums.ContactMethodType; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; +package org.odpi.openmetadata.commonservices.generichandlers; + +import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ContactMethodElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ProfileElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.UserIdentityElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.ActorProfileProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.ContactMethodProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.UserIdentityProperties; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; @@ -25,7 +24,7 @@ /** * ProfileConverter generates a ProfileElement bean from a ActorProfileProperties entity. */ -public class ProfileConverter extends GovernanceProgramOMASConverter +public class ProfileConverter extends OMFConverter { /** * Constructor @@ -69,9 +68,8 @@ public B getNewComplexBean(Class beanClass, */ B returnBean = beanClass.getDeclaredConstructor().newInstance(); - if (returnBean instanceof ProfileElement) + if (returnBean instanceof ProfileElement bean) { - ProfileElement bean = (ProfileElement) returnBean; ActorProfileProperties profileProperties = new ActorProfileProperties(); if (primaryEntity != null) @@ -187,52 +185,4 @@ else if (repositoryHelper.isTypeOf(serviceName, entityTypeName, OpenMetadataType return null; } - - - /** - * Retrieve the ContactMethodType enum property from the instance properties of an entity - * - * @param properties entity properties - * @return ContactMethodType enum value - */ - private ContactMethodType getContactMethodTypeFromProperties(InstanceProperties properties) - { - final String methodName = "getContactMethodTypeFromProperties"; - - ContactMethodType contactMethodType = ContactMethodType.OTHER; - - if (properties != null) - { - int ordinal = repositoryHelper.removeEnumPropertyOrdinal(serviceName, OpenMetadataProperty.CONTACT_METHOD_TYPE.name, properties, methodName); - - switch (ordinal) - { - case 0: - contactMethodType = ContactMethodType.EMAIL; - break; - - case 1: - contactMethodType = ContactMethodType.PHONE; - break; - - case 2: - contactMethodType = ContactMethodType.CHAT; - break; - - case 3: - contactMethodType = ContactMethodType.PROFILE; - break; - - case 4: - contactMethodType = ContactMethodType.ACCOUNT; - break; - - case 99: - contactMethodType = ContactMethodType.OTHER; - break; - } - } - - return contactMethodType; - } } diff --git a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ProjectConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ProjectConverter.java new file mode 100644 index 00000000000..e37c99ac1fc --- /dev/null +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ProjectConverter.java @@ -0,0 +1,145 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.generichandlers; + +import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; +import org.odpi.openmetadata.frameworks.openmetadata.properties.projects.ProjectProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ProjectElement; +import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; + +import java.lang.reflect.InvocationTargetException; + + +/** + * ProjectConverter generates an ProjectCollectionMember bean from an Project entity + * and a ResourceList relationship to it. + */ +public class ProjectConverter extends OMFConverter +{ + /** + * Constructor + * + * @param repositoryHelper helper object to parse entity + * @param serviceName name of this component + * @param serverName local server name + */ + public ProjectConverter(OMRSRepositoryHelper repositoryHelper, + String serviceName, + String serverName) + { + super(repositoryHelper, serviceName, serverName); + } + + + /** + * Using the supplied instances, return a new instance of the bean. This is used for beans that + * contain a combination of the properties from an entity and that of a connected relationship. + * + * @param beanClass name of the class to create + * @param entity entity containing the properties + * @param methodName calling method + * @return bean populated with properties from the instances supplied + * @throws PropertyServerException there is a problem instantiating the bean + */ + @Override + public B getNewBean(Class beanClass, + EntityDetail entity, + String methodName) throws PropertyServerException + { + return this.getNewBean(beanClass, entity, null, methodName); + } + + + /** + * Using the supplied instances, return a new instance of the bean. This is used for beans that + * contain a combination of the properties from an entity and that of a connected relationship. + * + * @param beanClass name of the class to create + * @param entity entity containing the properties + * @param relationship relationship containing the properties + * @param methodName calling method + * @return bean populated with properties from the instances supplied + * @throws PropertyServerException there is a problem instantiating the bean + */ + @Override + public B getNewBean(Class beanClass, + EntityDetail entity, + Relationship relationship, + String methodName) throws PropertyServerException + { + try + { + /* + * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. + */ + B returnBean = beanClass.getDeclaredConstructor().newInstance(); + + if (returnBean instanceof ProjectElement bean) + { + ProjectProperties projectProperties = new ProjectProperties(); + + InstanceProperties instanceProperties; + + /* + * The initial set of values come from the entity. + */ + if (entity != null) + { + bean.setElementHeader(super.getMetadataElementHeader(beanClass, entity, methodName)); + + /* + * The initial set of values come from the entity. + */ + instanceProperties = new InstanceProperties(entity.getProperties()); + + projectProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); + projectProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); + + projectProperties.setIdentifier(this.removeIdentifier(instanceProperties)); + projectProperties.setName(this.removeName(instanceProperties)); + projectProperties.setDescription(this.removeDescription(instanceProperties)); + projectProperties.setStartDate(this.removeStartDate(instanceProperties)); + projectProperties.setPlannedEndDate(this.removePlannedEndDate(instanceProperties)); + projectProperties.setProjectStatus(this.removeProjectStatus(instanceProperties)); + projectProperties.setProjectHealth(this.removeProjectHealth(instanceProperties)); + projectProperties.setProjectPhase(this.removeProjectPhase(instanceProperties)); + projectProperties.setPriority(this.removeIntPriority(instanceProperties)); + projectProperties.setEffectiveFrom(instanceProperties.getEffectiveFromTime()); + projectProperties.setEffectiveTo(instanceProperties.getEffectiveToTime()); + + /* + * Any remaining properties are returned in the extended properties. They are + * assumed to be defined in a subtype. + */ + projectProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); + projectProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); + + } + else + { + handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); + } + + if (relationship != null) + { + bean.setRelatedElement(super.getRelatedElement(beanClass, entity, relationship, methodName)); + } + + bean.setProperties(projectProperties); + } + + return returnBean; + } + catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) + { + super.handleInvalidBeanClass(beanClass.getName(), error, methodName); + } + + return null; + } +} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/QueryConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/QueryConverter.java similarity index 90% rename from open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/QueryConverter.java rename to open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/QueryConverter.java index e312d6383d9..76f2ecb480d 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/QueryConverter.java +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/QueryConverter.java @@ -1,9 +1,10 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.converters; +package org.odpi.openmetadata.commonservices.generichandlers; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.QueryElement; -import org.odpi.openmetadata.accessservices.datamanager.properties.QueryProperties; +import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.QueryElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.display.QueryProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; @@ -17,7 +18,7 @@ * QueryConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) * EntityDetail object into a Query bean. */ -public class QueryConverter extends DataManagerOMASConverter +public class QueryConverter extends OMFConverter { /** * Constructor @@ -72,8 +73,9 @@ public B getNewBean(Class beanClass, queryProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); queryProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); queryProperties.setName(this.removeName(instanceProperties)); + queryProperties.setResourceName(this.removeResourceName(instanceProperties)); queryProperties.setVersionIdentifier(this.removeVersionIdentifier(instanceProperties)); - queryProperties.setDescription(this.removeDescription(instanceProperties)); + queryProperties.setResourceDescription(this.removeDescription(instanceProperties)); /* * Any remaining properties are returned in the extended properties. They are diff --git a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/RatingConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/RatingConverter.java new file mode 100644 index 00000000000..720044f6695 --- /dev/null +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/RatingConverter.java @@ -0,0 +1,200 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.generichandlers; + +import org.odpi.openmetadata.frameworks.openmetadata.enums.StarRating; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.FeedbackTargetElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.RatingElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.feedback.RatingProperties; +import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; +import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EnumPropertyValue; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstancePropertyValue; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; + +import java.lang.reflect.InvocationTargetException; +import java.util.Map; + + +/** + * RatingConverter provides common methods for transferring relevant properties from an Open Metadata Repository Services (OMRS) + * EntityDetail object into an RatingElement bean. + */ +public class RatingConverter extends OMFConverter +{ + /** + * Constructor + * + * @param repositoryHelper helper object to parse entity + * @param serviceName name of this component + * @param serverName local server name + */ + public RatingConverter(OMRSRepositoryHelper repositoryHelper, + String serviceName, + String serverName) + { + super(repositoryHelper, serviceName, serverName); + } + + + /** + * Using the supplied instances, return a new instance of the bean. This is used for beans that + * contain a combination of the properties from an entity and that of a connected relationship. + * + * @param beanClass name of the class to create + * @param entity entity containing the properties + * @param relationship relationship containing the properties + * @param methodName calling method + * @return bean populated with properties from the instances supplied + * @throws PropertyServerException there is a problem instantiating the bean + */ + @Override + public B getNewBean(Class beanClass, + EntityDetail entity, + Relationship relationship, + String methodName) throws PropertyServerException + { + try + { + /* + * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. + */ + B returnBean = beanClass.getDeclaredConstructor().newInstance(); + + if (returnBean instanceof RatingElement bean) + { + RatingProperties properties = new RatingProperties(); + + bean.setElementHeader(super.getMetadataElementHeader(beanClass, entity, methodName)); + + InstanceProperties instanceProperties; + + /* + * The initial set of values come from the entity. + */ + if (entity != null) + { + instanceProperties = new InstanceProperties(entity.getProperties()); + + properties.setReview(this.removeReview(instanceProperties)); + properties.setStarRating(this.removeStarRatingFromProperties(instanceProperties)); + } + else + { + handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); + } + + bean.setProperties(properties); + + if (relationship != null) + { + FeedbackTargetElement feedbackTargetElement = new FeedbackTargetElement(); + + instanceProperties = new InstanceProperties(relationship.getProperties()); + + feedbackTargetElement.setRelationshipHeader(super.getMetadataElementHeader(beanClass, relationship, null, methodName)); + feedbackTargetElement.setRelatedElement(super.getElementStub(beanClass, relationship.getEntityOneProxy(), methodName)); + feedbackTargetElement.setIsPublic(this.getIsPublic(instanceProperties)); + + bean.setFeedbackTargetElement(feedbackTargetElement); + } + + } + + return returnBean; + } + catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) + { + super.handleInvalidBeanClass(beanClass.getName(), error, methodName); + } + + return null; + } + + + /** + * Using the supplied instances, return a new instance of the bean. This is used for beans that + * contain a combination of the properties from an entity and that of a connected relationship. + * + * @param beanClass name of the class to create + * @param entity entity containing the properties + * @param methodName calling method + * @return bean populated with properties from the instances supplied + * @throws PropertyServerException there is a problem instantiating the bean + */ + @Override + public B getNewBean(Class beanClass, + EntityDetail entity, + String methodName) throws PropertyServerException + { + return getNewBean(beanClass, entity, null, methodName); + } + + + /** + * Retrieve and delete the StarRating enum property from the instance properties of an entity + * + * @param properties entity properties + * @return StarRating enum value + */ + private StarRating removeStarRatingFromProperties(InstanceProperties properties) + { + StarRating starRating = this.getStarRatingFromProperties(properties); + + if (properties != null) + { + Map instancePropertiesMap = properties.getInstanceProperties(); + + if (instancePropertiesMap != null) + { + instancePropertiesMap.remove(OpenMetadataType.STARS_PROPERTY_NAME); + } + + properties.setInstanceProperties(instancePropertiesMap); + } + + return starRating; + } + + + /** + * Retrieve the StarRating enum property from the instance properties of an entity + * + * @param properties entity properties + * @return StarRating enum value + */ + private StarRating getStarRatingFromProperties(InstanceProperties properties) + { + StarRating starRating = StarRating.NOT_RECOMMENDED; + + if (properties != null) + { + Map instancePropertiesMap = properties.getInstanceProperties(); + + if (instancePropertiesMap != null) + { + InstancePropertyValue instancePropertyValue = instancePropertiesMap.get(OpenMetadataType.STARS_PROPERTY_NAME); + + if (instancePropertyValue instanceof EnumPropertyValue enumPropertyValue) + { + starRating = switch (enumPropertyValue.getOrdinal()) + { + case 0 -> StarRating.NOT_RECOMMENDED; + case 1 -> StarRating.ONE_STAR; + case 2 -> StarRating.TWO_STARS; + case 3 -> StarRating.THREE_STARS; + case 4 -> StarRating.FOUR_STARS; + case 99 -> StarRating.FIVE_STARS; + default -> starRating; + }; + } + } + } + + return starRating; + } +} diff --git a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ReferenceValueAssignmentDefinitionConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ReferenceValueAssignmentDefinitionConverter.java new file mode 100644 index 00000000000..f5f456f1765 --- /dev/null +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ReferenceValueAssignmentDefinitionConverter.java @@ -0,0 +1,102 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.generichandlers; + + +import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ReferenceValueAssignmentDefinitionElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ValidValueElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues.ReferenceValueAssignmentProperties; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; + +import java.lang.reflect.InvocationTargetException; + + +/** + * ReferenceValueAssignmentDefinitionConverter provides common methods for transferring relevant properties from an Open Metadata Repository Services + * (OMRS) Relationship and linked EntityDetail object into a bean that inherits from ReferenceValueAssignmentDefinitionElement. + */ +public class ReferenceValueAssignmentDefinitionConverter extends ValidValueConverter +{ + /** + * Constructor + * + * @param repositoryHelper helper object to parse entity + * @param serviceName name of this component + * @param serverName local server name + */ + public ReferenceValueAssignmentDefinitionConverter(OMRSRepositoryHelper repositoryHelper, + String serviceName, + String serverName) + { + super(repositoryHelper, serviceName, serverName); + } + + + /** + * Using the supplied instances, return a new instance of the bean. This is used for beans that + * contain a combination of the properties from an entity and that of a connected relationship. + * + * @param beanClass name of the class to create + * @param entity entity containing the properties + * @param relationship relationship containing the properties + * @param methodName calling method + * @return bean populated with properties from the instances supplied + * @throws PropertyServerException there is a problem instantiating the bean + */ + @Override + public B getNewBean(Class beanClass, + EntityDetail entity, + Relationship relationship, + String methodName) throws PropertyServerException + { + try + { + /* + * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. + */ + B returnBean = beanClass.getDeclaredConstructor().newInstance(); + + if (returnBean instanceof ReferenceValueAssignmentDefinitionElement bean) + { + ValidValueElement definition = new ValidValueElement(); + + super.updateSimpleMetadataElement(beanClass, definition, entity, methodName); + + bean.setValidValueElement(definition); + + if (relationship != null) + { + InstanceProperties instanceProperties = relationship.getProperties(); + + ReferenceValueAssignmentProperties referenceValueAssignmentProperties = new ReferenceValueAssignmentProperties(); + + referenceValueAssignmentProperties.setAttributeName(this.getAttributeName(instanceProperties)); + referenceValueAssignmentProperties.setConfidence(this.getConfidence(instanceProperties)); + referenceValueAssignmentProperties.setSteward(this.getSteward(instanceProperties)); + referenceValueAssignmentProperties.setStewardTypeName(this.getStewardTypeName(instanceProperties)); + referenceValueAssignmentProperties.setStewardPropertyName(this.getStewardPropertyName(instanceProperties)); + referenceValueAssignmentProperties.setNotes(this.getNotes(instanceProperties)); + + bean.setRelationshipProperties(referenceValueAssignmentProperties); + } + else + { + handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.RELATIONSHIP_DEF, methodName); + } + } + + return returnBean; + } + catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) + { + super.handleInvalidBeanClass(beanClass.getName(), error, methodName); + } + + return null; + } +} diff --git a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ReferenceValueAssignmentItemConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ReferenceValueAssignmentItemConverter.java new file mode 100644 index 00000000000..284a3e73334 --- /dev/null +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ReferenceValueAssignmentItemConverter.java @@ -0,0 +1,123 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.generichandlers; + + +import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ReferenceValueAssignmentItemElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ReferenceableElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ReferenceableProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues.ReferenceValueAssignmentProperties; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; + +import java.lang.reflect.InvocationTargetException; + + +/** + * ReferenceValueAssignmentItemConverter provides common methods for transferring relevant properties from an Open Metadata Repository Services (OMRS) + * Relationship and linked EntityDetail object into a bean that inherits from ReferenceValueAssignmentItemElement. + */ +public class ReferenceValueAssignmentItemConverter extends OMFConverter +{ + /** + * Constructor + * + * @param repositoryHelper helper object to parse entity + * @param serviceName name of this component + * @param serverName local server name + */ + public ReferenceValueAssignmentItemConverter(OMRSRepositoryHelper repositoryHelper, + String serviceName, + String serverName) + { + super(repositoryHelper, serviceName, serverName); + } + + + /** + * Using the supplied instances, return a new instance of the bean. This is used for beans that + * contain a combination of the properties from an entity and that of a connected relationship. + * + * @param beanClass name of the class to create + * @param entity entity containing the properties + * @param relationship relationship containing the properties + * @param methodName calling method + * @return bean populated with properties from the instances supplied + * @throws PropertyServerException there is a problem instantiating the bean + */ + @Override + public B getNewBean(Class beanClass, + EntityDetail entity, + Relationship relationship, + String methodName) throws PropertyServerException + { + try + { + /* + * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. + */ + B returnBean = beanClass.getDeclaredConstructor().newInstance(); + + if (returnBean instanceof ReferenceValueAssignmentItemElement bean) + { + ReferenceableElement assignedItem = new ReferenceableElement(); + ReferenceableProperties referenceableProperties = new ReferenceableProperties(); + + if (entity != null) + { + assignedItem.setElementHeader(this.getMetadataElementHeader(beanClass, entity, methodName)); + + /* + * The initial set of values come from the entity. + */ + InstanceProperties instanceProperties = new InstanceProperties(entity.getProperties()); + + referenceableProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); + referenceableProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); + + /* + * Any remaining properties are returned in the extended properties. They are + * assumed to be defined in a subtype. + */ + referenceableProperties.setTypeName(assignedItem.getElementHeader().getType().getTypeName()); + referenceableProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); + + assignedItem.setReferenceableProperties(referenceableProperties); + bean.setAssignedItem(assignedItem); + + if (relationship != null) + { + instanceProperties = relationship.getProperties(); + + ReferenceValueAssignmentProperties referenceValueAssignmentProperties = new ReferenceValueAssignmentProperties(); + + referenceValueAssignmentProperties.setAttributeName(this.getAttributeName(instanceProperties)); + referenceValueAssignmentProperties.setConfidence(this.getConfidence(instanceProperties)); + referenceValueAssignmentProperties.setSteward(this.getSteward(instanceProperties)); + referenceValueAssignmentProperties.setStewardTypeName(this.getStewardTypeName(instanceProperties)); + referenceValueAssignmentProperties.setStewardPropertyName(this.getStewardPropertyName(instanceProperties)); + referenceValueAssignmentProperties.setNotes(this.getNotes(instanceProperties)); + + bean.setRelationshipProperties(referenceValueAssignmentProperties); + } + else + { + handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.RELATIONSHIP_DEF, methodName); + } + } + } + + return returnBean; + } + catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) + { + super.handleInvalidBeanClass(beanClass.getName(), error, methodName); + } + + return null; + } +} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/converters/ReferenceableConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ReferenceableConverter.java similarity index 91% rename from open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/converters/ReferenceableConverter.java rename to open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ReferenceableConverter.java index 6070118212e..198dbe14b22 100644 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/converters/ReferenceableConverter.java +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ReferenceableConverter.java @@ -1,9 +1,9 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.converters; +package org.odpi.openmetadata.commonservices.generichandlers; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.ReferenceableElement; -import org.odpi.openmetadata.accessservices.assetowner.properties.ReferenceableProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ReferenceableElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ReferenceableProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; @@ -18,7 +18,7 @@ * ReferenceableConverter provides common methods for transferring relevant properties from an Open Metadata Repository Services (OMRS) * EntityDetail object into a bean that inherits from ReferenceableProperties. */ -public class ReferenceableConverter extends AssetOwnerOMASConverter +public class ReferenceableConverter extends OMFConverter { /** * Constructor @@ -57,9 +57,8 @@ public B getNewBean(Class beanClass, */ B returnBean = beanClass.getDeclaredConstructor().newInstance(); - if (returnBean instanceof ReferenceableElement) + if (returnBean instanceof ReferenceableElement bean) { - ReferenceableElement bean = (ReferenceableElement)returnBean; ReferenceableProperties referenceableProperties = new ReferenceableProperties(); if (entity != null) diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/converters/RelatedAssetConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/RelatedAssetConverter.java similarity index 89% rename from open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/converters/RelatedAssetConverter.java rename to open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/RelatedAssetConverter.java index bf06cfb2d43..a271773eb2c 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/converters/RelatedAssetConverter.java +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/RelatedAssetConverter.java @@ -1,10 +1,10 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.converters; +package org.odpi.openmetadata.commonservices.generichandlers; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.AssetElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.RelatedAssetElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.AssetProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.AssetElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.RelatedAssetElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.AssetProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; @@ -19,7 +19,7 @@ * RelatedAssetConverter provides common methods for transferring relevant properties from an Open Metadata Repository Services (OMRS) * Relationship and EntityDetail object into a bean that inherits from RelatedAssetElement. */ -public class RelatedAssetConverter extends ITInfrastructureOMASConverter +public class RelatedAssetConverter extends OMFConverter { /** * Constructor @@ -76,7 +76,7 @@ public B getNewBean(Class beanClass, if (entity != null) { - AssetElement assetElement = new AssetElement(); + AssetElement assetElement = new AssetElement(); AssetProperties assetProperties = new AssetProperties(); assetElement.setElementHeader(super.getMetadataElementHeader(beanClass, entity, methodName)); @@ -90,7 +90,7 @@ public B getNewBean(Class beanClass, assetProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); assetProperties.setName(this.removeName(instanceProperties)); assetProperties.setDeployedImplementationType(assetProperties.getDeployedImplementationType()); - assetProperties.setDescription(this.removeDescription(instanceProperties)); + assetProperties.setResourceDescription(this.removeDescription(instanceProperties)); /* * Any remaining properties are returned in the extended properties. They are diff --git a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/RelatedElementConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/RelatedElementConverter.java new file mode 100644 index 00000000000..b2baec03ffc --- /dev/null +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/RelatedElementConverter.java @@ -0,0 +1,64 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.generichandlers; + + +import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; + + +/** + * RelatedElementConverter generates a RelatedElement from a relationship and attached entity + */ +public class RelatedElementConverter extends OMFConverter +{ + /** + * Constructor + * + * @param repositoryHelper helper object to parse entity + * @param serviceName name of this component + * @param serverName local server name + */ + public RelatedElementConverter(OMRSRepositoryHelper repositoryHelper, + String serviceName, + String serverName) + { + super(repositoryHelper, serviceName, serverName); + } + + + + /** + * Using the supplied instances, return a new instance of the bean. This is used for beans that + * contain a combination of the properties from an entity and that of a connected relationship. + * + * @param beanClass name of the class to create + * @param entity entity containing the properties + * @param relationship relationship containing the properties + * @param methodName calling method + * @return bean populated with properties from the instances supplied + * @throws PropertyServerException there is a problem instantiating the bean + */ + @Override + @SuppressWarnings(value = "unchecked") + public B getNewBean(Class beanClass, + EntityDetail entity, + Relationship relationship, + String methodName) throws PropertyServerException + { + try + { + return (B)super.getRelatedElement(beanClass, entity, relationship, methodName); + } + catch (ClassCastException error) + { + super.handleInvalidBeanClass(beanClass.getName(), error, methodName); + } + + return null; + } + + +} diff --git a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/RelationalDataHandler.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/RelationalDataHandler.java index e42ad188f0e..8bdb971f61c 100644 --- a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/RelationalDataHandler.java +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/RelationalDataHandler.java @@ -197,7 +197,8 @@ public RelationalDataHandler(OpenMetadataAPIGenericConverter databaseC * @param databaseManagerGUID unique identifier of software capability representing the DBMS * @param databaseManagerName unique name of software capability representing the DBMS * @param qualifiedName unique name for this database - * @param name the stored name property for the database + * @param name the short name property for the database + * @param resourceName the long name of the database * @param versionIdentifier the stored version property for the database * @param description the stored description property associated with the database * @param pathName the fully qualified physical location of the database @@ -233,6 +234,7 @@ public String createDatabase(String userId, String databaseManagerName, String qualifiedName, String name, + String resourceName, String versionIdentifier, String description, String pathName, @@ -303,6 +305,7 @@ public String createDatabase(String userId, databaseManagerName, qualifiedName, name, + resourceName, versionIdentifier, description, deployedImplementationType, @@ -461,7 +464,8 @@ public String createDatabaseFromTemplate(String userId, * @param databaseManagerName unique name of software capability representing the DBMS * @param databaseGUID unique identifier of the metadata element to update * @param qualifiedName unique name for this database - * @param technicalName the stored name property for the database + * @param name the short name property for the database + * @param resourceName the long name of the database * @param versionIdentifier the stored version identifier for the database * @param description the stored description property associated with the database * @param pathName the fully qualified physical location of the database @@ -496,7 +500,8 @@ public void updateDatabase(String userId, String databaseManagerName, String databaseGUID, String qualifiedName, - String technicalName, + String name, + String resourceName, String versionIdentifier, String description, String pathName, @@ -541,12 +546,6 @@ public void updateDatabase(String userId, assetTypeName = typeName; } - String assetTypeId = invalidParameterHandler.validateTypeName(assetTypeName, - OpenMetadataType.DATABASE.typeName, - serviceName, - methodName, - repositoryHelper); - Map assetExtendedProperties = new HashMap<>(); if (extendedProperties != null) { @@ -567,12 +566,12 @@ public void updateDatabase(String userId, databaseGUID, elementGUIDParameterName, qualifiedName, - technicalName, + name, + resourceName, versionIdentifier, description, deployedImplementationType, additionalProperties, - assetTypeId, assetTypeName, assetExtendedProperties, effectiveFrom, @@ -916,7 +915,6 @@ public List getDatabases(String userId, * @param methodName calling method * * @return list of matching metadata elements - * * @throws InvalidParameterException one of the parameters is invalid * @throws UserNotAuthorizedException the user is not authorized to issue this request * @throws PropertyServerException there is a problem reported in the open metadata server(s) @@ -1057,7 +1055,8 @@ public DATABASE getDatabaseByGUID(String userId, * @param databaseManagerName unique name of software capability representing the DBMS * @param databaseGUID unique identifier of the database where the schema is located * @param qualifiedName unique name for this database schema - * @param technicalName the stored name property for the database schema + * @param name the short name property for the database schema + * @param resourceName the long name of the database schema * @param versionIdentifier versionIdentifier property * @param technicalDescription the stored description property associated with the database schema * @param deployedImplementationType technology type @@ -1083,7 +1082,8 @@ public String createDatabaseSchema(String userId, String databaseManagerName, String databaseGUID, String qualifiedName, - String technicalName, + String name, + String resourceName, String versionIdentifier, String technicalDescription, String deployedImplementationType, @@ -1135,7 +1135,8 @@ public String createDatabaseSchema(String userId, databaseManagerGUID, databaseManagerName, qualifiedName, - technicalName, + name, + resourceName, versionIdentifier, technicalDescription, deployedImplementationType, @@ -1297,7 +1298,8 @@ public String createDatabaseSchemaFromTemplate(String userId, * @param databaseManagerName unique name of software capability representing the DBMS * @param databaseSchemaGUID unique identifier of the metadata element to update * @param qualifiedName unique name for the database schema - * @param technicalName the stored name property for the database schema + * @param name the short name property for the database schema + * @param resourceName the long name of the database schema * @param versionIdentifier the stored versionIdentifier property for the database schema * @param description the stored description property associated with the database schema * @param deployedImplementationType technology type @@ -1322,7 +1324,8 @@ public void updateDatabaseSchema(String userId, String databaseManagerName, String databaseSchemaGUID, String qualifiedName, - String technicalName, + String name, + String resourceName, String versionIdentifier, String description, String deployedImplementationType, @@ -1357,24 +1360,18 @@ public void updateDatabaseSchema(String userId, assetTypeName = typeName; } - String assetTypeId = invalidParameterHandler.validateTypeName(assetTypeName, - OpenMetadataType.DEPLOYED_DATABASE_SCHEMA.typeName, - serviceName, - methodName, - repositoryHelper); - databaseSchemaHandler.updateAsset(userId, databaseManagerGUID, databaseManagerName, databaseSchemaGUID, elementGUIDParameterName, qualifiedName, - technicalName, + name, + resourceName, versionIdentifier, description, deployedImplementationType, additionalProperties, - assetTypeId, assetTypeName, extendedProperties, effectiveFrom, diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/ReportConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ReportConverter.java similarity index 91% rename from open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/ReportConverter.java rename to open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ReportConverter.java index f399bd7357f..d8ecaefed26 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/ReportConverter.java +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ReportConverter.java @@ -1,9 +1,10 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.converters; +package org.odpi.openmetadata.commonservices.generichandlers; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.ReportElement; -import org.odpi.openmetadata.accessservices.datamanager.properties.ReportProperties; +import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ReportElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.display.ReportProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; @@ -17,7 +18,7 @@ * ReportConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) * EntityDetail object into a Report bean. */ -public class ReportConverter extends DataManagerOMASConverter +public class ReportConverter extends OMFConverter { /** * Constructor @@ -72,8 +73,9 @@ public B getNewBean(Class beanClass, reportProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); reportProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); reportProperties.setName(this.removeName(instanceProperties)); + reportProperties.setResourceName(this.removeResourceName(instanceProperties)); reportProperties.setVersionIdentifier(this.removeVersionIdentifier(instanceProperties)); - reportProperties.setDescription(this.removeDescription(instanceProperties)); + reportProperties.setResourceDescription(this.removeDescription(instanceProperties)); reportProperties.setDeployedImplementationType(this.removeDeployedImplementationType(instanceProperties)); reportProperties.setId(this.removeId(instanceProperties)); diff --git a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/SAFConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/SAFConverter.java index 351d6ec6a54..f59064253a5 100644 --- a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/SAFConverter.java +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/SAFConverter.java @@ -21,7 +21,7 @@ * class from within a generic is a little involved. This class provides the generic method for creating * and initializing a Data Manager bean. */ -public abstract class SAFConverter extends OCFConverter +public abstract class SAFConverter extends OMFConverter { /** * Constructor diff --git a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/SchemaAttributeConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/SchemaAttributeConverter.java new file mode 100644 index 00000000000..6faa135af34 --- /dev/null +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/SchemaAttributeConverter.java @@ -0,0 +1,101 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.generichandlers; + +import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.SchemaAttributeElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.SchemaTypeElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.SchemaAttributeProperties; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; + +import java.lang.reflect.InvocationTargetException; +import java.util.List; + +/** + * SchemaAttributeConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) + * EntityDetail object into a SchemaAttributeElement bean. + */ +public class SchemaAttributeConverter extends OMFConverter +{ + /** + * Constructor + * + * @param repositoryHelper helper object to parse entity + * @param serviceName name of this component + * @param serverName local server name + */ + public SchemaAttributeConverter(OMRSRepositoryHelper repositoryHelper, + String serviceName, + String serverName) + { + super(repositoryHelper, serviceName, serverName); + } + + + /** + * Extract the properties from the schema attribute entity. Each API creates a specialization of this method for its beans. + * + * @param beanClass name of the class to create + * @param schemaAttributeEntity entity containing the properties for the main schema attribute + * @param typeClass name of type used to describe the schema type + * @param schemaType bean containing the properties of the schema type - this is filled out by the schema type converter + * @param schemaAttributeRelationships relationships containing the links to other schema attributes + * @param methodName calling method + * @param bean type used to create the schema type + * @return bean populated with properties from the instances supplied + * @throws PropertyServerException there is a problem instantiating the bean + */ + @Override + public B getNewSchemaAttributeBean(Class beanClass, + EntityDetail schemaAttributeEntity, + Class typeClass, + T schemaType, + List schemaAttributeRelationships, + String methodName) throws PropertyServerException + { + try + { + /* + * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. + */ + B returnBean = beanClass.getDeclaredConstructor().newInstance(); + if (returnBean instanceof SchemaAttributeElement bean) + { + SchemaAttributeProperties properties = new SchemaAttributeProperties(); + + if (schemaAttributeEntity != null) + { + SchemaTypeElement schemaTypeElement = null; + + if (schemaType instanceof SchemaTypeElement) + { + schemaTypeElement = (SchemaTypeElement) schemaType; + } + + bean.setElementHeader(this.getMetadataElementHeader(beanClass, schemaAttributeEntity, methodName)); + super.setUpSchemaAttribute(schemaAttributeEntity, schemaTypeElement, properties); + + properties.setTypeName(bean.getElementHeader().getType().getTypeName()); + + bean.setSchemaAttributeProperties(properties); + bean.setSchemaTypeElement(schemaTypeElement); + } + else + { + handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); + } + } + + return returnBean; + } + catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) + { + super.handleInvalidBeanClass(beanClass.getName(), error, methodName); + } + + return null; + } +} diff --git a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/SchemaTypeConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/SchemaTypeConverter.java new file mode 100644 index 00000000000..9d265f8919a --- /dev/null +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/SchemaTypeConverter.java @@ -0,0 +1,196 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.generichandlers; + +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.DerivedSchemaTypeQueryTargetProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.SchemaTypeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; +import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.*; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; + +import java.lang.reflect.InvocationTargetException; +import java.util.ArrayList; +import java.util.List; + + +/** + * SchemaTypeConverter provides common methods for transferring relevant properties from an Open Metadata Repository Services (OMRS) + * EntityDetail object into a SchemaTypeElement bean. + */ +public class SchemaTypeConverter extends OMFConverter +{ + /** + * Constructor + * + * @param repositoryHelper helper object to parse entity + * @param serviceName name of this component + * @param serverName local server name + */ + public SchemaTypeConverter(OMRSRepositoryHelper repositoryHelper, + String serviceName, + String serverName) + { + super(repositoryHelper, serviceName, serverName); + } + + + /** + * Return the converted bean. This is a special method used for schema types since they are stored + * as a collection of instances. For external schema types and map elements, both the GUID and the bean are returned to + * allow the consuming OMAS to choose whether it is returning GUIDs of the linked to schema or the schema type bean itself. + * + * @param beanClass name of the class to create + * @param schemaRootHeader header of the schema element that holds the root information + * @param schemaTypeTypeName name of type of the schema type to create + * @param schemaRootProperties properties describing the schema type + * @param schemaRootClassifications classifications from the schema root entity + * @param attributeCount number of attributes (for a complex schema type) + * @param validValueSetGUID unique identifier of the set of valid values (for an enum schema type) + * @param externalSchemaTypeGUID unique identifier of the external schema type + * @param externalSchemaType unique identifier for the properties of the schema type that is shared by multiple attributes/assets + * @param mapFromSchemaTypeGUID unique identifier of the mapFrom schema type + * @param mapFromSchemaType bean containing the properties of the schema type that is part of a map definition + * @param mapToSchemaTypeGUID unique identifier of the mapTo schema type + * @param mapToSchemaType bean containing the properties of the schema type that is part of a map definition + * @param schemaTypeOptionGUIDs list of unique identifiers for schema types that could be the type for this attribute + * @param schemaTypeOptions list of schema types that could be the type for this attribute + * @param queryTargetRelationships list of relationships to schema types that contain data values used to derive the schema type value(s) + * @param methodName calling method + * @return bean populated with properties from the instances supplied + * @throws PropertyServerException there is a problem instantiating the bean + */ + @Override + public B getNewSchemaTypeBean(Class beanClass, + InstanceHeader schemaRootHeader, + String schemaTypeTypeName, + InstanceProperties schemaRootProperties, + List schemaRootClassifications, + int attributeCount, + String validValueSetGUID, + String externalSchemaTypeGUID, + B externalSchemaType, + String mapFromSchemaTypeGUID, + B mapFromSchemaType, + String mapToSchemaTypeGUID, + B mapToSchemaType, + List schemaTypeOptionGUIDs, + List schemaTypeOptions, + List queryTargetRelationships, + String methodName) throws PropertyServerException + { + try + { + /* + * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. + */ + B returnBean = beanClass.getDeclaredConstructor().newInstance(); + + if (returnBean instanceof SchemaTypeElement) + { + if ((schemaRootHeader != null) && (schemaRootProperties != null)) + { + SchemaTypeElement bean = (SchemaTypeElement)returnBean; + + bean.setElementHeader(this.getMetadataElementHeader(beanClass, schemaRootHeader, schemaRootClassifications, methodName)); + + /* + * Set up schema properties to create. + */ + InstanceProperties instanceProperties = new InstanceProperties(schemaRootProperties); + SchemaTypeProperties schemaTypeProperties = new SchemaTypeProperties(); + + schemaTypeProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); + schemaTypeProperties.setDisplayName(this.removeDisplayName(instanceProperties)); + schemaTypeProperties.setDescription(this.removeDescription(instanceProperties)); + schemaTypeProperties.setIsDeprecated(this.removeIsDeprecated(instanceProperties)); + schemaTypeProperties.setVersionNumber(this.removeVersionNumber(instanceProperties)); + schemaTypeProperties.setAuthor(this.removeAuthor(instanceProperties)); + schemaTypeProperties.setUsage(this.removeUsage(instanceProperties)); + schemaTypeProperties.setEncodingStandard(this.removeEncodingStandard(instanceProperties)); + schemaTypeProperties.setNamespace(this.removeNamespace(instanceProperties)); + schemaTypeProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); + + /* + * Any remaining properties are returned in the extended properties. They are + * assumed to be defined in a subtype. + */ + schemaTypeProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); + + bean.setSchemaTypeProperties(schemaTypeProperties); + + bean.setAttributeCount(attributeCount); + bean.setMapFromElement((SchemaTypeElement)mapFromSchemaType); + bean.setMapToElement((SchemaTypeElement)mapToSchemaType); + bean.setExternalSchemaType((SchemaTypeElement)externalSchemaType); + + if ((schemaTypeOptions != null) && (! schemaTypeOptions.isEmpty())) + { + List schemaTypeOptionBeans = new ArrayList<>(); + + for (B optionBean : schemaTypeOptions) + { + if (optionBean != null) + { + schemaTypeOptionBeans.add((SchemaTypeElement) optionBean); + } + } + + if (! schemaTypeOptionBeans.isEmpty()) + { + bean.setSchemaOptions(schemaTypeOptionBeans); + } + } + + InstanceProperties classificationProperties = + super.getClassificationProperties(OpenMetadataType.CALCULATED_VALUE_CLASSIFICATION_TYPE_NAME, + schemaRootClassifications); + + bean.setFormula(this.getFormula(classificationProperties)); + bean.setFormulaType(this.getFormulaType(classificationProperties)); + + if (queryTargetRelationships != null) + { + List queryTargets = new ArrayList<>(); + + for (Relationship relationship : queryTargetRelationships) + { + if ((relationship != null) && (relationship.getEntityTwoProxy() != null)) + { + DerivedSchemaTypeQueryTargetProperties queryTargetProperties = new DerivedSchemaTypeQueryTargetProperties(); + + queryTargetProperties.setQueryId(this.getQueryId(relationship.getProperties())); + queryTargetProperties.setQuery(this.getQuery(relationship.getProperties())); + queryTargetProperties.setQueryTargetGUID(relationship.getEntityTwoProxy().getGUID()); + + queryTargets.add(queryTargetProperties); + } + else + { + handleBadRelationship(beanClass.getName(), relationship, methodName); + } + } + if (! queryTargets.isEmpty()) + { + bean.setQueries(queryTargets); + } + } + + return returnBean; + } + else + { + handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); + } + } + } + catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) + { + super.handleInvalidBeanClass(beanClass.getName(), error, methodName); + } + + return null; + } +} diff --git a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/SecurityGroupConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/SecurityGroupConverter.java new file mode 100644 index 00000000000..cbcf92bfda5 --- /dev/null +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/SecurityGroupConverter.java @@ -0,0 +1,145 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.generichandlers; + +import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; +import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.SecurityGroupElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.security.SecurityGroupProperties; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; + +import java.lang.reflect.InvocationTargetException; +import java.util.List; + + +/** + * GovernanceDefinitionConverter provides common methods for transferring relevant properties from an Open Metadata Repository Services (OMRS) + * EntityDetail object into a bean that inherits from GovernanceDefinition. + */ +public class SecurityGroupConverter extends OMFConverter +{ + /** + * Constructor + * + * @param repositoryHelper helper object to parse entity + * @param serviceName name of this component + * @param serverName local server name + */ + public SecurityGroupConverter(OMRSRepositoryHelper repositoryHelper, + String serviceName, + String serverName) + { + super(repositoryHelper, serviceName, serverName); + } + + + /** + * Using the supplied instances, return a new instance of the bean. It is used for beans such as + * an Annotation or DataField bean which combine knowledge from the entity and its linked relationships. + * + * @param beanClass name of the class to create + * @param primaryEntity entity that is the root of the collection of entities that make up the + * content of the bean + * @param relationships relationships linking the entities + * @param methodName calling method + * @return bean populated with properties from the instances supplied + * @throws PropertyServerException there is a problem instantiating the bean + */ + @SuppressWarnings(value = "unused") + @Override + public B getNewComplexBean(Class beanClass, + EntityDetail primaryEntity, + List relationships, + String methodName) throws PropertyServerException + { + try + { + /* + * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. + */ + B returnBean = beanClass.getDeclaredConstructor().newInstance(); + + if (returnBean instanceof SecurityGroupElement bean) + { + + if (primaryEntity != null) + { + bean.setElementHeader(this.getMetadataElementHeader(beanClass, primaryEntity, methodName)); + + /* + * The initial set of values come from the entity. + */ + InstanceProperties instanceProperties = new InstanceProperties(primaryEntity.getProperties()); + + String typeName = primaryEntity.getType().getTypeDefName(); + SecurityGroupProperties securityGroupProperties = new SecurityGroupProperties(); + + securityGroupProperties.setDocumentIdentifier(this.removeQualifiedName(instanceProperties)); + securityGroupProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); + securityGroupProperties.setTitle(this.removeTitle(instanceProperties)); + securityGroupProperties.setScope(this.removeScope(instanceProperties)); + securityGroupProperties.setDomainIdentifier(this.removeDomainIdentifier(instanceProperties)); + securityGroupProperties.setPriority(this.removePriority(instanceProperties)); + securityGroupProperties.setOutcomes(this.removeOutcomes(instanceProperties)); + securityGroupProperties.setResults(this.removeResults(instanceProperties)); + securityGroupProperties.setDistinguishedName(this.removeDistinguishedName(instanceProperties)); + + /* + * Any remaining properties are returned in the extended properties. They are + * assumed to be defined in a subtype. + */ + securityGroupProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); + securityGroupProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); + + bean.setProperties(securityGroupProperties); + } + else + { + handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); + } + } + + return returnBean; + } + catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) + { + super.handleInvalidBeanClass(beanClass.getName(), error, methodName); + } + + return null; + } + + + /** + * Using the supplied instances, return a new instance of the bean. This is used for beans that + * contain a combination of the properties from an entity and that of a connected relationship. + * + * @param beanClass name of the class to create + * @param entity entity containing the properties + * @param relationship relationship containing the properties + * @param methodName calling method + * @return bean populated with properties from the instances supplied + * @throws PropertyServerException there is a problem instantiating the bean + */ + @Override + public B getNewBean(Class beanClass, + EntityDetail entity, + Relationship relationship, + String methodName) throws PropertyServerException + { + B returnBean = this.getNewBean(beanClass, entity, methodName); + + if (returnBean instanceof SecurityGroupElement) + { + SecurityGroupElement bean = (SecurityGroupElement) returnBean; + + bean.setRelatedElement(super.getRelatedElement(beanClass, entity, relationship, methodName)); + } + + return returnBean; + } +} diff --git a/open-metadata-implementation/access-services/security-manager/security-manager-server/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/converters/SecurityManagerConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/SecurityManagerConverter.java similarity index 91% rename from open-metadata-implementation/access-services/security-manager/security-manager-server/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/converters/SecurityManagerConverter.java rename to open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/SecurityManagerConverter.java index 5cd47ffdf0c..067a36e7295 100644 --- a/open-metadata-implementation/access-services/security-manager/security-manager-server/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/converters/SecurityManagerConverter.java +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/SecurityManagerConverter.java @@ -1,9 +1,9 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.securitymanager.converters; +package org.odpi.openmetadata.commonservices.generichandlers; -import org.odpi.openmetadata.accessservices.securitymanager.metadataelements.SecurityManagerElement; -import org.odpi.openmetadata.accessservices.securitymanager.properties.SecurityManagerProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.SecurityManagerElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities.SecurityManagerProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; @@ -17,7 +17,7 @@ * SecurityManagerConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) * EntityDetail object into a SecurityManagerElement bean. */ -public class SecurityManagerConverter extends SecurityManagerOMASConverter +public class SecurityManagerConverter extends OMFConverter { /** * Constructor @@ -56,9 +56,8 @@ public B getNewBean(Class beanClass, */ B returnBean = beanClass.getDeclaredConstructor().newInstance(); - if (returnBean instanceof SecurityManagerElement) + if (returnBean instanceof SecurityManagerElement bean) { - SecurityManagerElement bean = (SecurityManagerElement) returnBean; SecurityManagerProperties securityManagerProperties = new SecurityManagerProperties(); if (entity != null) diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/converters/SoftwareCapabilityConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/SoftwareCapabilityConverter.java similarity index 90% rename from open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/converters/SoftwareCapabilityConverter.java rename to open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/SoftwareCapabilityConverter.java index 37950dd8c27..97cd02d8a61 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-server/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/converters/SoftwareCapabilityConverter.java +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/SoftwareCapabilityConverter.java @@ -1,9 +1,9 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.converters; +package org.odpi.openmetadata.commonservices.generichandlers; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.SoftwareCapabilityElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.SoftwareCapabilityProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.SoftwareCapabilityElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities.SoftwareCapabilityProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; @@ -17,7 +17,7 @@ * SoftwareCapabilityConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) * EntityDetail object into a SoftwareCapabilityElement bean. */ -public class SoftwareCapabilityConverter extends ITInfrastructureOMASConverter +public class SoftwareCapabilityConverter extends OMFConverter { /** * Constructor @@ -71,8 +71,8 @@ public B getNewBean(Class beanClass, capabilityProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); capabilityProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); - capabilityProperties.setDisplayName(this.removeName(instanceProperties)); - capabilityProperties.setDescription(this.removeDescription(instanceProperties)); + capabilityProperties.setResourceName(this.removeName(instanceProperties)); + capabilityProperties.setResourceDescription(this.removeDescription(instanceProperties)); capabilityProperties.setDeployedImplementationType(this.removeCapabilityType(instanceProperties)); capabilityProperties.setVersion(this.removeCapabilityVersion(instanceProperties)); capabilityProperties.setPatchLevel(this.removePatchLevel(instanceProperties)); diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/converters/SubjectAreaConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/SubjectAreaConverter.java similarity index 92% rename from open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/converters/SubjectAreaConverter.java rename to open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/SubjectAreaConverter.java index 8646f5a8482..944a29d35a0 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-server/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/converters/SubjectAreaConverter.java +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/SubjectAreaConverter.java @@ -1,11 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.converters; +package org.odpi.openmetadata.commonservices.generichandlers; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.SubjectAreaElement; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.SubjectAreaProperties; +import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.SubjectAreaElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.SubjectAreaProperties; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; @@ -19,7 +20,7 @@ * SubjectAreaConverter provides common methods for transferring relevant properties from an Open Metadata Repository Services (OMRS) * EntityDetail object into a bean that inherits from SubjectAreaElement. */ -public class SubjectAreaConverter extends GovernanceProgramOMASConverter +public class SubjectAreaConverter extends OMFConverter { /** * Constructor @@ -58,10 +59,8 @@ public B getNewBean(Class beanClass, */ B returnBean = beanClass.getDeclaredConstructor().newInstance(); - if (returnBean instanceof SubjectAreaElement) + if (returnBean instanceof SubjectAreaElement bean) { - SubjectAreaElement bean = (SubjectAreaElement) returnBean; - if (entity != null) { bean.setElementHeader(this.getMetadataElementHeader(beanClass, entity, entity.getClassifications(), methodName)); diff --git a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/SurveyReportConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/SurveyReportConverter.java new file mode 100644 index 00000000000..7eb4e000ab0 --- /dev/null +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/SurveyReportConverter.java @@ -0,0 +1,132 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.generichandlers; + +import org.odpi.openmetadata.commonservices.generichandlers.SAFConverter; +import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; +import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; +import org.odpi.openmetadata.frameworks.surveyaction.properties.SurveyReport; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.*; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; + +import java.lang.reflect.InvocationTargetException; +import java.util.List; + + + +/** + * SurveyReportConverter transfers the relevant properties from some Open Metadata Repository Services (OMRS) + * EntityDetail object into an SurveyReport bean. + */ +public class SurveyReportConverter extends SAFConverter +{ + /** + * Constructor + * + * @param repositoryHelper helper object to parse entity/relationship objects + * @param serviceName name of this component + * @param serverName local server name + */ + public SurveyReportConverter(OMRSRepositoryHelper repositoryHelper, + String serviceName, + String serverName) + { + super(repositoryHelper, serviceName, serverName); + } + + + /** + * Using the supplied instances, return a new instance of the bean. It is used for beans such as + * a connection bean which made up of 3 entities (Connection, ConnectorType and Endpoint) plus the + * relationships between them. The relationships may be omitted if they do not have an properties. + * + * @param beanClass name of the class to create + * @param primaryEntity entity that is the root of the collection of entities that make up the + * content of the bean + * @param supplementaryEntities entities connected to the primary entity by the relationships + * @param relationships relationships linking the entities + * @param methodName calling method + * @return bean populated with properties from the instances supplied + * @throws PropertyServerException there is a problem instantiating the bean + */ + @Override + public B getNewComplexBean(Class beanClass, + EntityDetail primaryEntity, + List supplementaryEntities, + List relationships, + String methodName) throws PropertyServerException + { + try + { + /* + * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. + */ + B returnBean = beanClass.getDeclaredConstructor().newInstance(); + + if (returnBean instanceof SurveyReport bean) + { + /* + * Check that the entity is of the correct type. + */ + bean.setElementHeader(this.getMetadataElementHeader(beanClass, primaryEntity, methodName)); + + /* + * The initial set of values come from the entity properties. The super class properties are removed from a copy of the entities + * properties, leaving any subclass properties to be stored in extended properties. + */ + InstanceProperties instanceProperties = new InstanceProperties(primaryEntity.getProperties()); + + bean.setQualifiedName(this.removeQualifiedName(instanceProperties)); + bean.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); + + bean.setDisplayName(this.removeDisplayName(instanceProperties)); + bean.setDescription(this.removeDescription(instanceProperties)); + bean.setStartDate(this.removeExecutionDate(instanceProperties)); + bean.setAnalysisParameters(this.removeAnalysisParameters(instanceProperties)); + bean.setAnalysisStep(this.removeAnalysisStep(instanceProperties)); + + /* + * Any remaining properties are returned in the extended properties. They are + * assumed to be defined in a subtype. + */ + bean.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); + + if (relationships != null) + { + for (Relationship relationship : relationships) + { + if ((relationship != null) && (relationship.getType() != null) && (relationship.getType().getTypeDefName() != null)) + { + if (repositoryHelper.isTypeOf(serviceName, relationship.getType().getTypeDefName(), OpenMetadataType.REPORT_TO_ASSET_TYPE_NAME)) + { + EntityProxy endOne = relationship.getEntityOneProxy(); + + if (endOne != null) + { + bean.setAssetGUID(endOne.getGUID()); + } + } + else if (repositoryHelper.isTypeOf(serviceName, relationship.getType().getTypeDefName(), OpenMetadataType.ENGINE_ACTION_SURVEY_REPORT_RELATIONSHIP.typeName)) + { + EntityProxy endOne = relationship.getEntityOneProxy(); + + if (endOne != null) + { + bean.setEngineActionGUID(endOne.getGUID()); + } + } + } + } + } + } + + return returnBean; + } + catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) + { + super.handleInvalidBeanClass(beanClass.getName(), error, methodName); + } + + return null; + } +} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/TabularColumnConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/TabularColumnConverter.java similarity index 90% rename from open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/TabularColumnConverter.java rename to open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/TabularColumnConverter.java index f7553ec7212..2d7ddd7c644 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/TabularColumnConverter.java +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/TabularColumnConverter.java @@ -1,10 +1,11 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.converters; +package org.odpi.openmetadata.commonservices.generichandlers; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.SchemaTypeElement; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.TabularColumnElement; -import org.odpi.openmetadata.accessservices.datamanager.properties.TabularColumnProperties; +import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.SchemaTypeElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.TabularColumnElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.tabular.TabularColumnProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; @@ -18,7 +19,7 @@ * TabularColumnConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) * EntityDetail object into a TabularColumnElement bean. */ -public class TabularColumnConverter extends DataManagerOMASConverter +public class TabularColumnConverter extends OMFConverter { /** * Constructor diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/TopicConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/TopicConverter.java similarity index 90% rename from open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/TopicConverter.java rename to open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/TopicConverter.java index b39c02e7d93..32f414754d3 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/TopicConverter.java +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/TopicConverter.java @@ -1,9 +1,10 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.converters; +package org.odpi.openmetadata.commonservices.generichandlers; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.TopicElement; -import org.odpi.openmetadata.accessservices.datamanager.properties.TopicProperties; +import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.TopicElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.topics.TopicProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; @@ -17,7 +18,7 @@ * TopicConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) * EntityDetail object into a TopicElement bean. */ -public class TopicConverter extends DataManagerOMASConverter +public class TopicConverter extends OMFConverter { /** * Constructor @@ -72,8 +73,9 @@ public B getNewBean(Class beanClass, topicProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); topicProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); topicProperties.setName(this.removeName(instanceProperties)); + topicProperties.setResourceName(this.removeResourceName(instanceProperties)); topicProperties.setVersionIdentifier(this.removeVersionIdentifier(instanceProperties)); - topicProperties.setDescription(this.removeDescription(instanceProperties)); + topicProperties.setResourceDescription(this.removeDescription(instanceProperties)); topicProperties.setDeployedImplementationType(this.removeDeployedImplementationType(instanceProperties)); topicProperties.setTopicType(this.removeTopicType(instanceProperties)); topicProperties.setTopicName(this.removeTopicName(instanceProperties)); diff --git a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/UserIdentityConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/UserIdentityConverter.java new file mode 100644 index 00000000000..dc813b79d0a --- /dev/null +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/UserIdentityConverter.java @@ -0,0 +1,124 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.generichandlers; + + +import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.UserIdentityElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.UserIdentityProperties; +import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; + +import java.lang.reflect.InvocationTargetException; + + +/** + * UserIdentityConverter generates an UserIdentityElement bean from an UserIdentity entity. + */ +public class UserIdentityConverter extends OMFConverter +{ + /** + * Constructor + * + * @param repositoryHelper helper object to parse entity + * @param serviceName name of this component + * @param serverName local server name + */ + public UserIdentityConverter(OMRSRepositoryHelper repositoryHelper, + String serviceName, + String serverName) + { + super(repositoryHelper, serviceName, serverName); + } + + + /** + * Using the supplied instances, return a new instance of the bean. This is used for beans that + * contain a combination of the properties from an entity and that of a connected relationship. + * + * @param beanClass name of the class to create + * @param entity entity containing the properties + * @param methodName calling method + * @return bean populated with properties from the instances supplied + * @throws PropertyServerException there is a problem instantiating the bean + */ + @Override + public B getNewBean(Class beanClass, + EntityDetail entity, + String methodName) throws PropertyServerException + { + try + { + /* + * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. + */ + B returnBean = beanClass.getDeclaredConstructor().newInstance(); + + if (returnBean instanceof UserIdentityElement bean) + { + UserIdentityProperties properties = new UserIdentityProperties(); + + if (entity != null) + { + bean.setElementHeader(this.getMetadataElementHeader(beanClass, entity, methodName)); + + /* + * The initial set of values come from the entity. + */ + InstanceProperties instanceProperties = new InstanceProperties(entity.getProperties()); + + properties.setQualifiedName(this.removeQualifiedName(instanceProperties)); + properties.setUserId(this.removeUserId(instanceProperties)); + properties.setDistinguishedName(this.removeDistinguishedName(instanceProperties)); + properties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); + + /* + * Any remaining properties are returned in the extended properties. They are + * assumed to be defined in a subtype. + */ + properties.setTypeName(bean.getElementHeader().getType().getTypeName()); + properties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); + + bean.setProperties(properties); + } + else + { + handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); + } + } + + return returnBean; + } + catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) + { + super.handleInvalidBeanClass(beanClass.getName(), error, methodName); + } + + return null; + } + + + /** + * Using the supplied instances, return a new instance of the bean. This is used for beans that + * contain a combination of the properties from an entity and that of a connected relationship. + * + * @param beanClass name of the class to create + * @param entity entity containing the properties + * @param relationship relationship containing the properties + * @param methodName calling method + * @return bean populated with properties from the instances supplied + * @throws PropertyServerException there is a problem instantiating the bean + */ + @Override + public B getNewBean(Class beanClass, + EntityDetail entity, + Relationship relationship, + String methodName) throws PropertyServerException + { + return getNewBean(beanClass, entity, methodName); + } +} diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/converters/ValidValueAssignmentConsumerConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ValidValueAssignmentConsumerConverter.java similarity index 85% rename from open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/converters/ValidValueAssignmentConsumerConverter.java rename to open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ValidValueAssignmentConsumerConverter.java index 7eaa972fbed..c107fbdd06a 100644 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/converters/ValidValueAssignmentConsumerConverter.java +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ValidValueAssignmentConsumerConverter.java @@ -1,12 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalarchitecture.converters; +package org.odpi.openmetadata.commonservices.generichandlers; -import org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements.MetadataElement; -import org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements.ReferenceableElement; -import org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements.ValidValueAssignmentConsumerElement; -import org.odpi.openmetadata.accessservices.digitalarchitecture.properties.ReferenceableProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.MetadataElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ReferenceableElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ValidValueAssignmentConsumerElement; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ReferenceableProperties; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; @@ -20,7 +20,7 @@ * ValidValueAssignmentConsumerConverter provides common methods for transferring relevant properties from an Open Metadata Repository Services (OMRS) * Relationship and linked EntityDetail object into a bean that inherits from ValidValueAssignmentConsumerElement. */ -public class ValidValueAssignmentConsumerConverter extends DigitalArchitectureOMASConverter +public class ValidValueAssignmentConsumerConverter extends OMFConverter { /** * Constructor @@ -62,11 +62,10 @@ public B getNewBean(Class beanClass, */ B returnBean = beanClass.getDeclaredConstructor().newInstance(); - if (returnBean instanceof ValidValueAssignmentConsumerElement) + if (returnBean instanceof ValidValueAssignmentConsumerElement bean) { - ValidValueAssignmentConsumerElement bean = (ValidValueAssignmentConsumerElement) returnBean; - ReferenceableElement consumer = new ReferenceableElement(); - ReferenceableProperties referenceableProperties = new ReferenceableProperties(); + ReferenceableElement consumer = new ReferenceableElement(); + ReferenceableProperties referenceableProperties = new ReferenceableProperties(); consumer.setElementHeader(this.getMetadataElementHeader(beanClass, entity, methodName)); diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/converters/ValidValueAssignmentDefinitionConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ValidValueAssignmentDefinitionConverter.java similarity index 88% rename from open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/converters/ValidValueAssignmentDefinitionConverter.java rename to open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ValidValueAssignmentDefinitionConverter.java index 3d6abfa57c5..93216c46753 100644 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/converters/ValidValueAssignmentDefinitionConverter.java +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ValidValueAssignmentDefinitionConverter.java @@ -1,10 +1,10 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalarchitecture.converters; +package org.odpi.openmetadata.commonservices.generichandlers; -import org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements.*; -import org.odpi.openmetadata.accessservices.digitalarchitecture.properties.ValidValueProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ValidValueAssignmentDefinitionElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ValidValueElement; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; @@ -59,10 +59,9 @@ public B getNewBean(Class beanClass, */ B returnBean = beanClass.getDeclaredConstructor().newInstance(); - if (returnBean instanceof ValidValueAssignmentDefinitionElement) + if (returnBean instanceof ValidValueAssignmentDefinitionElement bean) { - ValidValueAssignmentDefinitionElement bean = (ValidValueAssignmentDefinitionElement) returnBean; - ValidValueElement definition = new ValidValueElement(); + ValidValueElement definition = new ValidValueElement(); super.updateSimpleMetadataElement(beanClass, definition, entity, methodName); diff --git a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ValidValueConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ValidValueConverter.java new file mode 100644 index 00000000000..bde179b18b0 --- /dev/null +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ValidValueConverter.java @@ -0,0 +1,177 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.commonservices.generichandlers; + +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ValidValueElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues.ValidValueProperties; +import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; +import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; + +import java.lang.reflect.InvocationTargetException; + + +/** + * ValidValueConverter provides common methods for transferring relevant properties from an Open Metadata Repository Services (OMRS) + * EntityDetail object into a bean that inherits from ValidValueElement. + */ +public class ValidValueConverter extends OMFConverter +{ + /** + * Constructor + * + * @param repositoryHelper helper object to parse entity + * @param serviceName name of this component + * @param serverName local server name + */ + public ValidValueConverter(OMRSRepositoryHelper repositoryHelper, + String serviceName, + String serverName) + { + super(repositoryHelper, serviceName, serverName); + } + + + + /** + * Using the supplied instances, return a new instance of the bean. This is used for beans that + * contain a combination of the properties from an entity and that of a connected relationship. + * + * @param beanClass name of the class to create + * @param entity entity containing the properties + * @param relationship relationship containing the properties + * @param methodName calling method + * @return bean populated with properties from the instances supplied + * @throws PropertyServerException there is a problem instantiating the bean + */ + @Override + public B getNewBean(Class beanClass, + EntityDetail entity, + Relationship relationship, + String methodName) throws PropertyServerException + { + try + { + /* + * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. + */ + B returnBean = beanClass.getDeclaredConstructor().newInstance(); + + if (returnBean instanceof ValidValueElement bean) + { + this.updateSimpleMetadataElement(beanClass, bean, entity, methodName); + + if (relationship != null) + { + if (repositoryHelper.isTypeOf(serviceName, relationship.getType().getTypeDefName(), OpenMetadataType.VALID_VALUE_MEMBER_RELATIONSHIP.typeName)) + { + bean.setSetGUID(relationship.getEntityOneProxy().getGUID()); + bean.setIsDefaultValue(this.removeIsDefaultValue(relationship.getProperties())); + } + + bean.setRelatedElement(super.getRelatedElement(beanClass, entity, relationship, methodName)); + } + } + + return returnBean; + } + catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) + { + super.handleInvalidBeanClass(beanClass.getName(), error, methodName); + } + + return null; + } + + + /** + * Using the supplied instances, return a new instance of the bean. This is used for beans that + * contain a combination of the properties from an entity and that of a connected relationship. + * + * @param beanClass name of the class to create + * @param entity entity containing the properties + * @param methodName calling method + * @return bean populated with properties from the instances supplied + * @throws PropertyServerException there is a problem instantiating the bean + */ + @Override + public B getNewBean(Class beanClass, + EntityDetail entity, + String methodName) throws PropertyServerException + { + try + { + /* + * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. + */ + B returnBean = beanClass.getDeclaredConstructor().newInstance(); + + if (returnBean instanceof ValidValueElement) + { + this.updateSimpleMetadataElement(beanClass, (ValidValueElement) returnBean, entity, methodName); + } + + return returnBean; + } + catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) + { + super.handleInvalidBeanClass(beanClass.getName(), error, methodName); + } + + return null; + } + + + /** + * Extract the properties from the entity. Each concrete DataManager OMAS converter implements this method. + * The top level fills in the header + * + * @param beanClass name of the class to create + * @param bean output bean + * @param entity entity containing the properties + * @param methodName calling method + * @throws PropertyServerException there is a problem instantiating the bean + */ + void updateSimpleMetadataElement(Class beanClass, + ValidValueElement bean, + EntityDetail entity, + String methodName) throws PropertyServerException + { + if (entity != null) + { + bean.setElementHeader(this.getMetadataElementHeader(beanClass, entity, methodName)); + ValidValueProperties validValueProperties = new ValidValueProperties(); + + InstanceProperties instanceProperties = new InstanceProperties(entity.getProperties()); + + validValueProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); + validValueProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); + validValueProperties.setDisplayName(this.removeName(instanceProperties)); + validValueProperties.setDescription(this.removeDescription(instanceProperties)); + validValueProperties.setCategory(this.removeCategory(instanceProperties)); + validValueProperties.setUsage(this.removeUsage(instanceProperties)); + validValueProperties.setScope(this.removeScope(instanceProperties)); + validValueProperties.setPreferredValue(this.removePreferredValue(instanceProperties)); + validValueProperties.setDataType(this.removeDataType(instanceProperties)); + validValueProperties.setIsDeprecated(this.removeIsDeprecated(instanceProperties)); + validValueProperties.setIsCaseSensitive(this.removeIsCaseSensitive(instanceProperties)); + + /* + * Any remaining properties are returned in the extended properties. They are + * assumed to be defined in a subtype. + */ + validValueProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); + validValueProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); + + bean.setValidValueProperties(validValueProperties); + } + else + { + handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); + } + } +} diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/converters/ValidValueImplAssetConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ValidValueImplAssetConverter.java similarity index 87% rename from open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/converters/ValidValueImplAssetConverter.java rename to open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ValidValueImplAssetConverter.java index 7eb5cca5ba5..975a12ce96b 100644 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/converters/ValidValueImplAssetConverter.java +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ValidValueImplAssetConverter.java @@ -1,9 +1,10 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalarchitecture.converters; +package org.odpi.openmetadata.commonservices.generichandlers; -import org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements.*; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ValidValueImplAssetElement; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; @@ -17,7 +18,7 @@ * ValidValueImplAssetConverter provides common methods for transferring relevant properties from an Open Metadata Repository Services (OMRS) * Relationship and linked EntityDetail object into a bean that inherits from ValidValueImplAssetElement. */ -public class ValidValueImplAssetConverter extends ReferenceDataAssetConverter +public class ValidValueImplAssetConverter extends AssetConverter { /** * Constructor @@ -58,12 +59,11 @@ public B getNewBean(Class beanClass, */ B returnBean = beanClass.getDeclaredConstructor().newInstance(); - if (returnBean instanceof ValidValueImplAssetElement) + if (returnBean instanceof ValidValueImplAssetElement bean) { - ValidValueImplAssetElement bean = (ValidValueImplAssetElement) returnBean; - ReferenceDataAssetElement asset = new ReferenceDataAssetElement(); + AssetConverter assetConverter = new AssetConverter<>(repositoryHelper, serviceName, serverName); - super.updateSimpleMetadataElement(beanClass, asset, entity, methodName); + AssetElement asset = assetConverter.getNewBean(AssetElement.class, entity, methodName); bean.setReferenceDataAsset(asset); diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/converters/ValidValueImplDefinitionConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ValidValueImplDefinitionConverter.java similarity index 89% rename from open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/converters/ValidValueImplDefinitionConverter.java rename to open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ValidValueImplDefinitionConverter.java index 754b3dcaab4..4d56b5e2f6e 100644 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/converters/ValidValueImplDefinitionConverter.java +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ValidValueImplDefinitionConverter.java @@ -1,9 +1,9 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalarchitecture.converters; +package org.odpi.openmetadata.commonservices.generichandlers; -import org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements.ValidValueElement; -import org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements.ValidValueImplDefinitionElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ValidValueElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ValidValueImplDefinitionElement; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; @@ -59,10 +59,9 @@ public B getNewBean(Class beanClass, */ B returnBean = beanClass.getDeclaredConstructor().newInstance(); - if (returnBean instanceof ValidValueImplDefinitionElement) + if (returnBean instanceof ValidValueImplDefinitionElement bean) { - ValidValueImplDefinitionElement bean = (ValidValueImplDefinitionElement) returnBean; - ValidValueElement definition = new ValidValueElement(); + ValidValueElement definition = new ValidValueElement(); super.updateSimpleMetadataElement(beanClass, definition, entity, methodName); diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/converters/ValidValueMappingConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ValidValueMappingConverter.java similarity index 91% rename from open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/converters/ValidValueMappingConverter.java rename to open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ValidValueMappingConverter.java index 4cce0ed8320..f46606d8a40 100644 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-server/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/converters/ValidValueMappingConverter.java +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ValidValueMappingConverter.java @@ -1,9 +1,10 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalarchitecture.converters; +package org.odpi.openmetadata.commonservices.generichandlers; -import org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements.*; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ValidValueElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ValidValueMappingElement; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; @@ -58,10 +59,9 @@ public B getNewBean(Class beanClass, */ B returnBean = beanClass.getDeclaredConstructor().newInstance(); - if (returnBean instanceof ValidValueMappingElement) + if (returnBean instanceof ValidValueMappingElement bean) { - ValidValueMappingElement bean = (ValidValueMappingElement) returnBean; - ValidValueElement definition = new ValidValueElement(); + ValidValueElement definition = new ValidValueElement(); super.updateSimpleMetadataElement(beanClass, definition, entity, methodName); diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/ValidValueSetConverter.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ValidValueSetConverter.java similarity index 94% rename from open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/ValidValueSetConverter.java rename to open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ValidValueSetConverter.java index 6b429778232..e843baf3c07 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-server/src/main/java/org/odpi/openmetadata/accessservices/datamanager/converters/ValidValueSetConverter.java +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ValidValueSetConverter.java @@ -1,9 +1,10 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.converters; +package org.odpi.openmetadata.commonservices.generichandlers; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.ValidValueSetElement; -import org.odpi.openmetadata.accessservices.datamanager.properties.ValidValueSetProperties; +import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ValidValueSetElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues.ValidValueSetProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; @@ -18,7 +19,7 @@ * ValidValueConverter provides common methods for transferring relevant properties from an Open Metadata Repository Services (OMRS) * EntityDetail object into a ValidValueElement bean. */ -public class ValidValueSetConverter extends DataManagerOMASConverter +public class ValidValueSetConverter extends OMFConverter { /** * Constructor diff --git a/open-metadata-implementation/common-services/multi-tenant/build.gradle b/open-metadata-implementation/common-services/multi-tenant/build.gradle index 2df6843d211..1a295146aa9 100644 --- a/open-metadata-implementation/common-services/multi-tenant/build.gradle +++ b/open-metadata-implementation/common-services/multi-tenant/build.gradle @@ -7,6 +7,7 @@ dependencies { implementation project(':open-metadata-implementation:common-services:ffdc-services') implementation project(':open-metadata-implementation:frameworks:audit-log-framework') + implementation project(':open-metadata-implementation:frameworks:open-metadata-framework') implementation project(':open-metadata-implementation:frameworks:open-connector-framework') implementation project(':open-metadata-implementation:frameworks:open-integration-framework') implementation project(':open-metadata-implementation:frameworks:governance-action-framework') diff --git a/open-metadata-implementation/common-services/multi-tenant/src/main/java/org/odpi/openmetadata/commonservices/multitenant/OMASServiceInstance.java b/open-metadata-implementation/common-services/multi-tenant/src/main/java/org/odpi/openmetadata/commonservices/multitenant/OMASServiceInstance.java index 256a4964774..66b5ae1cdad 100644 --- a/open-metadata-implementation/common-services/multi-tenant/src/main/java/org/odpi/openmetadata/commonservices/multitenant/OMASServiceInstance.java +++ b/open-metadata-implementation/common-services/multi-tenant/src/main/java/org/odpi/openmetadata/commonservices/multitenant/OMASServiceInstance.java @@ -9,6 +9,8 @@ import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ConnectorProvider; import org.odpi.openmetadata.frameworks.connectors.properties.beans.*; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ElementOriginCategory; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementOrigin; import org.odpi.openmetadata.repositoryservices.connectors.openmetadatatopic.OpenMetadataTopicProvider; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.OMRSMetadataCollection; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryConnector; diff --git a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/ArchiveRequestBody.java b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/ArchiveRequestBody.java index b13ac12b034..89bfa89363a 100644 --- a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/ArchiveRequestBody.java +++ b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/ArchiveRequestBody.java @@ -6,8 +6,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStatus; -import org.odpi.openmetadata.frameworks.governanceaction.properties.ArchiveProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ArchiveProperties; import java.util.Objects; diff --git a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/ElementHeaderResponse.java b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/ElementHeaderResponse.java deleted file mode 100644 index bc82abe89fd..00000000000 --- a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/ElementHeaderResponse.java +++ /dev/null @@ -1,137 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.frameworkservices.gaf.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * ElementHeaderResponse is the response structure used on the OMAS REST API calls that return the header - * for a element. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ElementHeaderResponse extends OMAGGAFAPIResponse -{ - private ElementHeader element = null; - - - /** - * Default constructor - */ - public ElementHeaderResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ElementHeaderResponse(ElementHeaderResponse template) - { - super(template); - - if (template != null) - { - this.element = template.getElement(); - } - } - - - /** - * Return the element result. - * - * @return bean - */ - public ElementHeader getElement() - { - return element; - } - - - /** - * Set up the element result. - * - * @param element bean - */ - public void setElement(ElementHeader element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ElementHeaderResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof ElementHeaderResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ElementHeaderResponse that = (ElementHeaderResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(element); - } -} diff --git a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/ElementHeadersResponse.java b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/ElementHeadersResponse.java deleted file mode 100644 index 3f030af25b1..00000000000 --- a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/ElementHeadersResponse.java +++ /dev/null @@ -1,148 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.frameworkservices.gaf.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ElementHeadersResponse is a response object for passing back a list of element headers - * or an exception if the request failed. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ElementHeadersResponse extends OMAGGAFAPIResponse -{ - private List elementList = null; - - - /** - * Default constructor - */ - public ElementHeadersResponse() - { - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ElementHeadersResponse(ElementHeadersResponse template) - { - super(template); - - if (template != null) - { - elementList = template.getElementList(); - } - } - - - /** - * Return the list of metadata elements. - * - * @return result object - */ - public List getElementList() - { - if (elementList == null) - { - return null; - } - else if (elementList.isEmpty()) - { - return null; - } - else - { - return new ArrayList<>(elementList); - } - } - - - /** - * Set up the metadata element to return. - * - * @param elementList result object - */ - public void setElementList(List elementList) - { - this.elementList = elementList; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ElementHeadersResponse{" + - "elementList=" + elementList + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ElementHeadersResponse that = (ElementHeadersResponse) objectToCompare; - return Objects.equals(elementList, that.elementList); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementList); - } -} diff --git a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/FindRelationshipRequestBody.java b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/FindRelationshipRequestBody.java index 87ca6ead699..9a5d7b25e5b 100644 --- a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/FindRelationshipRequestBody.java +++ b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/FindRelationshipRequestBody.java @@ -6,8 +6,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStatus; -import org.odpi.openmetadata.frameworks.governanceaction.search.SearchClassifications; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ElementStatus; import org.odpi.openmetadata.frameworks.governanceaction.search.SearchProperties; import org.odpi.openmetadata.frameworks.governanceaction.search.SequencingOrder; diff --git a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/FindRequestBody.java b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/FindRequestBody.java index 6d5387b455d..152f19ba4f7 100644 --- a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/FindRequestBody.java +++ b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/FindRequestBody.java @@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStatus; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ElementStatus; import org.odpi.openmetadata.frameworks.governanceaction.search.SearchClassifications; import org.odpi.openmetadata.frameworks.governanceaction.search.SearchProperties; import org.odpi.openmetadata.frameworks.governanceaction.search.SequencingOrder; diff --git a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/NewGovernanceActionProcessRequestBody.java b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/NewGovernanceActionProcessRequestBody.java index a8a8eb33a0a..0bb48af50dc 100644 --- a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/NewGovernanceActionProcessRequestBody.java +++ b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/NewGovernanceActionProcessRequestBody.java @@ -7,7 +7,7 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import org.odpi.openmetadata.frameworks.governanceaction.properties.GovernanceActionProcessProperties; -import org.odpi.openmetadata.frameworks.governanceaction.properties.ProcessStatus; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ProcessStatus; import java.util.Objects; diff --git a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/NewMetadataElementRequestBody.java b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/NewMetadataElementRequestBody.java deleted file mode 100644 index 16827c62c6b..00000000000 --- a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/NewMetadataElementRequestBody.java +++ /dev/null @@ -1,445 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.frameworkservices.gaf.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStatus; -import org.odpi.openmetadata.frameworks.governanceaction.search.ElementProperties; - -import java.util.Date; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * NewMetadataElementRequestBody provides a structure for passing the properties for a new metadata element. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class NewMetadataElementRequestBody extends MetadataSourceRequestBody -{ - private String typeName = null; - private ElementStatus initialStatus = null; - private Map initialClassifications = null; - private String anchorGUID = null; - private boolean isOwnAnchor = false; - private Date effectiveFrom = null; - private Date effectiveTo = null; - private ElementProperties properties = null; - private String parentGUID = null; - private String parentRelationshipTypeName = null; - private ElementProperties parentRelationshipProperties = null; - private boolean parentAtEnd1 = true; - private Date effectiveTime = null; - - - /** - * Default constructor - */ - public NewMetadataElementRequestBody() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public NewMetadataElementRequestBody(NewMetadataElementRequestBody template) - { - super(template); - - if (template != null) - { - typeName = template.getTypeName(); - initialStatus = template.getInitialStatus(); - initialClassifications = template.getInitialClassifications(); - anchorGUID = template.getAnchorGUID(); - isOwnAnchor = template.getIsOwnAnchor(); - effectiveFrom = template.getEffectiveFrom(); - effectiveTo = template.getEffectiveTo(); - properties = template.getProperties(); - parentGUID = template.getParentGUID(); - parentRelationshipTypeName = template.getParentRelationshipTypeName(); - parentRelationshipProperties = template.getParentRelationshipProperties(); - parentAtEnd1 = template.getParentAtEnd1(); - effectiveTime = template.getEffectiveTime(); - } - } - - - /** - * Return the open metadata type name for the new metadata element. - * - * @return string name - */ - public String getTypeName() - { - return typeName; - } - - - /** - * Set up the open metadata type name for the new metadata element. - * - * @param typeName string name - */ - public void setTypeName(String typeName) - { - this.typeName = typeName; - } - - - /** - * Return the initial status of the metadata element (typically ACTIVE). - * - * @return element status enum value - */ - public ElementStatus getInitialStatus() - { - return initialStatus; - } - - - /** - * Return the map of classification name to properties describing the initial classification for the new metadata element. - * - * @return map of classification name to classification properties (or null for none) - */ - public Map getInitialClassifications() - { - return initialClassifications; - } - - - /** - * Set up the map of classification name to properties describing the initial classification for the new metadata element. - * - * @param initialClassifications map of classification name to classification properties (or null for none) - */ - public void setInitialClassifications(Map initialClassifications) - { - this.initialClassifications = initialClassifications; - } - - - /** - * Return the unique identifier of the element that should be the anchor for the new element. It is set to null if no anchor, - * or the Anchors classification is included in the initial classifications. - * - * @return string guid - */ - public String getAnchorGUID() - { - return anchorGUID; - } - - - /** - * Set up the unique identifier of the element that should be the anchor for the new element. Set to null if no anchor, - * or the Anchors classification is included in the initial classifications. - * - * @param anchorGUID string guid - */ - public void setAnchorGUID(String anchorGUID) - { - this.anchorGUID = anchorGUID; - } - - - /** - * Return whether this element should be classified as its own anchor or not. The default is false. - * - * @return boolean - */ - public boolean getIsOwnAnchor() - { - return isOwnAnchor; - } - - - /** - * Set up whether this element should be classified as its own anchor or not. The default is false. - * - * @param ownAnchor boolean - */ - public void setIsOwnAnchor(boolean ownAnchor) - { - isOwnAnchor = ownAnchor; - } - - - /** - * Set up the initial status of the metadata element (typically ACTIVE). - * - * @param initialStatus element status enum value - */ - public void setInitialStatus(ElementStatus initialStatus) - { - this.initialStatus = initialStatus; - } - - - /** - * Return the date/time that this new element becomes effective in the governance program (null means immediately). - * - * @return date object - */ - public Date getEffectiveFrom() - { - return effectiveFrom; - } - - - /** - * Set up the date/time that this new element becomes effective in the governance program (null means immediately). - * - * @param effectiveFrom date object - */ - public void setEffectiveFrom(Date effectiveFrom) - { - this.effectiveFrom = effectiveFrom; - } - - - /** - * Return the date/time when the new element is no longer effective in the governance program (null means until deleted). - * - * @return date object - */ - public Date getEffectiveTo() - { - return effectiveTo; - } - - - /** - * Set up the date/time when the new element is no longer effective in the governance program (null means until deleted). - * - * @param effectiveTo date object - */ - public void setEffectiveTo(Date effectiveTo) - { - this.effectiveTo = effectiveTo; - } - - - /** - * Return the properties for the new metadata element. - * - * @return list of properties - */ - public ElementProperties getProperties() - { - return properties; - } - - - /** - * Set up the properties for the new metadata element. - * - * @param properties list of properties - */ - public void setProperties(ElementProperties properties) - { - this.properties = properties; - } - - - /** - * Return the optional unique identifier for an element that should be connected to the newly created element. - * If this property is specified, parentRelationshipTypeName must also be specified. - * - * @return string guid - */ - public String getParentGUID() - { - return parentGUID; - } - - - /** - * Set up the optional unique identifier for an element that should be connected to the newly created element. - * If this property is specified, parentRelationshipTypeName must also be specified. - * - * @param parentGUID string guid - */ - public void setParentGUID(String parentGUID) - { - this.parentGUID = parentGUID; - } - - - /** - * Return the name of the relationship, if any, that should be established between the new element and the parent element. - * - * @return string type name - */ - public String getParentRelationshipTypeName() - { - return parentRelationshipTypeName; - } - - - /** - * Set up the name of the optional relationship from the newly created element to a parent element. - * - * @param parentRelationshipTypeName string type name - */ - public void setParentRelationshipTypeName(String parentRelationshipTypeName) - { - this.parentRelationshipTypeName = parentRelationshipTypeName; - } - - - /** - * Return any properties that should be included in the parent relationship. - * - * @return element properties - */ - public ElementProperties getParentRelationshipProperties() - { - return parentRelationshipProperties; - } - - - /** - * Set up any properties that should be included in the parent relationship. - * - * @param parentRelationshipProperties element properties - */ - public void setParentRelationshipProperties(ElementProperties parentRelationshipProperties) - { - this.parentRelationshipProperties = parentRelationshipProperties; - } - - - /** - * Return which end any parent entity sits on the relationship. - * - * @return boolean - */ - public boolean getParentAtEnd1() - { - return parentAtEnd1; - } - - - /** - * Set up which end any parent entity sits on the relationship. - * - * @param parentAtEnd1 boolean - */ - public void setParentAtEnd1(boolean parentAtEnd1) - { - this.parentAtEnd1 = parentAtEnd1; - } - - - /** - * Return the effective time use on any queries for related elements. - * - * @return date object - */ - public Date getEffectiveTime() - { - return effectiveTime; - } - - - /** - * Set up the effective time use on any queries for related elements. - * - * @param effectiveTime date object - */ - public void setEffectiveTime(Date effectiveTime) - { - this.effectiveTime = effectiveTime; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "NewMetadataElementRequestBody{" + - "typeName='" + typeName + '\'' + - ", initialStatus=" + initialStatus + - ", initialClassifications=" + initialClassifications + - ", anchorGUID='" + anchorGUID + '\'' + - ", isOwnAnchor='" + isOwnAnchor + '\'' + - ", effectiveFrom=" + effectiveFrom + - ", effectiveTo=" + effectiveTo + - ", properties=" + properties + - ", parentGUID='" + parentGUID + '\'' + - ", parentRelationshipTypeName='" + parentRelationshipTypeName + '\'' + - ", parentRelationshipProperties=" + parentRelationshipProperties + - ", parentAtEnd1=" + parentAtEnd1 + - ", effectiveTime=" + effectiveTime + - ", externalSourceGUID='" + getExternalSourceGUID() + '\'' + - ", externalSourceName='" + getExternalSourceName() + '\'' + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (! (objectToCompare instanceof NewMetadataElementRequestBody that)) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - return parentAtEnd1 == that.parentAtEnd1 && - isOwnAnchor == that.isOwnAnchor && - Objects.equals(typeName, that.typeName) && - initialStatus == that.initialStatus && - Objects.equals(initialClassifications, that.initialClassifications) && - Objects.equals(anchorGUID, that.anchorGUID) && - Objects.equals(effectiveFrom, that.effectiveFrom) && - Objects.equals(effectiveTo, that.effectiveTo) && - Objects.equals(properties, that.properties) && - Objects.equals(parentGUID, that.parentGUID) && - Objects.equals(parentRelationshipTypeName, that.parentRelationshipTypeName) && - Objects.equals(parentRelationshipProperties, that.parentRelationshipProperties) && - Objects.equals(effectiveTime, that.effectiveTime); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), typeName, initialStatus, initialClassifications, anchorGUID, isOwnAnchor, effectiveFrom, effectiveTo, properties, - parentGUID, parentRelationshipTypeName, parentRelationshipProperties, parentAtEnd1, effectiveTime); - } -} diff --git a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/NewOpenMetadataElementRequestBody.java b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/NewOpenMetadataElementRequestBody.java new file mode 100644 index 00000000000..72079f26169 --- /dev/null +++ b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/NewOpenMetadataElementRequestBody.java @@ -0,0 +1,445 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworkservices.gaf.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ElementStatus; +import org.odpi.openmetadata.frameworks.governanceaction.search.ElementProperties; + +import java.util.Date; +import java.util.Map; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * NewOpenMetadataElementRequestBody provides a structure for passing the properties for a new metadata element. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class NewOpenMetadataElementRequestBody extends MetadataSourceRequestBody +{ + private String typeName = null; + private ElementStatus initialStatus = null; + private Map initialClassifications = null; + private String anchorGUID = null; + private boolean isOwnAnchor = false; + private Date effectiveFrom = null; + private Date effectiveTo = null; + private ElementProperties properties = null; + private String parentGUID = null; + private String parentRelationshipTypeName = null; + private ElementProperties parentRelationshipProperties = null; + private boolean parentAtEnd1 = true; + private Date effectiveTime = null; + + + /** + * Default constructor + */ + public NewOpenMetadataElementRequestBody() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public NewOpenMetadataElementRequestBody(NewOpenMetadataElementRequestBody template) + { + super(template); + + if (template != null) + { + typeName = template.getTypeName(); + initialStatus = template.getInitialStatus(); + initialClassifications = template.getInitialClassifications(); + anchorGUID = template.getAnchorGUID(); + isOwnAnchor = template.getIsOwnAnchor(); + effectiveFrom = template.getEffectiveFrom(); + effectiveTo = template.getEffectiveTo(); + properties = template.getProperties(); + parentGUID = template.getParentGUID(); + parentRelationshipTypeName = template.getParentRelationshipTypeName(); + parentRelationshipProperties = template.getParentRelationshipProperties(); + parentAtEnd1 = template.getParentAtEnd1(); + effectiveTime = template.getEffectiveTime(); + } + } + + + /** + * Return the open metadata type name for the new metadata element. + * + * @return string name + */ + public String getTypeName() + { + return typeName; + } + + + /** + * Set up the open metadata type name for the new metadata element. + * + * @param typeName string name + */ + public void setTypeName(String typeName) + { + this.typeName = typeName; + } + + + /** + * Return the initial status of the metadata element (typically ACTIVE). + * + * @return element status enum value + */ + public ElementStatus getInitialStatus() + { + return initialStatus; + } + + + /** + * Return the map of classification name to properties describing the initial classification for the new metadata element. + * + * @return map of classification name to classification properties (or null for none) + */ + public Map getInitialClassifications() + { + return initialClassifications; + } + + + /** + * Set up the map of classification name to properties describing the initial classification for the new metadata element. + * + * @param initialClassifications map of classification name to classification properties (or null for none) + */ + public void setInitialClassifications(Map initialClassifications) + { + this.initialClassifications = initialClassifications; + } + + + /** + * Return the unique identifier of the element that should be the anchor for the new element. It is set to null if no anchor, + * or the Anchors classification is included in the initial classifications. + * + * @return string guid + */ + public String getAnchorGUID() + { + return anchorGUID; + } + + + /** + * Set up the unique identifier of the element that should be the anchor for the new element. Set to null if no anchor, + * or the Anchors classification is included in the initial classifications. + * + * @param anchorGUID string guid + */ + public void setAnchorGUID(String anchorGUID) + { + this.anchorGUID = anchorGUID; + } + + + /** + * Return whether this element should be classified as its own anchor or not. The default is false. + * + * @return boolean + */ + public boolean getIsOwnAnchor() + { + return isOwnAnchor; + } + + + /** + * Set up whether this element should be classified as its own anchor or not. The default is false. + * + * @param ownAnchor boolean + */ + public void setIsOwnAnchor(boolean ownAnchor) + { + isOwnAnchor = ownAnchor; + } + + + /** + * Set up the initial status of the metadata element (typically ACTIVE). + * + * @param initialStatus element status enum value + */ + public void setInitialStatus(ElementStatus initialStatus) + { + this.initialStatus = initialStatus; + } + + + /** + * Return the date/time that this new element becomes effective in the governance program (null means immediately). + * + * @return date object + */ + public Date getEffectiveFrom() + { + return effectiveFrom; + } + + + /** + * Set up the date/time that this new element becomes effective in the governance program (null means immediately). + * + * @param effectiveFrom date object + */ + public void setEffectiveFrom(Date effectiveFrom) + { + this.effectiveFrom = effectiveFrom; + } + + + /** + * Return the date/time when the new element is no longer effective in the governance program (null means until deleted). + * + * @return date object + */ + public Date getEffectiveTo() + { + return effectiveTo; + } + + + /** + * Set up the date/time when the new element is no longer effective in the governance program (null means until deleted). + * + * @param effectiveTo date object + */ + public void setEffectiveTo(Date effectiveTo) + { + this.effectiveTo = effectiveTo; + } + + + /** + * Return the properties for the new metadata element. + * + * @return list of properties + */ + public ElementProperties getProperties() + { + return properties; + } + + + /** + * Set up the properties for the new metadata element. + * + * @param properties list of properties + */ + public void setProperties(ElementProperties properties) + { + this.properties = properties; + } + + + /** + * Return the optional unique identifier for an element that should be connected to the newly created element. + * If this property is specified, parentRelationshipTypeName must also be specified. + * + * @return string guid + */ + public String getParentGUID() + { + return parentGUID; + } + + + /** + * Set up the optional unique identifier for an element that should be connected to the newly created element. + * If this property is specified, parentRelationshipTypeName must also be specified. + * + * @param parentGUID string guid + */ + public void setParentGUID(String parentGUID) + { + this.parentGUID = parentGUID; + } + + + /** + * Return the name of the relationship, if any, that should be established between the new element and the parent element. + * + * @return string type name + */ + public String getParentRelationshipTypeName() + { + return parentRelationshipTypeName; + } + + + /** + * Set up the name of the optional relationship from the newly created element to a parent element. + * + * @param parentRelationshipTypeName string type name + */ + public void setParentRelationshipTypeName(String parentRelationshipTypeName) + { + this.parentRelationshipTypeName = parentRelationshipTypeName; + } + + + /** + * Return any properties that should be included in the parent relationship. + * + * @return element properties + */ + public ElementProperties getParentRelationshipProperties() + { + return parentRelationshipProperties; + } + + + /** + * Set up any properties that should be included in the parent relationship. + * + * @param parentRelationshipProperties element properties + */ + public void setParentRelationshipProperties(ElementProperties parentRelationshipProperties) + { + this.parentRelationshipProperties = parentRelationshipProperties; + } + + + /** + * Return which end any parent entity sits on the relationship. + * + * @return boolean + */ + public boolean getParentAtEnd1() + { + return parentAtEnd1; + } + + + /** + * Set up which end any parent entity sits on the relationship. + * + * @param parentAtEnd1 boolean + */ + public void setParentAtEnd1(boolean parentAtEnd1) + { + this.parentAtEnd1 = parentAtEnd1; + } + + + /** + * Return the effective time use on any queries for related elements. + * + * @return date object + */ + public Date getEffectiveTime() + { + return effectiveTime; + } + + + /** + * Set up the effective time use on any queries for related elements. + * + * @param effectiveTime date object + */ + public void setEffectiveTime(Date effectiveTime) + { + this.effectiveTime = effectiveTime; + } + + + /** + * JSON-style toString. + * + * @return list of properties and their values. + */ + @Override + public String toString() + { + return "NewOpenMetadataElementRequestBody{" + + "typeName='" + typeName + '\'' + + ", initialStatus=" + initialStatus + + ", initialClassifications=" + initialClassifications + + ", anchorGUID='" + anchorGUID + '\'' + + ", isOwnAnchor='" + isOwnAnchor + '\'' + + ", effectiveFrom=" + effectiveFrom + + ", effectiveTo=" + effectiveTo + + ", properties=" + properties + + ", parentGUID='" + parentGUID + '\'' + + ", parentRelationshipTypeName='" + parentRelationshipTypeName + '\'' + + ", parentRelationshipProperties=" + parentRelationshipProperties + + ", parentAtEnd1=" + parentAtEnd1 + + ", effectiveTime=" + effectiveTime + + ", externalSourceGUID='" + getExternalSourceGUID() + '\'' + + ", externalSourceName='" + getExternalSourceName() + '\'' + + '}'; + } + + + /** + * Equals method that returns true if containing properties are the same. + * + * @param objectToCompare object to compare + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (! (objectToCompare instanceof NewOpenMetadataElementRequestBody that)) + { + return false; + } + if (! super.equals(objectToCompare)) + { + return false; + } + return parentAtEnd1 == that.parentAtEnd1 && + isOwnAnchor == that.isOwnAnchor && + Objects.equals(typeName, that.typeName) && + initialStatus == that.initialStatus && + Objects.equals(initialClassifications, that.initialClassifications) && + Objects.equals(anchorGUID, that.anchorGUID) && + Objects.equals(effectiveFrom, that.effectiveFrom) && + Objects.equals(effectiveTo, that.effectiveTo) && + Objects.equals(properties, that.properties) && + Objects.equals(parentGUID, that.parentGUID) && + Objects.equals(parentRelationshipTypeName, that.parentRelationshipTypeName) && + Objects.equals(parentRelationshipProperties, that.parentRelationshipProperties) && + Objects.equals(effectiveTime, that.effectiveTime); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), typeName, initialStatus, initialClassifications, anchorGUID, isOwnAnchor, effectiveFrom, effectiveTo, properties, + parentGUID, parentRelationshipTypeName, parentRelationshipProperties, parentAtEnd1, effectiveTime); + } +} diff --git a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/OMAGGAFAPIResponse.java b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/OMAGGAFAPIResponse.java index 26a3361d015..8d9eaa3771d 100644 --- a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/OMAGGAFAPIResponse.java +++ b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/OMAGGAFAPIResponse.java @@ -21,8 +21,6 @@ property = "class") @JsonSubTypes( { - @JsonSubTypes.Type(value = ElementHeaderResponse.class, name = "ElementHeaderResponse"), - @JsonSubTypes.Type(value = ElementHeadersResponse.class, name = "ElementHeadersResponse"), @JsonSubTypes.Type(value = OpenMetadataElementResponse.class, name = "OpenMetadataElementResponse"), @JsonSubTypes.Type(value = OpenMetadataElementsResponse.class, name = "OpenMetadataElementsResponse"), @JsonSubTypes.Type(value = RelatedMetadataElementListResponse.class, name = "RelatedMetadataElementListResponse"), diff --git a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/TemplateRequestBody.java b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/TemplateRequestBody.java index aa20756fa38..fd514362a5b 100644 --- a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/TemplateRequestBody.java +++ b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/TemplateRequestBody.java @@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStatus; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ElementStatus; import org.odpi.openmetadata.frameworks.governanceaction.search.ElementProperties; import java.util.Date; @@ -423,7 +423,7 @@ public void setEffectiveTime(Date effectiveTime) @Override public String toString() { - return "NewMetadataElementRequestBody{" + + return "NewOpenMetadataElementRequestBody{" + "typeName='" + typeName + '\'' + ", initialStatus=" + initialStatus + ", initialClassifications=" + initialClassifications + diff --git a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/UpdateStatusRequestBody.java b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/UpdateStatusRequestBody.java index fe805c9b479..a677dae49b9 100644 --- a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/UpdateStatusRequestBody.java +++ b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/UpdateStatusRequestBody.java @@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStatus; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ElementStatus; import java.util.Objects; diff --git a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-client/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/client/OpenGovernanceClientBase.java b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-client/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/client/OpenGovernanceClientBase.java index 63f10adaef1..b44a9f2a20b 100644 --- a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-client/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/client/OpenGovernanceClientBase.java +++ b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-client/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/client/OpenGovernanceClientBase.java @@ -13,6 +13,7 @@ import org.odpi.openmetadata.frameworks.governanceaction.client.GovernanceActionProcessInterface; import org.odpi.openmetadata.frameworks.governanceaction.client.GovernanceActionTypeInterface; import org.odpi.openmetadata.frameworks.governanceaction.properties.*; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ProcessStatus; import org.odpi.openmetadata.frameworkservices.gaf.client.rest.GAFRESTClient; import org.odpi.openmetadata.frameworkservices.gaf.rest.*; @@ -970,9 +971,9 @@ public GovernanceActionTypeElement getGovernanceActionTypeByGUID(String userId, @Override public String createGovernanceActionProcess(String userId, GovernanceActionProcessProperties processProperties, - ProcessStatus initialStatus) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException + ProcessStatus initialStatus) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException { final String methodName = "createGovernanceActionProcess"; final String propertiesParameterName = "processProperties"; diff --git a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-client/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/client/OpenMetadataClientBase.java b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-client/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/client/OpenMetadataClientBase.java index 07dcb68381d..b0349c6068e 100644 --- a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-client/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/client/OpenMetadataClientBase.java +++ b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-client/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/client/OpenMetadataClientBase.java @@ -7,12 +7,13 @@ import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStatus; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ElementStatus; import org.odpi.openmetadata.frameworks.governanceaction.client.OpenMetadataClient; import org.odpi.openmetadata.frameworks.governanceaction.ffdc.GAFErrorCode; import org.odpi.openmetadata.frameworks.openmetadata.enums.ToDoStatus; import org.odpi.openmetadata.frameworks.openmetadata.mapper.PropertyFacetValidValues; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ArchiveProperties; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.frameworks.governanceaction.properties.*; @@ -20,6 +21,11 @@ import org.odpi.openmetadata.frameworkservices.gaf.client.rest.GAFRESTClient; import org.odpi.openmetadata.frameworkservices.gaf.ffdc.OpenMetadataStoreErrorCode; import org.odpi.openmetadata.frameworkservices.gaf.rest.*; +import org.odpi.openmetadata.frameworkservices.gaf.rest.ArchiveRequestBody; +import org.odpi.openmetadata.frameworkservices.gaf.rest.EffectiveTimeQueryRequestBody; +import org.odpi.openmetadata.frameworkservices.gaf.rest.NewOpenMetadataElementRequestBody; +import org.odpi.openmetadata.frameworkservices.gaf.rest.TemplateRequestBody; +import org.odpi.openmetadata.frameworkservices.gaf.rest.UpdateRequestBody; import java.util.*; @@ -1493,7 +1499,7 @@ public String createMetadataElementInStore(String userId invalidParameterHandler.validateName(parentRelationshipTypeName, parentRelationshipTypeNameParameterName, methodName); } - NewMetadataElementRequestBody requestBody = new NewMetadataElementRequestBody(); + NewOpenMetadataElementRequestBody requestBody = new NewOpenMetadataElementRequestBody(); requestBody.setExternalSourceGUID(externalSourceGUID); requestBody.setExternalSourceName(externalSourceName); @@ -4415,7 +4421,7 @@ public List getElementsForExternalIdentifier(String userId, startFrom, validatedPageSize); - return restResult.getElementList(); + return restResult.getElementHeaders(); } diff --git a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-client/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/client/rest/GAFRESTClient.java b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-client/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/client/rest/GAFRESTClient.java index 17ac7a536f6..4ebf00164bd 100644 --- a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-client/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/client/rest/GAFRESTClient.java +++ b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-client/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/client/rest/GAFRESTClient.java @@ -89,71 +89,6 @@ public GAFRESTClient(String serverName, super(serverName, serverPlatformURLRoot, userId, password); } - - /** - * Issue a POST REST call that returns a ElementHeaderResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call, with place-holders for the parameters. - * @param requestBody object that passes additional parameters - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public ElementHeaderResponse callElementHeaderPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ElementHeaderResponse restResult = this.callPostRESTCall(methodName, - ElementHeaderResponse.class, - urlTemplate, - requestBody, - params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - - /** - * Issue a POST REST call that returns a ElementHeadersResponse object. - * - * @param methodName name of the method being called. - * @param urlTemplate template of the URL for the REST API call, with place-holders for the parameters. - * @param requestBody object that passes additional parameters - * @param params a list of parameters that are slotted into the url template. - * - * @return response object - * @throws InvalidParameterException one of the parameters is invalid. - * @throws UserNotAuthorizedException the user is not authorized to make this request. - * @throws PropertyServerException the repository is not available or not working properly. - */ - public ElementHeadersResponse callElementHeadersPostRESTCall(String methodName, - String urlTemplate, - Object requestBody, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException - { - ElementHeadersResponse restResult = this.callPostRESTCall(methodName, - ElementHeadersResponse.class, - urlTemplate, - requestBody, - params); - - exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - - return restResult; - } - - /** * Issue a GET REST call that returns a TypeDefGalleryResponse object. * diff --git a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/converters/CatalogTargetConverter.java b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/converters/CatalogTargetConverter.java index 67d8a661673..c98ef271e35 100644 --- a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/converters/CatalogTargetConverter.java +++ b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/converters/CatalogTargetConverter.java @@ -2,7 +2,7 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.frameworkservices.gaf.converters; -import org.odpi.openmetadata.commonservices.generichandlers.OCFConverter; +import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.openmetadata.enums.DeleteMethod; import org.odpi.openmetadata.frameworks.openmetadata.enums.PermittedSynchronization; @@ -22,7 +22,7 @@ * CatalogTargetConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) Relationship object into a * CatalogTarget bean. */ -public class CatalogTargetConverter extends OCFConverter +public class CatalogTargetConverter extends OMFConverter { /** * Constructor captures the repository content needed to create the endpoint object. diff --git a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/converters/ElementHeaderConverter.java b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/converters/ElementHeaderConverter.java index 2f16d99a85c..49f3dca74ab 100644 --- a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/converters/ElementHeaderConverter.java +++ b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/converters/ElementHeaderConverter.java @@ -3,7 +3,7 @@ package org.odpi.openmetadata.frameworkservices.gaf.converters; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityProxy; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; diff --git a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/converters/ExternalIdentifierConverter.java b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/converters/ExternalIdentifierConverter.java index 47f2555efe6..8aca019eb4e 100644 --- a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/converters/ExternalIdentifierConverter.java +++ b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/converters/ExternalIdentifierConverter.java @@ -19,8 +19,8 @@ import java.util.List; /** - * GlossaryConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) - * EntityDetail object into a GlossaryElement bean. + * ExternalIdentifierConverter transfers the relevant properties from a GAF extracted element + * into an external identifier bean. */ public class ExternalIdentifierConverter extends OpenMetadataStoreConverter { @@ -214,64 +214,4 @@ public B getNewComplexBean(Class beanClass, return this.getNewComplexBean(beanClass, primaryEntity, relationships, methodName); } - - /** - * Extract and delete the keyPattern property from the supplied instance properties. - * - * @param instanceProperties properties from entity - * @return KeyPattern enum - */ - KeyPattern removeKeyPattern(InstanceProperties instanceProperties) - { - final String methodName = "removeKeyPattern"; - - if (instanceProperties != null) - { - int ordinal = repositoryHelper.removeEnumPropertyOrdinal(serviceName, - OpenMetadataProperty.KEY_PATTERN.name, - instanceProperties, - methodName); - - for (KeyPattern keyPattern : KeyPattern.values()) - { - if (keyPattern.getOrdinal() == ordinal) - { - return keyPattern; - } - } - } - - return KeyPattern.LOCAL_KEY; - } - - - - /** - * Extract and delete the permittedSynchronization property from the supplied instance properties. - * - * @param instanceProperties properties from entity - * @return PermittedSynchronization enum - */ - PermittedSynchronization removePermittedSynchronization(InstanceProperties instanceProperties) - { - final String methodName = "removePermittedSynchronization"; - - if (instanceProperties != null) - { - int ordinal = repositoryHelper.removeEnumPropertyOrdinal(serviceName, - OpenMetadataProperty.PERMITTED_SYNCHRONIZATION.name, - instanceProperties, - methodName); - - for (PermittedSynchronization permittedSynchronization : PermittedSynchronization.values()) - { - if (permittedSynchronization.getOrdinal() == ordinal) - { - return permittedSynchronization; - } - } - } - - return PermittedSynchronization.BOTH_DIRECTIONS; - } } diff --git a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/converters/GovernanceEngineConverter.java b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/converters/GovernanceEngineConverter.java index 8d8a8ee91ea..055e782b84d 100644 --- a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/converters/GovernanceEngineConverter.java +++ b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/converters/GovernanceEngineConverter.java @@ -2,7 +2,7 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.frameworkservices.gaf.converters; -import org.odpi.openmetadata.commonservices.generichandlers.OCFConverter; +import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.governanceaction.properties.GovernanceEngineElement; import org.odpi.openmetadata.frameworks.governanceaction.properties.GovernanceEngineProperties; @@ -18,7 +18,7 @@ * GovernanceEnginePropertiesConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) * EntityDetail object into a GovernanceEngineProperties bean. */ -public class GovernanceEngineConverter extends OCFConverter +public class GovernanceEngineConverter extends OMFConverter { /** * Constructor diff --git a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/converters/GovernanceServiceConverter.java b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/converters/GovernanceServiceConverter.java index df95b2ccc01..0853e2eb913 100644 --- a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/converters/GovernanceServiceConverter.java +++ b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/converters/GovernanceServiceConverter.java @@ -2,7 +2,7 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.frameworkservices.gaf.converters; -import org.odpi.openmetadata.commonservices.generichandlers.OCFConverter; +import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.frameworks.governanceaction.properties.GovernanceServiceElement; @@ -21,7 +21,7 @@ * GovernanceServicePropertiesConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) * EntityDetail object into a GovernanceServiceProperties bean. */ -public class GovernanceServiceConverter extends OCFConverter +public class GovernanceServiceConverter extends OMFConverter { /** * Constructor diff --git a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/converters/IntegrationConnectorConverter.java b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/converters/IntegrationConnectorConverter.java index 62836603246..d58cef8d35d 100644 --- a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/converters/IntegrationConnectorConverter.java +++ b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/converters/IntegrationConnectorConverter.java @@ -2,7 +2,7 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.frameworkservices.gaf.converters; -import org.odpi.openmetadata.commonservices.generichandlers.OCFConverter; +import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.frameworks.governanceaction.properties.IntegrationConnectorElement; @@ -21,7 +21,7 @@ * IntegrationConnectorPropertiesConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) * EntityDetail object into a IntegrationConnectorProperties bean. */ -public class IntegrationConnectorConverter extends OCFConverter +public class IntegrationConnectorConverter extends OMFConverter { /** * Constructor diff --git a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/converters/IntegrationGroupConverter.java b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/converters/IntegrationGroupConverter.java index eee685433a5..584691c7bae 100644 --- a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/converters/IntegrationGroupConverter.java +++ b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/converters/IntegrationGroupConverter.java @@ -2,7 +2,7 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.frameworkservices.gaf.converters; -import org.odpi.openmetadata.commonservices.generichandlers.OCFConverter; +import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.governanceaction.properties.IntegrationGroupElement; import org.odpi.openmetadata.frameworks.governanceaction.properties.IntegrationGroupProperties; @@ -18,7 +18,7 @@ * IntegrationGroupConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) * EntityDetail object into a IntegrationGroupProperties bean. */ -public class IntegrationGroupConverter extends OCFConverter +public class IntegrationGroupConverter extends OMFConverter { /** * Constructor diff --git a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/converters/OpenMetadataStoreConverter.java b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/converters/OpenMetadataStoreConverter.java index 34bd1cc2313..7fbdccc7d1d 100644 --- a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/converters/OpenMetadataStoreConverter.java +++ b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/converters/OpenMetadataStoreConverter.java @@ -2,9 +2,9 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.frameworkservices.gaf.converters; -import org.odpi.openmetadata.commonservices.generichandlers.OCFConverter; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementControlHeader; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementOrigin; +import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementControlHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementOrigin; import org.odpi.openmetadata.frameworks.governanceaction.properties.AttachedClassification; import org.odpi.openmetadata.frameworks.openmetadata.enums.EngineActionStatus; import org.odpi.openmetadata.frameworks.governanceaction.properties.OpenMetadataElement; @@ -41,7 +41,7 @@ * class from within a generic is a little involved. This class provides the generic method for creating * and initializing a Governance Engine bean. */ -abstract public class OpenMetadataStoreConverter extends OCFConverter +abstract public class OpenMetadataStoreConverter extends OMFConverter { private static final Logger log = LoggerFactory.getLogger(OpenMetadataStoreConverter.class); diff --git a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/converters/RelatedElementsConverter.java b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/converters/RelatedElementsConverter.java index e74960975ba..db2d97040cf 100644 --- a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/converters/RelatedElementsConverter.java +++ b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/converters/RelatedElementsConverter.java @@ -3,7 +3,7 @@ package org.odpi.openmetadata.frameworkservices.gaf.converters; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementStub; import org.odpi.openmetadata.frameworks.governanceaction.properties.OpenMetadataRelationship; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityProxy; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; diff --git a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/handlers/GovernanceEngineConfigurationHandler.java b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/handlers/GovernanceEngineConfigurationHandler.java index ec3e240c121..0da8e8461da 100644 --- a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/handlers/GovernanceEngineConfigurationHandler.java +++ b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/handlers/GovernanceEngineConfigurationHandler.java @@ -109,7 +109,7 @@ public GovernanceEngineConfigurationHandler(String s publishZones, auditLog); - this.connectionHandler = new ConnectionHandler<>(new ConnectionConverter<>(repositoryHelper, serviceName, serverName), + this.connectionHandler = new ConnectionHandler<>(new OCFConnectionConverter<>(repositoryHelper, serviceName, serverName), Connection.class, serviceName, serverName, @@ -723,6 +723,7 @@ public void updateGovernanceService(String userId, guidParameter, qualifiedName, name, + name, versionIdentifier, description, deployedImplementationType, diff --git a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/handlers/IntegrationGroupConfigurationHandler.java b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/handlers/IntegrationGroupConfigurationHandler.java index 5446d46c725..36af802698f 100644 --- a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/handlers/IntegrationGroupConfigurationHandler.java +++ b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/handlers/IntegrationGroupConfigurationHandler.java @@ -112,7 +112,7 @@ public IntegrationGroupConfigurationHandler(String s publishZones, auditLog); - this.connectionHandler = new ConnectionHandler<>(new ConnectionConverter<>(repositoryHelper, serviceName, serverName), + this.connectionHandler = new ConnectionHandler<>(new OCFConnectionConverter<>(repositoryHelper, serviceName, serverName), Connection.class, serviceName, serverName, @@ -722,6 +722,7 @@ public void updateIntegrationConnector(String userId, guidParameter, qualifiedName, name, + name, versionIdentifier, description, deployedImplementationType, diff --git a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/handlers/MetadataElementHandler.java b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/handlers/MetadataElementHandler.java index 1ba9e173fab..8e17efd92cd 100644 --- a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/handlers/MetadataElementHandler.java +++ b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/handlers/MetadataElementHandler.java @@ -13,11 +13,11 @@ import org.odpi.openmetadata.frameworks.connectors.ffdc.OCFCheckedExceptionBase; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStatus; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ElementStatus; import org.odpi.openmetadata.frameworks.governanceaction.properties.OpenMetadataRelationship; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ArchiveProperties; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; -import org.odpi.openmetadata.frameworks.governanceaction.properties.ArchiveProperties; import org.odpi.openmetadata.frameworks.governanceaction.properties.RelatedMetadataElement; import org.odpi.openmetadata.frameworks.governanceaction.search.ArrayTypePropertyValue; import org.odpi.openmetadata.frameworks.governanceaction.search.ClassificationCondition; diff --git a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/server/ExternalIdentifierRESTServices.java b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/server/ExternalIdentifierRESTServices.java index 297e0acb3c7..a9abe329128 100644 --- a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/server/ExternalIdentifierRESTServices.java +++ b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/server/ExternalIdentifierRESTServices.java @@ -7,13 +7,14 @@ import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; import org.odpi.openmetadata.commonservices.ffdc.rest.BooleanResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.ElementHeadersResponse; import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; import org.odpi.openmetadata.commonservices.generichandlers.ExternalIdentifierHandler; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; import org.odpi.openmetadata.frameworks.governanceaction.properties.MetadataCorrelationProperties; import org.odpi.openmetadata.frameworks.governanceaction.properties.MetadataCorrelationHeader; import org.odpi.openmetadata.frameworks.openmetadata.enums.KeyPattern; @@ -695,19 +696,19 @@ public ElementHeadersResponse getElementsForExternalIdentifier(String serverName, methodName); - response.setElementList(handler.getElementsForExternalIdentifier(userId, - requestBody.getMetadataCorrelationProperties().getExternalScopeGUID(), - externalScopeGUIDParameterName, - OpenMetadataType.REFERENCEABLE.typeName, - requestBody.getMetadataCorrelationProperties().getExternalScopeName(), - requestBody.getMetadataCorrelationProperties().getExternalIdentifier(), - instanceHandler.getSupportedZones(userId, serverName, serviceURLMarker, methodName), - startFrom, - pageSize, - forLineage, - forDuplicateProcessing, - requestBody.getEffectiveTime(), - methodName)); + response.setElementHeaders(handler.getElementsForExternalIdentifier(userId, + requestBody.getMetadataCorrelationProperties().getExternalScopeGUID(), + externalScopeGUIDParameterName, + OpenMetadataType.REFERENCEABLE.typeName, + requestBody.getMetadataCorrelationProperties().getExternalScopeName(), + requestBody.getMetadataCorrelationProperties().getExternalIdentifier(), + instanceHandler.getSupportedZones(userId, serverName, serviceURLMarker, methodName), + startFrom, + pageSize, + forLineage, + forDuplicateProcessing, + requestBody.getEffectiveTime(), + methodName)); } else { diff --git a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/server/GAFMetadataManagementInstance.java b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/server/GAFMetadataManagementInstance.java index c932090cedc..f20a499f12e 100644 --- a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/server/GAFMetadataManagementInstance.java +++ b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/server/GAFMetadataManagementInstance.java @@ -5,9 +5,11 @@ import org.odpi.openmetadata.adminservices.configuration.registration.CommonServicesDescription; import org.odpi.openmetadata.commonservices.generichandlers.*; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.commonservices.generichandlers.ElementHeaderConverter; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; import org.odpi.openmetadata.frameworks.governanceaction.properties.*; import org.odpi.openmetadata.frameworkservices.gaf.converters.*; +import org.odpi.openmetadata.frameworkservices.gaf.converters.MetadataElementConverter; import org.odpi.openmetadata.frameworkservices.gaf.ffdc.OpenMetadataStoreErrorCode; import org.odpi.openmetadata.frameworkservices.gaf.handlers.GovernanceEngineConfigurationHandler; import org.odpi.openmetadata.frameworkservices.gaf.handlers.IntegrationGroupConfigurationHandler; diff --git a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/server/GAFMetadataManagementInstanceHandler.java b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/server/GAFMetadataManagementInstanceHandler.java index d2fcde4f539..c0024e12567 100644 --- a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/server/GAFMetadataManagementInstanceHandler.java +++ b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/server/GAFMetadataManagementInstanceHandler.java @@ -4,7 +4,7 @@ import org.odpi.openmetadata.adminservices.configuration.registration.CommonServicesDescription; import org.odpi.openmetadata.commonservices.generichandlers.*; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; import org.odpi.openmetadata.frameworks.governanceaction.properties.*; import org.odpi.openmetadata.frameworkservices.gaf.handlers.GovernanceEngineConfigurationHandler; import org.odpi.openmetadata.frameworkservices.gaf.handlers.IntegrationGroupConfigurationHandler; diff --git a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/server/OpenGovernanceRESTServices.java b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/server/OpenGovernanceRESTServices.java index 67d3a9fef44..f9041bdc0c1 100644 --- a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/server/OpenGovernanceRESTServices.java +++ b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/server/OpenGovernanceRESTServices.java @@ -15,6 +15,7 @@ import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; import org.odpi.openmetadata.frameworks.openmetadata.enums.EngineActionStatus; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ProcessStatus; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.frameworks.governanceaction.properties.*; @@ -673,6 +674,7 @@ public VoidResponse updateGovernanceActionProcess(String processProperties.getQualifiedName(), processProperties.getVersionIdentifier(), processProperties.getDisplayName(), + processProperties.getDisplayName(), processProperties.getDescription(), null, processProperties.getAdditionalProperties(), diff --git a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/server/OpenMetadataStoreRESTServices.java b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/server/OpenMetadataStoreRESTServices.java index 4d1cf6027ef..eebf66fba3e 100644 --- a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/server/OpenMetadataStoreRESTServices.java +++ b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/server/OpenMetadataStoreRESTServices.java @@ -18,7 +18,7 @@ import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStatus; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ElementStatus; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.frameworks.openmetadata.mapper.OpenMetadataValidValues; @@ -1245,7 +1245,7 @@ public RelatedMetadataElementsResponse getRelationshipByGUID(String serverName, public GUIDResponse createMetadataElementInStore(String serverName, String serviceURLMarker, String userId, - NewMetadataElementRequestBody requestBody) + NewOpenMetadataElementRequestBody requestBody) { final String methodName = "createMetadataElementInStore"; diff --git a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-spring/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/server/spring/ExternalIdentifierResource.java b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-spring/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/server/spring/ExternalIdentifierResource.java index b5a9cab34a8..69310b88bf0 100644 --- a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-spring/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/server/spring/ExternalIdentifierResource.java +++ b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-spring/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/server/spring/ExternalIdentifierResource.java @@ -6,10 +6,10 @@ import io.swagger.v3.oas.annotations.tags.Tag; import org.odpi.openmetadata.commonservices.ffdc.rest.BooleanResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.ElementHeadersResponse; import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; import org.odpi.openmetadata.frameworks.governanceaction.properties.MetadataCorrelationProperties; import org.odpi.openmetadata.frameworkservices.gaf.rest.EffectiveTimeQueryRequestBody; -import org.odpi.openmetadata.frameworkservices.gaf.rest.ElementHeadersResponse; import org.odpi.openmetadata.frameworkservices.gaf.rest.MetadataCorrelationHeadersResponse; import org.odpi.openmetadata.frameworkservices.gaf.rest.UpdateMetadataCorrelatorsRequestBody; import org.odpi.openmetadata.frameworkservices.gaf.server.ExternalIdentifierRESTServices; diff --git a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-spring/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/server/spring/OpenMetadataStoreResource.java b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-spring/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/server/spring/OpenMetadataStoreResource.java index 85e2a92cf98..c9168271dbc 100644 --- a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-spring/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/server/spring/OpenMetadataStoreResource.java +++ b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-spring/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/server/spring/OpenMetadataStoreResource.java @@ -836,7 +836,7 @@ public RelatedMetadataElementsResponse getRelationshipByGUID(@PathVariable Strin public GUIDResponse createMetadataElementInStore(@PathVariable String serverName, @PathVariable String serviceURLMarker, @PathVariable String userId, - @RequestBody NewMetadataElementRequestBody requestBody) + @RequestBody NewOpenMetadataElementRequestBody requestBody) { return restAPI.createMetadataElementInStore(serverName, serviceURLMarker, userId, requestBody); } diff --git a/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/rest/AssetsResponse.java b/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/rest/AssetsResponse.java index c84c3d73fca..61cbe032a70 100644 --- a/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/rest/AssetsResponse.java +++ b/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/rest/AssetsResponse.java @@ -7,6 +7,7 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import org.odpi.openmetadata.frameworks.connectors.properties.beans.Asset; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.AssetElement; import java.util.ArrayList; import java.util.List; @@ -24,7 +25,7 @@ @JsonIgnoreProperties(ignoreUnknown=true) public class AssetsResponse extends PagedResponse { - private List assets = null; + private List assets = null; /** @@ -57,27 +58,9 @@ public AssetsResponse(AssetsResponse template) * * @return list of assets */ - public List getAssets() + public List getAssets() { - if (assets == null) - { - return null; - } - else if (assets.isEmpty()) - { - return null; - } - else - { - List clonedList = new ArrayList<>(); - - for (Asset existingElement : assets) - { - clonedList.add(new Asset(existingElement)); - } - - return clonedList; - } + return assets; } @@ -86,7 +69,7 @@ else if (assets.isEmpty()) * * @param assets list */ - public void setAssets(List assets) + public void setAssets(List assets) { this.assets = assets; } diff --git a/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/rest/ConnectionRequestBody.java b/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/rest/ConnectionRequestBody.java index 9683c1dc326..a61ff80f3a7 100644 --- a/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/rest/ConnectionRequestBody.java +++ b/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/rest/ConnectionRequestBody.java @@ -13,7 +13,7 @@ import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; /** - * ConnectionRequestBody carries the parameters for created a new asset. + * OCFConnectionRequestBody carries the parameters for created a new asset. */ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @@ -108,7 +108,7 @@ public void setConnection(Connection connection) @Override public String toString() { - return "ConnectionRequestBody{" + + return "OCFConnectionRequestBody{" + "shortDescription='" + shortDescription + '\'' + ", connection=" + connection + '}'; diff --git a/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/rest/ConnectionResponse.java b/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/rest/ConnectionResponse.java index da40c9d3b2e..646dea84dc5 100644 --- a/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/rest/ConnectionResponse.java +++ b/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/rest/ConnectionResponse.java @@ -16,7 +16,7 @@ /** - * ConnectionResponse is the response structure used on OMAS REST API calls that return a + * OCFConnectionResponse is the response structure used on OMAS REST API calls that return a * Connection object as a response. */ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @@ -88,7 +88,7 @@ public void setConnection(Connection connection) @Override public String toString() { - return "ConnectionResponse{" + + return "OCFConnectionResponse{" + "connection=" + connection + ", exceptionClassName='" + getExceptionClassName() + '\'' + ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + diff --git a/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/rest/OCFOMASAPIRequestBody.java b/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/rest/OCFOMASAPIRequestBody.java index a0890446e5c..58d36d45fda 100644 --- a/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/rest/OCFOMASAPIRequestBody.java +++ b/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/rest/OCFOMASAPIRequestBody.java @@ -19,7 +19,7 @@ property = "class") @JsonSubTypes( { - @JsonSubTypes.Type(value = ConnectionRequestBody.class, name = "ConnectionRequestBody"), + @JsonSubTypes.Type(value = ConnectionRequestBody.class, name = "OCFConnectionRequestBody"), @JsonSubTypes.Type(value = OriginRequestBody.class, name = "OriginRequestBody"), @JsonSubTypes.Type(value = OwnerRequestBody.class, name = "OwnerRequestBody"), @JsonSubTypes.Type(value = SchemaRequestBody.class, name = "SchemaRequestBody"), diff --git a/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/rest/OCFOMASAPIResponse.java b/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/rest/OCFOMASAPIResponse.java index 7ff717738e5..9f3f03999c5 100644 --- a/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/rest/OCFOMASAPIResponse.java +++ b/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/rest/OCFOMASAPIResponse.java @@ -27,7 +27,7 @@ @JsonSubTypes.Type(value = CommentResponse.class, name = "CommentResponse"), @JsonSubTypes.Type(value = MeaningResponse.class, name = "MeaningResponse"), @JsonSubTypes.Type(value = NoteLogResponse.class, name = "NoteLogResponse"), - @JsonSubTypes.Type(value = ConnectionResponse.class, name = "ConnectionResponse"), + @JsonSubTypes.Type(value = ConnectionResponse.class, name = "OCFConnectionResponse"), @JsonSubTypes.Type(value = SchemaTypeResponse.class, name = "SchemaTypeResponse"), @JsonSubTypes.Type(value = TagResponse.class, name = "TagResponse"), @JsonSubTypes.Type(value = ValidValueResponse.class, name = "ValidValueResponse"), diff --git a/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/rest/ReferenceableRequestBody.java b/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/rest/ReferenceableRequestBody.java index 4fedd1ffc94..ea8e8202992 100644 --- a/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/rest/ReferenceableRequestBody.java +++ b/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/rest/ReferenceableRequestBody.java @@ -4,7 +4,7 @@ package org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.rest; import com.fasterxml.jackson.annotation.*; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementClassification; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementClassification; import org.odpi.openmetadata.frameworks.connectors.properties.beans.Meaning; import java.util.*; diff --git a/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-api/src/test/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/properties/GlossaryTermTest.java b/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-api/src/test/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/properties/GlossaryTermTest.java index 79b7cb7128a..797eebdb735 100644 --- a/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-api/src/test/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/properties/GlossaryTermTest.java +++ b/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-api/src/test/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/properties/GlossaryTermTest.java @@ -3,7 +3,7 @@ package org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.properties; import com.fasterxml.jackson.databind.ObjectMapper; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementClassification; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementClassification; import org.testng.annotations.Test; import java.util.ArrayList; diff --git a/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-api/src/test/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/rest/ConnectionResponseTest.java b/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-api/src/test/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/rest/ConnectionResponseTest.java deleted file mode 100644 index 69738f4afd2..00000000000 --- a/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-api/src/test/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/rest/ConnectionResponseTest.java +++ /dev/null @@ -1,243 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.rest; - -import com.fasterxml.jackson.databind.ObjectMapper; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection; -import org.testng.annotations.Test; - -import java.util.HashMap; -import java.util.Map; - -import static org.testng.Assert.assertFalse; -import static org.testng.Assert.assertTrue; - -/** - * Validate that the ConnectionResponse bean can be cloned, compared, serialized, deserialized and printed as a String. - */ -public class ConnectionResponseTest -{ - private Connection connection = new Connection(); - private Map additionalProperties = new HashMap<>(); - - - /** - * Default constructor - */ - public ConnectionResponseTest() - { - - } - - - /** - * Set up an example object to test. - * - * @return filled in object - */ - private ConnectionResponse getTestObject() - { - ConnectionResponse testObject = new ConnectionResponse(); - - testObject.setExceptionClassName(NullPointerException.class.getName()); - testObject.setExceptionErrorMessage("TestErrorMessage"); - testObject.setExceptionSystemAction("TestSystemAction"); - testObject.setExceptionUserAction("TestUserAction"); - - testObject.setRelatedHTTPCode(400); - testObject.setExceptionProperties(additionalProperties); - - testObject.setConnection(connection); - - return testObject; - } - - - /** - * Validate that the object that comes out of the test has the same content as the original test object. - * - * @param resultObject object returned by the test - */ - private void validateResultObject(ConnectionResponse resultObject) - { - assertTrue(resultObject.getExceptionClassName().equals(NullPointerException.class.getName())); - assertTrue(resultObject.getExceptionErrorMessage().equals("TestErrorMessage")); - assertTrue(resultObject.getExceptionSystemAction().equals("TestSystemAction")); - assertTrue(resultObject.getExceptionUserAction().equals("TestUserAction")); - - assertTrue(resultObject.getRelatedHTTPCode() == 400); - assertTrue(resultObject.getExceptionProperties() == null); - - assertTrue(resultObject.getConnection().equals(connection)); - - } - - - /** - * Validate that the object is initialized properly - */ - @Test public void testNullObject() - { - ConnectionResponse nullObject = new ConnectionResponse(); - - assertTrue(nullObject.getRelatedHTTPCode() == 200); - assertTrue(nullObject.getExceptionClassName() == null); - assertTrue(nullObject.getExceptionErrorMessage() == null); - assertTrue(nullObject.getExceptionSystemAction() == null); - assertTrue(nullObject.getExceptionUserAction() == null); - assertTrue(nullObject.getExceptionProperties() == null); - assertTrue(nullObject.getConnection() == null); - - nullObject = new ConnectionResponse(null); - - assertTrue(nullObject.getRelatedHTTPCode() == 200); - assertTrue(nullObject.getExceptionClassName() == null); - assertTrue(nullObject.getExceptionErrorMessage() == null); - assertTrue(nullObject.getExceptionSystemAction() == null); - assertTrue(nullObject.getExceptionUserAction() == null); - assertTrue(nullObject.getExceptionProperties() == null); - assertTrue(nullObject.getConnection() == null); - - } - - - /** - * Validate that exception properties are managed properly - */ - @Test public void testExceptionProperties() - { - Map propertyMap; - ConnectionResponse testObject = new ConnectionResponse(); - - assertTrue(testObject.getExceptionProperties() == null); - - propertyMap = null; - testObject = new ConnectionResponse(); - testObject.setExceptionProperties(propertyMap); - - assertTrue(testObject.getExceptionProperties() == null); - - propertyMap = new HashMap<>(); - testObject = new ConnectionResponse(); - testObject.setExceptionProperties(propertyMap); - - assertTrue(testObject.getExceptionProperties() == null); - - propertyMap.put("propertyName", "propertyValue"); - testObject = new ConnectionResponse(); - testObject.setExceptionProperties(propertyMap); - - Map retrievedPropertyMap = testObject.getExceptionProperties(); - - assertTrue(retrievedPropertyMap != null); - assertFalse(retrievedPropertyMap.isEmpty()); - assertTrue("propertyValue".equals(retrievedPropertyMap.get("propertyName"))); - } - - - /** - * Validate that 2 different objects with the same content are evaluated as equal. - * Also that different objects are considered not equal. - */ - @Test public void testEquals() - { - assertFalse(getTestObject().equals(null)); - assertFalse(getTestObject().equals("DummyString")); - assertTrue(getTestObject().equals(getTestObject())); - - ConnectionResponse sameObject = getTestObject(); - assertTrue(sameObject.equals(sameObject)); - - ConnectionResponse differentObject = getTestObject(); - differentObject.setExceptionErrorMessage("Different"); - assertFalse(getTestObject().equals(differentObject)); - } - - - /** - * Validate that 2 different objects with the same content have the same hash code. - */ - @Test public void testHashCode() - { - assertTrue(getTestObject().hashCode() == getTestObject().hashCode()); - - ConnectionResponse testObject = getTestObject(); - - testObject.setConnection(null); - - assertTrue(testObject.hashCode() != 0); - } - - - /** - * Validate that an object cloned from another object has the same content as the original - */ - @Test public void testClone() - { - validateResultObject(new ConnectionResponse(getTestObject())); - } - - - /** - * Validate that an object generated from a JSON String has the same content as the object used to - * create the JSON String. - */ - @Test public void testJSON() - { - ObjectMapper objectMapper = new ObjectMapper(); - String jsonString = null; - - /* - * This class - */ - try - { - jsonString = objectMapper.writeValueAsString(getTestObject()); - } - catch (Exception exc) - { - assertTrue(false, "Exception: " + exc.getMessage()); - } - - try - { - validateResultObject(objectMapper.readValue(jsonString, ConnectionResponse.class)); - } - catch (Exception exc) - { - assertTrue(false, "Exception: " + exc.getMessage()); - } - - /* - * Through superclass - */ - OCFOMASAPIResponse superObject = getTestObject(); - - try - { - jsonString = objectMapper.writeValueAsString(superObject); - } - catch (Exception exc) - { - assertTrue(false, "Exception: " + exc.getMessage()); - } - - try - { - validateResultObject((ConnectionResponse) objectMapper.readValue(jsonString, OCFOMASAPIResponse.class)); - } - catch (Exception exc) - { - assertTrue(false, "Exception: " + exc.getMessage()); - } - } - - - /** - * Test that toString is overridden. - */ - @Test public void testToString() - { - assertTrue(getTestObject().toString().contains("ConnectionResponse")); - } -} diff --git a/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-api/src/test/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/rest/OCFConnectionResponseTest.java b/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-api/src/test/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/rest/OCFConnectionResponseTest.java new file mode 100644 index 00000000000..7673306cb66 --- /dev/null +++ b/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-api/src/test/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/rest/OCFConnectionResponseTest.java @@ -0,0 +1,243 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.rest; + +import com.fasterxml.jackson.databind.ObjectMapper; +import org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection; +import org.testng.annotations.Test; + +import java.util.HashMap; +import java.util.Map; + +import static org.testng.Assert.assertFalse; +import static org.testng.Assert.assertTrue; + +/** + * Validate that the OCFConnectionResponse bean can be cloned, compared, serialized, deserialized and printed as a String. + */ +public class OCFConnectionResponseTest +{ + private Connection connection = new Connection(); + private Map additionalProperties = new HashMap<>(); + + + /** + * Default constructor + */ + public OCFConnectionResponseTest() + { + + } + + + /** + * Set up an example object to test. + * + * @return filled in object + */ + private ConnectionResponse getTestObject() + { + ConnectionResponse testObject = new ConnectionResponse(); + + testObject.setExceptionClassName(NullPointerException.class.getName()); + testObject.setExceptionErrorMessage("TestErrorMessage"); + testObject.setExceptionSystemAction("TestSystemAction"); + testObject.setExceptionUserAction("TestUserAction"); + + testObject.setRelatedHTTPCode(400); + testObject.setExceptionProperties(additionalProperties); + + testObject.setConnection(connection); + + return testObject; + } + + + /** + * Validate that the object that comes out of the test has the same content as the original test object. + * + * @param resultObject object returned by the test + */ + private void validateResultObject(ConnectionResponse resultObject) + { + assertTrue(resultObject.getExceptionClassName().equals(NullPointerException.class.getName())); + assertTrue(resultObject.getExceptionErrorMessage().equals("TestErrorMessage")); + assertTrue(resultObject.getExceptionSystemAction().equals("TestSystemAction")); + assertTrue(resultObject.getExceptionUserAction().equals("TestUserAction")); + + assertTrue(resultObject.getRelatedHTTPCode() == 400); + assertTrue(resultObject.getExceptionProperties() == null); + + assertTrue(resultObject.getConnection().equals(connection)); + + } + + + /** + * Validate that the object is initialized properly + */ + @Test public void testNullObject() + { + ConnectionResponse nullObject = new ConnectionResponse(); + + assertTrue(nullObject.getRelatedHTTPCode() == 200); + assertTrue(nullObject.getExceptionClassName() == null); + assertTrue(nullObject.getExceptionErrorMessage() == null); + assertTrue(nullObject.getExceptionSystemAction() == null); + assertTrue(nullObject.getExceptionUserAction() == null); + assertTrue(nullObject.getExceptionProperties() == null); + assertTrue(nullObject.getConnection() == null); + + nullObject = new ConnectionResponse(null); + + assertTrue(nullObject.getRelatedHTTPCode() == 200); + assertTrue(nullObject.getExceptionClassName() == null); + assertTrue(nullObject.getExceptionErrorMessage() == null); + assertTrue(nullObject.getExceptionSystemAction() == null); + assertTrue(nullObject.getExceptionUserAction() == null); + assertTrue(nullObject.getExceptionProperties() == null); + assertTrue(nullObject.getConnection() == null); + + } + + + /** + * Validate that exception properties are managed properly + */ + @Test public void testExceptionProperties() + { + Map propertyMap; + ConnectionResponse testObject = new ConnectionResponse(); + + assertTrue(testObject.getExceptionProperties() == null); + + propertyMap = null; + testObject = new ConnectionResponse(); + testObject.setExceptionProperties(propertyMap); + + assertTrue(testObject.getExceptionProperties() == null); + + propertyMap = new HashMap<>(); + testObject = new ConnectionResponse(); + testObject.setExceptionProperties(propertyMap); + + assertTrue(testObject.getExceptionProperties() == null); + + propertyMap.put("propertyName", "propertyValue"); + testObject = new ConnectionResponse(); + testObject.setExceptionProperties(propertyMap); + + Map retrievedPropertyMap = testObject.getExceptionProperties(); + + assertTrue(retrievedPropertyMap != null); + assertFalse(retrievedPropertyMap.isEmpty()); + assertTrue("propertyValue".equals(retrievedPropertyMap.get("propertyName"))); + } + + + /** + * Validate that 2 different objects with the same content are evaluated as equal. + * Also that different objects are considered not equal. + */ + @Test public void testEquals() + { + assertFalse(getTestObject().equals(null)); + assertFalse(getTestObject().equals("DummyString")); + assertTrue(getTestObject().equals(getTestObject())); + + ConnectionResponse sameObject = getTestObject(); + assertTrue(sameObject.equals(sameObject)); + + ConnectionResponse differentObject = getTestObject(); + differentObject.setExceptionErrorMessage("Different"); + assertFalse(getTestObject().equals(differentObject)); + } + + + /** + * Validate that 2 different objects with the same content have the same hash code. + */ + @Test public void testHashCode() + { + assertTrue(getTestObject().hashCode() == getTestObject().hashCode()); + + ConnectionResponse testObject = getTestObject(); + + testObject.setConnection(null); + + assertTrue(testObject.hashCode() != 0); + } + + + /** + * Validate that an object cloned from another object has the same content as the original + */ + @Test public void testClone() + { + validateResultObject(new ConnectionResponse(getTestObject())); + } + + + /** + * Validate that an object generated from a JSON String has the same content as the object used to + * create the JSON String. + */ + @Test public void testJSON() + { + ObjectMapper objectMapper = new ObjectMapper(); + String jsonString = null; + + /* + * This class + */ + try + { + jsonString = objectMapper.writeValueAsString(getTestObject()); + } + catch (Exception exc) + { + assertTrue(false, "Exception: " + exc.getMessage()); + } + + try + { + validateResultObject(objectMapper.readValue(jsonString, ConnectionResponse.class)); + } + catch (Exception exc) + { + assertTrue(false, "Exception: " + exc.getMessage()); + } + + /* + * Through superclass + */ + OCFOMASAPIResponse superObject = getTestObject(); + + try + { + jsonString = objectMapper.writeValueAsString(superObject); + } + catch (Exception exc) + { + assertTrue(false, "Exception: " + exc.getMessage()); + } + + try + { + validateResultObject((ConnectionResponse) objectMapper.readValue(jsonString, OCFOMASAPIResponse.class)); + } + catch (Exception exc) + { + assertTrue(false, "Exception: " + exc.getMessage()); + } + } + + + /** + * Test that toString is overridden. + */ + @Test public void testToString() + { + assertTrue(getTestObject().toString().contains("OCFConnectionResponse")); + } +} diff --git a/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-client/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/client/OCFRESTClient.java b/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-client/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/client/OCFRESTClient.java index da768aa8ebe..1a8ea4a536a 100644 --- a/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-client/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/client/OCFRESTClient.java +++ b/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-client/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/client/OCFRESTClient.java @@ -227,7 +227,7 @@ CommentsResponse callOCFCommentsGetRESTCall(String methodName, * @param urlTemplate template of the URL for the REST API call, with place-holders for the parameters. * @param params a list of parameters that are slotted into the url template. * - * @return ConnectionResponse + * @return OCFConnectionResponse * @throws InvalidParameterException one of the parameters is invalid. * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException something went wrong with the REST call stack. diff --git a/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-handlers/src/main/java/org/odpi/openmetadata/commonservices/ocf/metadatamanagement/builders/RootBuilder.java b/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-handlers/src/main/java/org/odpi/openmetadata/commonservices/ocf/metadatamanagement/builders/RootBuilder.java index 4c3faaf1ab6..f09b193a324 100644 --- a/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-handlers/src/main/java/org/odpi/openmetadata/commonservices/ocf/metadatamanagement/builders/RootBuilder.java +++ b/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-handlers/src/main/java/org/odpi/openmetadata/commonservices/ocf/metadatamanagement/builders/RootBuilder.java @@ -5,7 +5,7 @@ import org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.ffdc.OMAGOCFErrorCode; import org.odpi.openmetadata.commonservices.repositoryhandler.RepositoryErrorHandler; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementClassification; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementClassification; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; diff --git a/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-handlers/src/main/java/org/odpi/openmetadata/commonservices/ocf/metadatamanagement/converters/ElementHeaderConverter.java b/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-handlers/src/main/java/org/odpi/openmetadata/commonservices/ocf/metadatamanagement/converters/ElementHeaderConverter.java index 9c2a69bbb1a..ad915607148 100644 --- a/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-handlers/src/main/java/org/odpi/openmetadata/commonservices/ocf/metadatamanagement/converters/ElementHeaderConverter.java +++ b/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-handlers/src/main/java/org/odpi/openmetadata/commonservices/ocf/metadatamanagement/converters/ElementHeaderConverter.java @@ -3,8 +3,8 @@ package org.odpi.openmetadata.commonservices.ocf.metadatamanagement.converters; import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementBase; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementOrigin; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementType; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementOrigin; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementType; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceType; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship; diff --git a/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-handlers/src/main/java/org/odpi/openmetadata/commonservices/ocf/metadatamanagement/converters/ReferenceableConverter.java b/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-handlers/src/main/java/org/odpi/openmetadata/commonservices/ocf/metadatamanagement/converters/ReferenceableConverter.java index 15df4f73240..fa5c9628917 100644 --- a/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-handlers/src/main/java/org/odpi/openmetadata/commonservices/ocf/metadatamanagement/converters/ReferenceableConverter.java +++ b/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-handlers/src/main/java/org/odpi/openmetadata/commonservices/ocf/metadatamanagement/converters/ReferenceableConverter.java @@ -2,7 +2,7 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.commonservices.ocf.metadatamanagement.converters; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementClassification; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementClassification; import org.odpi.openmetadata.frameworks.connectors.properties.beans.Referenceable; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties; diff --git a/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-handlers/src/main/java/org/odpi/openmetadata/commonservices/ocf/metadatamanagement/converters/TypeConverter.java b/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-handlers/src/main/java/org/odpi/openmetadata/commonservices/ocf/metadatamanagement/converters/TypeConverter.java index 64905e64348..368e51cc8e6 100644 --- a/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-handlers/src/main/java/org/odpi/openmetadata/commonservices/ocf/metadatamanagement/converters/TypeConverter.java +++ b/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-handlers/src/main/java/org/odpi/openmetadata/commonservices/ocf/metadatamanagement/converters/TypeConverter.java @@ -2,8 +2,8 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.commonservices.ocf.metadatamanagement.converters; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementOriginCategory; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementType; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ElementOriginCategory; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementType; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProvenanceType; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceType; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefLink; diff --git a/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/APIOperationConverter.java b/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/APIOperationConverter.java index 4563ee31dee..750fb24b714 100644 --- a/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/APIOperationConverter.java +++ b/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/APIOperationConverter.java @@ -2,7 +2,7 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.converters; -import org.odpi.openmetadata.commonservices.generichandlers.OCFConverter; +import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.properties.beans.APIOperation; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; @@ -19,7 +19,7 @@ * EventTypeConverter provides common methods for transferring relevant properties from an Open Metadata Repository Services (OMRS) * EntityDetail object into a bean that inherits from EventTypeElement. It is working with a ComplexSchemaType. */ -public class APIOperationConverter extends OCFConverter +public class APIOperationConverter extends OMFConverter { /** * Constructor diff --git a/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/AssetConverter.java b/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/AssetConverter.java index 0cb0d5641e7..12b71d36611 100644 --- a/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/AssetConverter.java +++ b/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/AssetConverter.java @@ -2,7 +2,7 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.converters; -import org.odpi.openmetadata.commonservices.generichandlers.OCFConverter; +import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.properties.beans.Asset; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; @@ -16,7 +16,7 @@ * AssetConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) * EntityDetail object into an Asset bean. */ -public class AssetConverter extends OCFConverter +public class AssetConverter extends OMFConverter { /** * Constructor diff --git a/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/CertificationConverter.java b/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/CertificationConverter.java index 784108eaf5c..ef65dce0fdd 100644 --- a/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/CertificationConverter.java +++ b/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/CertificationConverter.java @@ -2,7 +2,7 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.converters; -import org.odpi.openmetadata.commonservices.generichandlers.OCFConverter; +import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.properties.beans.Certification; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; @@ -18,7 +18,7 @@ * CertificationConverter transfers the relevant properties from some Open Metadata Repository Services (OMRS) * EntityDetail object into an Certification bean. */ -public class CertificationConverter extends OCFConverter +public class CertificationConverter extends OMFConverter { /** * Constructor diff --git a/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/CommentConverter.java b/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/CommentConverter.java index a90c904bb10..50c3329f1fd 100644 --- a/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/CommentConverter.java +++ b/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/CommentConverter.java @@ -3,7 +3,7 @@ package org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.converters; -import org.odpi.openmetadata.commonservices.generichandlers.OCFConverter; +import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.properties.beans.Comment; import org.odpi.openmetadata.frameworks.openmetadata.enums.CommentType; @@ -19,7 +19,7 @@ * CommentConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) * EntityDetail object into a Comment bean. */ -public class CommentConverter extends OCFConverter +public class CommentConverter extends OMFConverter { /** * Constructor diff --git a/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/ConnectorTypeConverter.java b/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/ConnectorTypeConverter.java index 220cdb50403..c70288077b0 100644 --- a/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/ConnectorTypeConverter.java +++ b/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/ConnectorTypeConverter.java @@ -2,7 +2,7 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.converters; -import org.odpi.openmetadata.commonservices.generichandlers.OCFConverter; +import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.properties.beans.ConnectorType; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; @@ -18,7 +18,7 @@ * ConnectorTypeConverter transfers the relevant properties from some Open Metadata Repository Services (OMRS) * EntityDetail object into an ConnectorType bean. */ -public class ConnectorTypeConverter extends OCFConverter +public class ConnectorTypeConverter extends OMFConverter { /** * Constructor diff --git a/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/EndpointConverter.java b/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/EndpointConverter.java index 6cc30329aa9..472cd4bd712 100644 --- a/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/EndpointConverter.java +++ b/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/EndpointConverter.java @@ -2,7 +2,7 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.converters; -import org.odpi.openmetadata.commonservices.generichandlers.OCFConverter; +import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.properties.beans.*; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; @@ -18,7 +18,7 @@ * EndpointConverter transfers the relevant properties from some Open Metadata Repository Services (OMRS) * EntityDetail object into an Endpoint bean. */ -public class EndpointConverter extends OCFConverter +public class EndpointConverter extends OMFConverter { /** * Constructor diff --git a/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/ExternalIdentifierConverter.java b/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/ExternalIdentifierConverter.java index 6df2c897407..b95f9c8dcdc 100644 --- a/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/ExternalIdentifierConverter.java +++ b/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/ExternalIdentifierConverter.java @@ -2,7 +2,7 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.converters; -import org.odpi.openmetadata.commonservices.generichandlers.OCFConverter; +import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.properties.beans.ExternalIdentifier; import org.odpi.openmetadata.frameworks.openmetadata.enums.KeyPattern; @@ -20,7 +20,7 @@ * ExternalIdentifierConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) * EntityDetail object into a Referenceable bean. */ -public class ExternalIdentifierConverter extends OCFConverter +public class ExternalIdentifierConverter extends OMFConverter { /** * Constructor @@ -120,34 +120,4 @@ public B getNewBean(Class beanClass, { return this.getNewBean(beanClass, entity, methodName); } - - - /** - * Extract and delete the keyPattern property from the supplied instance properties. - * - * @param instanceProperties properties from entity - * @return KeyPattern enum - */ - KeyPattern removeKeyPattern(InstanceProperties instanceProperties) - { - final String methodName = "removeKeyPattern"; - - if (instanceProperties != null) - { - int ordinal = repositoryHelper.removeEnumPropertyOrdinal(serviceName, - OpenMetadataProperty.KEY_PATTERN.name, - instanceProperties, - methodName); - - for (KeyPattern keyPattern : KeyPattern.values()) - { - if (keyPattern.getOrdinal() == ordinal) - { - return keyPattern; - } - } - } - - return KeyPattern.LOCAL_KEY; - } } diff --git a/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/ExternalReferenceConverter.java b/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/ExternalReferenceConverter.java index 1f76282b136..1a04b69f6e8 100644 --- a/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/ExternalReferenceConverter.java +++ b/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/ExternalReferenceConverter.java @@ -2,7 +2,7 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.converters; -import org.odpi.openmetadata.commonservices.generichandlers.OCFConverter; +import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.properties.beans.ExternalReference; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; @@ -18,7 +18,7 @@ * ExternalReferenceConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) * EntityDetail object into a Referenceable bean. */ -public class ExternalReferenceConverter extends OCFConverter +public class ExternalReferenceConverter extends OMFConverter { /** * Constructor diff --git a/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/InformalTagConverter.java b/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/InformalTagConverter.java index 613f86f4ce1..13ffff0f8e7 100644 --- a/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/InformalTagConverter.java +++ b/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/InformalTagConverter.java @@ -3,7 +3,7 @@ package org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.converters; -import org.odpi.openmetadata.commonservices.generichandlers.OCFConverter; +import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.properties.beans.InformalTag; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; @@ -17,7 +17,7 @@ * InformalTagConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) * EntityDetail object into an InformalTag bean. */ -public class InformalTagConverter extends OCFConverter +public class InformalTagConverter extends OMFConverter { /** * Constructor diff --git a/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/LicenseConverter.java b/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/LicenseConverter.java index c5c4c6b284d..4d9b0cbdc64 100644 --- a/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/LicenseConverter.java +++ b/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/LicenseConverter.java @@ -3,7 +3,7 @@ package org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.converters; -import org.odpi.openmetadata.commonservices.generichandlers.OCFConverter; +import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.properties.beans.License; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; @@ -19,7 +19,7 @@ * LicenseConverter transfers the relevant properties from some Open Metadata Repository Services (OMRS) * EntityDetail object into an License bean. */ -public class LicenseConverter extends OCFConverter +public class LicenseConverter extends OMFConverter { /** * Constructor diff --git a/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/LikeConverter.java b/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/LikeConverter.java index 05f4c9e0164..5c425b829cc 100644 --- a/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/LikeConverter.java +++ b/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/LikeConverter.java @@ -3,7 +3,7 @@ package org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.converters; -import org.odpi.openmetadata.commonservices.generichandlers.OCFConverter; +import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.properties.beans.Like; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; @@ -17,7 +17,7 @@ * LikeConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) * EntityDetail object into a Like bean. */ -public class LikeConverter extends OCFConverter +public class LikeConverter extends OMFConverter { /** * Constructor diff --git a/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/LocationConverter.java b/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/LocationConverter.java index 91ce23c2238..6442435448c 100644 --- a/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/LocationConverter.java +++ b/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/LocationConverter.java @@ -2,7 +2,7 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.converters; -import org.odpi.openmetadata.commonservices.generichandlers.OCFConverter; +import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.properties.beans.Location; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; @@ -18,7 +18,7 @@ * LocationConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) * EntityDetail object into a Referenceable bean. */ -public class LocationConverter extends OCFConverter +public class LocationConverter extends OMFConverter { /** * Constructor diff --git a/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/MeaningConverter.java b/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/MeaningConverter.java index 362278e66ce..cb671b82d55 100644 --- a/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/MeaningConverter.java +++ b/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/MeaningConverter.java @@ -3,7 +3,7 @@ package org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.converters; -import org.odpi.openmetadata.commonservices.generichandlers.OCFConverter; +import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.properties.beans.Meaning; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; @@ -18,7 +18,7 @@ * MeaningConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) * EntityDetail object into a Meaning bean. */ -public class MeaningConverter extends OCFConverter +public class MeaningConverter extends OMFConverter { /** * Constructor diff --git a/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/NoteConverter.java b/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/NoteConverter.java index e15c5800dc6..6f1739279c2 100644 --- a/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/NoteConverter.java +++ b/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/NoteConverter.java @@ -2,7 +2,7 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.converters; -import org.odpi.openmetadata.commonservices.generichandlers.OCFConverter; +import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.properties.beans.Note; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; @@ -17,7 +17,7 @@ * NoteConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) * EntityDetail object into a Note bean. */ -public class NoteConverter extends OCFConverter +public class NoteConverter extends OMFConverter { /** * Constructor diff --git a/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/NoteLogConverter.java b/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/NoteLogConverter.java index e89ec6e38b9..9e392befd8f 100644 --- a/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/NoteLogConverter.java +++ b/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/NoteLogConverter.java @@ -2,7 +2,7 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.converters; -import org.odpi.openmetadata.commonservices.generichandlers.OCFConverter; +import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.properties.beans.NoteLogHeader; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; @@ -17,7 +17,7 @@ * NoteLogConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) * EntityDetail object into a NoteLogHeader bean. */ -public class NoteLogConverter extends OCFConverter +public class NoteLogConverter extends OMFConverter { /** * Constructor diff --git a/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/RatingConverter.java b/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/RatingConverter.java index 9bfbc496e4c..7e782671dcf 100644 --- a/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/RatingConverter.java +++ b/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/RatingConverter.java @@ -3,7 +3,7 @@ package org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.converters; -import org.odpi.openmetadata.commonservices.generichandlers.OCFConverter; +import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.properties.beans.Rating; import org.odpi.openmetadata.frameworks.openmetadata.enums.StarRating; @@ -18,7 +18,7 @@ * RatingConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) * EntityDetail object into a Rating bean. */ -public class RatingConverter extends OCFConverter +public class RatingConverter extends OMFConverter { /** * Constructor diff --git a/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/ReferenceableConverter.java b/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/ReferenceableConverter.java index f512e4177cd..322b2cb29e9 100644 --- a/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/ReferenceableConverter.java +++ b/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/ReferenceableConverter.java @@ -2,7 +2,7 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.converters; -import org.odpi.openmetadata.commonservices.generichandlers.OCFConverter; +import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.properties.beans.Referenceable; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; @@ -18,7 +18,7 @@ * ReferenceableConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) * EntityDetail object into a Referenceable bean. */ -public class ReferenceableConverter extends OCFConverter +public class ReferenceableConverter extends OMFConverter { /** * Constructor diff --git a/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/RelatedAssetConverter.java b/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/RelatedAssetConverter.java index 445a98cb87e..f649587bd0f 100644 --- a/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/RelatedAssetConverter.java +++ b/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/RelatedAssetConverter.java @@ -2,7 +2,7 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.converters; -import org.odpi.openmetadata.commonservices.generichandlers.OCFConverter; +import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.properties.beans.RelatedAsset; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; @@ -22,7 +22,7 @@ * RelatedAssetConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) * EntityDetail object into a Referenceable bean. */ -public class RelatedAssetConverter extends OCFConverter +public class RelatedAssetConverter extends OMFConverter { /** * Constructor diff --git a/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/RelatedMediaConverter.java b/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/RelatedMediaConverter.java index f8e2e314f98..256da0fdcbb 100644 --- a/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/RelatedMediaConverter.java +++ b/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/RelatedMediaConverter.java @@ -2,7 +2,7 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.converters; -import org.odpi.openmetadata.commonservices.generichandlers.OCFConverter; +import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.properties.beans.RelatedMediaReference; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; @@ -18,7 +18,7 @@ * RelatedMediaConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) * EntityDetail object into a RelatedMediaReference bean. */ -public class RelatedMediaConverter extends OCFConverter +public class RelatedMediaConverter extends OMFConverter { /** * Constructor diff --git a/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/SchemaAttributeConverter.java b/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/SchemaAttributeConverter.java index ff7e69147e3..8a0fc4fab8e 100644 --- a/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/SchemaAttributeConverter.java +++ b/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/SchemaAttributeConverter.java @@ -2,7 +2,7 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.converters; -import org.odpi.openmetadata.commonservices.generichandlers.OCFConverter; +import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.properties.beans.*; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; @@ -21,7 +21,7 @@ * LicenseConverter transfers the relevant properties from some Open Metadata Repository Services (OMRS) * EntityDetail object into a License bean. */ -public class SchemaAttributeConverter extends OCFConverter +public class SchemaAttributeConverter extends OMFConverter { /** * Constructor diff --git a/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/SchemaTypeConverter.java b/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/SchemaTypeConverter.java index 932862b759d..af9a42c57c2 100644 --- a/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/SchemaTypeConverter.java +++ b/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/SchemaTypeConverter.java @@ -2,7 +2,7 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.converters; -import org.odpi.openmetadata.commonservices.generichandlers.OCFConverter; +import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.properties.beans.*; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; @@ -21,7 +21,7 @@ * SchemaTypeConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) * EntityDetail object into an SchemaType bean. */ -public class SchemaTypeConverter extends OCFConverter +public class SchemaTypeConverter extends OMFConverter { /** * Constructor diff --git a/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/SearchKeywordConverter.java b/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/SearchKeywordConverter.java index d627fb9daa8..962c6e3c3e4 100644 --- a/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/SearchKeywordConverter.java +++ b/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/converters/SearchKeywordConverter.java @@ -2,7 +2,7 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.converters; -import org.odpi.openmetadata.commonservices.generichandlers.OCFConverter; +import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.properties.beans.SearchKeyword; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; @@ -18,7 +18,7 @@ * SearchKeywordConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) * EntityDetail object into a Referenceable bean. */ -public class SearchKeywordConverter extends OCFConverter +public class SearchKeywordConverter extends OMFConverter { /** * Constructor diff --git a/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/server/OCFMetadataServicesInstance.java b/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/server/OCFMetadataServicesInstance.java index 8c36f286008..df86bf3562f 100644 --- a/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/server/OCFMetadataServicesInstance.java +++ b/open-metadata-implementation/framework-services/ocf-metadata-management/ocf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/ocf/metadatamanagement/server/OCFMetadataServicesInstance.java @@ -3,11 +3,26 @@ package org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.server; import org.odpi.openmetadata.adminservices.configuration.registration.CommonServicesDescription; +import org.odpi.openmetadata.commonservices.generichandlers.RelatedAssetConverter; +import org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.converters.APIOperationConverter; +import org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.converters.AssetConverter; +import org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.converters.CommentConverter; +import org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.converters.ConnectorTypeConverter; +import org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.converters.EndpointConverter; +import org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.converters.ExternalReferenceConverter; +import org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.converters.InformalTagConverter; +import org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.converters.LikeConverter; +import org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.converters.LocationConverter; +import org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.converters.MeaningConverter; +import org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.converters.RatingConverter; +import org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.converters.ReferenceableConverter; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.commonservices.generichandlers.*; import org.odpi.openmetadata.commonservices.multitenant.OMASServiceInstance; import org.odpi.openmetadata.commonservices.multitenant.ffdc.exceptions.NewInstanceException; import org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.converters.*; +import org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.converters.SchemaAttributeConverter; +import org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.converters.SchemaTypeConverter; import org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.ffdc.OMAGOCFErrorCode; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.properties.beans.*; @@ -112,7 +127,7 @@ public OCFMetadataServicesInstance(OMRSRepositoryConnector repositoryConnector, publishZones, auditLog); - this.connectionHandler = new ConnectionHandler<>(new ConnectionConverter<>(repositoryHelper, serviceName, serverName), + this.connectionHandler = new ConnectionHandler<>(new OCFConnectionConverter<>(repositoryHelper, serviceName, serverName), Connection.class, serviceName, serverName, diff --git a/open-metadata-implementation/framework-services/oif-metadata-management/oif-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/oif/converters/IntegrationReportConverter.java b/open-metadata-implementation/framework-services/oif-metadata-management/oif-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/oif/converters/IntegrationReportConverter.java index 7e7b0b9cd5b..70eb8110250 100644 --- a/open-metadata-implementation/framework-services/oif-metadata-management/oif-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/oif/converters/IntegrationReportConverter.java +++ b/open-metadata-implementation/framework-services/oif-metadata-management/oif-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/oif/converters/IntegrationReportConverter.java @@ -2,7 +2,7 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.frameworkservices.oif.converters; -import org.odpi.openmetadata.commonservices.generichandlers.OCFConverter; +import org.odpi.openmetadata.commonservices.generichandlers.OMFConverter; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; @@ -22,7 +22,7 @@ * AssetConverter provides common methods for transferring relevant properties from an Open Metadata Repository Services (OMRS) * EntityDetail object into an DataAssetElement bean. */ -public class IntegrationReportConverter extends OCFConverter +public class IntegrationReportConverter extends OMFConverter { /** * Constructor diff --git a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/GovernanceActionContext.java b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/GovernanceActionContext.java index a8f5c2ddc85..17f1163eaff 100644 --- a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/GovernanceActionContext.java +++ b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/GovernanceActionContext.java @@ -6,7 +6,7 @@ import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; import org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStatus; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ElementStatus; import org.odpi.openmetadata.frameworks.governanceaction.client.*; import org.odpi.openmetadata.frameworks.governanceaction.events.WatchdogEventType; import org.odpi.openmetadata.frameworks.governanceaction.ffdc.GAFErrorCode; diff --git a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/OpenMetadataStore.java b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/OpenMetadataStore.java index f7b4845ccbf..89439e03cfa 100644 --- a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/OpenMetadataStore.java +++ b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/OpenMetadataStore.java @@ -5,14 +5,15 @@ import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStatus; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ElementStatus; import org.odpi.openmetadata.frameworks.governanceaction.client.OpenMetadataClient; import org.odpi.openmetadata.frameworks.governanceaction.properties.*; import org.odpi.openmetadata.frameworks.governanceaction.search.ElementProperties; import org.odpi.openmetadata.frameworks.governanceaction.search.SearchClassifications; import org.odpi.openmetadata.frameworks.governanceaction.search.SearchProperties; import org.odpi.openmetadata.frameworks.governanceaction.search.SequencingOrder; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ArchiveProperties; import java.util.Date; import java.util.List; diff --git a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/ProvisioningGovernanceContext.java b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/ProvisioningGovernanceContext.java index 1fa188fb998..15419740e27 100644 --- a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/ProvisioningGovernanceContext.java +++ b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/ProvisioningGovernanceContext.java @@ -6,7 +6,7 @@ import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStatus; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ElementStatus; import org.odpi.openmetadata.frameworks.governanceaction.search.ElementProperties; diff --git a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/RemediationGovernanceContext.java b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/RemediationGovernanceContext.java index 701cefebc1e..832e876776b 100644 --- a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/RemediationGovernanceContext.java +++ b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/RemediationGovernanceContext.java @@ -5,7 +5,7 @@ import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStatus; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ElementStatus; import org.odpi.openmetadata.frameworks.governanceaction.search.ElementProperties; import java.util.Date; diff --git a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/client/ExternalIdentifiersInterface.java b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/client/ExternalIdentifiersInterface.java index b83d2dbcadd..4eaee0948d7 100644 --- a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/client/ExternalIdentifiersInterface.java +++ b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/client/ExternalIdentifiersInterface.java @@ -5,7 +5,7 @@ import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; import org.odpi.openmetadata.frameworks.governanceaction.properties.ExternalIdentifierProperties; import org.odpi.openmetadata.frameworks.governanceaction.properties.MetadataCorrelationHeader; diff --git a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/client/GovernanceActionProcessInterface.java b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/client/GovernanceActionProcessInterface.java index 61b1a4d74ee..1d62d6a26a6 100644 --- a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/client/GovernanceActionProcessInterface.java +++ b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/client/GovernanceActionProcessInterface.java @@ -6,6 +6,7 @@ import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ProcessStatus; import java.util.Date; import java.util.List; @@ -35,9 +36,9 @@ public interface GovernanceActionProcessInterface */ String createGovernanceActionProcess(String userId, GovernanceActionProcessProperties processProperties, - ProcessStatus initialStatus) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException; + ProcessStatus initialStatus) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException; /** diff --git a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/client/MetadataElementInterface.java b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/client/MetadataElementInterface.java index 52d8d0b37d1..87ee35f4a23 100644 --- a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/client/MetadataElementInterface.java +++ b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/client/MetadataElementInterface.java @@ -5,8 +5,7 @@ import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStatus; -import org.odpi.openmetadata.frameworks.governanceaction.properties.ArchiveProperties; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ElementStatus; import org.odpi.openmetadata.frameworks.governanceaction.properties.OpenMetadataElement; import org.odpi.openmetadata.frameworks.governanceaction.properties.RelatedMetadataElement; import org.odpi.openmetadata.frameworks.governanceaction.properties.OpenMetadataRelationship; @@ -14,6 +13,7 @@ import org.odpi.openmetadata.frameworks.governanceaction.search.SearchClassifications; import org.odpi.openmetadata.frameworks.governanceaction.search.SearchProperties; import org.odpi.openmetadata.frameworks.governanceaction.search.SequencingOrder; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ArchiveProperties; import java.util.Date; import java.util.List; diff --git a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/client/OpenMetadataClient.java b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/client/OpenMetadataClient.java index 392f4ac732c..f01fea80a63 100644 --- a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/client/OpenMetadataClient.java +++ b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/client/OpenMetadataClient.java @@ -5,8 +5,8 @@ import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStatus; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ElementStatus; import org.odpi.openmetadata.frameworks.governanceaction.properties.*; import org.odpi.openmetadata.frameworks.governanceaction.search.ElementProperties; import org.odpi.openmetadata.frameworks.governanceaction.search.SearchClassifications; diff --git a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/converters/CollectionConverter.java b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/converters/CollectionConverter.java new file mode 100644 index 00000000000..c4404e1e2a9 --- /dev/null +++ b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/converters/CollectionConverter.java @@ -0,0 +1,209 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.governanceaction.converters; + +import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; +import org.odpi.openmetadata.frameworks.governanceaction.properties.OpenMetadataElement; +import org.odpi.openmetadata.frameworks.governanceaction.properties.OpenMetadataRelationship; +import org.odpi.openmetadata.frameworks.governanceaction.properties.RelatedMetadataElement; +import org.odpi.openmetadata.frameworks.governanceaction.search.ElementProperties; +import org.odpi.openmetadata.frameworks.governanceaction.search.PropertyHelper; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.CollectionElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.collections.CollectionProperties; + +import java.lang.reflect.InvocationTargetException; + + +/** + * CollectionConverter generates a CollectionElement from a Collection entity + */ +public class CollectionConverter extends OpenMetadataConverterBase +{ + /** + * Constructor + * + * @param propertyHelper helper object to parse entity + * @param serviceName name of this component + * @param serverName local server name + */ + public CollectionConverter(PropertyHelper propertyHelper, + String serviceName, + String serverName) + { + super(propertyHelper, serviceName, serverName); + } + + + /** + * Using the supplied openMetadataElement, return a new instance of the bean. This is used for most beans that have + * a one to one correspondence with the repository instances. + * + * @param beanClass name of the class to create + * @param openMetadataElement openMetadataElement containing the properties + * @param methodName calling method + * @return bean populated with properties from the instances supplied + * @throws PropertyServerException there is a problem instantiating the bean + */ + @Override + public B getNewBean(Class beanClass, + OpenMetadataElement openMetadataElement, + String methodName) throws PropertyServerException + { + try + { + /* + * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. + */ + B returnBean = beanClass.getDeclaredConstructor().newInstance(); + + if (returnBean instanceof CollectionElement bean) + { + CollectionProperties collectionProperties = new CollectionProperties(); + + bean.setElementHeader(super.getMetadataElementHeader(beanClass, openMetadataElement, methodName)); + + ElementProperties elementProperties; + + /* + * The initial set of values come from the openMetadataElement. + */ + if (openMetadataElement != null) + { + elementProperties = new ElementProperties(openMetadataElement.getElementProperties()); + + collectionProperties.setQualifiedName(this.removeQualifiedName(elementProperties)); + collectionProperties.setAdditionalProperties(this.removeAdditionalProperties(elementProperties)); + collectionProperties.setName(this.removeName(elementProperties)); + collectionProperties.setDescription(this.removeDescription(elementProperties)); + collectionProperties.setCollectionType(this.removeCollectionType(elementProperties)); + collectionProperties.setEffectiveFrom(openMetadataElement.getEffectiveFromTime()); + collectionProperties.setEffectiveTo(openMetadataElement.getEffectiveToTime()); + + /* + * Any remaining properties are returned in the extended properties. They are + * assumed to be defined in a subtype. + */ + collectionProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); + collectionProperties.setExtendedProperties(this.getRemainingExtendedProperties(elementProperties)); + } + else + { + handleMissingMetadataInstance(beanClass.getName(), OpenMetadataElement.class.getName(), methodName); + } + + bean.setProperties(collectionProperties); + } + + return returnBean; + } + catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) + { + super.handleInvalidBeanClass(beanClass.getName(), error, methodName); + } + + return null; + } + + + + /** + * Using the supplied openMetadataElement, return a new instance of the bean. This is used for most beans that have + * a one to one correspondence with the repository instances. + * + * @param beanClass name of the class to create + * @param relatedMetadataElement the properties of an open metadata element plus details of the relationship used to navigate to it + * @param methodName calling method + * @return bean populated with properties from the instances supplied + * @throws PropertyServerException there is a problem instantiating the bean + */ + @Override + public B getNewBean(Class beanClass, + RelatedMetadataElement relatedMetadataElement, + String methodName) throws PropertyServerException + { + try + { + /* + * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. + */ + B returnBean = beanClass.getDeclaredConstructor().newInstance(); + + if (returnBean instanceof CollectionElement bean) + { + CollectionProperties collectionProperties = new CollectionProperties(); + OpenMetadataElement openMetadataElement = relatedMetadataElement.getElement(); + + bean.setElementHeader(super.getMetadataElementHeader(beanClass, openMetadataElement, methodName)); + + ElementProperties elementProperties; + + /* + * The initial set of values come from the openMetadataElement. + */ + if (openMetadataElement != null) + { + elementProperties = new ElementProperties(openMetadataElement.getElementProperties()); + + collectionProperties.setQualifiedName(this.removeQualifiedName(elementProperties)); + collectionProperties.setAdditionalProperties(this.removeAdditionalProperties(elementProperties)); + collectionProperties.setName(this.removeName(elementProperties)); + collectionProperties.setDescription(this.removeDescription(elementProperties)); + collectionProperties.setCollectionType(this.removeCollectionType(elementProperties)); + collectionProperties.setEffectiveFrom(openMetadataElement.getEffectiveFromTime()); + collectionProperties.setEffectiveTo(openMetadataElement.getEffectiveToTime()); + + /* + * Any remaining properties are returned in the extended properties. They are + * assumed to be defined in a subtype. + */ + collectionProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); + collectionProperties.setExtendedProperties(this.getRemainingExtendedProperties(elementProperties)); + } + else + { + handleMissingMetadataInstance(beanClass.getName(), OpenMetadataElement.class.getName(), methodName); + } + + bean.setProperties(collectionProperties); + + bean.setRelatedElement(super.getRelatedElement(beanClass, relatedMetadataElement, methodName)); + } + + return returnBean; + } + catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) + { + super.handleInvalidBeanClass(beanClass.getName(), error, methodName); + } + + return null; + } + + + /** + * Using the supplied instances, return a new instance of the bean. This is used for beans that + * contain a combination of the properties from an element and that of a connected relationship. + * + * @param beanClass name of the class to create + * @param element element containing the properties + * @param relationship relationship containing the properties + * @param methodName calling method + * @return bean populated with properties from the instances supplied + * @throws PropertyServerException there is a problem instantiating the bean + */ + @SuppressWarnings(value = "unused") + public B getNewBean(Class beanClass, + OpenMetadataElement element, + OpenMetadataRelationship relationship, + String methodName) throws PropertyServerException + { + B returnBean = this.getNewBean(beanClass, element, methodName); + + if (returnBean instanceof CollectionElement bean) + { + bean.setRelatedElement(super.getRelatedElement(beanClass, element, relationship, methodName)); + } + + return returnBean; + } +} diff --git a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/converters/CollectionMemberConverter.java b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/converters/CollectionMemberConverter.java new file mode 100644 index 00000000000..122a2bc5278 --- /dev/null +++ b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/converters/CollectionMemberConverter.java @@ -0,0 +1,140 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.governanceaction.converters; + +import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; +import org.odpi.openmetadata.frameworks.governanceaction.properties.RelatedMetadataElement; +import org.odpi.openmetadata.frameworks.governanceaction.search.ElementProperties; +import org.odpi.openmetadata.frameworks.governanceaction.search.PropertyHelper; +import org.odpi.openmetadata.frameworks.openmetadata.enums.CollectionMemberStatus; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.CollectionMember; +import org.odpi.openmetadata.frameworks.openmetadata.properties.collections.CollectionMembershipProperties; +import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; + +import java.lang.reflect.InvocationTargetException; + + +/** + * CollectionMemberConverter generates a CollectionMember bean from a RelatedMetadataElement. + */ +public class CollectionMemberConverter extends OpenMetadataConverterBase +{ + /** + * Constructor + * + * @param propertyHelper helper object to parse entity + * @param serviceName name of this component + * @param serverName local server name + */ + public CollectionMemberConverter(PropertyHelper propertyHelper, + String serviceName, + String serverName) + { + super(propertyHelper, serviceName, serverName); + } + + + /** + * Using the supplied openMetadataElement, return a new instance of the bean. This is used for most beans that have + * a one to one correspondence with the repository instances. + * + * @param beanClass name of the class to create + * @param relatedMetadataElement the properties of an open metadata element plus details of the relationship used to navigate to it + * @param methodName calling method + * @return bean populated with properties from the instances supplied + * @throws PropertyServerException there is a problem instantiating the bean + */ + @Override + public B getNewBean(Class beanClass, + RelatedMetadataElement relatedMetadataElement, + String methodName) throws PropertyServerException + { + try + { + /* + * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. + */ + B returnBean = beanClass.getDeclaredConstructor().newInstance(); + + if (returnBean instanceof CollectionMember bean) + { + CollectionMembershipProperties membershipProperties = new CollectionMembershipProperties(); + + bean.setRelationshipHeader(super.getMetadataElementHeader(beanClass, + relatedMetadataElement, + relatedMetadataElement.getRelationshipGUID(), + null, + methodName)); + + /* + * The initial set of values come from the relationship properties. + */ + if (relatedMetadataElement.getRelationshipProperties() != null) + { + ElementProperties elementProperties = new ElementProperties(relatedMetadataElement.getRelationshipProperties()); + + membershipProperties.setMembershipRationale(this.removeMembershipRationale(elementProperties)); + membershipProperties.setCreatedBy(this.removeCreatedBy(elementProperties)); + membershipProperties.setExpression(this.removeExpression(elementProperties)); + membershipProperties.setConfidence(this.removeConfidence(elementProperties)); + membershipProperties.setSteward(this.removeSteward(elementProperties)); + membershipProperties.setStewardTypeName(this.removeStewardTypeName(elementProperties)); + membershipProperties.setStewardPropertyName(this.removeStewardPropertyName(elementProperties)); + membershipProperties.setSource(this.removeSource(elementProperties)); + membershipProperties.setNotes(this.removeNotes(elementProperties)); + membershipProperties.setStatus(this.removeCollectionMemberStatus(elementProperties)); + membershipProperties.setEffectiveFrom(relatedMetadataElement.getEffectiveFromTime()); + membershipProperties.setEffectiveTo(relatedMetadataElement.getEffectiveToTime()); + + /* + * Any remaining properties are returned in the extended properties. They are + * assumed to be defined in a subtype. + */ + membershipProperties.setExtendedProperties(this.getRemainingExtendedProperties(elementProperties)); + + bean.setRelationshipProperties(membershipProperties); + } + + bean.setElementHeader(super.getElementStub(beanClass, relatedMetadataElement.getElement(), methodName)); + } + + return returnBean; + } + catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) + { + super.handleInvalidBeanClass(beanClass.getName(), error, methodName); + } + + return null; + } + + + /** + * Extract and delete the CollectionMemberStatus property from the supplied element properties. + * + * @param elementProperties properties from entity + * @return KeyPattern enum + */ + CollectionMemberStatus removeCollectionMemberStatus(ElementProperties elementProperties) + { + final String methodName = "removeCollectionMemberStatus"; + + if (elementProperties != null) + { + String retrievedProperty = propertyHelper.removeEnumProperty(serviceName, + OpenMetadataProperty.MEMBERSHIP_STATUS.name, + elementProperties, + methodName); + + for (CollectionMemberStatus status : CollectionMemberStatus.values()) + { + if (status.getName().equals(retrievedProperty)) + { + return status; + } + } + } + + return null; + } +} diff --git a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/converters/OpenMetadataConverterBase.java b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/converters/OpenMetadataConverterBase.java index d20152c9cc9..f8a7bc92188 100644 --- a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/converters/OpenMetadataConverterBase.java +++ b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/converters/OpenMetadataConverterBase.java @@ -3,12 +3,11 @@ package org.odpi.openmetadata.frameworks.governanceaction.converters; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementClassification; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementControlHeader; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ToDoStatus; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; import org.odpi.openmetadata.frameworks.governanceaction.ffdc.GAFErrorCode; import org.odpi.openmetadata.frameworks.governanceaction.properties.OpenMetadataRelationship; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.frameworks.governanceaction.properties.AttachedClassification; @@ -520,6 +519,44 @@ public ElementHeader getMetadataElementHeader(Class beanC } + + /** + * Extract the properties from the element. + * + * @param beanClass name of the class to create + * @param element from the repository + * @param methodName calling method + * @return filled out element header + * @throws PropertyServerException there is a problem in the use of the generic handlers because + * the converter has been configured with a type of bean that is incompatible with the handler + */ + public MetadataElementSummary getElementSummary(Class beanClass, + OpenMetadataElement element, + String methodName) throws PropertyServerException + { + if (element != null) + { + MetadataElementSummary elementHeader = new MetadataElementSummary(element); + + elementHeader.setGUID(element.getElementGUID()); + elementHeader.setClassifications(this.getElementClassifications(element.getClassifications())); + + if (element.getElementProperties() != null) + { + elementHeader.setProperties(element.getElementProperties().getPropertiesAsStrings()); + } + + return elementHeader; + } + else + { + this.handleMissingMetadataInstance(beanClass.getName(), OpenMetadataElement.class.getName(), methodName); + } + + return null; + } + + /** * Extract the properties from the element. * @@ -645,6 +682,129 @@ protected List getElementClassifications(List beanClass, + OpenMetadataElement element, + OpenMetadataRelationship relationship, + String methodName) throws PropertyServerException + { + RelatedElement relatedElement = new RelatedElement(); + + relatedElement.setRelationshipHeader(this.getMetadataElementHeader(beanClass, relationship, relationship.getRelationshipGUID(), null, methodName)); + + if (relationship != null) + { + ElementProperties instanceProperties = new ElementProperties(relationship.getRelationshipProperties()); + + RelationshipProperties relationshipProperties = new RelationshipProperties(); + + relationshipProperties.setEffectiveFrom(relationship.getEffectiveFromTime()); + relationshipProperties.setEffectiveTo(relationship.getEffectiveToTime()); + relationshipProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); + + relatedElement.setRelationshipProperties(relationshipProperties); + } + else + { + handleMissingMetadataInstance(beanClass.getName(), OpenMetadataRelationship.class.getName(), methodName); + } + + if (element != null) + { + ElementStub elementStub = this.getElementStub(beanClass, element, methodName); + + relatedElement.setRelatedElement(elementStub); + } + else + { + handleMissingMetadataInstance(beanClass.getName(), OpenMetadataElement.class.getName(), methodName); + } + + return relatedElement; + } + + + /** + * Using the supplied instances, return a new instance of a relatedElement bean. This is used for beans that + * contain a combination of the properties from an entity and that of a connected relationship. + * + * @param beanClass name of the class to create + * @param relatedMetadataElement results containing the properties + * @param methodName calling method + * @return bean populated with properties from the instances supplied + * @throws PropertyServerException there is a problem instantiating the bean + */ + public RelatedElement getRelatedElement(Class beanClass, + RelatedMetadataElement relatedMetadataElement, + String methodName) throws PropertyServerException + { + RelatedElement relatedElement = new RelatedElement(); + + relatedElement.setRelationshipHeader(this.getMetadataElementHeader(beanClass, relatedMetadataElement, relatedMetadataElement.getRelationshipGUID(), null, methodName)); + + if (relatedMetadataElement != null) + { + ElementProperties instanceProperties = new ElementProperties(relatedMetadataElement.getRelationshipProperties()); + + RelationshipProperties relationshipProperties = new RelationshipProperties(); + + relationshipProperties.setEffectiveFrom(relatedMetadataElement.getEffectiveFromTime()); + relationshipProperties.setEffectiveTo(relatedMetadataElement.getEffectiveToTime()); + relationshipProperties.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); + + relatedElement.setRelationshipProperties(relationshipProperties); + } + else + { + handleMissingMetadataInstance(beanClass.getName(), OpenMetadataRelationship.class.getName(), methodName); + } + + return relatedElement; + } + + + + + /** + * Extract and delete the ToDoStatus property from the supplied element properties. + * + * @param elementProperties properties from entity + * @return KeyPattern enum + */ + protected ToDoStatus removeToDoStatus(ElementProperties elementProperties) + { + final String methodName = "removeToDoStatus"; + + if (elementProperties != null) + { + String retrievedProperty = propertyHelper.removeEnumProperty(serviceName, + OpenMetadataProperty.TO_DO_STATUS.name, + elementProperties, + methodName); + + for (ToDoStatus status : ToDoStatus.values()) + { + if (status.getName().equals(retrievedProperty)) + { + return status; + } + } + } + + return null; + } + + /** * Extract the qualifiedName property from the supplied element properties. * diff --git a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/converters/ProjectConverter.java b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/converters/ProjectConverter.java new file mode 100644 index 00000000000..675d8c0026b --- /dev/null +++ b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/converters/ProjectConverter.java @@ -0,0 +1,218 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.governanceaction.converters; + +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ProjectElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.projects.ProjectProperties; +import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; +import org.odpi.openmetadata.frameworks.governanceaction.properties.OpenMetadataElement; +import org.odpi.openmetadata.frameworks.governanceaction.properties.RelatedMetadataElement; +import org.odpi.openmetadata.frameworks.governanceaction.properties.OpenMetadataRelationship; +import org.odpi.openmetadata.frameworks.governanceaction.search.ElementProperties; +import org.odpi.openmetadata.frameworks.governanceaction.search.PropertyHelper; + +import java.lang.reflect.InvocationTargetException; + + +/** + * ProjectConverter generates a ProjectElement from a Project entity + */ +public class ProjectConverter extends OpenMetadataConverterBase +{ + /** + * Constructor + * + * @param propertyHelper helper object to parse entity + * @param serviceName name of this component + * @param serverName local server name + */ + public ProjectConverter(PropertyHelper propertyHelper, + String serviceName, + String serverName) + { + super(propertyHelper, serviceName, serverName); + } + + + /** + * Using the supplied openMetadataElement, return a new instance of the bean. This is used for most beans that have + * a one to one correspondence with the repository instances. + * + * @param beanClass name of the class to create + * @param openMetadataElement openMetadataElement containing the properties + * @param methodName calling method + * @return bean populated with properties from the instances supplied + * @throws PropertyServerException there is a problem instantiating the bean + */ + @Override + public B getNewBean(Class beanClass, + OpenMetadataElement openMetadataElement, + String methodName) throws PropertyServerException + { + try + { + /* + * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. + */ + B returnBean = beanClass.getDeclaredConstructor().newInstance(); + + if (returnBean instanceof ProjectElement bean) + { + ProjectProperties projectProperties = new ProjectProperties(); + + bean.setElementHeader(super.getMetadataElementHeader(beanClass, openMetadataElement, methodName)); + + ElementProperties elementProperties; + + /* + * The initial set of values come from the openMetadataElement. + */ + if (openMetadataElement != null) + { + elementProperties = new ElementProperties(openMetadataElement.getElementProperties()); + + projectProperties.setQualifiedName(this.removeQualifiedName(elementProperties)); + projectProperties.setAdditionalProperties(this.removeAdditionalProperties(elementProperties)); + projectProperties.setIdentifier(this.removeIdentifier(elementProperties)); + projectProperties.setName(this.removeName(elementProperties)); + projectProperties.setDescription(this.removeDescription(elementProperties)); + projectProperties.setProjectStatus(this.removeProjectStatus(elementProperties)); + projectProperties.setStartDate(this.removeStartDate(elementProperties)); + projectProperties.setPlannedEndDate(this.removePlannedEndDate(elementProperties)); + projectProperties.setEffectiveFrom(openMetadataElement.getEffectiveFromTime()); + projectProperties.setEffectiveTo(openMetadataElement.getEffectiveToTime()); + + /* + * Any remaining properties are returned in the extended properties. They are + * assumed to be defined in a subtype. + */ + projectProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); + projectProperties.setExtendedProperties(this.getRemainingExtendedProperties(elementProperties)); + } + else + { + handleMissingMetadataInstance(beanClass.getName(), OpenMetadataElement.class.getName(), methodName); + } + + bean.setProperties(projectProperties); + } + + return returnBean; + } + catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) + { + super.handleInvalidBeanClass(beanClass.getName(), error, methodName); + } + + return null; + } + + + + /** + * Using the supplied openMetadataElement, return a new instance of the bean. This is used for most beans that have + * a one to one correspondence with the repository instances. + * + * @param beanClass name of the class to create + * @param relatedMetadataElement the properties of an open metadata element plus details of the relationship used to navigate to it + * @param methodName calling method + * @return bean populated with properties from the instances supplied + * @throws PropertyServerException there is a problem instantiating the bean + */ + @Override + public B getNewBean(Class beanClass, + RelatedMetadataElement relatedMetadataElement, + String methodName) throws PropertyServerException + { + try + { + /* + * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. + */ + B returnBean = beanClass.getDeclaredConstructor().newInstance(); + + if (returnBean instanceof ProjectElement bean) + { + ProjectProperties projectProperties = new ProjectProperties(); + OpenMetadataElement openMetadataElement = relatedMetadataElement.getElement(); + + bean.setElementHeader(super.getMetadataElementHeader(beanClass, openMetadataElement, methodName)); + + ElementProperties elementProperties; + + /* + * The initial set of values come from the openMetadataElement. + */ + if (openMetadataElement != null) + { + elementProperties = new ElementProperties(openMetadataElement.getElementProperties()); + + projectProperties.setQualifiedName(this.removeQualifiedName(elementProperties)); + projectProperties.setAdditionalProperties(this.removeAdditionalProperties(elementProperties)); + projectProperties.setIdentifier(this.removeIdentifier(elementProperties)); + projectProperties.setName(this.removeName(elementProperties)); + projectProperties.setDescription(this.removeDescription(elementProperties)); + projectProperties.setProjectStatus(this.removeProjectStatus(elementProperties)); + projectProperties.setProjectHealth(this.removeProjectHealth(elementProperties)); + projectProperties.setProjectPhase(this.removeProjectPhase(elementProperties)); + projectProperties.setPriority(this.removeIntPriority(elementProperties)); + projectProperties.setStartDate(this.removeStartDate(elementProperties)); + projectProperties.setPlannedEndDate(this.removePlannedEndDate(elementProperties)); + projectProperties.setEffectiveFrom(openMetadataElement.getEffectiveFromTime()); + projectProperties.setEffectiveTo(openMetadataElement.getEffectiveToTime()); + + /* + * Any remaining properties are returned in the extended properties. They are + * assumed to be defined in a subtype. + */ + projectProperties.setTypeName(bean.getElementHeader().getType().getTypeName()); + projectProperties.setExtendedProperties(this.getRemainingExtendedProperties(elementProperties)); + } + else + { + handleMissingMetadataInstance(beanClass.getName(), OpenMetadataElement.class.getName(), methodName); + } + + bean.setProperties(projectProperties); + + bean.setRelatedElement(super.getRelatedElement(beanClass, relatedMetadataElement, methodName)); + } + + return returnBean; + } + catch (IllegalAccessException | InstantiationException | ClassCastException | NoSuchMethodException | InvocationTargetException error) + { + super.handleInvalidBeanClass(beanClass.getName(), error, methodName); + } + + return null; + } + + + /** + * Using the supplied instances, return a new instance of the bean. This is used for beans that + * contain a combination of the properties from an element and that of a connected relationship. + * + * @param beanClass name of the class to create + * @param element element containing the properties + * @param relationship relationship containing the properties + * @param methodName calling method + * @return bean populated with properties from the instances supplied + * @throws PropertyServerException there is a problem instantiating the bean + */ + @SuppressWarnings(value = "unused") + public B getNewBean(Class beanClass, + OpenMetadataElement element, + OpenMetadataRelationship relationship, + String methodName) throws PropertyServerException + { + B returnBean = this.getNewBean(beanClass, element, methodName); + + if (returnBean instanceof ProjectElement bean) + { + bean.setRelatedElement(super.getRelatedElement(beanClass, element, relationship, methodName)); + } + + return returnBean; + } +} diff --git a/open-metadata-implementation/access-services/project-management/project-management-client/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/client/converters/TeamMemberConverter.java b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/converters/TeamMemberConverter.java similarity index 94% rename from open-metadata-implementation/access-services/project-management/project-management-client/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/client/converters/TeamMemberConverter.java rename to open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/converters/TeamMemberConverter.java index 39100dd680c..b8b4288bf2f 100644 --- a/open-metadata-implementation/access-services/project-management/project-management-client/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/client/converters/TeamMemberConverter.java +++ b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/converters/TeamMemberConverter.java @@ -1,8 +1,8 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.projectmanagement.client.converters; +package org.odpi.openmetadata.frameworks.governanceaction.converters; -import org.odpi.openmetadata.accessservices.projectmanagement.metadataelements.ProjectTeamMember; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ProjectTeamMember; import org.odpi.openmetadata.frameworks.openmetadata.properties.projects.ProjectTeamProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.governanceaction.properties.RelatedMetadataElement; @@ -15,7 +15,7 @@ /** * TeamMemberConverter generates a CollectionMember bean from a RelatedMetadataElement. */ -public class TeamMemberConverter extends ProjectManagementConverterBase +public class TeamMemberConverter extends OpenMetadataConverterBase { /** * Constructor diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-client/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/client/converters/ToDoConverter.java b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/converters/ToDoConverter.java similarity index 86% rename from open-metadata-implementation/access-services/community-profile/community-profile-client/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/client/converters/ToDoConverter.java rename to open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/converters/ToDoConverter.java index 38366078919..86a9f86ae79 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-client/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/client/converters/ToDoConverter.java +++ b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/converters/ToDoConverter.java @@ -1,13 +1,13 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.client.converters; +package org.odpi.openmetadata.frameworks.governanceaction.converters; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.ActionTargetElement; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.ToDoElement; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ActionTargetProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ToDoProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ToDoActionTargetElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ToDoElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actions.ToDoActionTargetProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actions.ToDoProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementStub; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.frameworks.governanceaction.properties.OpenMetadataElement; import org.odpi.openmetadata.frameworks.governanceaction.properties.RelatedMetadataElement; @@ -22,7 +22,7 @@ /** * ToDoConverter generates a ToDoElement from a "To Do" entity */ -public class ToDoConverter extends CommunityProfileConverterBase +public class ToDoConverter extends OpenMetadataConverterBase { /** * Constructor @@ -106,8 +106,8 @@ public B getNewComplexBean(Class beanClass, if (relationships != null) { List assignedActors = new ArrayList<>(); - List sponsors = new ArrayList<>(); - List actionTargets = new ArrayList<>(); + List sponsors = new ArrayList<>(); + List actionTargets = new ArrayList<>(); for (RelatedMetadataElement relatedMetadataElement : relationships) { @@ -127,17 +127,19 @@ else if (propertyHelper.isTypeOf(relatedMetadataElement, OpenMetadataType.ACTION } else if (propertyHelper.isTypeOf(relatedMetadataElement, OpenMetadataType.ACTION_TARGET_RELATIONSHIP_TYPE_NAME)) { - ActionTargetElement actionTargetElement = new ActionTargetElement(); + ToDoActionTargetElement actionTargetElement = new ToDoActionTargetElement(); - actionTargetElement.setTargetElement(relatedMetadataElement.getElement()); + actionTargetElement.setTargetElement(super.getElementSummary(beanClass, + relatedMetadataElement.getElement(), + methodName)); actionTargetElement.setRelationshipHeader(super.getMetadataElementHeader(beanClass, relatedMetadataElement, relatedMetadataElement.getRelationshipGUID(), null, methodName)); - ActionTargetProperties actionTargetProperties = new ActionTargetProperties(); - ElementProperties relationshipProperties = new ElementProperties(relatedMetadataElement.getRelationshipProperties()); + ToDoActionTargetProperties actionTargetProperties = new ToDoActionTargetProperties(); + ElementProperties relationshipProperties = new ElementProperties(relatedMetadataElement.getRelationshipProperties()); actionTargetProperties.setActionTargetName(removeActionTargetName(relationshipProperties)); actionTargetProperties.setStatus(removeToDoStatus(relationshipProperties)); diff --git a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/ArchiveProperties.java b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/ArchiveProperties.java deleted file mode 100644 index 80833715290..00000000000 --- a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/ArchiveProperties.java +++ /dev/null @@ -1,176 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.frameworks.governanceaction.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.io.Serial; -import java.io.Serializable; -import java.util.Date; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ArchiveProperties defined the properties that are stored when a data source is archived or deleted. This - * allows the Asset to remain in the metadata repository after the real-world artifact has gone. This is important - * to prevent lineage graphs from becoming fragmented. - */ -@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class ArchiveProperties -{ - private Date archiveDate = null; - private String archiveProcess = null; - private Map archiveProperties = null; - - - /** - * Default constructor - */ - public ArchiveProperties() - { - super(); - } - - - /** - * Copy/clone constructor for the template properties. - * - * @param template template object to copy. - */ - public ArchiveProperties(ArchiveProperties template) - { - if (template != null) - { - archiveDate = template.getArchiveDate(); - archiveProcess = template.getArchiveProcess(); - archiveProperties = template.getArchiveProperties(); - } - } - - - /** - * Returns the date when the data source was archived (or discovered missing). Null means "now". - * - * @return date of archive - */ - public Date getArchiveDate() - { - return archiveDate; - } - - - /** - * Set up the date when the data source was archived (or discovered missing). Null means "now". - * - * @param archiveDate date of archive - */ - public void setArchiveDate(Date archiveDate) - { - this.archiveDate = archiveDate; - } - - - /** - * Returns the name of the process that either performed the archive or detected the missing data source. - * - * @return String name - */ - public String getArchiveProcess() - { - return archiveProcess; - } - - - /** - * Set up the name of the process that either performed the archive or detected the missing data source. - * - * @param archiveProcess String name - */ - public void setArchiveProcess(String archiveProcess) - { - this.archiveProcess = archiveProcess; - } - - - /** - * Return the properties that characterize where the data source was archived to. - * - * @return map of name value pairs, all strings - */ - public Map getArchiveProperties() - { - return archiveProperties; - } - - - /** - * Set up the properties that characterize where the data source was archived to. - * - * @param archiveProperties map of name value pairs, all strings - */ - public void setArchiveProperties(Map archiveProperties) - { - this.archiveProperties = archiveProperties; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "ArchiveProperties{" + - "archiveDate=" + archiveDate + - ", archiveProcess='" + archiveProcess + '\'' + - ", archiveProperties='" + archiveProperties + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ArchiveProperties that = (ArchiveProperties) objectToCompare; - return Objects.equals(archiveDate, that.archiveDate) && - Objects.equals(archiveProcess, that.archiveProcess) && - Objects.equals(archiveProperties, that.archiveProperties); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(archiveDate, archiveProcess, archiveProperties); - } -} diff --git a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/AttachedClassification.java b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/AttachedClassification.java index 9d321521ce9..514b867050f 100644 --- a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/AttachedClassification.java +++ b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/AttachedClassification.java @@ -5,7 +5,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementClassificationHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementClassificationHeader; import org.odpi.openmetadata.frameworks.governanceaction.search.ElementProperties; import java.util.Date; diff --git a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/CatalogTarget.java b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/CatalogTarget.java index 56f4e652ad2..91df912c080 100644 --- a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/CatalogTarget.java +++ b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/CatalogTarget.java @@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementStub; import java.util.Objects; diff --git a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/EngineActionElement.java b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/EngineActionElement.java index ece89e06504..6b4e3afcc0d 100644 --- a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/EngineActionElement.java +++ b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/EngineActionElement.java @@ -7,7 +7,8 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import org.odpi.openmetadata.frameworks.openmetadata.enums.EngineActionStatus; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ReferenceableProperties; import java.util.Date; import java.util.List; @@ -45,9 +46,9 @@ public class EngineActionElement extends ReferenceableProperties private String requestType = null; private Map requestParameters = null; private List requestSourceElements = null; - private List actionTargetElements = null; - private EngineActionStatus actionStatus = null; - private Date requestedTime = null; + private List actionTargetElements = null; + private EngineActionStatus actionStatus = null; + private Date requestedTime = null; private Date requestedStartTime = null; private Date startTime = null; private String processingEngineUserId = null; diff --git a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/GovernanceActionProcessElement.java b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/GovernanceActionProcessElement.java index 13293c2dd18..f36f43b928e 100644 --- a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/GovernanceActionProcessElement.java +++ b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/GovernanceActionProcessElement.java @@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; import java.util.List; import java.util.Map; diff --git a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/GovernanceActionProcessProperties.java b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/GovernanceActionProcessProperties.java index 1e0411dde7e..e742f92cee5 100644 --- a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/GovernanceActionProcessProperties.java +++ b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/GovernanceActionProcessProperties.java @@ -5,6 +5,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ReferenceableProperties; import java.util.*; diff --git a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/GovernanceActionProcessStepElement.java b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/GovernanceActionProcessStepElement.java index b93b861d7eb..5a348a5cbcb 100644 --- a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/GovernanceActionProcessStepElement.java +++ b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/GovernanceActionProcessStepElement.java @@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; import java.util.List; import java.util.Map; diff --git a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/GovernanceActionTypeElement.java b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/GovernanceActionTypeElement.java index d360721cbe0..17ed986a3bf 100644 --- a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/GovernanceActionTypeElement.java +++ b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/GovernanceActionTypeElement.java @@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; import java.util.List; import java.util.Map; diff --git a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/GovernanceActionTypeProperties.java b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/GovernanceActionTypeProperties.java index 8bb206460b3..0f773874b1f 100644 --- a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/GovernanceActionTypeProperties.java +++ b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/GovernanceActionTypeProperties.java @@ -9,6 +9,7 @@ import org.odpi.openmetadata.frameworks.governanceaction.controls.ActionTargetType; import org.odpi.openmetadata.frameworks.governanceaction.controls.GuardType; import org.odpi.openmetadata.frameworks.governanceaction.controls.RequestParameterType; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ReferenceableProperties; import java.util.List; import java.util.Map; diff --git a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/GovernanceEngineElement.java b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/GovernanceEngineElement.java index a3d19432376..8e9e172e18f 100644 --- a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/GovernanceEngineElement.java +++ b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/GovernanceEngineElement.java @@ -6,10 +6,8 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; -import java.io.Serial; -import java.io.Serializable; import java.util.Objects; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; diff --git a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/GovernanceEngineProperties.java b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/GovernanceEngineProperties.java index 207b84bf38b..caab22954e0 100644 --- a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/GovernanceEngineProperties.java +++ b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/GovernanceEngineProperties.java @@ -5,6 +5,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ReferenceableProperties; import java.util.Objects; diff --git a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/GovernanceServiceElement.java b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/GovernanceServiceElement.java index 934e8cddd99..af3220f3c52 100644 --- a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/GovernanceServiceElement.java +++ b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/GovernanceServiceElement.java @@ -6,10 +6,8 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; -import java.io.Serial; -import java.io.Serializable; import java.util.Objects; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; diff --git a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/GovernanceServiceProperties.java b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/GovernanceServiceProperties.java index 56ae3c0d053..8014df5fe3a 100644 --- a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/GovernanceServiceProperties.java +++ b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/GovernanceServiceProperties.java @@ -4,6 +4,7 @@ import com.fasterxml.jackson.annotation.*; import org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ReferenceableProperties; import java.util.*; diff --git a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/IntegrationConnectorElement.java b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/IntegrationConnectorElement.java index 512090ffcf0..3ffb2368cc7 100644 --- a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/IntegrationConnectorElement.java +++ b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/IntegrationConnectorElement.java @@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; import java.util.List; import java.util.Objects; diff --git a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/IntegrationConnectorProperties.java b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/IntegrationConnectorProperties.java index 1307acb15f6..89b313eed6c 100644 --- a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/IntegrationConnectorProperties.java +++ b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/IntegrationConnectorProperties.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ReferenceableProperties; import java.util.Objects; diff --git a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/IntegrationGroupElement.java b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/IntegrationGroupElement.java index 5d713afae18..0182d27b88f 100644 --- a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/IntegrationGroupElement.java +++ b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/IntegrationGroupElement.java @@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; import java.util.Objects; diff --git a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/IntegrationGroupProperties.java b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/IntegrationGroupProperties.java index 3a685c8d289..48e5de59f1e 100644 --- a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/IntegrationGroupProperties.java +++ b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/IntegrationGroupProperties.java @@ -5,6 +5,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ReferenceableProperties; import java.util.Objects; diff --git a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/IntegrationReport.java b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/IntegrationReport.java index 9eeb68086be..603974067f9 100644 --- a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/IntegrationReport.java +++ b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/IntegrationReport.java @@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; import java.util.Objects; diff --git a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/NextGovernanceActionProcessStepLink.java b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/NextGovernanceActionProcessStepLink.java index 7aa6fb2080e..25ced94aa1c 100644 --- a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/NextGovernanceActionProcessStepLink.java +++ b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/NextGovernanceActionProcessStepLink.java @@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementStub; import java.util.Objects; diff --git a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/OpenMetadataElement.java b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/OpenMetadataElement.java index 964a512059a..bc0181fbc10 100644 --- a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/OpenMetadataElement.java +++ b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/OpenMetadataElement.java @@ -3,10 +3,9 @@ package org.odpi.openmetadata.frameworks.governanceaction.properties; import com.fasterxml.jackson.annotation.*; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementControlHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementControlHeader; import org.odpi.openmetadata.frameworks.governanceaction.search.ElementProperties; -import java.io.Serial; import java.util.*; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; diff --git a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/OpenMetadataRelationship.java b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/OpenMetadataRelationship.java index 0ebf401ded0..60b4d991e40 100644 --- a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/OpenMetadataRelationship.java +++ b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/OpenMetadataRelationship.java @@ -5,9 +5,9 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementControlHeader; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementType; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementControlHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementType; import org.odpi.openmetadata.frameworks.governanceaction.search.ElementProperties; import java.util.Date; diff --git a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/OpenMetadataTypeDef.java b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/OpenMetadataTypeDef.java index fced73496e3..da8143bb5d5 100644 --- a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/OpenMetadataTypeDef.java +++ b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/OpenMetadataTypeDef.java @@ -7,11 +7,9 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStatus; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ElementStatus; -import java.util.ArrayList; import java.util.Date; -import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Objects; diff --git a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/ProcessStatus.java b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/ProcessStatus.java deleted file mode 100644 index 7ecc9a94ade..00000000000 --- a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/ProcessStatus.java +++ /dev/null @@ -1,139 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.frameworks.governanceaction.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * The ProcessStatus defines the status of a process. It effectively - * defines its visibility to different types of queries. Most queries by default will only return instances in the - * active status. - *
            - *
          • Unknown: Unknown process status.
          • - *
          • Draft: The process is incomplete.
          • - *
          • Proposed: The process is in review.
          • - *
          • Approved: The process is approved.
          • - *
          • Active: The process is approved and in use.
          • - *
          - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public enum ProcessStatus -{ - /** - * Unknown process status. - */ - UNKNOWN (0,0, "","Unknown process status."), - - /** - * The process is incomplete. - */ - DRAFT (1,1, "Draft", "The process is incomplete."), - - /** - * The process is in review. - */ - PROPOSED (2,3, "Proposed", "The process is in review."), - - /** - * The process is approved. - */ - APPROVED (3,4, "Approved", "The process is approved."), - - /** - * The process is approved and in use. - */ - ACTIVE (4,15, "Active", "The process is approved and in use."); - - - private final int ordinal; - private final int openTypeOrdinal; - private final String name; - private final String description; - - - /** - * Constructor to set up the instance of this enum. - * - * @param ordinal code number - * @param openTypeOrdinal code number from the equivalent Enum Type - * @param name default name - * @param description default description - */ - ProcessStatus(int ordinal, - int openTypeOrdinal, - String name, - String description) - { - this.ordinal = ordinal; - this.openTypeOrdinal = openTypeOrdinal; - this.name = name; - this.description = description; - } - - /** - * Return the code for this enum instance - * - * @return int key pattern code - */ - public int getOrdinal() - { - return ordinal; - } - - - /** - * Return the code for this enum that comes from the Open Metadata Type that this enum represents. - * - * @return int code number - */ - public int getOpenTypeOrdinal() - { - return openTypeOrdinal; - } - - - - /** - * Return the default name for this enum instance. - * - * @return String default name - */ - public String getName() - { - return name; - } - - - /** - * Return the default description for the key pattern for this enum instance. - * - * @return String default description - */ - public String getDescription() - { - return description; - } - - - /** - * toString() JSON-style - * - * @return string description - */ - @Override - public String toString() - { - return "ProcessStatus{" + - "ordinal=" + ordinal + - ", openTypeOrdinal=" + openTypeOrdinal + - ", name='" + name + '\'' + - ", description='" + description + '\'' + - '}'; - }} diff --git a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/ReferenceableProperties.java b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/ReferenceableProperties.java deleted file mode 100644 index 0377745e893..00000000000 --- a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/ReferenceableProperties.java +++ /dev/null @@ -1,156 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.frameworks.governanceaction.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; - -import java.io.Serializable; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * Many open metadata entities are referenceable. It means that they have a qualified name and additional properties. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes( - { - @JsonSubTypes.Type(value = GovernanceActionProcessProperties.class, name = "GovernanceActionProcessProperties"), - }) -public class ReferenceableProperties -{ - private String qualifiedName = null; - private Map additionalProperties = null; - - - /** - * Default constructor - */ - public ReferenceableProperties() - { - super(); - } - - - /** - * Copy/clone constructor. Retrieves values from the supplied template - * - * @param template element to copy - */ - public ReferenceableProperties(ReferenceableProperties template) - { - if (template != null) - { - qualifiedName = template.getQualifiedName(); - additionalProperties = template.getAdditionalProperties(); - } - } - - - /** - * Set up the fully qualified name. - * - * @param qualifiedName String name - */ - public void setQualifiedName(String qualifiedName) - { - this.qualifiedName = qualifiedName; - } - - - /** - * Returns the stored qualified name property for the metadata entity. - * If no qualified name is available then the empty string is returned. - * - * @return qualifiedName - */ - public String getQualifiedName() - { - return qualifiedName; - } - - - /** - * Set up additional properties. - * - * @param additionalProperties Additional properties object - */ - public void setAdditionalProperties(Map additionalProperties) - { - this.additionalProperties = additionalProperties; - } - - - /** - * Return a copy of the additional properties. Null means no additional properties are available. - * - * @return AdditionalProperties - */ - public Map getAdditionalProperties() - { - return additionalProperties; - } - - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "ReferenceableProperties{" + - "qualifiedName='" + qualifiedName + '\'' + - ", additionalProperties=" + additionalProperties + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ReferenceableProperties that = (ReferenceableProperties) objectToCompare; - return Objects.equals(qualifiedName, that.qualifiedName) && - Objects.equals(additionalProperties, that.additionalProperties); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(qualifiedName, additionalProperties); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/RegisteredGovernanceServiceElement.java b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/RegisteredGovernanceServiceElement.java index 6cf354787e5..485d78a08b2 100644 --- a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/RegisteredGovernanceServiceElement.java +++ b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/RegisteredGovernanceServiceElement.java @@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; import java.util.Objects; diff --git a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/RelatedEngineActionElement.java b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/RelatedEngineActionElement.java index b1032bfb44a..cab1369dff3 100644 --- a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/RelatedEngineActionElement.java +++ b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/RelatedEngineActionElement.java @@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementStub; import java.util.Objects; diff --git a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/RelatedMetadataElement.java b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/RelatedMetadataElement.java index 410f7e07006..921c27af32c 100644 --- a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/RelatedMetadataElement.java +++ b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/RelatedMetadataElement.java @@ -3,8 +3,8 @@ package org.odpi.openmetadata.frameworks.governanceaction.properties; import com.fasterxml.jackson.annotation.*; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementControlHeader; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementType; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementControlHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementType; import org.odpi.openmetadata.frameworks.governanceaction.search.ElementProperties; import java.util.*; diff --git a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/RelatedMetadataElementStub.java b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/RelatedMetadataElementStub.java index ddb6699003a..32c3504da2b 100644 --- a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/RelatedMetadataElementStub.java +++ b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/RelatedMetadataElementStub.java @@ -6,12 +6,11 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementStub; import org.odpi.openmetadata.frameworks.governanceaction.search.ElementProperties; import org.odpi.openmetadata.frameworks.governanceaction.search.PropertyHelper; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import java.util.Objects; diff --git a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/search/ElementProperties.java b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/search/ElementProperties.java index 1529bf55f8d..a52fa3afc0c 100644 --- a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/search/ElementProperties.java +++ b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/search/ElementProperties.java @@ -5,8 +5,6 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.governanceaction.ffdc.GAFErrorCode; -import org.odpi.openmetadata.frameworks.governanceaction.ffdc.GAFRuntimeException; import java.util.*; diff --git a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/search/PropertyHelper.java b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/search/PropertyHelper.java index aaa894f5bc4..f9bb98cd8de 100644 --- a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/search/PropertyHelper.java +++ b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/search/PropertyHelper.java @@ -3,7 +3,7 @@ package org.odpi.openmetadata.frameworks.governanceaction.search; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementControlHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementControlHeader; import org.odpi.openmetadata.frameworks.governanceaction.ffdc.GAFErrorCode; import org.odpi.openmetadata.frameworks.governanceaction.ffdc.GAFRuntimeException; import org.odpi.openmetadata.frameworks.governanceaction.properties.AttachedClassification; diff --git a/open-metadata-implementation/frameworks/open-connector-framework/build.gradle b/open-metadata-implementation/frameworks/open-connector-framework/build.gradle index 19e49019bad..094d0d9ae27 100644 --- a/open-metadata-implementation/frameworks/open-connector-framework/build.gradle +++ b/open-metadata-implementation/frameworks/open-connector-framework/build.gradle @@ -10,6 +10,7 @@ dependencies { compileOnly 'com.fasterxml.jackson.core:jackson-annotations' implementation project(':open-metadata-implementation:frameworks:audit-log-framework') implementation project(':open-metadata-implementation:frameworks:open-metadata-framework') + implementation project(':open-metadata-implementation:frameworks:open-metadata-framework') testImplementation 'org.testng:testng' } diff --git a/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/ConnectorBase.java b/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/ConnectorBase.java index 8bd4aa4cca1..f62c9389f1d 100644 --- a/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/ConnectorBase.java +++ b/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/ConnectorBase.java @@ -5,7 +5,7 @@ import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; import org.odpi.openmetadata.frameworks.connectors.properties.AssetUniverse; import org.odpi.openmetadata.frameworks.connectors.properties.Connections; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementType; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementType; import org.odpi.openmetadata.frameworks.connectors.properties.beans.Endpoint; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/AssetDescriptor.java b/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/AssetDescriptor.java index 2e54c1f302e..924ed893add 100644 --- a/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/AssetDescriptor.java +++ b/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/AssetDescriptor.java @@ -3,7 +3,7 @@ package org.odpi.openmetadata.frameworks.connectors.properties; import org.odpi.openmetadata.frameworks.connectors.properties.beans.Asset; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementType; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementType; import java.util.ArrayList; import java.util.List; diff --git a/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/AssetElementHeader.java b/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/AssetElementHeader.java index 042b241a3de..f1c0b416bb7 100644 --- a/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/AssetElementHeader.java +++ b/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/AssetElementHeader.java @@ -3,11 +3,11 @@ package org.odpi.openmetadata.frameworks.connectors.properties; import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementBase; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementClassification; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementOrigin; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStatus; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementType; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementVersions; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementClassification; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementOrigin; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ElementStatus; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementType; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementVersions; import java.util.List; import java.util.Map; diff --git a/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/AssetElementOrigin.java b/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/AssetElementOrigin.java index e3127d62477..46779954964 100644 --- a/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/AssetElementOrigin.java +++ b/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/AssetElementOrigin.java @@ -5,8 +5,8 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementOrigin; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementOriginCategory; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementOrigin; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ElementOriginCategory; import java.util.Objects; diff --git a/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/ClassificationOrigin.java b/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/ClassificationOrigin.java deleted file mode 100644 index 8eb75a3d0d9..00000000000 --- a/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/ClassificationOrigin.java +++ /dev/null @@ -1,98 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.frameworks.connectors.properties.beans; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ClassificationOrigin describes the provenance of a classification attached to an entity. Most classifications - * are explicitly assigned to an entity. However, it is possible for some classifications to flow along - * relationships to other entities. These are the propagated classifications. Each entity can only have one - * classification of a certain type. A propagated classification can not override an assigned classification. - * Classifications can only be attached to entities of specific types. However a propagated classification can - * flow through an entity that does not support the particular type of classification and then on to other - * relationships attached to the entity. The ClassificationPropagateRule in the relationship's RelationshipDef - * defines where the classification can flow to. - *

          - * Note: the repository services have no mechanism to automatically propagate classifications. This is set up by higher - * level services working with knowledge of the specific instance types of metadata and their significance. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public enum ClassificationOrigin -{ - /** - * The classification is explicitly assigned to the entity. - */ - ASSIGNED (0, "Assigned", "The classification is explicitly assigned to the entity"), - - /** - * The classification has propagated along a relationship to this entity. - */ - PROPAGATED (1, "Propagated", "The classification has propagated along a relationship to this entity"); - - private final int ordinal; - private final String name; - private final String description; - - - /** - * Default constructor for the classification origin. - * - * @param ordinal numerical representation of the classification origin - * @param name default string name of the classification origin - * @param description default string description of the classification origin - */ - ClassificationOrigin(int ordinal, String name, String description) - { - this.ordinal = ordinal; - this.name = name; - this.description = description; - } - - - /** - * Return the numeric representation of the classification origin. - * - * @return int ordinal - */ - public int getOrdinal() { return ordinal; } - - - /** - * Return the default name of the classification origin. - * - * @return String name - */ - public String getName() { return name; } - - - /** - * Return the default description of the classification origin. - * - * @return String description - */ - public String getDescription() { return description; } - - - /** - * toString() JSON-style - * - * @return string description - */ - @Override - public String toString() - { - return "ClassificationOrigin{" + - "ordinal=" + ordinal + - ", name='" + name + '\'' + - ", description='" + description + '\'' + - '}'; - } -} diff --git a/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/Connection.java b/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/Connection.java index 7d7e9342475..08dea9bf912 100644 --- a/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/Connection.java +++ b/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/Connection.java @@ -3,8 +3,8 @@ package org.odpi.openmetadata.frameworks.connectors.properties.beans; import com.fasterxml.jackson.annotation.*; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementType; -import java.util.HashMap; import java.util.Map; import java.util.Objects; diff --git a/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/ConnectorType.java b/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/ConnectorType.java index c27cc42158c..db7ac4dcf76 100644 --- a/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/ConnectorType.java +++ b/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/ConnectorType.java @@ -5,6 +5,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementType; import java.util.List; import java.util.Objects; diff --git a/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/ElementBase.java b/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/ElementBase.java index eeeb12f0fb2..48fcd55a9c5 100644 --- a/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/ElementBase.java +++ b/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/ElementBase.java @@ -3,6 +3,7 @@ package org.odpi.openmetadata.frameworks.connectors.properties.beans; import com.fasterxml.jackson.annotation.*; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; import java.util.*; diff --git a/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/ElementControlHeader.java b/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/ElementControlHeader.java deleted file mode 100644 index 3d0e617d587..00000000000 --- a/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/ElementControlHeader.java +++ /dev/null @@ -1,216 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.frameworks.connectors.properties.beans; - -import com.fasterxml.jackson.annotation.*; - -import java.util.*; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * The ElementControlHeader bean provides details of the origin and changes associated with the element. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes( - { - @JsonSubTypes.Type(value = ElementClassificationHeader.class, name = "ElementClassificationHeader"), - @JsonSubTypes.Type(value = ElementHeader.class, name = "ElementHeader"), - }) -public class ElementControlHeader extends PropertyBase -{ - /* - * Common header for first class elements from a metadata repository - */ - private ElementStatus status = null; - private ElementType type = null; - private ElementOrigin origin = null; - private ElementVersions versions = null; - - - /** - * Default constructor used by subclasses - */ - public ElementControlHeader() - { - } - - - /** - * Copy/clone constructor. - * - * @param template element to copy - */ - public ElementControlHeader(ElementControlHeader template) - { - super(template); - - if (template != null) - { - status = template.getStatus(); - type = template.getType(); - origin = template.getOrigin(); - versions = template.getVersions(); - } - } - - - /** - * Return the current status of the element - typically ACTIVE. - * - * @return status enum - */ - public ElementStatus getStatus() - { - return status; - } - - - /** - * Set up the current status of the element - typically ACTIVE. - * - * @param status status enum - */ - public void setStatus(ElementStatus status) - { - this.status = status; - } - - - /** - * Return the element type properties for this properties object. These values are set up by the metadata repository - * and define details to the metadata entity used to represent this element. - * - * @return ElementType type information. - */ - public ElementType getType() - { - if (type == null) - { - return null; - } - else - { - return type; - } - } - - - /** - * Set up the type of this element. - * - * @param type element type properties - */ - public void setType(ElementType type) - { - this.type = type; - } - - - /** - * Return information about the origin of the element. This includes the metadata collection and license. - * - * @return element origin object - */ - public ElementOrigin getOrigin() - { - return origin; - } - - - /** - * Set up information about the origin of the element. This includes the metadata collection and license. - * - * @param origin element origin object - */ - public void setOrigin(ElementOrigin origin) - { - this.origin = origin; - } - - - /** - * Return detail of the element's current version and the users responsible for maintaining it. - * - * @return ElementVersion object - */ - public ElementVersions getVersions() - { - return versions; - } - - - /** - * Set up detail of the element's current version and the users responsible for maintaining it. - * - * @param versions ElementVersion object - */ - public void setVersions(ElementVersions versions) - { - this.versions = versions; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "ElementControlHeader{" + - "status=" + status + - ", type=" + type + - ", origin=" + origin + - ", versions=" + versions + - ", headerVersion=" + getHeaderVersion() + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - ElementControlHeader that = (ElementControlHeader) objectToCompare; - return status == that.status && Objects.equals(type, that.type) - && Objects.equals(origin, that.origin) && - Objects.equals(versions, that.versions); - } - - - /** - * Create a hash code for this element type. - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(status, type, origin, versions); - } -} diff --git a/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/ElementOriginCategory.java b/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/ElementOriginCategory.java deleted file mode 100644 index e3797ad641a..00000000000 --- a/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/ElementOriginCategory.java +++ /dev/null @@ -1,137 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.frameworks.connectors.properties.beans; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ElementOriginCategory defines where the metadata comes from. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public enum ElementOriginCategory -{ - /** - * Unknown provenance. - */ - UNKNOWN (0, "", "Unknown provenance"), - - /** - * The element is being maintained within one of the local cohort members. The metadata collection id is for one of the - * repositories in the cohort. This metadata collection id identifies the home repository for this element. - */ - LOCAL_COHORT (1, "Local to cohort", "The element is being maintained within one of the local cohort members. " + - "The metadata collection id is for one of the repositories in the cohort. " + - "This metadata collection id identifies the home repository for this element. "), - - /** - * The element was created from an export archive. The metadata collection id for the element is the metadata - * collection id of the originating server. If the originating server later joins the cohort with the same - * metadata collection id then these elements will be refreshed from the originating server's current repository. - */ - EXPORT_ARCHIVE (2, "Export Archive", "The element was created from an export archive. " + - "The metadata collection id for the element is the metadata collection id of the originating server. " + - "If the originating server later joins the cohort with the same metadata collection id " + - "then these elements will be refreshed from the originating server's current repository."), - - /** - * The element comes from an open metadata content pack. The metadata collection id of the elements is set to the GUID of the pack. - */ - CONTENT_PACK (3, "Content Pack", "The element comes from an open metadata content pack. " + - "The metadata collection id of the elements is set to the GUID of the pack."), - - /** - * The element comes from a metadata repository that used to be a member of the one of the local repository's cohorts, but it has been deregistered. - * The metadata collection id remains the same. If the repository rejoins the cohort then these elements can be refreshed from the rejoining repository. - */ - DEREGISTERED_REPOSITORY (4, "Deregistered Repository", "The element comes from a metadata repository that " + - "used to be a member of the one of the local repository's cohorts, but it has been deregistered. " + - "The metadata collection id remains the same. If the repository rejoins the cohort " + - "then these elements can be refreshed from the rejoining repository."), - - /** - * The element is part of a service's configuration. The metadata collection id is null. - */ - CONFIGURATION (5, "Configuration", "The element is part of a service's configuration. The metadata collection id is null."), - - /** - * The element is maintained by an external technology. The metadata collection id is the guid of the technology's descriptive entity. - */ - EXTERNAL_SOURCE (6, "External Source", "The element is maintained by an external technology. The metadata collection id is the guid of the technology's descriptive entity."); - - private static final long serialVersionUID = 1L; - - private final int originCode; - private final String originName; - private final String originDescription; - - - /** - * Constructor for the enum. - * - * @param originCode code number for origin - * @param originName name for origin - * @param originDescription description for origin - */ - ElementOriginCategory(int originCode, String originName, String originDescription) - { - this.originCode = originCode; - this.originName = originName; - this.originDescription = originDescription; - } - - - /** - * Return the code for metadata element. - * - * @return int code for the origin - */ - public int getOrdinal() - { - return originCode; - } - - - /** - * Return the name of the metadata element origin. - * - * @return String name - */ - public String getName() - { - return originName; - } - - - /** - * Return the description of the metadata element origin. - * - * @return String description - */ - public String getDescription() - { - return originDescription; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "ElementOriginCategory{" + - "originCode=" + originCode + - ", originName='" + originName + '\'' + - ", originDescription='" + originDescription + '\'' + - '}'; - } -} diff --git a/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/ElementStatus.java b/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/ElementStatus.java deleted file mode 100644 index 4982b9c0e8e..00000000000 --- a/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/ElementStatus.java +++ /dev/null @@ -1,192 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.frameworks.connectors.properties.beans; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * The ElementStatus defines the status of an element in the metadata collection. It effectively - * defines its visibility to different types of queries. Most queries by default will only return instances not in the - * deleted status. - *
            - *
          • Unknown: Unknown instance status.
          • - *
          • Draft: The content is incomplete.
          • - *
          • Proposed: The content is in review.
          • - *
          • Approved: The content is approved.
          • - *
          • Rejected: The request or proposal is rejected.
          • - *
          • Approved concept: The request or proposal is approved for development.
          • - *
          • Under development: The instance is being developed.
          • - *
          • Development complete: The development of the instance is complete.
          • - *
          • Approved for deployment: The instance is approved for deployment.
          • - *
          • StandBy: The instance is deployed in standby mode.
          • - *
          • Active: The instance is approved and in use.
          • - *
          • Failed: The instance is not in use due to failure.
          • - *
          • Disabled: The instance is shutdown or disabled.
          • - *
          • Complete: The activity associated with the instance is complete.
          • - *
          • Deprecated: The instance is out of date and should not be used.
          • - *
          • Other: The instance is in a locally defined state.
          • - *
          • Deleted: The instance has been deleted and is waiting to be purged. It is kept in the metadata collection - * to support a restore request. It is not returned on normal queries.
          • - *
          - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public enum ElementStatus -{ - /** - * Unknown instance status. - */ - UNKNOWN (0, "", "Unknown instance status."), - - /** - * The content is incomplete. - */ - DRAFT (1, "Draft", "The content is incomplete."), - - /** - * The content is ready for review. - */ - PREPARED (2, "Prepared", "The content is ready for review."), - - /** - * The content is in review. - */ - PROPOSED (3, "Proposed", "The content is in review."), - - /** - * The content is approved. - */ - APPROVED (4, "Approved", "The content is approved."), - - /** - * The request or proposal is rejected. - */ - REJECTED (5, "Rejected", "The request or proposal is rejected."), - - /** - * The request or proposal is approved for development. - */ - APPROVED_CONCEPT (6, "Approved concept", "The request or proposal is approved for development."), - - /** - * The instance is being developed. - */ - UNDER_DEVELOPMENT (7, "Under development", "The instance is being developed."), - - /** - * The development of the instance is complete. - */ - DEVELOPMENT_COMPLETE (8, "Development complete", "The development of the instance is complete."), - - /** - * The instance is approved for deployment. - */ - APPROVED_FOR_DEPLOYMENT (9, "Approved for deployment", "The instance is approved for deployment."), - - /** - * The instance is deployed in standby mode. - */ - STANDBY (10, "StandBy", "The instance is deployed in standby mode."), - - /** - * The instance is approved and in use. - */ - ACTIVE (15, "Active", "The instance is approved and in use."), - - /** - * The instance is not in use due to failure. - */ - FAILED (20, "Failed", "The instance is not in use due to failure."), - - /** - * The instance is shutdown or disabled. - */ - DISABLED (21, "Disabled", "The instance is shutdown or disabled."), - - /** - * The activity associated with the instance is complete. - */ - COMPLETE (22, "Complete", "The activity associated with the instance is complete."), - - /** - * The instance is out of date and should not be used. - */ - DEPRECATED (30, "Deprecated", "The instance is out of date and should not be used."), - - /** - * The instance has been deleted and is no longer available. - */ - DELETED (99, "Deleted", "The instance has been deleted and is no longer available."), - - /** - * The instance is in a locally defined state. - */ - OTHER (50, "Other", "The instance is in a locally defined state."); - - private final int ordinal; - private final String name; - private final String description; - - - /** - * Default constructor sets up the specific values for an enum instance. - * - * @param ordinal int enum value ordinal - * @param name String name - * @param description String description - */ - ElementStatus(int ordinal, - String name, - String description) - { - this.ordinal = ordinal; - this.name = name; - this.description = description; - } - - - /** - * Return the numerical value for the enum. - * - * @return int enum value ordinal - */ - public int getOrdinal() { return ordinal; } - - - /** - * Return the descriptive name for the enum. - * - * @return String name - */ - public String getName() { return name; } - - - /** - * Return the description for the enum. - * - * @return String description - */ - public String getDescription() { return description; } - - - /** - * toString() JSON-style - * - * @return string description - */ - @Override - public String toString() - { - return "InstanceStatus{" + - "ordinal=" + ordinal + - ", name='" + name + '\'' + - ", description='" + description + '\'' + - '}'; - } -} diff --git a/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/Endpoint.java b/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/Endpoint.java index 9c141ad186e..c93b742545a 100644 --- a/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/Endpoint.java +++ b/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/Endpoint.java @@ -5,6 +5,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementType; import java.util.Objects; diff --git a/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/GovernanceClassificationBase.java b/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/GovernanceClassificationBase.java index ca61e06bda3..3c62e7f017a 100644 --- a/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/GovernanceClassificationBase.java +++ b/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/GovernanceClassificationBase.java @@ -7,6 +7,7 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementClassificationHeader; import java.util.Objects; diff --git a/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/LatestChange.java b/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/LatestChange.java index 0c333d083cb..2814284d46d 100644 --- a/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/LatestChange.java +++ b/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/LatestChange.java @@ -8,6 +8,7 @@ import com.fasterxml.jackson.annotation.JsonInclude; import org.odpi.openmetadata.frameworks.openmetadata.enums.LatestChangeAction; import org.odpi.openmetadata.frameworks.openmetadata.enums.LatestChangeTarget; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementClassificationHeader; import java.util.Objects; diff --git a/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/PropertyBase.java b/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/PropertyBase.java index d4fc3cd63f4..715938bbe0d 100644 --- a/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/PropertyBase.java +++ b/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/PropertyBase.java @@ -22,7 +22,6 @@ { @JsonSubTypes.Type(value = RelatedAsset.class, name = "RelatedAsset"), @JsonSubTypes.Type(value = ElementBase.class, name = "ElementBase"), - @JsonSubTypes.Type(value = ElementControlHeader.class, name = "ElementControlHeader"), @JsonSubTypes.Type(value = SchemaAttributeRelationship.class, name = "SchemaAttributeRelationship"), @JsonSubTypes.Type(value = EmbeddedConnection.class, name = "EmbeddedConnection") }) diff --git a/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/SecurityTags.java b/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/SecurityTags.java index 60e57dfe85d..fafb29eff0a 100644 --- a/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/SecurityTags.java +++ b/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/SecurityTags.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementClassificationHeader; import java.util.*; diff --git a/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/VirtualConnection.java b/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/VirtualConnection.java index a88f4bcdf4e..dacebb5787c 100644 --- a/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/VirtualConnection.java +++ b/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/VirtualConnection.java @@ -5,8 +5,8 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementType; -import java.util.ArrayList; import java.util.List; import java.util.Objects; diff --git a/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/TestAssetDetail.java b/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/TestAssetDetail.java index 54e9c086cc6..0b7b991d4bf 100644 --- a/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/TestAssetDetail.java +++ b/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/TestAssetDetail.java @@ -4,8 +4,8 @@ import org.odpi.openmetadata.frameworks.connectors.properties.beans.Asset; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementClassification; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementType; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementClassification; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementType; import org.testng.annotations.Test; import java.util.ArrayList; diff --git a/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/TestAssetSummary.java b/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/TestAssetSummary.java index 14889ee4cbc..8e9c586a64e 100644 --- a/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/TestAssetSummary.java +++ b/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/TestAssetSummary.java @@ -3,9 +3,8 @@ package org.odpi.openmetadata.frameworks.connectors.properties; import org.odpi.openmetadata.frameworks.connectors.properties.beans.Asset; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementClassification; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementType; -import org.odpi.openmetadata.frameworks.openmetadata.enums.AssetOwnerType; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementClassification; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementType; import org.testng.annotations.Test; import java.util.*; diff --git a/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/TestAssetUniverse.java b/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/TestAssetUniverse.java index 87f6aaa1798..82ddc8aa082 100644 --- a/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/TestAssetUniverse.java +++ b/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/TestAssetUniverse.java @@ -4,8 +4,8 @@ import org.odpi.openmetadata.frameworks.connectors.properties.beans.Asset; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementClassification; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementType; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementClassification; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementType; import org.odpi.openmetadata.frameworks.connectors.properties.beans.Meaning; import org.odpi.openmetadata.frameworks.connectors.properties.beans.PrimitiveSchemaType; import org.odpi.openmetadata.frameworks.connectors.properties.beans.SchemaType; diff --git a/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/TestConnectionProperties.java b/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/TestConnectionProperties.java index c812198baa0..7ba8a725700 100644 --- a/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/TestConnectionProperties.java +++ b/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/TestConnectionProperties.java @@ -3,6 +3,8 @@ package org.odpi.openmetadata.frameworks.connectors.properties; import org.odpi.openmetadata.frameworks.connectors.properties.beans.*; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementClassification; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementType; import org.testng.annotations.Test; import java.util.*; diff --git a/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/TestConnectorTypeProperties.java b/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/TestConnectorTypeProperties.java index bb9e9d907c9..4fb559d6dd7 100644 --- a/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/TestConnectorTypeProperties.java +++ b/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/TestConnectorTypeProperties.java @@ -3,6 +3,8 @@ package org.odpi.openmetadata.frameworks.connectors.properties; import org.odpi.openmetadata.frameworks.connectors.properties.beans.*; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementClassification; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementType; import org.testng.annotations.Test; import java.util.*; @@ -15,9 +17,9 @@ */ public class TestConnectorTypeProperties { - private ElementType type = new ElementType(); - private List classifications = new ArrayList<>(); - private Map additionalProperties = new HashMap<>(); + private ElementType type = new ElementType(); + private List classifications = new ArrayList<>(); + private Map additionalProperties = new HashMap<>(); private List recognizedAdditionalProperties = new ArrayList<>(); private List recognizedSecuredProperties = new ArrayList<>(); private List recognizedConfigurationProperties = new ArrayList<>(); diff --git a/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/TestEndpointProperties.java b/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/TestEndpointProperties.java index 039644eac54..d4d2a65285a 100644 --- a/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/TestEndpointProperties.java +++ b/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/TestEndpointProperties.java @@ -3,6 +3,8 @@ package org.odpi.openmetadata.frameworks.connectors.properties; import org.odpi.openmetadata.frameworks.connectors.properties.beans.*; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementClassification; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementType; import org.testng.annotations.Test; import java.util.*; diff --git a/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestAPIOperation.java b/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestAPIOperation.java index 5f5fecf87d0..d8eedbe29a5 100644 --- a/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestAPIOperation.java +++ b/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestAPIOperation.java @@ -3,6 +3,8 @@ package org.odpi.openmetadata.frameworks.connectors.properties.beans; import com.fasterxml.jackson.databind.ObjectMapper; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementClassification; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementType; import org.testng.annotations.Test; import java.util.ArrayList; @@ -294,7 +296,7 @@ private void validateResultObject(APIOperation resultObject) /* * Through superclass */ - PropertyBase propertyBase = getTestObject(); + ElementBase propertyBase = getTestObject(); try { @@ -307,7 +309,7 @@ private void validateResultObject(APIOperation resultObject) try { - validateResultObject((APIOperation) objectMapper.readValue(jsonString, PropertyBase.class)); + validateResultObject((APIOperation) objectMapper.readValue(jsonString, ElementBase.class)); } catch (Throwable exc) { diff --git a/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestAPISchemaType.java b/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestAPISchemaType.java index d7968e17100..98acd6e9cd6 100644 --- a/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestAPISchemaType.java +++ b/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestAPISchemaType.java @@ -3,6 +3,8 @@ package org.odpi.openmetadata.frameworks.connectors.properties.beans; import com.fasterxml.jackson.databind.ObjectMapper; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementClassification; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementType; import org.testng.annotations.Test; import java.util.ArrayList; @@ -294,7 +296,7 @@ private void validateResultObject(APISchemaType resultObject) /* * Through superclass */ - PropertyBase propertyBase = getTestObject(); + ElementBase propertyBase = getTestObject(); try { @@ -307,7 +309,7 @@ private void validateResultObject(APISchemaType resultObject) try { - validateResultObject((APISchemaType) objectMapper.readValue(jsonString, PropertyBase.class)); + validateResultObject((APISchemaType) objectMapper.readValue(jsonString, ElementBase.class)); } catch (Throwable exc) { diff --git a/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestAsset.java b/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestAsset.java index 60ef1f8befa..9f0335ff9d0 100644 --- a/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestAsset.java +++ b/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestAsset.java @@ -3,6 +3,8 @@ package org.odpi.openmetadata.frameworks.connectors.properties.beans; import com.fasterxml.jackson.databind.ObjectMapper; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementClassification; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementType; import org.testng.annotations.Test; import java.util.ArrayList; @@ -18,9 +20,9 @@ */ public class TestAsset { - private ElementType type = new ElementType(); - private List classifications = new ArrayList<>(); - private List zoneMembership = new ArrayList<>(); + private ElementType type = new ElementType(); + private List classifications = new ArrayList<>(); + private List zoneMembership = new ArrayList<>(); private Map additionalProperties = new HashMap<>(); private Map assetProperties = new HashMap<>(); @@ -271,7 +273,7 @@ private void validateResultObject(Asset resultObject) /* * Through superclass */ - PropertyBase propertyBase = getTestObject(); + ElementBase propertyBase = getTestObject(); try { @@ -284,7 +286,7 @@ private void validateResultObject(Asset resultObject) try { - validateResultObject((Asset) objectMapper.readValue(jsonString, PropertyBase.class)); + validateResultObject((Asset) objectMapper.readValue(jsonString, ElementBase.class)); } catch (Throwable exc) { diff --git a/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestCertification.java b/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestCertification.java index 097e2cda484..0e3961c336b 100644 --- a/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestCertification.java +++ b/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestCertification.java @@ -3,6 +3,8 @@ package org.odpi.openmetadata.frameworks.connectors.properties.beans; import com.fasterxml.jackson.databind.ObjectMapper; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementClassification; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementType; import org.testng.annotations.Test; import java.util.*; @@ -258,7 +260,7 @@ private void validateResultObject(Certification resultObject) /* * Through superclass */ - PropertyBase propertyBase = getTestObject(); + ElementBase propertyBase = getTestObject(); try { @@ -271,7 +273,7 @@ private void validateResultObject(Certification resultObject) try { - validateResultObject((Certification) objectMapper.readValue(jsonString, PropertyBase.class)); + validateResultObject((Certification) objectMapper.readValue(jsonString, ElementBase.class)); } catch (Throwable exc) { diff --git a/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestComment.java b/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestComment.java index 10e43508daa..8cf1f556621 100644 --- a/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestComment.java +++ b/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestComment.java @@ -4,6 +4,8 @@ import com.fasterxml.jackson.databind.ObjectMapper; import org.odpi.openmetadata.frameworks.openmetadata.enums.CommentType; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementClassification; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementType; import org.testng.annotations.Test; import java.util.*; @@ -227,7 +229,7 @@ private void validateResultObject(Comment resultObject) /* * Through superclass */ - PropertyBase propertyBase = getTestObject(); + ElementBase propertyBase = getTestObject(); try { @@ -240,7 +242,7 @@ private void validateResultObject(Comment resultObject) try { - validateResultObject((Comment) objectMapper.readValue(jsonString, PropertyBase.class)); + validateResultObject((Comment) objectMapper.readValue(jsonString, ElementBase.class)); } catch (Throwable exc) { diff --git a/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestComplexSchemaType.java b/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestComplexSchemaType.java index 27401071557..b74fe9ba97f 100644 --- a/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestComplexSchemaType.java +++ b/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestComplexSchemaType.java @@ -3,6 +3,8 @@ package org.odpi.openmetadata.frameworks.connectors.properties.beans; import com.fasterxml.jackson.databind.ObjectMapper; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementClassification; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementType; import org.testng.annotations.Test; import java.util.ArrayList; @@ -294,7 +296,7 @@ private void validateResultObject(ComplexSchemaType resultObject) /* * Through superclass */ - PropertyBase propertyBase = getTestObject(); + ElementBase propertyBase = getTestObject(); try { @@ -307,7 +309,7 @@ private void validateResultObject(ComplexSchemaType resultObject) try { - validateResultObject((ComplexSchemaType) objectMapper.readValue(jsonString, PropertyBase.class)); + validateResultObject((ComplexSchemaType) objectMapper.readValue(jsonString, ElementBase.class)); } catch (Throwable exc) { diff --git a/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestConnection.java b/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestConnection.java index 74a94f72285..b7608a2286e 100644 --- a/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestConnection.java +++ b/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestConnection.java @@ -3,6 +3,8 @@ package org.odpi.openmetadata.frameworks.connectors.properties.beans; import com.fasterxml.jackson.databind.ObjectMapper; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementClassification; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementType; import org.testng.annotations.Test; import java.util.ArrayList; @@ -18,9 +20,9 @@ */ public class TestConnection { - private ElementType type = new ElementType(); - private List classifications = new ArrayList<>(); - private Map additionalProperties = new HashMap<>(); + private ElementType type = new ElementType(); + private List classifications = new ArrayList<>(); + private Map additionalProperties = new HashMap<>(); private Map configurationProperties = new HashMap<>(); private Map securedProperties = new HashMap<>(); private ConnectorType connectorType = new ConnectorType(); @@ -318,7 +320,7 @@ private void validateResultObject(Connection resultObject) /* * Through superclass */ - PropertyBase propertyBase = getTestObject(); + ElementBase propertyBase = getTestObject(); try { @@ -331,7 +333,7 @@ private void validateResultObject(Connection resultObject) try { - validateResultObject((Connection) objectMapper.readValue(jsonString, PropertyBase.class)); + validateResultObject((Connection) objectMapper.readValue(jsonString, ElementBase.class)); } catch (Throwable exc) { diff --git a/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestConnectorType.java b/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestConnectorType.java index d94e9490d36..1a75a9bcf38 100644 --- a/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestConnectorType.java +++ b/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestConnectorType.java @@ -3,6 +3,8 @@ package org.odpi.openmetadata.frameworks.connectors.properties.beans; import com.fasterxml.jackson.databind.ObjectMapper; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementClassification; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementType; import org.testng.annotations.Test; import java.util.ArrayList; @@ -18,9 +20,9 @@ */ public class TestConnectorType { - private ElementType type = new ElementType(); - private List classifications = new ArrayList<>(); - private Map additionalProperties = new HashMap<>(); + private ElementType type = new ElementType(); + private List classifications = new ArrayList<>(); + private Map additionalProperties = new HashMap<>(); private List recognizedAdditionalProperties = new ArrayList<>(); private List recognizedSecuredProperties = new ArrayList<>(); private List recognizedConfigurationProperties = new ArrayList<>(); @@ -258,7 +260,7 @@ private void validateResultObject(ConnectorType resultObject) /* * Through superclass */ - PropertyBase propertyBase = getTestObject(); + ElementBase propertyBase = getTestObject(); try { @@ -271,7 +273,7 @@ private void validateResultObject(ConnectorType resultObject) try { - validateResultObject((ConnectorType) objectMapper.readValue(jsonString, PropertyBase.class)); + validateResultObject((ConnectorType) objectMapper.readValue(jsonString, ElementBase.class)); } catch (Throwable exc) { diff --git a/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestElementBase.java b/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestElementBase.java index 46e53157481..de6fe24021a 100644 --- a/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestElementBase.java +++ b/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestElementBase.java @@ -3,6 +3,8 @@ package org.odpi.openmetadata.frameworks.connectors.properties.beans; import com.fasterxml.jackson.databind.ObjectMapper; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementClassification; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementType; import org.testng.annotations.Test; import java.util.ArrayList; @@ -154,29 +156,6 @@ private void validateResultObject(ElementBase resultObject) { assertTrue(false, "Exception: " + exc.getMessage()); } - - /* - * Through superclass - */ - PropertyBase propertyBase = getTestObject(); - - try - { - jsonString = objectMapper.writeValueAsString(propertyBase); - } - catch (Throwable exc) - { - assertTrue(false, "Exception: " + exc.getMessage()); - } - - try - { - validateResultObject((ElementBase) objectMapper.readValue(jsonString, PropertyBase.class)); - } - catch (Throwable exc) - { - assertTrue(false, "Exception: " + exc.getMessage()); - } } diff --git a/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestElementClassification.java b/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestElementClassification.java index c89bd84f0e3..627688cb077 100644 --- a/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestElementClassification.java +++ b/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestElementClassification.java @@ -3,6 +3,7 @@ package org.odpi.openmetadata.frameworks.connectors.properties.beans; import com.fasterxml.jackson.databind.ObjectMapper; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementClassification; import org.testng.annotations.Test; import java.util.*; @@ -137,29 +138,6 @@ private void validateResultObject(ElementClassification resultObject) { assertTrue(false, "Exception: " + exc.getMessage()); } - - /* - * Through superclass - */ - PropertyBase propertyBase = getTestObject(); - - try - { - jsonString = objectMapper.writeValueAsString(propertyBase); - } - catch (Throwable exc) - { - assertTrue(false, "Exception: " + exc.getMessage()); - } - - try - { - validateResultObject((ElementClassification) objectMapper.readValue(jsonString, PropertyBase.class)); - } - catch (Throwable exc) - { - assertTrue(false, "Exception: " + exc.getMessage()); - } } diff --git a/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestElementType.java b/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestElementType.java index 7296e51bdae..0855d19a978 100644 --- a/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestElementType.java +++ b/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestElementType.java @@ -4,6 +4,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementType; import org.testng.annotations.Test; import java.util.ArrayList; diff --git a/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestEmbeddedConnection.java b/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestEmbeddedConnection.java index 5db28b3e991..ba79a5e0436 100644 --- a/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestEmbeddedConnection.java +++ b/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestEmbeddedConnection.java @@ -150,29 +150,6 @@ private void validateResultObject(EmbeddedConnection resultObject) { assertTrue(false, "Exception: " + exc.getMessage()); } - - /* - * Through superclass - */ - PropertyBase propertyBase = getTestObject(); - - try - { - jsonString = objectMapper.writeValueAsString(propertyBase); - } - catch (Throwable exc) - { - assertTrue(false, "Exception: " + exc.getMessage()); - } - - try - { - validateResultObject((EmbeddedConnection) objectMapper.readValue(jsonString, PropertyBase.class)); - } - catch (Throwable exc) - { - assertTrue(false, "Exception: " + exc.getMessage()); - } } diff --git a/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestEndpoint.java b/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestEndpoint.java index 6953a8ee609..9a7e6758d45 100644 --- a/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestEndpoint.java +++ b/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestEndpoint.java @@ -3,6 +3,8 @@ package org.odpi.openmetadata.frameworks.connectors.properties.beans; import com.fasterxml.jackson.databind.ObjectMapper; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementClassification; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementType; import org.testng.annotations.Test; import java.util.ArrayList; @@ -242,7 +244,7 @@ private void validateResultObject(Endpoint resultObject) /* * Through superclass */ - PropertyBase propertyBase = getTestObject(); + ElementBase propertyBase = getTestObject(); try { @@ -255,7 +257,7 @@ private void validateResultObject(Endpoint resultObject) try { - validateResultObject((Endpoint) objectMapper.readValue(jsonString, PropertyBase.class)); + validateResultObject((Endpoint) objectMapper.readValue(jsonString, ElementBase.class)); } catch (Throwable exc) { diff --git a/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestExternalIdentifier.java b/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestExternalIdentifier.java index f25e5e79e15..aa7103828a9 100644 --- a/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestExternalIdentifier.java +++ b/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestExternalIdentifier.java @@ -4,6 +4,8 @@ import com.fasterxml.jackson.databind.ObjectMapper; import org.odpi.openmetadata.frameworks.openmetadata.enums.KeyPattern; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementClassification; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementType; import org.testng.annotations.Test; import java.util.ArrayList; @@ -244,7 +246,7 @@ private void validateResultObject(ExternalIdentifier resultObject) /* * Through superclass */ - PropertyBase propertyBase = getTestObject(); + ElementBase propertyBase = getTestObject(); try { @@ -257,7 +259,7 @@ private void validateResultObject(ExternalIdentifier resultObject) try { - validateResultObject((ExternalIdentifier) objectMapper.readValue(jsonString, PropertyBase.class)); + validateResultObject((ExternalIdentifier) objectMapper.readValue(jsonString, ElementBase.class)); } catch (Throwable exc) { diff --git a/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestExternalReference.java b/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestExternalReference.java index 24fc8e9e2fd..cdee5960b0f 100644 --- a/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestExternalReference.java +++ b/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestExternalReference.java @@ -3,6 +3,8 @@ package org.odpi.openmetadata.frameworks.connectors.properties.beans; import com.fasterxml.jackson.databind.ObjectMapper; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementClassification; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementType; import org.testng.annotations.Test; import java.util.ArrayList; @@ -241,7 +243,7 @@ private void validateResultObject(ExternalReference resultObject) /* * Through superclass */ - PropertyBase propertyBase = getTestObject(); + ElementBase propertyBase = getTestObject(); try { @@ -254,7 +256,7 @@ private void validateResultObject(ExternalReference resultObject) try { - validateResultObject((ExternalReference) objectMapper.readValue(jsonString, PropertyBase.class)); + validateResultObject((ExternalReference) objectMapper.readValue(jsonString, ElementBase.class)); } catch (Throwable exc) { diff --git a/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestInformalTag.java b/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestInformalTag.java index 9ea7666a998..b5a9db9fd1b 100644 --- a/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestInformalTag.java +++ b/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestInformalTag.java @@ -3,6 +3,8 @@ package org.odpi.openmetadata.frameworks.connectors.properties.beans; import com.fasterxml.jackson.databind.ObjectMapper; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementClassification; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementType; import org.testng.annotations.Test; import java.util.ArrayList; @@ -195,7 +197,7 @@ private void validateResultObject(InformalTag resultObject) /* * Through superclass */ - PropertyBase propertyBase = getTestObject(); + ElementBase propertyBase = getTestObject(); try { @@ -208,7 +210,7 @@ private void validateResultObject(InformalTag resultObject) try { - validateResultObject((InformalTag) objectMapper.readValue(jsonString, PropertyBase.class)); + validateResultObject((InformalTag) objectMapper.readValue(jsonString, ElementBase.class)); } catch (Throwable exc) { diff --git a/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestLicense.java b/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestLicense.java index 9fab0197eb3..4c18f9a3c24 100644 --- a/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestLicense.java +++ b/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestLicense.java @@ -3,6 +3,8 @@ package org.odpi.openmetadata.frameworks.connectors.properties.beans; import com.fasterxml.jackson.databind.ObjectMapper; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementClassification; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementType; import org.testng.annotations.Test; import java.util.*; @@ -258,7 +260,7 @@ private void validateResultObject(License resultObject) /* * Through superclass */ - PropertyBase propertyBase = getTestObject(); + ElementBase propertyBase = getTestObject(); try { @@ -271,7 +273,7 @@ private void validateResultObject(License resultObject) try { - validateResultObject((License) objectMapper.readValue(jsonString, PropertyBase.class)); + validateResultObject((License) objectMapper.readValue(jsonString, ElementBase.class)); } catch (Throwable exc) { diff --git a/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestLike.java b/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestLike.java index d699250b8cb..5a15c84b801 100644 --- a/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestLike.java +++ b/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestLike.java @@ -3,6 +3,8 @@ package org.odpi.openmetadata.frameworks.connectors.properties.beans; import com.fasterxml.jackson.databind.ObjectMapper; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementClassification; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementType; import org.testng.annotations.Test; import java.util.ArrayList; @@ -179,7 +181,7 @@ private void validateResultObject(Like resultObject) /* * Through superclass */ - PropertyBase propertyBase = getTestObject(); + ElementBase propertyBase = getTestObject(); try { @@ -192,7 +194,7 @@ private void validateResultObject(Like resultObject) try { - validateResultObject((Like)objectMapper.readValue(jsonString, PropertyBase.class)); + validateResultObject((Like)objectMapper.readValue(jsonString, ElementBase.class)); } catch (Throwable exc) { diff --git a/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestLocation.java b/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestLocation.java index bcd35e7ef92..24e3032c4ba 100644 --- a/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestLocation.java +++ b/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestLocation.java @@ -3,6 +3,8 @@ package org.odpi.openmetadata.frameworks.connectors.properties.beans; import com.fasterxml.jackson.databind.ObjectMapper; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementClassification; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementType; import org.testng.annotations.Test; import java.util.ArrayList; @@ -221,7 +223,7 @@ private void validateResultObject(Location resultObject) /* * Through superclass */ - PropertyBase propertyBase = getTestObject(); + ElementBase propertyBase = getTestObject(); try { @@ -234,7 +236,7 @@ private void validateResultObject(Location resultObject) try { - validateResultObject((Location) objectMapper.readValue(jsonString, PropertyBase.class)); + validateResultObject((Location) objectMapper.readValue(jsonString, ElementBase.class)); } catch (Throwable exc) { diff --git a/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestMapSchemaType.java b/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestMapSchemaType.java index 73d53c0bf7b..aea57d9a537 100644 --- a/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestMapSchemaType.java +++ b/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestMapSchemaType.java @@ -3,6 +3,8 @@ package org.odpi.openmetadata.frameworks.connectors.properties.beans; import com.fasterxml.jackson.databind.ObjectMapper; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementClassification; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementType; import org.testng.annotations.Test; import java.util.ArrayList; @@ -284,7 +286,7 @@ private void validateResultObject(MapSchemaType resultObject) /* * Through superclass */ - PropertyBase propertyBase = getTestObject(); + ElementBase propertyBase = getTestObject(); try { @@ -297,7 +299,7 @@ private void validateResultObject(MapSchemaType resultObject) try { - validateResultObject((MapSchemaType) objectMapper.readValue(jsonString, PropertyBase.class)); + validateResultObject((MapSchemaType) objectMapper.readValue(jsonString, ElementBase.class)); } catch (Throwable exc) { diff --git a/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestMeaning.java b/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestMeaning.java index 86f75286007..a1f7e84e985 100644 --- a/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestMeaning.java +++ b/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestMeaning.java @@ -3,6 +3,8 @@ package org.odpi.openmetadata.frameworks.connectors.properties.beans; import com.fasterxml.jackson.databind.ObjectMapper; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementClassification; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementType; import org.testng.annotations.Test; import java.util.ArrayList; @@ -185,7 +187,7 @@ private void validateResultObject(Meaning resultObject) /* * Through superclass */ - PropertyBase propertyBase = getTestObject(); + ElementBase propertyBase = getTestObject(); try { @@ -198,7 +200,7 @@ private void validateResultObject(Meaning resultObject) try { - validateResultObject((Meaning) objectMapper.readValue(jsonString, PropertyBase.class)); + validateResultObject((Meaning) objectMapper.readValue(jsonString, ElementBase.class)); } catch (Throwable exc) { diff --git a/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestNote.java b/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestNote.java index 7ea37b28914..b497956c748 100644 --- a/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestNote.java +++ b/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestNote.java @@ -3,6 +3,8 @@ package org.odpi.openmetadata.frameworks.connectors.properties.beans; import com.fasterxml.jackson.databind.ObjectMapper; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementClassification; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementType; import org.testng.annotations.Test; import java.util.*; @@ -223,7 +225,7 @@ private void validateResultObject(Note resultObject) /* * Through superclass */ - PropertyBase propertyBase = getTestObject(); + ElementBase propertyBase = getTestObject(); try { @@ -236,7 +238,7 @@ private void validateResultObject(Note resultObject) try { - validateResultObject((Note) objectMapper.readValue(jsonString, PropertyBase.class)); + validateResultObject((Note) objectMapper.readValue(jsonString, ElementBase.class)); } catch (Throwable exc) { diff --git a/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestNoteLog2.java b/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestNoteLog2.java index e18f1249105..7135561724e 100644 --- a/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestNoteLog2.java +++ b/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestNoteLog2.java @@ -3,6 +3,8 @@ package org.odpi.openmetadata.frameworks.connectors.properties.beans; import com.fasterxml.jackson.databind.ObjectMapper; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementClassification; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementType; import org.testng.annotations.Test; import java.util.ArrayList; @@ -221,7 +223,7 @@ private void validateResultObject(NoteLogHeader resultObject) /* * Through superclass */ - PropertyBase propertyBase = getTestObject(); + ElementBase propertyBase = getTestObject(); try { @@ -234,7 +236,7 @@ private void validateResultObject(NoteLogHeader resultObject) try { - validateResultObject((NoteLogHeader) objectMapper.readValue(jsonString, PropertyBase.class)); + validateResultObject((NoteLogHeader) objectMapper.readValue(jsonString, ElementBase.class)); } catch (Throwable exc) { diff --git a/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestPrimitiveSchemaType.java b/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestPrimitiveSchemaType.java index aaf8bbd5d49..0d93299c2ac 100644 --- a/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestPrimitiveSchemaType.java +++ b/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestPrimitiveSchemaType.java @@ -3,6 +3,8 @@ package org.odpi.openmetadata.frameworks.connectors.properties.beans; import com.fasterxml.jackson.databind.ObjectMapper; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementClassification; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementType; import org.testng.annotations.Test; import java.util.ArrayList; @@ -300,7 +302,7 @@ private void validateResultObject(PrimitiveSchemaType resultObject) /* * Through superclass */ - PropertyBase propertyBase = getTestObject(); + ElementBase propertyBase = getTestObject(); try { @@ -313,7 +315,7 @@ private void validateResultObject(PrimitiveSchemaType resultObject) try { - validateResultObject((PrimitiveSchemaType) objectMapper.readValue(jsonString, PropertyBase.class)); + validateResultObject((PrimitiveSchemaType) objectMapper.readValue(jsonString, ElementBase.class)); } catch (Throwable exc) { diff --git a/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestRating.java b/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestRating.java index 896322c462d..07aa84c6d8d 100644 --- a/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestRating.java +++ b/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestRating.java @@ -4,6 +4,8 @@ import com.fasterxml.jackson.databind.ObjectMapper; import org.odpi.openmetadata.frameworks.openmetadata.enums.StarRating; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementClassification; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementType; import org.testng.annotations.Test; import java.util.ArrayList; @@ -191,7 +193,7 @@ private void validateResultObject(Rating resultObject) /* * Through superclass */ - PropertyBase propertyBase = getTestObject(); + ElementBase propertyBase = getTestObject(); try { @@ -204,7 +206,7 @@ private void validateResultObject(Rating resultObject) try { - validateResultObject((Rating)objectMapper.readValue(jsonString, PropertyBase.class)); + validateResultObject((Rating)objectMapper.readValue(jsonString, ElementBase.class)); } catch (Throwable exc) { diff --git a/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestReferenceable.java b/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestReferenceable.java index 9ca9cb75be2..052d4439068 100644 --- a/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestReferenceable.java +++ b/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestReferenceable.java @@ -3,6 +3,8 @@ package org.odpi.openmetadata.frameworks.connectors.properties.beans; import com.fasterxml.jackson.databind.ObjectMapper; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementClassification; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementType; import org.testng.annotations.Test; import java.util.ArrayList; @@ -18,9 +20,9 @@ */ public class TestReferenceable { - private ElementType type = new ElementType(); - private List classifications = new ArrayList<>(); - private List meanings = new ArrayList<>(); + private ElementType type = new ElementType(); + private List classifications = new ArrayList<>(); + private List meanings = new ArrayList<>(); private Map additionalProperties = new HashMap<>(); @@ -220,7 +222,7 @@ private void validateResultObject(Referenceable resultObject) /* * Through superclass */ - PropertyBase propertyBase = getTestObject(); + ElementBase propertyBase = getTestObject(); try { @@ -233,7 +235,7 @@ private void validateResultObject(Referenceable resultObject) try { - validateResultObject((Referenceable) objectMapper.readValue(jsonString, PropertyBase.class)); + validateResultObject((Referenceable) objectMapper.readValue(jsonString, ElementBase.class)); } catch (Throwable exc) { diff --git a/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestRelatedMediaReference.java b/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestRelatedMediaReference.java index 8b9ec5d9d01..c087e0a919a 100644 --- a/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestRelatedMediaReference.java +++ b/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestRelatedMediaReference.java @@ -5,6 +5,8 @@ import com.fasterxml.jackson.databind.ObjectMapper; import org.odpi.openmetadata.frameworks.openmetadata.enums.MediaType; import org.odpi.openmetadata.frameworks.openmetadata.enums.MediaUsage; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementClassification; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementType; import org.testng.annotations.Test; import java.util.ArrayList; @@ -22,7 +24,7 @@ public class TestRelatedMediaReference { private ElementType type = new ElementType(); private List classifications = new ArrayList<>(); - private Map additionalProperties = new HashMap<>(); + private Map additionalProperties = new HashMap<>(); private List mediaUsage = new ArrayList<>(); @@ -262,7 +264,7 @@ private void validateResultObject(RelatedMediaReference resultObject) /* * Through superclass */ - PropertyBase propertyBase = getTestObject(); + ElementBase propertyBase = getTestObject(); try { @@ -275,7 +277,7 @@ private void validateResultObject(RelatedMediaReference resultObject) try { - validateResultObject((RelatedMediaReference) objectMapper.readValue(jsonString, PropertyBase.class)); + validateResultObject((RelatedMediaReference) objectMapper.readValue(jsonString, ElementBase.class)); } catch (Throwable exc) { diff --git a/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestSchemaAttribute.java b/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestSchemaAttribute.java index 5ba0c518600..8d375808820 100644 --- a/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestSchemaAttribute.java +++ b/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestSchemaAttribute.java @@ -3,6 +3,8 @@ package org.odpi.openmetadata.frameworks.connectors.properties.beans; import com.fasterxml.jackson.databind.ObjectMapper; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementClassification; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementType; import org.testng.annotations.Test; import java.util.ArrayList; @@ -18,9 +20,9 @@ */ public class TestSchemaAttribute { - private ElementType type = new ElementType(); - private List classifications = new ArrayList<>(); - private Map additionalProperties = new HashMap<>(); + private ElementType type = new ElementType(); + private List classifications = new ArrayList<>(); + private Map additionalProperties = new HashMap<>(); private SchemaType schemaElement = new PrimitiveSchemaType(); private List relationships = new ArrayList<>(); @@ -262,7 +264,7 @@ private void validateResultObject(SchemaAttribute resultObject) /* * Through superclass */ - PropertyBase propertyBase = getTestObject(); + ElementBase propertyBase = getTestObject(); try { @@ -275,7 +277,7 @@ private void validateResultObject(SchemaAttribute resultObject) try { - validateResultObject((SchemaAttribute) objectMapper.readValue(jsonString, PropertyBase.class)); + validateResultObject((SchemaAttribute) objectMapper.readValue(jsonString, ElementBase.class)); } catch (Throwable exc) { diff --git a/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestSchemaAttributeRelationship.java b/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestSchemaAttributeRelationship.java index c4c7e9d3e09..7489ceade13 100644 --- a/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestSchemaAttributeRelationship.java +++ b/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestSchemaAttributeRelationship.java @@ -150,29 +150,6 @@ private void validateResultObject(SchemaAttributeRelationship resultObject) { assertTrue(false, "Exception: " + exc.getMessage()); } - - /* - * Through superclass - */ - PropertyBase propertyBase = getTestObject(); - - try - { - jsonString = objectMapper.writeValueAsString(propertyBase); - } - catch (Throwable exc) - { - assertTrue(false, "Exception: " + exc.getMessage()); - } - - try - { - validateResultObject((SchemaAttributeRelationship)objectMapper.readValue(jsonString, PropertyBase.class)); - } - catch (Throwable exc) - { - assertTrue(false, "Exception: " + exc.getMessage()); - } } diff --git a/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestSchemaElement.java b/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestSchemaElement.java index 07446f03f27..f5da96c9921 100644 --- a/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestSchemaElement.java +++ b/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestSchemaElement.java @@ -2,6 +2,8 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.frameworks.connectors.properties.beans; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementClassification; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementType; import org.testng.annotations.Test; import java.util.ArrayList; diff --git a/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestValidValue.java b/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestValidValue.java index 3a742ef9814..6741f47ff14 100644 --- a/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestValidValue.java +++ b/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestValidValue.java @@ -3,6 +3,8 @@ package org.odpi.openmetadata.frameworks.connectors.properties.beans; import com.fasterxml.jackson.databind.ObjectMapper; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementClassification; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementType; import org.testng.annotations.Test; import java.util.ArrayList; @@ -354,7 +356,7 @@ private void validateSetResultObject(ValidValueSet resultObject) /* * Through superclass */ - PropertyBase propertyBase = getTestObject(); + ElementBase propertyBase = getTestObject(); try { @@ -367,7 +369,7 @@ private void validateSetResultObject(ValidValueSet resultObject) try { - validateResultObject((ValidValue) objectMapper.readValue(jsonString, PropertyBase.class)); + validateResultObject((ValidValue) objectMapper.readValue(jsonString, ElementBase.class)); } catch (Throwable exc) { @@ -478,7 +480,7 @@ private void validateSetResultObject(ValidValueSet resultObject) /* * Through superclass */ - PropertyBase propertyBase = getSetTestObject(); + ElementBase propertyBase = getSetTestObject(); try { @@ -491,7 +493,7 @@ private void validateSetResultObject(ValidValueSet resultObject) try { - validateSetResultObject((ValidValueSet) objectMapper.readValue(jsonString, PropertyBase.class)); + validateSetResultObject((ValidValueSet) objectMapper.readValue(jsonString, ElementBase.class)); } catch (Throwable exc) { @@ -579,7 +581,7 @@ private void validateSetResultObject(ValidValueSet resultObject) /* * Through superclass */ - PropertyBase propertyBase = getDefinitionTestObject(); + ElementBase propertyBase = getDefinitionTestObject(); try { @@ -592,7 +594,7 @@ private void validateSetResultObject(ValidValueSet resultObject) try { - validateDefinitionResultObject((ValidValueDefinition) objectMapper.readValue(jsonString, PropertyBase.class)); + validateDefinitionResultObject((ValidValueDefinition) objectMapper.readValue(jsonString, ElementBase.class)); } catch (Throwable exc) { diff --git a/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestVirtualConnection.java b/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestVirtualConnection.java index e80bac56cae..42f21e5343a 100644 --- a/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestVirtualConnection.java +++ b/open-metadata-implementation/frameworks/open-connector-framework/src/test/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/TestVirtualConnection.java @@ -3,6 +3,8 @@ package org.odpi.openmetadata.frameworks.connectors.properties.beans; import com.fasterxml.jackson.databind.ObjectMapper; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementClassification; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementType; import org.testng.annotations.Test; import java.util.ArrayList; @@ -283,7 +285,7 @@ private void validateResultObject(VirtualConnection resultObject) /* * Through superclass */ - PropertyBase propertyBase = getTestObject(); + ElementBase propertyBase = getTestObject(); try { @@ -296,7 +298,7 @@ private void validateResultObject(VirtualConnection resultObject) try { - validateResultObject((VirtualConnection) objectMapper.readValue(jsonString, PropertyBase.class)); + validateResultObject((VirtualConnection) objectMapper.readValue(jsonString, ElementBase.class)); } catch (Throwable exc) { diff --git a/open-metadata-implementation/frameworks/open-integration-framework/src/main/java/org/odpi/openmetadata/frameworks/integration/context/IntegrationContext.java b/open-metadata-implementation/frameworks/open-integration-framework/src/main/java/org/odpi/openmetadata/frameworks/integration/context/IntegrationContext.java index b70f884c496..e925e6d5fa6 100644 --- a/open-metadata-implementation/frameworks/open-integration-framework/src/main/java/org/odpi/openmetadata/frameworks/integration/context/IntegrationContext.java +++ b/open-metadata-implementation/frameworks/open-integration-framework/src/main/java/org/odpi/openmetadata/frameworks/integration/context/IntegrationContext.java @@ -8,9 +8,9 @@ import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementClassification; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementType; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementClassification; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementType; import org.odpi.openmetadata.frameworks.governanceaction.OpenMetadataStore; import org.odpi.openmetadata.frameworks.governanceaction.client.GovernanceConfiguration; import org.odpi.openmetadata.frameworks.governanceaction.client.OpenMetadataClient; diff --git a/open-metadata-implementation/frameworks/open-integration-framework/src/main/java/org/odpi/openmetadata/frameworks/integration/context/OpenMetadataAccess.java b/open-metadata-implementation/frameworks/open-integration-framework/src/main/java/org/odpi/openmetadata/frameworks/integration/context/OpenMetadataAccess.java index 5c713c7975d..635ffd458fc 100644 --- a/open-metadata-implementation/frameworks/open-integration-framework/src/main/java/org/odpi/openmetadata/frameworks/integration/context/OpenMetadataAccess.java +++ b/open-metadata-implementation/frameworks/open-integration-framework/src/main/java/org/odpi/openmetadata/frameworks/integration/context/OpenMetadataAccess.java @@ -5,12 +5,12 @@ import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStatus; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ElementStatus; import org.odpi.openmetadata.frameworks.governanceaction.OpenMetadataStore; import org.odpi.openmetadata.frameworks.governanceaction.client.OpenMetadataClient; -import org.odpi.openmetadata.frameworks.governanceaction.properties.ArchiveProperties; import org.odpi.openmetadata.frameworks.governanceaction.search.ElementProperties; import org.odpi.openmetadata.frameworks.integration.reports.IntegrationReportWriter; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ArchiveProperties; import java.util.Date; import java.util.Map; diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/APIParameterListType.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/enums/APIParameterListType.java similarity index 97% rename from open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/APIParameterListType.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/enums/APIParameterListType.java index 5c7cc446096..a69466251f9 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/APIParameterListType.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/enums/APIParameterListType.java @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.properties; +package org.odpi.openmetadata.frameworks.openmetadata.enums; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/enums/ClassificationOrigin.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/enums/ClassificationOrigin.java new file mode 100644 index 00000000000..dc4aa07f82a --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/enums/ClassificationOrigin.java @@ -0,0 +1,132 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.enums; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * ClassificationOrigin describes the provenance of a classification attached to an entity. Most classifications + * are explicitly assigned to an entity. However, it is possible for some classifications to flow along + * relationships to other entities. These are the propagated classifications. Each entity can only have one + * classification of a certain type. A propagated classification can not override an assigned classification. + * Classifications can only be attached to entities of specific types. However a propagated classification can + * flow through an entity that does not support the particular type of classification and then on to other + * relationships attached to the entity. The ClassificationPropagateRule in the relationship's RelationshipDef + * defines where the classification can flow to. + *

          + * Note: the repository services have no mechanism to automatically propagate classifications. This is set up by higher + * level services working with knowledge of the specific instance types of metadata and their significance. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public enum ClassificationOrigin implements OpenMetadataEnum +{ + /** + * The classification is explicitly assigned to the entity. + */ + ASSIGNED (0, "Assigned", "The classification is explicitly assigned to the entity", "2e8942ff-aae6-4048-a481-aba41b4e839c", true), + + /** + * The classification has propagated along a relationship to this entity. + */ + PROPAGATED (1, "Propagated", "The classification has propagated along a relationship to this entity", "5d2a38f7-4381-46e1-9f7b-ad38446c7a29" , false); + + private final int ordinal; + private final String name; + private final String description; + private final String descriptionGUID; + private final boolean isDefault; + + + /** + * Default constructor for the classification origin. + * + * @param ordinal numerical representation of the enumeration + * @param descriptionGUID identifier for valid value + * @param name default string name of the enumeration + * @param description default string description of the enumeration + * @param isDefault is this the default value for the enum? + */ + ClassificationOrigin(int ordinal, + String name, + String description, + String descriptionGUID, + boolean isDefault) + { + this.ordinal = ordinal; + this.name = name; + this.description = description; + this.descriptionGUID = descriptionGUID; + this.isDefault = isDefault; + } + + + /** + * Return the numeric representation of the classification origin. + * + * @return int ordinal + */ + public int getOrdinal() { return ordinal; } + + + /** + * Return the default name of the classification origin. + * + * @return String name + */ + public String getName() { return name; } + + + /** + * Return the default description of the classification origin. + * + * @return String description + */ + public String getDescription() { return description; } + + + /** + * Return the unique identifier for the valid value that represents the enum value. + * + * @return guid + */ + @Override + public String getDescriptionGUID() + { + return descriptionGUID; + } + + + /** + * Return whether the enum is the default value or not. + * + * @return boolean + */ + @Override + public boolean isDefault() + { + return isDefault; + } + + + /** + * toString() JSON-style + * + * @return string description + */ + @Override + public String toString() + { + return "ClassificationOrigin{" + + "ordinal=" + ordinal + + ", name='" + name + '\'' + + ", description='" + description + '\'' + + '}'; + } +} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/CommunityMembershipType.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/enums/CommunityMembershipType.java similarity index 97% rename from open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/CommunityMembershipType.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/enums/CommunityMembershipType.java index c96496ed03f..7a9396366f0 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/CommunityMembershipType.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/enums/CommunityMembershipType.java @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.properties; +package org.odpi.openmetadata.frameworks.openmetadata.enums; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; diff --git a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/DigitalProductStatus.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/enums/DigitalProductStatus.java similarity index 98% rename from open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/DigitalProductStatus.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/enums/DigitalProductStatus.java index 5f5f403ea9e..31f5b0fd24c 100644 --- a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/DigitalProductStatus.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/enums/DigitalProductStatus.java @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalservice.properties; +package org.odpi.openmetadata.frameworks.openmetadata.enums; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; diff --git a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/DigitalServiceStatus.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/enums/DigitalServiceStatus.java similarity index 97% rename from open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/DigitalServiceStatus.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/enums/DigitalServiceStatus.java index 96dae9eddad..bac1957aa44 100644 --- a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/DigitalServiceStatus.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/enums/DigitalServiceStatus.java @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalservice.properties; +package org.odpi.openmetadata.frameworks.openmetadata.enums; import com.fasterxml.jackson.annotation.JsonAutoDetect; @@ -49,7 +49,9 @@ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) -public enum DigitalServiceStatus +public enum + +DigitalServiceStatus { DRAFT (0, "Draft", "The digital service definition is a draft."), PROPOSED (1, "Proposed", "The digital service definition is in planning, feasibility study and business review."), diff --git a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/DigitalServiceVisibility.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/enums/DigitalServiceVisibility.java similarity index 98% rename from open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/DigitalServiceVisibility.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/enums/DigitalServiceVisibility.java index db0afb2e6bc..c3adae7bf0f 100644 --- a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/DigitalServiceVisibility.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/enums/DigitalServiceVisibility.java @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalservice.properties; +package org.odpi.openmetadata.frameworks.openmetadata.enums; import com.fasterxml.jackson.annotation.JsonAutoDetect; diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/enums/ElementOriginCategory.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/enums/ElementOriginCategory.java new file mode 100644 index 00000000000..7087db0e1bb --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/enums/ElementOriginCategory.java @@ -0,0 +1,186 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.enums; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * ElementOriginCategory defines where the metadata comes from. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public enum ElementOriginCategory implements OpenMetadataEnum +{ + /** + * Unknown provenance. + */ + UNKNOWN (0, "", "Unknown provenance", "9594fcfc-ad55-48d4-b473-eb2968be754a"), + + /** + * The element is being maintained within one of the local cohort members. The metadata collection id is for one of the + * repositories in the cohort. This metadata collection id identifies the home repository for this element. + */ + LOCAL_COHORT (1, + "Local to cohort", + "The element is being maintained within one of the local cohort members. " + + "The metadata collection id is for one of the repositories in the cohort. " + + "This metadata collection id identifies the home repository for this element. ", + "37685e52-7815-486c-a3bc-476a1d44f3f8"), + + /** + * The element was created from an export archive. The metadata collection id for the element is the metadata + * collection id of the originating server. If the originating server later joins the cohort with the same + * metadata collection id then these elements will be refreshed from the originating server's current repository. + */ + EXPORT_ARCHIVE (2, + "Export Archive", + "The element was created from an export archive. " + + "The metadata collection id for the element is the metadata collection id of the originating server. " + + "If the originating server later joins the cohort with the same metadata collection id " + + "then these elements will be refreshed from the originating server's current repository.", + "71655c74-245f-446f-b6db-65261de5a4c1"), + + /** + * The element comes from an open metadata content pack. The metadata collection id of the elements is set to the GUID of the pack. + */ + CONTENT_PACK (3, + "Content Pack", + "The element comes from an open metadata content pack. " + + "The metadata collection id of the elements is set to the GUID of the pack.", + "b23263bb-59f1-41df-8b60-0a8ac17cbf08"), + + /** + * The element comes from a metadata repository that used to be a member of the one of the local repository's cohorts, but it has been deregistered. + * The metadata collection id remains the same. If the repository rejoins the cohort then these elements can be refreshed from the rejoining repository. + */ + DEREGISTERED_REPOSITORY (4, + "Deregistered Repository", + "The element comes from a metadata repository that " + + "used to be a member of the one of the local repository's cohorts, but it has been deregistered. " + + "The metadata collection id remains the same. If the repository rejoins the cohort " + + "then these elements can be refreshed from the rejoining repository.", + "5e828176-6883-4da0-acd1-5681ed48c2d8"), + + /** + * The element is part of a service's configuration. The metadata collection id is null. + */ + CONFIGURATION (5, + "Configuration", + "The element is part of a service's configuration. The metadata collection id is null.", + "303bce06-0254-44e0-9353-3eab7f13e6d6"), + + /** + * The element is maintained by an external technology. The metadata collection id is the guid of the technology's descriptive entity. + */ + EXTERNAL_SOURCE (6, + "External Source", + "The element is maintained by an external technology. The metadata collection id is the guid of the technology's descriptive entity.", + "a1550c51-6953-4f31-8ab7-3f0b9d9f45fe"); + + private static final long serialVersionUID = 1L; + + private final int originCode; + private final String originName; + private final String originDescription; + private final String descriptionGUID; + + + /** + * Constructor for the enum. + * + * @param originCode code number for origin + * @param originName name for origin + * @param originDescription description for origin + * @param descriptionGUID unique identifier of the valid value + * + */ + ElementOriginCategory(int originCode, + String originName, + String originDescription, + String descriptionGUID) + { + this.originCode = originCode; + this.originName = originName; + this.originDescription = originDescription; + this.descriptionGUID = descriptionGUID; + } + + + /** + * Return the code for metadata element. + * + * @return int code for the origin + */ + public int getOrdinal() + { + return originCode; + } + + + /** + * Return the name of the metadata element origin. + * + * @return String name + */ + public String getName() + { + return originName; + } + + + /** + * Return the description of the metadata element origin. + * + * @return String description + */ + public String getDescription() + { + return originDescription; + } + + + /** + * Return the unique identifier for the valid value that represents the enum value. + * + * @return guid + */ + @Override + public String getDescriptionGUID() + { + return descriptionGUID; + } + + + /** + * Return whether the enum is the default value or not. + * + * @return boolean + */ + @Override + public boolean isDefault() + { + return false; + } + + + /** + * Standard toString method. + * + * @return print out of variables in a JSON-style + */ + @Override + public String toString() + { + return "ElementOriginCategory{" + + "originCode=" + originCode + + ", originName='" + originName + '\'' + + ", originDescription='" + originDescription + '\'' + + '}'; + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/enums/ElementStatus.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/enums/ElementStatus.java new file mode 100644 index 00000000000..69ee76158ad --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/enums/ElementStatus.java @@ -0,0 +1,219 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.enums; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * The ElementStatus defines the status of an element in the metadata collection. It effectively + * defines its visibility to different types of queries. Most queries by default will only return instances not in the + * deleted status. + *
            + *
          • Unknown: Unknown instance status.
          • + *
          • Draft: The content is incomplete.
          • + *
          • Proposed: The content is in review.
          • + *
          • Approved: The content is approved.
          • + *
          • Rejected: The request or proposal is rejected.
          • + *
          • Approved concept: The request or proposal is approved for development.
          • + *
          • Under development: The instance is being developed.
          • + *
          • Development complete: The development of the instance is complete.
          • + *
          • Approved for deployment: The instance is approved for deployment.
          • + *
          • StandBy: The instance is deployed in standby mode.
          • + *
          • Active: The instance is approved and in use.
          • + *
          • Failed: The instance is not in use due to failure.
          • + *
          • Disabled: The instance is shutdown or disabled.
          • + *
          • Complete: The activity associated with the instance is complete.
          • + *
          • Deprecated: The instance is out of date and should not be used.
          • + *
          • Other: The instance is in a locally defined state.
          • + *
          • Deleted: The instance has been deleted and is waiting to be purged. It is kept in the metadata collection + * to support a restore request. It is not returned on normal queries.
          • + *
          + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public enum ElementStatus implements OpenMetadataEnum +{ + /** + * Unknown instance status. + */ + UNKNOWN (0, "", "Unknown instance status.", "b557752a-e44a-467e-85c1-9716d105f8fb"), + + /** + * The content is incomplete. + */ + DRAFT (1, "Draft", "The content is incomplete.", "62363ab9-e290-45de-8f48-40476295cc2e"), + + /** + * The content is ready for review. + */ + PREPARED (2, "Prepared", "The content is ready for review.", "05ce396b-32fa-4d10-99cc-b51bb3bd14fa"), + + /** + * The content is in review. + */ + PROPOSED (3, "Proposed", "The content is in review.", "192f17f9-4c4e-4475-867a-08c1049490c5"), + + /** + * The content is approved. + */ + APPROVED (4, "Approved", "The content is approved.", "79bf466a-6c29-4ccb-ac3e-6dea5c615105"), + + /** + * The request or proposal is rejected. + */ + REJECTED (5, "Rejected", "The request or proposal is rejected.", "75fe7545-37bb-4bf1-974c-0a0514c00f4b"), + + /** + * The request or proposal is approved for development. + */ + APPROVED_CONCEPT (6, "Approved concept", "The request or proposal is approved for development.", "75fe7545-37bb-4bf1-974c-0a0514c00f4b"), + + /** + * The instance is being developed. + */ + UNDER_DEVELOPMENT (7, "Under development", "The instance is being developed.", "5770306b-e138-47a1-9a19-795961ec6eed"), + + /** + * The development of the instance is complete. + */ + DEVELOPMENT_COMPLETE (8, "Development complete", "The development of the instance is complete.", "161e0435-cb28-48d6-b403-b408b547b217"), + + /** + * The instance is approved for deployment. + */ + APPROVED_FOR_DEPLOYMENT (9, "Approved for deployment", "The instance is approved for deployment.", "81e5b82e-e354-4b26-88bb-781a62f2c5a7"), + + /** + * The instance is deployed in standby mode. + */ + STANDBY (10, "StandBy", "The instance is deployed in standby mode.", "9fd7eefe-2ee5-4fac-850f-9a78cfe59ac1"), + + /** + * The instance is approved and in use. + */ + ACTIVE (15, "Active", "The instance is approved and in use.", "10e474c2-e98d-4cfc-b10c-a00998369c3b"), + + /** + * The instance is not in use due to failure. + */ + FAILED (20, "Failed", "The instance is not in use due to failure.", "8a01f280-3360-4d48-a1a2-0351de57c5af"), + + /** + * The instance is shutdown or disabled. + */ + DISABLED (21, "Disabled", "The instance is shutdown or disabled.", "a414db34-20a5-4394-b33a-94eeee7f44c2"), + + /** + * The activity associated with the instance is complete. + */ + COMPLETE (22, "Complete", "The activity associated with the instance is complete.", "34d96768-bf4c-460e-ac86-42907188fe22"), + + /** + * The instance is out of date and should not be used. + */ + DEPRECATED (30, "Deprecated", "The instance is out of date and should not be used.", "b1f5b468-60ad-452e-957e-82d1bbbb2ea9"), + + /** + * The instance has been deleted and is no longer available. + */ + DELETED (99, "Deleted", "The instance has been deleted and is no longer available.", "44dc841f-f406-443d-8b3f-c87a810e29f6"), + + /** + * The instance is in a locally defined state. + */ + OTHER (50, "Other", "The instance is in a locally defined state.", "40c72f5b-9342-405e-a69c-710cb605ef12"); + + private final int ordinal; + private final String name; + private final String description; + private final String descriptionGUID; + + + /** + * Default constructor sets up the specific values for an enum instance. + * + * @param ordinal int enum value ordinal + * @param name String name + * @param description String description + * @param descriptionGUID unique identifier for the valid value + */ + ElementStatus(int ordinal, + String name, + String description, + String descriptionGUID) + { + this.ordinal = ordinal; + this.name = name; + this.description = description; + this.descriptionGUID = descriptionGUID; + } + + + /** + * Return the numerical value for the enum. + * + * @return int enum value ordinal + */ + public int getOrdinal() { return ordinal; } + + + /** + * Return the descriptive name for the enum. + * + * @return String name + */ + public String getName() { return name; } + + + /** + * Return the description for the enum. + * + * @return String description + */ + public String getDescription() { return description; } + + /** + * Return the unique identifier for the valid value that represents the enum value. + * + * @return guid + */ + @Override + public String getDescriptionGUID() + { + return descriptionGUID; + } + + + /** + * Return whether the enum is the default value or not. + * + * @return boolean + */ + @Override + public boolean isDefault() + { + return false; + } + + + /** + * toString() JSON-style + * + * @return string description + */ + @Override + public String toString() + { + return "InstanceStatus{" + + "ordinal=" + ordinal + + ", name='" + name + '\'' + + ", description='" + description + '\'' + + '}'; + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/enums/EngineActionStatus.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/enums/EngineActionStatus.java index c9158302600..6f1df215218 100644 --- a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/enums/EngineActionStatus.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/enums/EngineActionStatus.java @@ -83,12 +83,12 @@ public enum EngineActionStatus implements OpenMetadataEnum private static final String ENUM_DESCRIPTION_GUID = "eb7bba16-b2a0-4e7d-b249-f0be30a50171"; private static final String ENUM_DESCRIPTION_WIKI = OpenMetadataWikiPages.MODEL_0463_ENGINE_ACTIONS; - private final String descriptionGUID; - private final int ordinal; - private final String name; - private final String description; - private final boolean isDefault; + private final int ordinal; + private final String name; + private final String description; + private final String descriptionGUID; + private final boolean isDefault; /** diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/enums/GlossaryTermStatus.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/enums/GlossaryTermStatus.java new file mode 100644 index 00000000000..852a9597104 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/enums/GlossaryTermStatus.java @@ -0,0 +1,181 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.enums; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * The GlossaryTermStatus defines the status of a glossary term. It effectively + * defines its visibility to different types of queries. Most queries by default will only return instances in the + * active status. + *
            + *
          • Unknown: Unknown instance status.
          • + *
          • Draft: The content is incomplete.
          • + *
          • Proposed: The content is in review.
          • + *
          • Approved: The content is approved.
          • + *
          • Active: The instance is approved and in use.
          • + *
          + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public enum GlossaryTermStatus implements OpenMetadataEnum +{ + /** + * Draft - The term is incomplete. + */ + DRAFT (1,1, "Draft", "The term is incomplete.", "bb1b89c9-52b2-404d-ad3a-3f7c3e996d45"), + + /** + * Prepared - The term is ready for review. + */ + PREPARED (2,2, "Prepared", "The term is ready for review.", "af441f31-59d2-4126-bcc0-e4ab32fe8f61"), + + /** + * Proposed - The term is in review. + */ + PROPOSED (3,3, "Proposed", "The term is in review.", "e62e7283-4d06-4225-81d2-c8d885256ee1"), + + /** + * Approved - The term is approved and ready to be activated. + */ + APPROVED (4,4, "Approved", "The term is approved and ready to be activated.", "243e69c8-1dc8-4a1d-9086-2dedfc25b214"), + + /** + * Rejected - The term is rejected and should not be used. + */ + REJECTED (5,5, "Rejected", "The term is rejected and should not be used.", "f71e90f6-27b0-490b-84ec-c8f5c9ddd707"), + + /** + * Active - The term is approved and in use. + */ + ACTIVE (6,15, "Active", "The term is approved and in use.", "373b8d0b-1797-4ff1-b1a1-1b3cba8f9ab9"), + + /** + * Deprecated - The term is out of date and should not be used. + */ + DEPRECATED(7,30, "Deprecated","The term is out of date and should not be used.", "81f3626f-2fd2-4bc1-bb82-698289fbd18e"), + + /** + * Other - The term is in a locally defined state. + */ + OTHER (8,50, "Other", "The term is in a locally defined state.", "ce8bd25c-0ebb-4191-9769-af6e006b80ad"), + ; + + + private final int ordinal; + private final int openTypeOrdinal; + private final String name; + private final String description; + private final String descriptionGUID; + + + /** + * Constructor to set up the instance of this enum. + * + * @param ordinal code number + * @param openTypeOrdinal code number from the equivalent Enum Type + * @param name default name + * @param description default description + * @param descriptionGUID unique identifier of the valid value + */ + GlossaryTermStatus(int ordinal, + int openTypeOrdinal, + String name, + String description, + String descriptionGUID) + { + this.ordinal = ordinal; + this.openTypeOrdinal = openTypeOrdinal; + this.name = name; + this.description = description; + this.descriptionGUID = descriptionGUID; + } + + /** + * Return the code for this enum instance + * + * @return int key pattern code + */ + public int getOrdinal() + { + return ordinal; + } + + + /** + * Return the code for this enum that comes from the Open Metadata Type that this enum represents. + * + * @return int code number + */ + public int getOpenTypeOrdinal() + { + return openTypeOrdinal; + } + + + + /** + * Return the default name for this enum instance. + * + * @return String default name + */ + public String getName() + { + return name; + } + + + /** + * Return the default description for the key pattern for this enum instance. + * + * @return String default description + */ + public String getDescription() + { + return description; + } + + /** + * Return the unique identifier for the valid value that represents the enum value. + * + * @return guid + */ + @Override + public String getDescriptionGUID() + { + return descriptionGUID; + } + + /** + * Return whether the enum is the default value or not. + * + * @return boolean + */ + @Override + public boolean isDefault() + { + return false; + } + + + /** + * toString() JSON-style + * + * @return string description + */ + @Override + public String toString() + { + return "GlossaryTermStatus{" + + "ordinal=" + ordinal + + ", openTypeOrdinal=" + openTypeOrdinal + + ", name='" + name + '\'' + + ", description='" + description + '\'' + + '}'; + }} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/enums/GovernanceDefinitionStatus.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/enums/GovernanceDefinitionStatus.java new file mode 100644 index 00000000000..fcfc93ff9be --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/enums/GovernanceDefinitionStatus.java @@ -0,0 +1,138 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.enums; + + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * GovernanceDefinitionStatus indicates whether the definition is complete and operational or in a state that means + * it is either under development or obsolete. + *
            + *
          • DRAFT - The governance definition is still in development.
          • + *
          • PROPOSED - The governance definition is in review and not yet active.
          • + *
          • ACTIVE - The governance definition is approved and in use.
          • + *
          • DEPRECATED - The governance definition has been superseded.
          • + *
          • OTHER - The governance definition in a locally defined state.
          • + *
          + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public enum GovernanceDefinitionStatus implements OpenMetadataEnum +{ + /** + * Draft - The governance definition is still in development. + */ + DRAFT (0, "Draft", "The governance definition is still in development.", "ff7d7346-2d70-4fe1-acac-ae69f348b6d7"), + + /** + * Proposed - The governance definition is in review and not yet active. + */ + PROPOSED (1, "Proposed", "The governance definition is in review and not yet active.", "6edb1aba-b9c3-418a-9277-a69a1a0e936e"), + + /** + * Active - The governance definition is approved and in use. + */ + ACTIVE (2, "Active", "The governance definition is approved and in use.", "806aea5c-c432-44a1-a1e4-8d9756787456"), + + /** + * Deprecated - The governance definition has been superseded. + */ + DEPRECATED (3, "Deprecated", "The governance definition has been superseded.", "6726a279-e0aa-47a2-bab2-b95a9e7112b1"), + + /** + * Other - The governance definition in a locally defined state. + */ + OTHER (99, "Other", "The governance definition in a locally defined state.", "42b24ef8-b610-44a9-9b41-cb0d5a093ef2"); + + private final int ordinal; + private final String name; + private final String description; + private final String descriptionGUID; + + + /** + * Default constructor for the enumeration. + * + * @param ordinal numerical representation of the enumeration + * @param name default string name of the instance provenance type + * @param description default string description of the instance provenance type + * @param descriptionGUID unique identifier of valid value + */ + GovernanceDefinitionStatus(int ordinal, + String name, + String description, + String descriptionGUID) + { + this.ordinal = ordinal; + this.name = name; + this.description = description; + this.descriptionGUID = descriptionGUID; + } + + + /** + * Return the numeric representation of the instance provenance type. + * + * @return int ordinal + */ + public int getOrdinal() { return ordinal; } + + + /** + * Return the default name of the instance provenance type. + * + * @return String name + */ + public String getName() { return name; } + + + /** + * Return the default description of the instance provenance type. + * + * @return String description + */ + public String getDescription() { return description; } + + + /** + * Return the unique identifier for the valid value that represents the enum value. + * + * @return guid + */ + @Override + public String getDescriptionGUID() + { + return descriptionGUID; + } + + + /** + * Return whether the enum is the default value or not. + * + * @return boolean + */ + @Override + public boolean isDefault() + { + return false; + } + + + /** + * toString() JSON-style + * + * @return string description + */ + @Override + public String toString() + { + return "GovernanceDefinitionStatus : " + name; + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/enums/ProcessStatus.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/enums/ProcessStatus.java new file mode 100644 index 00000000000..bdf3fec11cd --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/enums/ProcessStatus.java @@ -0,0 +1,153 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.enums; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * The ProcessStatus defines the status of a process. It effectively + * defines its visibility to different types of queries. Most queries by default will only return instances in the + * active status. + *
            + *
          • Unknown: Unknown process status.
          • + *
          • Draft: The process is incomplete.
          • + *
          • Proposed: The process is in review.
          • + *
          • Approved: The process is approved.
          • + *
          • Active: The process is approved and in use.
          • + *
          + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public enum ProcessStatus +{ + /** + * Unknown process status. + */ + UNKNOWN (0,0, "","Unknown process status.", ElementStatus.UNKNOWN), + + /** + * The process is incomplete. + */ + DRAFT (1,1, "Draft", "The process is incomplete.", ElementStatus.DRAFT), + + /** + * The process is in review. + */ + PROPOSED (2,3, "Proposed", "The process is in review.", ElementStatus.PROPOSED), + + /** + * The process is approved. + */ + APPROVED (3,4, "Approved", "The process is approved.", ElementStatus.APPROVED), + + /** + * The process is approved and in use. + */ + ACTIVE (4,15, "Active", "The process is approved and in use.", ElementStatus.ACTIVE); + + + private final int ordinal; + private final int openTypeOrdinal; + private final String name; + private final String description; + private final ElementStatus elementStatus; + + + /** + * Constructor to set up the instance of this enum. + * + * @param ordinal code number + * @param openTypeOrdinal code number from the equivalent Enum Type + * @param name default name + * @param description default description + */ + ProcessStatus(int ordinal, + int openTypeOrdinal, + String name, + String description, + ElementStatus elementStatus) + { + this.ordinal = ordinal; + this.openTypeOrdinal = openTypeOrdinal; + this.name = name; + this.description = description; + this.elementStatus = elementStatus; + } + + /** + * Return the code for this enum instance + * + * @return int key pattern code + */ + public int getOrdinal() + { + return ordinal; + } + + + /** + * Return the code for this enum that comes from the Open Metadata Type that this enum represents. + * + * @return int code number + */ + public int getOpenTypeOrdinal() + { + return openTypeOrdinal; + } + + + + /** + * Return the default name for this enum instance. + * + * @return String default name + */ + public String getName() + { + return name; + } + + + /** + * Return the default description for the key pattern for this enum instance. + * + * @return String default description + */ + public String getDescription() + { + return description; + } + + + /** + * Return the equivalent element status. + * + * @return status + */ + public ElementStatus getElementStatus() + { + return elementStatus; + } + + + /** + * toString() JSON-style + * + * @return string description + */ + @Override + public String toString() + { + return "ProcessStatus{" + + "ordinal=" + ordinal + + ", openTypeOrdinal=" + openTypeOrdinal + + ", name='" + name + '\'' + + ", description='" + description + '\'' + + '}'; + }} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/WatchStatus.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/enums/WatchStatus.java similarity index 97% rename from open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/WatchStatus.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/enums/WatchStatus.java index dcb38c95926..69df5d8c9d8 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/WatchStatus.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/enums/WatchStatus.java @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.properties; +package org.odpi.openmetadata.frameworks.openmetadata.enums; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/APIElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/APIElement.java similarity index 93% rename from open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/APIElement.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/APIElement.java index c2f4124773a..0366f512944 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/APIElement.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/APIElement.java @@ -1,18 +1,18 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.properties.APIProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.apis.APIProperties; import java.util.Objects; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; /** * APIElement contains the properties and header for a DeployedAPI entity retrieved from the metadata repository. diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/APIOperationElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/APIOperationElement.java similarity index 93% rename from open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/APIOperationElement.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/APIOperationElement.java index d5f9cd87b8e..f47a1b9ddde 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/APIOperationElement.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/APIOperationElement.java @@ -1,18 +1,18 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.properties.APIOperationProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.apis.APIOperationProperties; import java.util.Objects; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; /** * APIOperationElement contains the properties and header for an APIOperation entity retrieved from the metadata repository. diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/APIParameterElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/APIParameterElement.java similarity index 92% rename from open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/APIParameterElement.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/APIParameterElement.java index febf6bf4169..48146386cf5 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/APIParameterElement.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/APIParameterElement.java @@ -1,18 +1,17 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.properties.APIParameterProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.apis.APIParameterProperties; import java.util.Objects; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; /** * APIParameterElement contains the properties and header for a APIParameter entity @@ -63,12 +62,12 @@ public APIParameterElement(SchemaAttributeElement template) { elementHeader = template.getElementHeader(); - if (template.getProperties() != null) + if (template.getSchemaAttributeProperties() != null) { - properties = new APIParameterProperties(template.getProperties()); + properties = new APIParameterProperties(template.getSchemaAttributeProperties()); } - type = template.getType(); + type = template.getSchemaTypeElement(); } } diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/APIParameterListElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/APIParameterListElement.java similarity index 93% rename from open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/APIParameterListElement.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/APIParameterListElement.java index 6eb29c81b83..59fccb74a01 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/APIParameterListElement.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/APIParameterListElement.java @@ -1,19 +1,19 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.properties.APIParameterListProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.APIParameterListType; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.apis.APIParameterListProperties; +import org.odpi.openmetadata.frameworks.openmetadata.enums.APIParameterListType; import java.util.Objects; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; /** * APIParameterListElement contains the properties and header for an APIParameterList entity retrieved from the metadata repository. diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ActorProfileElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ActorProfileElement.java new file mode 100644 index 00000000000..91a1d744f1f --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ActorProfileElement.java @@ -0,0 +1,458 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.ActorProfileProperties; + + +/** + * The ActorProfileElement describes an individual, system, team or organization. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ActorProfileElement implements MetadataElement +{ + private ElementHeader elementHeader = null; + private ActorProfileProperties profileProperties = null; + private List contactMethods = null; + private ContributionRecordElement contributionRecord = null; /* Person only */ + private List personRoles = null; /* Person only */ + private List peers = null; /* Person only */ + private List locations = null; + private List userIdentities = null; + private ElementStub superTeam = null; /* Team only */ + private List subTeams = null; /* Team only */ + private List teamLeaderRoles = null; /* Team only */ + private List teamMemberRoles = null; /* Team only */ + private List businessCapability = null; /* Team only */ + private List linkedInfrastructure = null; /* ITProfile only */ + + + /** + * Default Constructor + */ + public ActorProfileElement() + { + } + + + /** + * Copy/clone Constructor - the resulting object. + * + * @param template object being copied + */ + public ActorProfileElement(ActorProfileElement template) + { + if (template != null) + { + elementHeader = template.getElementHeader(); + profileProperties = template.getProfileProperties(); + contactMethods = template.getContactMethods(); + contributionRecord = template.getContributionRecord(); + personRoles = template.getPersonRoles(); + peers = template.getPeers(); + locations = template.getLocations(); + userIdentities = template.getUserIdentities(); + superTeam = template.getSuperTeam(); + subTeams = template.getSubTeams(); + teamLeaderRoles = template.getTeamLeaderRoles(); + teamMemberRoles = template.getTeamMemberRoles(); + businessCapability = template.getBusinessCapability(); + linkedInfrastructure = template.getLinkedInfrastructure(); + } + } + + + /** + * Return the element header associated with the properties. + * + * @return element header object + */ + public ElementHeader getElementHeader() + { + return elementHeader; + } + + + /** + * Set up the element header associated with the properties. + * + * @param elementHeader element header object + */ + public void setElementHeader(ElementHeader elementHeader) + { + this.elementHeader = elementHeader; + } + + + /** + * Return the properties of the profile. + * + * @return properties + */ + public ActorProfileProperties getProfileProperties() + { + return profileProperties; + } + + + /** + * Set up the profile properties. + * + * @param profileProperties properties + */ + public void setProfileProperties(ActorProfileProperties profileProperties) + { + this.profileProperties = profileProperties; + } + + + /** + * Return the contact methods for this profile. + * + * @return list of contact methods + */ + public List getContactMethods() + { + return contactMethods; + } + + + /** + * Set up the contact methods for this profile. + * + * @param contactMethods list of contact methods + */ + public void setContactMethods(List contactMethods) + { + this.contactMethods = contactMethods; + } + + + /** + * Return the contribution record (only if this profile is for a person). + * + * @return contribution record + */ + public ContributionRecordElement getContributionRecord() + { + return contributionRecord; + } + + + /** + * Set up the contribution record (only if this profile is for a person). + * + * @param contributionRecord contribution record + */ + public void setContributionRecord(ContributionRecordElement contributionRecord) + { + this.contributionRecord = contributionRecord; + } + + + /** + * Return the headers of the person roles that this actor is appointed to. + * + * @return role stubs + */ + public List getPersonRoles() + { + return personRoles; + } + + + /** + * Set up the headers of the person roles that this actor is appointed to. + * + * @param personRoles role stubs + */ + public void setPersonRoles(List personRoles) + { + this.personRoles = personRoles; + } + + + /** + * Return the list of profile identifiers (GUIDs) for peers. + * + * @return list of stubs for linked elements + */ + public List getPeers() + { + return peers; + } + + + /** + * Set up the list of profile identifiers (GUIDs) for peers. + * + * @param peers list of stubs for linked elements + */ + public void setPeers(List peers) + { + this.peers = peers; + } + + + /** + * Return the headers of the location that this actor is linked to. + * + * @return location stubs + */ + public List getLocations() + { + return locations; + } + + + /** + * Set up the headers of the person roles that this actor is linked to. + * + * @param locations location stubs + */ + public void setLocations(List locations) + { + this.locations = locations; + } + + + /** + * Return the list of user identities for this profile. + * + * @return list of userIds + */ + public List getUserIdentities() + { + return userIdentities; + } + + + /** + * Set up the list of user identities for this profile. + * + * @param userIdentities list of userIds + */ + public void setUserIdentities(List userIdentities) + { + this.userIdentities = userIdentities; + } + + + /** + * Return a summary of the team that is above this team in the organizational hierarchy. + * + * @return team stub + */ + public ElementStub getSuperTeam() + { + return superTeam; + } + + + /** + * Set up a summary of the team that is above this team in the organizational hierarchy. + * + * @param superTeam team stub + */ + public void setSuperTeam(ElementStub superTeam) + { + this.superTeam = superTeam; + } + + + /** + * Return the list of team that report to this team. + * + * @return list of team stubs + */ + public List getSubTeams() + { + return subTeams; + } + + + /** + * Set up the list of team that report to this team. + * + * @param subTeams list of team stubs + */ + public void setSubTeams(List subTeams) + { + this.subTeams = subTeams; + } + + + /** + * Return the list of leader roles assigned to this team. + * + * @return list of role stubs + */ + public List getTeamLeaderRoles() + { + return teamLeaderRoles; + } + + + /** + * Set up the list of leader roles assigned to this team. + * + * @param teamLeaderRoles list of role stubs + */ + public void setTeamLeaderRoles(List teamLeaderRoles) + { + this.teamLeaderRoles = teamLeaderRoles; + } + + + /** + * Return the list of member roles assigned to this team. + * + * @return list of role stubs + */ + public List getTeamMemberRoles() + { + return teamMemberRoles; + } + + + /** + * Set up the list of member roles assigned to this team. + * + * @param teamMemberRoles list of role stubs + */ + public void setTeamMemberRoles(List teamMemberRoles) + { + this.teamMemberRoles = teamMemberRoles; + } + + + /** + * Return the business capability linked via the organizational capability relationship. + * + * @return list of capabilities + */ + public List getBusinessCapability() + { + return businessCapability; + } + + + /** + * Set up the business capability linked via the organizational capability relationship. + * + * @param businessCapability list of capabilities + */ + public void setBusinessCapability(List businessCapability) + { + this.businessCapability = businessCapability; + } + + + /** + * Return the stubs of the pieces of IT infrastructure linked to the profile. + * + * @return list of element stubs + */ + public List getLinkedInfrastructure() + { + return linkedInfrastructure; + } + + + /** + * Set up the stubs of the pieces of IT infrastructure linked to the profile. + * + * @param linkedInfrastructure list of element stubs + */ + public void setLinkedInfrastructure(List linkedInfrastructure) + { + this.linkedInfrastructure = linkedInfrastructure; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "ActorProfileElement{" + + "elementHeader=" + elementHeader + + ", profileProperties=" + profileProperties + + ", contactMethods=" + contactMethods + + ", contributionRecord=" + contributionRecord + + ", personRoles=" + personRoles + + ", peers=" + peers + + ", locations=" + locations + + ", userIdentities=" + userIdentities + + ", superTeam=" + superTeam + + ", subTeams=" + subTeams + + ", teamLeaderRoles=" + teamLeaderRoles + + ", teamMemberRoles=" + teamMemberRoles + + ", businessCapability=" + businessCapability + + ", linkedInfrastructure=" + linkedInfrastructure + + '}'; + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + ActorProfileElement that = (ActorProfileElement) objectToCompare; + return Objects.equals(elementHeader, that.elementHeader) && + Objects.equals(profileProperties, that.profileProperties) && + Objects.equals(contactMethods, that.contactMethods) && + Objects.equals(contributionRecord, that.contributionRecord) && + Objects.equals(personRoles, that.personRoles) && + Objects.equals(peers, that.peers) && + Objects.equals(locations, that.locations) && + Objects.equals(userIdentities, that.userIdentities) && + Objects.equals(superTeam, that.superTeam) && + Objects.equals(subTeams, that.subTeams) && + Objects.equals(teamLeaderRoles, that.teamLeaderRoles) && + Objects.equals(teamMemberRoles, that.teamMemberRoles) && + Objects.equals(businessCapability, that.businessCapability) && + Objects.equals(linkedInfrastructure, that.linkedInfrastructure); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(elementHeader, profileProperties, contactMethods, contributionRecord, userIdentities, superTeam, subTeams, + teamLeaderRoles, personRoles, peers, locations, teamMemberRoles, businessCapability,linkedInfrastructure); + } +} diff --git a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/metadataelements/AgreementRoleAppointee.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/AgreementRoleAppointee.java similarity index 87% rename from open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/metadataelements/AgreementRoleAppointee.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/AgreementRoleAppointee.java index 1b45de2214f..fe0b0ee324d 100644 --- a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/metadataelements/AgreementRoleAppointee.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/AgreementRoleAppointee.java @@ -1,13 +1,13 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalservice.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.digitalservice.properties.AgreementRoleProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.digitalbusiness.AgreementRoleProperties; import java.util.Objects; @@ -92,14 +92,10 @@ public void setAgreementRoleProperties(AgreementRoleProperties agreementRoleProp public String toString() { return "AgreementRoleAppointee{" + - "agreementRoleProperties=" + agreementRoleProperties + - ", currentAppointees=" + getCurrentAppointees() + - ", elementHeader=" + getElementHeader() + - ", properties=" + getProperties() + - '}'; + "agreementRoleProperties=" + agreementRoleProperties + + "} " + super.toString(); } - /** * Return comparison result based on the content of the properties. * diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/Appointee.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/Appointee.java new file mode 100644 index 00000000000..3f567501bcb --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/Appointee.java @@ -0,0 +1,214 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import java.util.Date; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * Appointee describes an individual's appointment to a specific role. It includes their personal details along with the + * start and end date of their appointment. The elementHeader is from the PersonRoleAppointment relationship. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class Appointee implements MetadataElement +{ + private ElementHeader elementHeader = null; + private ActorProfileElement profile = null; + private Date startDate = null; + private Date endDate = null; + private boolean isPublic = false; + + + /** + * Default constructor + */ + public Appointee() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public Appointee(Appointee template) + { + if (template != null) + { + this.elementHeader = template.getElementHeader(); + this.profile = template.getProfile(); + this.startDate = template.getStartDate(); + this.endDate = template.getEndDate(); + isPublic = template.getIsPublic(); + } + } + + + + /** + * Return the element header associated with the properties. + * + * @return element header object + */ + @Override + public ElementHeader getElementHeader() + { + return elementHeader; + } + + + /** + * Set up the element header associated with the properties. + * + * @param elementHeader element header object + */ + @Override + public void setElementHeader(ElementHeader elementHeader) + { + this.elementHeader = elementHeader; + } + + + + /** + * Return if the contents of this profile be shared with colleagues. + * + * @return flag + */ + public boolean getIsPublic() + { + return isPublic; + } + + + /** + * Set up if the contents of this profile be shared with colleagues. + * + * @param isPublic flag + */ + public void setIsPublic(boolean isPublic) + { + this.isPublic = isPublic; + } + + + /** + * Return the profile information for the individual. + * + * @return personal profile object + */ + public ActorProfileElement getProfile() + { + return profile; + } + + + /** + * Set up the profile information for the individual. + * + * @param profile personal profile object + */ + public void setProfile(ActorProfileElement profile) + { + this.profile = profile; + } + + + /** + * Return the start date of the appointment. + * + * @return date + */ + public Date getStartDate() + { + return startDate; + } + + + /** + * Set the start date of the appointment. + * + * @param startDate date + */ + public void setStartDate(Date startDate) + { + this.startDate = startDate; + } + + + /** + * Return the end date of the appointment. + * + * @return end date - null means open-ended appointment + */ + public Date getEndDate() + { + return endDate; + + } + + + /** + * Set up the start date of the appointment. + * + * @param endDate date - null means open-ended appointment + */ + public void setEndDate(Date endDate) + { + this.endDate = endDate; + } + + + /** + * JSON-style toString. + * + * @return list of properties and their values. + */ + @Override + public String toString() + { + return "Appointee{" + + "elementHeader=" + elementHeader + + ", profile=" + profile + + ", startDate=" + startDate + + ", endDate=" + endDate + + ", isPublic=" + isPublic + + '}'; + } + + /** + * Equals method that returns true if containing properties are the same. + * + * @param objectToCompare object to compare + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) return true; + if (objectToCompare == null || getClass() != objectToCompare.getClass()) return false; + Appointee appointee = (Appointee) objectToCompare; + return isPublic == appointee.isPublic && Objects.equals(elementHeader, appointee.elementHeader) && Objects.equals(profile, appointee.profile) && Objects.equals(startDate, appointee.startDate) && Objects.equals(endDate, appointee.endDate); + } + + /** + * Hash code for this object + * + * @return int + */ + @Override + public int hashCode() + { + return Objects.hash(getProfile(), getElementHeader(), getStartDate(), getEndDate(), getIsPublic()); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/AssetElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/AssetElement.java new file mode 100644 index 00000000000..2d2c5af5e19 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/AssetElement.java @@ -0,0 +1,146 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.AssetProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * AssetElement contains the properties and header for an asset retrieved from the metadata repository. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class AssetElement implements MetadataElement +{ + private AssetProperties properties = null; + private ElementHeader elementHeader = null; + + + /** + * Default constructor + */ + public AssetElement() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public AssetElement(AssetElement template) + { + if (template != null) + { + elementHeader = template.getElementHeader(); + properties = template.getProperties(); + } + } + + + /** + * Return the element header associated with the properties. + * + * @return element header object + */ + @Override + public ElementHeader getElementHeader() + { + return elementHeader; + } + + + /** + * Set up the element header associated with the properties. + * + * @param elementHeader element header object + */ + @Override + public void setElementHeader(ElementHeader elementHeader) + { + this.elementHeader = elementHeader; + } + + + /** + * Return the properties for the asset. + * + * @return asset properties (using appropriate subclass) + */ + public AssetProperties getProperties() + { + return properties; + } + + + /** + * Set up the properties for the asset. + * + * @param properties asset properties + */ + public void setProperties(AssetProperties properties) + { + this.properties = properties; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "AssetElement{" + + "properties=" + properties + + ", elementHeader=" + elementHeader + + '}'; + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + AssetElement that = (AssetElement) objectToCompare; + return Objects.equals(getProperties(), that.getProperties()) && + Objects.equals(getElementHeader(), that.getElementHeader()); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elementHeader, properties); + } +} diff --git a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/properties/AssetGraph.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/AssetGraph.java similarity index 87% rename from open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/properties/AssetGraph.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/AssetGraph.java index 7c3a10ebb90..3bf7ad8170c 100644 --- a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/properties/AssetGraph.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/AssetGraph.java @@ -1,11 +1,9 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetconsumer.properties; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.Asset; - import java.util.List; import java.util.Objects; @@ -13,10 +11,10 @@ * AssetGraph is used to return an asset along with all of its anchored elements and the relationships * that they have between one another and to other elements. */ -public class AssetGraph extends Asset +public class AssetGraph extends AssetElement { - List anchoredElements = null; - List relationships = null; + List anchoredElements = null; + List relationships = null; /** * Default constructor @@ -31,7 +29,7 @@ public AssetGraph() * * @param template template values for asset */ - public AssetGraph(Asset template) + public AssetGraph(AssetElement template) { super(template); } @@ -59,7 +57,7 @@ public AssetGraph(AssetGraph template) * * @return anchored elements */ - public List getAnchoredElements() + public List getAnchoredElements() { return anchoredElements; } @@ -70,7 +68,7 @@ public List getAnchoredElements() * * @param anchoredElements anchored elements */ - public void setAnchoredElements(List anchoredElements) + public void setAnchoredElements(List anchoredElements) { this.anchoredElements = anchoredElements; } diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/AssetRelationshipElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/AssetRelationshipElement.java similarity index 96% rename from open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/AssetRelationshipElement.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/AssetRelationshipElement.java index 82f081f9de4..049710a4b75 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/AssetRelationshipElement.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/AssetRelationshipElement.java @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -13,8 +13,7 @@ import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; + /** * AssetRelationshipElement contains the properties and header for a relationship retrieved from the repository. diff --git a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/properties/AssetSearchMatches.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/AssetSearchMatches.java similarity index 85% rename from open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/properties/AssetSearchMatches.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/AssetSearchMatches.java index 485f0adc714..90335c6aec6 100644 --- a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/properties/AssetSearchMatches.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/AssetSearchMatches.java @@ -1,11 +1,9 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetconsumer.properties; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.Asset; - import java.util.List; import java.util.Objects; @@ -13,9 +11,9 @@ * AssetSearchMatches is used to return an asset whose has anchored elements returned from a search. * The matching element are the OCF beans for the matching elements. */ -public class AssetSearchMatches extends Asset +public class AssetSearchMatches extends AssetElement { - List matchingElements = null; + List matchingElements = null; /** * Default constructor @@ -30,7 +28,7 @@ public AssetSearchMatches() * * @param template template values for asset summary */ - public AssetSearchMatches(Asset template) + public AssetSearchMatches(AssetElement template) { super(template); } @@ -57,7 +55,7 @@ public AssetSearchMatches(AssetSearchMatches template) * * @return list */ - public List getMatchingElements() + public List getMatchingElements() { return matchingElements; } @@ -68,7 +66,7 @@ public List getMatchingElements() * * @param matchingElements list */ - public void setMatchingElements(List matchingElements) + public void setMatchingElements(List matchingElements) { this.matchingElements = matchingElements; } diff --git a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/metadataelements/BusinessCapabilityElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/BusinessCapabilityElement.java similarity index 93% rename from open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/metadataelements/BusinessCapabilityElement.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/BusinessCapabilityElement.java index 4beaaded989..ae6b05af91c 100644 --- a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/metadataelements/BusinessCapabilityElement.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/BusinessCapabilityElement.java @@ -1,13 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalservice.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.digitalservice.properties.BusinessCapabilityProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.properties.digitalbusiness.BusinessCapabilityProperties; import java.util.Objects; diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/CertificationElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/CertificationElement.java new file mode 100644 index 00000000000..f2eb8e34268 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/CertificationElement.java @@ -0,0 +1,197 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.CertificationProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * CertificationElement contains the properties and header for a certification for an element. + * It includes the details of the specific element's certification and details of the certification type. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class CertificationElement +{ + private ElementHeader certificationHeader = null; + private RelationshipProperties certificationProperties = null; + private ElementHeader certificationTypeHeader = null; + private CertificationProperties certificationTypeProperties = null; + + /** + * Default constructor + */ + public CertificationElement() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public CertificationElement(CertificationElement template) + { + if (template != null) + { + certificationHeader = template.getCertificationHeader(); + certificationProperties = template.getCertificationProperties(); + certificationTypeHeader = template.getCertificationTypeHeader(); + certificationTypeProperties = template.getCertificationTypeProperties(); + } + } + + + /** + * Return the element header associated with the relationship. + * + * @return element header object + */ + public ElementHeader getCertificationHeader() + { + return certificationHeader; + } + + + /** + * Set up the element header associated with the relationship. + * + * @param certificationHeader element header object + */ + public void setCertificationHeader(ElementHeader certificationHeader) + { + this.certificationHeader = certificationHeader; + } + + + /** + * Return details of the relationship + * + * @return relationship properties + */ + public RelationshipProperties getCertificationProperties() + { + return certificationProperties; + } + + + /** + * Set up relationship properties + * + * @param certificationProperties relationship properties + */ + public void setCertificationProperties(RelationshipProperties certificationProperties) + { + this.certificationProperties = certificationProperties; + } + + + /** + * Return the element header associated with end 2 of the relationship (certification type). + * + * @return element stub object + */ + public ElementHeader getCertificationTypeHeader() + { + return certificationTypeHeader; + } + + + /** + * Set up the element header associated with end 2 of the relationship (certification type). + * + * @param certificationTypeHeader element stub object + */ + public void setCertificationTypeHeader(ElementHeader certificationTypeHeader) + { + this.certificationTypeHeader = certificationTypeHeader; + } + + + /** + * Return the properties of the certification type. + * + * @return properties + */ + public CertificationProperties getCertificationTypeProperties() + { + return certificationTypeProperties; + } + + + /** + * Set up the properties of the certification type. + * + * @param certificationTypeProperties properties + */ + public void setCertificationTypeProperties(CertificationProperties certificationTypeProperties) + { + this.certificationTypeProperties = certificationTypeProperties; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "CertificationElement{" + + "certificationHeader=" + certificationHeader + + ", relationshipProperties=" + certificationProperties + + ", certificationTypeHeader=" + certificationTypeHeader + + ", certificationTypeProperties=" + certificationTypeProperties + + '}'; + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (! (objectToCompare instanceof CertificationElement)) + { + return false; + } + CertificationElement that = (CertificationElement) objectToCompare; + return Objects.equals(certificationHeader, that.certificationHeader) && + Objects.equals(certificationProperties, that.certificationProperties) && + Objects.equals(certificationTypeHeader, that.certificationTypeHeader) && + Objects.equals(certificationTypeProperties, that.certificationTypeProperties); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), certificationHeader, certificationProperties, certificationTypeHeader, certificationTypeProperties); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/CertificationTypeElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/CertificationTypeElement.java new file mode 100644 index 00000000000..d82095e86f3 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/CertificationTypeElement.java @@ -0,0 +1,174 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.CertificationTypeProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * CertificationTypeElement contains the properties and header for a certification type retrieved from the metadata repository. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class CertificationTypeElement implements MetadataElement +{ + private ElementHeader elementHeader = null; + private CertificationTypeProperties properties = null; + private RelatedElement relatedElement = null; + + + /** + * Default constructor + */ + public CertificationTypeElement() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public CertificationTypeElement(CertificationTypeElement template) + { + if (template != null) + { + elementHeader = template.getElementHeader(); + properties = template.getProperties(); + relatedElement = template.getRelatedElement(); + } + } + + + /** + * Return the element header associated with the properties. + * + * @return element header object + */ + @Override + public ElementHeader getElementHeader() + { + return elementHeader; + } + + + /** + * Set up the element header associated with the properties. + * + * @param elementHeader element header object + */ + @Override + public void setElementHeader(ElementHeader elementHeader) + { + this.elementHeader = elementHeader; + } + + + /** + * Return the properties of the certification type. + * + * @return properties + */ + public CertificationTypeProperties getProperties() + { + return properties; + } + + + /** + * Set up the certification type properties. + * + * @param properties properties + */ + public void setProperties(CertificationTypeProperties properties) + { + this.properties = properties; + } + + + /** + * Return details of the relationship used to retrieve this element. + * Will be null if the element was retrieved directly rather than via a relationship. + * + * @return list of element stubs + */ + public RelatedElement getRelatedElement() + { + return relatedElement; + } + + + /** + * Set up details of the relationship used to retrieve this element. + * Will be null if the element was retrieved directly rather than via a relationship. + * + * @param relatedElement relationship details + */ + public void setRelatedElement(RelatedElement relatedElement) + { + this.relatedElement = relatedElement; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "CertificationTypeElement{" + + "elementHeader=" + elementHeader + + ", properties=" + properties + + ", relatedElement=" + relatedElement + + '}'; + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + CertificationTypeElement that = (CertificationTypeElement) objectToCompare; + return Objects.equals(elementHeader, that.elementHeader) && + Objects.equals(properties, that.properties) && + Objects.equals(relatedElement, that.relatedElement); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elementHeader, properties, relatedElement); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/CollectionElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/CollectionElement.java new file mode 100644 index 00000000000..04dd86ebd40 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/CollectionElement.java @@ -0,0 +1,174 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.collections.CollectionProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * CollectionElement contains the properties and header for a collection retrieved from the metadata repository. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class CollectionElement implements MetadataElement +{ + private ElementHeader elementHeader = null; + private CollectionProperties properties = null; + private RelatedElement relatedElement = null; + + + /** + * Default constructor + */ + public CollectionElement() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public CollectionElement(CollectionElement template) + { + if (template != null) + { + elementHeader = template.getElementHeader(); + properties = template.getProperties(); + relatedElement = template.getRelatedElement(); + } + } + + + /** + * Return the element header associated with the properties. + * + * @return element header object + */ + @Override + public ElementHeader getElementHeader() + { + return elementHeader; + } + + + /** + * Set up the element header associated with the properties. + * + * @param elementHeader element header object + */ + @Override + public void setElementHeader(ElementHeader elementHeader) + { + this.elementHeader = elementHeader; + } + + + /** + * Return the properties of the collection. + * + * @return properties + */ + public CollectionProperties getProperties() + { + return properties; + } + + + /** + * Set up the collection properties. + * + * @param properties properties + */ + public void setProperties(CollectionProperties properties) + { + this.properties = properties; + } + + + /** + * Return details of the relationship used to retrieve this element. + * Will be null if the element was retrieved directly rather than via a relationship. + * + * @return list of element stubs + */ + public RelatedElement getRelatedElement() + { + return relatedElement; + } + + + /** + * Set up details of the relationship used to retrieve this element. + * Will be null if the element was retrieved directly rather than via a relationship. + * + * @param relatedElement relationship details + */ + public void setRelatedElement(RelatedElement relatedElement) + { + this.relatedElement = relatedElement; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "CollectionElement{" + + "elementHeader=" + elementHeader + + ", properties=" + properties + + ", relatedElement=" + relatedElement + + '}'; + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + CollectionElement that = (CollectionElement) objectToCompare; + return Objects.equals(elementHeader, that.elementHeader) && + Objects.equals(properties, that.properties) && + Objects.equals(relatedElement, that.relatedElement); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elementHeader, properties, relatedElement); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/CollectionMember.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/CollectionMember.java new file mode 100644 index 00000000000..c094c44525f --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/CollectionMember.java @@ -0,0 +1,200 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.collections.CollectionMembershipProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ReferenceableProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * CollectionMember describes a member of a collection. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class CollectionMember implements MetadataElement +{ + private ElementHeader relationshipHeader = null; + private CollectionMembershipProperties relationshipProperties = null; + + private ElementHeader elementHeader = null; + + private ReferenceableProperties properties = null; + + + /** + * Default constructor + */ + public CollectionMember() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public CollectionMember(CollectionMember template) + { + + if (template != null) + { + relationshipHeader = template.getRelationshipHeader(); + relationshipProperties = template.getRelationshipProperties(); + elementHeader = template.getElementHeader(); + properties = template.getProperties(); + } + } + + /** + * Return the element header associated with the relationship. + * + * @return element header object + */ + public ElementHeader getRelationshipHeader() + { + return relationshipHeader; + } + + + /** + * Set up the element header associated with the relationship. + * + * @param relationshipHeader element header object + */ + public void setRelationshipHeader(ElementHeader relationshipHeader) + { + this.relationshipHeader = relationshipHeader; + } + + + /** + * Return details of the relationship + * + * @return relationship properties + */ + public CollectionMembershipProperties getRelationshipProperties() + { + return relationshipProperties; + } + + + /** + * Set up relationship properties + * + * @param relationshipProperties relationship properties + */ + public void setRelationshipProperties(CollectionMembershipProperties relationshipProperties) + { + this.relationshipProperties = relationshipProperties; + } + + + /** + * Return the element header associated with the properties. + * + * @return element header object + */ + @Override + public ElementHeader getElementHeader() + { + return elementHeader; + } + + + /** + * Set up the element header associated with the properties. + * + * @param elementHeader element header object + */ + @Override + public void setElementHeader(ElementHeader elementHeader) + { + this.elementHeader = elementHeader; + } + + + /** + * Return the properties of the element. + * + * @return properties + */ + public ReferenceableProperties getProperties() + { + return properties; + } + + + /** + * Set up the properties of the element. + * + * @param properties properties + */ + public void setProperties(ReferenceableProperties properties) + { + this.properties = properties; + } + + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "CollectionMember{" + + "relationshipHeader=" + relationshipHeader + + ", relationshipProperties=" + relationshipProperties + + ", elementHeader=" + elementHeader + + ", properties=" + properties + + '}'; + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + CollectionMember that = (CollectionMember) objectToCompare; + return Objects.equals(relationshipHeader, that.relationshipHeader) && + Objects.equals(relationshipProperties, that.relationshipProperties) && + Objects.equals(elementHeader, that.elementHeader) && + Objects.equals(properties, that.properties); + } + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(relationshipHeader, relationshipProperties, elementHeader, properties); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/CommentElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/CommentElement.java new file mode 100644 index 00000000000..adae33a0e66 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/CommentElement.java @@ -0,0 +1,174 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.feedback.CommentProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * CommentElement contains the properties and header for a Comment entity retrieved from the metadata repository. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class CommentElement implements MetadataElement +{ + private ElementHeader elementHeader = null; + private CommentProperties properties = null; + private FeedbackTargetElement feedbackTargetElement = null; + + + + /** + * Default constructor + */ + public CommentElement() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public CommentElement(CommentElement template) + { + if (template != null) + { + elementHeader = template.getElementHeader(); + properties = template.getProperties(); + feedbackTargetElement = template.getFeedbackTargetElement(); + } + } + + + /** + * Return the element header associated with the properties. + * + * @return element header object + */ + @Override + public ElementHeader getElementHeader() + { + return elementHeader; + } + + + /** + * Set up the element header associated with the properties. + * + * @param elementHeader element header object + */ + @Override + public void setElementHeader(ElementHeader elementHeader) + { + this.elementHeader = elementHeader; + } + + + /** + * Return the properties of the comment. + * + * @return properties bean + */ + public CommentProperties getProperties() + { + return properties; + } + + + /** + * Set up the properties of the comment. + * + * @param properties properties bean + */ + public void setProperties(CommentProperties properties) + { + this.properties = properties; + } + + + /** + * Return details of the relationship from the element in the request to the comment. This value is null if the comment was retrieved independently + * of any commented element. + * + * @return associated relationship + */ + public FeedbackTargetElement getFeedbackTargetElement() + { + return feedbackTargetElement; + } + + + /** + * Set up details of the relationship from the element in the request to the comment. This value is null if the comment was retrieved independently + * of any commented element. + * + * @param feedbackTargetElement associated relationship + */ + public void setFeedbackTargetElement(FeedbackTargetElement feedbackTargetElement) + { + this.feedbackTargetElement = feedbackTargetElement; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "CommentElement{" + + "elementHeader=" + elementHeader + + ", properties=" + properties + + ", feedbackTargetElement=" + feedbackTargetElement + + '}'; + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (! (objectToCompare instanceof CommentElement that)) + { + return false; + } + return Objects.equals(elementHeader, that.elementHeader) && + Objects.equals(properties, that.properties) && + Objects.equals(feedbackTargetElement, that.feedbackTargetElement); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(elementHeader, properties, feedbackTargetElement); + } +} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/CommunityElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/CommunityElement.java similarity index 94% rename from open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/CommunityElement.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/CommunityElement.java index 7d584b53247..51515ab5083 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/CommunityElement.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/CommunityElement.java @@ -1,18 +1,17 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.communityprofile.properties.CommunityProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.communities.CommunityProperties; import java.util.Objects; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; /** * CommunityElement contains the properties and header for a community. diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/CommunityMembershipElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/CommunityMembershipElement.java similarity index 93% rename from open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/CommunityMembershipElement.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/CommunityMembershipElement.java index 1d3a677f389..e38f74779a3 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/CommunityMembershipElement.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/CommunityMembershipElement.java @@ -1,11 +1,10 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.*; -import org.odpi.openmetadata.accessservices.communityprofile.properties.CommunityMembershipType; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.enums.CommunityMembershipType; import java.util.Objects; diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ConnectionElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ConnectionElement.java new file mode 100644 index 00000000000..f98de141f4d --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ConnectionElement.java @@ -0,0 +1,236 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.ConnectionProperties; + +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * ConnectionElement contains the properties and header for a connection retrieved from the metadata repository. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ConnectionElement implements MetadataElement +{ + private ConnectionProperties connectionProperties = null; + private ElementHeader elementHeader = null; + private ElementStub connectorType = null; + private ElementStub endpoint = null; + private List embeddedConnections = null; + + + /** + * Default constructor + */ + public ConnectionElement() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public ConnectionElement(ConnectionElement template) + { + if (template != null) + { + elementHeader = template.getElementHeader(); + connectionProperties = template.getConnectionProperties(); + connectorType = template.getConnectorType(); + endpoint = template.getEndpoint(); + embeddedConnections = template.getEmbeddedConnections(); + } + } + + + /** + * Return the element header associated with the properties. + * + * @return element header object + */ + @Override + public ElementHeader getElementHeader() + { + return elementHeader; + } + + + /** + * Set up the element header associated with the properties. + * + * @param elementHeader element header object + */ + @Override + public void setElementHeader(ElementHeader elementHeader) + { + this.elementHeader = elementHeader; + } + + + /** + * Return the properties for the connection. + * + * @return asset properties (using appropriate subclass) + */ + public ConnectionProperties getConnectionProperties() + { + return connectionProperties; + } + + + /** + * Set up the properties for the connection. + * + * @param connectionProperties asset properties + */ + public void setConnectionProperties(ConnectionProperties connectionProperties) + { + this.connectionProperties = connectionProperties; + } + + + /** + * Set up the connector type properties for this Connection. + * + * @param connectorType ConnectorType properties object + */ + public void setConnectorType(ElementStub connectorType) + { + this.connectorType = connectorType; + } + + + /** + * Returns a copy of the properties for this connection's connector type. + * A null means there is no connection type. + * + * @return connector type for the connection + */ + public ElementStub getConnectorType() + { + return connectorType; + } + + + /** + * Set up the endpoint properties for this Connection. + * + * @param endpoint Endpoint properties object + */ + public void setEndpoint(ElementStub endpoint) + { + this.endpoint = endpoint; + } + + + /** + * Returns a copy of the properties for this connection's endpoint. + * Null means no endpoint information available. + * + * @return endpoint for the connection + */ + public ElementStub getEndpoint() + { + return endpoint; + } + + + /** + * Return the list of embedded connections for this virtual connection. + * + * @return list of EmbeddedConnection objects + */ + public List getEmbeddedConnections() + { + if (embeddedConnections == null) + { + return null; + } + else if (embeddedConnections.isEmpty()) + { + return null; + } + else + { + return new ArrayList<>(embeddedConnections); + } + } + + + /** + * Set up the list of embedded connections for this virtual connection. + * + * @param embeddedConnections list of EmbeddedConnection objects + */ + public void setEmbeddedConnections(List embeddedConnections) + { + this.embeddedConnections = embeddedConnections; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "ConnectionElement{" + + "connectionProperties=" + connectionProperties + + ", elementHeader=" + elementHeader + + ", connectorType=" + connectorType + + ", endpoint=" + endpoint + + ", embeddedConnections=" + embeddedConnections + + '}'; + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + ConnectionElement that = (ConnectionElement) objectToCompare; + return Objects.equals(getConnectionProperties(), that.getConnectionProperties()) && + Objects.equals(getElementHeader(), that.getElementHeader()); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elementHeader, connectionProperties); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ConnectorTypeElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ConnectorTypeElement.java new file mode 100644 index 00000000000..95fd7804307 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ConnectorTypeElement.java @@ -0,0 +1,147 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.ConnectorTypeProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * ConnectorTypeElement contains the properties and header for a connector type retrieved from the metadata repository. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ConnectorTypeElement implements MetadataElement +{ + private ConnectorTypeProperties connectorTypeProperties = null; + private ElementHeader elementHeader = null; + + + /** + * Default constructor + */ + public ConnectorTypeElement() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public ConnectorTypeElement(ConnectorTypeElement template) + { + if (template != null) + { + elementHeader = template.getElementHeader(); + connectorTypeProperties = template.getConnectorTypeProperties(); + } + } + + + /** + * Return the element header associated with the properties. + * + * @return element header object + */ + @Override + public ElementHeader getElementHeader() + { + return elementHeader; + } + + + /** + * Set up the element header associated with the properties. + * + * @param elementHeader element header object + */ + @Override + public void setElementHeader(ElementHeader elementHeader) + { + this.elementHeader = elementHeader; + } + + + + /** + * Return the properties for the connector type. + * + * @return asset properties (using appropriate subclass) + */ + public ConnectorTypeProperties getConnectorTypeProperties() + { + return connectorTypeProperties; + } + + + /** + * Set up the properties for the connector type. + * + * @param connectorTypeProperties asset properties + */ + public void setConnectorTypeProperties(ConnectorTypeProperties connectorTypeProperties) + { + this.connectorTypeProperties = connectorTypeProperties; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "ConnectorTypeElement{" + + "connectorTypeProperties=" + connectorTypeProperties + + ", elementHeader=" + elementHeader + + '}'; + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + ConnectorTypeElement that = (ConnectorTypeElement) objectToCompare; + return Objects.equals(getConnectorTypeProperties(), that.getConnectorTypeProperties()) && + Objects.equals(getElementHeader(), that.getElementHeader()); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elementHeader, connectorTypeProperties); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ContactMethodElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ContactMethodElement.java new file mode 100644 index 00000000000..4f79b39191a --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ContactMethodElement.java @@ -0,0 +1,146 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.ContactMethodProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * ContactMethodElement contains the properties and header for a contract method retrieved from the metadata repository. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ContactMethodElement implements MetadataElement +{ + private ElementHeader elementHeader = null; + private ContactMethodProperties properties = null; + + + /** + * Default constructor + */ + public ContactMethodElement() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public ContactMethodElement(ContactMethodElement template) + { + if (template != null) + { + elementHeader = template.getElementHeader(); + properties = template.getProperties(); + } + } + + + /** + * Return the element header associated with the properties. + * + * @return element header object + */ + @Override + public ElementHeader getElementHeader() + { + return elementHeader; + } + + + /** + * Set up the element header associated with the properties. + * + * @param elementHeader element header object + */ + @Override + public void setElementHeader(ElementHeader elementHeader) + { + this.elementHeader = elementHeader; + } + + + /** + * Return the properties of the contact method. + * + * @return properties + */ + public ContactMethodProperties getProperties() + { + return properties; + } + + + /** + * Set up the contract method properties. + * + * @param properties properties + */ + public void setProperties(ContactMethodProperties properties) + { + this.properties = properties; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "ContactMethodElement{" + + "elementHeader=" + elementHeader + + ", properties=" + properties + + '}'; + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + ContactMethodElement that = (ContactMethodElement) objectToCompare; + return Objects.equals(elementHeader, that.elementHeader) && + Objects.equals(properties, that.properties); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elementHeader, properties); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ContributionRecordElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ContributionRecordElement.java new file mode 100644 index 00000000000..28443ff28d9 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ContributionRecordElement.java @@ -0,0 +1,146 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.ContributionRecord; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * ContributionRecordElement contains the properties and header for a contribution record retrieved from the metadata repository. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ContributionRecordElement implements MetadataElement +{ + private ElementHeader elementHeader = null; + private ContributionRecord properties = null; + + + /** + * Default constructor + */ + public ContributionRecordElement() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public ContributionRecordElement(ContributionRecordElement template) + { + if (template != null) + { + elementHeader = template.getElementHeader(); + properties = template.getProperties(); + } + } + + + /** + * Return the element header associated with the properties. + * + * @return element header object + */ + @Override + public ElementHeader getElementHeader() + { + return elementHeader; + } + + + /** + * Set up the element header associated with the properties. + * + * @param elementHeader element header object + */ + @Override + public void setElementHeader(ElementHeader elementHeader) + { + this.elementHeader = elementHeader; + } + + + /** + * Return the properties of the contribution record. + * + * @return properties + */ + public ContributionRecord getProperties() + { + return properties; + } + + + /** + * Set up the contribution record properties. + * + * @param properties properties + */ + public void setProperties(ContributionRecord properties) + { + this.properties = properties; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "ContributionRecordElement{" + + "elementHeader=" + elementHeader + + ", properties=" + properties + + '}'; + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + ContributionRecordElement that = (ContributionRecordElement) objectToCompare; + return Objects.equals(elementHeader, that.elementHeader) && + Objects.equals(properties, that.properties); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elementHeader, properties); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ControlFlowElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ControlFlowElement.java new file mode 100644 index 00000000000..ef5a3579c19 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ControlFlowElement.java @@ -0,0 +1,196 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.lineage.ControlFlowProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * ControlFlowElement contains the properties and header for a control flow relationship retrieved from the metadata repository. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ControlFlowElement +{ + private ElementHeader controlFlowHeader = null; + private ControlFlowProperties controlFlowProperties = null; + private ElementHeader currentStep = null; + private ElementHeader nextStep = null; + + /** + * Default constructor + */ + public ControlFlowElement() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public ControlFlowElement(ControlFlowElement template) + { + if (template != null) + { + controlFlowHeader = template.getControlFlowHeader(); + controlFlowProperties = template.getControlFlowProperties(); + currentStep = template.getCurrentStep(); + nextStep = template.getNextStep(); + } + } + + + /** + * Return the element header associated with the relationship. + * + * @return element header object + */ + public ElementHeader getControlFlowHeader() + { + return controlFlowHeader; + } + + + /** + * Set up the element header associated with the relationship. + * + * @param controlFlowHeader element header object + */ + public void setControlFlowHeader(ElementHeader controlFlowHeader) + { + this.controlFlowHeader = controlFlowHeader; + } + + + /** + * Return details of the relationship + * + * @return relationship properties + */ + public ControlFlowProperties getControlFlowProperties() + { + return controlFlowProperties; + } + + + /** + * Set up relationship properties + * + * @param controlFlowProperties relationship properties + */ + public void setControlFlowProperties(ControlFlowProperties controlFlowProperties) + { + this.controlFlowProperties = controlFlowProperties; + } + + + /** + * Return the element header associated with end 1 of the relationship. + * + * @return element header object + */ + public ElementHeader getCurrentStep() + { + return currentStep; + } + + + /** + * Set up the element header associated with end 1 of the relationship. + * + * @param currentStep element header object + */ + public void setCurrentStep(ElementHeader currentStep) + { + this.currentStep = currentStep; + } + + + + /** + * Return the element header associated with end 2 of the relationship. + * + * @return element header object + */ + public ElementHeader getNextStep() + { + return nextStep; + } + + + /** + * Set up the element header associated with end 2 of the relationship. + * + * @param nextStep element header object + */ + public void setNextStep(ElementHeader nextStep) + { + this.nextStep = nextStep; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "ControlFlowElement{" + + "controlFlowHeader=" + controlFlowHeader + + ", controlFlowProperties=" + controlFlowProperties + + ", currentStep=" + currentStep + + ", nextStep=" + nextStep + + '}'; + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + ControlFlowElement that = (ControlFlowElement) objectToCompare; + return Objects.equals(getControlFlowHeader(), that.getControlFlowHeader()) && + Objects.equals(getControlFlowProperties(), that.getControlFlowProperties()) && + Objects.equals(getCurrentStep(), that.getCurrentStep()) && + Objects.equals(getNextStep(), that.getNextStep()); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), controlFlowHeader, controlFlowProperties, currentStep, nextStep); + } +} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/DataAssetElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/DataAssetElement.java similarity index 90% rename from open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/DataAssetElement.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/DataAssetElement.java index fe7e274fe60..b5ab572d00f 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/DataAssetElement.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/DataAssetElement.java @@ -1,13 +1,13 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.AssetProperties; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.DataAssetProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.AssetProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.DataAssetProperties; import java.util.List; import java.util.Objects; @@ -15,8 +15,6 @@ import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementClassification; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; /** * DataAssetElement contains the properties and header for an asset retrieved from the metadata repository. diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/DataContainerElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/DataContainerElement.java similarity index 93% rename from open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/DataContainerElement.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/DataContainerElement.java index e8ca6184ec9..ce5d2e8c39b 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/DataContainerElement.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/DataContainerElement.java @@ -1,18 +1,18 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.properties.DataContainerProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.display.DataContainerProperties; import java.util.Objects; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; /** * DataContainerElement contains the properties and header for a data container entity retrieved from the metadata repository. diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/DataFieldElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/DataFieldElement.java similarity index 91% rename from open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/DataFieldElement.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/DataFieldElement.java index 62d9ea78124..aafde3bb253 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/DataFieldElement.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/DataFieldElement.java @@ -1,18 +1,18 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.properties.DataFieldProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.display.DataFieldProperties; import java.util.Objects; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; /** * DataFieldElement contains the properties and header for a data field entity retrieved from the metadata repository. @@ -59,7 +59,7 @@ public DataFieldElement(SchemaAttributeElement template) if (template != null) { elementHeader = template.getElementHeader(); - properties = new DataFieldProperties(template.getProperties()); + properties = new DataFieldProperties(template.getSchemaAttributeProperties()); } } diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/DataFileElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/DataFileElement.java similarity index 93% rename from open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/DataFileElement.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/DataFileElement.java index 49ae3eaa4a6..da211550ff5 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/DataFileElement.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/DataFileElement.java @@ -1,18 +1,18 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.properties.DataFileProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.filesandfolders.DataFileProperties; import java.util.Objects; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; /** * DataFileElement contains the properties and header for a data file retrieved from the metadata repository. diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/DataFlowElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/DataFlowElement.java new file mode 100644 index 00000000000..4f207a5329b --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/DataFlowElement.java @@ -0,0 +1,196 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.lineage.DataFlowProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * DataFlowElement contains the properties and header for a data flow relationship retrieved from the metadata repository. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class DataFlowElement +{ + private ElementHeader dataFlowHeader = null; + private DataFlowProperties dataFlowProperties = null; + private ElementHeader dataSupplier = null; + private ElementHeader dataConsumer = null; + + /** + * Default constructor + */ + public DataFlowElement() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public DataFlowElement(DataFlowElement template) + { + if (template != null) + { + dataFlowHeader = template.getDataFlowHeader(); + dataFlowProperties = template.getDataFlowProperties(); + dataSupplier = template.getDataSupplier(); + dataConsumer = template.getDataConsumer(); + } + } + + + /** + * Return the element header associated with the relationship. + * + * @return element header object + */ + public ElementHeader getDataFlowHeader() + { + return dataFlowHeader; + } + + + /** + * Set up the element header associated with the relationship. + * + * @param dataFlowHeader element header object + */ + public void setDataFlowHeader(ElementHeader dataFlowHeader) + { + this.dataFlowHeader = dataFlowHeader; + } + + + /** + * Return details of the relationship + * + * @return relationship properties + */ + public DataFlowProperties getDataFlowProperties() + { + return dataFlowProperties; + } + + + /** + * Set up relationship properties + * + * @param dataFlowProperties relationship properties + */ + public void setDataFlowProperties(DataFlowProperties dataFlowProperties) + { + this.dataFlowProperties = dataFlowProperties; + } + + + /** + * Return the element header associated with end 1 of the relationship. + * + * @return element header object + */ + public ElementHeader getDataSupplier() + { + return dataSupplier; + } + + + /** + * Set up the element header associated with end 1 of the relationship. + * + * @param dataSupplier element header object + */ + public void setDataSupplier(ElementHeader dataSupplier) + { + this.dataSupplier = dataSupplier; + } + + + + /** + * Return the element header associated with end 2 of the relationship. + * + * @return element header object + */ + public ElementHeader getDataConsumer() + { + return dataConsumer; + } + + + /** + * Set up the element header associated with end 2 of the relationship. + * + * @param dataConsumer element header object + */ + public void setDataConsumer(ElementHeader dataConsumer) + { + this.dataConsumer = dataConsumer; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "DataFlowElement{" + + "dataFlowHeader=" + dataFlowHeader + + ", dataFlowProperties=" + dataFlowProperties + + ", dataSupplier=" + dataSupplier + + ", dataConsumer=" + dataConsumer + + '}'; + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + DataFlowElement that = (DataFlowElement) objectToCompare; + return Objects.equals(getDataFlowHeader(), that.getDataFlowHeader()) && + Objects.equals(getDataFlowProperties(), that.getDataFlowProperties()) && + Objects.equals(getDataSupplier(), that.getDataSupplier()) && + Objects.equals(getDataConsumer(), that.getDataConsumer()); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), dataFlowHeader, dataFlowProperties, dataSupplier, dataConsumer); + } +} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/DatabaseColumnElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/DatabaseColumnElement.java similarity index 94% rename from open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/DatabaseColumnElement.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/DatabaseColumnElement.java index 35bb6451c6a..9572351b777 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/DatabaseColumnElement.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/DatabaseColumnElement.java @@ -1,20 +1,20 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.properties.DatabaseColumnProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.DatabaseForeignKeyProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.DatabasePrimaryKeyProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.databases.DatabaseColumnProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.databases.DatabaseForeignKeyProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.databases.DatabasePrimaryKeyProperties; import java.util.Objects; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; /** * DatabaseColumnElement contains the properties and header for a database column entity diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/DatabaseColumnTypeElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/DatabaseColumnTypeElement.java similarity index 92% rename from open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/DatabaseColumnTypeElement.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/DatabaseColumnTypeElement.java index 8da97af6e1f..0548f4a8f86 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/DatabaseColumnTypeElement.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/DatabaseColumnTypeElement.java @@ -1,18 +1,18 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.properties.SchemaTypeProperties; import java.util.Objects; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.SchemaTypeProperties; /** * DatabaseColumnTypeElement contains the properties and header for a database column type entity @@ -23,7 +23,7 @@ @JsonIgnoreProperties(ignoreUnknown=true) public class DatabaseColumnTypeElement implements MetadataElement { - private ElementHeader elementHeader = null; + private ElementHeader elementHeader = null; private SchemaTypeProperties databaseColumnTypeProperties = null; diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/DatabaseElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/DatabaseElement.java similarity index 93% rename from open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/DatabaseElement.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/DatabaseElement.java index 093b1451cb2..4fc16af99aa 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/DatabaseElement.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/DatabaseElement.java @@ -1,18 +1,18 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.properties.DatabaseProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.databases.DatabaseProperties; import java.util.Objects; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; /** * DatabaseElement contains the properties and header for a database entity retrieved from the metadata repository. diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/DatabaseSchemaElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/DatabaseSchemaElement.java similarity index 93% rename from open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/DatabaseSchemaElement.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/DatabaseSchemaElement.java index f87d5d0759b..a3a289fce4a 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/DatabaseSchemaElement.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/DatabaseSchemaElement.java @@ -1,18 +1,18 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.properties.DatabaseSchemaProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.databases.DatabaseSchemaProperties; import java.util.Objects; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; /** * DatabaseSchemaElement contains the properties and header for a deployed database schema asset entity diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/DatabaseTableElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/DatabaseTableElement.java similarity index 94% rename from open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/DatabaseTableElement.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/DatabaseTableElement.java index 64006ede7e5..708b827ac39 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/DatabaseTableElement.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/DatabaseTableElement.java @@ -1,18 +1,18 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.properties.DatabaseTableProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.databases.DatabaseTableProperties; import java.util.Objects; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; /** * DatabaseTableElement contains the properties and header for a database table entity diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/DatabaseViewElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/DatabaseViewElement.java similarity index 93% rename from open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/DatabaseViewElement.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/DatabaseViewElement.java index 6ef65af5abb..28eacdc03ed 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/DatabaseViewElement.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/DatabaseViewElement.java @@ -1,18 +1,18 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.properties.DatabaseViewProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.databases.DatabaseViewProperties; import java.util.Objects; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; /** * DatabaseViewElement contains the properties and header for a database view entity diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/DeployedCapabilityElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/DeployedCapabilityElement.java similarity index 94% rename from open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/DeployedCapabilityElement.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/DeployedCapabilityElement.java index a88ae510aa6..e8bd4be7a8d 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/DeployedCapabilityElement.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/DeployedCapabilityElement.java @@ -1,18 +1,17 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.CapabilityDeploymentProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities.CapabilityDeploymentProperties; import java.util.Objects; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; /** * DeployedCapabilityElement contains the properties and header for a SupportedSoftwareCapability relationship retrieved from the repository. diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/DeploymentElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/DeploymentElement.java similarity index 94% rename from open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/DeploymentElement.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/DeploymentElement.java index 300af872a51..1d783a63734 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/DeploymentElement.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/DeploymentElement.java @@ -1,18 +1,17 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.DeploymentProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.infrastructure.DeploymentProperties; import java.util.Objects; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; /** * DeploymentElement contains the properties and header for a DeployedOn relationship retrieved from the repository. diff --git a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/metadataelements/DigitalServiceElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/DigitalServiceElement.java similarity index 93% rename from open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/metadataelements/DigitalServiceElement.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/DigitalServiceElement.java index 297f7f00c4b..37f5a3f9aee 100644 --- a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/metadataelements/DigitalServiceElement.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/DigitalServiceElement.java @@ -1,13 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalservice.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.digitalservice.properties.DigitalServiceProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.properties.digitalbusiness.DigitalServiceProperties; import java.util.Objects; diff --git a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/metadataelements/DuplicateElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/DuplicateElement.java similarity index 93% rename from open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/metadataelements/DuplicateElement.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/DuplicateElement.java index ad3e5093e40..a3b893b9c59 100644 --- a/open-metadata-implementation/access-services/stewardship-action/stewardship-action-api/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/metadataelements/DuplicateElement.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/DuplicateElement.java @@ -1,13 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.stewardshipaction.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.stewardshipaction.properties.DuplicateProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.DuplicateProperties; import java.util.Objects; diff --git a/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/ElementClassification.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ElementClassification.java similarity index 98% rename from open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/ElementClassification.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ElementClassification.java index 6869f80e60c..187c282cf5f 100644 --- a/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/ElementClassification.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ElementClassification.java @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.frameworks.connectors.properties.beans; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; diff --git a/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/ElementClassificationHeader.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ElementClassificationHeader.java similarity index 91% rename from open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/ElementClassificationHeader.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ElementClassificationHeader.java index f8a73ec30f5..3330d1bba51 100644 --- a/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/ElementClassificationHeader.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ElementClassificationHeader.java @@ -1,8 +1,9 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.frameworks.connectors.properties.beans; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.*; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ClassificationOrigin; import java.util.Objects; @@ -23,13 +24,11 @@ @JsonSubTypes( { @JsonSubTypes.Type(value = ElementClassification.class, name = "ElementClassification"), - @JsonSubTypes.Type(value = SecurityTags.class, name = "SecurityTags"), - @JsonSubTypes.Type(value = GovernanceClassificationBase.class, name = "GovernanceClassificationBase") }) public class ElementClassificationHeader extends ElementControlHeader { - private ClassificationOrigin classificationOrigin = ClassificationOrigin.ASSIGNED; - private String classificationOriginGUID = null; + private ClassificationOrigin classificationOrigin = ClassificationOrigin.ASSIGNED; + private String classificationOriginGUID = null; /** diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ElementControlHeader.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ElementControlHeader.java new file mode 100644 index 00000000000..f46dfa9e9b0 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ElementControlHeader.java @@ -0,0 +1,245 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; + +import com.fasterxml.jackson.annotation.*; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ElementStatus; + +import java.util.*; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * The ElementControlHeader bean provides details of the origin and changes associated with the element. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ElementControlHeader +{ + /** + * Version identifier + */ + public static final long CURRENT_AUDIT_HEADER_VERSION = 1; + + /* + * Version number for this header. This is used to ensure that all the critical header information + * in read in a back-level version of the OCF. The default is 0 to indicate that the instance came from + * a version of the OCF that does not have a version number encoded. + */ + private long headerVersion = 0; + + + /* + * Common header for first class elements from a metadata repository + */ + private ElementStatus status = null; + private ElementType type = null; + private ElementOrigin origin = null; + private ElementVersions versions = null; + + + /** + * Default constructor used by subclasses + */ + public ElementControlHeader() + { + } + + + /** + * Copy/clone constructor. + * + * @param template element to copy + */ + public ElementControlHeader(ElementControlHeader template) + { + if (template != null) + { + headerVersion = template.getHeaderVersion(); + status = template.getStatus(); + type = template.getType(); + origin = template.getOrigin(); + versions = template.getVersions(); + } + } + + + /** + * Return the version of this header. This is used by the OMRS to determine if it is back level and + * should not process events from a source that is more advanced because it does not have the ability + * to receive all the header properties. + * + * @return long version number - the value is incremented each time a new non-informational field is added + * to the audit header. + */ + public long getHeaderVersion() + { + return headerVersion; + } + + + /** + * Return the version of this header. This is used by the OMRS to determine if it is back level and + * should not process events from a source that is more advanced because it does not have the ability + * to receive all the header properties. + * + * @param headerVersion long version number - the value is incremented each time a new non-informational field is added + * to the audit header. + */ + public void setHeaderVersion(long headerVersion) + { + this.headerVersion = headerVersion; + } + + + /** + * Return the current status of the element - typically ACTIVE. + * + * @return status enum + */ + public ElementStatus getStatus() + { + return status; + } + + + /** + * Set up the current status of the element - typically ACTIVE. + * + * @param status status enum + */ + public void setStatus(ElementStatus status) + { + this.status = status; + } + + + /** + * Return the element type properties for this properties object. These values are set up by the metadata repository + * and define details to the metadata entity used to represent this element. + * + * @return ElementType type information. + */ + public ElementType getType() + { + if (type == null) + { + return null; + } + else + { + return type; + } + } + + + /** + * Set up the type of this element. + * + * @param type element type properties + */ + public void setType(ElementType type) + { + this.type = type; + } + + + /** + * Return information about the origin of the element. This includes the metadata collection and license. + * + * @return element origin object + */ + public ElementOrigin getOrigin() + { + return origin; + } + + + /** + * Set up information about the origin of the element. This includes the metadata collection and license. + * + * @param origin element origin object + */ + public void setOrigin(ElementOrigin origin) + { + this.origin = origin; + } + + + /** + * Return detail of the element's current version and the users responsible for maintaining it. + * + * @return ElementVersion object + */ + public ElementVersions getVersions() + { + return versions; + } + + + /** + * Set up detail of the element's current version and the users responsible for maintaining it. + * + * @param versions ElementVersion object + */ + public void setVersions(ElementVersions versions) + { + this.versions = versions; + } + + + /** + * Standard toString method. + * + * @return print out of variables in a JSON-style + */ + @Override + public String toString() + { + return "ElementControlHeader{" + + "status=" + status + + ", type=" + type + + ", origin=" + origin + + ", versions=" + versions + + ", headerVersion=" + getHeaderVersion() + + '}'; + } + + + /** + * Compare the values of the supplied object with those stored in the current object. + * + * @param objectToCompare supplied object + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + ElementControlHeader that = (ElementControlHeader) objectToCompare; + return status == that.status && Objects.equals(type, that.type) + && Objects.equals(origin, that.origin) && + Objects.equals(versions, that.versions); + } + + + /** + * Create a hash code for this element type. + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(status, type, origin, versions); + } +} diff --git a/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/ElementHeader.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ElementHeader.java similarity index 97% rename from open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/ElementHeader.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ElementHeader.java index 82b65a73b7a..01e7034eda2 100644 --- a/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/ElementHeader.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ElementHeader.java @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.frameworks.connectors.properties.beans; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -8,7 +8,6 @@ import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; -import java.util.ArrayList; import java.util.List; import java.util.Objects; diff --git a/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/ElementOrigin.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ElementOrigin.java similarity index 94% rename from open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/ElementOrigin.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ElementOrigin.java index 0a341da0408..0c62c683174 100644 --- a/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/ElementOrigin.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ElementOrigin.java @@ -1,10 +1,11 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.frameworks.connectors.properties.beans; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ElementOriginCategory; import java.util.Objects; @@ -19,9 +20,9 @@ @JsonIgnoreProperties(ignoreUnknown=true) public class ElementOrigin { - private String sourceServer = null; - private ElementOriginCategory originCategory = null; - private String homeMetadataCollectionId = null; + private String sourceServer = null; + private ElementOriginCategory originCategory = null; + private String homeMetadataCollectionId = null; private String homeMetadataCollectionName = null; private String license = null; diff --git a/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/ElementStub.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ElementStub.java similarity index 87% rename from open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/ElementStub.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ElementStub.java index 51616758adb..39204667f9d 100644 --- a/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/ElementStub.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ElementStub.java @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.frameworks.connectors.properties.beans; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -98,13 +98,8 @@ public void setUniqueName(String uniqueName) public String toString() { return "ElementStub{" + - "uniqueName='" + uniqueName + '\'' + - ", type=" + getType() + - ", GUID='" + getGUID() + '\'' + - ", origin=" + getOrigin() + - ", versions=" + getVersions() + - ", classifications=" + getClassifications() + - '}'; + "uniqueName='" + uniqueName + '\'' + + "} " + super.toString(); } diff --git a/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/ElementType.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ElementType.java similarity index 98% rename from open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/ElementType.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ElementType.java index ef503a5338d..777cd17d8e3 100644 --- a/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/ElementType.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ElementType.java @@ -1,12 +1,11 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.frameworks.connectors.properties.beans; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import java.util.ArrayList; import java.util.List; import java.util.Objects; diff --git a/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/ElementVersions.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ElementVersions.java similarity index 98% rename from open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/ElementVersions.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ElementVersions.java index bebfaf73a8c..889b9406f7d 100644 --- a/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/beans/ElementVersions.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ElementVersions.java @@ -1,12 +1,11 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.frameworks.connectors.properties.beans; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import java.util.ArrayList; import java.util.Date; import java.util.List; import java.util.Objects; diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/EmbeddedConnection.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/EmbeddedConnection.java new file mode 100644 index 00000000000..386df09d255 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/EmbeddedConnection.java @@ -0,0 +1,211 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; + + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * The EmbeddedConnection is used within a VirtualConnection to link to the embedded connections. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class EmbeddedConnection +{ + /* + * Attributes of an embedded connection + */ + protected int position = 0; + protected String displayName = null; + protected Map arguments = null; + protected ElementStub embeddedConnection = null; + + + /** + * Default constructor + */ + public EmbeddedConnection() + { + super(); + } + + + /** + * Copy/clone constructor. + * + * @param template element to copy + */ + public EmbeddedConnection(EmbeddedConnection template) + { + if (template != null) + { + position = template.getPosition(); + displayName = template.getDisplayName(); + arguments = template.getArguments(); + embeddedConnection = template.getEmbeddedConnection(); + } + } + + + /** + * Return the position that this connector is in the list of embedded connectors. + * + * @return int + */ + public int getPosition() + { + return position; + } + + + /** + * Set up the position that this connector is in the list of embedded connectors. + * + * @param position int + */ + public void setPosition(int position) + { + this.position = position; + } + + + /** + * Return the printable name of the embedded connection. + * + * @return String name + */ + public String getDisplayName() + { + return displayName; + } + + + /** + * Set up the printable name of the embedded connection. + * + * @param displayName String name + */ + public void setDisplayName(String displayName) + { + this.displayName = displayName; + } + + + /** + * Return the arguments for the embedded connection. + * + * @return property map + */ + public Map getArguments() + { + if (arguments == null) + { + return null; + } + else if (arguments.isEmpty()) + { + return null; + } + else + { + return new HashMap<>(arguments); + } + } + + + /** + * Set up the arguments for the embedded connection. + * + * @param arguments property map + */ + public void setArguments(Map arguments) + { + this.arguments = arguments; + } + + + /** + * Return the embedded connection. + * + * @return header of Connection object. + */ + public ElementStub getEmbeddedConnection() + { + return embeddedConnection; + } + + + /** + * Set up the embedded connection + * + * @param embeddedConnection header of Connection object + */ + public void setEmbeddedConnection(ElementStub embeddedConnection) + { + this.embeddedConnection = embeddedConnection; + } + + + /** + * Standard toString method. + * + * @return print out of variables in a JSON-style + */ + @Override + public String toString() + { + return "EmbeddedConnection{" + + "position=" + position + + ", displayName='" + displayName + '\'' + + ", arguments=" + arguments + + ", embeddedConnection=" + embeddedConnection + + '}'; + } + + + /** + * Compare the values of the supplied object with those stored in the current object. + * + * @param objectToCompare supplied object + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + EmbeddedConnection that = (EmbeddedConnection) objectToCompare; + return position == that.position && + Objects.equals(displayName, that.displayName) && + Objects.equals(arguments, that.arguments) && + Objects.equals(embeddedConnection, that.embeddedConnection); + } + + + /** + * Create a hash code for this element type. + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(position, displayName, arguments, embeddedConnection); + } +} \ No newline at end of file diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/EndpointElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/EndpointElement.java new file mode 100644 index 00000000000..0a70e59a386 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/EndpointElement.java @@ -0,0 +1,146 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.EndpointProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * EndpointElement contains the properties and header for an endpoint retrieved from the metadata repository. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class EndpointElement implements MetadataElement +{ + private EndpointProperties endpointProperties = null; + private ElementHeader elementHeader = null; + + + /** + * Default constructor + */ + public EndpointElement() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public EndpointElement(EndpointElement template) + { + if (template != null) + { + elementHeader = template.getElementHeader(); + endpointProperties = template.getEndpointProperties(); + } + } + + + /** + * Return the element header associated with the properties. + * + * @return element header object + */ + @Override + public ElementHeader getElementHeader() + { + return elementHeader; + } + + + /** + * Set up the element header associated with the properties. + * + * @param elementHeader element header object + */ + @Override + public void setElementHeader(ElementHeader elementHeader) + { + this.elementHeader = elementHeader; + } + + + /** + * Return the properties for the endpoint. + * + * @return asset properties (using appropriate subclass) + */ + public EndpointProperties getEndpointProperties() + { + return endpointProperties; + } + + + /** + * Set up the properties for the endpoint. + * + * @param endpointProperties asset properties + */ + public void setEndpointProperties(EndpointProperties endpointProperties) + { + this.endpointProperties = endpointProperties; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "EndpointElement{" + + "endpointProperties=" + endpointProperties + + ", elementHeader=" + elementHeader + + '}'; + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + EndpointElement that = (EndpointElement) objectToCompare; + return Objects.equals(getEndpointProperties(), that.getEndpointProperties()) && + Objects.equals(getElementHeader(), that.getElementHeader()); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elementHeader, endpointProperties); + } +} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/EventTypeElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/EventTypeElement.java similarity index 93% rename from open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/EventTypeElement.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/EventTypeElement.java index 2f24f90c21d..5b970df78e2 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/EventTypeElement.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/EventTypeElement.java @@ -1,18 +1,18 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.properties.EventTypeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.events.EventTypeProperties; import java.util.Objects; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; /** * EventTypeElement contains the properties and header for a EventType entity retrieved from the metadata repository. diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/ExecutionPointElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ExecutionPointElement.java similarity index 93% rename from open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/ExecutionPointElement.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ExecutionPointElement.java index 02c9e858251..d80201489ab 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/ExecutionPointElement.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ExecutionPointElement.java @@ -1,19 +1,18 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.ExecutionPointProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.ExecutionPointProperties; import java.util.Objects; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; /** * ExecutionPointElement is the bean used to return an execution point definition stored in the open metadata repositories. diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/ExternalGlossaryElementLinkElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ExternalGlossaryElementLinkElement.java similarity index 93% rename from open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/ExternalGlossaryElementLinkElement.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ExternalGlossaryElementLinkElement.java index 733236e6551..c15197c97e1 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/ExternalGlossaryElementLinkElement.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ExternalGlossaryElementLinkElement.java @@ -1,18 +1,17 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetmanager.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ExternalGlossaryElementLinkProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.glossaries.ExternalGlossaryElementLinkProperties; import java.util.Objects; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; /** * ExternalGlossaryElementLinkElement contains the properties and header for a link to a equivalent external glossary category diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/ExternalGlossaryLinkElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ExternalGlossaryLinkElement.java similarity index 93% rename from open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/ExternalGlossaryLinkElement.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ExternalGlossaryLinkElement.java index ea0944d9010..5f2f0e986dd 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/metadataelements/ExternalGlossaryLinkElement.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ExternalGlossaryLinkElement.java @@ -1,18 +1,17 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetmanager.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ExternalGlossaryLinkProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.glossaries.ExternalGlossaryLinkProperties; import java.util.Objects; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; /** * ExternalGlossaryLinkElement contains the properties and header for a link to a equivalent external glossary diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ExternalReferenceElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ExternalReferenceElement.java new file mode 100644 index 00000000000..59e6013cd92 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ExternalReferenceElement.java @@ -0,0 +1,142 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.externalreferences.ExternalReferenceProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * ExternalReferenceElement stores information about a link to an external resource that is relevant to this element. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ExternalReferenceElement implements MetadataElement +{ + private ElementHeader elementHeader = null; + private ExternalReferenceProperties properties = null; + + /** + * Default Constructor + */ + public ExternalReferenceElement() + { + } + + + /** + * Copy/clone Constructor - the resulting object. + * + * @param template object being copied + */ + public ExternalReferenceElement(ExternalReferenceElement template) + { + if (template != null) + { + this.elementHeader = template.getElementHeader(); + this.properties = template.getProperties(); + } + } + + + /** + * Return the element header associated with the properties. + * + * @return element header object + */ + public ElementHeader getElementHeader() + { + return elementHeader; + } + + + /** + * Set up the element header associated with the properties. + * + * @param elementHeader element header object + */ + public void setElementHeader(ElementHeader elementHeader) + { + this.elementHeader = elementHeader; + } + + + /** + * Return the link to external documentation that are relevant to this element. + * + * @return list of external references + */ + public ExternalReferenceProperties getProperties() + { + return properties; + } + + + /** + * Set up the list of links to external documentation that are relevant to this element. + * + * @param properties of external references + */ + public void setProperties(ExternalReferenceProperties properties) + { + this.properties = properties; + } + + + /** + * JSON-style toString. + * + * @return list of properties and their values. + */ + @Override + public String toString() + { + return "ExternalReferenceElement{" + + "elementHeader=" + elementHeader + + ", properties=" + properties + + '}'; + } + + + /** + * Equals method that returns true if containing properties are the same. + * + * @param objectToCompare object to compare + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + ExternalReferenceElement that = (ExternalReferenceElement) objectToCompare; + return Objects.equals(elementHeader, that.elementHeader) && + Objects.equals(properties, that.properties); + } + + + /** + * Hash of properties + * + * @return int + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), properties, elementHeader); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/FeedbackTargetElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/FeedbackTargetElement.java new file mode 100644 index 00000000000..832c9b24a48 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/FeedbackTargetElement.java @@ -0,0 +1,177 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * FeedbackTargetElement contains the properties and header for a relationship retrieved from the metadata repository along with the stub + * of the related element. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class FeedbackTargetElement +{ + private ElementHeader relationshipHeader = null; + private ElementStub relatedElement = null; + private boolean isPublic = false; + + /** + * Default constructor + */ + public FeedbackTargetElement() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public FeedbackTargetElement(FeedbackTargetElement template) + { + if (template != null) + { + relationshipHeader = template.getRelationshipHeader(); + relatedElement = template.getRelatedElement(); + isPublic = template.getIsPublic(); + } + } + + + + /** + * Return if the link to the tag is private to the creating user. + * + * @return boolean + */ + public boolean getIsPublic() + { + return isPublic; + } + + + /** + * Set up whether the link to the tag is private to the creating user or not. + * + * @param aPublic boolean + */ + public void setIsPublic(boolean aPublic) + { + isPublic = aPublic; + } + + + /** + * Return the element header associated with the relationship. + * + * @return element header object + */ + public ElementHeader getRelationshipHeader() + { + return relationshipHeader; + } + + + /** + * Set up the element header associated with the relationship. + * + * @param relationshipHeader element header object + */ + public void setRelationshipHeader(ElementHeader relationshipHeader) + { + this.relationshipHeader = relationshipHeader; + } + + + /** + * Return the element header associated with end 1 of the relationship. + * + * @return element stub object + */ + public ElementStub getRelatedElement() + { + return relatedElement; + } + + + /** + * Set up the element header associated with end 1 of the relationship. + * + * @param relatedElement element stub object + */ + public void setRelatedElement(ElementStub relatedElement) + { + this.relatedElement = relatedElement; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "FeedbackTargetElement{" + + "relationshipHeader=" + relationshipHeader + + ", relatedElement=" + relatedElement + + ", isPublic=" + isPublic + + '}'; + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (! (objectToCompare instanceof FeedbackTargetElement that)) + { + return false; + } + + if (isPublic != that.isPublic) + { + return false; + } + if (relationshipHeader != null ? ! relationshipHeader.equals(that.relationshipHeader) : that.relationshipHeader != null) + { + return false; + } + return relatedElement != null ? relatedElement.equals(that.relatedElement) : that.relatedElement == null; + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + int result = relationshipHeader != null ? relationshipHeader.hashCode() : 0; + result = 31 * result + (relatedElement != null ? relatedElement.hashCode() : 0); + result = 31 * result + (isPublic ? 1 : 0); + return result; + } +} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/FileElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/FileElement.java similarity index 92% rename from open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/FileElement.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/FileElement.java index 07b779a0cde..8a8d9cbf316 100644 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/FileElement.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/FileElement.java @@ -1,18 +1,18 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetowner.properties.FileProperties; import java.util.Objects; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; + +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.filesandfolders.FileProperties; /** * FileElement contains the properties and header for a file retrieved from the metadata repository. @@ -22,7 +22,7 @@ @JsonIgnoreProperties(ignoreUnknown=true) public class FileElement implements MetadataElement { - private ElementHeader elementHeader = null; + private ElementHeader elementHeader = null; private FileProperties fileProperties = null; diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/FileFolderElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/FileFolderElement.java similarity index 93% rename from open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/FileFolderElement.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/FileFolderElement.java index 3ecd46051c0..8fdecbccf9a 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/FileFolderElement.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/FileFolderElement.java @@ -1,18 +1,18 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.properties.FileFolderProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.filesandfolders.FileFolderProperties; import java.util.Objects; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; /** * FileFolderElement contains the properties and header for a file folder entity retrieved from the metadata repository. diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/FileSystemElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/FileSystemElement.java new file mode 100644 index 00000000000..614ad934f25 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/FileSystemElement.java @@ -0,0 +1,151 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +import org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities.FileSystemProperties; + +/** + * FileSystemElement contains the properties and header for a file system retrieved from the metadata repository. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class FileSystemElement implements MetadataElement +{ + private ElementHeader elementHeader = null; + private FileSystemProperties fileSystemProperties = null; + + + /** + * Default constructor + */ + public FileSystemElement() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public FileSystemElement(FileSystemElement template) + { + if (template != null) + { + elementHeader = template.getElementHeader(); + fileSystemProperties = template.getFileSystemProperties(); + } + } + + + /** + * Return the element header associated with the properties. + * + * @return element header object + */ + @Override + public ElementHeader getElementHeader() + { + return elementHeader; + } + + + /** + * Set up the element header associated with the properties. + * + * @param elementHeader element header object + */ + @Override + public void setElementHeader(ElementHeader elementHeader) + { + this.elementHeader = elementHeader; + } + + + /** + * Return the file system properties. + * + * @return properties bean + */ + public FileSystemProperties getFileSystemProperties() + { + return fileSystemProperties; + } + + + /** + * Set up the file system properties. + * + * @param fileSystemProperties properties bean + */ + public void setFileSystemProperties(FileSystemProperties fileSystemProperties) + { + this.fileSystemProperties = fileSystemProperties; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "FileSystemElement{" + + "elementHeader=" + elementHeader + + ", fileSystemProperties=" + fileSystemProperties + + '}'; + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + FileSystemElement that = (FileSystemElement) objectToCompare; + return Objects.equals(elementHeader, that.elementHeader) && + Objects.equals(fileSystemProperties, that.fileSystemProperties); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elementHeader, fileSystemProperties); + } +} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/FolderElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/FolderElement.java similarity index 92% rename from open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/FolderElement.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/FolderElement.java index f6f7299cdfe..7efb2239cfb 100644 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/FolderElement.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/FolderElement.java @@ -1,18 +1,18 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetowner.properties.FolderProperties; import java.util.Objects; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; + +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.filesandfolders.FolderProperties; /** * FolderElement contains the properties and header for a Folder retrieved from the metadata repository. @@ -22,7 +22,7 @@ @JsonIgnoreProperties(ignoreUnknown=true) public class FolderElement implements MetadataElement { - private ElementHeader elementHeader = null; + private ElementHeader elementHeader = null; private FolderProperties folderProperties = null; diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/FormElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/FormElement.java similarity index 93% rename from open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/FormElement.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/FormElement.java index ee244c86790..6ade1b24e94 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/FormElement.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/FormElement.java @@ -1,18 +1,18 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.properties.FormProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.display.FormProperties; import java.util.Objects; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; /** * FormElement contains the properties and header for a form entity retrieved from the metadata repository. diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/GlossaryTermElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/GlossaryTermElement.java similarity index 90% rename from open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/GlossaryTermElement.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/GlossaryTermElement.java index 6b3b2e475be..5d68516ff14 100644 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/GlossaryTermElement.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/GlossaryTermElement.java @@ -1,13 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetowner.properties.GlossaryTermProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.properties.glossaries.GlossaryTermProperties; import java.util.Objects; @@ -23,9 +22,9 @@ @JsonIgnoreProperties(ignoreUnknown=true) public class GlossaryTermElement implements MetadataElement { - private ElementHeader elementHeader = null; - private GlossaryTermProperties glossaryTermProperties = null; - private RelatedElement relatedElement = null; + private ElementHeader elementHeader = null; + private GlossaryTermProperties glossaryTermProperties = null; + private RelatedElement relatedElement = null; /** diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/GovernanceAppointee.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/GovernanceAppointee.java similarity index 96% rename from open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/GovernanceAppointee.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/GovernanceAppointee.java index 55c7aca10f9..589b53a43df 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/GovernanceAppointee.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/GovernanceAppointee.java @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -11,7 +11,6 @@ import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; /** * GovernanceAppointee describes an individual's appointment as diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/GovernanceDefinitionElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/GovernanceDefinitionElement.java new file mode 100644 index 00000000000..3d4f1b1eabb --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/GovernanceDefinitionElement.java @@ -0,0 +1,166 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; + +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.GovernanceDefinitionProperties; + +import java.util.Objects; + +/** + * GovernanceDefinitionElement is the superclass used to return the common properties of a governance definition stored in the + * open metadata repositories. + */ +public class GovernanceDefinitionElement implements MetadataElement +{ + private ElementHeader elementHeader = null; + private GovernanceDefinitionProperties properties = null; + private RelatedElement relatedElement = null; + + + + /** + * Default constructor + */ + public GovernanceDefinitionElement() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public GovernanceDefinitionElement(GovernanceDefinitionElement template) + { + if (template != null) + { + this.elementHeader = template.getElementHeader(); + this.properties = template.getProperties(); + this.relatedElement = template.getRelatedElement(); + } + } + + + /** + * Return the element header associated with the properties. + * + * @return element header object + */ + @Override + public ElementHeader getElementHeader() + { + return elementHeader; + } + + + /** + * Set up the element header associated with the properties. + * + * @param elementHeader element header object + */ + @Override + public void setElementHeader(ElementHeader elementHeader) + { + this.elementHeader = elementHeader; + } + + + /** + * Return the requested governance definition. + * + * @return properties bean + */ + public GovernanceDefinitionProperties getProperties() + { + return properties; + } + + + /** + * Set up the requested governance definition. + * + * @param properties properties bean + */ + public void setProperties(GovernanceDefinitionProperties properties) + { + this.properties = properties; + } + + + /** + * Return details of the relationship used to retrieve this element. + * Will be null if the element was retrieved directly rather than via a relationship. + * + * @return list of element stubs + */ + public RelatedElement getRelatedElement() + { + return relatedElement; + } + + + /** + * Set up details of the relationship used to retrieve this element. + * Will be null if the element was retrieved directly rather than via a relationship. + * + * @param relatedElement relationship details + */ + public void setRelatedElement(RelatedElement relatedElement) + { + this.relatedElement = relatedElement; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "GovernanceDefinitionElement{" + + "elementHeader=" + elementHeader + + ", properties=" + properties + + ", relatedElement=" + relatedElement + + '}'; + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (! (objectToCompare instanceof GovernanceDefinitionElement that)) + { + return false; + } + return Objects.equals(elementHeader, that.elementHeader) && + Objects.equals(properties, that.properties) && + Objects.equals(relatedElement, that.relatedElement); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elementHeader, properties, relatedElement); + } +} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/GovernanceDefinitionGraph.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/GovernanceDefinitionGraph.java similarity index 98% rename from open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/GovernanceDefinitionGraph.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/GovernanceDefinitionGraph.java index 0e44a439dfe..a2c37bbccf7 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/GovernanceDefinitionGraph.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/GovernanceDefinitionGraph.java @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -11,7 +11,6 @@ import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; /** * GovernanceDefinitionGraph documents the linked governance definitions of the governance program. diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/GovernanceDelegation.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/GovernanceDelegation.java similarity index 95% rename from open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/GovernanceDelegation.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/GovernanceDelegation.java index ad2d176781b..b8db0d96ab8 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/GovernanceDelegation.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/GovernanceDelegation.java @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.*; @@ -8,7 +8,6 @@ import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; /** diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/GovernanceDomainElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/GovernanceDomainElement.java similarity index 93% rename from open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/GovernanceDomainElement.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/GovernanceDomainElement.java index 4f454742435..2cb76a4990f 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/GovernanceDomainElement.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/GovernanceDomainElement.java @@ -1,19 +1,18 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceDomainProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.GovernanceDomainProperties; import java.util.Objects; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; /** * GovernanceDomainElement is the bean used to return a governance domain definition stored in the open metadata repositories. diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/GovernanceDomainSetElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/GovernanceDomainSetElement.java similarity index 94% rename from open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/GovernanceDomainSetElement.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/GovernanceDomainSetElement.java index 44483c2dc0f..7a925639915 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/GovernanceDomainSetElement.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/GovernanceDomainSetElement.java @@ -1,20 +1,19 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceDomainSetProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.GovernanceDomainSetProperties; import java.util.List; import java.util.Objects; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; /** * GovernanceDomainSetElement is the bean used to return a governance domain set definition stored in the open metadata repositories. diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/GovernanceLevelIdentifierElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/GovernanceLevelIdentifierElement.java similarity index 93% rename from open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/GovernanceLevelIdentifierElement.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/GovernanceLevelIdentifierElement.java index 2d50eaf2743..2394c6b4ffa 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/GovernanceLevelIdentifierElement.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/GovernanceLevelIdentifierElement.java @@ -1,19 +1,18 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceLevelIdentifierProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.GovernanceLevelIdentifierProperties; import java.util.Objects; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; /** * GovernanceLevelIdentifierElement is the bean used to return a governance level identifier definition stored in the open metadata repositories. diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/GovernanceLevelIdentifierSetElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/GovernanceLevelIdentifierSetElement.java similarity index 94% rename from open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/GovernanceLevelIdentifierSetElement.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/GovernanceLevelIdentifierSetElement.java index 09c48144fe4..bf2eadacbd4 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/GovernanceLevelIdentifierSetElement.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/GovernanceLevelIdentifierSetElement.java @@ -1,18 +1,17 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceLevelIdentifierSetProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.GovernanceLevelIdentifierSetProperties; import java.util.List; import java.util.Objects; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; /** * GovernanceLevelIdentifierSetElement documents the level identifier values for a specific governance classification. diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/GovernanceLink.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/GovernanceLink.java similarity index 95% rename from open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/GovernanceLink.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/GovernanceLink.java index 3c466203a3b..7369ee34439 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/GovernanceLink.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/GovernanceLink.java @@ -1,11 +1,10 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; import java.util.Objects; diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/GovernanceMetricElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/GovernanceMetricElement.java similarity index 94% rename from open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/GovernanceMetricElement.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/GovernanceMetricElement.java index dcd43d35782..0d4c029e0f6 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/GovernanceMetricElement.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/GovernanceMetricElement.java @@ -1,19 +1,18 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceMetricProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.GovernanceMetricProperties; import java.util.Objects; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; /** * GovernanceMetricElement is the bean used to return a governance metric stored in the open metadata repositories. diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/GovernanceMetricImplementation.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/GovernanceMetricImplementation.java similarity index 95% rename from open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/GovernanceMetricImplementation.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/GovernanceMetricImplementation.java index 1f14fc8afbf..c79e9af930e 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/GovernanceMetricImplementation.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/GovernanceMetricImplementation.java @@ -1,11 +1,10 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; import java.util.List; import java.util.Objects; diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/GovernanceRoleAppointee.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/GovernanceRoleAppointee.java similarity index 97% rename from open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/GovernanceRoleAppointee.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/GovernanceRoleAppointee.java index af6e72c2f2e..1dbacbf493e 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/GovernanceRoleAppointee.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/GovernanceRoleAppointee.java @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.*; diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/GovernanceRoleElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/GovernanceRoleElement.java similarity index 93% rename from open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/GovernanceRoleElement.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/GovernanceRoleElement.java index dd29540d9de..05896ded2c1 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/GovernanceRoleElement.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/GovernanceRoleElement.java @@ -1,16 +1,15 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.*; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceRoleProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.GovernanceRoleProperties; import java.util.Objects; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; /** * GovernanceRoleElement is the bean used to return a governance role description. diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/GovernanceRoleHistory.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/GovernanceRoleHistory.java similarity index 98% rename from open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/GovernanceRoleHistory.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/GovernanceRoleHistory.java index 4cadb66622a..98029a3480a 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/GovernanceRoleHistory.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/GovernanceRoleHistory.java @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/GovernanceStatusIdentifierElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/GovernanceStatusIdentifierElement.java similarity index 93% rename from open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/GovernanceStatusIdentifierElement.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/GovernanceStatusIdentifierElement.java index 7df4e8d75c3..7f6c0bb083e 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/GovernanceStatusIdentifierElement.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/GovernanceStatusIdentifierElement.java @@ -1,14 +1,13 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceStatusIdentifierProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.GovernanceStatusIdentifierProperties; import java.util.Objects; diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/GovernanceStatusIdentifierSetElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/GovernanceStatusIdentifierSetElement.java similarity index 94% rename from open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/GovernanceStatusIdentifierSetElement.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/GovernanceStatusIdentifierSetElement.java index 63fc6547892..8bec1e39d65 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/GovernanceStatusIdentifierSetElement.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/GovernanceStatusIdentifierSetElement.java @@ -1,18 +1,17 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceStatusIdentifierSetProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.GovernanceStatusIdentifierSetProperties; import java.util.List; import java.util.Objects; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; /** * GovernanceLevelIdentifierSetElement documents the level identifier values for a specific governance classification. diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/GovernanceZoneDefinition.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/GovernanceZoneDefinition.java similarity index 97% rename from open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/GovernanceZoneDefinition.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/GovernanceZoneDefinition.java index 21c29bc1346..2a3a7a6edc1 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/GovernanceZoneDefinition.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/GovernanceZoneDefinition.java @@ -1,9 +1,8 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.*; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; import java.util.List; import java.util.Objects; diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/GovernanceZoneElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/GovernanceZoneElement.java similarity index 93% rename from open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/GovernanceZoneElement.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/GovernanceZoneElement.java index 4a1ee788fc2..320ed870e97 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/GovernanceZoneElement.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/GovernanceZoneElement.java @@ -1,19 +1,18 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceZoneProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.GovernanceZoneProperties; import java.util.Objects; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; /** * GovernanceZoneElement is the bean used to return a governance zone definition stored in the open metadata repositories. diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/HostElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/HostElement.java similarity index 92% rename from open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/HostElement.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/HostElement.java index 1dc343f6a0b..47d23e2665b 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/HostElement.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/HostElement.java @@ -1,19 +1,18 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.AssetProperties; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.HostProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.AssetProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.infrastructure.HostProperties; import java.util.Objects; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; /** * HostElement contains the properties and header for a host retrieved from the metadata repository. diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/ITProfileElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ITProfileElement.java similarity index 94% rename from open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/ITProfileElement.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ITProfileElement.java index 09c94a93aa8..23900dd1454 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/ITProfileElement.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ITProfileElement.java @@ -1,11 +1,11 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.ITProfileProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.ITProfileProperties; import java.util.List; import java.util.Objects; @@ -13,8 +13,6 @@ import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; /** * The ITProfileElement describes a system, any contact methods and linked userIds. diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/InformalTagElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/InformalTagElement.java new file mode 100644 index 00000000000..b466142a5fd --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/InformalTagElement.java @@ -0,0 +1,175 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +import org.odpi.openmetadata.frameworks.openmetadata.properties.feedback.InformalTagProperties; + +/** + * InformalTagElement contains the properties and header for an informal retrieved from the metadata repository. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class InformalTagElement implements MetadataElement +{ + private ElementHeader elementHeader = null; + private InformalTagProperties properties = null; + private FeedbackTargetElement feedbackTargetElement = null; + + + /** + * Default constructor + */ + public InformalTagElement() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public InformalTagElement(InformalTagElement template) + { + if (template != null) + { + elementHeader = template.getElementHeader(); + properties = template.getProperties(); + feedbackTargetElement = template.getFeedbackTargetElement(); + } + } + + + /** + * Return the element header associated with the properties. + * + * @return element header object + */ + @Override + public ElementHeader getElementHeader() + { + return elementHeader; + } + + + /** + * Set up the element header associated with the properties. + * + * @param elementHeader element header object + */ + @Override + public void setElementHeader(ElementHeader elementHeader) + { + this.elementHeader = elementHeader; + } + + + /** + * Return the properties of the tag. + * + * @return properties + */ + public InformalTagProperties getProperties() + { + return properties; + } + + + /** + * Set up the tag properties. + * + * @param properties properties + */ + public void setProperties(InformalTagProperties properties) + { + this.properties = properties; + } + + + /** + * Return details of the relationship from the element in the request to the tag. This value is null if it + * was retrieved independently of the linked element. + * + * @return associated relationship + */ + public FeedbackTargetElement getFeedbackTargetElement() + { + return feedbackTargetElement; + } + + + /** + * Set up details of the relationship from the element in the request to the tag. This value is null if it + * was retrieved independently of the linked element. + * + * @param feedbackTargetElement associated relationship + */ + public void setFeedbackTargetElement(FeedbackTargetElement feedbackTargetElement) + { + this.feedbackTargetElement = feedbackTargetElement; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "InformalTagElement{" + + "elementHeader=" + elementHeader + + ", properties=" + properties + + ", feedbackTargetElement=" + feedbackTargetElement + + '}'; + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + InformalTagElement that = (InformalTagElement) objectToCompare; + return Objects.equals(elementHeader, that.elementHeader) && + Objects.equals(properties, that.properties) && + Objects.equals(feedbackTargetElement, that.feedbackTargetElement); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elementHeader, properties, feedbackTargetElement); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/LicenseElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/LicenseElement.java new file mode 100644 index 00000000000..cee965bd73e --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/LicenseElement.java @@ -0,0 +1,197 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.LicenseProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * LicenseElement contains the properties and header for a license for an element. + * It includes the details of the specific element's license and details of the license type. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class LicenseElement +{ + private ElementHeader licenseHeader = null; + private RelationshipProperties licenseProperties = null; + private ElementHeader licenseTypeHeader = null; + private LicenseProperties licenseTypeProperties = null; + + /** + * Default constructor + */ + public LicenseElement() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public LicenseElement(LicenseElement template) + { + if (template != null) + { + licenseHeader = template.getLicenseHeader(); + licenseProperties = template.getLicenseProperties(); + licenseTypeHeader = template.getLicenseTypeHeader(); + licenseTypeProperties = template.getLicenseTypeProperties(); + } + } + + + /** + * Return the element header associated with the relationship. + * + * @return element header object + */ + public ElementHeader getLicenseHeader() + { + return licenseHeader; + } + + + /** + * Set up the element header associated with the relationship. + * + * @param licenseHeader element header object + */ + public void setLicenseHeader(ElementHeader licenseHeader) + { + this.licenseHeader = licenseHeader; + } + + + /** + * Return details of the relationship + * + * @return relationship properties + */ + public RelationshipProperties getLicenseProperties() + { + return licenseProperties; + } + + + /** + * Set up relationship properties + * + * @param licenseProperties relationship properties + */ + public void setLicenseProperties(RelationshipProperties licenseProperties) + { + this.licenseProperties = licenseProperties; + } + + + /** + * Return the element header associated with end 2 of the relationship (license type). + * + * @return element stub object + */ + public ElementHeader getLicenseTypeHeader() + { + return licenseTypeHeader; + } + + + /** + * Set up the element header associated with end 2 of the relationship (license type). + * + * @param licenseTypeHeader element stub object + */ + public void setLicenseTypeHeader(ElementHeader licenseTypeHeader) + { + this.licenseTypeHeader = licenseTypeHeader; + } + + + /** + * Return the properties of the license type. + * + * @return properties + */ + public LicenseProperties getLicenseTypeProperties() + { + return licenseTypeProperties; + } + + + /** + * Set up the properties of the license type. + * + * @param licenseTypeProperties properties + */ + public void setLicenseTypeProperties(LicenseProperties licenseTypeProperties) + { + this.licenseTypeProperties = licenseTypeProperties; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "LicenseElement{" + + "licenseHeader=" + licenseHeader + + ", relationshipProperties=" + licenseProperties + + ", licenseTypeHeader=" + licenseTypeHeader + + ", licenseTypeProperties=" + licenseTypeProperties + + '}'; + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (! (objectToCompare instanceof LicenseElement)) + { + return false; + } + LicenseElement that = (LicenseElement) objectToCompare; + return Objects.equals(licenseHeader, that.licenseHeader) && + Objects.equals(licenseProperties, that.licenseProperties) && + Objects.equals(licenseTypeHeader, that.licenseTypeHeader) && + Objects.equals(licenseTypeProperties, that.licenseTypeProperties); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), licenseHeader, licenseProperties, licenseTypeHeader, licenseTypeProperties); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/LicenseTypeElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/LicenseTypeElement.java new file mode 100644 index 00000000000..95693dae868 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/LicenseTypeElement.java @@ -0,0 +1,174 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.LicenseTypeProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * LicenseTypeElement contains the properties and header for a licence type retrieved from the metadata repository. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class LicenseTypeElement implements MetadataElement +{ + private ElementHeader elementHeader = null; + private LicenseTypeProperties properties = null; + private RelatedElement relatedElement = null; + + + /** + * Default constructor + */ + public LicenseTypeElement() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public LicenseTypeElement(LicenseTypeElement template) + { + if (template != null) + { + elementHeader = template.getElementHeader(); + properties = template.getProperties(); + relatedElement = template.getRelatedElement(); + } + } + + + /** + * Return the element header associated with the properties. + * + * @return element header object + */ + @Override + public ElementHeader getElementHeader() + { + return elementHeader; + } + + + /** + * Set up the element header associated with the properties. + * + * @param elementHeader element header object + */ + @Override + public void setElementHeader(ElementHeader elementHeader) + { + this.elementHeader = elementHeader; + } + + + /** + * Return the properties of the license type. + * + * @return properties + */ + public LicenseTypeProperties getProperties() + { + return properties; + } + + + /** + * Set up the license type properties. + * + * @param properties properties + */ + public void setProperties(LicenseTypeProperties properties) + { + this.properties = properties; + } + + + /** + * Return details of the relationship used to retrieve this element. + * Will be null if the element was retrieved directly rather than via a relationship. + * + * @return list of element stubs + */ + public RelatedElement getRelatedElement() + { + return relatedElement; + } + + + /** + * Set up details of the relationship used to retrieve this element. + * Will be null if the element was retrieved directly rather than via a relationship. + * + * @param relatedElement relationship details + */ + public void setRelatedElement(RelatedElement relatedElement) + { + this.relatedElement = relatedElement; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "LicenseTypeElement{" + + "elementHeader=" + elementHeader + + ", properties=" + properties + + ", relatedElement=" + relatedElement + + '}'; + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + LicenseTypeElement that = (LicenseTypeElement) objectToCompare; + return Objects.equals(elementHeader, that.elementHeader) && + Objects.equals(properties, that.properties) && + Objects.equals(relatedElement, that.relatedElement); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elementHeader, properties, relatedElement); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/LikeElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/LikeElement.java new file mode 100644 index 00000000000..508b1621f14 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/LikeElement.java @@ -0,0 +1,174 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.feedback.LikeProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * LikeElement contains the properties and header for a like entity retrieved from the metadata repository. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class LikeElement implements MetadataElement +{ + private ElementHeader elementHeader = null; + private LikeProperties properties = null; + private FeedbackTargetElement feedbackTargetElement = null; + + /** + * Default constructor + */ + public LikeElement() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public LikeElement(LikeElement template) + { + if (template != null) + { + elementHeader = template.getElementHeader(); + properties = template.getProperties(); + feedbackTargetElement = template.getFeedbackTargetElement(); + } + } + + + /** + * Return the element header associated with the properties. + * + * @return element header object + */ + @Override + public ElementHeader getElementHeader() + { + return elementHeader; + } + + + /** + * Set up the element header associated with the properties. + * + * @param elementHeader element header object + */ + @Override + public void setElementHeader(ElementHeader elementHeader) + { + this.elementHeader = elementHeader; + } + + + /** + * Return the properties of the like. + * + * @return properties + */ + public LikeProperties getProperties() + { + return properties; + } + + + /** + * Set up the like properties. + * + * @param properties properties + */ + public void setProperties(LikeProperties properties) + { + this.properties = properties; + } + + + + /** + * Return details of the relationship from the element in the request to the like. This value is null if it + * was retrieved independently of the linked element. + * + * @return associated relationship + */ + public FeedbackTargetElement getFeedbackTargetElement() + { + return feedbackTargetElement; + } + + + /** + * Set up details of the relationship from the element in the request to the like. This value is null if it + * was retrieved independently of the linked element. + * + * @param feedbackTargetElement associated relationship + */ + public void setFeedbackTargetElement(FeedbackTargetElement feedbackTargetElement) + { + this.feedbackTargetElement = feedbackTargetElement; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "LikeElement{" + + "elementHeader=" + elementHeader + + ", properties=" + properties + + ", feedbackTargetElement=" + feedbackTargetElement + + '}'; + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + LikeElement that = (LikeElement) objectToCompare; + return Objects.equals(elementHeader, that.elementHeader) && + Objects.equals(properties, that.properties) && + Objects.equals(feedbackTargetElement, that.feedbackTargetElement); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elementHeader, properties, feedbackTargetElement); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/LineageMappingElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/LineageMappingElement.java new file mode 100644 index 00000000000..5e4094c22a0 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/LineageMappingElement.java @@ -0,0 +1,195 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.lineage.LineageMappingProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * LineageMappingElement contains the properties and header for a lineage mapping relationship retrieved from the metadata repository. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class LineageMappingElement +{ + private ElementHeader lineageMappingHeader = null; + private LineageMappingProperties lineageMappingProperties = null; + private ElementHeader sourceElement = null; + private ElementHeader targetElement = null; + + /** + * Default constructor + */ + public LineageMappingElement() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public LineageMappingElement(LineageMappingElement template) + { + if (template != null) + { + lineageMappingHeader = template.getLineageMappingHeader(); + sourceElement = template.getSourceElement(); + targetElement = template.getTargetElement(); + } + } + + + /** + * Return the element header associated with the relationship. + * + * @return element header object + */ + public ElementHeader getLineageMappingHeader() + { + return lineageMappingHeader; + } + + + /** + * Set up the element header associated with the relationship. + * + * @param lineageMappingHeader element header object + */ + public void setLineageMappingHeader(ElementHeader lineageMappingHeader) + { + this.lineageMappingHeader = lineageMappingHeader; + } + + + /** + * Return the properties associated with the lineage mapping relationship. + * + * @return properties + */ + public LineageMappingProperties getLineageMappingProperties() + { + return lineageMappingProperties; + } + + + /** + * Set up the properties associated with the relationship. + * + * @param lineageMappingProperties properties + */ + public void setLineageMappingProperties(LineageMappingProperties lineageMappingProperties) + { + this.lineageMappingProperties = lineageMappingProperties; + } + + + /** + * Return the element header associated with end 1 of the relationship. + * + * @return element header object + */ + public ElementHeader getSourceElement() + { + return sourceElement; + } + + + /** + * Set up the element header associated with end 1 of the relationship. + * + * @param sourceElement element header object + */ + public void setSourceElement(ElementHeader sourceElement) + { + this.sourceElement = sourceElement; + } + + + + /** + * Return the element header associated with end 2 of the relationship. + * + * @return element header object + */ + public ElementHeader getTargetElement() + { + return targetElement; + } + + + /** + * Set up the element header associated with end 2 of the relationship. + * + * @param targetElement element header object + */ + public void setTargetElement(ElementHeader targetElement) + { + this.targetElement = targetElement; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "LineageMappingElement{" + + "lineageMappingHeader=" + lineageMappingHeader + + ", lineageMappingProperties=" + lineageMappingProperties + + ", sourceElement=" + sourceElement + + ", targetElement=" + targetElement + + '}'; + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + LineageMappingElement that = (LineageMappingElement) objectToCompare; + return Objects.equals(getLineageMappingHeader(), that.getLineageMappingHeader()) && + Objects.equals(getSourceElement(), that.getSourceElement()) && + Objects.equals(getLineageMappingProperties(), that.getLineageMappingProperties()) && + Objects.equals(getTargetElement(), that.getTargetElement()); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), lineageMappingHeader, lineageMappingProperties, sourceElement, targetElement); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/LocationElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/LocationElement.java new file mode 100644 index 00000000000..d9a3b2c885e --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/LocationElement.java @@ -0,0 +1,178 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.locations.LocationProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * LocationElement contains the properties and header for a location definition retrieved from the metadata repository. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class LocationElement implements MetadataElement +{ + private ElementHeader elementHeader = null; + private LocationProperties locationProperties = null; + private RelatedElement relatedElement = null; + + + /** + * Default constructor + */ + public LocationElement() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public LocationElement(LocationElement template) + { + if (template != null) + { + elementHeader = template.getElementHeader(); + locationProperties = template.getLocationProperties(); + relatedElement = template.getRelatedElement(); + } + } + + + /** + * Return the element header associated with the properties. + * + * @return element header object + */ + @Override + public ElementHeader getElementHeader() + { + return elementHeader; + } + + + /** + * Set up the element header associated with the properties. + * + * @param elementHeader element header object + */ + @Override + public void setElementHeader(ElementHeader elementHeader) + { + this.elementHeader = elementHeader; + } + + + /** + * Return the properties for the location definition. + * + * @return properties bean + */ + public LocationProperties getLocationProperties() + { + return locationProperties; + } + + + /** + * Set up the properties for the location definition. + * + * @param locationProperties properties bean + */ + public void setLocationProperties(LocationProperties locationProperties) + { + this.locationProperties = locationProperties; + } + + + /** + * Return details of the relationship used to retrieve this element. + * Will be null if the element was retrieved directly rather than via a relationship. + * + * @return list of element stubs + */ + public RelatedElement getRelatedElement() + { + return relatedElement; + } + + + /** + * Set up details of the relationship used to retrieve this element. + * Will be null if the element was retrieved directly rather than via a relationship. + * + * @param relatedElement relationship details + */ + public void setRelatedElement(RelatedElement relatedElement) + { + this.relatedElement = relatedElement; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "LocationElement{" + + "elementHeader=" + elementHeader + + ", locationProperties=" + locationProperties + + ", relatedElement=" + relatedElement + + '}'; + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + LocationElement that = (LocationElement) objectToCompare; + return Objects.equals(elementHeader, that.elementHeader) && + Objects.equals(locationProperties, that.locationProperties) && + Objects.equals(relatedElement, that.relatedElement); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elementHeader, locationProperties, relatedElement); + } +} diff --git a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/elements/MeaningElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/MeaningElement.java similarity index 93% rename from open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/elements/MeaningElement.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/MeaningElement.java index a87667413eb..5b1a8d33e01 100644 --- a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/elements/MeaningElement.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/MeaningElement.java @@ -1,13 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetconsumer.elements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetconsumer.properties.MeaningProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.properties.glossaries.MeaningProperties; import java.util.Objects; diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/MetadataElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/MetadataElement.java new file mode 100644 index 00000000000..dba47aeacfb --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/MetadataElement.java @@ -0,0 +1,27 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; + + +/** + * MetadataElement is the common interface for all metadata elements. It adds the header information that is stored with the properties. + * This includes detains of its unique identifier, type and origin. + */ +public interface MetadataElement +{ + /** + * Return the element header associated with the properties. + * + * @return element header object + */ + ElementHeader getElementHeader(); + + + /** + * Set up the element header associated with the properties. + * + * @param elementHeader element header object + */ + void setElementHeader(ElementHeader elementHeader); +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/MetadataElementSummary.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/MetadataElementSummary.java new file mode 100644 index 00000000000..a5c4d360e3a --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/MetadataElementSummary.java @@ -0,0 +1,163 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * Description of an open metadata element (entity instance) retrieved from the open metadata repositories. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class MetadataElementSummary extends ElementHeader +{ + private Map properties = null; + + /** + * Default constructor used by subclasses + */ + public MetadataElementSummary() + { + } + + + /** + * Copy/clone constructor + * + * @param template template to copy + */ + public MetadataElementSummary(MetadataElementSummary template) + { + super(template); + + if (template != null) + { + properties = template.getProperties(); + } + } + + + /** + * Copy/clone constructor + * + * @param template template to copy + */ + public MetadataElementSummary(ElementHeader template) + { + super(template); + } + + + /** + * Copy/clone constructor + * + * @param template template to copy + */ + public MetadataElementSummary(ElementControlHeader template) + { + super(template); + } + + + /** + * Set up the properties for the element. + * If no stored properties are present then null is returned. + * + * @param properties properties for the classification + */ + public void setProperties(Map properties) + { + this.properties = properties; + } + + + /** + * Return a collection of the properties for the element. + * If no stored properties are present then null is returned. + * + * @return properties map + */ + public Map getProperties() + { + if (properties == null) + { + return null; + } + else if (properties.isEmpty()) + { + return null; + } + else + { + return new HashMap<>(properties); + } + } + + + /** + * Standard toString method. + * + * @return print out of variables in a JSON-style + */ + @Override + public String toString() + { + return "MetadataElementSummary{" + + "properties=" + properties + + ", status=" + getStatus() + + ", type=" + getType() + + ", origin=" + getOrigin() + + ", versions=" + getVersions() + + ", headerVersion=" + getHeaderVersion() + + '}'; + } + + + /** + * Compare the values of the supplied object with those stored in the current object. + * + * @param objectToCompare supplied object + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + MetadataElementSummary that = (MetadataElementSummary) objectToCompare; + return Objects.equals(properties, that.properties); + } + + + /** + * Create a hash code for this element type. + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), properties); + } +} diff --git a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/properties/MetadataRelationship.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/MetadataRelationship.java similarity index 95% rename from open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/properties/MetadataRelationship.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/MetadataRelationship.java index d40faa4073d..e4ea329d753 100644 --- a/open-metadata-implementation/access-services/asset-consumer/asset-consumer-api/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/properties/MetadataRelationship.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/MetadataRelationship.java @@ -1,13 +1,11 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetconsumer.properties; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; import java.util.HashMap; import java.util.Map; diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/MetadataSourceElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/MetadataSourceElement.java similarity index 93% rename from open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/MetadataSourceElement.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/MetadataSourceElement.java index b7a9497c94e..24ebb023f38 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/MetadataSourceElement.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/MetadataSourceElement.java @@ -1,18 +1,17 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.communityprofile.properties.MetadataSourceProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities.MetadataSourceProperties; import java.util.Objects; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; /** * MetadataSourceElement contains the properties and header for a software server capability retrieved from the metadata repository. diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/NoteElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/NoteElement.java similarity index 96% rename from open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/NoteElement.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/NoteElement.java index 2c582cd07ef..0223b4bf566 100644 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/NoteElement.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/NoteElement.java @@ -1,13 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetowner.properties.NoteProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.properties.feedback.NoteProperties; import java.util.Date; import java.util.Objects; diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/NoteLogElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/NoteLogElement.java similarity index 94% rename from open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/NoteLogElement.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/NoteLogElement.java index 2de79960415..4b7cb21c739 100644 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/metadataelements/NoteLogElement.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/NoteLogElement.java @@ -1,13 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetowner.properties.NoteLogProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.properties.feedback.NoteLogProperties; import java.util.Objects; diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/NoteLogEntryElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/NoteLogEntryElement.java similarity index 93% rename from open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/NoteLogEntryElement.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/NoteLogEntryElement.java index 5f9b1e2b524..e4e9cccdf42 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/NoteLogEntryElement.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/NoteLogEntryElement.java @@ -1,18 +1,17 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.communityprofile.properties.NoteLogEntryProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.communities.NoteLogEntryProperties; import java.util.Objects; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; /** * NoteLogEntryElement contains the properties and header for an entry in a note log such as a persona note log or a community forum. diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/NoteLogHeaderElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/NoteLogHeaderElement.java similarity index 93% rename from open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/NoteLogHeaderElement.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/NoteLogHeaderElement.java index c5031863a5b..870aa0fa8b6 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/NoteLogHeaderElement.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/NoteLogHeaderElement.java @@ -1,18 +1,17 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.communityprofile.properties.NoteLogHeaderProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.communities.NoteLogHeaderProperties; import java.util.Objects; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; /** * NoteLogHeaderElement contains the properties and header for the root of a note log such as a personal note log or a community forum. diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/PersonRoleAppointee.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/PersonRoleAppointee.java new file mode 100644 index 00000000000..146c3fb70d4 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/PersonRoleAppointee.java @@ -0,0 +1,171 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.AppointmentProperties; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * PersonRoleAppointee is the bean used to return a role and current appointee(s). + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "class") +@JsonSubTypes({ + @JsonSubTypes.Type(value = PersonRoleHistory.class, name = "PersonRoleHistory"), + @JsonSubTypes.Type(value = AgreementRoleAppointee.class, name = "AgreementRoleAppointee"), + }) +public class PersonRoleAppointee extends PersonRoleElement +{ + private AppointmentProperties appointmentProperties = null; + private ActorProfileElement profile = null; + + /** + * Default constructor + */ + public PersonRoleAppointee() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public PersonRoleAppointee(PersonRoleAppointee template) + { + super(template); + + if (template != null) + { + this.profile = template.getProfile(); + this.appointmentProperties = template.getAppointmentProperties(); + } + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public PersonRoleAppointee(PersonRoleElement template) + { + super(template); + } + + + /** + * Return the properties of the appointment relationship. + * + * @return properties + */ + public AppointmentProperties getAppointmentProperties() + { + return appointmentProperties; + } + + + /** + * Set up the properties of the appointment relationship. + * + * @param appointmentProperties properties + */ + public void setAppointmentProperties(AppointmentProperties appointmentProperties) + { + this.appointmentProperties = appointmentProperties; + } + + + /** + * Return the profile information for the individual. + * + * @return personal profile object + */ + public ActorProfileElement getProfile() + { + return profile; + } + + + /** + * Set up the profile information for the individual. + * + * @param profile personal profile object + */ + public void setProfile(ActorProfileElement profile) + { + this.profile = profile; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "PersonRoleAppointee{" + + ", appointmentProperties=" + appointmentProperties + + ", profile=" + profile + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + PersonRoleAppointee that = (PersonRoleAppointee) objectToCompare; + return Objects.equals(appointmentProperties, that.appointmentProperties) && + Objects.equals(profile, that.profile); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), appointmentProperties, profile); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/PersonRoleElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/PersonRoleElement.java new file mode 100644 index 00000000000..17f95f1c11f --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/PersonRoleElement.java @@ -0,0 +1,174 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.PersonRoleProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * PersonalRoleElement contains the properties and header for a person role assigned to a profile retrieved from the metadata repository. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class PersonRoleElement implements MetadataElement +{ + private ElementHeader elementHeader = null; + private PersonRoleProperties properties = null; + private RelatedElement relatedElement = null; + + + /** + * Default constructor + */ + public PersonRoleElement() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public PersonRoleElement(PersonRoleElement template) + { + if (template != null) + { + elementHeader = template.getElementHeader(); + properties = template.getProperties(); + relatedElement = template.getRelatedElement(); + } + } + + + /** + * Return the element header associated with the properties. + * + * @return element header object + */ + @Override + public ElementHeader getElementHeader() + { + return elementHeader; + } + + + /** + * Set up the element header associated with the properties. + * + * @param header element header object + */ + @Override + public void setElementHeader(ElementHeader header) + { + this.elementHeader = header; + } + + + /** + * Return the properties of the role. + * + * @return properties + */ + public PersonRoleProperties getProperties() + { + return properties; + } + + + /** + * Set up the role properties. + * + * @param properties properties + */ + public void setProperties(PersonRoleProperties properties) + { + this.properties = properties; + } + + + /** + * Return details of the relationship used to retrieve this element. + * Will be null if the element was retrieved directly rather than via a relationship. + * + * @return list of element stubs + */ + public RelatedElement getRelatedElement() + { + return relatedElement; + } + + + /** + * Set up details of the relationship used to retrieve this element. + * Will be null if the element was retrieved directly rather than via a relationship. + * + * @param relatedElement relationship details + */ + public void setRelatedElement(RelatedElement relatedElement) + { + this.relatedElement = relatedElement; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "PersonRoleElement{" + + "elementHeader=" + elementHeader + + ", properties=" + properties + + ", relatedElement=" + relatedElement + + '}'; + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + PersonRoleElement that = (PersonRoleElement) objectToCompare; + return Objects.equals(elementHeader, that.elementHeader) && + Objects.equals(properties, that.properties) && + Objects.equals(relatedElement, that.relatedElement); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elementHeader, properties, relatedElement); + } +} diff --git a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/metadataelements/PersonRoleHistory.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/PersonRoleHistory.java similarity index 90% rename from open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/metadataelements/PersonRoleHistory.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/PersonRoleHistory.java index c334b821375..a900bf5850b 100644 --- a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/metadataelements/PersonRoleHistory.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/PersonRoleHistory.java @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalservice.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -115,12 +115,9 @@ public void setSuccessors(List successors) public String toString() { return "PersonRoleHistory{" + - "currentAppointees=" + getCurrentAppointees() + - ", elementHeader=" + getElementHeader() + - ", properties=" + getProperties() + - ", predecessors=" + predecessors + - ", successors=" + successors + - '}'; + "predecessors=" + predecessors + + ", successors=" + successors + + "} " + super.toString(); } diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/PersonalProfileElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/PersonalProfileElement.java new file mode 100644 index 00000000000..b30b12d8a0b --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/PersonalProfileElement.java @@ -0,0 +1,146 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.PersonalProfileProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * The PersonalProfileElement describes an individual who has (or will be) appointed to one of the + * governance roles defined in the governance program. Information about the personal profile is stored + * as a Person entity. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class PersonalProfileElement implements MetadataElement +{ + private ElementHeader elementHeader = null; + private PersonalProfileProperties profileProperties = null; + + + + /** + * Default Constructor + */ + public PersonalProfileElement() + { + } + + + /** + * Copy/clone Constructor - the resulting object. + * + * @param template object being copied + */ + public PersonalProfileElement(PersonalProfileElement template) + { + if (template != null) + { + elementHeader = template.getElementHeader(); + profileProperties = template.getProfileProperties(); + } + } + + + /** + * Return the element header associated with the properties. + * + * @return element header object + */ + public ElementHeader getElementHeader() + { + return elementHeader; + } + + + /** + * Set up the element header associated with the properties. + * + * @param elementHeader element header object + */ + public void setElementHeader(ElementHeader elementHeader) + { + this.elementHeader = elementHeader; + } + + + /** + * Return the properties of the profile. + * + * @return properties + */ + public PersonalProfileProperties getProfileProperties() + { + return profileProperties; + } + + + /** + * Set up the profile properties. + * + * @param profileProperties properties + */ + public void setProfileProperties(PersonalProfileProperties profileProperties) + { + this.profileProperties = profileProperties; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "PersonalProfileElement{" + + "elementHeader=" + elementHeader + + ", profileProperties=" + profileProperties + + '}'; + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + PersonalProfileElement that = (PersonalProfileElement) objectToCompare; + return Objects.equals(elementHeader, that.elementHeader) && + Objects.equals(profileProperties, that.profileProperties); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(elementHeader, profileProperties); + } +} diff --git a/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/metadataelements/PersonalProfileUniverse.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/PersonalProfileUniverse.java similarity index 95% rename from open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/metadataelements/PersonalProfileUniverse.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/PersonalProfileUniverse.java index 7a0693fdba7..d3c12935aae 100644 --- a/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/metadataelements/PersonalProfileUniverse.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/PersonalProfileUniverse.java @@ -1,13 +1,11 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.myprofile.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.*; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; import java.util.List; import java.util.Objects; @@ -28,8 +26,8 @@ public class PersonalProfileUniverse extends PersonalProfileElement private ContributionRecordElement contributionRecord = null; private List userIdentities = null; private List contactMethods = null; - private List peers = null; - private List roles = null; + private List peers = null; + private List roles = null; /** * Default constructor diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/PersonalRoleElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/PersonalRoleElement.java similarity index 94% rename from open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/PersonalRoleElement.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/PersonalRoleElement.java index 32927a3af45..03e1e917f2d 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/PersonalRoleElement.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/PersonalRoleElement.java @@ -1,13 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.communityprofile.properties.PersonalRoleProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.PersonalRoleProperties; import java.util.Objects; diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/PortElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/PortElement.java similarity index 93% rename from open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/PortElement.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/PortElement.java index c64b3cfe304..ea40b6d9a8a 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/PortElement.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/PortElement.java @@ -1,18 +1,17 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.PortProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.processes.PortProperties; import java.util.Objects; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; /** * PortElement contains the properties and header for a port entity retrieved from the metadata repository. diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ProcessCallElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ProcessCallElement.java new file mode 100644 index 00000000000..8cde18e4b1a --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ProcessCallElement.java @@ -0,0 +1,196 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.lineage.ProcessCallProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * ProcessCallElement contains the properties and header for a process call relationship retrieved from the metadata repository. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ProcessCallElement +{ + private ElementHeader processCallHeader = null; + private ProcessCallProperties processCallProperties = null; + private ElementHeader caller = null; + private ElementHeader called = null; + + /** + * Default constructor + */ + public ProcessCallElement() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public ProcessCallElement(ProcessCallElement template) + { + if (template != null) + { + processCallHeader = template.getProcessCallHeader(); + processCallProperties = template.getProcessCallProperties(); + caller = template.getCaller(); + called = template.getCalled(); + } + } + + + /** + * Return the element header associated with the relationship. + * + * @return element header object + */ + public ElementHeader getProcessCallHeader() + { + return processCallHeader; + } + + + /** + * Set up the element header associated with the relationship. + * + * @param processCallHeader element header object + */ + public void setProcessCallHeader(ElementHeader processCallHeader) + { + this.processCallHeader = processCallHeader; + } + + + /** + * Return details of the relationship + * + * @return relationship properties + */ + public ProcessCallProperties getProcessCallProperties() + { + return processCallProperties; + } + + + /** + * Set up relationship properties + * + * @param processCallProperties relationship properties + */ + public void setProcessCallProperties(ProcessCallProperties processCallProperties) + { + this.processCallProperties = processCallProperties; + } + + + /** + * Return the element header associated with end 1 of the relationship. + * + * @return element header object + */ + public ElementHeader getCaller() + { + return caller; + } + + + /** + * Set up the element header associated with end 1 of the relationship. + * + * @param caller element header object + */ + public void setCaller(ElementHeader caller) + { + this.caller = caller; + } + + + + /** + * Return the element header associated with end 2 of the relationship. + * + * @return element header object + */ + public ElementHeader getCalled() + { + return called; + } + + + /** + * Set up the element header associated with end 2 of the relationship. + * + * @param called element header object + */ + public void setCalled(ElementHeader called) + { + this.called = called; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "ProcessCallElement{" + + "processCallHeader=" + processCallHeader + + ", processCallProperties=" + processCallProperties + + ", caller=" + caller + + ", called=" + called + + '}'; + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + ProcessCallElement that = (ProcessCallElement) objectToCompare; + return Objects.equals(getProcessCallHeader(), that.getProcessCallHeader()) && + Objects.equals(getProcessCallProperties(), that.getProcessCallProperties()) && + Objects.equals(getCaller(), that.getCaller()) && + Objects.equals(getCalled(), that.getCalled()); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), processCallHeader, processCallProperties, caller, called); + } +} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/ProcessElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ProcessElement.java similarity index 92% rename from open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/ProcessElement.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ProcessElement.java index 304a42cec92..d61d368e0c8 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/ProcessElement.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ProcessElement.java @@ -1,19 +1,18 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.AssetProperties; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.ProcessProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.AssetProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.processes.ProcessProperties; import java.util.Objects; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; /** * ProcessElement contains the properties and header for a process entity retrieved from the metadata repository. diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ProfileElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ProfileElement.java new file mode 100644 index 00000000000..06174cbe344 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ProfileElement.java @@ -0,0 +1,220 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.ActorProfileProperties; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * ProfileElement contains the properties and header for a profile of a person, team, engine or organization + * retrieved from the metadata repository. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ProfileElement implements MetadataElement +{ + private ElementHeader elementHeader = null; + private ActorProfileProperties profileProperties = null; + private List userIdentities = null; + private List contactMethods = null; + + + /** + * Default constructor + */ + public ProfileElement() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public ProfileElement(ProfileElement template) + { + if (template != null) + { + elementHeader = template.getElementHeader(); + profileProperties = template.getProfileProperties(); + userIdentities = template.getUserIdentities(); + contactMethods = template.getContactMethods(); + } + } + + + /** + * Return the element header associated with the properties. + * + * @return element header object + */ + @Override + public ElementHeader getElementHeader() + { + return elementHeader; + } + + + /** + * Set up the element header associated with the properties. + * + * @param elementHeader element header object + */ + @Override + public void setElementHeader(ElementHeader elementHeader) + { + this.elementHeader = elementHeader; + } + + + /** + * Return the properties of the profile. + * + * @return properties + */ + public ActorProfileProperties getProfileProperties() + { + return profileProperties; + } + + + /** + * Set up the profile properties. + * + * @param profileProperties properties + */ + public void setProfileProperties(ActorProfileProperties profileProperties) + { + this.profileProperties = profileProperties; + } + + + /** + * Return the list of user identities associated with the personal profile. + * + * @return list or null + */ + public List getUserIdentities() + { + if (userIdentities == null) + { + return null; + } + else if (userIdentities.isEmpty()) + { + return null; + } + + return userIdentities; + } + + + /** + * Set up the list of user identities associated with the personal profile. + * + * @param userIdentities list or null + */ + public void setUserIdentities(List userIdentities) + { + this.userIdentities = userIdentities; + } + + + /** + * Return the list of contact methods for the individual. + * + * @return list or null + */ + public List getContactMethods() + { + if (contactMethods == null) + { + return null; + } + + if (contactMethods.isEmpty()) + { + return null; + } + + return contactMethods; + } + + + /** + * Set up the list of contact methods for the individual. + * + * @param contactMethods list or null + */ + public void setContactMethods(List contactMethods) + { + this.contactMethods = contactMethods; + } + + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "ProfileElement{" + + "elementHeader=" + elementHeader + + ", profileProperties=" + profileProperties + + ", userIdentities=" + userIdentities + + ", contactMethods=" + contactMethods + + '}'; + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + ProfileElement that = (ProfileElement) objectToCompare; + return Objects.equals(elementHeader, that.elementHeader) && + Objects.equals(profileProperties, that.profileProperties) && + Objects.equals(userIdentities, that.userIdentities) && + Objects.equals(contactMethods, that.contactMethods); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(elementHeader, profileProperties, userIdentities, contactMethods); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ProfileIdentityElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ProfileIdentityElement.java new file mode 100644 index 00000000000..8982b4a296c --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ProfileIdentityElement.java @@ -0,0 +1,145 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.ProfileIdentityProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * ProfileIdentityElement contains the properties and header for a relationship between a profile and a user identity retrieved + * from the metadata repository. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ProfileIdentityElement +{ + private ProfileIdentityProperties profileIdentity = null; + private UserIdentityElement userIdentity = null; + + + /** + * Default constructor + */ + public ProfileIdentityElement() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public ProfileIdentityElement(ProfileIdentityElement template) + { + if (template != null) + { + profileIdentity = template.getProfileIdentity(); + userIdentity = template.getUserIdentity(); + } + } + + + /** + * Return the properties from the profile identity relationship. + * + * @return profile identity + */ + public ProfileIdentityProperties getProfileIdentity() + { + return profileIdentity; + } + + + /** + * Set up the properties from the profile identity relationship. + * + * @param profileIdentity profile identity + */ + public void setProfileIdentity(ProfileIdentityProperties profileIdentity) + { + this.profileIdentity = profileIdentity; + } + + + /** + * Return the properties of the userId. + * + * @return properties + */ + public UserIdentityElement getUserIdentity() + { + return userIdentity; + } + + + /** + * Set up the userId properties. + * + * @param userIdentity properties + */ + public void setUserIdentity(UserIdentityElement userIdentity) + { + this.userIdentity = userIdentity; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "ProfileIdentityElement{" + + "profileIdentity=" + profileIdentity + + ", properties=" + userIdentity + + '}'; + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + ProfileIdentityElement that = (ProfileIdentityElement) objectToCompare; + return Objects.equals(profileIdentity, that.profileIdentity) && + Objects.equals(userIdentity, that.userIdentity); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), profileIdentity, userIdentity); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ProfileLocationElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ProfileLocationElement.java new file mode 100644 index 00000000000..d67e1c2f3fc --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ProfileLocationElement.java @@ -0,0 +1,145 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.locations.ProfileLocationProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * ProfileLocationElement contains the properties and header for a relationship between a profile and a user identity retrieved + * from the metadata repository. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ProfileLocationElement +{ + private ProfileLocationProperties properties = null; + private ElementStub location = null; + + + /** + * Default constructor + */ + public ProfileLocationElement() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public ProfileLocationElement(ProfileLocationElement template) + { + if (template != null) + { + properties = template.getProperties(); + location = template.getLocation(); + } + } + + + /** + * Return the properties from the profile location relationship. + * + * @return profile identity + */ + public ProfileLocationProperties getProperties() + { + return properties; + } + + + /** + * Set up the properties from the profile location relationship. + * + * @param properties profile identity + */ + public void setProperties(ProfileLocationProperties properties) + { + this.properties = properties; + } + + + /** + * Return the properties of the location. + * + * @return properties + */ + public ElementStub getLocation() + { + return location; + } + + + /** + * Set up the userId properties. + * + * @param location properties + */ + public void setLocation(ElementStub location) + { + this.location = location; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "ProfileLocationElement{" + + "properties=" + properties + + ", location=" + location + + '}'; + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + ProfileLocationElement that = (ProfileLocationElement) objectToCompare; + return Objects.equals(properties, that.properties) && + Objects.equals(location, that.location); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), properties, location); + } +} diff --git a/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/metadataelements/ProjectElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ProjectElement.java similarity index 96% rename from open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/metadataelements/ProjectElement.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ProjectElement.java index a303d1d79b1..896a5e27a67 100644 --- a/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/metadataelements/ProjectElement.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ProjectElement.java @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.projectmanagement.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -12,7 +12,6 @@ import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; /** * ProjectElement contains the properties and header for a community. diff --git a/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/metadataelements/ProjectTeamMember.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ProjectTeamMember.java similarity index 94% rename from open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/metadataelements/ProjectTeamMember.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ProjectTeamMember.java index 9399a44d0e5..b4000b5e88e 100644 --- a/open-metadata-implementation/access-services/project-management/project-management-api/src/main/java/org/odpi/openmetadata/accessservices/projectmanagement/metadataelements/ProjectTeamMember.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ProjectTeamMember.java @@ -1,13 +1,11 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.projectmanagement.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import org.odpi.openmetadata.frameworks.openmetadata.properties.projects.ProjectTeamProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; import java.util.Objects; diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/QueryElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/QueryElement.java similarity index 93% rename from open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/QueryElement.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/QueryElement.java index 5c1f33f1472..6d7d321f3df 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/QueryElement.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/QueryElement.java @@ -1,18 +1,18 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.properties.QueryProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.display.QueryProperties; import java.util.Objects; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; /** * QueryElement contains the properties and header for a query entity retrieved from the metadata repository. diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/RatingElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/RatingElement.java new file mode 100644 index 00000000000..6ad1e0aca27 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/RatingElement.java @@ -0,0 +1,175 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +import org.odpi.openmetadata.frameworks.openmetadata.properties.feedback.RatingProperties; + +/** + * RatingElement contains the properties and header for a rating retrieved from the metadata repository. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class RatingElement implements MetadataElement +{ + private ElementHeader elementHeader = null; + private RatingProperties properties = null; + private FeedbackTargetElement feedbackTargetElement = null; + + + /** + * Default constructor + */ + public RatingElement() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public RatingElement(RatingElement template) + { + if (template != null) + { + elementHeader = template.getElementHeader(); + properties = template.getProperties(); + feedbackTargetElement = template.getFeedbackTargetElement(); + } + } + + + /** + * Return the element header associated with the properties. + * + * @return element header object + */ + @Override + public ElementHeader getElementHeader() + { + return elementHeader; + } + + + /** + * Set up the element header associated with the properties. + * + * @param elementHeader element header object + */ + @Override + public void setElementHeader(ElementHeader elementHeader) + { + this.elementHeader = elementHeader; + } + + + /** + * Return the properties of the rating. + * + * @return properties + */ + public RatingProperties getProperties() + { + return properties; + } + + + /** + * Set up the rating properties. + * + * @param properties properties + */ + public void setProperties(RatingProperties properties) + { + this.properties = properties; + } + + + /** + * Return details of the relationship from the element in the request to the rating. This value is null if it + * was retrieved independently of the linked element. + * + * @return associated relationship + */ + public FeedbackTargetElement getFeedbackTargetElement() + { + return feedbackTargetElement; + } + + + /** + * Set up details of the relationship from the element in the request to the rating. This value is null if it + * was retrieved independently of the linked element. + * + * @param feedbackTargetElement associated relationship + */ + public void setFeedbackTargetElement(FeedbackTargetElement feedbackTargetElement) + { + this.feedbackTargetElement = feedbackTargetElement; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "RatingElement{" + + "elementHeader=" + elementHeader + + ", properties=" + properties + + ", feedbackTargetElement=" + feedbackTargetElement + + '}'; + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + RatingElement that = (RatingElement) objectToCompare; + return Objects.equals(elementHeader, that.elementHeader) && + Objects.equals(properties, that.properties) && + Objects.equals(feedbackTargetElement, that.feedbackTargetElement); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elementHeader, properties, feedbackTargetElement); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ReferenceValueAssignmentDefinitionElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ReferenceValueAssignmentDefinitionElement.java new file mode 100644 index 00000000000..cc44c8e8213 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ReferenceValueAssignmentDefinitionElement.java @@ -0,0 +1,169 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues.ReferenceValueAssignmentProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * ReferenceValueAssignmentDefinitionElement describes a valid value that is being used as a tag/classifier + * for a referenceable. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ReferenceValueAssignmentDefinitionElement +{ + private ElementHeader relationshipHeader = null; + private ReferenceValueAssignmentProperties relationshipProperties = null; + private ValidValueElement validValueElement = null; + + + /** + * Default constructor + */ + public ReferenceValueAssignmentDefinitionElement() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public ReferenceValueAssignmentDefinitionElement(ReferenceValueAssignmentDefinitionElement template) + { + if (template != null) + { + this.relationshipHeader = template.getRelationshipHeader(); + this.relationshipProperties = template.getRelationshipProperties(); + this.validValueElement = template.getValidValueElement(); + } + } + + + /** + * Return the element header associated with the properties. + * + * @return element header object + */ + public ElementHeader getRelationshipHeader() + { + return relationshipHeader; + } + + + /** + * Set up the element header associated with the properties. + * + * @param relationshipHeader element header object + */ + public void setRelationshipHeader(ElementHeader relationshipHeader) + { + this.relationshipHeader = relationshipHeader; + } + + + /** + * Return the properties of the relationship. + * + * @return properties + */ + public ReferenceValueAssignmentProperties getRelationshipProperties() + { + return relationshipProperties; + } + + + /** + * Set up the properties of the relationship. + * + * @param relationshipProperties properties + */ + public void setRelationshipProperties(ReferenceValueAssignmentProperties relationshipProperties) + { + this.relationshipProperties = relationshipProperties; + } + + + /** + * Return the member element. + * + * @return element + */ + public ValidValueElement getValidValueElement() + { + return validValueElement; + } + + + /** + * Set up the member element. + * + * @param validValueElement element + */ + public void setValidValueElement(ValidValueElement validValueElement) + { + this.validValueElement = validValueElement; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "ValidValueMember{" + + "relationshipHeader=" + relationshipHeader + + ", relationshipProperties=" + relationshipProperties + + ", memberElement=" + validValueElement + + '}'; + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (! (objectToCompare instanceof ReferenceValueAssignmentDefinitionElement that)) + { + return false; + } + return Objects.equals(relationshipHeader, that.relationshipHeader) && + Objects.equals(relationshipProperties, that.relationshipProperties) && + Objects.equals(validValueElement, that.validValueElement); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(relationshipHeader, relationshipProperties, validValueElement); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ReferenceValueAssignmentItemElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ReferenceValueAssignmentItemElement.java new file mode 100644 index 00000000000..baefdf705f4 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ReferenceValueAssignmentItemElement.java @@ -0,0 +1,170 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues.ReferenceValueAssignmentProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * ReferenceValueAssignmentItemElement describes a Referenceable that is using a valid values set/definition + * as a tag/classifier. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ReferenceValueAssignmentItemElement +{ + private ElementHeader relationshipHeader = null; + private ReferenceValueAssignmentProperties relationshipProperties = null; + + private ReferenceableElement assignedItem = null; + + + /** + * Default constructor + */ + public ReferenceValueAssignmentItemElement() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public ReferenceValueAssignmentItemElement(ReferenceValueAssignmentItemElement template) + { + if (template != null) + { + this.relationshipHeader = template.getRelationshipHeader(); + this.relationshipProperties = template.getRelationshipProperties(); + this.assignedItem = template.getAssignedItem(); + } + } + + + /** + * Return the element header associated with the properties. + * + * @return element header object + */ + public ElementHeader getRelationshipHeader() + { + return relationshipHeader; + } + + + /** + * Set up the element header associated with the properties. + * + * @param relationshipHeader element header object + */ + public void setRelationshipHeader(ElementHeader relationshipHeader) + { + this.relationshipHeader = relationshipHeader; + } + + + /** + * Return the properties of the relationship. + * + * @return properties + */ + public ReferenceValueAssignmentProperties getRelationshipProperties() + { + return relationshipProperties; + } + + + /** + * Set up the properties of the relationship. + * + * @param relationshipProperties properties + */ + public void setRelationshipProperties(ReferenceValueAssignmentProperties relationshipProperties) + { + this.relationshipProperties = relationshipProperties; + } + + + /** + * Return the referenceable bean + * + * @return bean + */ + public ReferenceableElement getAssignedItem() + { + return assignedItem; + } + + + /** + * Set up the referenceable bean + * + * @param assignedItem bean + */ + public void setAssignedItem(ReferenceableElement assignedItem) + { + this.assignedItem = assignedItem; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "ReferenceValueAssignmentItemElement{" + + "relationshipHeader=" + relationshipHeader + + ", relationshipProperties=" + relationshipProperties + + ", assignedItem=" + assignedItem + + '}'; + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (! (objectToCompare instanceof ReferenceValueAssignmentItemElement that)) + { + return false; + } + return Objects.equals(relationshipHeader, that.relationshipHeader) && + Objects.equals(relationshipProperties, that.relationshipProperties) && + Objects.equals(assignedItem, that.assignedItem); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(relationshipHeader, relationshipProperties, assignedItem); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ReferenceableElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ReferenceableElement.java new file mode 100644 index 00000000000..305d6afa640 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ReferenceableElement.java @@ -0,0 +1,150 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ReferenceableProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * ReferenceableElement contains the properties and header for a referenceable entity retrieved from the metadata repository. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ReferenceableElement implements MetadataElement +{ + private ElementHeader elementHeader = null; + private ReferenceableProperties referenceableProperties = null; + + + /** + * Default constructor + */ + public ReferenceableElement() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public ReferenceableElement(ReferenceableElement template) + { + if (template != null) + { + elementHeader = template.getElementHeader(); + referenceableProperties = template.getReferenceableProperties(); + } + } + + + /** + * Return the element header associated with the properties. + * + * @return element header object + */ + @Override + public ElementHeader getElementHeader() + { + return elementHeader; + } + + + /** + * Set up the element header associated with the properties. + * + * @param elementHeader element header object + */ + @Override + public void setElementHeader(ElementHeader elementHeader) + { + this.elementHeader = elementHeader; + } + + + /** + * Return the properties of a referenceable. + * + * @return properties bean + */ + public ReferenceableProperties getReferenceableProperties() + { + return referenceableProperties; + } + + + /** + * Set up the properties for a referenceable. + * + * @param referenceableProperties properties bean + */ + public void setReferenceableProperties(ReferenceableProperties referenceableProperties) + { + this.referenceableProperties = referenceableProperties; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "ReferenceableElement{" + + "elementHeader=" + elementHeader + + ", referenceableProperties=" + referenceableProperties + + '}'; + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + ReferenceableElement that = (ReferenceableElement) objectToCompare; + return Objects.equals(elementHeader, that.elementHeader) && + Objects.equals(referenceableProperties, that.referenceableProperties); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elementHeader, referenceableProperties); + } +} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/RelatedAssetElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/RelatedAssetElement.java similarity index 97% rename from open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/RelatedAssetElement.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/RelatedAssetElement.java index cc9aaf16709..86fae8e80d9 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/RelatedAssetElement.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/RelatedAssetElement.java @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -13,7 +13,6 @@ import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; /** * RelatedAssetElement contains the properties and header for a relationship to an asset retrieved from the metadata repository. diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/RelatedElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/RelatedElement.java new file mode 100644 index 00000000000..eac4dfe64bc --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/RelatedElement.java @@ -0,0 +1,170 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * RelatedElement contains the properties and header for a relationship retrieved from the metadata repository along with the stub + * of the related element. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class RelatedElement +{ + private ElementHeader relationshipHeader = null; + private RelationshipProperties relationshipProperties = null; + private ElementStub relatedElement = null; + + /** + * Default constructor + */ + public RelatedElement() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public RelatedElement(RelatedElement template) + { + if (template != null) + { + relationshipHeader = template.getRelationshipHeader(); + relationshipProperties = template.getRelationshipProperties(); + relatedElement = template.getRelatedElement(); + } + } + + + /** + * Return the element header associated with the relationship. + * + * @return element header object + */ + public ElementHeader getRelationshipHeader() + { + return relationshipHeader; + } + + + /** + * Set up the element header associated with the relationship. + * + * @param relationshipHeader element header object + */ + public void setRelationshipHeader(ElementHeader relationshipHeader) + { + this.relationshipHeader = relationshipHeader; + } + + + /** + * Return details of the relationship + * + * @return relationship properties + */ + public RelationshipProperties getRelationshipProperties() + { + return relationshipProperties; + } + + + /** + * Set up relationship properties + * + * @param relationshipProperties relationship properties + */ + public void setRelationshipProperties(RelationshipProperties relationshipProperties) + { + this.relationshipProperties = relationshipProperties; + } + + + /** + * Return the element header associated with end 1 of the relationship. + * + * @return element stub object + */ + public ElementStub getRelatedElement() + { + return relatedElement; + } + + + /** + * Set up the element header associated with end 1 of the relationship. + * + * @param relatedElement element stub object + */ + public void setRelatedElement(ElementStub relatedElement) + { + this.relatedElement = relatedElement; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "RelatedElement{" + + "relationshipHeader=" + relationshipHeader + + ", relationshipProperties=" + relationshipProperties + + ", relatedElement=" + relatedElement + + '}'; + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + RelatedElement that = (RelatedElement) objectToCompare; + return Objects.equals(getRelationshipHeader(), that.getRelationshipHeader()) && + Objects.equals(getRelationshipProperties(), that.getRelationshipProperties()) && + Objects.equals(getRelatedElement(), that.getRelatedElement()); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), relationshipHeader, relationshipProperties, relatedElement); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/RelationshipElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/RelationshipElement.java new file mode 100644 index 00000000000..3aaf9884211 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/RelationshipElement.java @@ -0,0 +1,196 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * RelationshipElement contains the properties and header for a relationship retrieved from the metadata repository. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class RelationshipElement +{ + private ElementHeader relationshipHeader = null; + private RelationshipProperties relationshipProperties = null; + private ElementHeader end1GUID = null; + private ElementHeader end2GUID = null; + + /** + * Default constructor + */ + public RelationshipElement() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public RelationshipElement(RelationshipElement template) + { + if (template != null) + { + relationshipHeader = template.getRelationshipHeader(); + relationshipProperties = template.getRelationshipProperties(); + end1GUID = template.getEnd1GUID(); + end2GUID = template.getEnd2GUID(); + } + } + + + /** + * Return the element header associated with the relationship. + * + * @return element header object + */ + public ElementHeader getRelationshipHeader() + { + return relationshipHeader; + } + + + /** + * Set up the element header associated with the relationship. + * + * @param relationshipHeader element header object + */ + public void setRelationshipHeader(ElementHeader relationshipHeader) + { + this.relationshipHeader = relationshipHeader; + } + + + /** + * Return details of the relationship + * + * @return relationship properties + */ + public RelationshipProperties getRelationshipProperties() + { + return relationshipProperties; + } + + + /** + * Set up relationship properties + * + * @param relationshipProperties relationship properties + */ + public void setRelationshipProperties(RelationshipProperties relationshipProperties) + { + this.relationshipProperties = relationshipProperties; + } + + + /** + * Return the element header associated with end 1 of the relationship. + * + * @return element header object + */ + public ElementHeader getEnd1GUID() + { + return end1GUID; + } + + + /** + * Set up the element header associated with end 1 of the relationship. + * + * @param end1GUID element header object + */ + public void setEnd1GUID(ElementHeader end1GUID) + { + this.end1GUID = end1GUID; + } + + + + /** + * Return the element header associated with end 2 of the relationship. + * + * @return element header object + */ + public ElementHeader getEnd2GUID() + { + return end2GUID; + } + + + /** + * Set up the element header associated with end 2 of the relationship. + * + * @param end2GUID element header object + */ + public void setEnd2GUID(ElementHeader end2GUID) + { + this.end2GUID = end2GUID; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "RelationshipElement{" + + "relationshipHeader=" + relationshipHeader + + ", relationshipProperties=" + relationshipProperties + + ", end1GUID=" + end1GUID + + ", end2GUID=" + end2GUID + + '}'; + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + RelationshipElement that = (RelationshipElement) objectToCompare; + return Objects.equals(getRelationshipHeader(), that.getRelationshipHeader()) && + Objects.equals(getRelationshipProperties(), that.getRelationshipProperties()) && + Objects.equals(getEnd1GUID(), that.getEnd1GUID()) && + Objects.equals(getEnd2GUID(), that.getEnd2GUID()); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), relationshipHeader, relationshipProperties, end1GUID, end2GUID); + } +} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/ReportElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ReportElement.java similarity index 93% rename from open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/ReportElement.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ReportElement.java index 52a64220b70..76f2c5041e6 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/ReportElement.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ReportElement.java @@ -1,18 +1,18 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.properties.ReportProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.display.ReportProperties; import java.util.Objects; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; /** * ReportElement contains the properties and header for a report entity retrieved from the metadata repository. diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/SchemaAttributeElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/SchemaAttributeElement.java new file mode 100644 index 00000000000..8ad7b8c55c0 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/SchemaAttributeElement.java @@ -0,0 +1,172 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.SchemaAttributeProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * SchemaAttributeElement contains the properties and header for a schema attribute retrieved from the metadata repository. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class SchemaAttributeElement implements MetadataElement +{ + private ElementHeader elementHeader = null; + private SchemaAttributeProperties schemaAttributeProperties = null; + private SchemaTypeElement schemaTypeElement = null; + + + /** + * Default constructor + */ + public SchemaAttributeElement() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public SchemaAttributeElement(SchemaAttributeElement template) + { + if (template != null) + { + elementHeader = template.getElementHeader(); + schemaAttributeProperties = template.getSchemaAttributeProperties(); + } + } + + + /** + * Return the element header associated with the properties. + * + * @return element header object + */ + @Override + public ElementHeader getElementHeader() + { + return elementHeader; + } + + + /** + * Set up the element header associated with the properties. + * + * @param elementHeader element header object + */ + @Override + public void setElementHeader(ElementHeader elementHeader) + { + this.elementHeader = elementHeader; + } + + + /** + * Return the properties for a schema attribute. + * + * @return properties bean + */ + public SchemaAttributeProperties getSchemaAttributeProperties() + { + return schemaAttributeProperties; + } + + + /** + * Set up the properties for a schema attribute. + * + * @param schemaAttributeProperties properties bean + */ + public void setSchemaAttributeProperties(SchemaAttributeProperties schemaAttributeProperties) + { + this.schemaAttributeProperties = schemaAttributeProperties; + } + + /** + * Return the schema type if available. + * + * @return schema type + */ + public SchemaTypeElement getSchemaTypeElement() + { + return schemaTypeElement; + } + + + /** + * ser up the schema type if available. + * + * @param schemaTypeElement schema type + */ + public void setSchemaTypeElement(SchemaTypeElement schemaTypeElement) + { + this.schemaTypeElement = schemaTypeElement; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "SchemaAttributeElement{" + + "elementHeader=" + elementHeader + + ", schemaAttributeProperties=" + schemaAttributeProperties + + '}'; + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + SchemaAttributeElement that = (SchemaAttributeElement) objectToCompare; + return Objects.equals(elementHeader, that.elementHeader) && + Objects.equals(schemaAttributeProperties, that.schemaAttributeProperties); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elementHeader, schemaAttributeProperties); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/SchemaTypeElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/SchemaTypeElement.java new file mode 100644 index 00000000000..84c6f3437f7 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/SchemaTypeElement.java @@ -0,0 +1,391 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.DerivedSchemaTypeQueryTargetProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.SchemaTypeProperties; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * SchemaTypeElement contains the properties and header for a reference data asset retrieved from the metadata repository. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class SchemaTypeElement implements MetadataElement +{ + + private SchemaTypeProperties schemaTypeProperties = null; + private ElementHeader elementHeader = null; + + /* + * For complex schema types such as StructSchemaType + */ + private int attributeCount = 0; + + /* + * For Map Schema Types + */ + private SchemaTypeElement mapFromElement = null; + private SchemaTypeElement mapToElement = null; + + /* + * For External Schema Types + */ + private SchemaTypeElement externalSchemaType = null; + + /* + * Schema options for SchemaTypeChoice + */ + private List schemaOptions = null; + + /* + * Used when a value, or set of values associated with the schema are derived rather than stored. + */ + private String formula = null; + private String formulaType = null; + private List queries = null; + + /** + * Default constructor + */ + public SchemaTypeElement() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public SchemaTypeElement(SchemaTypeElement template) + { + if (template != null) + { + elementHeader = template.getElementHeader(); + schemaTypeProperties = template.getSchemaTypeProperties(); + + attributeCount = template.getAttributeCount(); + + mapFromElement = template.getMapFromElement(); + mapToElement = template.getMapToElement(); + + externalSchemaType = template.getExternalSchemaType(); + + schemaOptions = template.getSchemaOptions(); + + formula = template.getFormula(); + formulaType = template.getFormulaType(); + queries = template.getQueries(); + } + } + + + /** + * Return the element header associated with the properties. + * + * @return element header object + */ + @Override + public ElementHeader getElementHeader() + { + return elementHeader; + } + + + /** + * Set up the element header associated with the properties. + * + * @param elementHeader element header object + */ + @Override + public void setElementHeader(ElementHeader elementHeader) + { + this.elementHeader = elementHeader; + } + + + /** + * Return the properties for the schema. + * + * @return schema properties (using appropriate subclass) + */ + public SchemaTypeProperties getSchemaTypeProperties() + { + return schemaTypeProperties; + } + + + /** + * Set up the properties for the schema. + * + * @param schemaTypeProperties schema properties + */ + public void setSchemaTypeProperties(SchemaTypeProperties schemaTypeProperties) + { + this.schemaTypeProperties = schemaTypeProperties; + } + + + + /** + * Return the count of attributes in this schema type. + * + * @return String data type name + */ + public int getAttributeCount() { return attributeCount; } + + + /** + * Set up the count of attributes in this schema type + * + * @param attributeCount data type name + */ + public void setAttributeCount(int attributeCount) + { + this.attributeCount = attributeCount; + } + + + + /** + * Return the type of schema element that represents the key or property name for the map. + * This is also called the domain of the map. + * + * @return SchemaElement + */ + public SchemaTypeElement getMapFromElement() + { + return mapFromElement; + } + + + /** + * Set up the type of schema element that represents the key or property name for the map. + * This is also called the domain of the map. + * + * @param mapFromElement SchemaElement + */ + public void setMapFromElement(SchemaTypeElement mapFromElement) + { + this.mapFromElement = mapFromElement; + } + + + /** + * Return the type of schema element that represents the property value for the map. + * This is also called the range of the map. + * + * @return SchemaElement + */ + public SchemaTypeElement getMapToElement() + { + return mapToElement; + } + + + /** + * Set up the type of schema element that represents the property value for the map. + * This is also called the range of the map. + * + * @param mapToElement SchemaType + */ + public void setMapToElement(SchemaTypeElement mapToElement) + { + this.mapToElement = mapToElement; + } + + + /** + * Return the schema type that is reusable amongst assets. + * + * @return bean describing external schema + */ + public SchemaTypeElement getExternalSchemaType() + { + return externalSchemaType; + } + + + /** + * Set up the schema type that is reusable amongst assets. + * + * @param externalSchemaType bean describing external schema + */ + public void setExternalSchemaType(SchemaTypeElement externalSchemaType) + { + this.externalSchemaType = externalSchemaType; + } + + + /** + * Return the list of alternative schema types that this attribute or asset may use. + * + * @return list of schema types + */ + public List getSchemaOptions() + { + if (schemaOptions == null) + { + return null; + } + else if (schemaOptions.isEmpty()) + { + return null; + } + + return schemaOptions; + } + + + /** + * Set up the list of alternative schema types that this attribute or asset may use. + * + * @param schemaOptions list of schema types + */ + public void setSchemaOptions(List schemaOptions) + { + this.schemaOptions = schemaOptions; + } + + + /** + * Return the formula used to combine the values of the queries. Each query is has a identifier and the + * formula has placeholders for these identifiers in it to show how the query results are combined. + * + * @return String formula + */ + public String getFormula() { return formula; } + + + /** + * Set up the formula used to combine the values of the queries. Each query is has a identifier and the + * formula has placeholders for these identifiers in it to show how the query results are combined. + * + * @param formula String formula + */ + public void setFormula(String formula) + { + this.formula = formula; + } + + + /** + * Return the specification language for the formula. + * + * @return string description + */ + public String getFormulaType() + { + return formulaType; + } + + + /** + * Set up the specification language for the formula. + * + * @param formulaType string description + */ + public void setFormulaType(String formulaType) + { + this.formulaType = formulaType; + } + + + /** + * Return the list of individual query targets for a derived column. + * + * @return list of queries and their target element + */ + public List getQueries() + { + return queries; + } + + + /** + * Set up the list of individual query targets for a derived column. + * + * @param queries list of queries and their target element + */ + public void setQueries(List queries) + { + this.queries = queries; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "SchemaTypeElement{" + + "schemaTypeProperties=" + schemaTypeProperties + + ", elementHeader=" + elementHeader + + ", attributeCount=" + attributeCount + + ", mapFromElement=" + mapFromElement + + ", mapToElement=" + mapToElement + + ", formula='" + formula + '\'' + + ", formulaType='" + formulaType + '\'' + + ", queries=" + queries + + '}'; + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + SchemaTypeElement that = (SchemaTypeElement) objectToCompare; + return attributeCount == that.attributeCount && + Objects.equals(schemaTypeProperties, that.schemaTypeProperties) && + Objects.equals(elementHeader, that.elementHeader) && + Objects.equals(mapFromElement, that.mapFromElement) && + Objects.equals(mapToElement, that.mapToElement) && + Objects.equals(externalSchemaType, that.externalSchemaType) && + Objects.equals(schemaOptions, that.schemaOptions) && + Objects.equals(formula, that.formula) && + Objects.equals(formulaType, that.formulaType) && + Objects.equals(queries, that.queries); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(schemaTypeProperties, elementHeader, attributeCount, mapFromElement, mapToElement, externalSchemaType, schemaOptions, + formula, formulaType, queries); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/SecurityGroupElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/SecurityGroupElement.java new file mode 100644 index 00000000000..bd1713479fa --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/SecurityGroupElement.java @@ -0,0 +1,173 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.security.SecurityGroupProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * SecurityGroupElement is the superclass used to return the common properties of a governance definition stored in the + * open metadata repositories. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class SecurityGroupElement implements MetadataElement +{ + private ElementHeader elementHeader = null; + private SecurityGroupProperties properties = null; + private RelatedElement relatedElement = null; + + + /** + * Default constructor + */ + public SecurityGroupElement() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public SecurityGroupElement(SecurityGroupElement template) + { + if (template != null) + { + this.elementHeader = template.getElementHeader(); + this.properties = template.getProperties(); + this.relatedElement = template.getRelatedElement(); + } + } + + + /** + * Return the element header associated with the properties. + * + * @return element header object + */ + public ElementHeader getElementHeader() + { + return elementHeader; + } + + + /** + * Set up the element header associated with the properties. + * + * @param elementHeader element header object + */ + public void setElementHeader(ElementHeader elementHeader) + { + this.elementHeader = elementHeader; + } + + + /** + * Return the requested security group. + * + * @return properties bean + */ + public SecurityGroupProperties getProperties() + { + return properties; + } + + + /** + * Set up the requested security group. + * + * @param properties properties bean + */ + public void setProperties(SecurityGroupProperties properties) + { + this.properties = properties; + } + + + /** + * Return details of the relationship used to retrieve this element. + * Will be null if the element was retrieved directly rather than via a relationship. + * + * @return list of element stubs + */ + public RelatedElement getRelatedElement() + { + return relatedElement; + } + + + /** + * Set up details of the relationship used to retrieve this element. + * Will be null if the element was retrieved directly rather than via a relationship. + * + * @param relatedElement relationship details + */ + public void setRelatedElement(RelatedElement relatedElement) + { + this.relatedElement = relatedElement; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "SecurityGroupElement{" + + "elementHeader=" + elementHeader + + ", properties=" + properties + + ", relatedElement=" + relatedElement + + '}'; + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + SecurityGroupElement that = (SecurityGroupElement) objectToCompare; + return Objects.equals(elementHeader, that.elementHeader) && + Objects.equals(properties, that.properties) && + Objects.equals(relatedElement, that.relatedElement); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elementHeader, properties, relatedElement); + } +} diff --git a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/metadataelements/SecurityManagerElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/SecurityManagerElement.java similarity index 93% rename from open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/metadataelements/SecurityManagerElement.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/SecurityManagerElement.java index 31228bbe7de..2313a10409e 100644 --- a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/metadataelements/SecurityManagerElement.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/SecurityManagerElement.java @@ -1,18 +1,17 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.securitymanager.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.securitymanager.properties.SecurityManagerProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities.SecurityManagerProperties; import java.util.Objects; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; /** * SecurityManagerElement contains the properties and header for a software server capabilities entity retrieved from the metadata diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/ServerAssetUseElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ServerAssetUseElement.java similarity index 94% rename from open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/ServerAssetUseElement.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ServerAssetUseElement.java index 89f8cdffe81..d22843364d6 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/ServerAssetUseElement.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ServerAssetUseElement.java @@ -1,13 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.ServerAssetUseProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.infrastructure.ServerAssetUseProperties; import java.util.Objects; diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/SoftwareCapabilityElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/SoftwareCapabilityElement.java new file mode 100644 index 00000000000..65c23caec5d --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/SoftwareCapabilityElement.java @@ -0,0 +1,147 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities.SoftwareCapabilityProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * SoftwareCapabilityElement contains the properties and header for a software server capability retrieved from the metadata repository. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class SoftwareCapabilityElement implements MetadataElement +{ + private SoftwareCapabilityProperties properties = null; + private ElementHeader elementHeader = null; + + + /** + * Default constructor + */ + public SoftwareCapabilityElement() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public SoftwareCapabilityElement(SoftwareCapabilityElement template) + { + if (template != null) + { + elementHeader = template.getElementHeader(); + properties = template.getProperties(); + } + } + + + /** + * Return the element header associated with the properties. + * + * @return element header object + */ + @Override + public ElementHeader getElementHeader() + { + return elementHeader; + } + + + /** + * Set up the element header associated with the properties. + * + * @param elementHeader element header object + */ + @Override + public void setElementHeader(ElementHeader elementHeader) + { + this.elementHeader = elementHeader; + } + + + /** + * Return the properties for the software server capability. + * + * @return asset properties (using appropriate subclass) + */ + public SoftwareCapabilityProperties getProperties() + { + return properties; + } + + + /** + * Set up the properties for the software server capability. + * + * @param properties asset properties + */ + public void setProperties(SoftwareCapabilityProperties properties) + { + this.properties = properties; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "SoftwareCapabilityElement{" + + "properties=" + properties + + ", elementHeader=" + elementHeader + + '}'; + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + SoftwareCapabilityElement that = (SoftwareCapabilityElement) objectToCompare; + return Objects.equals(getProperties(), that.getProperties()) && + Objects.equals(getElementHeader(), that.getElementHeader()); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elementHeader, properties); + } +} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/SoftwareServerCapabilityElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/SoftwareServerCapabilityElement.java similarity index 94% rename from open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/SoftwareServerCapabilityElement.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/SoftwareServerCapabilityElement.java index fad6d4a66ff..4467c936138 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/SoftwareServerCapabilityElement.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/SoftwareServerCapabilityElement.java @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -16,7 +16,6 @@ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) -@Deprecated public class SoftwareServerCapabilityElement extends SoftwareCapabilityElement { /** diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/SoftwareServerElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/SoftwareServerElement.java similarity index 92% rename from open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/SoftwareServerElement.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/SoftwareServerElement.java index 8b91786b9ea..b11650e880d 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/SoftwareServerElement.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/SoftwareServerElement.java @@ -1,19 +1,19 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.AssetProperties; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.SoftwareServerProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.AssetProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.infrastructure.SoftwareServerProperties; import java.util.Objects; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; + /** * SoftwareServerElement contains the properties and header for a software server retrieved from the metadata repository. diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/SoftwareServerPlatformElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/SoftwareServerPlatformElement.java similarity index 92% rename from open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/SoftwareServerPlatformElement.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/SoftwareServerPlatformElement.java index 087445b1ac6..1a327532e38 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/metadataelements/SoftwareServerPlatformElement.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/SoftwareServerPlatformElement.java @@ -1,19 +1,18 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.AssetProperties; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.SoftwareServerPlatformProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.AssetProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.infrastructure.SoftwareServerPlatformProperties; import java.util.Objects; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; /** * SoftwareServerPlatformElement contains the properties and header for a software server platform retrieved from the metadata repository. diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/SubjectAreaDefinition.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/SubjectAreaDefinition.java similarity index 89% rename from open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/SubjectAreaDefinition.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/SubjectAreaDefinition.java index 30960a7f626..4c3e7b2c6ef 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/metadataelements/SubjectAreaDefinition.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/SubjectAreaDefinition.java @@ -1,9 +1,8 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.*; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; import java.util.List; import java.util.Objects; @@ -138,12 +137,10 @@ public void setAssociatedGovernanceDefinitions(List associatedGover public String toString() { return "SubjectAreaDefinition{" + - "parentSubjectAreaGUID='" + parentSubjectAreaGUID + '\'' + - ", nestedSubjectAreaGUIDs=" + nestedSubjectAreaGUIDs + - ", associatedGovernanceDefinitions=" + associatedGovernanceDefinitions + - ", elementHeader=" + getElementHeader() + - ", subjectAreaProperties=" + getProperties() + - '}'; + "parentSubjectAreaGUID='" + parentSubjectAreaGUID + '\'' + + ", nestedSubjectAreaGUIDs=" + nestedSubjectAreaGUIDs + + ", associatedGovernanceDefinitions=" + associatedGovernanceDefinitions + + "} " + super.toString(); } diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/SubjectAreaElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/SubjectAreaElement.java new file mode 100644 index 00000000000..72bd865a8c5 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/SubjectAreaElement.java @@ -0,0 +1,225 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; + + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.SubjectAreaProperties; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * SubjectAreaElement is the bean used to return a subject area definition stored in the open metadata repositories. + * It includes links to related subject areas and the governance definitions associated with the subject areas. + * More information about the governance definitions can be retrieved through the Governance Program OMAS. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class SubjectAreaElement implements MetadataElement +{ + private ElementHeader elementHeader = null; + private SubjectAreaProperties properties = null; + private String parentSubjectAreaGUID = null; + private List nestedSubjectAreaGUIDs = null; + private List associatedGovernanceDefinitions = null; + + + /** + * Default constructor + */ + public SubjectAreaElement() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public SubjectAreaElement(SubjectAreaElement template) + { + if (template != null) + { + elementHeader = template.getElementHeader(); + properties = template.getProperties(); + parentSubjectAreaGUID = template.getParentSubjectAreaGUID(); + nestedSubjectAreaGUIDs = template.getNestedSubjectAreaGUIDs(); + associatedGovernanceDefinitions = template.getAssociatedGovernanceDefinitions(); } + } + + + /** + * Return the element header associated with the properties. + * + * @return element header object + */ + public ElementHeader getElementHeader() + { + return elementHeader; + } + + + /** + * Set up the element header associated with the properties. + * + * @param elementHeader element header object + */ + public void setElementHeader(ElementHeader elementHeader) + { + this.elementHeader = elementHeader; + } + + + /** + * Return the properties of the subject area. + * + * @return properties bean + */ + public SubjectAreaProperties getProperties() + { + return properties; + } + + + /** + * Set up the properties of the subject area. + * + * @param properties properties bean + */ + public void setProperties(SubjectAreaProperties properties) + { + this.properties = properties; + } + + + /** + * Return the unique identifier of the subject area that this zone inherits governance definitions from. + * + * @return string guid + */ + public String getParentSubjectAreaGUID() + { + return parentSubjectAreaGUID; + } + + + /** + * Set up the unique identifier of the subject area that this zone inherits governance definitions from. + * + * @param parentSubjectAreaGUID string guid + */ + public void setParentSubjectAreaGUID(String parentSubjectAreaGUID) + { + this.parentSubjectAreaGUID = parentSubjectAreaGUID; + } + + + /** + * Return the list of unique identifiers of the subject areas that inherit governance definitions from this zone. + * + * @return list of string guids + */ + public List getNestedSubjectAreaGUIDs() + { + return nestedSubjectAreaGUIDs; + } + + + /** + * Set up the list of unique identifiers of the subject areas that inherit governance definitions from this zone. + * + * @param nestedSubjectAreaGUIDs list of string guids + */ + public void setNestedSubjectAreaGUIDs(List nestedSubjectAreaGUIDs) + { + this.nestedSubjectAreaGUIDs = nestedSubjectAreaGUIDs; + } + + + /** + * Return the list of the governance definitions that control assets in this zone. + * + * @return list of definitions + */ + public List getAssociatedGovernanceDefinitions() + { + return associatedGovernanceDefinitions; + } + + + /** + * Set up the list of the governance definitions that control assets in this zone. + * + * @param associatedGovernanceDefinitions list of definitions + */ + public void setAssociatedGovernanceDefinitions(List associatedGovernanceDefinitions) + { + this.associatedGovernanceDefinitions = associatedGovernanceDefinitions; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "SubjectAreaElement{" + + "elementHeader=" + elementHeader + + ", properties=" + properties + + ", parentSubjectAreaGUID='" + parentSubjectAreaGUID + '\'' + + ", nestedSubjectAreaGUIDs=" + nestedSubjectAreaGUIDs + + ", associatedGovernanceDefinitions=" + associatedGovernanceDefinitions + + '}'; + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (! (objectToCompare instanceof SubjectAreaElement)) + { + return false; + } + SubjectAreaElement that = (SubjectAreaElement) objectToCompare; + return Objects.equals(elementHeader, that.elementHeader) && + Objects.equals(properties, that.properties) && + Objects.equals(parentSubjectAreaGUID, that.parentSubjectAreaGUID) && + Objects.equals(nestedSubjectAreaGUIDs, that.nestedSubjectAreaGUIDs) && + Objects.equals(associatedGovernanceDefinitions, that.associatedGovernanceDefinitions); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elementHeader, properties); + } +} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/TabularColumnElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/TabularColumnElement.java similarity index 93% rename from open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/TabularColumnElement.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/TabularColumnElement.java index 72ab92cb3d2..3ee1e567950 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/TabularColumnElement.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/TabularColumnElement.java @@ -1,18 +1,18 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.properties.TabularColumnProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.tabular.TabularColumnProperties; import java.util.Objects; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; /** * TabularColumnElement contains the properties and header for a table column entity diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/TeamMembershipElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/TeamMembershipElement.java similarity index 96% rename from open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/TeamMembershipElement.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/TeamMembershipElement.java index 14f8b7788ce..6e7477c86c1 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/TeamMembershipElement.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/TeamMembershipElement.java @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -11,7 +11,6 @@ import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; /** * TeamMembershipElement contains the properties and header for a role that shows a person is a leader or a member of diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/TeamProfileElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/TeamProfileElement.java new file mode 100644 index 00000000000..509984d4350 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/TeamProfileElement.java @@ -0,0 +1,209 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.TeamProfileProperties; + +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * TeamProfileElement contains the properties and header for a team profile retrieved from the metadata repository. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class TeamProfileElement implements MetadataElement +{ + private ElementHeader elementHeader = null; + private TeamProfileProperties properties = null; + private ElementStub superTeam = null; + private List subTeams = null; + + /** + * Default constructor + */ + public TeamProfileElement() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public TeamProfileElement(TeamProfileElement template) + { + if (template != null) + { + elementHeader = template.getElementHeader(); + properties = template.getProperties(); + superTeam = template.getSuperTeam(); + subTeams = template.getSubTeams(); + } + } + + /** + * Return the element header associated with the properties. + * + * @return element header object + */ + @Override + public ElementHeader getElementHeader() + { + return elementHeader; + } + + + /** + * Set up the element header associated with the properties. + * + * @param elementHeader element header object + */ + @Override + public void setElementHeader(ElementHeader elementHeader) + { + this.elementHeader = elementHeader; + } + + + /** + * Return the properties from the team profile. + * + * @return properties + */ + public TeamProfileProperties getProperties() + { + return properties; + } + + + /** + * Set up the properties from the team profile. + * + * @param properties properties + */ + public void setProperties(TeamProfileProperties properties) + { + this.properties = properties; + } + + + /** + * Return the unique identifier (guid) of the team that this team reports to - null means top level team. + * + * @return description of linked profile + */ + public ElementStub getSuperTeam() + { + return superTeam; + } + + + /** + * Set up the unique identifier (guid) of the team that this team reports to - null means top level team. + * + * @param superTeam description of linked profile + */ + public void setSuperTeam(ElementStub superTeam) + { + this.superTeam = superTeam; + } + + + /** + * Return the list of unique identifiers (guids) for the teams that report to this team. + * + * @return list of descriptions of linked profiles + */ + public List getSubTeams() + { + if (subTeams == null) + { + return null; + } + else if (subTeams.isEmpty()) + { + return null; + } + else + { + return new ArrayList<>(subTeams); + } + } + + + /** + * Set up the list of unique identifiers (guids) for the teams that report to this team. + * + * @param subTeams list of descriptions of linked profiles + */ + public void setSubTeams(List subTeams) + { + this.subTeams = subTeams; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "TeamProfileElement{" + + "elementHeader=" + elementHeader + + ", properties=" + properties + + ", superTeam='" + superTeam + '\'' + + ", subTeams=" + subTeams + + '}'; + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + TeamProfileElement that = (TeamProfileElement) objectToCompare; + return Objects.equals(elementHeader, that.elementHeader) && + Objects.equals(properties, that.properties) && + Objects.equals(superTeam, that.superTeam) && + Objects.equals(subTeams, that.subTeams); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(elementHeader, properties, superTeam, subTeams); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ToDoActionTargetElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ToDoActionTargetElement.java new file mode 100644 index 00000000000..56be34b2586 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ToDoActionTargetElement.java @@ -0,0 +1,163 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actions.ToDoActionTargetProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * ToDoActionTargetElement describes an element that a person owning a "To Do" action should process. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ToDoActionTargetElement +{ + private ElementHeader relationshipHeader = null; + private ToDoActionTargetProperties relationshipProperties = null; + private MetadataElementSummary targetElement = null; + + + /** + * Typical Constructor + */ + public ToDoActionTargetElement() + { + } + + + /** + * Copy/clone Constructor the resulting object will return true if tested with this.equals(template) as + * long as the template object is not null; + * + * @param template object being copied + */ + public ToDoActionTargetElement(ToDoActionTargetElement template) + { + if (template != null) + { + relationshipHeader = template.getRelationshipHeader(); + relationshipProperties = template.getRelationshipProperties(); + targetElement = template.getTargetElement(); + } + } + + + /** + * Return the header of the ActionTarget relationship. + * + * @return header + */ + public ElementHeader getRelationshipHeader() + { + return relationshipHeader; + } + + + /** + * Set up the header of the ActionTarget relationship. + * + * @param relationshipHeader header + */ + public void setRelationshipHeader(ElementHeader relationshipHeader) + { + this.relationshipHeader = relationshipHeader; + } + + + /** + * Return the properties of the ActionTarget relationship. + * + * @return properties + */ + public ToDoActionTargetProperties getRelationshipProperties() + { + return relationshipProperties; + } + + + /** + * Set up the properties of the ActionTarget relationship. + * + * @param relationshipProperties properties + */ + public void setRelationshipProperties(ToDoActionTargetProperties relationshipProperties) + { + this.relationshipProperties = relationshipProperties; + } + + + /** + * Return details of the target element that the governance action service is to process. + * + * @return metadata element properties + */ + public MetadataElementSummary getTargetElement() + { + return targetElement; + } + + + /** + * Set up details of the target element that the governance action service is to process. + * + * @param targetElement metadata element properties + */ + public void setTargetElement(MetadataElementSummary targetElement) + { + this.targetElement = targetElement; + } + + + /** + * Standard toString method. + * + * @return print out of variables in a JSON-style + */ + @Override + public String toString() + { + return "ToDoActionTargetElement{" + + "relationshipGUID=" + relationshipHeader + + ", relationshipProperties=" + relationshipProperties + + ", targetElement=" + targetElement + + '}'; + } + + + /** + * Compare the values of the supplied object with those stored in the current object. + * + * @param objectToCompare supplied object + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) return true; + if (objectToCompare == null || getClass() != objectToCompare.getClass()) return false; + if (!super.equals(objectToCompare)) return false; + ToDoActionTargetElement that = (ToDoActionTargetElement) objectToCompare; + return Objects.equals(relationshipHeader, that.relationshipHeader) && + Objects.equals(relationshipProperties, that.relationshipProperties) && + Objects.equals(targetElement, that.targetElement); + } + + /** + * Create a hash code for this element type. + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), relationshipHeader, relationshipProperties, targetElement); + } +} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/ToDoElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ToDoElement.java similarity index 90% rename from open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/ToDoElement.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ToDoElement.java index 2ceb1eb9896..51d4f94c3b0 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/metadataelements/ToDoElement.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ToDoElement.java @@ -1,20 +1,18 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ToDoProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actions.ToDoProperties; import java.util.List; import java.util.Objects; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; /** * ToDoElement contains the properties and header for a "to do" (informal task) retrieved from the metadata repository. @@ -28,8 +26,8 @@ public class ToDoElement implements MetadataElement private ToDoProperties properties = null; private ElementStub toDoSource = null; private List assignedActors = null; - private List sponsors = null; - private List actionTargets = null; + private List sponsors = null; + private List actionTargets = null; /** * Default constructor @@ -176,7 +174,7 @@ public void setSponsors(List sponsors) * * @return list */ - public List getActionTargets() + public List getActionTargets() { return actionTargets; } @@ -187,7 +185,7 @@ public List getActionTargets() * * @param actionTargets list */ - public void setActionTargets(List actionTargets) + public void setActionTargets(List actionTargets) { this.actionTargets = actionTargets; } diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/TopicElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/TopicElement.java similarity index 93% rename from open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/TopicElement.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/TopicElement.java index bc0afd94435..8f87f237c5a 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/TopicElement.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/TopicElement.java @@ -1,13 +1,13 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.properties.TopicProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.topics.TopicProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; import java.util.Objects; diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/TopicSchemaElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/TopicSchemaElement.java similarity index 93% rename from open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/TopicSchemaElement.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/TopicSchemaElement.java index 149f9fff679..7382148c49a 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/TopicSchemaElement.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/TopicSchemaElement.java @@ -1,18 +1,18 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.properties.EventSchemaAttributeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.events.EventSchemaAttributeProperties; import java.util.Objects; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; /** * TopicSchemaElement contains the properties and header for a schema element entity retrieved from the metadata repository. diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/UserIdentityElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/UserIdentityElement.java new file mode 100644 index 00000000000..29f444f5d22 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/UserIdentityElement.java @@ -0,0 +1,147 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.UserIdentityProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * UserIdentityElement contains the properties and header for a user identity retrieved from the metadata repository. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class UserIdentityElement implements MetadataElement +{ + private ElementHeader elementHeader = null; + private UserIdentityProperties properties = null; + + + /** + * Default constructor + */ + public UserIdentityElement() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public UserIdentityElement(UserIdentityElement template) + { + if (template != null) + { + elementHeader = template.getElementHeader(); + properties = template.getProperties(); + } + } + + + /** + * Return the element header associated with the properties. + * + * @return element header object + */ + @Override + public ElementHeader getElementHeader() + { + return elementHeader; + } + + + /** + * Set up the element header associated with the properties. + * + * @param elementHeader element header object + */ + @Override + public void setElementHeader(ElementHeader elementHeader) + { + this.elementHeader = elementHeader; + } + + + /** + * Return the properties of the userId. + * + * @return properties + */ + public UserIdentityProperties getProperties() + { + return properties; + } + + + /** + * Set up the userId properties. + * + * @param properties properties + */ + public void setProperties(UserIdentityProperties properties) + { + this.properties = properties; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "UserIdentityElement{" + + "elementHeader=" + elementHeader + + ", properties=" + properties + + '}'; + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + UserIdentityElement that = (UserIdentityElement) objectToCompare; + return Objects.equals(elementHeader, that.elementHeader) && + Objects.equals(properties, that.properties); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elementHeader, properties); + } +} diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/metadataelements/ValidValueAssignmentConsumerElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ValidValueAssignmentConsumerElement.java similarity index 94% rename from open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/metadataelements/ValidValueAssignmentConsumerElement.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ValidValueAssignmentConsumerElement.java index d3f9951aa4d..c718e867380 100644 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/metadataelements/ValidValueAssignmentConsumerElement.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ValidValueAssignmentConsumerElement.java @@ -1,11 +1,11 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.digitalarchitecture.properties.ValidValueAssignmentProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues.ValidValueAssignmentProperties; import java.util.Objects; diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/metadataelements/ValidValueAssignmentDefinitionElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ValidValueAssignmentDefinitionElement.java similarity index 94% rename from open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/metadataelements/ValidValueAssignmentDefinitionElement.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ValidValueAssignmentDefinitionElement.java index ff0000fe1a3..f775f467f0d 100644 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/metadataelements/ValidValueAssignmentDefinitionElement.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ValidValueAssignmentDefinitionElement.java @@ -1,11 +1,11 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.digitalarchitecture.properties.ValidValueAssignmentProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues.ValidValueAssignmentProperties; import java.util.Objects; diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ValidValueElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ValidValueElement.java new file mode 100644 index 00000000000..d09fe41b35e --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ValidValueElement.java @@ -0,0 +1,226 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues.ValidValueProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * ValidValueElement contains the properties and header for a valid value definition or set entity retrieved from the metadata repository. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ValidValueElement implements MetadataElement +{ + private ElementHeader elementHeader = null; + private ValidValueProperties validValueProperties = null; + private String setGUID = null; + private boolean isDefaultValue = false; + private RelatedElement relatedElement = null; + + + /** + * Default constructor + */ + public ValidValueElement() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public ValidValueElement(ValidValueElement template) + { + if (template != null) + { + elementHeader = template.getElementHeader(); + validValueProperties = template.getValidValueProperties(); + setGUID = template.setGUID; + isDefaultValue = getIsDefaultValue(); + relatedElement = getRelatedElement(); + } + } + + + /** + * Return the element header associated with the properties. + * + * @return element header object + */ + @Override + public ElementHeader getElementHeader() + { + return elementHeader; + } + + + /** + * Set up the element header associated with the properties. + * + * @param elementHeader element header object + */ + @Override + public void setElementHeader(ElementHeader elementHeader) + { + this.elementHeader = elementHeader; + } + + + /** + * Return the properties for the valid value definition or set. + * + * @return properties bean + */ + public ValidValueProperties getValidValueProperties() + { + return validValueProperties; + } + + + /** + * Set up the properties for the valid value definition or set. + * + * @param validValueProperties properties bean + */ + public void setValidValueProperties(ValidValueProperties validValueProperties) + { + this.validValueProperties = validValueProperties; + } + + + /** + * Return the set unique identifier if the valid value is retrieved via a set. + * + * @return string identifier + */ + public String getSetGUID() + { + return setGUID; + } + + + /** + * Set up the set unique identifier if the valid value is retrieved via a set. + * + * @param setGUID string identifier + */ + public void setSetGUID(String setGUID) + { + this.setGUID = setGUID; + } + + + /** + * Return whether this valid value is the default of the setGUID (if supplied) + * @return flag + */ + public boolean getIsDefaultValue() + { + return isDefaultValue; + } + + + /** + * Set up whether this valid value is the default of the setGUID (if supplied). + * + * @param defaultValue flag + */ + public void setIsDefaultValue(boolean defaultValue) + { + isDefaultValue = defaultValue; + } + + + + /** + * Return information about the related element and relationship (if any) that was + * used to retrieve the valid value. + * + * @return related element + */ + public RelatedElement getRelatedElement() + { + return relatedElement; + } + + + /** + * Set up information about the related element and relationship (if any) that was + * used to retrieve the valid value. + * + * @param relatedElement related element + */ + public void setRelatedElement(RelatedElement relatedElement) + { + this.relatedElement = relatedElement; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "ValidValueElement{" + + "elementHeader=" + elementHeader + + ", validValueProperties=" + validValueProperties + + ", setGUID='" + setGUID + '\'' + + ", isDefaultValue=" + isDefaultValue + + ", relatedElement=" + relatedElement + + '}'; + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + ValidValueElement that = (ValidValueElement) objectToCompare; + return isDefaultValue == that.isDefaultValue && + Objects.equals(elementHeader, that.elementHeader) && + Objects.equals(validValueProperties, that.validValueProperties) && + Objects.equals(setGUID, that.setGUID) && + Objects.equals(relatedElement, that.relatedElement); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elementHeader, validValueProperties, setGUID, isDefaultValue); + } +} diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/metadataelements/ValidValueImplAssetElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ValidValueImplAssetElement.java similarity index 86% rename from open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/metadataelements/ValidValueImplAssetElement.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ValidValueImplAssetElement.java index 0539fc572d8..bef7316bfbd 100644 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/metadataelements/ValidValueImplAssetElement.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ValidValueImplAssetElement.java @@ -1,13 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.digitalarchitecture.properties.ValidValuesImplProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection; +import org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues.ValidValuesImplProperties; import java.util.List; import java.util.Objects; @@ -23,8 +22,8 @@ @JsonIgnoreProperties(ignoreUnknown=true) public class ValidValueImplAssetElement extends ValidValuesImplProperties { - private ReferenceDataAssetElement referenceDataAsset = null; - private List referenceDataConnections = null; + private AssetElement referenceDataAsset = null; + private List referenceDataConnections = null; /** @@ -57,7 +56,7 @@ public ValidValueImplAssetElement(ValidValueImplAssetElement template) * * @return properties of the asset */ - public ReferenceDataAssetElement getReferenceDataAsset() + public AssetElement getReferenceDataAsset() { return referenceDataAsset; } @@ -68,7 +67,7 @@ public ReferenceDataAssetElement getReferenceDataAsset() * * @param referenceDataAsset properties of the asset */ - public void setReferenceDataAsset(ReferenceDataAssetElement referenceDataAsset) + public void setReferenceDataAsset(AssetElement referenceDataAsset) { this.referenceDataAsset = referenceDataAsset; } @@ -79,7 +78,7 @@ public void setReferenceDataAsset(ReferenceDataAssetElement referenceDataAsset) * * @return Connection object */ - public List getReferenceDataConnections() + public List getReferenceDataConnections() { if (referenceDataConnections == null) { @@ -101,7 +100,7 @@ else if (referenceDataConnections.isEmpty()) * * @param connections Connection object list */ - public void setReferenceDataConnections(List connections) + public void setReferenceDataConnections(List connections) { this.referenceDataConnections = connections; } diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/metadataelements/ValidValueImplDefinitionElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ValidValueImplDefinitionElement.java similarity index 94% rename from open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/metadataelements/ValidValueImplDefinitionElement.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ValidValueImplDefinitionElement.java index 22d83241412..bc4fde17d69 100644 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/metadataelements/ValidValueImplDefinitionElement.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ValidValueImplDefinitionElement.java @@ -1,11 +1,11 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.digitalarchitecture.properties.ValidValuesImplProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues.ValidValuesImplProperties; import java.util.Objects; diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/metadataelements/ValidValueMappingElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ValidValueMappingElement.java similarity index 94% rename from open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/metadataelements/ValidValueMappingElement.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ValidValueMappingElement.java index 20b46043720..604f43b634f 100644 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/metadataelements/ValidValueMappingElement.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ValidValueMappingElement.java @@ -1,12 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.digitalarchitecture.properties.ValidValuesMappingProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues.ValidValuesMappingProperties; import java.util.Objects; diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/ValidValueSetElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ValidValueSetElement.java similarity index 93% rename from open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/ValidValueSetElement.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ValidValueSetElement.java index 171dee25577..d85e2cd8826 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/metadataelements/ValidValueSetElement.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ValidValueSetElement.java @@ -1,18 +1,17 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.datamanager.properties.ValidValueSetProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues.ValidValueSetProperties; import java.util.Objects; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; /** * ValidValueElement contains the properties and header for a valid value set entity retrieved from the metadata repository. diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/metadataelements/ValidValuesMappingElement.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ValidValuesMappingElement.java similarity index 95% rename from open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/metadataelements/ValidValuesMappingElement.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ValidValuesMappingElement.java index 373593c5f8c..7fb810e1114 100644 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/metadataelements/ValidValuesMappingElement.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ValidValuesMappingElement.java @@ -1,12 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.digitalarchitecture.properties.ValidValuesMappingProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues.ValidValuesMappingProperties; import java.util.List; import java.util.Objects; diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/ZoneMembers.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ZoneMembers.java similarity index 86% rename from open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/ZoneMembers.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ZoneMembers.java index 06673e9780d..77a34053db8 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/ZoneMembers.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/ZoneMembers.java @@ -1,8 +1,7 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.properties; +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.AssetElement; import java.util.Iterator; diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/package-info.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/package-info.java new file mode 100644 index 00000000000..71ede54a167 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/metadataelements/package-info.java @@ -0,0 +1,7 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +/** + * The metadata elements describe the way that metadata is returned from the repository. + */ +package org.odpi.openmetadata.frameworks.openmetadata.metadataelements; diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/ArchiveProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/ArchiveProperties.java new file mode 100644 index 00000000000..3183ba7323e --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/ArchiveProperties.java @@ -0,0 +1,185 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.openmetadata.properties; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import java.util.Date; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * ArchiveProperties defined the properties that are stored when a data source is archived or deleted. This + * allows the Asset to remain in the metadata repository after the real-world artifact has gone. This is important + * to prevent lineage graphs from becoming fragmented. + */ +@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public class ArchiveProperties +{ + private Date archiveDate = null; + private String archiveProcess = null; + private Map archiveProperties = null; + + + /** + * Default constructor + */ + public ArchiveProperties() + { + super(); + } + + + /** + * Copy/clone constructor for the template properties. + * + * @param template template object to copy. + */ + public ArchiveProperties(ArchiveProperties template) + { + if (template != null) + { + archiveDate = template.getArchiveDate(); + archiveProcess = template.getArchiveProcess(); + archiveProperties = template.getArchiveProperties(); + } + } + + + /** + * Returns the date when the data source was archived (or discovered missing). Null means "now". + * + * @return date of archive + */ + public Date getArchiveDate() + { + return archiveDate; + } + + + /** + * Set up the date when the data source was archived (or discovered missing). Null means "now". + * + * @param archiveDate date of archive + */ + public void setArchiveDate(Date archiveDate) + { + this.archiveDate = archiveDate; + } + + + /** + * Returns the name of the process that either performed the archive or detected the missing data source. + * + * @return String name + */ + public String getArchiveProcess() + { + return archiveProcess; + } + + + /** + * Set up the name of the process that either performed the archive or detected the missing data source. + * + * @param archiveProcess String name + */ + public void setArchiveProcess(String archiveProcess) + { + this.archiveProcess = archiveProcess; + } + + + /** + * Return the properties that characterize where the data source was archived to. + * + * @return map of name value pairs, all strings + */ + public Map getArchiveProperties() + { + if (archiveProperties == null) + { + return null; + } + else if (archiveProperties.isEmpty()) + { + return null; + } + else + { + return new HashMap<>(archiveProperties); + } + } + + + /** + * Set up the properties that characterize where the data source was archived to. + * + * @param archiveProperties map of name value pairs, all strings + */ + public void setArchiveProperties(Map archiveProperties) + { + this.archiveProperties = archiveProperties; + } + + + /** + * Standard toString method. + * + * @return print out of variables in a JSON-style + */ + @Override + public String toString() + { + return "ArchiveProperties{" + + "archiveDate=" + archiveDate + + ", archiveProcess='" + archiveProcess + '\'' + + ", archiveProperties='" + archiveProperties + + '}'; + } + + + /** + * Compare the values of the supplied object with those stored in the current object. + * + * @param objectToCompare supplied object + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + ArchiveProperties that = (ArchiveProperties) objectToCompare; + return Objects.equals(archiveDate, that.archiveDate) && + Objects.equals(archiveProcess, that.archiveProcess) && + Objects.equals(archiveProperties, that.archiveProperties); + } + + + /** + * Return hash code based on properties. + * + * @return int + */ + @Override + public int hashCode() + { + return Objects.hash(archiveDate, archiveProcess, archiveProperties); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/ClassificationProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/ClassificationProperties.java index bdbcebbbddc..11ede5ebc1f 100644 --- a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/ClassificationProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/ClassificationProperties.java @@ -2,9 +2,22 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.frameworks.openmetadata.properties; -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.AssetOriginProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.AssetProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.EndpointProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.digitalbusiness.DigitalProductProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.glossaries.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.locations.CyberLocationProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.locations.DigitalLocationProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.locations.FixedLocationProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.locations.SecureLocationProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.DataFieldValuesProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.PrimaryKeyProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.databases.DatabasePrimaryKeyProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.security.SecurityTagsProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities.SoftwareCapabilityProperties; import java.util.Date; import java.util.HashMap; @@ -21,6 +34,34 @@ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "class") +@JsonSubTypes( + { + @JsonSubTypes.Type(value = ActivityDescriptionProperties.class, name = "ActivityDescriptionProperties"), + @JsonSubTypes.Type(value = AssetOriginProperties.class, name = "AssetOriginProperties"), + @JsonSubTypes.Type(value = CanonicalVocabularyProperties.class, name = "CanonicalVocabularyProperties"), + @JsonSubTypes.Type(value = CyberLocationProperties.class, name = "CyberLocationProperties"), + @JsonSubTypes.Type(value = DatabasePrimaryKeyProperties.class, name = "DatabasePrimaryKeyProperties"), + @JsonSubTypes.Type(value = DataFieldValuesProperties.class, name = "DataFieldValuesProperties"), + @JsonSubTypes.Type(value = DigitalLocationProperties.class, name = "DigitalLocationProperties"), + @JsonSubTypes.Type(value = DigitalProductProperties.class, name = "DigitalProductProperties"), + @JsonSubTypes.Type(value = EditingGlossaryProperties.class, name = "EditingGlossaryProperties"), + @JsonSubTypes.Type(value = FixedLocationProperties.class, name = "FixedLocationProperties"), + @JsonSubTypes.Type(value = GlossaryTermContextDefinition.class, name = "GlossaryTermContextDefinition"), + @JsonSubTypes.Type(value = GovernanceClassificationBase.class, name = "GovernanceClassificationBase"), + @JsonSubTypes.Type(value = GovernanceMeasurementsDataSetProperties.class, name = "GovernanceMeasurementsDataSetProperties"), + @JsonSubTypes.Type(value = GovernanceMeasurementsProperties.class, name = "GovernanceMeasurementsProperties"), + @JsonSubTypes.Type(value = GovernanceExpectationsProperties.class, name = "GovernanceExpectationsProperties"), + @JsonSubTypes.Type(value = OwnerProperties.class, name = "OwnerProperties"), + @JsonSubTypes.Type(value = PrimaryKeyProperties.class, name = "PrimaryKeyProperties"), + @JsonSubTypes.Type(value = SecureLocationProperties.class, name = "SecureLocationProperties"), + @JsonSubTypes.Type(value = SecurityTagsProperties.class, name = "SecurityTagsProperties"), + @JsonSubTypes.Type(value = StagingGlossaryProperties.class, name = "StagingGlossaryProperties"), + @JsonSubTypes.Type(value = SubjectAreaClassificationProperties.class, name = "SubjectAreaClassificationProperties"), + @JsonSubTypes.Type(value = TaxonomyProperties.class, name = "TaxonomyProperties"), + }) public class ClassificationProperties { private Date effectiveFrom = null; diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/FindNameProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/FindNameProperties.java new file mode 100644 index 00000000000..9999fd9a3b3 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/FindNameProperties.java @@ -0,0 +1,124 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.properties; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * FindNameProperties is the request body structure used on OMAG REST API calls that passes a name that is used to retrieve + * an element by name. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class FindNameProperties extends FindProperties +{ + private String name = null; + + + /** + * Default constructor + */ + public FindNameProperties() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public FindNameProperties(FindNameProperties template) + { + super(template); + + if (template != null) + { + name = template.getName(); + } + } + + + /** + * Return the name for the query request. + * + * @return string name + */ + public String getName() + { + return name; + } + + + /** + * Set up the name for the query request. + * + * @param name string + */ + public void setName(String name) + { + this.name = name; + } + + + /** + * Standard toString method. + * + * @return print out of variables in a JSON-style + */ + @Override + public String toString() + { + return "FindNameProperties{" + + "name='" + name + '\'' + + '}'; + } + + + /** + * Compare the values of the supplied object with those stored in the current object. + * + * @param objectToCompare supplied object + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (! super.equals(objectToCompare)) + { + return false; + } + FindNameProperties that = (FindNameProperties) objectToCompare; + return Objects.equals(name, that.name); + } + + + /** + * Create a hash code for this element type. + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), name); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/FindProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/FindProperties.java new file mode 100644 index 00000000000..3f1315d5b06 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/FindProperties.java @@ -0,0 +1,61 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.properties; + +import com.fasterxml.jackson.annotation.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.FindAssetOriginProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.LevelIdentifierProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.DataFieldQueryProperties; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * FindProperties provides the base class for find by property requests. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "class") +@JsonSubTypes( + { + @JsonSubTypes.Type(value = LevelIdentifierProperties.class, name = "LevelIdentifierProperties"), + @JsonSubTypes.Type(value = DataFieldQueryProperties.class, name = "DataFieldQueryProperties"), + @JsonSubTypes.Type(value = FindNameProperties.class, name = "FindNameProperties"), + @JsonSubTypes.Type(value = FindAssetOriginProperties.class, name = "FindAssetOriginProperties"), + }) +public class FindProperties +{ + /** + * Default constructor + */ + public FindProperties() + { + super(); + } + + + /** + * Copy/clone constructor. Retrieve values from the supplied template + * + * @param template element to copy + */ + public FindProperties(FindProperties template) + { + + } + + + /** + * Standard toString method. + * + * @return print out of variables in a JSON-style + */ + @Override + public String toString() + { + return "FindProperties{}"; + } +} \ No newline at end of file diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/ReferenceableProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/ReferenceableProperties.java index 5340fcc4b47..0e924a11801 100644 --- a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/ReferenceableProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/ReferenceableProperties.java @@ -7,13 +7,42 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actions.ToDoProperties; import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.ActorProfileProperties; import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.ContributionRecord; import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.UserIdentityProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.processes.PortProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.collections.CollectionProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.communities.CommunityProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.communities.NoteLogEntryProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.communities.NoteLogHeaderProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.ConnectionProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.ConnectorTypeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.EndpointProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.digitalbusiness.AgreementProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.digitalbusiness.BusinessCapabilityProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.digitalbusiness.DigitalServiceProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.externalreferences.ExternalReferenceProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.feedback.CommentProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.feedback.FeedbackProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.feedback.NoteLogProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.feedback.NoteProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.glossaries.GlossaryCategoryProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.glossaries.GlossaryProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.glossaries.GlossaryTermProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.glossaries.MeaningProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.locations.LocationProperties; import org.odpi.openmetadata.frameworks.openmetadata.properties.projects.ProjectProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.SchemaElementProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.databases.DatabaseSchemaTypeProperties; import org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities.MetadataSourceProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities.SecurityManagerProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities.SoftwareCapabilityProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.solutions.SolutionComponentProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues.ValidValueProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues.ValidValueSetProperties; -import java.util.HashMap; import java.util.Map; import java.util.Objects; @@ -33,10 +62,47 @@ @JsonSubTypes( { @JsonSubTypes.Type(value = ActorProfileProperties.class, name = "ActorProfileProperties"), + @JsonSubTypes.Type(value = AgreementProperties.class, name = "AgreementProperties"), + @JsonSubTypes.Type(value = BusinessCapabilityProperties.class, name = "BusinessCapabilityProperties"), + @JsonSubTypes.Type(value = CollectionProperties.class, name = "CollectionProperties"), + @JsonSubTypes.Type(value = CommentProperties.class, name = "CommentProperties"), + @JsonSubTypes.Type(value = CommunityProperties.class, name = "CommunityProperties"), + @JsonSubTypes.Type(value = ConnectionProperties.class, name = "ConnectionProperties"), + @JsonSubTypes.Type(value = ConnectorTypeProperties.class, name = "ConnectorTypeProperties"), @JsonSubTypes.Type(value = ContributionRecord.class, name = "ContributionRecord"), + @JsonSubTypes.Type(value = DatabaseSchemaTypeProperties.class, name = "DatabaseSchemaTypeProperties"), + @JsonSubTypes.Type(value = DigitalServiceProperties.class, name = "DigitalServiceProperties"), + @JsonSubTypes.Type(value = ExecutionPointProperties.class, name = "ExecutionPointProperties"), + @JsonSubTypes.Type(value = ExternalReferenceProperties.class, name = "ExternalReferenceProperties"), + @JsonSubTypes.Type(value = GlossaryProperties.class, name = "GlossaryProperties"), + @JsonSubTypes.Type(value = GlossaryCategoryProperties.class, name = "GlossaryCategoryProperties"), + @JsonSubTypes.Type(value = GlossaryTermProperties.class, name = "GlossaryTermProperties"), + @JsonSubTypes.Type(value = GovernanceDomainProperties.class, name = "GovernanceDomainProperties"), + @JsonSubTypes.Type(value = GovernanceDomainSetProperties.class, name = "GovernanceDomainSetProperties"), + @JsonSubTypes.Type(value = GovernanceLevelIdentifierProperties.class, name = "GovernanceLevelIdentifierProperties"), + @JsonSubTypes.Type(value = GovernanceLevelIdentifierSetProperties.class, name = "GovernanceLevelIdentifierSetProperties"), + @JsonSubTypes.Type(value = GovernanceStatusIdentifierProperties.class, name = "GovernanceStatusIdentifierProperties"), + @JsonSubTypes.Type(value = GovernanceStatusIdentifierSetProperties.class, name = "GovernanceStatusIdentifierSetProperties"), + @JsonSubTypes.Type(value = GovernanceMetricProperties.class, name = "GovernanceMetricProperties"), + @JsonSubTypes.Type(value = GovernanceZoneProperties.class, name = "GovernanceZoneProperties"), + @JsonSubTypes.Type(value = LocationProperties.class, name = "LocationProperties"), + @JsonSubTypes.Type(value = MeaningProperties.class, name = "MeaningProperties"), @JsonSubTypes.Type(value = MetadataSourceProperties.class, name = "MetadataSourceProperties"), + @JsonSubTypes.Type(value = NoteProperties.class, name = "NoteProperties"), + @JsonSubTypes.Type(value = NoteLogEntryProperties.class, name = "NoteLogEntryProperties"), + @JsonSubTypes.Type(value = NoteLogHeaderProperties.class, name = "NoteLogHeaderProperties"), + @JsonSubTypes.Type(value = NoteLogProperties.class, name = "NoteLogProperties"), + @JsonSubTypes.Type(value = PortProperties.class, name = "PortProperties"), @JsonSubTypes.Type(value = ProjectProperties.class, name = "ProjectProperties"), + @JsonSubTypes.Type(value = SchemaElementProperties.class, name = "SchemaElementProperties"), + @JsonSubTypes.Type(value = SecurityManagerProperties.class, name = "SecurityManagerProperties"), + @JsonSubTypes.Type(value = SolutionComponentProperties.class, name = "SolutionComponentProperties"), + @JsonSubTypes.Type(value = SubjectAreaProperties.class, name = "SubjectAreaProperties"), + @JsonSubTypes.Type(value = ToDoProperties.class, name = "ToDoProperties"), @JsonSubTypes.Type(value = UserIdentityProperties.class, name = "UserIdentityProperties"), + @JsonSubTypes.Type(value = SupplementaryProperties.class, name = "SupplementaryProperties"), + @JsonSubTypes.Type(value = ValidValueProperties.class, name = "ValidValueProperties"), + @JsonSubTypes.Type(value = ValidValueSetProperties.class, name = "ValidValueSetProperties"), }) public class ReferenceableProperties extends OpenMetadataRootProperties { diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/RelationshipProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/RelationshipProperties.java index 401353d5db4..baf0bf4140d 100644 --- a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/RelationshipProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/RelationshipProperties.java @@ -8,13 +8,45 @@ import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.AssignmentScopeProperties; -import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.ProfileLocationProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.PeerDefinitionProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.ProfileIdentityProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.AssetConnectionProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.DataContentForDataSetProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.infrastructure.DeploymentProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.infrastructure.PlatformDeploymentProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.infrastructure.ServerAssetUseProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.processes.ProcessContainmentProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.collections.CollectionMembershipProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.communities.CommunityMembershipProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.EmbeddedConnectionProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.digitalbusiness.DigitalServiceDependencyProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.digitalbusiness.DigitalServiceOperatorProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.digitalbusiness.DigitalSupportProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.digitalbusiness.OrganizationalCapabilityProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.externalreferences.ExternalReferenceLinkProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.feedback.FeedbackProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.glossaries.ExternalGlossaryElementLinkProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.glossaries.GlossaryTermCategorization; +import org.odpi.openmetadata.frameworks.openmetadata.properties.glossaries.GlossaryTermRelationship; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.lineage.ControlFlowProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.lineage.DataFlowProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.lineage.LineageMappingProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.lineage.ProcessCallProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.locations.AdjacentLocationProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.locations.AssetLocationProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.locations.NestedLocationProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.locations.ProfileLocationProperties; import org.odpi.openmetadata.frameworks.openmetadata.properties.projects.ProjectTeamProperties; import org.odpi.openmetadata.frameworks.openmetadata.properties.projects.StakeholderProperties; import org.odpi.openmetadata.frameworks.openmetadata.properties.resources.ResourceListProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.ForeignKeyProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.SchemaAttributeRelationshipProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.databases.DatabaseForeignKeyProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities.CapabilityDeploymentProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues.*; import java.util.Date; -import java.util.HashMap; import java.util.Map; import java.util.Objects; @@ -33,11 +65,55 @@ property = "class") @JsonSubTypes( { - @JsonSubTypes.Type(value = ResourceListProperties.class, name = "ResourceListProperties"), + @JsonSubTypes.Type(value = AdjacentLocationProperties.class, name = "AdjacentLocationProperties"), + @JsonSubTypes.Type(value = AssetConnectionProperties.class, name = "AssetConnectionProperties"), + @JsonSubTypes.Type(value = AssetLocationProperties.class, name = "AssetLocationProperties"), @JsonSubTypes.Type(value = AssignmentScopeProperties.class, name = "AssignmentScopeProperties"), - @JsonSubTypes.Type(value = StakeholderProperties.class, name = "StakeholderProperties"), + @JsonSubTypes.Type(value = CapabilityDeploymentProperties.class, name = "CapabilityDeploymentProperties"), + @JsonSubTypes.Type(value = CertificationProperties.class, name = "CertificationProperties"), + @JsonSubTypes.Type(value = CollectionMembershipProperties.class, name = "CollectionMembershipProperties"), + @JsonSubTypes.Type(value = CommunityMembershipProperties.class, name = "CommunityMembershipProperties"), + @JsonSubTypes.Type(value = ControlFlowProperties.class, name = "ControlFlowProperties"), + @JsonSubTypes.Type(value = DataContentForDataSetProperties.class, name = "DataContentForDataSetProperties"), + @JsonSubTypes.Type(value = DatabaseForeignKeyProperties.class, name = "DatabaseForeignKeyProperties"), + @JsonSubTypes.Type(value = DataFlowProperties.class, name = "DataFlowProperties"), + @JsonSubTypes.Type(value = DeploymentProperties.class, name = "DeploymentProperties"), + @JsonSubTypes.Type(value = DigitalServiceDependencyProperties.class, name = "DigitalServiceDependencyProperties"), + @JsonSubTypes.Type(value = DigitalServiceOperatorProperties.class, name = "DigitalServiceOperatorProperties"), + @JsonSubTypes.Type(value = DigitalSupportProperties.class, name = "DigitalSupportProperties"), + @JsonSubTypes.Type(value = DuplicateProperties.class, name = "DuplicateProperties"), + @JsonSubTypes.Type(value = EmbeddedConnectionProperties.class, name = "EmbeddedConnectionProperties"), + @JsonSubTypes.Type(value = ExternalGlossaryElementLinkProperties.class, name = "ExternalGlossaryElementLinkProperties"), + @JsonSubTypes.Type(value = ExternalReferenceLinkProperties.class, name = "ExternalReferenceLinkProperties"), + @JsonSubTypes.Type(value = FeedbackProperties.class, name = "FeedbackProperties"), + @JsonSubTypes.Type(value = ForeignKeyProperties.class, name = "ForeignKeyProperties"), + @JsonSubTypes.Type(value = GlossaryTermCategorization.class, name = "GlossaryTermCategorization"), + @JsonSubTypes.Type(value = GlossaryTermRelationship.class, name = "GlossaryTermRelationship"), + @JsonSubTypes.Type(value = GovernanceDefinitionMetricProperties.class, name = "GovernanceDefinitionMetricProperties"), + @JsonSubTypes.Type(value = GovernanceResultsProperties.class, name = "GovernanceResultsProperties"), + @JsonSubTypes.Type(value = LicenseProperties.class, name = "LicenseProperties"), + @JsonSubTypes.Type(value = LineageMappingProperties.class, name = "LineageMappingProperties"), + @JsonSubTypes.Type(value = NestedLocationProperties.class, name = "NestedLocationProperties"), + @JsonSubTypes.Type(value = OrganizationalCapabilityProperties.class, name = "OrganizationalCapabilityProperties"), + @JsonSubTypes.Type(value = PeerDefinitionProperties.class, name = "PeerDefinitionProperties"), + @JsonSubTypes.Type(value = PlatformDeploymentProperties.class, name = "PlatformDeploymentProperties"), + @JsonSubTypes.Type(value = ProcessCallProperties.class, name = "ProcessCallProperties"), + @JsonSubTypes.Type(value = ProcessContainmentProperties.class, name = "ProcessContainmentProperties"), + @JsonSubTypes.Type(value = ProfileIdentityProperties.class, name = "ProfileIdentityProperties"), @JsonSubTypes.Type(value = ProfileLocationProperties.class, name = "ProfileLocationProperties"), @JsonSubTypes.Type(value = ProjectTeamProperties.class, name = "ProjectTeamProperties"), + @JsonSubTypes.Type(value = ReferenceValueAssignmentProperties.class, name = "ReferenceValueAssignmentProperties"), + @JsonSubTypes.Type(value = ResourceListProperties.class, name = "ResourceListProperties"), + @JsonSubTypes.Type(value = SchemaAttributeRelationshipProperties.class, name = "SchemaAttributeRelationshipProperties"), + @JsonSubTypes.Type(value = SemanticAssignmentProperties.class, name = "SemanticAssignmentProperties"), + @JsonSubTypes.Type(value = StakeholderProperties.class, name = "StakeholderProperties"), + @JsonSubTypes.Type(value = ServerAssetUseProperties.class, name = "ServerAssetUseProperties"), + @JsonSubTypes.Type(value = SupportingDefinitionProperties.class, name = "SupportingDefinitionProperties"), + @JsonSubTypes.Type(value = ValidValueAssignmentProperties.class, name = "ValidValueAssignmentProperties"), + @JsonSubTypes.Type(value = ValidValueMembershipProperties.class, name = "ValidValueMembershipProperties"), + @JsonSubTypes.Type(value = ValidValuesImplProperties.class, name = "ValidValuesImplProperties"), + @JsonSubTypes.Type(value = ValidValuesMappingProperties.class, name = "ValidValuesMappingProperties"), + }) public class RelationshipProperties { diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/SupplementaryProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/SupplementaryProperties.java new file mode 100644 index 00000000000..1816e8ff5e5 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/SupplementaryProperties.java @@ -0,0 +1,240 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.openmetadata.properties; + +import com.fasterxml.jackson.annotation.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.AssetProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.EndpointProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities.SoftwareCapabilityProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * SupplementaryProperties describe additional information about a technical element (typically assets and schemas) + * that has been added as part of a governance process. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "class") +@JsonSubTypes( + { + @JsonSubTypes.Type(value = AssetProperties.class, name = "AssetProperties"), + @JsonSubTypes.Type(value = EndpointProperties.class, name = "EndpointProperties"), + @JsonSubTypes.Type(value = SoftwareCapabilityProperties.class, name = "SoftwareCapabilityProperties"), + }) +public class SupplementaryProperties extends ReferenceableProperties +{ + private String displayName = null; + private String displaySummary = null; + private String displayDescription = null; + private String abbreviation = null; + private String usage = null; + + + /** + * Default constructor + */ + public SupplementaryProperties() + { + } + + + /** + * Copy/clone constructor. Note, this is a deep copy + * + * @param template object to copy + */ + public SupplementaryProperties(SupplementaryProperties template) + { + super(template); + + if (template != null) + { + displayName = template.getDisplayName(); + displaySummary = template.getDisplaySummary(); + displayDescription = template.getDisplayDescription(); + abbreviation = template.getAbbreviation(); + usage = template.getUsage(); + } + } + + + /** + * Returns the stored display name property for the technical element. + * If no display name is available then null is returned. + * + * @return String name + */ + public String getDisplayName() + { + return displayName; + } + + + /** + * Set up the stored display name property for the technical element. + * + * @param resourceName String name + */ + public void setDisplayName(String resourceName) + { + this.displayName = resourceName; + } + + + /** + * Return the short (1-2 sentence) description of the technical element. + * + * @return string text + */ + public String getDisplaySummary() + { + return displaySummary; + } + + + /** + * Set up the short (1-2 sentence) description of the technical element. + * + * @param displaySummary string text + */ + public void setDisplaySummary(String displaySummary) + { + this.displaySummary = displaySummary; + } + + + /** + * Returns the stored description property for the technical element. + * If no description is provided then null is returned. + * + * @return String text + */ + public String getDisplayDescription() + { + return displayDescription; + } + + + /** + * Set up the stored description property for the technical element. + * + * @param resourceDescription String text + */ + public void setDisplayDescription(String resourceDescription) + { + this.displayDescription = resourceDescription; + } + + + /** + * Return the abbreviation used for this technical element. + * + * @return string text + */ + public String getAbbreviation() + { + return abbreviation; + } + + + /** + * Set up the abbreviation used for this technical element. + * + * @param abbreviation string text + */ + public void setAbbreviation(String abbreviation) + { + this.abbreviation = abbreviation; + } + + + /** + * Return details of the expected usage of this technical element. + * + * @return string text + */ + public String getUsage() + { + return usage; + } + + + /** + * Set up details of the expected usage of this technical element. + * + * @param usage string text + */ + public void setUsage(String usage) + { + this.usage = usage; + } + + + /** + * Standard toString method. + * + * @return print out of variables in a JSON-style + */ + @Override + public String toString() + { + return "SupplementaryProperties{" + + "displayName='" + displayName + '\'' + + ", displaySummary='" + displaySummary + '\'' + + ", displayDescription='" + displayDescription + '\'' + + ", abbreviation='" + abbreviation + '\'' + + ", usage='" + usage + '\'' + + "} " + super.toString(); + } + + + /** + * Compare the values of the supplied object with those stored in the current object. + * + * @param objectToCompare supplied object + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + SupplementaryProperties that = (SupplementaryProperties) objectToCompare; + return Objects.equals(getDisplayName(), that.getDisplayName()) && + Objects.equals(getDisplaySummary(), that.getDisplaySummary()) && + Objects.equals(getDisplayDescription(), that.getDisplayDescription()) && + Objects.equals(getAbbreviation(), that.getAbbreviation()) && + Objects.equals(getUsage(), that.getUsage()); + } + + + + /** + * Return hash code based on properties. + * + * @return int + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), getDisplayName(), getDisplaySummary(), getDisplayDescription(), getAbbreviation(), getUsage()); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/actions/NewToDoActionTargetProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/actions/NewToDoActionTargetProperties.java new file mode 100644 index 00000000000..c71e4c1f7c9 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/actions/NewToDoActionTargetProperties.java @@ -0,0 +1,143 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.actions; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * NewActionTarget identifies an element that a governance action service should process. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class NewToDoActionTargetProperties +{ + private String actionTargetName = null; + private String actionTargetGUID = null; + + + /** + * Typical Constructor + */ + public NewToDoActionTargetProperties() + { + } + + + /** + * Copy/clone Constructor the resulting object will return true if tested with this.equals(template) as + * long as the template object is not null; + * + * @param template object being copied + */ + public NewToDoActionTargetProperties(NewToDoActionTargetProperties template) + { + if (template != null) + { + actionTargetName = template.getActionTargetName(); + actionTargetGUID = template.getActionTargetGUID(); + } + } + + + /** + * Return the name assigned to this action target. This name helps to guide the governance service in its processing of this action target. + * + * @return string name + */ + public String getActionTargetName() + { + return actionTargetName; + } + + + /** + * Set up the name assigned to this action target. This name helps to guide the governance service in its processing of this action target. + * + * @param actionTargetName string name + */ + public void setActionTargetName(String actionTargetName) + { + this.actionTargetName = actionTargetName; + } + + + /** + * Return the unique identifier for this action target. + * + * @return string identifier + */ + public String getActionTargetGUID() + { + return actionTargetGUID; + } + + + /** + * Set up the unique identifier for this action target. + * + * @param actionTargetGUID string identifier + */ + public void setActionTargetGUID(String actionTargetGUID) + { + this.actionTargetGUID = actionTargetGUID; + } + + + /** + * Standard toString method. + * + * @return print out of variables in a JSON-style + */ + @Override + public String toString() + { + return "NewActionTarget{" + + "actionTargetName='" + actionTargetName + '\'' + + ", actionTargetGUID='" + actionTargetGUID + '\'' + + '}'; + } + + + /** + * Compare the values of the supplied object with those stored in the current object. + * + * @param objectToCompare supplied object + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + NewToDoActionTargetProperties that = (NewToDoActionTargetProperties) objectToCompare; + return Objects.equals(actionTargetName, that.actionTargetName) && + Objects.equals(actionTargetGUID, that.actionTargetGUID); + } + + + + /** + * Create a hash code for this element type. + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(actionTargetName, actionTargetGUID); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/actions/ToDoActionTargetProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/actions/ToDoActionTargetProperties.java new file mode 100644 index 00000000000..a14ffeb5019 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/actions/ToDoActionTargetProperties.java @@ -0,0 +1,218 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.openmetadata.properties.actions; + +import org.odpi.openmetadata.frameworks.openmetadata.enums.ToDoStatus; + +import java.util.Date; +import java.util.Objects; + +public class ToDoActionTargetProperties +{ + private String actionTargetName = null; + private ToDoStatus status = null; + private Date startDate = null; + private Date completionDate = null; + private String completionMessage = null; + + + /** + * Typical Constructor + */ + public ToDoActionTargetProperties() + { + } + + + /** + * Copy/clone Constructor the resulting object will return true if tested with this.equals(template) as + * long as the template object is not null; + * + * @param template object being copied + */ + public ToDoActionTargetProperties(ToDoActionTargetProperties template) + { + if (template != null) + { + actionTargetName = template.getActionTargetName(); + status = template.getStatus(); + startDate = template.getStartDate(); + completionDate = template.getCompletionDate(); + completionMessage = template.getCompletionMessage(); + } + } + + + /** + * Return the name assigned to this action target. This name helps to guide the governance service in its processing of this action target. + * + * @return string name + */ + public String getActionTargetName() + { + return actionTargetName; + } + + + /** + * Set up the name assigned to this action target. This name helps to guide the governance service in its processing of this action target. + * + * @param actionTargetName string name + */ + public void setActionTargetName(String actionTargetName) + { + this.actionTargetName = actionTargetName; + } + + + /** + * Return the current status of the action target. The default value is the status is derived from + * the engine action. However, if it has to process many target elements, then these values can + * be used to show progress. + * + * @return status enum + */ + public ToDoStatus getStatus() + { + return status; + } + + + /** + * Set up current status of the action target. The default value is the status is derived from + * the "To Do". However, if the assigned person has to process many target elements, then these values can + * be used to show progress. + * + * @param status enum + */ + public void setStatus(ToDoStatus status) + { + this.status = status; + } + + + /** + * Return the date/time when the governance action service started processing this target element. By default, + * this value is derived from the startDate for the governance action service. However, if it has to process many target elements, then these values can + * be used to show progress. + * + * @return date object + */ + public Date getStartDate() + { + return startDate; + } + + + /** + * Set up the date/time when the governance action service started processing this target element. By default, + * this value is derived from the startDate for the governance action service. However, if it has to process many target + * elements, then these values can be used to show progress. + * + * @param startDate date object + */ + public void setStartDate(Date startDate) + { + this.startDate = startDate; + } + + + /** + * Return the date/time when the governance action service stopped processing this target element. By default, + * this value is derived from the completionDate for the governance action service. However, if it has to process + * many target elements, then these values can be used to show progress. + * + * @return date object + */ + public Date getCompletionDate() + { + return completionDate; + } + + + /** + * Set up the date/time when the governance action service stopped processing this target element. By default, + * this value is derived from the completionDate for the governance action service. However, if it has to process + * many target elements, then these values can be used to show progress. + * + * @param completionDate date object + */ + public void setCompletionDate(Date completionDate) + { + this.completionDate = completionDate; + } + + + /** + * Return the optional message from the running governance service supplied on its completion. + * + * @return string message + */ + public String getCompletionMessage() + { + return completionMessage; + } + + + /** + * Set up optional message from the running governance service supplied on its completion. + * + * @param completionMessage string message + */ + public void setCompletionMessage(String completionMessage) + { + this.completionMessage = completionMessage; + } + + + + /** + * Standard toString method. + * + * @return print out of variables in a JSON-style + */ + @Override + public String toString() + { + return "ToDoActionTargetProperties{" + + "actionTargetName='" + actionTargetName + '\'' + + ", status=" + status + + ", startDate=" + startDate + + ", completionDate=" + completionDate + + ", completionMessage='" + completionMessage + '\'' + + "} " + super.toString(); + } + + /** + * Compare the values of the supplied object with those stored in the current object. + * + * @param objectToCompare supplied object + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) return true; + if (objectToCompare == null || getClass() != objectToCompare.getClass()) return false; + if (!super.equals(objectToCompare)) return false; + ToDoActionTargetProperties that = (ToDoActionTargetProperties) objectToCompare; + return status == that.status && + Objects.equals(actionTargetName, that.actionTargetName) && + Objects.equals(startDate, that.startDate) && + Objects.equals(completionDate, that.completionDate) && + Objects.equals(completionMessage, that.completionMessage); + } + + /** + * Create a hash code for this element type. + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(actionTargetName, status, startDate, completionDate, completionMessage); + } + +} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/ToDoProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/actions/ToDoProperties.java similarity index 98% rename from open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/ToDoProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/actions/ToDoProperties.java index 0e53c3242eb..dcdce3bcc78 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/ToDoProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/actions/ToDoProperties.java @@ -1,11 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.actions; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import org.odpi.openmetadata.frameworks.openmetadata.enums.ToDoStatus; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ReferenceableProperties; import java.util.*; diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/actions/package-info.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/actions/package-info.java new file mode 100644 index 00000000000..3dae7375732 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/actions/package-info.java @@ -0,0 +1,8 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +/** + * These beans cover todos (actions for people), governance actions (automated governance action types and processes) + * and incident reporting. + */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.actions; \ No newline at end of file diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/actors/AppointmentProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/actors/AppointmentProperties.java new file mode 100644 index 00000000000..2c59b089bf4 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/actors/AppointmentProperties.java @@ -0,0 +1,170 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.actors; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import java.util.Date; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * ExternalSourceRequestBody carries the parameters for marking an asset or schema as external. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class AppointmentProperties +{ + private Date effectiveFrom = null; + private Date effectiveTo = null; + private boolean isPublic = false; + + + /** + * Default constructor + */ + public AppointmentProperties() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public AppointmentProperties(AppointmentProperties template) + { + if (template != null) + { + effectiveFrom = template.getEffectiveFrom(); + effectiveTo = template.getEffectiveTo(); + isPublic = template.getIsPublic(); + } + } + + + /** + * Return the date/time that this element is effective from (null means effective from the epoch). + * + * @return date object + */ + public Date getEffectiveFrom() + { + return effectiveFrom; + } + + + /** + * Set up the date/time that this element is effective from (null means effective from the epoch). + * + * @param effectiveFrom date object + */ + public void setEffectiveFrom(Date effectiveFrom) + { + this.effectiveFrom = effectiveFrom; + } + + + /** + * Return the date/time that element is effective to (null means that it is effective indefinitely into the future). + * + * @return date object + */ + public Date getEffectiveTo() + { + return effectiveTo; + } + + + /** + * Set the date/time that element is effective to (null means that it is effective indefinitely into the future). + * + * @param effectiveTo date object + */ + public void setEffectiveTo(Date effectiveTo) + { + this.effectiveTo = effectiveTo; + } + + + /** + * Return if the contents of this profile be shared with colleagues. + * + * @return flag + */ + public boolean getIsPublic() + { + return isPublic; + } + + + /** + * Set up if the contents of this profile be shared with colleagues. + * + * @param isPublic flag + */ + public void setIsPublic(boolean isPublic) + { + this.isPublic = isPublic; + } + + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "AppointmentProperties{" + + "effectiveFrom=" + effectiveFrom + + ", effectiveTo=" + effectiveTo + + ", isPublic=" + isPublic + + '}'; + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + AppointmentProperties that = (AppointmentProperties) objectToCompare; + return isPublic == that.isPublic && + Objects.equals(effectiveFrom, that.effectiveFrom) && + Objects.equals(effectiveTo, that.effectiveTo); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), effectiveFrom, effectiveTo, isPublic); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/actors/ITProfileProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/actors/ITProfileProperties.java new file mode 100644 index 00000000000..ba248f98712 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/actors/ITProfileProperties.java @@ -0,0 +1,59 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.actors; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * The ITProfileProperties describes a automated agent that is taking governance action. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ITProfileProperties extends ActorProfileProperties +{ + /** + * Default Constructor + */ + public ITProfileProperties() + { + super(); + } + + + /** + * Copy/clone Constructor - the resulting object. + * + * @param template object being copied + */ + public ITProfileProperties(ITProfileProperties template) + { + super (template); + } + + + /** + * JSON-style toString. + * + * @return list of properties and their values. + */ + @Override + public String toString() + { + return "ITProfileProperties{" + + "knownName='" + getKnownName() + '\'' + + ", description='" + getDescription() + '\'' + + ", qualifiedName='" + getQualifiedName() + '\'' + + ", additionalProperties=" + getAdditionalProperties() + + ", vendorProperties=" + getVendorProperties() + + ", typeName='" + getTypeName() + '\'' + + ", extendedProperties=" + getExtendedProperties() + + '}'; + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/actors/OrganizationProfileProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/actors/OrganizationProfileProperties.java new file mode 100644 index 00000000000..018b5f63cb2 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/actors/OrganizationProfileProperties.java @@ -0,0 +1,51 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.actors; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * OrganizationProfileProperties describes a top-level team in an organization. It adds no attributes, but is a marker for + * the top of a departmental structure. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class OrganizationProfileProperties extends TeamProfileProperties +{ + /** + * Default constructor + */ + public OrganizationProfileProperties() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public OrganizationProfileProperties(OrganizationProfileProperties template) + { + super(template); + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "OrganizationProfileProperties{} " + super.toString(); + } +} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/PeerDefinitionProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/actors/PeerDefinitionProperties.java similarity index 95% rename from open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/PeerDefinitionProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/actors/PeerDefinitionProperties.java index 23fffe41a99..06cc32ccf48 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/PeerDefinitionProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/actors/PeerDefinitionProperties.java @@ -1,11 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.actors; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; import java.util.Objects; diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/actors/PersonalMessage.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/actors/PersonalMessage.java new file mode 100644 index 00000000000..f203fbe0acb --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/actors/PersonalMessage.java @@ -0,0 +1,50 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.actors; + + +import com.fasterxml.jackson.annotation.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.feedback.CommentProperties; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * Personal message is a comment added to a personal profile. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class PersonalMessage extends CommentProperties +{ + /** + * Default constructor + */ + public PersonalMessage() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public PersonalMessage(PersonalMessage template) + { + super(template); + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "PersonalMessage{} " + super.toString(); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/actors/PersonalNote.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/actors/PersonalNote.java new file mode 100644 index 00000000000..1e47cca0022 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/actors/PersonalNote.java @@ -0,0 +1,50 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.actors; + + +import com.fasterxml.jackson.annotation.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.communities.NoteLogEntryProperties; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * PersonalNote is used to add a personal note to a personal profile. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class PersonalNote extends NoteLogEntryProperties +{ + /** + * Default constructor + */ + public PersonalNote() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public PersonalNote(PersonalNote template) + { + super(template); + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "PersonalNote{} " + super.toString(); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/actors/PersonalNoteLog.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/actors/PersonalNoteLog.java new file mode 100644 index 00000000000..08705a69b69 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/actors/PersonalNoteLog.java @@ -0,0 +1,52 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.actors; + + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.communities.NoteLogHeaderProperties; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * PersonalNoteLog is used to maintain the list of personal notes for a personal profile. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class PersonalNoteLog extends NoteLogHeaderProperties +{ + /** + * Default constructor + */ + public PersonalNoteLog() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public PersonalNoteLog(PersonalNoteLog template) + { + super(template); + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "PersonalNoteLog{} " + super.toString(); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/actors/PersonalProfileProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/actors/PersonalProfileProperties.java new file mode 100644 index 00000000000..d8d37344a5c --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/actors/PersonalProfileProperties.java @@ -0,0 +1,385 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.actors; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import java.util.*; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * The PersonalProfileProperties describes an individual. Information about the + * personal profile is stored as an Person entity in the metadata repository. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class PersonalProfileProperties extends ActorProfileProperties +{ + private String title = null; + private String initials = null; + private String givenNames = null; + private String surname = null; + private String fullName = null; + private String pronouns = null; + private String jobTitle = null; + private String employeeNumber = null; + private String employeeType = null; + private String preferredLanguage = null; + + private boolean isPublic = false; + + + + /** + * Default Constructor + */ + public PersonalProfileProperties() + { + super(); + } + + + /** + * Copy/clone Constructor - the resulting object. + * + * @param template object being copied + */ + public PersonalProfileProperties(PersonalProfileProperties template) + { + super (template); + + if (template != null) + { + this.fullName = template.getFullName(); + this.jobTitle = template.getJobTitle(); + this.title = template.getTitle(); + this.initials = template.getInitials(); + this.givenNames = template.getGivenNames(); + this.surname = template.getSurname(); + this.employeeNumber = template.getEmployeeNumber(); + this.employeeType = template.getEmployeeType(); + this.preferredLanguage = template.getPreferredLanguage(); + this.isPublic = template.getIsPublic(); + } + } + + + /** + * Return the full legal name for this person. + * + * @return string name + */ + public String getFullName() + { + return fullName; + } + + + /** + * Set up the full legal name for this person. + * + * @param fullName string name + */ + public void setFullName(String fullName) + { + this.fullName = fullName; + } + + + /** + * Return the person's preferred pronouns. + * + * @return string + */ + public String getPronouns() + { + return pronouns; + } + + + /** + * Set up the person's preferred pronouns. + * + * @param pronouns string + */ + public void setPronouns(String pronouns) + { + this.pronouns = pronouns; + } + + + /** + * Return the primary job title for this person. + * + * @return string title + */ + public String getJobTitle() + { + return jobTitle; + } + + + /** + * Set up the primary job title for this person. + * + * @param jobTitle string title + */ + public void setJobTitle(String jobTitle) + { + this.jobTitle = jobTitle; + } + + + /** + * Return the courtesy title for the person. + * + * @return string + */ + public String getTitle() + { + return title; + } + + + /** + * Set up the courtesy title for the person. + * + * @param title string + */ + public void setTitle(String title) + { + this.title = title; + } + + + /** + * Return first letter of each of the person's given names. + * + * @return string + */ + public String getInitials() + { + return initials; + } + + + /** + * Set up first letter of each of the person's given names. + * + * @param initials string + */ + public void setInitials(String initials) + { + this.initials = initials; + } + + + /** + * Return the name strings that are the part of a person's name that is not their surname. + * + * @return space separated list of names + */ + public String getGivenNames() + { + return givenNames; + } + + + /** + * Set up the name strings that are the part of a person's name that is not their surname. + * + * @param givenNames space separated list of names + */ + public void setGivenNames(String givenNames) + { + this.givenNames = givenNames; + } + + + /** + * Return the family name of the person. + * + * @return string + */ + public String getSurname() + { + return surname; + } + + + /** + * Set up the family name of the person. + * + * @param surname string + */ + public void setSurname(String surname) + { + this.surname = surname; + } + + + /** + * Return the unique identifier of the person used by their employer. + * + * @return string + */ + public String getEmployeeNumber() + { + return employeeNumber; + } + + + /** + * Set up the unique identifier of the person used by their employer. + * + * @param employeeNumber string + */ + public void setEmployeeNumber(String employeeNumber) + { + this.employeeNumber = employeeNumber; + } + + + /** + * Return code used by employer typically to describe the type of employment contract. + * + * @return string + */ + public String getEmployeeType() + { + return employeeType; + } + + + /** + * Set up code used by employer typically to describe the type of employment contract. + * + * @param employeeType string + */ + public void setEmployeeType(String employeeType) + { + this.employeeType = employeeType; + } + + + /** + * Return spoken or written language preferred by the person. + * + * @return string + */ + public String getPreferredLanguage() + { + return preferredLanguage; + } + + + /** + * Set up spoken or written language preferred by the person. + * + * @param preferredLanguage string + */ + public void setPreferredLanguage(String preferredLanguage) + { + this.preferredLanguage = preferredLanguage; + } + + + /** + * Return if the contents of this profile is to be shared with colleagues. + * + * @return flag + */ + public boolean getIsPublic() + { + return isPublic; + } + + + /** + * Set up if the contents of this profile is to be shared with colleagues. + * + * @param isPublic flag + */ + public void setIsPublic(boolean isPublic) + { + this.isPublic = isPublic; + } + + + /** + * JSON-style toString. + * + * @return list of properties and their values. + */ + @Override + public String toString() + { + return "PersonalProfileProperties{" + + "title='" + title + '\'' + + ", initials='" + initials + '\'' + + ", givenNames='" + givenNames + '\'' + + ", surname='" + surname + '\'' + + ", fullName='" + fullName + '\'' + + ", pronouns='" + pronouns + '\'' + + ", jobTitle='" + jobTitle + '\'' + + ", employeeNumber='" + employeeNumber + '\'' + + ", employeeType='" + employeeType + '\'' + + ", preferredLanguage='" + preferredLanguage + '\'' + + ", isPublic=" + isPublic + + "} " + super.toString(); + } + + + /** + * Equals method that returns true if containing properties are the same. + * + * @param objectToCompare object to compare + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (! super.equals(objectToCompare)) + { + return false; + } + PersonalProfileProperties that = (PersonalProfileProperties) objectToCompare; + return isPublic == that.isPublic && + Objects.equals(fullName, that.fullName) && + Objects.equals(jobTitle, that.jobTitle) && + Objects.equals(title, that.title) && + Objects.equals(initials, that.initials) && + Objects.equals(givenNames, that.givenNames) && + Objects.equals(surname, that.surname) && + Objects.equals(employeeNumber, that.employeeNumber) && + Objects.equals(employeeType, that.employeeType) && + Objects.equals(preferredLanguage, that.preferredLanguage); + } + + + /** + * Just use the GUID for the hash code as it should be unique. + * + * @return int code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), fullName, jobTitle, title, initials, givenNames, surname, employeeNumber, employeeType, + preferredLanguage, isPublic); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/actors/ProfileIdentityProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/actors/ProfileIdentityProperties.java index a544e81929c..45097d9faed 100644 --- a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/actors/ProfileIdentityProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/actors/ProfileIdentityProperties.java @@ -5,6 +5,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; import java.util.Objects; @@ -18,7 +19,7 @@ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) -public class ProfileIdentityProperties +public class ProfileIdentityProperties extends RelationshipProperties { private String roleTypeName = null; private String roleGUID = null; diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/actors/ProfileLocationProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/actors/ProfileLocationProperties.java deleted file mode 100644 index a89929c5871..00000000000 --- a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/actors/ProfileLocationProperties.java +++ /dev/null @@ -1,127 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.frameworks.openmetadata.properties.actors; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * ProfileLocationProperties describes the properties for the ProfileLocation relationship between a profile - * and a location. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ProfileLocationProperties extends RelationshipProperties -{ - private String associationType = null; - - - /** - * Default constructor - */ - public ProfileLocationProperties() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ProfileLocationProperties(ProfileLocationProperties template) - { - super(template); - - if (template != null) - { - associationType = template.getAssociationType(); - } - } - - - /** - * Return the type of the association. - * - * @return string - */ - public String getAssociationType() - { - return associationType; - } - - - /** - * Set up the type of the association. - * - * @param associationType string - */ - public void setAssociationType(String associationType) - { - this.associationType = associationType; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "ProfileLocationProperties{" + - "associationType='" + associationType + '\'' + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - ProfileLocationProperties that = (ProfileLocationProperties) objectToCompare; - return Objects.equals(associationType, that.associationType); - } - - - /** - * Hash code for this object - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), associationType); - } -} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/actors/TeamProfileProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/actors/TeamProfileProperties.java new file mode 100644 index 00000000000..79d2c298a3c --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/actors/TeamProfileProperties.java @@ -0,0 +1,155 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.actors; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * The TeamProfileProperties describes an team of people. Information about the + * team is stored as a Team entity in the metadata repository. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class TeamProfileProperties extends ActorProfileProperties +{ + private String teamType = null; + private String identifier = null; + + + /** + * Default Constructor + */ + public TeamProfileProperties() + { + super(); + } + + + /** + * Copy/clone Constructor - the resulting object. + * + * @param template object being copied + */ + public TeamProfileProperties(TeamProfileProperties template) + { + super (template); + + if (template != null) + { + this.teamType = template.getTeamType(); + } + } + + + /** + * Return the type of team. + * + * @return string name + */ + public String getTeamType() + { + return teamType; + } + + + /** + * Set up the type of team. + * + * @param teamType string name + */ + public void setTeamType(String teamType) + { + this.teamType = teamType; + } + + + /** + * Return the code that uniquely identifies the team. + * + * @return string code + */ + public String getIdentifier() + { + return identifier; + } + + + /** + * Set up the code that uniquely identifies the team. + * + * @param identifier string code + */ + public void setIdentifier(String identifier) + { + this.identifier = identifier; + } + + + /** + * JSON-style toString. + * + * @return list of properties and their values. + */ + @Override + public String toString() + { + return "TeamProfileProperties{" + + "teamType='" + teamType + '\'' + + ", knownName='" + getKnownName() + '\'' + + ", description='" + getDescription() + '\'' + + ", qualifiedName='" + getQualifiedName() + '\'' + + ", additionalProperties=" + getAdditionalProperties() + + ", effectiveFrom=" + getEffectiveFrom() + + ", effectiveTo=" + getEffectiveTo() + + ", typeName='" + getTypeName() + '\'' + + ", extendedProperties=" + getExtendedProperties() + + '}'; + } + + + /** + * Equals method that returns true if containing properties are the same. + * + * @param objectToCompare object to compare + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + TeamProfileProperties that = (TeamProfileProperties) objectToCompare; + return Objects.equals(teamType, that.teamType); + } + + + /** + * Just use the GUID for the hash code as it should be unique. + * + * @return int code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), teamType); + } +} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/AssetConnectionProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/AssetConnectionProperties.java similarity index 95% rename from open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/AssetConnectionProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/AssetConnectionProperties.java index 33eda63ffd7..29920b8f42f 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/AssetConnectionProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/AssetConnectionProperties.java @@ -1,11 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetmanager.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.assets; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; import java.util.Objects; diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/AssetOriginProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/AssetOriginProperties.java similarity index 96% rename from open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/AssetOriginProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/AssetOriginProperties.java index f0046f2cbd4..2db52862ca4 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/AssetOriginProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/AssetOriginProperties.java @@ -1,11 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetmanager.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.assets; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ClassificationProperties; import java.util.HashMap; import java.util.Map; diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/AssetProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/AssetProperties.java new file mode 100644 index 00000000000..c80d7f8d8f6 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/AssetProperties.java @@ -0,0 +1,261 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.assets; + +import com.fasterxml.jackson.annotation.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.SupplementaryProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.apis.APIProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.infrastructure.ITInfrastructureProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.processes.ProcessProperties; + +import java.util.*; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * AssetProperties holds asset properties that are used for displaying details of + * an asset in summary lists or hover text. It includes the following properties: + *
            + *
          • type - metadata type information for the asset
          • + *
          • guid - globally unique identifier for the asset
          • + *
          • url - external link for the asset
          • + *
          • qualifiedName - The official (unique) name for the asset. This is often defined by the IT systems + * management organization and should be used (when available) on audit logs and error messages. + * (qualifiedName from Referenceable - model 0010)
          • + *
          • displayName - A consumable name for the asset. Often a shortened form of the assetQualifiedName + * for use on user interfaces and messages. The assetDisplayName should only be used for audit logs and error + * messages if the assetQualifiedName is not set. (Sourced from attribute name within Asset - model 0010)
          • + *
          • shortDescription - short description about the asset. + * (Sourced from assetSummary within ConnectionsToAsset - model 0205)
          • + *
          • description - full description of the asset. + * (Sourced from attribute description within Asset - model 0010)
          • + *
          • classifications - list of all classifications assigned to the asset
          • + *
          • extendedProperties - list of properties assigned to the asset from the Asset subclasses
          • + *
          • additionalProperties - list of properties assigned to the asset as additional properties
          • + *
          + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "class") +@JsonSubTypes({ + @JsonSubTypes.Type(value = APIProperties.class, name = "APIProperties"), + @JsonSubTypes.Type(value = DataAssetProperties.class, name = "DataAssetProperties"), + @JsonSubTypes.Type(value = ProcessProperties.class, name = "ProcessProperties"), + @JsonSubTypes.Type(value = ITInfrastructureProperties.class, name = "ITInfrastructureProperties"), +}) +public class AssetProperties extends SupplementaryProperties +{ + private String name = null; + private String resourceName = null; + private String versionIdentifier = null; + private String resourceDescription = null; + private String deployedImplementationType = null; + + + /** + * Default constructor + */ + public AssetProperties() + { + } + + + /** + * Copy/clone constructor. Note, this is a deep copy + * + * @param template object to copy + */ + public AssetProperties(AssetProperties template) + { + super(template); + + if (template != null) + { + name = template.getName(); + versionIdentifier = template.getVersionIdentifier(); + resourceDescription = template.getResourceDescription(); + deployedImplementationType = template.getDeployedImplementationType(); + } + } + + + /** + * Convert this object into an AssetProperties object. This involves packing the properties introduced at this level + * into the extended properties. + * + * @param subTypeName subtype name + * @return asset properties + */ + public AssetProperties cloneToAsset(String subTypeName) + { + AssetProperties clone = new AssetProperties(this); + + if (clone.getTypeName() == null) + { + clone.setTypeName(subTypeName); + } + + return clone; + } + + + /** + * Return the name of the resource that this asset represents. + * + * @return string resource name + */ + public String getName() + { + if (name == null) + { + return resourceName; + } + + return name; + } + + + /** + * Set up the name of the resource that this asset represents. + * + * @param name string resource name + */ + public void setName(String name) + { + this.name = name; + } + + + public String getResourceName() + { + return resourceName; + } + + public void setResourceName(String resourceName) + { + this.resourceName = resourceName; + } + + + /** + * Set up the version identifier of the resource. + * + * @return string version name + */ + public String getVersionIdentifier() + { + return versionIdentifier; + } + + + /** + * Set up the version identifier of the resource. + * + * @param versionIdentifier string version name + */ + public void setVersionIdentifier(String versionIdentifier) + { + this.versionIdentifier = versionIdentifier; + } + + + /** + * Returns the stored description property for the asset. + * If no description is provided then null is returned. + * + * @return description String text + */ + public String getResourceDescription() + { + return resourceDescription; + } + + + /** + * Set up the stored description property associated with the asset. + * + * @param resourceDescription String text + */ + public void setResourceDescription(String resourceDescription) + { + this.resourceDescription = resourceDescription; + } + + + + /** + * Retrieve the name of the technology used for this data asset. + * + * @return string name + */ + public String getDeployedImplementationType() + { + return deployedImplementationType; + } + + + /** + * Set up the name of the technology used for this data asset. + * + * @param deployedImplementationType string name + */ + public void setDeployedImplementationType(String deployedImplementationType) + { + this.deployedImplementationType = deployedImplementationType; + } + + + /** + * Standard toString method. + * + * @return print out of variables in a JSON-style + */ + @Override + public String toString() + { + return "AssetProperties{" + + "name='" + name + '\'' + + ", resourceName='" + resourceName + '\'' + + ", versionIdentifier='" + versionIdentifier + '\'' + + ", description='" + resourceDescription + '\'' + + ", deployedImplementationType='" + deployedImplementationType + '\'' + + "} " + super.toString(); + } + + + /** + * Compare the values of the supplied object with those stored in the current object. + * + * @param objectToCompare supplied object + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) return true; + if (objectToCompare == null || getClass() != objectToCompare.getClass()) return false; + if (!super.equals(objectToCompare)) return false; + AssetProperties that = (AssetProperties) objectToCompare; + return Objects.equals(name, that.name) && + Objects.equals(versionIdentifier, that.versionIdentifier) && + Objects.equals(resourceName, that.resourceName) && + Objects.equals(resourceDescription, that.deployedImplementationType) && + Objects.equals(resourceDescription, that.resourceDescription); + } + + /** + * Return hash code based on properties. + * + * @return int + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), name, resourceName, versionIdentifier, resourceDescription, deployedImplementationType); + } +} \ No newline at end of file diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/DataAssetProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/DataAssetProperties.java new file mode 100644 index 00000000000..be6e378763b --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/DataAssetProperties.java @@ -0,0 +1,87 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.openmetadata.properties.assets; + +import com.fasterxml.jackson.annotation.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.databases.DatabaseProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.filesandfolders.DataFileProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.filesandfolders.FileFolderProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.filesandfolders.FileProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.filesandfolders.FolderProperties; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * DataAssetProperties is a java bean used to create assets associated with the IT Infrastructure. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "class") +@JsonSubTypes({ + @JsonSubTypes.Type(value = DataStoreProperties.class, name = "DataStoreProperties"), + @JsonSubTypes.Type(value = DataSetProperties.class, name = "DataSetProperties"), + + +}) +public class DataAssetProperties extends AssetProperties +{ + /** + * Default constructor + */ + public DataAssetProperties() + { + } + + + /** + * Copy/clone constructor. Note, this is a deep copy + * + * @param template object to copy + */ + public DataAssetProperties(DataAssetProperties template) + { + super(template); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public DataAssetProperties(AssetProperties template) + { + super(template); + } + + + /** + * Convert this object into an AssetProperties object. This involves packing the properties introduced at this level + * into the extended properties. + * + * @return asset properties + */ + public AssetProperties cloneToAsset() + { + return super.cloneToAsset("Asset"); + } + + + /** + * Standard toString method. + * + * @return print out of variables in a JSON-style + */ + @Override + public String toString() + { + return "DataAssetProperties{} " + super.toString(); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/DataContentForDataSetProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/DataContentForDataSetProperties.java new file mode 100644 index 00000000000..a4b8ee54f4f --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/DataContentForDataSetProperties.java @@ -0,0 +1,146 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.assets; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * DataContentForDataSetProperties defines a query on an asset that returns all or part of the values for a dataset. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class DataContentForDataSetProperties extends RelationshipProperties +{ + private String queryId = null; + private String query = null; + + + + /** + * Default constructor + */ + public DataContentForDataSetProperties() + { + super(); + } + + + /** + * Copy/clone constructor. + * + * @param template template to copy. + */ + public DataContentForDataSetProperties(DataContentForDataSetProperties template) + { + super(template); + + if (template != null) + { + queryId = template.getQueryId(); + query = template.getQuery(); + } + } + + + /** + * Return the query id - this is used to identify where the results of this query should be plugged into + * the other queries or the formula for the parent derived schema element. + * + * @return String query identifier + */ + public String getQueryId() { return queryId; } + + + /** + * Set up the query id - this is used to identify where the results of this query should be plugged into + * the other queries or the formula for the parent derived schema element. + * + * @param queryId String query identifier + */ + public void setQueryId(String queryId) + { + this.queryId = queryId; + } + + + /** + * Return the query string for this element. The query string may have placeholders for values returned + * by queries that have a lower queryId than this element. + * + * @return String query + */ + public String getQuery() { return query; } + + + /** + * Set up the query string for this element. The query string may have placeholders for values returned + * by queries that have a lower queryId than this element. + * + * @param query String query + */ + public void setQuery(String query) + { + this.query = query; + } + + + /** + * Standard toString method. + * + * @return print out of variables in a JSON-style + */ + @Override + public String toString() + { + return "DataContentForDataSetProperties{" + + "queryId='" + queryId + '\'' + + ", query='" + query + '\'' + + ", effectiveFrom=" + getEffectiveFrom() + + ", effectiveTo=" + getEffectiveTo() + + '}'; + } + + + /** + * Compare the values of the supplied object with those stored in the current object. + * + * @param objectToCompare supplied object + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof DataContentForDataSetProperties)) + { + return false; + } + DataContentForDataSetProperties that = (DataContentForDataSetProperties) objectToCompare; + return Objects.equals(getQueryId(), that.getQueryId()) && + Objects.equals(getQuery(), that.getQuery()); + } + + + /** + * Create a hash code for this element type. + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(getQueryId(), getQuery()); + } +} \ No newline at end of file diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/DataSetProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/DataSetProperties.java new file mode 100644 index 00000000000..5b9ce184c35 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/DataSetProperties.java @@ -0,0 +1,66 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.openmetadata.properties.assets; + +import com.fasterxml.jackson.annotation.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.databases.DatabaseSchemaProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.display.FormProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.display.QueryProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.display.ReportProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.topics.TopicProperties; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * DataSetProperties is a class for representing a generic data set. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "class") +@JsonSubTypes( + { + @JsonSubTypes.Type(value = DatabaseSchemaProperties.class, name = "DatabaseSchemaProperties"), + @JsonSubTypes.Type(value = FormProperties.class, name = "FormProperties"), + @JsonSubTypes.Type(value = ReportProperties.class, name = "ReportProperties"), + @JsonSubTypes.Type(value = QueryProperties.class, name = "QueryProperties"), + @JsonSubTypes.Type(value = TopicProperties.class, name = "TopicProperties"), + }) +public class DataSetProperties extends DataAssetProperties +{ + /** + * Default constructor + */ + public DataSetProperties() + { + super(); + } + + + /** + * Copy/clone constructor. + * + * @param template object to copy + */ + public DataSetProperties(DataSetProperties template) + { + super(template); + } + + + /** + * Standard toString method. + * + * @return print out of variables in a JSON-style + */ + + @Override + public String toString() + { + return "DataSetProperties{} " + super.toString(); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/DataStoreProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/DataStoreProperties.java new file mode 100644 index 00000000000..c9d5a5a0e94 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/DataStoreProperties.java @@ -0,0 +1,353 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.assets; + +import com.fasterxml.jackson.annotation.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.databases.DatabaseProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.filesandfolders.DataFileProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.filesandfolders.FileFolderProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.filesandfolders.FileProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.filesandfolders.FolderProperties; + +import java.util.Date; +import java.util.Map; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * DataStoreProperties provides the JavaBean for describing a data store. This is a physical store of data. + * It is saved in the catalog as an asset. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "class") +@JsonSubTypes({ + @JsonSubTypes.Type(value = DataFileProperties.class, name = "DataFileProperties"), + @JsonSubTypes.Type(value = DatabaseProperties.class, name = "DatabaseProperties"), + @JsonSubTypes.Type(value = FileProperties.class, name = "FileProperties"), + @JsonSubTypes.Type(value = FileFolderProperties.class, name = "FileFolderProperties"), + @JsonSubTypes.Type(value = FolderProperties.class, name = "FolderProperties"), + + }) +public class DataStoreProperties extends DataAssetProperties +{ + private String deployedImplementationType = null; + private String pathName = null; + private Date createTime = null; + private Date modifiedTime = null; + private String encodingType = null; + private String encodingLanguage = null; + private String encodingDescription = null; + private Map encodingProperties = null; + + + /** + * Default constructor + */ + public DataStoreProperties() + { + super(); + } + + + /** + * Copy/clone constructor. + * + * @param template object to copy + */ + public DataStoreProperties(DataStoreProperties template) + { + super(template); + + if (template != null) + { + pathName = template.getPathName(); + createTime = template.getCreateTime(); + modifiedTime = template.getModifiedTime(); + encodingType = template.getEncodingType(); + encodingLanguage = template.getEncodingLanguage(); + encodingDescription = template.getEncodingDescription(); + encodingProperties = template.getEncodingProperties(); + deployedImplementationType = template.getDeployedImplementationType(); + } + } + + + /** + * Copy/clone constructor. + * + * @param template object to copy + */ + public DataStoreProperties(AssetProperties template) + { + super(template); + } + + + /** + * Return the fully qualified physical location of the data store. This should be suitable for the + * network address of the Endpoint. + * + * @return string name + */ + public String getPathName() + { + return pathName; + } + + + /** + * Set up the fully qualified physical location of the data store. This should be suitable for the + * network address of the Endpoint. + * + * @param pathName string name + */ + public void setPathName(String pathName) + { + this.pathName = pathName; + } + + + /** + * Return the time that the data store was created. + * + * @return date + */ + public Date getCreateTime() + { + return createTime; + } + + + /** + * Set up the time that the data store was created. + * + * @param createTime date + */ + public void setCreateTime(Date createTime) + { + this.createTime = createTime; + } + + + /** + * Return the last known time the data store was modified. + * + * @return date + */ + public Date getModifiedTime() + { + return modifiedTime; + } + + + /** + * Setup the last known time the data store was modified. + * + * @param modifiedTime date + */ + public void setModifiedTime(Date modifiedTime) + { + this.modifiedTime = modifiedTime; + } + + + /** + * Return the name of the encoding style used in the data store. + * + * @return string name + */ + public String getEncodingType() + { + return encodingType; + } + + + /** + * Set up the name of the encoding style used in the data store. + * + * @param encodingType string name + */ + public void setEncodingType(String encodingType) + { + this.encodingType = encodingType; + } + + + /** + * Return the name of the natural language used for text strings within the data store. + * + * @return string language name + */ + public String getEncodingLanguage() + { + return encodingLanguage; + } + + + /** + * Set up the name of the natural language used for text strings within the data store. + * + * @param encodingLanguage string language name + */ + public void setEncodingLanguage(String encodingLanguage) + { + this.encodingLanguage = encodingLanguage; + } + + + /** + * Return the description of the encoding used in the data store. + * + * @return string text + */ + public String getEncodingDescription() + { + return encodingDescription; + } + + + /** + * Set up the description of the encoding used in the data store. + * + * @param encodingDescription string text + */ + public void setEncodingDescription(String encodingDescription) + { + this.encodingDescription = encodingDescription; + } + + + /** + * Return the additional properties associated with the encoding process. + * + * @return map of name-value pairs + */ + public Map getEncodingProperties() + { + if (encodingProperties == null) + { + return null; + } + else if (encodingProperties.isEmpty()) + { + return null; + } + return encodingProperties; + } + + + /** + * Set up the additional properties associated with the encoding process. + * + * @param encodingProperties map of name-value pairs + */ + public void setEncodingProperties(Map encodingProperties) + { + this.encodingProperties = encodingProperties; + } + + + /** + * Retrieve the name of the technology used for this data asset. + * + * @return string name + */ + public String getDeployedImplementationType() + { + return deployedImplementationType; + } + + + /** + * Set up the name of the technology used for this data asset. + * + * @param deployedImplementationType string name + */ + public void setDeployedImplementationType(String deployedImplementationType) + { + this.deployedImplementationType = deployedImplementationType; + } + + + /** + * Standard toString method. + * + * @return print out of variables in a JSON-style + */ + @SuppressWarnings(value = "deprecation") + @Override + public String toString() + { + return "DataStoreProperties{" + + "name='" + getName() + '\'' + + ", versionIdentifier='" + getVersionIdentifier() + '\'' + + ", displayName='" + getDisplayName() + '\'' + + ", description='" + getResourceDescription() + '\'' + + ", pathName='" + pathName + '\'' + + ", createTime=" + createTime + + ", modifiedTime=" + modifiedTime + + ", encodingType='" + encodingType + '\'' + + ", encodingLanguage='" + encodingLanguage + '\'' + + ", encodingDescription='" + encodingDescription + '\'' + + ", encodingProperties=" + encodingProperties + + ", deployedImplementationType='" + deployedImplementationType + '\'' + + ", typeName='" + getTypeName() + '\'' + + ", qualifiedName='" + getQualifiedName() + '\'' + + ", additionalProperties=" + getAdditionalProperties() + + ", extendedProperties=" + getExtendedProperties() + + '}'; + } + + + /** + * Compare the values of the supplied object with those stored in the current object. + * + * @param objectToCompare supplied object + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + DataStoreProperties that = (DataStoreProperties) objectToCompare; + return Objects.equals(pathName, that.pathName) && + Objects.equals(createTime, that.createTime) && + Objects.equals(modifiedTime, that.modifiedTime) && + Objects.equals(deployedImplementationType, that.deployedImplementationType) && + Objects.equals(encodingType, that.encodingType) && + Objects.equals(encodingLanguage, that.encodingLanguage) && + Objects.equals(encodingDescription, that.encodingDescription) && + Objects.equals(encodingProperties, that.encodingProperties); + } + + + /** + * Return hash code based on properties. + * + * @return int + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), pathName, createTime, modifiedTime, deployedImplementationType, encodingType, + encodingLanguage, encodingDescription, encodingProperties); + } +} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/APIProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/apis/APIProperties.java similarity index 87% rename from open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/APIProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/apis/APIProperties.java index 83a2369a59d..522324be9fc 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/APIProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/apis/APIProperties.java @@ -1,9 +1,10 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.assets.apis; import com.fasterxml.jackson.annotation.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.AssetProperties; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/apis/package-info.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/apis/package-info.java new file mode 100644 index 00000000000..d179c921e15 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/apis/package-info.java @@ -0,0 +1,7 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +/** + * Beans to describe APIs. + */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.assets.apis; \ No newline at end of file diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/DatabaseProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/databases/DatabaseProperties.java similarity index 96% rename from open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/DatabaseProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/databases/DatabaseProperties.java index 63bb88eb79a..c31bbe0a00c 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/DatabaseProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/databases/DatabaseProperties.java @@ -1,9 +1,10 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.assets.databases; import com.fasterxml.jackson.annotation.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.DataStoreProperties; import java.util.Objects; diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/databases/DatabaseSchemaProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/databases/DatabaseSchemaProperties.java new file mode 100644 index 00000000000..d959cdfd106 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/databases/DatabaseSchemaProperties.java @@ -0,0 +1,50 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.openmetadata.properties.assets.databases; + +import com.fasterxml.jackson.annotation.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.DataSetProperties; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * DatabaseSchemaProperties is a class for representing the top level database schema. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class DatabaseSchemaProperties extends DataSetProperties +{ + /** + * Default constructor + */ + public DatabaseSchemaProperties() + { + super(); + } + + + /** + * Copy/clone constructor. + * + * @param template object to copy + */ + public DatabaseSchemaProperties(DatabaseSchemaProperties template) + { + super(template); + } + + + /** + * Standard toString method. + * + * @return print out of variables in a JSON-style + */ + @Override + public String toString() + { + return "DatabaseSchemaProperties{} " + super.toString(); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/databases/package-info.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/databases/package-info.java new file mode 100644 index 00000000000..1dacda53dd3 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/databases/package-info.java @@ -0,0 +1,7 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +/** + * Beans to describe relational databases. + */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.assets.databases; \ No newline at end of file diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/display/FormProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/display/FormProperties.java new file mode 100644 index 00000000000..75e9756ec48 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/display/FormProperties.java @@ -0,0 +1,52 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.openmetadata.properties.assets.display; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.DataSetProperties; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * FormProperties is a class for representing a display of data fields for a user to supply data values. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class FormProperties extends DataSetProperties +{ + /** + * Default constructor + */ + public FormProperties() + { + super(); + } + + + /** + * Copy/clone constructor. + * + * @param template object to copy + */ + public FormProperties(FormProperties template) + { + super(template); + } + + + /** + * Standard toString method. + * + * @return print out of variables in a JSON-style + */ + @Override + public String toString() + { + return "FormProperties{} " + super.toString(); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/display/QueryProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/display/QueryProperties.java new file mode 100644 index 00000000000..329613cede0 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/display/QueryProperties.java @@ -0,0 +1,52 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.openmetadata.properties.assets.display; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.DataSetProperties; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * QueryProperties is a class for representing a query that supports the access of data for a report or form. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class QueryProperties extends DataSetProperties +{ + /** + * Default constructor + */ + public QueryProperties() + { + super(); + } + + + /** + * Copy/clone constructor. + * + * @param template object to copy + */ + public QueryProperties(QueryProperties template) + { + super(template); + } + + + /** + * Standard toString method. + * + * @return print out of variables in a JSON-style + */ + @Override + public String toString() + { + return "QueryProperties{} " + super.toString(); + } +} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/ReportProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/display/ReportProperties.java similarity index 82% rename from open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/ReportProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/display/ReportProperties.java index b7d7054006d..64b2aa8903d 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/ReportProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/display/ReportProperties.java @@ -1,11 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.assets.display; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.DataSetProperties; import java.util.Date; import java.util.Objects; @@ -199,23 +200,13 @@ public void setLastModifier(String lastModifier) public String toString() { return "ReportProperties{" + - "name='" + getName() + '\'' + - ", versionIdentifier='" + getVersionIdentifier() + '\'' + - ", description='" + getDescription() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - ", id='" + id + '\'' + - ", author='" + author + '\'' + - ", url='" + url + '\'' + - ", createTime=" + createTime + - ", lastModifiedTime=" + lastModifiedTime + - ", lastModifier='" + lastModifier + '\'' + - '}'; + "id='" + id + '\'' + + ", author='" + author + '\'' + + ", url='" + url + '\'' + + ", createTime=" + createTime + + ", lastModifiedTime=" + lastModifiedTime + + ", lastModifier='" + lastModifier + '\'' + + "} " + super.toString(); } @@ -232,7 +223,7 @@ public boolean equals(Object objectToCompare) { return true; } - if (! (objectToCompare instanceof ReportProperties)) + if (! (objectToCompare instanceof ReportProperties that)) { return false; } @@ -241,8 +232,6 @@ public boolean equals(Object objectToCompare) return false; } - ReportProperties that = (ReportProperties) objectToCompare; - if (id != null ? ! id.equals(that.id) : that.id != null) { return false; diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/display/package-info.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/display/package-info.java new file mode 100644 index 00000000000..1227022b288 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/display/package-info.java @@ -0,0 +1,7 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +/** + * Beans to describe assets that display data, such as forms and reports. + */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.assets.display; \ No newline at end of file diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/filesandfolders/DataFileProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/filesandfolders/DataFileProperties.java new file mode 100644 index 00000000000..f88e9211247 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/filesandfolders/DataFileProperties.java @@ -0,0 +1,162 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.assets.filesandfolders; + + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.DataStoreProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * DataFileProperties describes the property of a single data file. + */ +@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public class DataFileProperties extends DataStoreProperties +{ + private String fileType = null; + private String fileName = null; + private String fileExtension = null; + + /** + * Default constructor + */ + public DataFileProperties() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public DataFileProperties(DataFileProperties template) + { + super(template); + + if (template != null) + { + fileType = template.getFileType(); + fileName = template.getFileName(); + fileExtension = template.getFileExtension(); + } + } + + + /** + * Return the file type of the file if known. + * + * @return file type string + */ + public String getFileType() + { + return fileType; + } + + + /** + * Set up the file type of the file if known. + * + * @param fileType string + */ + public void setFileType(String fileType) + { + this.fileType = fileType; + } + + + /** + * Return the name of the file (do not want to rely on Name). + * + * @return string + */ + public String getFileName() + { + return fileName; + } + + + /** + * Set up the name of the file (do not want to rely on Name). + * + * @param fileName string + */ + public void setFileName(String fileName) + { + this.fileName = fileName; + } + + + /** + * Return the file extension, if any. + * + * @return string + */ + public String getFileExtension() + { + return fileExtension; + } + + + /** + * Set up the file extension, if any. + * + * @param fileExtension string + */ + public void setFileExtension(String fileExtension) + { + this.fileExtension = fileExtension; + } + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "DataFileProperties{" + + "fileType='" + fileType + '\'' + + ", fileName='" + fileName + '\'' + + ", fileExtension='" + fileExtension + '\'' + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) return true; + if (objectToCompare == null || getClass() != objectToCompare.getClass()) return false; + if (!super.equals(objectToCompare)) return false; + DataFileProperties that = (DataFileProperties) objectToCompare; + return Objects.equals(fileType, that.fileType) && Objects.equals(fileName, that.fileName) && Objects.equals(fileExtension, that.fileExtension); + } + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), fileType, fileName, fileExtension); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/filesandfolders/FileFolderProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/filesandfolders/FileFolderProperties.java new file mode 100644 index 00000000000..fdf15c9a75a --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/filesandfolders/FileFolderProperties.java @@ -0,0 +1,51 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.assets.filesandfolders; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.DataStoreProperties; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * FileFolderProperties defines an asset that is a folder. The qualified name is the fully qualified path name of the folder. + */ +@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public class FileFolderProperties extends DataStoreProperties +{ + /** + * Default constructor + */ + public FileFolderProperties() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public FileFolderProperties(FileFolderProperties template) + { + super(template); + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "FileFolderProperties{} " + super.toString(); + } +} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/FileProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/filesandfolders/FileProperties.java similarity index 94% rename from open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/FileProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/filesandfolders/FileProperties.java index c54fef7ed95..4b4ddefb410 100644 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/FileProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/filesandfolders/FileProperties.java @@ -1,9 +1,10 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.assets.filesandfolders; import com.fasterxml.jackson.annotation.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.DataStoreProperties; import java.util.Objects; @@ -136,7 +137,7 @@ public String toString() ", encodingProperties=" + getEncodingProperties() + ", name='" + getName() + '\'' + ", versionIdentifier='" + getVersionIdentifier() + '\'' + - ", description='" + getDescription() + '\'' + + ", description='" + getResourceDescription() + '\'' + ", qualifiedName='" + getQualifiedName() + '\'' + ", additionalProperties=" + getAdditionalProperties() + ", effectiveFrom=" + getEffectiveFrom() + diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/FolderProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/filesandfolders/FolderProperties.java similarity index 83% rename from open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/FolderProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/filesandfolders/FolderProperties.java index aacd8e3a0c6..be90b55b9fa 100644 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/FolderProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/filesandfolders/FolderProperties.java @@ -1,9 +1,11 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.assets.filesandfolders; import com.fasterxml.jackson.annotation.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.AssetProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.DataStoreProperties; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/filesandfolders/package-info.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/filesandfolders/package-info.java new file mode 100644 index 00000000000..da98f45c6d1 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/filesandfolders/package-info.java @@ -0,0 +1,7 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +/** + * Beans to describe files and folders. + */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.assets.filesandfolders; \ No newline at end of file diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/infrastructure/DeploymentProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/infrastructure/DeploymentProperties.java new file mode 100644 index 00000000000..424fd3e10aa --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/infrastructure/DeploymentProperties.java @@ -0,0 +1,317 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.assets.infrastructure; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import java.util.Date; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +import org.odpi.openmetadata.frameworks.openmetadata.enums.OperationalStatus; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * DeploymentProperties describes the properties for the DeployedOn relationship between an IT Infrastructure asset + * and a destination asset. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class DeploymentProperties extends RelationshipProperties +{ + private static final String deploymentTimeProperty = "deploymentTime"; + private static final String deployerProperty = "deployer"; + private static final String deployerTypeNameProperty = "deployerTypeName"; + private static final String deployerPropertyNameProperty = "deployerPropertyName"; + private static final String deploymentStatusProperty = "deploymentStatus"; + + + private Date deploymentTime = null; + private String deployer = null; + private String deployerTypeName = null; + private String deployerPropertyName = null; + private OperationalStatus deploymentStatus = null; + + + /** + * Default constructor + */ + public DeploymentProperties() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public DeploymentProperties(DeploymentProperties template) + { + super(template); + + if (template != null) + { + deploymentTime = template.getDeploymentTime(); + deployer = template.getDeployer(); + deployerTypeName = template.getDeployerTypeName(); + deployerPropertyName = template.getDeployerPropertyName(); + deploymentStatus = template.getDeploymentStatus(); } + } + + + /** + * Copy/clone constructor + * + * @param properties property map + * @param effectiveFrom effective from + * @param effectiveTo effective to + */ + public DeploymentProperties(Map properties, + Date effectiveFrom, + Date effectiveTo) + { + super(); + + super.setEffectiveFrom(effectiveFrom); + super.setEffectiveTo(effectiveTo); + + if (properties != null) + { + deploymentTime = (Date)properties.get(deploymentTimeProperty); + deployer = properties.get(deployerProperty).toString(); + deployerTypeName = properties.get(deployerTypeNameProperty).toString(); + deployerPropertyName = properties.get(deployerPropertyNameProperty).toString(); + + deploymentStatus = OperationalStatus.DISABLED; + int operationalStatus = (Integer)properties.get(deploymentStatusProperty); + + if (operationalStatus == 1) + { + deploymentStatus = OperationalStatus.ENABLED; + } + } + } + + + /** + * Turn the properties into a property map. + * + * @return property map. + */ + public Map cloneToMap() + { + Map propertyMap = new HashMap<>(); + + if (deploymentTime != null) + { + propertyMap.put(deploymentTimeProperty, deploymentTime); + } + + if (deployer != null) + { + propertyMap.put(deployerProperty, deployer); + } + + if (deployerTypeName != null) + { + propertyMap.put(deployerTypeNameProperty, deployerTypeName); + } + + if (deployerPropertyName != null) + { + propertyMap.put(deployerPropertyNameProperty, deployerPropertyName); + } + + if (deploymentStatus != null) + { + propertyMap.put(deploymentStatusProperty, deploymentStatus.getOpenTypeOrdinal()); + } + + if (! propertyMap.isEmpty()) + { + propertyMap = null; + } + + return propertyMap; + } + + + + /** + * Return the time that the capability was deployed into the server. + * + * @return date/time + */ + public Date getDeploymentTime() + { + return deploymentTime; + } + + + /** + * Set up the time that the capability was deployed into the server. + * + * @param deploymentTime date/time + */ + public void setDeploymentTime(Date deploymentTime) + { + this.deploymentTime = deploymentTime; + } + + + /** + * Return the userId of the deployer. + * + * @return name + */ + public String getDeployer() + { + return deployer; + } + + + /** + * Set up the userId of the deployer. + * + * @param deployer name + */ + public void setDeployer(String deployer) + { + this.deployer = deployer; + } + + + /** + * Return the type name of the element used to represent the deployer. + * + * @return string name + */ + public String getDeployerTypeName() + { + return deployerTypeName; + } + + + /** + * Set up the type name of the element used to represent the deployer. + * + * @param deployerTypeName string name + */ + public void setDeployerTypeName(String deployerTypeName) + { + this.deployerTypeName = deployerTypeName; + } + + + /** + * Return the property name from the element used to represent the deployer. + * + * @return string name + */ + public String getDeployerPropertyName() + { + return deployerPropertyName; + } + + + /** + * Set up the property name from the element used to represent the deployer. + * + * @param deployerPropertyName string name + */ + public void setDeployerPropertyName(String deployerPropertyName) + { + this.deployerPropertyName = deployerPropertyName; + } + + + /** + * Return whether the capability is ready to use. + * + * @return operational status enum + */ + public OperationalStatus getDeploymentStatus() + { + return deploymentStatus; + } + + + /** + * Set up whether the capability is ready to use. + * + * @param deploymentStatus operational status enum + */ + public void setDeploymentStatus(OperationalStatus deploymentStatus) + { + this.deploymentStatus = deploymentStatus; + } + + + /** + * JSON-style toString. + * + * @return list of properties and their values. + */ + @Override + public String toString() + { + return "DeploymentProperties{" + + "deploymentTime=" + deploymentTime + + ", deployer='" + deployer + '\'' + + ", deploymentStatus=" + deploymentStatus + + ", effectiveFrom=" + getEffectiveFrom() + + ", effectiveTo=" + getEffectiveTo() + + '}'; + } + + + /** + * Equals method that returns true if containing properties are the same. + * + * @param objectToCompare object to compare + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (! super.equals(objectToCompare)) + { + return false; + } + DeploymentProperties that = (DeploymentProperties) objectToCompare; + return Objects.equals(deploymentTime, that.deploymentTime) && + Objects.equals(deployer, that.deployer) && + Objects.equals(deployerTypeName, that.deployerTypeName) && + Objects.equals(deployerPropertyName, that.deployerPropertyName) && + deploymentStatus == that.deploymentStatus; + } + + + /** + * Hash code for this object + * + * @return int + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), deploymentTime, deployer, deployerTypeName, deployerPropertyName, deploymentStatus); + } +} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/HostProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/infrastructure/HostProperties.java similarity index 92% rename from open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/HostProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/infrastructure/HostProperties.java index bf9c035e242..70894376196 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/HostProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/infrastructure/HostProperties.java @@ -1,11 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.assets.infrastructure; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.AssetProperties; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/ITInfrastructureProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/infrastructure/ITInfrastructureProperties.java similarity index 91% rename from open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/ITInfrastructureProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/infrastructure/ITInfrastructureProperties.java index 89fd9615e07..10b518433a7 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/ITInfrastructureProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/infrastructure/ITInfrastructureProperties.java @@ -1,18 +1,15 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.assets.infrastructure; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.AssetProperties; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/PlatformDeploymentProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/infrastructure/PlatformDeploymentProperties.java similarity index 95% rename from open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/PlatformDeploymentProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/infrastructure/PlatformDeploymentProperties.java index be26929cf31..5e7e3a63146 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/PlatformDeploymentProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/infrastructure/PlatformDeploymentProperties.java @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.assets.infrastructure; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -12,6 +12,7 @@ import java.util.Objects; import org.odpi.openmetadata.frameworks.openmetadata.enums.OperationalStatus; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; @@ -23,7 +24,7 @@ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) -public class PlatformDeploymentProperties extends ConfigurationItemRelationshipProperties +public class PlatformDeploymentProperties extends RelationshipProperties { private static final String deploymentTimePropertyName = "deploymentTime"; private static final String deployerPropertyName = "deployer"; diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/infrastructure/ServerAssetUseProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/infrastructure/ServerAssetUseProperties.java new file mode 100644 index 00000000000..34006280f76 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/infrastructure/ServerAssetUseProperties.java @@ -0,0 +1,257 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.assets.infrastructure; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ServerAssetUseType; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * ServerAssetUseProperties describes the properties for the ServerAssetUse relationship between a software + * server capability and an asset. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ServerAssetUseProperties extends RelationshipProperties +{ + private ServerAssetUseType useType = null; + private String description = null; + private boolean minimumInstancesSet = false; + private int minimumInstances = 0; + private boolean maximumInstancesSet = false; + private int maximumInstances = 0; + + + /** + * Default constructor + */ + public ServerAssetUseProperties() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public ServerAssetUseProperties(ServerAssetUseProperties template) + { + super(template); + + if (template != null) + { + this.useType = template.getUseType(); + this.description = template.getDescription(); + this.minimumInstancesSet = template.getMinimumInstancesSet(); + this.minimumInstances = template.getMinimumInstances(); + this.maximumInstancesSet = template.getMaximumInstancesSet(); + this.maximumInstances = template.getMaximumInstances(); + } + } + + + /** + * Return the types of interactions that the software server capability may have with the asset. + * + * @return ServerAssetUseType enum + */ + public ServerAssetUseType getUseType() + { + return useType; + } + + + /** + * Set up the types of interactions that the software server capability may have with the asset. + * + * @param useType ServerAssetUseType enum + */ + public void setUseType(ServerAssetUseType useType) + { + this.useType = useType; + } + + + /** + * Return the description of the relationship between the software server capability and the asset. + * + * @return text + */ + public String getDescription() + { + return description; + } + + + /** + * Set up the description of the relationship between the software server capability and the asset. + * + * @param description text + */ + public void setDescription(String description) + { + this.description = description; + } + + + /** + * Return whether the minimum instances value is set up or just default. + * + * @return flag + */ + public boolean getMinimumInstancesSet() + { + return minimumInstancesSet; + } + + + /** + * Set up whether the minimum instances value is set up or just default. + * + * @param minimumInstancesSet flag + */ + public void setMinimumInstancesSet(boolean minimumInstancesSet) + { + this.minimumInstancesSet = minimumInstancesSet; + } + + + /** + * Return the minimum number of running asset instances controlled by the software server capability. + * + * @return integer + */ + public int getMinimumInstances() + { + return minimumInstances; + } + + + /** + * Set up the minimum number of running asset instances controlled by the software server capability. + * + * @param minimumInstances integer + */ + public void setMinimumInstances(int minimumInstances) + { + this.minimumInstances = minimumInstances; + } + + + /** + * Return whether the maximum instances value is set up or just default. + * + * @return flag + */ + public boolean getMaximumInstancesSet() + { + return maximumInstancesSet; + } + + + /** + * Set up whether the maximum instances value is set up or just default. + * + * @param maximumInstancesSet flag + */ + public void setMaximumInstancesSet(boolean maximumInstancesSet) + { + this.maximumInstancesSet = maximumInstancesSet; + } + + + /** + * Return the maximum number of running asset instances controlled by the software server capability. + * + * @return integer + */ + public int getMaximumInstances() + { + return maximumInstances; + } + + + /** + * Set up the maximum number of running asset instances controlled by the software server capability. + * + * @param maximumInstances integer + */ + public void setMaximumInstances(int maximumInstances) + { + this.maximumInstances = maximumInstances; + } + + + /** + * JSON-style toString. + * + * @return list of properties and their values. + */ + @Override + public String toString() + { + return "ServerAssetUseProperties{" + + "useType=" + useType + + ", description='" + description + '\'' + + ", minimumInstancesSet=" + minimumInstancesSet + + ", minimumInstances=" + minimumInstances + + ", maximumInstancesSet=" + maximumInstancesSet + + ", maximumInstances=" + maximumInstances + + ", effectiveFrom=" + getEffectiveFrom() + + ", effectiveTo=" + getEffectiveTo() + + '}'; + } + + + /** + * Equals method that returns true if containing properties are the same. + * + * @param objectToCompare object to compare + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (! super.equals(objectToCompare)) + { + return false; + } + ServerAssetUseProperties that = (ServerAssetUseProperties) objectToCompare; + return minimumInstancesSet == that.minimumInstancesSet && + minimumInstances == that.minimumInstances && + maximumInstancesSet == that.maximumInstancesSet && + maximumInstances == that.maximumInstances && + useType == that.useType && + Objects.equals(description, that.description); + } + + + /** + * Hash code for this object + * + * @return int + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), useType, description, minimumInstancesSet, minimumInstances, maximumInstancesSet, maximumInstances); + } +} diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/SoftwareServerPlatformProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/infrastructure/SoftwareServerPlatformProperties.java similarity index 97% rename from open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/SoftwareServerPlatformProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/infrastructure/SoftwareServerPlatformProperties.java index 82869554125..81f6d5afb19 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/SoftwareServerPlatformProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/infrastructure/SoftwareServerPlatformProperties.java @@ -1,11 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.assets.infrastructure; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.AssetProperties; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; diff --git a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/SoftwareServerProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/infrastructure/SoftwareServerProperties.java similarity index 97% rename from open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/SoftwareServerProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/infrastructure/SoftwareServerProperties.java index 92b6663a7be..4952b0466a9 100644 --- a/open-metadata-implementation/access-services/it-infrastructure/it-infrastructure-api/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/properties/SoftwareServerProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/infrastructure/SoftwareServerProperties.java @@ -1,9 +1,10 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.itinfrastructure.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.assets.infrastructure; import com.fasterxml.jackson.annotation.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.AssetProperties; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; import java.util.HashMap; diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/infrastructure/package-info.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/infrastructure/package-info.java new file mode 100644 index 00000000000..dc98fde5893 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/infrastructure/package-info.java @@ -0,0 +1,7 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +/** + * Beans to describe servers, platforms and host assets. + */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.assets.infrastructure; \ No newline at end of file diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/package-info.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/package-info.java new file mode 100644 index 00000000000..cc432b289fe --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/package-info.java @@ -0,0 +1,7 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +/** + * Beans that represent different types of assets. + */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.assets; \ No newline at end of file diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/processes/PortProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/processes/PortProperties.java new file mode 100644 index 00000000000..6a251661e3e --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/processes/PortProperties.java @@ -0,0 +1,152 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.openmetadata.properties.assets.processes; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.enums.PortType; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ReferenceableProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * PortProperties is a class for representing a generic port for a process. The typeName is set to indicate it is either a + * PortAlias (part of a choreographing process) or PortImplementation (part of an implemented process). + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class PortProperties extends ReferenceableProperties +{ + private String displayName = null; + private PortType portType = null; + + + /** + * Default constructor + */ + public PortProperties() + { + super(); + } + + + /** + * Copy/clone constructor. + * + * @param template object to copy + */ + public PortProperties(PortProperties template) + { + super(template); + + if (template != null) + { + displayName = template.getDisplayName(); + portType = template.getPortType(); + } + } + + + /** + * Return a human memorable name for the port. + * + * @return string name + */ + public String getDisplayName() + { + return displayName; + } + + + /** + * Set up a human memorable name for the port. + * + * @param displayName string name + */ + public void setDisplayName(String displayName) + { + this.displayName = displayName; + } + + + /** + * Return the direction of data flow of the port. + * + * @return portType enum + */ + public PortType getPortType() + { + return portType; + } + + + /** + * Set up the direction of data flow of the port. + * + * @param portType portType enum + */ + public void setPortType(PortType portType) + { + this.portType = portType; + } + + + /** + * Standard toString method. + * + * @return print out of variables in a JSON-style + */ + @Override + public String toString() + { + return "PortProperties{" + + "displayName='" + displayName + '\'' + + ", portType=" + portType + + "} " + super.toString(); + } + + + /** + * Compare the values of the supplied object with those stored in the current object. + * + * @param objectToCompare supplied object + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + PortProperties that = (PortProperties) objectToCompare; + return Objects.equals(getDisplayName(), that.getDisplayName()) && + getPortType() == that.getPortType(); + } + + + /** + * Return hash code based on properties. + * + * @return int + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), displayName, portType); + } +} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/ProcessContainmentProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/processes/ProcessContainmentProperties.java similarity index 93% rename from open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/ProcessContainmentProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/processes/ProcessContainmentProperties.java index bf93f44d928..204532692e2 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/ProcessContainmentProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/processes/ProcessContainmentProperties.java @@ -1,10 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetmanager.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.assets.processes; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ProcessContainmentType; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; import java.util.Objects; diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/processes/ProcessProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/processes/ProcessProperties.java new file mode 100644 index 00000000000..42511fb634d --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/processes/ProcessProperties.java @@ -0,0 +1,259 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.assets.processes; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.AssetProperties; +import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; + +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * Process properties defines the properties of a process. A process is a series of steps and decisions in operation + * in the organization. It is typically an automated process but may be performed by a person. + * Only set the implementationLanguage if the process is automated. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ProcessProperties extends AssetProperties +{ + private static final String formulaProperty = OpenMetadataProperty.FORMULA.name; + private static final String formulaTypeProperty = OpenMetadataProperty.FORMULA_TYPE.name; + private static final String implementationLanguageProperty = OpenMetadataProperty.IMPLEMENTATION_LANGUAGE.name; + + private String formula = null; + private String formulaType = null; + private String implementationLanguage = null; + + /** + * Default constructor + */ + public ProcessProperties() + { + super(); + } + + + /** + * Copy/clone Constructor + * + * @param template template object to copy. + */ + public ProcessProperties(ProcessProperties template) + { + super(template); + + if (template != null) + { + formula = template.getFormula(); + formulaType = template.getFormulaType(); + implementationLanguage = template.getImplementationLanguage(); + } + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public ProcessProperties(AssetProperties template) + { + super(template); + + if (template != null) + { + Map assetExtendedProperties = template.getExtendedProperties(); + + if (assetExtendedProperties != null) + { + if (assetExtendedProperties.get(formulaProperty) != null) + { + formula = assetExtendedProperties.get(formulaProperty).toString(); + assetExtendedProperties.remove(formulaProperty); + } + + if (assetExtendedProperties.get(formulaTypeProperty) != null) + { + formulaType = assetExtendedProperties.get(formulaTypeProperty).toString(); + assetExtendedProperties.remove(formulaTypeProperty); + } + + if (assetExtendedProperties.get(implementationLanguageProperty) != null) + { + implementationLanguage = assetExtendedProperties.get(implementationLanguageProperty).toString(); + assetExtendedProperties.remove(implementationLanguageProperty); + } + + super.setExtendedProperties(assetExtendedProperties); + } + } + } + + + /** + * Convert this object into an AssetProperties object. This involves packing the properties introduced at this level + * into the extended properties. + * + * @return asset properties + */ + public AssetProperties cloneToAsset() + { + AssetProperties assetProperties = super.cloneToAsset("Process"); + + Map extendedProperties = assetProperties.getExtendedProperties(); + + if (extendedProperties == null) + { + extendedProperties = new HashMap<>(); + } + + if (formula != null) + { + extendedProperties.put(formulaProperty, formula); + } + + if (formulaType != null) + { + extendedProperties.put(formulaTypeProperty, formulaType); + } + + if (implementationLanguage != null) + { + extendedProperties.put(implementationLanguageProperty, implementationLanguage); + } + + if (! extendedProperties.isEmpty()) + { + assetProperties.setExtendedProperties(extendedProperties); + } + + return assetProperties; + } + + + /** + * Return the description of the processing performed by this process. + * + * @return string description + */ + public String getFormula() { return formula; } + + + /** + * Set up the description of the processing performed by this process. + * + * @param formula string description + */ + public void setFormula(String formula) + { + this.formula = formula; + } + + + /** + * Return the specification language for the formula. + * + * @return string description + */ + public String getFormulaType() + { + return formulaType; + } + + + /** + * Set up the specification language for the formula. + * + * @param formulaType string description + */ + public void setFormulaType(String formulaType) + { + this.formulaType = formulaType; + } + + + /** + * Return the name of the programming language that this process is implemented in. + * + * @return string name + */ + public String getImplementationLanguage() + { + return implementationLanguage; + } + + + /** + * Set up the name of the programming language that this process is implemented in. + * + * @param implementationLanguage string name + */ + public void setImplementationLanguage(String implementationLanguage) + { + this.implementationLanguage = implementationLanguage; + } + + + /** + * Standard toString method. + * + * @return print out of variables in a JSON-style + */ + @Override + public String toString() + { + return "ProcessProperties{" + + "formula='" + formula + '\'' + + ", formulaType='" + formulaType + '\'' + + ", implementationLanguage='" + implementationLanguage + '\'' + + "} " + super.toString(); + } + + + /** + * Compare the values of the supplied object with those stored in the current object. + * + * @param objectToCompare supplied object + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (! super.equals(objectToCompare)) + { + return false; + } + ProcessProperties that = (ProcessProperties) objectToCompare; + return Objects.equals(formula, that.formula) && Objects.equals(formulaType, that.formulaType) && + Objects.equals(implementationLanguage, that.implementationLanguage); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), getFormula(), getFormulaType(), getImplementationLanguage()); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/processes/package-info.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/processes/package-info.java new file mode 100644 index 00000000000..6fb012cf93b --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/processes/package-info.java @@ -0,0 +1,7 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +/** + * Beans to describe processes. + */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.assets.processes; \ No newline at end of file diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/TopicProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/topics/TopicProperties.java similarity index 77% rename from open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/TopicProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/topics/TopicProperties.java index f038fb7513c..1da9c50fd49 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/TopicProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/topics/TopicProperties.java @@ -1,11 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.assets.topics; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.DataSetProperties; import java.util.Objects; @@ -102,19 +103,9 @@ public void setTopicName(String topicName) public String toString() { return "TopicProperties{" + - "name='" + getName() + '\'' + - ", versionIdentifier='" + getVersionIdentifier() + '\'' + - ", description='" + getDescription() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - ", topicType='" + topicType + '\'' + - ", topicName='" + topicName + '\'' + - '}'; + "topicType='" + topicType + '\'' + + ", topicName='" + topicName + '\'' + + "} " + super.toString(); } diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/topics/package-info.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/topics/package-info.java new file mode 100644 index 00000000000..54b7e1a14b3 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/assets/topics/package-info.java @@ -0,0 +1,7 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +/** + * Beans about assets that manage events. + */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.assets.topics; \ No newline at end of file diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/collections/CollectionFolderProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/collections/CollectionFolderProperties.java new file mode 100644 index 00000000000..856e1355265 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/collections/CollectionFolderProperties.java @@ -0,0 +1,153 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.collections; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.enums.OrderBy; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * CollectionFolderProperties defines the properties used to create a Folder classification for a collection. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class CollectionFolderProperties extends CollectionProperties +{ + private String orderByPropertyName = null; + private OrderBy collectionOrder = null; + + /** + * Default Constructor + */ + public CollectionFolderProperties() + { + super(); + } + + + /** + * Copy/clone Constructor - the resulting object. + * + * @param template object being copied + */ + public CollectionFolderProperties(CollectionFolderProperties template) + { + super(template); + + if (template != null) + { + this.orderByPropertyName = template.getOrderByPropertyName(); + this.collectionOrder = template.getCollectionOrder(); + } + } + + + /** + * Return the property to use to determine the order that member are returned. + * + * @return AssetCollectionOrder enum + */ + public OrderBy getCollectionOrder() + { + return collectionOrder; + } + + + /** + * Set up the property to use to determine the order that assets are returned. + * + * @param collectionOrder AssetCollectionOrder enum + */ + public void setCollectionOrder(OrderBy collectionOrder) + { + this.collectionOrder = collectionOrder; + } + + + /** + * Return the name of the property to use if collectionOrdering is OTHER. + * + * @return property name + */ + public String getOrderByPropertyName() + { + return orderByPropertyName; + } + + + /** + * Set up the name of the property to use if collectionOrdering is OTHER. + * + * @param orderByPropertyName test + */ + public void setOrderByPropertyName(String orderByPropertyName) + { + this.orderByPropertyName = orderByPropertyName; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "CollectionFolderProperties{" + + "collectionOrderingProperty='" + orderByPropertyName + '\'' + + ", collectionOrdering=" + collectionOrder + + ", name='" + getName() + '\'' + + ", description='" + getDescription() + '\'' + + ", collectionType='" + getCollectionType() + '\'' + + ", qualifiedName='" + getQualifiedName() + '\'' + + ", additionalProperties=" + getAdditionalProperties() + + ", typeName='" + getTypeName() + '\'' + + ", extendedProperties=" + getExtendedProperties() + + '}'; + } + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + CollectionFolderProperties that = (CollectionFolderProperties) objectToCompare; + return Objects.equals(orderByPropertyName, that.orderByPropertyName) && collectionOrder == that.collectionOrder; + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), orderByPropertyName, collectionOrder); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/collections/CollectionMembershipProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/collections/CollectionMembershipProperties.java new file mode 100644 index 00000000000..3a09bf05c8f --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/collections/CollectionMembershipProperties.java @@ -0,0 +1,384 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.collections; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.enums.CollectionMemberStatus; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * CollectionMember describes a member of a collection. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class CollectionMembershipProperties extends RelationshipProperties +{ + private String membershipRationale = null; + private String createdBy = null; + private String expression = null; + private int confidence = 0; + private CollectionMemberStatus status = null; + private String userDefinedStatus = null; + private String steward = null; + private String stewardTypeName = null; + private String stewardPropertyName = null; + private String source = null; + private String notes = null; + + + + /** + * Default constructor + */ + public CollectionMembershipProperties() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public CollectionMembershipProperties(CollectionMembershipProperties template) + { + if (template != null) + { + membershipRationale = template.getMembershipRationale(); + createdBy = template.getCreatedBy(); + confidence = template.getConfidence(); + expression = template.getExpression(); + status = template.getStatus(); + userDefinedStatus = template.getUserDefinedStatus(); + source = template.getSource(); + steward = template.getSteward(); + stewardTypeName = template.getStewardTypeName(); + stewardPropertyName = template.getStewardPropertyName(); + notes = template.getNotes(); + } + } + + + /** + * Return the rationale or role of the asset in this collection. + * + * @return text + */ + public String getMembershipRationale() + { + return membershipRationale; + } + + + /** + * Set up the rationale or role of the asset in this collection. + * + * @param membershipRationale text + */ + public void setMembershipRationale(String membershipRationale) + { + this.membershipRationale = membershipRationale; + } + + + /** + * Return the identifier of the person/process that created this membership. The userId of the creator + * is automatically captured. This field can be used to add additional information about the creator. + * For example, this could be the identifier of a process instance that created the membership relationship. + * + * @return string + */ + public String getCreatedBy() + { + return createdBy; + } + + + /** + * Set up the identifier of the person/process that created this membership. The userId of the creator + * is automatically captured. This field can be used to add additional information about the creator. + * For example, this could be the identifier of a process instance that created the membership relationship. + * + * @param createdBy string + */ + public void setCreatedBy(String createdBy) + { + this.createdBy = createdBy; + } + + + /** + * Return the expression used to determine the membership. This is used by automated processes that are determining + * membership through one or more matching algorithms. This string helps the steward understand the type of match made. + * + * @return string + */ + public String getExpression() + { + return expression; + } + + /** + * Set up the expression used to determine the membership. This is used by automated processes that are determining + * membership through one or more matching algorithms. This string helps the steward understand the type of match made. + * + * @param expression string + */ + public void setExpression(String expression) + { + this.expression = expression; + } + + + /** + * Return the confidence level (0-100) that the matching is correct. + * + * @return int + */ + public int getConfidence() + { + return confidence; + } + + + /** + * Set up the confidence level (0-100) that the matching is correct. + * + * @param confidence int + */ + public void setConfidence(int confidence) + { + this.confidence = confidence; + } + + + /** + * Return the status of the membership in the collection. + * + * @return enum + */ + public CollectionMemberStatus getStatus() + { + return status; + } + + + /** + * Set up the status of the membership in the collection. + * + * @param status enum + */ + public void setStatus(CollectionMemberStatus status) + { + this.status = status; + } + + + /** + * Return the status of the membership in the collection. This status is controlled by the local deployment. + * + * @return string + */ + public String getUserDefinedStatus() + { + return userDefinedStatus; + } + + + /** + * Set up the status of the membership in the collection. This status is controlled by the local deployment. + * + * @param userDefinedStatus string + */ + public void setUserDefinedStatus(String userDefinedStatus) + { + this.userDefinedStatus = userDefinedStatus; + } + + + /** + * Return the source of information that determined the membership. + * + * @return string + */ + public String getSource() + { + return source; + } + + + /** + * Set up the source of information that determined the membership. + * + * @param source string + */ + public void setSource(String source) + { + this.source = source; + } + + + /** + * Returns the id of the steward responsible for the mapping. + * + * @return String id + */ + public String getSteward() + { + return steward; + } + + + /** + * Set up the id of the steward responsible for the mapping. + * + * @param steward String id + */ + public void setSteward(String steward) + { + this.steward = steward; + } + + + /** + * Return the type of element that describes the steward. + * + * @return type name + */ + public String getStewardTypeName() + { + return stewardTypeName; + } + + + /** + * Set up the type of element that describes the steward. + * + * @param stewardTypeName type name + */ + public void setStewardTypeName(String stewardTypeName) + { + this.stewardTypeName = stewardTypeName; + } + + + /** + * Return the name of the property that holds the steward's identifier. + * + * @return property name + */ + public String getStewardPropertyName() + { + return stewardPropertyName; + } + + + /** + * Set up the name of the property that holds the steward's identifier. + * + * @param stewardPropertyName property name + */ + public void setStewardPropertyName(String stewardPropertyName) + { + this.stewardPropertyName = stewardPropertyName; + } + + + /** + * Return the additional values associated with the symbolic name. + * + * @return string text + */ + public String getNotes() + { + return notes; + } + + + /** + * Set up the additional values associated with the symbolic name. + * + * @param notes string text + */ + public void setNotes(String notes) + { + this.notes = notes; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "CollectionMembershipProperties{" + + "membershipRationale='" + membershipRationale + '\'' + + ", createdBy='" + createdBy + '\'' + + ", expression='" + expression + '\'' + + ", confidence=" + confidence + + ", status=" + status + + ", userDefinedStatus='" + userDefinedStatus + '\'' + + ", steward='" + steward + '\'' + + ", stewardTypeName='" + stewardTypeName + '\'' + + ", stewardPropertyName='" + stewardPropertyName + '\'' + + ", source='" + source + '\'' + + ", notes='" + notes + '\'' + + '}'; + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + CollectionMembershipProperties that = (CollectionMembershipProperties) objectToCompare; + return confidence == that.confidence && + Objects.equals(membershipRationale, that.membershipRationale) && + Objects.equals(createdBy, that.createdBy) && + Objects.equals(expression, that.expression) && + status == that.status && + Objects.equals(userDefinedStatus, that.userDefinedStatus) && + Objects.equals(steward, that.steward) && + Objects.equals(stewardTypeName, that.stewardTypeName) && + Objects.equals(stewardPropertyName, that.stewardPropertyName) && + Objects.equals(source, that.source) && + Objects.equals(notes, that.notes); + } + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(membershipRationale, createdBy, expression, confidence, status, userDefinedStatus, steward, stewardTypeName, + stewardPropertyName, source, notes); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/collections/CollectionProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/collections/CollectionProperties.java new file mode 100644 index 00000000000..4d08092b938 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/collections/CollectionProperties.java @@ -0,0 +1,183 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.collections; + +import com.fasterxml.jackson.annotation.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ReferenceableProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * CollectionProperties describes the core properties of a collection. The collection is a managed list of elements. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "class") +@JsonSubTypes( + { + @JsonSubTypes.Type(value = CollectionFolderProperties.class, name = "CollectionFolderProperties"), + }) +public class CollectionProperties extends ReferenceableProperties +{ + private String name = null; + private String description = null; + private String collectionType = null; + + + /** + * Default constructor + */ + public CollectionProperties() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public CollectionProperties(CollectionProperties template) + { + super(template); + + if (template != null) + { + this.name = template.getName(); + this.description = template.getDescription(); + this.collectionType = template.getCollectionType(); + } + } + + + /** + * Return the name of the collection. + * + * @return string name + */ + public String getName() + { + return name; + } + + + /** + * Set up the name of the collection. + * + * @param name string name + */ + public void setName(String name) + { + this.name = name; + } + + + /** + * Return the description of the collection. + * + * @return text + */ + public String getDescription() + { + return description; + } + + + /** + * Set up the description of the collection. + * + * @param description text + */ + public void setDescription(String description) + { + this.description = description; + } + + + /** + * Return a descriptive name for the collection's type. + * + * @return string name + */ + public String getCollectionType() + { + return collectionType; + } + + + /** + * Set up a descriptive name for the collection's type. + * + * @param collectionType string name + */ + public void setCollectionType(String collectionType) + { + this.collectionType = collectionType; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "CollectionProperties{" + + "name='" + name + '\'' + + ", description='" + description + '\'' + + ", collectionType='" + collectionType + '\'' + + ", qualifiedName='" + getQualifiedName() + '\'' + + ", additionalProperties=" + getAdditionalProperties() + + ", typeName='" + getTypeName() + '\'' + + ", extendedProperties=" + getExtendedProperties() + + '}'; + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + CollectionProperties that = (CollectionProperties) objectToCompare; + return Objects.equals(getName(), that.getName()) && Objects.equals(getCollectionType(), that.getCollectionType()) && + Objects.equals(getDescription(), that.getDescription()); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), getName(), getDescription(), getCollectionType()); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/collections/package-info.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/collections/package-info.java new file mode 100644 index 00000000000..0a0936ef545 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/collections/package-info.java @@ -0,0 +1,7 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +/** + * Beans for managing collections. + */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.collections; \ No newline at end of file diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/CommunityForum.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/communities/CommunityForum.java similarity index 96% rename from open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/CommunityForum.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/communities/CommunityForum.java index fb8e451e86e..8328ea8f03d 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/CommunityForum.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/communities/CommunityForum.java @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.communities; import com.fasterxml.jackson.annotation.JsonAutoDetect; diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/communities/CommunityForumContribution.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/communities/CommunityForumContribution.java new file mode 100644 index 00000000000..16cf9bc3e70 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/communities/CommunityForumContribution.java @@ -0,0 +1,51 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.communities; + + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * CommunityForumContribution is used to add an entry to a community forum. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class CommunityForumContribution extends NoteLogEntryProperties +{ + /** + * Default constructor + */ + public CommunityForumContribution() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public CommunityForumContribution(CommunityForumContribution template) + { + super(template); + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "CommunityForumContribution{} " + super.toString(); + } +} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/CommunityMembershipProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/communities/CommunityMembershipProperties.java similarity index 92% rename from open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/CommunityMembershipProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/communities/CommunityMembershipProperties.java index a762526e5af..54e6f6a2303 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/CommunityMembershipProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/communities/CommunityMembershipProperties.java @@ -1,11 +1,13 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.communities; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.enums.CommunityMembershipType; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; import java.util.Objects; diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/CommunityProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/communities/CommunityProperties.java similarity index 96% rename from open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/CommunityProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/communities/CommunityProperties.java index 1567416344f..935a1e73942 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/CommunityProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/communities/CommunityProperties.java @@ -1,13 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.communities; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ReferenceableProperties; -import java.util.HashMap; -import java.util.Map; import java.util.Objects; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/NoteLogEntryProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/communities/NoteLogEntryProperties.java similarity index 96% rename from open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/NoteLogEntryProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/communities/NoteLogEntryProperties.java index 19c0d84c53a..f02106ab330 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/NoteLogEntryProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/communities/NoteLogEntryProperties.java @@ -1,9 +1,10 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.communities; import com.fasterxml.jackson.annotation.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ReferenceableProperties; import java.util.List; import java.util.Objects; diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/NoteLogHeaderProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/communities/NoteLogHeaderProperties.java similarity index 96% rename from open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/NoteLogHeaderProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/communities/NoteLogHeaderProperties.java index 215ec46d136..4fcefbe0843 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/NoteLogHeaderProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/communities/NoteLogHeaderProperties.java @@ -1,9 +1,10 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.communities; import com.fasterxml.jackson.annotation.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ReferenceableProperties; import java.util.Objects; diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/communities/package-info.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/communities/package-info.java new file mode 100644 index 00000000000..89cf79bc8e1 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/communities/package-info.java @@ -0,0 +1,7 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +/** + * Beans to describe communities and their members. + */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.communities; \ No newline at end of file diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/connections/ConnectionProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/connections/ConnectionProperties.java new file mode 100644 index 00000000000..5046679b3f3 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/connections/ConnectionProperties.java @@ -0,0 +1,375 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.connections; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ReferenceableProperties; + +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * The connection is an object that contains the properties needed to create and initialise a connector to access a + * specific data assets. + * + * The properties for a connection are defined in model 0201. They include the following options for connector name: + *
            + *
          • + * guid - Globally unique identifier for the connection. + *
          • + *
          • + * url - URL of the connection definition in the metadata repository. + * This URL can be stored as a property in another entity to create an explicit link to this connection. + *
          • + *
          • + * qualifiedName - The official (unique) name for the connection. + * This is often defined by the IT systems management organization and should be used (when available) on + * audit logs and error messages. The qualifiedName is defined in the 0010 model as part of Referenceable. + *
          • + *
          • + * displayName - A consumable name for the connection. Often a shortened form of the qualifiedName for use + * on user interfaces and messages. The displayName should be only be used for audit logs and error messages + * if the qualifiedName is not set. + *
          • + *
          + * + * Either the guid, qualifiedName or displayName can be used to specify the name for a connection. + * + * Other properties for the connection include: + *
            + *
          • + * type - information about the TypeDef for Connection + *
          • + *
          • + * description - A full description of the connection covering details of the assets it connects to + * along with usage and version information. + *
          • + *
          • + * additionalProperties - Any additional properties associated with the connection. + *
          • + *
          • + * configurationProperties - properties for configuring the connector. + *
          • + *
          • + * securedProperties - Protected properties for secure log on by connector to back end server. These + * are protected properties that can only be retrieved by privileged connector code. + *
          • + *
          • + * userId - name or URI or connecting user. + *
          • + *
          • + * encryptedPassword - password for the userId - needs decrypting by connector before use. + *
          • + *
          • + * clearPassword - password for userId - ready to use. + *
          • + *
          • + * connectorType - Properties that describe the connector type for the connector. + *
          • + *
          • + * endpoint - Properties that describe the server endpoint where the connector will retrieve the assets. + *
          • + *
          • + * assetSummary - short description of the connected asset (if any). + *
          • + *
          + * + * The connection class is simply used to cache the properties for an connection. + * It is used by other classes to exchange this information between a metadata repository and a owner. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ConnectionProperties extends ReferenceableProperties +{ + private String displayName = null; + private String description = null; + private String userId = null; + private String encryptedPassword = null; + private String clearPassword = null; + private Map configurationProperties = null; + private Map securedProperties = null; + + + /** + * Default constructor sets the Connection properties to null. + */ + public ConnectionProperties() + { + super(); + } + + + /** + * Copy/clone Constructor to return a copy of a connection object. + * + * @param template Connection to copy + */ + public ConnectionProperties(ConnectionProperties template) + { + super(template); + + if (template != null) + { + displayName = template.getDisplayName(); + description = template.getDescription(); + userId = template.getUserId(); + clearPassword = template.getClearPassword(); + encryptedPassword = template.getEncryptedPassword(); + configurationProperties = template.getConfigurationProperties(); + securedProperties = template.getSecuredProperties(); + } + } + + + /** + * Returns the stored display name property for the connection. + * Null means no displayName is available. + * + * @return displayName + */ + public String getDisplayName() { return displayName; } + + + /** + * Set up the display name for UIs and reports. + * + * @param displayName String name + */ + public void setDisplayName(String displayName) + { + this.displayName = displayName; + } + + + /** + * Set up description of the element. + * + * @param description String + */ + public void setDescription(String description) + { + this.description = description; + } + + + /** + * Returns the stored description property for the connection. + * If no description is provided then null is returned. + * + * @return description + */ + public String getDescription() + { + return description; + } + + + /** + * Return the userId to use on this connection. + * + * @return string + */ + public String getUserId() + { + return userId; + } + + + /** + * Set up the userId to use on this connection. + * + * @param userId string + */ + public void setUserId(String userId) + { + this.userId = userId; + } + + + /** + * Return an encrypted password. The caller is responsible for decrypting it. + * + * @return string + */ + public String getEncryptedPassword() + { + return encryptedPassword; + } + + + /** + * Set up an encrypted password. + * + * @param encryptedPassword string + */ + public void setEncryptedPassword(String encryptedPassword) + { + this.encryptedPassword = encryptedPassword; + } + + + /** + * Return an unencrypted password. + * + * @return string + */ + public String getClearPassword() + { + return clearPassword; + } + + + /** + * Set up an unencrypted password. + * + * @param clearPassword string + */ + public void setClearPassword(String clearPassword) + { + this.clearPassword = clearPassword; + } + + + /** + * Set up the configuration properties for this Connection. + * + * @param configurationProperties properties that contain additional configuration information for the connector. + */ + public void setConfigurationProperties(Map configurationProperties) + { + this.configurationProperties = configurationProperties; + } + + + /** + * Return a copy of the configuration properties. Null means no secured properties are available. + * + * @return secured properties typically user credentials for the connection + */ + public Map getConfigurationProperties() + { + if (configurationProperties == null) + { + return null; + } + else if (configurationProperties.isEmpty()) + { + return null; + } + else + { + return new HashMap<>(configurationProperties); + } + } + + + /** + * Set up the secured properties for this Connection. + * + * @param securedProperties properties that contain secret information such as log on information. + */ + public void setSecuredProperties(Map securedProperties) + { + this.securedProperties = securedProperties; + } + + + /** + * Return a copy of the secured properties. Null means no secured properties are available. + * + * @return secured properties typically user credentials for the connection + */ + public Map getSecuredProperties() + { + if (securedProperties == null) + { + return null; + } + else if (securedProperties.isEmpty()) + { + return null; + } + else + { + return new HashMap<>(securedProperties); + } + } + + + /** + * Standard toString method. Note SecuredProperties and other credential type properties are not displayed. + * This is deliberate because there is no knowing where the string will be printed. + * + * @return print out of variables in a JSON-style + */ + @Override + public String toString() + { + return "ConnectionProperties{" + + "displayName='" + displayName + '\'' + + ", description='" + description + '\'' + + ", userId='" + userId + '\'' + + ", encryptedPassword='" + encryptedPassword + '\'' + + ", clearPassword='" + clearPassword + '\'' + + ", configurationProperties=" + configurationProperties + + ", securedProperties=" + securedProperties + + ", qualifiedName='" + getQualifiedName() + '\'' + + ", additionalProperties=" + getAdditionalProperties() + + ", typeName='" + getTypeName() + '\'' + + ", extendedProperties=" + getExtendedProperties() + + '}'; + } + + + /** + * Compare the values of the supplied object with those stored in the current object. + * + * @param objectToCompare supplied object + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + ConnectionProperties that = (ConnectionProperties) objectToCompare; + return Objects.equals(getDisplayName(), that.getDisplayName()) && + Objects.equals(getDescription(), that.getDescription()) && + Objects.equals(getUserId(), that.getUserId()) && + Objects.equals(getEncryptedPassword(), that.getEncryptedPassword()) && + Objects.equals(getClearPassword(), that.getClearPassword()) && + Objects.equals(getConfigurationProperties(), that.getConfigurationProperties()) && + Objects.equals(getSecuredProperties(), that.getSecuredProperties()); + } + + + /** + * Return hash code based on properties. + * + * @return int + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), getDisplayName(), getDescription(), + getUserId(), getEncryptedPassword(), getClearPassword(), getSecuredProperties(), + getConfigurationProperties()); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/connections/ConnectorTypeProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/connections/ConnectorTypeProperties.java new file mode 100644 index 00000000000..776814ae84b --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/connections/ConnectorTypeProperties.java @@ -0,0 +1,607 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.connections; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ReferenceableProperties; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * The ConnectorTypeProperties describe the implementation details of a particular type of connector. + * The properties for a connector type are defined in model 0201. + * They include: + * + *
            + *
          • + * guid - Globally unique identifier for the connector type. + *
          • + *
          • + * qualifiedName - The official (unique) name for the connector type. This is often defined by the IT + * systems management organization and should be used (when available) on audit logs and error messages. + *
          • + *
          • + * displayName - A consumable name for the connector type. Often a shortened form of the qualifiedName for use + * on user interfaces and messages. The displayName should be only be used for audit logs and error messages + * if the qualifiedName is not set. + *
          • + *
          • + * description - A full description of the connector type covering details of the assets it connects to + * along with usage and versioning information. + *
          • + *
          • + * supportedAssetTypeName - the type of asset that the connector implementation supports. + *
          • + *
          • + * expectedDataFormat - the format of the data that the connector supports - null for "any". + *
          • + *
          • + * connectorProviderClassName - The connector provider is the factory for a particular type of connector. + * This property defines the class name for the connector provider that the Connector Broker should use to request + * new connector instances. + *
          • + *
          • + * connectorFrameworkName - name of the connector framework that the connector implements - default Open Connector Framework (OCF). + *
          • + *
          • + * connectorInterfaceLanguage - the language that the connector is implemented in - default Java. + *
          • + *
          • + * connectorInterfaces - list of interfaces that the connector supports. + *
          • + *
          • + * targetTechnologySource - the organization that supplies the target technology that the connector implementation connects to. + *
          • + *
          • + * targetTechnologyName - the name of the target technology that the connector implementation connects to. + *
          • + *
          • + * targetTechnologyInterfaces - the names of the interfaces in the target technology that the connector calls. + *
          • + *
          • + * targetTechnologyVersions - the versions of the target technology that the connector supports. + *
          • + *
          • + * recognizedAdditionalProperties - these are the Connection additional properties recognized by the connector implementation + *
          • + *
          • + * recognizedConfigurationProperties - these are the Connection configuration properties recognized by the connector implementation + *
          • + *
          • + * recognizedSecuredProperties - these are the Connection secured properties recognized by the connector implementation + *
          • + *
          • + * additionalProperties - Any additional properties that the connector provider needs to know in order to + * create connector instances. + *
          • + *
          + * + * The connectorTypeProperties class is simply used to cache the properties for an connector type. + * It is used by other classes to exchange this information between a metadata repository and a owner. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ConnectorTypeProperties extends ReferenceableProperties +{ + private String displayName = null; + private String description = null; + private String supportedAssetTypeName = null; + private String expectedDataFormat = null; + private String connectorProviderClassName = null; + private String connectorFrameworkName = null; + private String connectorInterfaceLanguage = null; + private List connectorInterfaces = null; + private String targetTechnologySource = null; + private String targetTechnologyName = null; + private List targetTechnologyInterfaces = null; + private List targetTechnologyVersions = null; + private List recognizedAdditionalProperties = null; + private List recognizedConfigurationProperties = null; + private List recognizedSecuredProperties = null; + + + + /** + * Default constructor + */ + public ConnectorTypeProperties() + { + super(); + } + + + /** + * Copy/clone constructor for a connectorType that is not connected to an asset (either directly or indirectly). + * + * @param template template object to copy. + */ + public ConnectorTypeProperties(ConnectorTypeProperties template) + { + super(template); + + if (template != null) + { + displayName = template.getDisplayName(); + description = template.getDescription(); + supportedAssetTypeName = template.getSupportedAssetTypeName(); + expectedDataFormat = template.getExpectedDataFormat(); + connectorProviderClassName = template.getConnectorProviderClassName(); + connectorFrameworkName = template.getConnectorFrameworkName(); + connectorInterfaceLanguage = template.getConnectorInterfaceLanguage(); + connectorInterfaces = template.getConnectorInterfaces(); + targetTechnologySource = template.getTargetTechnologySource(); + targetTechnologyName = template.getTargetTechnologyName(); + targetTechnologyInterfaces = template.getTargetTechnologyInterfaces(); + targetTechnologyVersions = template.getTargetTechnologyVersions(); + recognizedAdditionalProperties = template.getRecognizedAdditionalProperties(); + recognizedConfigurationProperties = template.getRecognizedConfigurationProperties(); + recognizedSecuredProperties = template.getRecognizedSecuredProperties(); + } + } + + /** + * Set up the display name for UIs and reports. + * + * @param displayName String name + */ + public void setDisplayName(String displayName) + { + this.displayName = displayName; + } + + + /** + * Returns the stored display name property for the connector type. + * If no display name is available then null is returned. + * + * @return displayName + */ + public String getDisplayName() + { + return displayName; + } + + + /** + * Set up description of the element. + * + * @param description String + */ + public void setDescription(String description) + { + this.description = description; + } + + + /** + * Returns the stored description property for the connector type. + * If no description is available then null is returned. + * + * @return description + */ + public String getDescription() + { + return description; + } + + + /** + * Return the type of asset that the connector implementation supports. + * + * @return string name + */ + public String getSupportedAssetTypeName() + { + return supportedAssetTypeName; + } + + + /** + * Set up the type of asset that the connector implementation supports. + * + * @param supportedAssetTypeName string name + */ + public void setSupportedAssetTypeName(String supportedAssetTypeName) + { + this.supportedAssetTypeName = supportedAssetTypeName; + } + + + /** + * Return the format of the data that the connector supports - null for "any". + * + * @return string name + */ + public String getExpectedDataFormat() + { + return expectedDataFormat; + } + + + /** + * Set up the format of the data that the connector supports - null for "any". + * + * @param expectedDataFormat string name + */ + public void setExpectedDataFormat(String expectedDataFormat) + { + this.expectedDataFormat = expectedDataFormat; + } + + + /** + * The name of the connector provider class name. + * + * @param connectorProviderClassName String class name + */ + public void setConnectorProviderClassName(String connectorProviderClassName) + { + this.connectorProviderClassName = connectorProviderClassName; + } + + + /** + * Returns the stored connectorProviderClassName property for the connector type. + * If no connectorProviderClassName is available then null is returned. + * + * @return connectorProviderClassName class name (including package name) + */ + public String getConnectorProviderClassName() + { + return connectorProviderClassName; + } + + + /** + * Return name of the connector framework that the connector implements - default Open Connector Framework (OCF). + * + * @return string name + */ + public String getConnectorFrameworkName() + { + return connectorFrameworkName; + } + + + /** + * Set up name of the connector framework that the connector implements - default Open Connector Framework (OCF). + * + * @param connectorFrameworkName string name + */ + public void setConnectorFrameworkName(String connectorFrameworkName) + { + this.connectorFrameworkName = connectorFrameworkName; + } + + + /** + * Return the language that the connector is implemented in - default Java. + * + * @return string name + */ + public String getConnectorInterfaceLanguage() + { + return connectorInterfaceLanguage; + } + + + /** + * Set up the language that the connector is implemented in - default Java. + * + * @param connectorInterfaceLanguage string name + */ + public void setConnectorInterfaceLanguage(String connectorInterfaceLanguage) + { + this.connectorInterfaceLanguage = connectorInterfaceLanguage; + } + + + /** + * Return list of interfaces that the connector supports. + * + * @return list of names + */ + public List getConnectorInterfaces() + { + return connectorInterfaces; + } + + + /** + * Set up list of interfaces that the connector supports. + * + * @param connectorInterfaces list of names + */ + public void setConnectorInterfaces(List connectorInterfaces) + { + this.connectorInterfaces = connectorInterfaces; + } + + + /** + * Return the name of the organization that supplies the target technology that the connector implementation connects to. + * + * @return string name + */ + public String getTargetTechnologySource() + { + return targetTechnologySource; + } + + + /** + * Set up the name of the organization that supplies the target technology that the connector implementation connects to. + * + * @param targetTechnologySource list of names + */ + public void setTargetTechnologySource(String targetTechnologySource) + { + this.targetTechnologySource = targetTechnologySource; + } + + + /** + * Return the name of the target technology that the connector implementation connects to. + * + * @return string name + */ + public String getTargetTechnologyName() + { + return targetTechnologyName; + } + + + /** + * Set up the name of the target technology that the connector implementation connects to. + * + * @param targetTechnologyName string name + */ + public void setTargetTechnologyName(String targetTechnologyName) + { + this.targetTechnologyName = targetTechnologyName; + } + + + /** + * Return the names of the interfaces in the target technology that the connector calls. + * + * @return list of interface names + */ + public List getTargetTechnologyInterfaces() + { + return targetTechnologyInterfaces; + } + + + /** + * Set up the names of the interfaces in the target technology that the connector calls. + * + * @param targetTechnologyInterfaces list of interface names + */ + public void setTargetTechnologyInterfaces(List targetTechnologyInterfaces) + { + this.targetTechnologyInterfaces = targetTechnologyInterfaces; + } + + + /** + * Return the versions of the target technology that the connector supports. + * + * @return list of version identifiers + */ + public List getTargetTechnologyVersions() + { + return targetTechnologyVersions; + } + + + /** + * Set up the versions of the target technology that the connector supports. + * + * @param targetTechnologyVersions list of version identifiers + */ + public void setTargetTechnologyVersions(List targetTechnologyVersions) + { + this.targetTechnologyVersions = targetTechnologyVersions; + } + + + /** + * Set up the list of property names that this connector/connector provider implementation looks for + * in the Connection object's additionalProperties. + * + * @param recognizedAdditionalProperties list of property names + */ + public void setRecognizedAdditionalProperties(List recognizedAdditionalProperties) + { + this.recognizedAdditionalProperties = recognizedAdditionalProperties; + } + + + /** + * Return the list of property names that this connector/connector provider implementation looks for + * in the Connection object's additionalProperties. + * + * @return list of property names + */ + public List getRecognizedAdditionalProperties() + { + if (recognizedAdditionalProperties == null) + { + return null; + } + else if (recognizedAdditionalProperties.isEmpty()) + { + return null; + } + else + { + return recognizedAdditionalProperties; + } + } + + + /** + * Set up the list of property names that this connector/connector provider implementation looks for + * in the Connection object's configurationProperties. + * + * @param recognizedConfigurationProperties list of property names + */ + public void setRecognizedConfigurationProperties(List recognizedConfigurationProperties) + { + + this.recognizedConfigurationProperties = recognizedConfigurationProperties; + } + + + /** + * Return the list of property names that this connector/connector provider implementation looks for + * in the Connection object's configurationProperties. + * + * @return list of property names + */ + public List getRecognizedConfigurationProperties() + { + if (recognizedConfigurationProperties == null) + { + return null; + } + else if (recognizedConfigurationProperties.isEmpty()) + { + return null; + } + else + { + return recognizedConfigurationProperties; + } + } + + + /** + * Set up the list of property names that this connector/connector provider implementation looks for + * in the Connection object's securedProperties. + * + * @param recognizedSecuredProperties list of property names + */ + public void setRecognizedSecuredProperties(List recognizedSecuredProperties) + { + this.recognizedSecuredProperties = recognizedSecuredProperties; + } + + + /** + * Return the list of property names that this connector/connector provider implementation looks for + * in the Connection object's securedProperties. + * + * @return list of property names + */ + public List getRecognizedSecuredProperties() + { + if (recognizedSecuredProperties == null) + { + return null; + } + else if (recognizedSecuredProperties.isEmpty()) + { + return null; + } + else + { + return recognizedSecuredProperties; + } + } + + + /** + * Standard toString method. + * + * @return print out of variables in a JSON-style + */ + @Override + public String toString() + { + return "ConnectorTypeProperties{" + + "displayName='" + displayName + '\'' + + ", description='" + description + '\'' + + ", supportedAssetTypeName='" + supportedAssetTypeName + '\'' + + ", expectedDataFormat='" + expectedDataFormat + '\'' + + ", connectorProviderClassName='" + connectorProviderClassName + '\'' + + ", connectorFrameworkName='" + connectorFrameworkName + '\'' + + ", connectorInterfaceLanguage='" + connectorInterfaceLanguage + '\'' + + ", connectorInterfaces=" + connectorInterfaces + + ", targetTechnologySource='" + targetTechnologySource + '\'' + + ", targetTechnologyName='" + targetTechnologyName + '\'' + + ", targetTechnologyInterfaces=" + targetTechnologyInterfaces + + ", targetTechnologyVersions=" + targetTechnologyVersions + + ", recognizedAdditionalProperties=" + recognizedAdditionalProperties + + ", recognizedConfigurationProperties=" + recognizedConfigurationProperties + + ", recognizedSecuredProperties=" + recognizedSecuredProperties + + ", typeName='" + getTypeName() + '\'' + + ", qualifiedName='" + getQualifiedName() + '\'' + + ", additionalProperties=" + getAdditionalProperties() + + ", extendedProperties=" + getExtendedProperties() + + '}'; + } + + + /** + * Compare the values of the supplied object with those stored in the current object. + * + * @param objectToCompare supplied object + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (! super.equals(objectToCompare)) + { + return false; + } + ConnectorTypeProperties that = (ConnectorTypeProperties) objectToCompare; + return Objects.equals(displayName, that.displayName) && + Objects.equals(description, that.description) && + Objects.equals(supportedAssetTypeName, that.supportedAssetTypeName) && + Objects.equals(expectedDataFormat, that.expectedDataFormat) && + Objects.equals(connectorProviderClassName, that.connectorProviderClassName) && + Objects.equals(connectorFrameworkName, that.connectorFrameworkName) && + Objects.equals(connectorInterfaceLanguage, that.connectorInterfaceLanguage) && + Objects.equals(connectorInterfaces, that.connectorInterfaces) && + Objects.equals(targetTechnologySource, that.targetTechnologySource) && + Objects.equals(targetTechnologyName, that.targetTechnologyName) && + Objects.equals(targetTechnologyInterfaces, that.targetTechnologyInterfaces) && + Objects.equals(targetTechnologyVersions, that.targetTechnologyVersions) && + Objects.equals(recognizedAdditionalProperties, that.recognizedAdditionalProperties) && + Objects.equals(recognizedConfigurationProperties, that.recognizedConfigurationProperties) && + Objects.equals(recognizedSecuredProperties, that.recognizedSecuredProperties); + } + + + /** + * Hash of properties + * + * @return int + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), displayName, description, supportedAssetTypeName, expectedDataFormat, connectorProviderClassName, + connectorFrameworkName, connectorInterfaceLanguage, connectorInterfaces, targetTechnologySource, targetTechnologyName, + targetTechnologyInterfaces, targetTechnologyVersions, recognizedAdditionalProperties, recognizedConfigurationProperties, + recognizedSecuredProperties); + } +} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/EmbeddedConnectionProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/connections/EmbeddedConnectionProperties.java similarity index 85% rename from open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/EmbeddedConnectionProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/connections/EmbeddedConnectionProperties.java index 9f7b48ca8a3..b3e2f607a3d 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/EmbeddedConnectionProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/connections/EmbeddedConnectionProperties.java @@ -1,13 +1,13 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetmanager.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.connections; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; -import java.util.HashMap; import java.util.Map; import java.util.Objects; @@ -105,18 +105,7 @@ public void setDisplayName(String displayName) */ public Map getArguments() { - if (arguments == null) - { - return null; - } - else if (arguments.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(arguments); - } + return arguments; } @@ -140,13 +129,10 @@ public void setArguments(Map arguments) public String toString() { return "EmbeddedConnectionProperties{" + - "position=" + position + - ", displayName='" + displayName + '\'' + - ", arguments=" + arguments + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", extendedProperties=" + getExtendedProperties() + - '}'; + "position=" + position + + ", displayName='" + displayName + '\'' + + ", arguments=" + arguments + + "} " + super.toString(); } diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/connections/EndpointProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/connections/EndpointProperties.java new file mode 100644 index 00000000000..b2cd2315640 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/connections/EndpointProperties.java @@ -0,0 +1,241 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.openmetadata.properties.connections; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.SupplementaryProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * EndpointProperties describes the properties of a server endpoint. The endpoint is linked + * to the asset manager's server and describes its network endpoint. It is also linked to connection objects + * that are used by clients to connect to the asset manager. A connection is linked to each asset + * that is hosted on the asset manager. + */ +@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public class EndpointProperties extends SupplementaryProperties +{ + private String name = null; + private String description = null; + private String address = null; + private String protocol = null; + private String encryptionMethod = null; + + + /** + * Default constructor + */ + public EndpointProperties() + { + super(); + } + + + /** + * Copy/clone constructor for an Endpoint. + * + * @param template template object to copy. + */ + public EndpointProperties(EndpointProperties template) + { + super(template); + + if (template != null) + { + name = template.getName(); + description = template.getResourceDescription(); + address = template.getAddress(); + protocol = template.getProtocol(); + encryptionMethod = template.getEncryptionMethod(); + } + } + + + /** + * Set up the technical name for the endpoint. + * + * @param name String name + */ + public void setName(String name) + { + this.name = name; + } + + + /** + * Returns the stored technical name property for the endpoint. + * If no technical name is available then null is returned. + * + * @return String name + */ + public String getName() + { + return name; + } + + + /** + * Set up the technical description of the endpoint. + * + * @param resourceDescription String + */ + public void setResourceDescription(String resourceDescription) + { + this.description = resourceDescription; + } + + + /** + * Return the technical description for the endpoint. + * + * @return String technicalDescription + */ + public String getResourceDescription() + { + return description; + } + + + /** + * Set up the network address of the endpoint. + * + * @param address String resource name + */ + public void setAddress(String address) + { + this.address = address; + } + + + /** + * Returns the stored address property for the endpoint. + * If no network address is available then null is returned. + * + * @return address + */ + public String getAddress() + { + return address; + } + + + /** + * Set up the protocol to use for this Endpoint + * + * @param protocol String protocol name + */ + public void setProtocol(String protocol) + { + this.protocol = protocol; + } + + + /** + * Returns the stored protocol property for the endpoint. + * If no protocol is available then null is returned. + * + * @return protocol + */ + public String getProtocol() + { + return protocol; + } + + + /** + * Set up the encryption method used on this Endpoint. + * + * @param encryptionMethod String name + */ + public void setEncryptionMethod(String encryptionMethod) + { + this.encryptionMethod = encryptionMethod; + } + + + /** + * Returns the stored encryptionMethod property for the endpoint. This is an open type allowing the information + * needed to work with a specific encryption mechanism used by the endpoint to be defined. + * If no encryptionMethod property is available (typically because this is an unencrypted endpoint) + * then null is returned. + * + * @return encryption method information + */ + public String getEncryptionMethod() + { + return encryptionMethod; + } + + + /** + * Standard toString method. + * + * @return print out of variables in a JSON-style + */ + @Override + public String toString() + { + return "EndpointProperties{" + + "name='" + name + '\'' + + ", description='" + description + '\'' + + ", address='" + address + '\'' + + ", protocol='" + protocol + '\'' + + ", encryptionMethod='" + encryptionMethod + '\'' + + ", typeName='" + getTypeName() + '\'' + + ", qualifiedName='" + getQualifiedName() + '\'' + + ", additionalProperties=" + getAdditionalProperties() + + ", extendedProperties=" + getExtendedProperties() + + '}'; + } + + + /** + * Compare the values of the supplied object with those stored in the current object. + * + * @param objectToCompare supplied object + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + EndpointProperties that = (EndpointProperties) objectToCompare; + return Objects.equals(name, that.name) && + Objects.equals(description, that.description) && + Objects.equals(address, that.address) && + Objects.equals(protocol, that.protocol) && + Objects.equals(encryptionMethod, that.encryptionMethod); + } + + + /** + * Create a hash code for this element type. + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), name, description, address, protocol, encryptionMethod); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/connections/package-info.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/connections/package-info.java new file mode 100644 index 00000000000..87844cdb37b --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/connections/package-info.java @@ -0,0 +1,9 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +/** + * Beans for Connections, VirtualConnections, Endpoints and ConnectorTypes. + * These beans are used for editing these types of elements. They are compatible with + * the beans in the OCF. + */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.connections; \ No newline at end of file diff --git a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/AgreementProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/digitalbusiness/AgreementProperties.java similarity index 83% rename from open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/AgreementProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/digitalbusiness/AgreementProperties.java index d4619058c33..ca47887c8b6 100644 --- a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/AgreementProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/digitalbusiness/AgreementProperties.java @@ -1,12 +1,13 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalservice.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.digitalbusiness; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ReferenceableProperties; import java.util.Objects; @@ -134,16 +135,10 @@ public void setAgreementType(String agreementType) public String toString() { return "AgreementProperties{" + - "displayName='" + displayName + '\'' + - ", description='" + description + '\'' + - ", agreementType='" + agreementType + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; + "displayName='" + displayName + '\'' + + ", description='" + description + '\'' + + ", agreementType='" + agreementType + '\'' + + "} " + super.toString(); } @@ -160,7 +155,7 @@ public boolean equals(Object objectToCompare) { return true; } - if (! (objectToCompare instanceof AgreementProperties)) + if (! (objectToCompare instanceof AgreementProperties that)) { return false; } @@ -168,7 +163,6 @@ public boolean equals(Object objectToCompare) { return false; } - AgreementProperties that = (AgreementProperties) objectToCompare; return Objects.equals(displayName, that.displayName) && Objects.equals(description, that.description) && Objects.equals(agreementType, that.agreementType); } diff --git a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/AgreementRoleProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/digitalbusiness/AgreementRoleProperties.java similarity index 85% rename from open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/AgreementRoleProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/digitalbusiness/AgreementRoleProperties.java index 0ff1d67ea58..4359e3e1157 100644 --- a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/AgreementRoleProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/digitalbusiness/AgreementRoleProperties.java @@ -1,11 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalservice.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.digitalbusiness; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; import java.util.Objects; @@ -79,11 +80,8 @@ public String getRoleName() public String toString() { return "AgreementRoleProperties{" + - "roleName='" + roleName + '\'' + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", extendedProperties=" + getExtendedProperties() + - '}'; + "roleName='" + roleName + '\'' + + "} " + super.toString(); } @@ -100,7 +98,7 @@ public boolean equals(Object objectToCompare) { return true; } - if (! (objectToCompare instanceof AgreementRoleProperties)) + if (! (objectToCompare instanceof AgreementRoleProperties that)) { return false; } @@ -108,7 +106,6 @@ public boolean equals(Object objectToCompare) { return false; } - AgreementRoleProperties that = (AgreementRoleProperties) objectToCompare; return Objects.equals(roleName, that.roleName); } diff --git a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/BusinessCapabilityProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/digitalbusiness/BusinessCapabilityProperties.java similarity index 83% rename from open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/BusinessCapabilityProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/digitalbusiness/BusinessCapabilityProperties.java index 1b818eb90b6..e36eb043822 100644 --- a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/BusinessCapabilityProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/digitalbusiness/BusinessCapabilityProperties.java @@ -1,10 +1,11 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalservice.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.digitalbusiness; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ReferenceableProperties; import java.util.Objects; @@ -126,16 +127,10 @@ public void setDescription(String description) public String toString() { return "BusinessCapabilityProperties{" + - "displayName='" + displayName + '\'' + - ", description='" + description + '\'' + - ", identifier='" + identifier + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; + "displayName='" + displayName + '\'' + + ", description='" + description + '\'' + + ", identifier='" + identifier + '\'' + + "} " + super.toString(); } @@ -152,7 +147,7 @@ public boolean equals(Object objectToCompare) { return true; } - if (! (objectToCompare instanceof BusinessCapabilityProperties)) + if (! (objectToCompare instanceof BusinessCapabilityProperties that)) { return false; } @@ -160,7 +155,6 @@ public boolean equals(Object objectToCompare) { return false; } - BusinessCapabilityProperties that = (BusinessCapabilityProperties) objectToCompare; return Objects.equals(displayName, that.displayName) && Objects.equals(description, that.description) && Objects.equals(identifier, that.identifier); } diff --git a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/DigitalProductProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/digitalbusiness/DigitalProductProperties.java similarity index 96% rename from open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/DigitalProductProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/digitalbusiness/DigitalProductProperties.java index f1a3fb9706c..94843ba0a56 100644 --- a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/DigitalProductProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/digitalbusiness/DigitalProductProperties.java @@ -1,11 +1,13 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalservice.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.digitalbusiness; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.enums.DigitalProductStatus; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ClassificationProperties; import java.util.Date; import java.util.Map; @@ -23,8 +25,8 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class DigitalProductProperties extends ClassificationProperties { - private DigitalProductStatus productStatus = null; - private String productName = null; + private DigitalProductStatus productStatus = null; + private String productName = null; private String productType = null; private String description = null; private Date introductionDate = null; diff --git a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/DigitalServiceDependencyProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/digitalbusiness/DigitalServiceDependencyProperties.java similarity index 85% rename from open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/DigitalServiceDependencyProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/digitalbusiness/DigitalServiceDependencyProperties.java index e86659c7138..8779246efd6 100644 --- a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/DigitalServiceDependencyProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/digitalbusiness/DigitalServiceDependencyProperties.java @@ -1,11 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalservice.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.digitalbusiness; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; import java.util.Objects; @@ -79,11 +80,8 @@ public String getDescription() public String toString() { return "DigitalServiceDependencyProperties{" + - "description='" + description + '\'' + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", extendedProperties=" + getExtendedProperties() + - '}'; + "description='" + description + '\'' + + "} " + super.toString(); } @@ -100,7 +98,7 @@ public boolean equals(Object objectToCompare) { return true; } - if (! (objectToCompare instanceof DigitalServiceDependencyProperties)) + if (! (objectToCompare instanceof DigitalServiceDependencyProperties that)) { return false; } @@ -108,7 +106,6 @@ public boolean equals(Object objectToCompare) { return false; } - DigitalServiceDependencyProperties that = (DigitalServiceDependencyProperties) objectToCompare; return Objects.equals(description, that.description); } diff --git a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/DigitalServiceOperatorProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/digitalbusiness/DigitalServiceOperatorProperties.java similarity index 94% rename from open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/DigitalServiceOperatorProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/digitalbusiness/DigitalServiceOperatorProperties.java index c964d491d57..253c1e220c7 100644 --- a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/DigitalServiceOperatorProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/digitalbusiness/DigitalServiceOperatorProperties.java @@ -1,11 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalservice.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.digitalbusiness; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; import java.util.Objects; diff --git a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/DigitalServiceProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/digitalbusiness/DigitalServiceProperties.java similarity index 96% rename from open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/DigitalServiceProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/digitalbusiness/DigitalServiceProperties.java index 4217b30fcd0..335777a8688 100644 --- a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/DigitalServiceProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/digitalbusiness/DigitalServiceProperties.java @@ -1,10 +1,11 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalservice.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.digitalbusiness; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ReferenceableProperties; import java.util.*; diff --git a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/DigitalServiceResponsibility.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/digitalbusiness/DigitalServiceResponsibility.java similarity index 97% rename from open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/DigitalServiceResponsibility.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/digitalbusiness/DigitalServiceResponsibility.java index 29edd5b520a..bcfe62789c6 100644 --- a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/DigitalServiceResponsibility.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/digitalbusiness/DigitalServiceResponsibility.java @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalservice.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.digitalbusiness; import com.fasterxml.jackson.annotation.JsonAutoDetect; diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/digitalbusiness/DigitalSubscriptionProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/digitalbusiness/DigitalSubscriptionProperties.java new file mode 100644 index 00000000000..b187a9c57fc --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/digitalbusiness/DigitalSubscriptionProperties.java @@ -0,0 +1,141 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.digitalbusiness; + + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import java.util.Map; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * DigitalSubscriptionProperties describes the agreement between a subscriber to one or more digital products. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class DigitalSubscriptionProperties extends AgreementProperties +{ + private String supportLevel = null; + private Map serviceLevels = null; + + + /** + * Default constructor + */ + public DigitalSubscriptionProperties() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public DigitalSubscriptionProperties(DigitalSubscriptionProperties template) + { + super(template); + + if (template != null) + { + this.supportLevel = template.getSupportLevel(); + this.serviceLevels = template.getServiceLevels(); + } + } + + + /** + * Return the level of support offered in this subscription. + * + * @return string + */ + public String getSupportLevel() + { + return supportLevel; + } + + + /** + * Set up the level of support offered in this subscription. + * + * @param supportLevel string + */ + public void setSupportLevel(String supportLevel) + { + this.supportLevel = supportLevel; + } + + + /** + * Return the map of service levels agreed in this subscription. + * + * @return map + */ + public Map getServiceLevels() + { + return serviceLevels; + } + + + /** + * Set up the map of service levels agreed in this subscription. + * + * @param serviceLevels int + */ + public void setServiceLevels(Map serviceLevels) + { + this.serviceLevels = serviceLevels; + } + + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "DigitalSubscriptionProperties{" + + "supportLevel='" + supportLevel + '\'' + + ", serviceLevels=" + serviceLevels + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) return true; + if (objectToCompare == null || getClass() != objectToCompare.getClass()) return false; + if (!super.equals(objectToCompare)) return false; + DigitalSubscriptionProperties that = (DigitalSubscriptionProperties) objectToCompare; + return Objects.equals(supportLevel, that.supportLevel) && Objects.equals(serviceLevels, that.serviceLevels); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), getSupportLevel(), getServiceLevels()); + } +} diff --git a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/DigitalSupportProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/digitalbusiness/DigitalSupportProperties.java similarity index 77% rename from open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/DigitalSupportProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/digitalbusiness/DigitalSupportProperties.java index 54cc2e20111..f846207745d 100644 --- a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/DigitalSupportProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/digitalbusiness/DigitalSupportProperties.java @@ -1,13 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalservice.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.digitalbusiness; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; @@ -48,10 +47,6 @@ public DigitalSupportProperties(DigitalSupportProperties template) @Override public String toString() { - return "DigitalSupportProperties{" + - "effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", extendedProperties=" + getExtendedProperties() + - '}'; + return "DigitalSupportProperties{} " + super.toString(); } } diff --git a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/OrganizationalCapabilityProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/digitalbusiness/OrganizationalCapabilityProperties.java similarity index 85% rename from open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/OrganizationalCapabilityProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/digitalbusiness/OrganizationalCapabilityProperties.java index 3aeb419f7f6..e088d76dfba 100644 --- a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/OrganizationalCapabilityProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/digitalbusiness/OrganizationalCapabilityProperties.java @@ -1,11 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalservice.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.digitalbusiness; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; import java.util.Objects; @@ -79,11 +80,8 @@ public String getScope() public String toString() { return "OrganizationalCapabilityProperties{" + - "scope='" + scope + '\'' + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", extendedProperties=" + getExtendedProperties() + - '}'; + "scope='" + scope + '\'' + + "} " + super.toString(); } @@ -100,7 +98,7 @@ public boolean equals(Object objectToCompare) { return true; } - if (! (objectToCompare instanceof OrganizationalCapabilityProperties)) + if (! (objectToCompare instanceof OrganizationalCapabilityProperties that)) { return false; } @@ -108,7 +106,6 @@ public boolean equals(Object objectToCompare) { return false; } - OrganizationalCapabilityProperties that = (OrganizationalCapabilityProperties) objectToCompare; return Objects.equals(scope, that.scope); } diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/digitalbusiness/package-info.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/digitalbusiness/package-info.java new file mode 100644 index 00000000000..928b9b7c855 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/digitalbusiness/package-info.java @@ -0,0 +1,7 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +/** + * Beans for representing digital services, digital products and business capabilities. + */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.digitalbusiness; \ No newline at end of file diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/externalreferences/ExternalReferenceLinkProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/externalreferences/ExternalReferenceLinkProperties.java new file mode 100644 index 00000000000..0facae541e4 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/externalreferences/ExternalReferenceLinkProperties.java @@ -0,0 +1,176 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.externalreferences; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * ExternalReferenceLinkProperties provides a structure for the properties that link an external reference to an object. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ExternalReferenceLinkProperties extends RelationshipProperties +{ + private String linkId = null; + private String linkDescription = null; + private String pages = null; + + + /** + * Default constructor + */ + public ExternalReferenceLinkProperties() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public ExternalReferenceLinkProperties(ExternalReferenceLinkProperties template) + { + super (template); + + if (template != null) + { + this.linkId = template.getLinkId(); + this.linkDescription = template.getLinkDescription(); + this.pages = template.getPages(); + } + } + + + /** + * Return the identifier that this reference is to be known as with respect to the linked object. + * + * @return String identifier + */ + public String getLinkId() + { + return linkId; + } + + + /** + * Set up the identifier that this reference is to be known as with respect to the linked object. + * + * @param linkId String identifier + */ + public void setLinkId(String linkId) + { + this.linkId = linkId; + } + + + /** + * Return the description of the external reference with respect to the linked object. + * + * @return string + */ + public String getLinkDescription() + { + return linkDescription; + } + + + /** + * Set up the description of the external reference with respect to the linked object. + * + * @param linkDescription string + */ + public void setLinkDescription(String linkDescription) + { + this.linkDescription = linkDescription; + } + + + /** + * Return the page range for the reference. + * + * @return string + */ + public String getPages() + { + return pages; + } + + + /** + * Set up the page range for the reference. + * + * @param pages string + */ + public void setPages(String pages) + { + this.pages = pages; + } + + + /** + * JSON-style toString. + * + * @return list of properties and their values. + */ + @Override + public String toString() + { + return "ExternalReferenceLinkProperties{" + + "linkId='" + linkId + '\'' + + ", linkDescription='" + linkDescription + '\'' + + ", pages='" + pages + '\'' + + ", effectiveFrom=" + getEffectiveFrom() + + ", effectiveTo=" + getEffectiveTo() + + ", extendedProperties=" + getExtendedProperties() + + '}'; + } + + + /** + * Equals method that returns true if containing properties are the same. + * + * @param objectToCompare object to compare + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (! (objectToCompare instanceof ExternalReferenceLinkProperties)) + { + return false; + } + if (! super.equals(objectToCompare)) + { + return false; + } + ExternalReferenceLinkProperties that = (ExternalReferenceLinkProperties) objectToCompare; + return Objects.equals(linkId, that.linkId) && Objects.equals(linkDescription, that.linkDescription) + && Objects.equals(pages, that.pages); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), linkId, linkDescription, pages); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/externalreferences/ExternalReferenceProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/externalreferences/ExternalReferenceProperties.java new file mode 100644 index 00000000000..293ac3cf3d8 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/externalreferences/ExternalReferenceProperties.java @@ -0,0 +1,270 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.externalreferences; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ReferenceableProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * ExternalReferenceProperties stores information about an link to an external resource that is relevant to this element. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ExternalReferenceProperties extends ReferenceableProperties +{ + private String localReferenceId = null; + private String displayName = null; + private String linkDescription = null; + private String resourceDescription = null; + private String uri = null; + private String version = null; + private String organization = null; + + + /** + * Default constructor + */ + public ExternalReferenceProperties() + { + super(); + } + + + /** + * Copy/clone constructor. + * + * @param template element to copy + */ + public ExternalReferenceProperties(ExternalReferenceProperties template) + { + super(template); + + if (template != null) + { + /* + * Copy the values from the supplied template. + */ + localReferenceId = template.getLocalReferenceId(); + linkDescription = template.getLinkDescription(); + displayName = template.getDisplayName(); + uri = template.getURI(); + resourceDescription = template.getResourceDescription(); + version = template.getVersion(); + organization = template.getOrganization(); + } + } + + + /** + * Return the identifier given to this reference (with respect to this governance definition). + * + * @return localReferenceId + */ + public String getLocalReferenceId() + { + return localReferenceId; + } + + + /** + * Set up the identifier given to this reference (with respect to this governance definition). + * + * @param localReferenceId String name + */ + public void setLocalReferenceId(String localReferenceId) + { + this.localReferenceId = localReferenceId; + } + + + /** + * Return the display name of this external reference. + * + * @return String display name. + */ + public String getDisplayName() { return displayName; } + + + /** + * Set up the display name of this external reference. + * + * @param displayName - string name + */ + public void setDisplayName(String displayName) + { + this.displayName = displayName; + } + + + /** + * Return the description of the reference (with respect to this governance definition). + * + * @return String link description. + */ + public String getLinkDescription() { return linkDescription; } + + + /** + * Set up the description of the reference (with respect to the governance definition this reference is linked to). + * + * @param linkDescription String description + */ + public void setLinkDescription(String linkDescription) + { + this.linkDescription = linkDescription; + } + + + /** + * Return the description of the resource that this external reference represents. + * + * @return String description + */ + public String getResourceDescription() { return resourceDescription; } + + + /** + * Set up the description of the resource that this external reference represents. + * + * @param resourceDescription String description + */ + public void setResourceDescription(String resourceDescription) + { + this.resourceDescription = resourceDescription; + } + + + /** + * Return the URI used to retrieve the resource that this external reference represents. + * + * @return String URI + */ + public String getURI() { return uri; } + + + /** + * Set up the URI used to retrieve the resource that this external reference represents. + * + * @param uri String URI + */ + public void setURI(String uri) + { + this.uri = uri; + } + + + + /** + * Return the version of the resource that this external reference represents. + * + * @return String version identifier + */ + public String getVersion() { return version; } + + + /** + * Set up the version of the resource that this external reference represents. + * + * @param version String identifier + */ + public void setVersion(String version) + { + this.version = version; + } + + + /** + * Return the name of the organization that owns the resource that this external reference represents. + * + * @return String organization name + */ + public String getOrganization() { return organization; } + + + /** + * Set up the name of the organization that owns the resource that this external reference represents. + * + * @param organization String name + */ + public void setOrganization(String organization) + { + this.organization = organization; + } + + + /** + * Standard toString method. + * + * @return print out of variables in a JSON-style + */ + @Override + public String toString() + { + return "ExternalReferenceProperties{" + + "localReferenceId='" + localReferenceId + '\'' + + ", displayName='" + displayName + '\'' + + ", linkDescription='" + linkDescription + '\'' + + ", resourceDescription='" + resourceDescription + '\'' + + ", uri='" + uri + '\'' + + ", version='" + version + '\'' + + ", organization='" + organization + '\'' + + ", URI='" + getURI() + '\'' + + ", typeName='" + getTypeName() + '\'' + + ", qualifiedName='" + getQualifiedName() + '\'' + + ", additionalProperties=" + getAdditionalProperties() + + ", extendedProperties=" + getExtendedProperties() + + '}'; + } + + + /** + * Compare the values of the supplied object with those stored in the current object. + * + * @param objectToCompare supplied object + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + ExternalReferenceProperties that = (ExternalReferenceProperties) objectToCompare; + return Objects.equals(localReferenceId, that.localReferenceId) && + Objects.equals(displayName, that.displayName) && + Objects.equals(linkDescription, that.linkDescription) && + Objects.equals(resourceDescription, that.resourceDescription) && + Objects.equals(uri, that.uri) && + Objects.equals(version, that.version) && + Objects.equals(organization, that.organization); + } + + + /** + * Uses the guid to create a hashcode. + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(localReferenceId, displayName, linkDescription, resourceDescription, uri, version, organization); + } +} \ No newline at end of file diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/externalreferences/package-info.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/externalreferences/package-info.java new file mode 100644 index 00000000000..c1c2a00748f --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/externalreferences/package-info.java @@ -0,0 +1,7 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +/** + * Beans for external references and related media. + */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.externalreferences; \ No newline at end of file diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/feedback/CommentProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/feedback/CommentProperties.java new file mode 100644 index 00000000000..c7ab3b78eed --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/feedback/CommentProperties.java @@ -0,0 +1,155 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.feedback; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.enums.CommentType; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ReferenceableProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * The CommentProperties bean stores information about a comment connected to an asset. Comments provide informal feedback to assets + * and can be added at any time. + * Comments have the userId of the person who added the feedback, along with their comment text. + * The content of the comment is a personal statement (which is why the user's id is in the comment) + * and there is no formal review of the content. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class CommentProperties extends ReferenceableProperties +{ + private CommentType commentType = null; + private String commentText = null; + + /** + * Default constructor + */ + public CommentProperties() + { + super(); + } + + + /** + * Copy/clone constructor. + * + * @param template element to copy + */ + public CommentProperties(CommentProperties template) + { + super(template); + + if (template != null) + { + /* + * Copy the values from the supplied comment. + */ + commentType = template.getCommentType(); + commentText = template.getCommentText(); + } + } + + + /** + * Return an enum that describes the type of comment. + * + * @return CommentType enum + */ + public CommentType getCommentType() + { + return commentType; + } + + + /** + * Set up the enum that describes the type of comment. + * + * @param commentType CommentType enum + */ + public void setCommentType(CommentType commentType) + { + this.commentType = commentType; + } + + + /** + * Return the comment text. + * + * @return String commentText + */ + public String getCommentText() + { + return commentText; + } + + + /** + * Set up the comment text. + * + * @param commentText String text + */ + public void setCommentText(String commentText) + { + this.commentText = commentText; + } + + + /** + * Standard toString method. + * + * @return print out of variables in a JSON-style + */ + @Override + public String toString() + { + return "CommentProperties{" + + "commentType=" + commentType + + ", commentText='" + commentText + '\'' + + "} " + super.toString(); + } + + /** + * Compare the values of the supplied object with those stored in the current object. + * + * @param objectToCompare supplied object + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + CommentProperties that = (CommentProperties) objectToCompare; + return commentType == that.commentType && + Objects.equals(commentText, that.commentText); + } + + + /** + * Create a hash code for this element type. + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), commentType, commentText); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/feedback/FeedbackProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/feedback/FeedbackProperties.java new file mode 100644 index 00000000000..6f9b67f7168 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/feedback/FeedbackProperties.java @@ -0,0 +1,82 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.feedback; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * FeedbackProperties provides a base class for passing feedback objects as a request body over a REST API. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class FeedbackProperties extends RelationshipProperties +{ + private boolean isPublic = false; + + + /** + * Default constructor + */ + public FeedbackProperties() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public FeedbackProperties(FeedbackProperties template) + { + super(template); + + if (template != null) + { + this.isPublic = template.getIsPublic(); + } + } + + + + + /** + * Return whether the feedback is private or not + * + * @return boolean + */ + public boolean getIsPublic() + { + return isPublic; + } + + + /** + * Set up the privacy flag. + * + * @param aPrivate boolean + */ + public void setIsPublic(boolean aPrivate) + { + isPublic = aPrivate; + } + + + /** + * JSON-style toString. + * + * @return list of properties and their values. + */ + @Override + public String toString() + { + return "FeedbackProperties{" + '}'; + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/feedback/InformalTagProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/feedback/InformalTagProperties.java new file mode 100644 index 00000000000..1468475efe3 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/feedback/InformalTagProperties.java @@ -0,0 +1,209 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.feedback; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * InformalTagProperties stores information about a tag connected to an asset. + * InformalTags provide informal classifications to assets + * and can be added at any time. + *

          + * InformalTags have the userId of the person who added the tag, the name of the tag and its description. + *

          + * The content of the tag is a personal judgement (which is why the user's id is in the tag) + * and there is no formal review of the tags. However, they can be used as a basis for crowd-sourcing + * Glossary terms. + *

          + * Private InformalTags are only returned to the user that created them. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class InformalTagProperties +{ + private boolean isPrivateTag = false; + private String name = null; + private String description = null; + private String user = null; + + + /** + * Default constructor + */ + public InformalTagProperties() + { + super(); + } + + + /** + * Copy/clone constructor. + * + * @param template element to copy + */ + public InformalTagProperties(InformalTagProperties template) + { + if (template != null) + { + isPrivateTag = template.getIsPrivateTag(); + user = template.getUser(); + name = template.getName(); + description = template.getDescription(); + } + } + + + /** + * Return boolean flag to say whether the tag is private or not. A private tag is only seen by the + * person who set it up. Public tags are visible to everyone. + * + * @return boolean is private flag + */ + public boolean getIsPrivateTag() { + return isPrivateTag; + } + + + /** + * Set up boolean flag to say whether the tag is private or not. A private tag is only seen by the + * person who set it up. Public tags are visible to everyone. + * + * @param privateTag indicator of a private tag + */ + public void setIsPrivateTag(boolean privateTag) + { + isPrivateTag = privateTag; + } + + + /** + * Return the user id of the person who created the tag. Null means the user id is not known. + * + * @return String tagging user + */ + public String getUser() { + return user; + } + + + /** + * Set up the user id of the person who created the tag. Null means the user id is not known. + * + * @param user String identifier of the creator of the tag. + */ + public void setUser(String user) + { + this.user = user; + } + + + /** + * Return the name of the tag. It is not valid to have a tag with no name. However, there is a point where + * the tag object is created and the tag name not yet set, so null is a possible response. + * + * @return String tag name + */ + public String getName() { + return name; + } + + + /** + * Set up the name of the tag. It is not valid to have a tag with no name. However, there is a point where + * the tag object is created and the tag name not yet set, so null is a possible response. + * + * @param name String tag name + */ + public void setName(String name) + { + this.name = name; + } + + + /** + * Return the tag description null means no description is available. + * + * @return String tag description + */ + public String getDescription() + { + return description; + } + + + /** + * Set up the tag description null means no description is available. + * + * @param tagDescription tag description + */ + public void setDescription(String tagDescription) { + this.description = tagDescription; + } + + + /** + * Standard toString method. + * + * @return print out of variables in a JSON-style + */ + @Override + public String toString() + { + return "InformalTagProperties{" + + ", isPrivateTag=" + isPrivateTag + + ", name='" + name + '\'' + + ", description='" + description + '\'' + + ", user='" + user + '\'' + + '}'; + } + + + /** + * Compare the values of the supplied object with those stored in the current object. + * + * @param objectToCompare supplied object + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof InformalTagProperties)) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + InformalTagProperties that = (InformalTagProperties) objectToCompare; + return getIsPrivateTag() == that.getIsPrivateTag() && + Objects.equals(getName(), that.getName()) && + Objects.equals(getDescription(), that.getDescription()) && + Objects.equals(getUser(), that.getUser()); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(isPrivateTag, name, description, user); + } +} \ No newline at end of file diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/feedback/LikeProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/feedback/LikeProperties.java new file mode 100644 index 00000000000..8cbbe3763c4 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/feedback/LikeProperties.java @@ -0,0 +1,115 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.feedback; + + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * The LikeProperties object records a single user's "like" of an element. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class LikeProperties +{ + private String user = null; + + + /** + * Default constructor + */ + public LikeProperties() + { + super(); + } + + + /** + * Copy/clone constructor. + * + * @param template element to copy + */ + public LikeProperties(LikeProperties template) + { + if (template != null) + { + user = template.getUser(); + } + } + + + /** + * Return the user id of the person who created the like. Null means the user id is not known. + * + * @return String liking user + */ + public String getUser() { + return user; + } + + + /** + * Set up the user id of the person who created the like. Null means the user id is not known. + * + * @param user String liking user + */ + public void setUser(String user) + { + this.user = user; + } + + /** + * Standard toString method. + * + * @return print out of variables in a JSON-style + */ + @Override + public String toString() + { + return "LikeProperties{" + + "user='" + user + '\'' + + '}'; + } + + + /** + * Compare the values of the supplied object with those stored in the current object. + * + * @param objectToCompare supplied object + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + LikeProperties like = (LikeProperties) objectToCompare; + return Objects.equals(getUser(), like.getUser()); + } + + + /** + * Hash of properties + * + * @return int + */ + @Override + public int hashCode() + { + return Objects.hash(user); + } +} \ No newline at end of file diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/feedback/NoteLogProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/feedback/NoteLogProperties.java new file mode 100644 index 00000000000..670fc3e44a8 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/feedback/NoteLogProperties.java @@ -0,0 +1,152 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.feedback; + + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ReferenceableProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * NoteLogHeader manages a list of notes for an element + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class NoteLogProperties extends ReferenceableProperties +{ + + protected String displayName = null; + protected String description = null; + + + /** + * Default constructor + */ + public NoteLogProperties() + { + super(); + } + + + /** + * Copy/clone constructor. + * + * @param template note log to copy + */ + public NoteLogProperties(NoteLogProperties template) + { + super(template); + + if (template != null) + { + displayName = template.getDisplayName(); + description = template.getDescription(); + } + } + + + /** + * Return the stored display name property for the note log. + * If no display name is available then null is returned. + * + * @return String Name + */ + public String getDisplayName() + { + return displayName; + } + + + /** + * Set up the stored display name property for the note log. + * + * @param displayName - String name + */ + public void setDisplayName(String displayName) + { + this.displayName = displayName; + } + + + /** + * Return the stored description property for the note log. + * If no description is provided then null is returned. + * + * @return description + */ + public String getDescription() + { + return description; + } + + + /** + * Set up the stored description property for the note log. + * + * @param description String text + */ + public void setDescription(String description) + { + this.description = description; + } + + + /** + * Standard toString method. + * + * @return print out of variables in a JSON-style + */ + @Override + public String toString() + { + return "NoteLogProperties{" + + "displayName='" + displayName + '\'' + + ", description='" + description + '\'' + + "} " + super.toString(); + } + + /** + * Compare the values of the supplied object with those stored in the current object. + * + * @param objectToCompare supplied object + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + NoteLogProperties noteLog = (NoteLogProperties) objectToCompare; + return Objects.equals(getDisplayName(), noteLog.getDisplayName()) && + Objects.equals(getDescription(), noteLog.getDescription()); + } + + + /** + * Hash of properties + * + * @return int + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), getDisplayName(), getDescription()); + } +} \ No newline at end of file diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/feedback/NoteProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/feedback/NoteProperties.java new file mode 100644 index 00000000000..3ead64ca6e2 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/feedback/NoteProperties.java @@ -0,0 +1,145 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.feedback; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ReferenceableProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * Note defines the properties of a single note in a note log. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class NoteProperties extends ReferenceableProperties +{ + private String title = null; + private String text = null; + + + + /** + * Default constructor + */ + public NoteProperties() + { + super(); + } + + + /** + * Copy/clone constructor. + * + * @param template note to copy + */ + public NoteProperties(NoteProperties template) + { + super(template); + + if (template != null) + { + title = template.getTitle(); + text = template.getText(); + } + } + + + /** + * Return the title. + * + * @return string + */ + public String getTitle() + { + return title; + } + + + /** + * Set up the title. + * + * @param title string + */ + public void setTitle(String title) + { + this.title = title; + } + + + /** + * Return the text of the note. + * + * @return String text + */ + public String getText() { return text; } + + + /** + * Set up the text of the note. + * + * @param text String text + */ + public void setText(String text) + { + this.text = text; + } + + + /** + * Standard toString method. + * + * @return print out of variables in a JSON-style + */ + @Override + public String toString() + { + return "NoteProperties{" + + "title='" + title + '\'' + + ", text='" + text + '\'' + + "} " + super.toString(); + } + + + /** + * Compare the values of the supplied object with those stored in the current object. + * + * @param objectToCompare supplied object + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (! (objectToCompare instanceof NoteProperties that)) + { + return false; + } + if (! super.equals(objectToCompare)) + { + return false; + } + return Objects.equals(title, that.title) && Objects.equals(text, that.text); + } + + + /** + * Hash of properties + * + * @return int + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), title, text); + } +} \ No newline at end of file diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/feedback/RatingProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/feedback/RatingProperties.java new file mode 100644 index 00000000000..472145607f1 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/feedback/RatingProperties.java @@ -0,0 +1,148 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.feedback; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.enums.StarRating; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * RatingProperties stores information about a rating connected to an asset. Ratings provide informal feedback on the quality of assets + * and can be added at any time. + *

          + * Ratings have the userId of the person who added it, a star rating and an optional review comment. + *

          + * The content of the rating is a personal judgement (which is why the user's id is in the object) + * and there is no formal review of the ratings. However, they can be used as a basis for crowd-sourcing + * feedback to asset owners. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class RatingProperties +{ + private StarRating starRating = null; + private String review = null; + + /** + * Default constructor + */ + public RatingProperties() + { + super(); + } + + + /** + * Copy/clone constructor. + * + * @param template element to copy + */ + public RatingProperties(RatingProperties template) + { + if (template != null) + { + starRating = template.getStarRating(); + review = template.getReview(); + } + } + + + /** + * Return the stars for the rating. + * + * @return StarRating enum + */ + public StarRating getStarRating() { + return starRating; + } + + + /** + * Set up the stars for the rating. + * + * @param starRating StarRating enum + */ + public void setStarRating(StarRating starRating) + { + this.starRating = starRating; + } + + + /** + * Return the review comments - null means no review is available. + * + * @return String review comments + */ + public String getReview() + { + return review; + } + + + /** + * Set up the review comments - null means no review is available. + * + * @param review String review comments + */ + public void setReview(String review) + { + this.review = review; + } + + + /** + * Standard toString method. + * + * @return print out of variables in a JSON-style + */ + @Override + public String toString() + { + return "RatingProperties{" + + "starRating=" + starRating + + ", review='" + review + '\'' + + '}'; + } + + + /** + * Compare the values of the supplied object with those stored in the current object. + * + * @param objectToCompare supplied object + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + RatingProperties rating = (RatingProperties) objectToCompare; + return getStarRating() == rating.getStarRating() && + Objects.equals(getReview(), rating.getReview()); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(starRating, review); + } +} \ No newline at end of file diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/feedback/TagProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/feedback/TagProperties.java new file mode 100644 index 00000000000..b8ac3976263 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/feedback/TagProperties.java @@ -0,0 +1,187 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.feedback; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * TagProperties stores information about a tag connected to an asset. + * InformalTags provide informal classifications to assets + * and can be added at any time. + *

          + * InformalTags have the userId of the person who added the tag, the name of the tag and its description. + *

          + * The content of the tag is a personal judgement (which is why the user's id is in the tag) + * and there is no formal review of the tags. However, they can be used as a basis for crowd-sourcing + * Glossary terms. + *

          + * Private InformalTags are only returned to the user that created them. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class TagProperties +{ + private boolean isPrivateTag = false; + private String name = null; + private String description = null; + + + /** + * Default constructor + */ + public TagProperties() + { + super(); + } + + + /** + * Copy/clone constructor. + * + * @param template element to copy + */ + public TagProperties(TagProperties template) + { + if (template != null) + { + isPrivateTag = template.getIsPrivateTag(); + name = template.getName(); + description = template.getDescription(); + } + } + + + /** + * Return boolean flag to say whether the tag is private or not. A private tag is only seen by the + * person who set it up. Public tags are visible to everyone. + * + * @return boolean is private flag + */ + public boolean getIsPrivateTag() { + return isPrivateTag; + } + + + /** + * Set up boolean flag to say whether the tag is private or not. A private tag is only seen by the + * person who set it up. Public tags are visible to everyone. + * + * @param privateTag indicator of a private tag + */ + public void setIsPrivateTag(boolean privateTag) + { + isPrivateTag = privateTag; + } + + + /** + * Return the name of the tag. It is not valid to have a tag with no name. However, there is a point where + * the tag object is created and the tag name not yet set, so null is a possible response. + * + * @return String tag name + */ + public String getName() { + return name; + } + + + /** + * Set up the name of the tag. It is not valid to have a tag with no name. However, there is a point where + * the tag object is created and the tag name not yet set, so null is a possible response. + * + * @param name String tag name + */ + public void setName(String name) + { + this.name = name; + } + + + /** + * Return the tag description null means no description is available. + * + * @return String tag description + */ + public String getDescription() + { + return description; + } + + + /** + * Set up the tag description null means no description is available. + * + * @param tagDescription tag description + */ + public void setDescription(String tagDescription) { + this.description = tagDescription; + } + + + /** + * Standard toString method. + * + * @return print out of variables in a JSON-style + */ + @Override + public String toString() + { + return "TagProperties{" + + "isPrivateTag=" + isPrivateTag + + ", name='" + name + '\'' + + ", description='" + description + '\'' + + '}'; + } + + + /** + * Compare the values of the supplied object with those stored in the current object. + * + * @param objectToCompare supplied object + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (! (objectToCompare instanceof TagProperties that)) + { + return false; + } + + if (isPrivateTag != that.isPrivateTag) + { + return false; + } + if (name != null ? ! name.equals(that.name) : that.name != null) + { + return false; + } + return description != null ? description.equals(that.description) : that.description == null; + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + int result = (isPrivateTag ? 1 : 0); + result = 31 * result + (name != null ? name.hashCode() : 0); + result = 31 * result + (description != null ? description.hashCode() : 0); + return result; + } +} \ No newline at end of file diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/feedback/package-info.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/feedback/package-info.java new file mode 100644 index 00000000000..d5585f7e755 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/feedback/package-info.java @@ -0,0 +1,7 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +/** + * Beans that represent feedback elements. + */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.feedback; \ No newline at end of file diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/ActivityDescriptionProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/glossaries/ActivityDescriptionProperties.java similarity index 89% rename from open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/ActivityDescriptionProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/glossaries/ActivityDescriptionProperties.java index 37fcf72072c..b57e8f2b057 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/ActivityDescriptionProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/glossaries/ActivityDescriptionProperties.java @@ -1,12 +1,13 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetmanager.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.glossaries; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import org.odpi.openmetadata.frameworks.openmetadata.enums.GlossaryTermActivityType; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ClassificationProperties; import java.util.Objects; @@ -81,11 +82,8 @@ public void setActivityType(GlossaryTermActivityType activityType) public String toString() { return "ActivityDescriptionProperties{" + - "activityType=" + activityType + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", extendedProperties=" + getExtendedProperties() + - '}'; + "activityType=" + activityType + + "} " + super.toString(); } diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/CanonicalVocabularyProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/glossaries/CanonicalVocabularyProperties.java similarity index 89% rename from open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/CanonicalVocabularyProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/glossaries/CanonicalVocabularyProperties.java index a1e92e0bea2..a6a3069d137 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/CanonicalVocabularyProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/glossaries/CanonicalVocabularyProperties.java @@ -1,11 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetmanager.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.glossaries; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ClassificationProperties; import java.util.Objects; @@ -83,11 +84,8 @@ public void setScope(String scope) public String toString() { return "CanonicalVocabularyProperties{" + - "scope='" + scope + '\'' + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", extendedProperties=" + getExtendedProperties() + - '}'; + "scope='" + scope + '\'' + + "} " + super.toString(); } diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/EditingGlossaryProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/glossaries/EditingGlossaryProperties.java similarity index 88% rename from open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/EditingGlossaryProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/glossaries/EditingGlossaryProperties.java index ee72f55f8a7..78f2fe7e9bb 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/EditingGlossaryProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/glossaries/EditingGlossaryProperties.java @@ -1,11 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetmanager.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.glossaries; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ClassificationProperties; import java.util.Objects; @@ -79,11 +80,8 @@ public void setDescription(String description) public String toString() { return "EditingGlossaryProperties{" + - "description='" + description + '\'' + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", extendedProperties=" + getExtendedProperties() + - '}'; + "description='" + description + '\'' + + "} " + super.toString(); } diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/ExternalGlossaryElementLinkProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/glossaries/ExternalGlossaryElementLinkProperties.java similarity index 91% rename from open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/ExternalGlossaryElementLinkProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/glossaries/ExternalGlossaryElementLinkProperties.java index 59e829531c8..2d1bec30547 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/ExternalGlossaryElementLinkProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/glossaries/ExternalGlossaryElementLinkProperties.java @@ -1,11 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetmanager.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.glossaries; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; import java.util.Date; import java.util.Objects; @@ -151,14 +152,13 @@ public void setLastVerified(Date lastVerified) public String toString() { return "ExternalGlossaryElementLinkProperties{" + - "elementIdentifier='" + elementIdentifier + '\'' + - ", elementDescription='" + elementDescription + '\'' + - ", steward='" + steward + '\'' + - ", lastVerified=" + lastVerified + - '}'; + "elementIdentifier='" + elementIdentifier + '\'' + + ", elementDescription='" + elementDescription + '\'' + + ", steward='" + steward + '\'' + + ", lastVerified=" + lastVerified + + "} " + super.toString(); } - /** * Compare the values of the supplied object with those stored in the current object. * diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/glossaries/ExternalGlossaryLinkProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/glossaries/ExternalGlossaryLinkProperties.java new file mode 100644 index 00000000000..23e55a35aa5 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/glossaries/ExternalGlossaryLinkProperties.java @@ -0,0 +1,50 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.openmetadata.properties.glossaries; + +import com.fasterxml.jackson.annotation.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.externalreferences.ExternalReferenceProperties; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * ExternalGlossaryLinkProperties describes the properties of URL link to a remote glossary. + */ +@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public class ExternalGlossaryLinkProperties extends ExternalReferenceProperties +{ + /** + * Default constructor + */ + public ExternalGlossaryLinkProperties() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template template object to copy. + */ + public ExternalGlossaryLinkProperties(ExternalGlossaryLinkProperties template) + { + super (template); + } + + + /** + * Standard toString method. + * + * @return print out of variables in a JSON-style + */ + @Override + public String toString() + { + return "ExternalGlossaryLinkProperties{} " + super.toString(); + } +} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/GlossaryCategoryProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/glossaries/GlossaryCategoryProperties.java similarity index 80% rename from open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/GlossaryCategoryProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/glossaries/GlossaryCategoryProperties.java index 9b6dfd41fcb..5b640d0da9e 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/GlossaryCategoryProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/glossaries/GlossaryCategoryProperties.java @@ -1,11 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetmanager.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.glossaries; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ReferenceableProperties; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; @@ -102,13 +103,8 @@ public void setDescription(String description) public String toString() { return "GlossaryCategoryProperties{" + - "displayName='" + displayName + '\'' + - ", description='" + description + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; + "displayName='" + displayName + '\'' + + ", description='" + description + '\'' + + "} " + super.toString(); } } diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/GlossaryProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/glossaries/GlossaryProperties.java similarity index 86% rename from open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/GlossaryProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/glossaries/GlossaryProperties.java index eb6adbfc6cb..2c55c4e56df 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/GlossaryProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/glossaries/GlossaryProperties.java @@ -1,9 +1,10 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetmanager.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.glossaries; import com.fasterxml.jackson.annotation.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ReferenceableProperties; import java.util.Objects; @@ -148,16 +149,11 @@ public void setUsage(String usage) public String toString() { return "GlossaryProperties{" + - "displayName='" + displayName + '\'' + - ", description='" + description + '\'' + - ", language='" + language + '\'' + - ", usage='" + usage + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; + "displayName='" + displayName + '\'' + + ", description='" + description + '\'' + + ", language='" + language + '\'' + + ", usage='" + usage + '\'' + + "} " + super.toString(); } diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/GlossaryTermCategorization.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/glossaries/GlossaryTermCategorization.java similarity index 89% rename from open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/GlossaryTermCategorization.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/glossaries/GlossaryTermCategorization.java index d3e37daf4de..668cd792d26 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/GlossaryTermCategorization.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/glossaries/GlossaryTermCategorization.java @@ -1,12 +1,13 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetmanager.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.glossaries; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import org.odpi.openmetadata.frameworks.openmetadata.enums.GlossaryTermRelationshipStatus; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; import java.util.Objects; @@ -103,12 +104,9 @@ public GlossaryTermRelationshipStatus getStatus() public String toString() { return "GlossaryTermCategorization{" + - "description='" + description + '\'' + - ", status=" + status + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", extendedProperties=" + getExtendedProperties() + - '}'; + "description='" + description + '\'' + + ", status=" + status + + "} " + super.toString(); } diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/GlossaryTermContextDefinition.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/glossaries/GlossaryTermContextDefinition.java similarity index 89% rename from open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/GlossaryTermContextDefinition.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/glossaries/GlossaryTermContextDefinition.java index 3cbe8954178..05ef9ec97fa 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/GlossaryTermContextDefinition.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/glossaries/GlossaryTermContextDefinition.java @@ -1,11 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetmanager.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.glossaries; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ClassificationProperties; import java.util.Objects; @@ -103,12 +104,9 @@ public String getScope() public String toString() { return "GlossaryTermContextDefinition{" + - "description='" + description + '\'' + - ", scope='" + scope + '\'' + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", extendedProperties=" + getExtendedProperties() + - '}'; + "description='" + description + '\'' + + ", scope='" + scope + '\'' + + "} " + super.toString(); } diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/glossaries/GlossaryTermProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/glossaries/GlossaryTermProperties.java new file mode 100644 index 00000000000..af40fe93b58 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/glossaries/GlossaryTermProperties.java @@ -0,0 +1,287 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.glossaries; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ReferenceableProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * GlossaryTermProperties contains the semantic definition (meaning) of a word or phrase + * (term - collectively called terminology). + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class GlossaryTermProperties extends ReferenceableProperties +{ + private String displayName = null; + private String summary = null; + private String description = null; + private String examples = null; + private String abbreviation = null; + private String usage = null; + private String publishVersionIdentifier = null; + + + /** + * Default constructor + */ + public GlossaryTermProperties() + { + super(); + } + + + /** + * Copy/clone constructor. + * + * @param template object to copy + */ + public GlossaryTermProperties(GlossaryTermProperties template) + { + super(template); + + if (template != null) + { + displayName = template.getDisplayName(); + summary = template.getSummary(); + description = template.getDescription(); + examples = template.getExamples(); + abbreviation = template.getAbbreviation(); + usage = template.getUsage(); + usage = template.getPublishVersionIdentifier(); + } + } + + + /** + * Returns the stored display name property for the term. + * If no display name is available then null is returned. + * + * @return String name + */ + public String getDisplayName() + { + return displayName; + } + + + /** + * Set up the stored display name property for the term. + * + * @param displayName String name + */ + public void setDisplayName(String displayName) + { + this.displayName = displayName; + } + + + /** + * Return the short (1-2 sentence) description of the term. + * + * @return string text + */ + public String getSummary() + { + return summary; + } + + + /** + * Set up the short (1-2 sentence) description of the term. + * + * @param summary string text + */ + public void setSummary(String summary) + { + this.summary = summary; + } + + + /** + * Returns the stored description property for the term. + * If no description is provided then null is returned. + * + * @return String text + */ + public String getDescription() + { + return description; + } + + + /** + * Set up the stored description property for the term. + * + * @param description String text + */ + public void setDescription(String description) + { + this.description = description; + } + + + /** + * Set up the description of one or more examples. + * + * @return string text + */ + public String getExamples() + { + return examples; + } + + + /** + * Return the description of one or more examples. + * + * @param examples string text + */ + public void setExamples(String examples) + { + this.examples = examples; + } + + + /** + * Return the abbreviation used for this term. + * + * @return string text + */ + public String getAbbreviation() + { + return abbreviation; + } + + + /** + * Set up the abbreviation used for this term. + * + * @param abbreviation string text + */ + public void setAbbreviation(String abbreviation) + { + this.abbreviation = abbreviation; + } + + + /** + * Return details of the expected usage of this term. + * + * @return string text + */ + public String getUsage() + { + return usage; + } + + + /** + * Set up details of the expected usage of this term. + * + * @param usage string text + */ + public void setUsage(String usage) + { + this.usage = usage; + } + + + /** + * Return the author-controlled version identifier. + * + * @return version identifier + */ + public String getPublishVersionIdentifier() + { + return publishVersionIdentifier; + } + + + /** + * Set up the author-controlled version identifier. + * + * @param publishVersionIdentifier version identifier + */ + public void setPublishVersionIdentifier(String publishVersionIdentifier) + { + this.publishVersionIdentifier = publishVersionIdentifier; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "GlossaryTermProperties{" + + "displayName='" + displayName + '\'' + + ", summary='" + summary + '\'' + + ", description='" + description + '\'' + + ", examples='" + examples + '\'' + + ", abbreviation='" + abbreviation + '\'' + + ", usage='" + usage + '\'' + + ", publishVersionNumber='" + publishVersionIdentifier + '\'' + + ", qualifiedName='" + getQualifiedName() + '\'' + + ", additionalProperties=" + getAdditionalProperties() + + ", typeName='" + getTypeName() + '\'' + + ", extendedProperties=" + getExtendedProperties() + + '}'; + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + GlossaryTermProperties that = (GlossaryTermProperties) objectToCompare; + return Objects.equals(getDisplayName(), that.getDisplayName()) && + Objects.equals(getSummary(), that.getSummary()) && + Objects.equals(getDescription(), that.getDescription()) && + Objects.equals(getExamples(), that.getExamples()) && + Objects.equals(getAbbreviation(), that.getAbbreviation()) && + Objects.equals(getUsage(), that.getUsage()) && + Objects.equals(getPublishVersionIdentifier(), that.getPublishVersionIdentifier()); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), getDisplayName(), getSummary(), getDescription(), getExamples(), getAbbreviation(), getUsage(), getPublishVersionIdentifier()); + } +} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/GlossaryTermRelationship.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/glossaries/GlossaryTermRelationship.java similarity index 90% rename from open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/GlossaryTermRelationship.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/glossaries/GlossaryTermRelationship.java index 683321b2adf..2aa833acf28 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/GlossaryTermRelationship.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/glossaries/GlossaryTermRelationship.java @@ -1,12 +1,13 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetmanager.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.glossaries; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import org.odpi.openmetadata.frameworks.openmetadata.enums.GlossaryTermRelationshipStatus; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; import java.util.Objects; @@ -176,15 +177,12 @@ public String getSource() public String toString() { return "GlossaryTermRelationship{" + - "expression='" + expression + '\'' + - ", description='" + description + '\'' + - ", status=" + status + - ", steward='" + steward + '\'' + - ", source='" + source + '\'' + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", extendedProperties=" + getExtendedProperties() + - '}'; + "expression='" + expression + '\'' + + ", description='" + description + '\'' + + ", status=" + status + + ", steward='" + steward + '\'' + + ", source='" + source + '\'' + + "} " + super.toString(); } diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/glossaries/MeaningProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/glossaries/MeaningProperties.java new file mode 100644 index 00000000000..d0b810e7766 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/glossaries/MeaningProperties.java @@ -0,0 +1,180 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.glossaries; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ReferenceableProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * MeaningProperties is a cut-down summary of a glossary term to aid the asset consumer in understanding the content + * of an asset. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class MeaningProperties extends ReferenceableProperties +{ + private String name = null; + private String summary = null; + private String description = null; + + + /** + * Default constructor + */ + public MeaningProperties() + { + super(); + } + + + /** + * Copy/clone constructor. + * + * @param template element to copy + */ + public MeaningProperties(MeaningProperties template) + { + super(template); + + if (template != null) + { + name = template.getName(); + summary = template.getSummary(); + description = template.getDescription(); + } + } + + + /** + * Return the glossary term name. + * + * @return String name + */ + public String getName() + { + return name; + } + + + /** + * Set up the glossary term name. + * + * @param name String name + */ + public void setName(String name) + { + this.name = name; + } + + + /** + * Return the short summary of the term. + * + * @return string summary + */ + public String getSummary() + { + return summary; + } + + + /** + * Set up the short summary of the term. + * + * @param summary string summary + */ + public void setSummary(String summary) + { + this.summary = summary; + } + + + /** + * Return the description of the glossary term. + * + * @return String description + */ + public String getDescription() + { + return description; + } + + + /** + * Set up the description of the glossary term. + * + * @param description String description + */ + public void setDescription(String description) + { + this.description = description; + } + + + /** + * Standard toString method. + * + * @return print out of variables in a JSON-style + */ + @Override + public String toString() + { + return "MeaningProperties{" + + "name='" + name + '\'' + + ", summary='" + summary + '\'' + + ", description='" + description + '\'' + + ", typeName='" + getTypeName() + '\'' + + ", qualifiedName='" + getQualifiedName() + '\'' + + ", additionalProperties=" + getAdditionalProperties() + + ", extendedProperties=" + getExtendedProperties() + + '}'; + } + + + /** + * Compare the values of the supplied object with those stored in the current object. + * + * @param objectToCompare supplied object + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + MeaningProperties that = (MeaningProperties) objectToCompare; + return Objects.equals(name, that.name) && + Objects.equals(summary, that.summary)&& + Objects.equals(description, that.description); + } + + + /** + * Create a hash code for this element type. + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), name, summary, description); + } +} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/StagingGlossaryProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/glossaries/StagingGlossaryProperties.java similarity index 88% rename from open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/StagingGlossaryProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/glossaries/StagingGlossaryProperties.java index 806cca2a3a9..dcb368430ea 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/StagingGlossaryProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/glossaries/StagingGlossaryProperties.java @@ -1,11 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetmanager.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.glossaries; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ClassificationProperties; import java.util.Objects; @@ -79,11 +80,8 @@ public void setDescription(String description) public String toString() { return "StagingGlossaryProperties{" + - "description='" + description + '\'' + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", extendedProperties=" + getExtendedProperties() + - '}'; + "description='" + description + '\'' + + "} " + super.toString(); } diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/TaxonomyProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/glossaries/TaxonomyProperties.java similarity index 89% rename from open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/TaxonomyProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/glossaries/TaxonomyProperties.java index 67e9bda9769..09f802b3da2 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/TaxonomyProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/glossaries/TaxonomyProperties.java @@ -1,11 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetmanager.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.glossaries; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ClassificationProperties; import java.util.Objects; @@ -84,11 +85,8 @@ public void setOrganizingPrinciple(String organizingPrinciple) public String toString() { return "TaxonomyProperties{" + - "organizingPrinciple='" + organizingPrinciple + '\'' + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", extendedProperties=" + getExtendedProperties() + - '}'; + "organizingPrinciple='" + organizingPrinciple + '\'' + + "} " + super.toString(); } diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/glossaries/package-info.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/glossaries/package-info.java new file mode 100644 index 00000000000..c40847bb8c6 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/glossaries/package-info.java @@ -0,0 +1,7 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +/** + * Beans for managing glossaries and their contents. + */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.glossaries; \ No newline at end of file diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/CertificationProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/CertificationProperties.java new file mode 100644 index 00000000000..345e9e6afcf --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/CertificationProperties.java @@ -0,0 +1,464 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.governance; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; + +import java.util.Date; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * CertificationProperties describe the details of a certificate that shows that an element is certified with a particular certification type. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class CertificationProperties extends RelationshipProperties +{ + private String certificateId = null; + private Date startDate = null; + private Date endDate = null; + private String conditions = null; + private String certifiedBy = null; + private String certifiedByTypeName = null; + private String certifiedByPropertyName = null; + private String custodian = null; + private String custodianTypeName = null; + private String custodianPropertyName = null; + private String recipient = null; + private String recipientTypeName = null; + private String recipientPropertyName = null; + private String notes = null; + + + /** + * Default Constructor + */ + public CertificationProperties() + { + } + + + /** + * Copy/clone Constructor - the resulting object. + * + * @param template object being copied + */ + public CertificationProperties(CertificationProperties template) + { + super(template); + + if (template != null) + { + this.certificateId = template.getCertificateId(); + this.startDate = template.getStartDate(); + this.endDate = template.getEndDate(); + this.conditions = template.getConditions(); + this.certifiedBy = template.getCertifiedBy(); + this.certifiedByTypeName = template.getCertifiedByTypeName(); + this.certifiedByPropertyName = template.getCertifiedByPropertyName(); + this.custodian = template.getCustodian(); + this.custodianTypeName = template.getCustodianTypeName(); + this.custodianPropertyName = template.getCustodianPropertyName(); + this.recipient = template.getRecipient(); + this.recipientTypeName = template.getRecipientTypeName(); + this.recipientPropertyName = template.getRecipientPropertyName(); + this.notes = template.getNotes(); + } + } + + + /** + * Return the unique identifier of the certificate. This value comes from the certificate authority. + * + * @return string + */ + public String getCertificateId() + { + return certificateId; + } + + + /** + * Set up the unique identifier of the certificate. This value comes from the certificate authority. + * + * @param certificateId string + */ + public void setCertificateId(String certificateId) + { + this.certificateId = certificateId; + } + + + /** + * Return the date/time that this certificate is valid from. + * + * @return date/time + */ + public Date getStartDate() + { + return startDate; + } + + + /** + * Set up the date/time that this certificate is valid from. + * + * @param startDate date/time + */ + public void setStartDate(Date startDate) + { + this.startDate = startDate; + } + + + /** + * Return the date/time that this certificate is no longer valid. + * + * @return date/time + */ + public Date getEndDate() + { + return endDate; + } + + + /** + * Set up the date/time that this certificate is no longer valid. + * + * @param endDate date/time + */ + public void setEndDate(Date endDate) + { + this.endDate = endDate; + } + + + /** + * Return any conditions or endorsements to this certificate. + * + * @return string text + */ + public String getConditions() + { + return conditions; + } + + + /** + * Set up any conditions or endorsements to this certificate. + * + * @param conditions string text + */ + public void setConditions(String conditions) + { + this.conditions = conditions; + } + + + /** + * Return the name of the person in the certification authority that granted this certificate. + * + * @return string name/id + */ + public String getCertifiedBy() + { + return certifiedBy; + } + + + /** + * Set up the name of the person in the certification authority that granted this certificate. + * + * @param certifiedBy string name/id + */ + public void setCertifiedBy(String certifiedBy) + { + this.certifiedBy = certifiedBy; + } + + + /** + * Return the name of the type of the element supplying the certifiedBy property. + * + * @return string type name + */ + public String getCertifiedByTypeName() + { + return certifiedByTypeName; + } + + + /** + * Set up the name of the type of the element supplying the certifiedBy property. + * + * @param certifiedByTypeName string type name + */ + public void setCertifiedByTypeName(String certifiedByTypeName) + { + this.certifiedByTypeName = certifiedByTypeName; + } + + + /** + * Return the name of the property from the element supplying the certifiedBy property. + * + * @return string property name + */ + public String getCertifiedByPropertyName() + { + return certifiedByPropertyName; + } + + + /** + * Set up the name of the property from the element supplying the certifiedBy property. + * + * @param certifiedByPropertyName string property name + */ + public void setCertifiedByPropertyName(String certifiedByPropertyName) + { + this.certifiedByPropertyName = certifiedByPropertyName; + } + + + + /** + * Return the person/team responsible for ensuring that the certificate conditions are adhered to. + * + * @return string name/id + */ + public String getCustodian() + { + return custodian; + } + + + /** + * Set up the person/team responsible for ensuring that the certificate conditions are adhered to. + * + * @param custodian string name/id + */ + public void setCustodian(String custodian) + { + this.custodian = custodian; + } + + + /** + * Return the name of the type of the element supplying the custodian property. + * + * @return string type name + */ + public String getCustodianTypeName() + { + return custodianTypeName; + } + + + /** + * Set up the name of the type of the element supplying the custodian property. + * + * @param custodianTypeName string type name + */ + public void setCustodianTypeName(String custodianTypeName) + { + this.custodianTypeName = custodianTypeName; + } + + + /** + * Return the name of the property from the element supplying the custodian property. + * + * @return string property name + */ + public String getCustodianPropertyName() + { + return custodianPropertyName; + } + + + /** + * Set up the name of the property from the element supplying the custodian property. + * + * @param custodianPropertyName string property name + */ + public void setCustodianPropertyName(String custodianPropertyName) + { + this.custodianPropertyName = custodianPropertyName; + } + + + /** + * Return the person/team that received the certification. + * + * @return string name/id + */ + public String getRecipient() + { + return recipient; + } + + + /** + * Set up the person/team that received the certification. + * + * @param recipient string name/id + */ + public void setRecipient(String recipient) + { + this.recipient = recipient; + } + + + /** + * Return the name of the type of the element supplying the recipient property. + * + * @return string type name + */ + public String getRecipientTypeName() + { + return recipientTypeName; + } + + + /** + * Set up the name of the type of the element supplying the recipient property. + * + * @param recipientTypeName string type name + */ + public void setRecipientTypeName(String recipientTypeName) + { + this.recipientTypeName = recipientTypeName; + } + + + /** + * Return the name of the property from the element supplying the recipient property. + * + * @return string property name + */ + public String getRecipientPropertyName() + { + return recipientPropertyName; + } + + + /** + * Set up the name of the property from the element supplying the recipient property. + * + * @param recipientPropertyName string property name + */ + public void setRecipientPropertyName(String recipientPropertyName) + { + this.recipientPropertyName = recipientPropertyName; + } + + + /** + * Return any notes associated with the certificate. + * + * @return string text + */ + public String getNotes() + { + return notes; + } + + + /** + * Set up any notes associated with the certificate. + * + * @param notes string text + */ + public void setNotes(String notes) + { + this.notes = notes; + } + + + /** + * JSON-style toString. + * + * @return list of properties and their values. + */ + @Override + public String toString() + { + return "CertificationProperties{" + + "certificateId='" + certificateId + '\'' + + ", startDate=" + startDate + + ", endDate=" + endDate + + ", conditions='" + conditions + '\'' + + ", certifiedBy='" + certifiedBy + '\'' + + ", certifiedByTypeName='" + certifiedByTypeName + '\'' + + ", certifiedByPropertyName='" + certifiedByPropertyName + '\'' + + ", custodian='" + custodian + '\'' + + ", custodianTypeName='" + custodianTypeName + '\'' + + ", custodianPropertyName='" + custodianPropertyName + '\'' + + ", recipient='" + recipient + '\'' + + ", recipientTypeName='" + recipientTypeName + '\'' + + ", recipientPropertyName='" + recipientPropertyName + '\'' + + ", notes='" + notes + '\'' + + ", effectiveFrom=" + getEffectiveFrom() + + ", effectiveTo=" + getEffectiveTo() + + ", extendedProperties=" + getExtendedProperties() + + '}'; + } + + + /** + * Equals method that returns true if containing properties are the same. + * + * @param objectToCompare object to compare + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (! (objectToCompare instanceof CertificationProperties)) + { + return false; + } + if (! super.equals(objectToCompare)) + { + return false; + } + CertificationProperties that = (CertificationProperties) objectToCompare; + return Objects.equals(certificateId, that.certificateId) && Objects.equals(startDate, + that.startDate) && Objects.equals( + endDate, that.endDate) && Objects.equals(conditions, that.conditions) && Objects.equals(certifiedBy, + that.certifiedBy) && Objects.equals( + certifiedByTypeName, that.certifiedByTypeName) && Objects.equals(certifiedByPropertyName, + that.certifiedByPropertyName) && Objects.equals( + custodian, that.custodian) && Objects.equals(custodianTypeName, that.custodianTypeName) && Objects.equals( + custodianPropertyName, that.custodianPropertyName) && Objects.equals(recipient, that.recipient) && Objects.equals( + recipientTypeName, that.recipientTypeName) && Objects.equals(recipientPropertyName, + that.recipientPropertyName) && Objects.equals(notes, + that.notes); + } + + + /** + * Just use the GUID for the hash code as it should be unique. + * + * @return int code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), certificateId, startDate, endDate, conditions, certifiedBy, certifiedByTypeName, + certifiedByPropertyName, + custodian, custodianTypeName, custodianPropertyName, recipient, recipientTypeName, recipientPropertyName, notes); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/CertificationTypeProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/CertificationTypeProperties.java new file mode 100644 index 00000000000..c7be289fd49 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/CertificationTypeProperties.java @@ -0,0 +1,137 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.governance; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * Many regulations and industry bodies define certifications that can confirm a level of support, capability + * or competence in an aspect of a digital organization's operation. Having certifications may be + * necessary to operating legally or may be a business advantage. The certifications awarded can be captured + * in the metadata repository to enable both use and management of the certification process. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class CertificationTypeProperties extends GovernanceDefinitionProperties +{ + private String details = null; + + + /** + * Default Constructor + */ + public CertificationTypeProperties() + { + } + + + /** + * Copy/Clone Constructor + * + * @param template object to copy + */ + public CertificationTypeProperties(CertificationTypeProperties template) + { + super(template); + + if (template != null) + { + this.details = template.getDetails(); + } + } + + + /** + * Return the specific details of the certification. + * + * @return string description + */ + public String getDetails() + { + return details; + } + + + /** + * Set up the specific details of the certification. + * + * @param details string description + */ + public void setDetails(String details) + { + this.details = details; + } + + + /** + * JSON-style toString + * + * @return string containing the properties and their values + */ + @Override + public String toString() + { + return "CertificationTypeProperties{" + + "details='" + details + '\'' + + ", typeName='" + getTypeName() + '\'' + + ", documentIdentifier='" + getDocumentIdentifier() + '\'' + + ", additionalProperties=" + getAdditionalProperties() + + ", extendedProperties=" + getExtendedProperties() + + ", title='" + getTitle() + '\'' + + ", summary='" + getSummary() + '\'' + + ", description='" + getDescription() + '\'' + + ", scope='" + getScope() + '\'' + + ", domainIdentifier=" + getDomainIdentifier() + + ", priority='" + getPriority() + '\'' + + ", implications=" + getImplications() + + ", outcomes=" + getOutcomes() + + ", results=" + getResults() + + '}'; + } + + + /** + * Compare the values of the supplied object with those stored in the current object. + * + * @param objectToCompare supplied object + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + CertificationTypeProperties that = (CertificationTypeProperties) objectToCompare; + return Objects.equals(details, that.details); + } + + + /** + * Return hash code based on properties. + * + * @return int + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), details); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/DuplicateProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/DuplicateProperties.java new file mode 100644 index 00000000000..9b8c023cf44 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/DuplicateProperties.java @@ -0,0 +1,275 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.openmetadata.properties.governance; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * DuplicatesRequestBody provides a structure for passing the properties associated with duplicates. + * It can be used on a PeerDuplicates relationship as well as a Consolidated Duplicates relationship. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class DuplicateProperties extends RelationshipProperties +{ + private String duplicateGUID = null; + private int statusIdentifier = 0; + private String steward = null; + private String stewardTypeName = null; + private String stewardPropertyName = null; + private String source = null; + private String notes = null; + + + /** + * Default constructor + */ + public DuplicateProperties() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public DuplicateProperties(DuplicateProperties template) + { + super(template); + + if (template != null) + { + duplicateGUID = template.getDuplicateGUID(); + statusIdentifier = template.getStatusIdentifier(); + steward = template.getSteward(); + stewardTypeName = template.getStewardPropertyName(); + stewardPropertyName = template.getStewardPropertyName(); + source = template.getSource(); + notes = template.getNotes(); + } + } + + + /** + * Return the unique identifier of the duplicate. + * + * @return identifier + */ + public String getDuplicateGUID() + { + return duplicateGUID; + } + + + /** + * Set up the unique identifier of the duplicate. + * + * @param duplicateGUID identifier + */ + public void setDuplicateGUID(String duplicateGUID) + { + this.duplicateGUID = duplicateGUID; + } + + + /** + * Return the status of this duplicate - usable if greater than 0, 0=proposed, negative means invalid + * + * @return int + */ + public int getStatusIdentifier() + { + return statusIdentifier; + } + + + /** + * Set up the status of this duplicate - usable if greater than 0, 0=proposed, negative means invalid + * + * @param statusIdentifier int + */ + public void setStatusIdentifier(int statusIdentifier) + { + this.statusIdentifier = statusIdentifier; + } + + + /** + * Return the identifier of the steward that added this duplicate. + * + * @return identifier + */ + public String getSteward() + { + return steward; + } + + + /** + * Set up the identifier of the steward that added this duplicate. + * + * @param steward identifier + */ + public void setSteward(String steward) + { + this.steward = steward; + } + + + /** + * Return the type name of the element used to identify the steward. + * + * @return type name + */ + public String getStewardTypeName() + { + return stewardTypeName; + } + + + /** + * Set up the type name of the element used to identify the steward. + * + * @param stewardTypeName type name + */ + public void setStewardTypeName(String stewardTypeName) + { + this.stewardTypeName = stewardTypeName; + } + + + /** + * Return the name of the property used to identify the steward. + * + * @return property name + */ + public String getStewardPropertyName() + { + return stewardPropertyName; + } + + + /** + * Return the name of the property used to identify the steward. + * + * @param stewardPropertyName property name + */ + public void setStewardPropertyName(String stewardPropertyName) + { + this.stewardPropertyName = stewardPropertyName; + } + + + /** + * Return the details of the source that detected the duplicate. + * + * @return name + */ + public String getSource() + { + return source; + } + + + /** + * Set up the details of the source that detected the duplicate. + * + * @param source name + */ + public void setSource(String source) + { + this.source = source; + } + + + /** + * Return any notes for the steward. + * + * @return text + */ + public String getNotes() + { + return notes; + } + + + /** + * Set up any notes for the steward. + * + * @param notes text + */ + public void setNotes(String notes) + { + this.notes = notes; + } + + + /** + * JSON-style toString. + * + * @return list of properties and their values. + */ + @Override + public String toString() + { + return "DuplicatesRequestBody{" + + "statusIdentifier=" + statusIdentifier + + ", steward='" + steward + '\'' + + ", stewardTypeName='" + stewardTypeName + '\'' + + ", stewardPropertyName='" + stewardPropertyName + '\'' + + ", source='" + source + '\'' + + ", notes='" + notes + '\'' + + '}'; + } + + + /** + * Equals method that returns true if containing properties are the same. + * + * @param objectToCompare object to compare + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + DuplicateProperties that = (DuplicateProperties) objectToCompare; + return statusIdentifier == that.statusIdentifier && + Objects.equals(steward, that.steward) && + Objects.equals(stewardTypeName, that.stewardTypeName) && + Objects.equals(stewardPropertyName, that.stewardPropertyName) && + Objects.equals(source, that.source) && + Objects.equals(notes, that.notes); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(statusIdentifier, steward, stewardTypeName, stewardPropertyName, source, notes); + } +} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/ExecutionPointProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/ExecutionPointProperties.java similarity index 85% rename from open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/ExecutionPointProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/ExecutionPointProperties.java index da931beb191..f05852acd30 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/ExecutionPointProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/ExecutionPointProperties.java @@ -1,6 +1,8 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.governance; + +import org.odpi.openmetadata.frameworks.openmetadata.properties.ReferenceableProperties; import java.util.Objects; @@ -96,17 +98,14 @@ public void setDescription(String description) @Override public String toString() { - return "GovernanceDomainProperties{" + - "displayName='" + displayName + '\'' + - ", description='" + description + '\'' + - ", typeName='" + getTypeName() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", extendedProperties=" + getExtendedProperties() + - '}'; + return "ExecutionPointProperties{" + + "displayName='" + displayName + '\'' + + ", description='" + description + '\'' + + "} " + super.toString(); } + /** * Return comparison result based on the content of the properties. * diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/FindAssetOriginProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/FindAssetOriginProperties.java new file mode 100644 index 00000000000..99995f86339 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/FindAssetOriginProperties.java @@ -0,0 +1,182 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.openmetadata.properties.governance; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.FindProperties; + +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * AssetOriginProperties provides a structure for passing information about an asset's origin. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class FindAssetOriginProperties extends FindProperties +{ + private String organizationGUID = null; + private String businessCapabilityGUID = null; + private Map otherOriginValues = null; + + + /** + * Default constructor + */ + public FindAssetOriginProperties() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public FindAssetOriginProperties(FindAssetOriginProperties template) + { + if (template != null) + { + this.organizationGUID = template.getOrganizationGUID(); + this.businessCapabilityGUID = template.getBusinessCapabilityGUID(); + this.otherOriginValues = template.getOtherOriginValues(); + } + } + + + /** + * Return the unique identifier (GUID) of the organization where this asset originated from. + * + * @return unique identifier (GUID) + */ + public String getOrganizationGUID() + { + return organizationGUID; + } + + + /** + * Set up the unique identifier (GUID) of the organization where this asset originated from. + * + * @param organizationGUID unique identifier (GUID) + */ + public void setOrganizationGUID(String organizationGUID) + { + this.organizationGUID = organizationGUID; + } + + + /** + * Return the unique identifier (GUID) of the business capability where this asset originated from. + * + * @return unique identifier (GUID) + */ + public String getBusinessCapabilityGUID() + { + return businessCapabilityGUID; + } + + + /** + * Set up the unique identifier (GUID) of the business capability where this asset originated from. + * + * @param businessCapabilityGUID unique identifier (GUID) + */ + public void setBusinessCapabilityGUID(String businessCapabilityGUID) + { + this.businessCapabilityGUID = businessCapabilityGUID; + } + + + /** + * Return any other descriptive labels describing origin of the asset. + * + * @return map of property values + */ + public Map getOtherOriginValues() + { + if (otherOriginValues == null) + { + return null; + } + else if (otherOriginValues.isEmpty()) + { + return null; + } + else + { + return new HashMap<>(otherOriginValues); + } + } + + + /** + * Set up any descriptive labels describing origin of the asset. + * + * @param otherOriginValues map of property values + */ + public void setOtherOriginValues(Map otherOriginValues) + { + this.otherOriginValues = otherOriginValues; + } + + + + /** + * JSON-style toString. + * + * @return list of properties and their values. + */ + @Override + public String toString() + { + return "FindAssetOriginProperties{" + + "organizationGUID='" + organizationGUID + '\'' + + ", businessCapabilityGUID='" + businessCapabilityGUID + '\'' + + ", otherOriginValues=" + otherOriginValues + + '}'; + } + + + /** + * Equals method that returns true if containing properties are the same. + * + * @param objectToCompare object to compare + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (! (objectToCompare instanceof FindAssetOriginProperties that)) + { + return false; + } + return Objects.equals(organizationGUID, that.organizationGUID) && + Objects.equals(businessCapabilityGUID, that.businessCapabilityGUID) && + Objects.equals(otherOriginValues, that.otherOriginValues); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), getOrganizationGUID(), getBusinessCapabilityGUID(), getOtherOriginValues()); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/GovernanceClassificationBase.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/GovernanceClassificationBase.java new file mode 100644 index 00000000000..f24e80d998e --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/GovernanceClassificationBase.java @@ -0,0 +1,287 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.governance; + +import com.fasterxml.jackson.annotation.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ClassificationProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * GovernanceClassificationBase defines the common properties for the governance action classifications. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "class") +@JsonSubTypes( + { + @JsonSubTypes.Type(value = GovernanceClassificationProperties.class, name = "GovernanceClassificationProperties"), + @JsonSubTypes.Type(value = RetentionClassificationProperties.class, name = "RetentionClassificationProperties"), + }) +public class GovernanceClassificationBase extends ClassificationProperties +{ + private int status = 0; + private int confidence = 0; + private String steward = null; + private String stewardTypeName = null; + private String stewardPropertyName = null; + private String source = null; + private String notes = null; + + + /** + * Default constructor + */ + public GovernanceClassificationBase() + { + super(); + } + + + /** + * Copy/clone constructor. + * + * @param template element to copy + */ + public GovernanceClassificationBase(GovernanceClassificationBase template) + { + super(template); + + if (template != null) + { + status = template.getStatus(); + confidence = template.getConfidence(); + steward = template.getSteward(); + source = template.getSource(); + notes = template.getNotes(); + } + } + + + /** + * Return the status of this classification. + * + * @return enum + */ + public int getStatus() + { + return status; + } + + + /** + * Set up the status of the classification. + * + * @param status enum + */ + public void setStatus(int status) + { + this.status = status; + } + + + /** + * Return the level of confidence in the classification (0=none to 100=excellent). + * + * @return int + */ + public int getConfidence() + { + return confidence; + } + + + /** + * Set up the level of confidence in the classification (0=none to 100=excellent). + * + * @param confidence int + */ + public void setConfidence(int confidence) + { + this.confidence = confidence; + } + + + /** + * Return the identifier for the person responsible for maintaining this classification. + * + * @return string user identifier + */ + public String getSteward() + { + return steward; + } + + + /** + * Set up the identifier for the person responsible for maintaining this classification. + * + * @param steward string user identifier + */ + public void setSteward(String steward) + { + this.steward = steward; + } + + + /** + * Return the type name of the element used to describe the steward. + * + * @return name + */ + public String getStewardTypeName() + { + return stewardTypeName; + } + + + /** + * Set up the type name of the element used to describe the steward. + * + * @param stewardTypeName name + */ + public void setStewardTypeName(String stewardTypeName) + { + this.stewardTypeName = stewardTypeName; + } + + + /** + * Return the name of the property used to identify the steward. + * + * @return name + */ + public String getStewardPropertyName() + { + return stewardPropertyName; + } + + + /** + * Set up the name of the property used to identify the steward. + * + * @param stewardPropertyName name + */ + public void setStewardPropertyName(String stewardPropertyName) + { + this.stewardPropertyName = stewardPropertyName; + } + + + /** + * Return the source of this classification. + * + * @return string identifier + */ + public String getSource() + { + return source; + } + + + /** + * Set up the source of this classification. + * + * @param source string identifier + */ + public void setSource(String source) + { + this.source = source; + } + + + /** + * Return additional information relating to this classification. + * + * @return text from the steward(s) + */ + public String getNotes() + { + return notes; + } + + + /** + * Set up additional information relating to this classification. + * + * @param notes text from the steward(s) + */ + public void setNotes(String notes) + { + this.notes = notes; + } + + + /** + * Standard toString method. + * + * @return print out of variables in a JSON-style + */ + @Override + public String toString() + { + return "GovernanceClassificationBase{" + + "status=" + status + + ", confidence=" + confidence + + ", steward='" + steward + '\'' + + ", stewardTypeName='" + stewardTypeName + '\'' + + ", stewardPropertyName='" + stewardPropertyName + '\'' + + ", source='" + source + '\'' + + ", notes='" + notes + '\'' + + ", effectiveFrom=" + getEffectiveFrom() + + ", effectiveTo=" + getEffectiveTo() + + ", extendedProperties=" + getExtendedProperties() + + '}'; + } + + + /** + * Compare the values of the supplied object with those stored in the current object. + * + * @param objectToCompare supplied object + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + GovernanceClassificationBase that = (GovernanceClassificationBase) objectToCompare; + return confidence == that.confidence && + status == that.status && + Objects.equals(steward, that.steward) && + Objects.equals(stewardTypeName, that.stewardTypeName) && + Objects.equals(stewardPropertyName, that.stewardPropertyName) && + Objects.equals(source, that.source) && + Objects.equals(notes, that.notes); + } + + + /** + * Return code value representing the contents of this object. + * + * @return int + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), status, confidence, steward, stewardTypeName, stewardPropertyName, source, notes); + } +} \ No newline at end of file diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/GovernanceClassificationProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/GovernanceClassificationProperties.java new file mode 100644 index 00000000000..14c4b53f678 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/GovernanceClassificationProperties.java @@ -0,0 +1,129 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.openmetadata.properties.governance; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * GovernanceClassificationProperties defines the properties for a Confidentiality, Confidence, Criticality + * Governance Action Classifications. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class GovernanceClassificationProperties extends GovernanceClassificationBase +{ + private int levelIdentifier = 0; + + /** + * Default constructor + */ + public GovernanceClassificationProperties() + { + super(); + } + + + /** + * Copy/clone constructor. + * + * @param template object to copy + */ + public GovernanceClassificationProperties(GovernanceClassificationProperties template) + { + super(template); + + if (template != null) + { + levelIdentifier = template.getLevelIdentifier(); + } + } + + + /** + * Return the level assigned to this element for this classification. + * + * @return int + */ + public int getLevelIdentifier() + { + return levelIdentifier; + } + + + /** + * Set up the level assigned to this element for this classification. + * + * @param levelIdentifier int + */ + public void setLevelIdentifier(int levelIdentifier) + { + this.levelIdentifier = levelIdentifier; + } + + /** + * Standard toString method. + * + * @return print out of variables in a JSON-style + */ + @Override + public String toString() + { + return "GovernanceClassificationProperties{" + + "levelIdentifier=" + levelIdentifier + + ", status=" + getStatus() + + ", confidence=" + getConfidence() + + ", steward='" + getSteward() + '\'' + + ", stewardTypeName='" + getStewardTypeName() + '\'' + + ", stewardPropertyName='" + getStewardPropertyName() + '\'' + + ", source='" + getSource() + '\'' + + ", notes='" + getNotes() + '\'' + + '}'; + } + + + /** + * Compare the values of the supplied object with those stored in the current object. + * + * @param objectToCompare supplied object + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + GovernanceClassificationProperties that = (GovernanceClassificationProperties) objectToCompare; + return levelIdentifier == that.levelIdentifier; + } + + + /** + * Return code value representing the contents of this object. + * + * @return int + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), levelIdentifier); + } +} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/GovernanceDefinitionMetricProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/GovernanceDefinitionMetricProperties.java similarity index 89% rename from open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/GovernanceDefinitionMetricProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/GovernanceDefinitionMetricProperties.java index 5601df205db..a812246e550 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/GovernanceDefinitionMetricProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/GovernanceDefinitionMetricProperties.java @@ -1,10 +1,11 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.governance; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; import java.util.Objects; @@ -80,11 +81,8 @@ public void setRationale(String rationale) public String toString() { return "GovernanceDefinitionMetricProperties{" + - "rationale='" + rationale + '\'' + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", extendedProperties=" + getExtendedProperties() + - '}'; + "rationale='" + rationale + '\'' + + "} " + super.toString(); } diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/GovernanceDefinitionProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/GovernanceDefinitionProperties.java new file mode 100644 index 00000000000..bf73d18a4f3 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/GovernanceDefinitionProperties.java @@ -0,0 +1,477 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.governance; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import org.odpi.openmetadata.frameworks.openmetadata.properties.security.SecurityGroupProperties; + +import java.util.List; +import java.util.Map; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * GovernanceDefinitionProperties provides the base class for many of the definitions that define the data strategy + * and governance program. It includes many of the common fields: + * + *
            + *
          • Document id
          • + *
          • Title
          • + *
          • Summary
          • + *
          • Description
          • + *
          • Scope
          • + *
          • Domain identifier
          • + *
          • Status
          • + *
          • Priority
          • + *
          • Implications
          • + *
          • Outcomes
          • + *
          • Results
          • + *
          • AdditionalProperties
          • + *
          + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "class") +@JsonSubTypes( + { + @JsonSubTypes.Type(value = LicenseTypeProperties.class, name = "LicenseTypeProperties"), + @JsonSubTypes.Type(value = CertificationTypeProperties.class, name = "CertificationTypeProperties"), + @JsonSubTypes.Type(value = SecurityGroupProperties.class, name = "SecurityGroupProperties"), + }) +public class GovernanceDefinitionProperties +{ + private String documentIdentifier = null; + private Map additionalProperties = null; + + private String title = null; + private String summary = null; + private String description = null; + private String scope = null; + private int domainIdentifier = 0; + private String priority = null; + private List implications = null; + private List outcomes = null; + private List results = null; + + private String typeName = null; + private Map extendedProperties = null; + + + /** + * Default Constructor + */ + public GovernanceDefinitionProperties() + { + super(); + } + + + /** + * Copy/clone Constructor + * + * @param template object being copied + */ + public GovernanceDefinitionProperties(GovernanceDefinitionProperties template) + { + if (template != null) + { + this.documentIdentifier = template.getDocumentIdentifier(); + this.additionalProperties = template.getAdditionalProperties(); + this.title = template.getTitle(); + this.summary = template.getSummary(); + this.description = template.getDescription(); + this.scope = template.getScope(); + this.domainIdentifier = template.getDomainIdentifier(); + this.priority = template.getPriority(); + this.implications = template.getImplications(); + this.outcomes = template.getOutcomes(); + this.results = template.getResults(); + this.typeName = template.getTypeName(); + this.extendedProperties = template.getExtendedProperties(); + } + } + + + /** + * Return the open metadata type name of this object - this is used to create a subtype of + * the referenceable. Any properties associated with this subtype are passed as extended properties. + * + * @return string type name + */ + public String getTypeName() + { + return typeName; + } + + + /** + * Set up the open metadata type name of this object - this is used to create a subtype of + * the referenceable. Any properties associated with this subtype are passed as extended properties. + * + * @param typeName string type name + */ + public void setTypeName(String typeName) + { + this.typeName = typeName; + } + + + /** + * Returns the stored qualified name property for the metadata entity. + * If no qualified name is available then the empty string is returned. + * + * @return documentIdentifier + */ + public String getDocumentIdentifier() + { + return documentIdentifier; + } + + + /** + * Set up the fully qualified name. + * + * @param documentIdentifier String name + */ + public void setDocumentIdentifier(String documentIdentifier) + { + this.documentIdentifier = documentIdentifier; + } + + + /** + * Return a copy of the additional properties. Null means no additional properties are available. + * + * @return AdditionalProperties + */ + public Map getAdditionalProperties() + { + return additionalProperties; + } + + + /** + * Set up additional properties. + * + * @param additionalProperties Additional properties object + */ + public void setAdditionalProperties(Map additionalProperties) + { + this.additionalProperties = additionalProperties; + } + + + /** + * Return the properties that are defined for a subtype of referenceable but are not explicitly + * supported by the bean. + * + * @return map of properties + */ + public Map getExtendedProperties() + { + return extendedProperties; + } + + + /** + * Set up the properties that are defined for a subtype of referenceable but are not explicitly + * supported by the bean. + * + * @param extendedProperties map of properties + */ + public void setExtendedProperties(Map extendedProperties) + { + this.extendedProperties = extendedProperties; + } + + + + /** + * Return the title associated with this governance definition. + * + * @return String title + */ + public String getTitle() + { + return title; + } + + + /** + * Set up the title associated with this governance definition. + * + * @param title String title + */ + public void setTitle(String title) + { + this.title = title; + } + + + + /** + * Return the summary for this governance definition. This should cover its essence. Think of it as + * the executive summary. + * + * @return String short description + */ + public String getSummary() + { + return summary; + } + + + /** + * Set up the summary of the governance definition. This should cover its essence. Think of it as + * the executive summary. + * + * @param summary String description + */ + public void setSummary(String summary) + { + this.summary = summary; + } + + + /** + * Return the full description of the governance definition. + * + * @return String description + */ + public String getDescription() + { + return description; + } + + + /** + * Set up the full description of the governance definition. + * + * @param description String description + */ + public void setDescription(String description) + { + this.description = description; + } + + + /** + * Return the organizational scope that this governance definition applies to. + * + * @return String organization, department or team name + */ + public String getScope() + { + return scope; + } + + + /** + * Set up the organizational scope that this governance definition applies to. + * + * @param scope String organization, department or team name + */ + public void setScope(String scope) + { + this.scope = scope; + } + + + /** + * Return the identifier of the governance domain that this definition belongs to (0=all). + * + * @return int + */ + public int getDomainIdentifier() + { + return domainIdentifier; + } + + + /** + * Set up the identifier of the governance domain that this definition belongs to (0=all). + * + * @param domainIdentifier int + */ + public void setDomainIdentifier(int domainIdentifier) + { + this.domainIdentifier = domainIdentifier; + } + + + /** + * Return the priority of the governance definition. This may be something like high, medium or low, + * or maybe a time frame or more detailed explanation. + * + * @return String priority + */ + public String getPriority() + { + return priority; + } + + + /** + * Set up the priority of this governance definition. This may be something like high, medium or low, + * or maybe a time frame or more detailed explanation. + * + * @param priority String priority + */ + public void setPriority(String priority) + { + this.priority = priority; + } + + + /** + * Return the list of implications for the organization that this governance definition brings. + * This is often the first enumeration of the changes that that need to be implemented to bring + * the governance definition into effect. + * + * @return list of descriptions + */ + public List getImplications() + { + return implications; + } + + + /** + * Set up the list of implications for the organization that this governance definition brings. + * This is often the first enumeration of the changes that that need to be implemented to bring + * the governance definition into effect. + * + * @param implications list of descriptions + */ + public void setImplications(List implications) + { + this.implications = implications; + } + + + /** + * Return the list of expected outcomes from implementing this governance definition. + * + * @return list of outcome descriptions + */ + public List getOutcomes() + { + return outcomes; + } + + + /** + * Set up the list of expected outcomes from implementing this governance definition. + * + * @param outcomes list of descriptions of outcomes + */ + public void setOutcomes(List outcomes) + { + this.outcomes = outcomes; + } + + + /** + * Return the list of actual results from implementing this governance definition. + * + * @return list of result descriptions + */ + public List getResults() + { + return results; + } + + + /** + * Set up the list of actual results from implementing this governance definition. + * + * @param results list of description of results + */ + public void setResults(List results) + { + this.results = results; + } + + + /** + * JSON-style toString. + * + * @return list of properties and their values. + */ + @Override + public String toString() + { + return "GovernanceDefinitionProperties{" + + "documentIdentifier='" + documentIdentifier + '\'' + + ", additionalProperties=" + additionalProperties + + ", title='" + title + '\'' + + ", summary='" + summary + '\'' + + ", description='" + description + '\'' + + ", scope='" + scope + '\'' + + ", domainIdentifier=" + domainIdentifier + + ", priority='" + priority + '\'' + + ", implications=" + implications + + ", outcomes=" + outcomes + + ", results=" + results + + ", typeName='" + typeName + '\'' + + ", extendedProperties=" + extendedProperties + + '}'; + } + + + /** + * Compare the values of the supplied object with those stored in the current object. + * + * @param objectToCompare supplied object + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + GovernanceDefinitionProperties that = (GovernanceDefinitionProperties) objectToCompare; + return domainIdentifier == that.domainIdentifier && + Objects.equals(documentIdentifier, that.documentIdentifier) && + Objects.equals(additionalProperties, that.additionalProperties) && + Objects.equals(title, that.title) && + Objects.equals(summary, that.summary) && + Objects.equals(description, that.description) && + Objects.equals(scope, that.scope) && + Objects.equals(priority, that.priority) && + Objects.equals(implications, that.implications) && + Objects.equals(outcomes, that.outcomes) && + Objects.equals(results, that.results) && + Objects.equals(typeName, that.typeName) && + Objects.equals(extendedProperties, that.extendedProperties); + } + + + /** + * Return hash code based on properties. + * + * @return int + */ + @Override + public int hashCode() + { + return Objects.hash(documentIdentifier, additionalProperties, title, summary, description, scope, domainIdentifier, priority, + implications, outcomes, results, typeName, extendedProperties); + } +} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/GovernanceDomainProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/GovernanceDomainProperties.java similarity index 86% rename from open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/GovernanceDomainProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/GovernanceDomainProperties.java index 9ab9450056b..6e89a908a69 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/GovernanceDomainProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/GovernanceDomainProperties.java @@ -1,6 +1,8 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.governance; + +import org.odpi.openmetadata.frameworks.openmetadata.properties.ReferenceableProperties; import java.util.Objects; @@ -115,14 +117,10 @@ public void setDomainIdentifier(int domainIdentifier) public String toString() { return "GovernanceDomainProperties{" + - "displayName='" + displayName + '\'' + - ", description='" + description + '\'' + - ", domainIdentifier=" + domainIdentifier + - ", typeName='" + getTypeName() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", extendedProperties=" + getExtendedProperties() + - '}'; + "displayName='" + displayName + '\'' + + ", description='" + description + '\'' + + ", domainIdentifier=" + domainIdentifier + + "} " + super.toString(); } diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/GovernanceDomainSetProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/GovernanceDomainSetProperties.java similarity index 84% rename from open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/GovernanceDomainSetProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/GovernanceDomainSetProperties.java index c4cd85e02d1..a8405375c7a 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/GovernanceDomainSetProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/GovernanceDomainSetProperties.java @@ -1,6 +1,8 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.governance; + +import org.odpi.openmetadata.frameworks.openmetadata.properties.ReferenceableProperties; import java.util.Objects; @@ -92,13 +94,9 @@ public void setDescription(String description) public String toString() { return "GovernanceDomainSetProperties{" + - "displayName='" + displayName + '\'' + - ", description='" + description + '\'' + - ", typeName='" + getTypeName() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", extendedProperties=" + getExtendedProperties() + - '}'; + "displayName='" + displayName + '\'' + + ", description='" + description + '\'' + + "} " + super.toString(); } diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/GovernanceExpectationsProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/GovernanceExpectationsProperties.java similarity index 80% rename from open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/GovernanceExpectationsProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/GovernanceExpectationsProperties.java index 2de0fa5a1c4..02c13611cd1 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/GovernanceExpectationsProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/GovernanceExpectationsProperties.java @@ -1,12 +1,13 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.governance; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ClassificationProperties; import java.util.Map; import java.util.Objects; @@ -20,15 +21,6 @@ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes( - { - @JsonSubTypes.Type(value = GovernanceExpectationsProperties.class, name = "GovernanceExpectationsProperties"), - @JsonSubTypes.Type(value = GovernanceMeasurementsDataSetProperties.class, name = "GovernanceMeasurementsDataSetProperties"), - @JsonSubTypes.Type(value = GovernanceMeasurementsProperties.class, name = "GovernanceMeasurementsProperties"), - }) public class GovernanceExpectationsProperties extends ClassificationProperties { private Map counts = null; @@ -139,13 +131,10 @@ public void setFlags(Map flags) public String toString() { return "GovernanceExpectationsProperties{" + - "effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", extendedProperties=" + getExtendedProperties() + - ", counts=" + counts + - ", values=" + values + - ", flags=" + flags + - '}'; + "counts=" + counts + + ", values=" + values + + ", flags=" + flags + + "} " + super.toString(); } diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/GovernanceLevelIdentifierProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/GovernanceLevelIdentifierProperties.java similarity index 96% rename from open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/GovernanceLevelIdentifierProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/GovernanceLevelIdentifierProperties.java index b6ab521891d..3c827c84b88 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/GovernanceLevelIdentifierProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/GovernanceLevelIdentifierProperties.java @@ -1,6 +1,8 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.governance; + +import org.odpi.openmetadata.frameworks.openmetadata.properties.ReferenceableProperties; import java.util.Objects; diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/GovernanceLevelIdentifierSetProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/GovernanceLevelIdentifierSetProperties.java similarity index 97% rename from open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/GovernanceLevelIdentifierSetProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/GovernanceLevelIdentifierSetProperties.java index 513841836a0..881280db28c 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/GovernanceLevelIdentifierSetProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/GovernanceLevelIdentifierSetProperties.java @@ -1,6 +1,8 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.governance; + +import org.odpi.openmetadata.frameworks.openmetadata.properties.ReferenceableProperties; import java.util.Objects; diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/GovernanceMeasurementsDataSetProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/GovernanceMeasurementsDataSetProperties.java similarity index 95% rename from open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/GovernanceMeasurementsDataSetProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/GovernanceMeasurementsDataSetProperties.java index 5adf83921e2..53b51493eef 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/GovernanceMeasurementsDataSetProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/GovernanceMeasurementsDataSetProperties.java @@ -1,11 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.governance; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ClassificationProperties; import java.util.Objects; diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/GovernanceMeasurementsProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/GovernanceMeasurementsProperties.java similarity index 96% rename from open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/GovernanceMeasurementsProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/GovernanceMeasurementsProperties.java index f3456261097..21648efb429 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/GovernanceMeasurementsProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/GovernanceMeasurementsProperties.java @@ -1,10 +1,11 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.governance; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ClassificationProperties; import java.util.Map; import java.util.Objects; diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/GovernanceMetricProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/GovernanceMetricProperties.java similarity index 88% rename from open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/GovernanceMetricProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/GovernanceMetricProperties.java index e41adda6da3..4c7f0c9b062 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/GovernanceMetricProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/GovernanceMetricProperties.java @@ -1,8 +1,9 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.governance; import com.fasterxml.jackson.annotation.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ReferenceableProperties; import java.util.*; @@ -166,16 +167,12 @@ public void setTarget(String target) public String toString() { return "GovernanceMetricProperties{" + - "domainIdentifier=" + domainIdentifier + - ", displayName='" + displayName + '\'' + - ", description='" + description + '\'' + - ", measurement='" + measurement + '\'' + - ", target='" + target + '\'' + - ", typeName='" + getTypeName() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", extendedProperties=" + getExtendedProperties() + - '}'; + "domainIdentifier=" + domainIdentifier + + ", displayName='" + displayName + '\'' + + ", description='" + description + '\'' + + ", measurement='" + measurement + '\'' + + ", target='" + target + '\'' + + "} " + super.toString(); } diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/GovernanceResultsProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/GovernanceResultsProperties.java similarity index 95% rename from open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/GovernanceResultsProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/GovernanceResultsProperties.java index c693c2124dd..e3f5572d051 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/GovernanceResultsProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/GovernanceResultsProperties.java @@ -1,10 +1,11 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.governance; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; import java.util.Objects; diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/GovernanceRoleProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/GovernanceRoleProperties.java similarity index 78% rename from open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/GovernanceRoleProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/GovernanceRoleProperties.java index 7c402de4744..7e9c8aa5025 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/GovernanceRoleProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/GovernanceRoleProperties.java @@ -1,10 +1,11 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.governance; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.PersonRoleProperties; import java.util.Objects; @@ -80,18 +81,8 @@ public void setDomainIdentifier(int domainIdentifier) public String toString() { return "GovernanceRoleProperties{" + - "domainIdentifier=" + domainIdentifier + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", roleId='" + getRoleId() + '\'' + - ", scope='" + getScope() + '\'' + - ", title='" + getTitle() + '\'' + - ", description='" + getDescription() + '\'' + - ", headCountLimitSet=" + getHeadCountLimitSet() + - ", headCount=" + getHeadCount() + - ", additionalProperties=" + getAdditionalProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; + "domainIdentifier=" + domainIdentifier + + "} " + super.toString(); } diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/GovernanceStatusIdentifierProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/GovernanceStatusIdentifierProperties.java similarity index 86% rename from open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/GovernanceStatusIdentifierProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/GovernanceStatusIdentifierProperties.java index 2fa438416a0..f78229ad221 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/GovernanceStatusIdentifierProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/GovernanceStatusIdentifierProperties.java @@ -1,6 +1,8 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.governance; + +import org.odpi.openmetadata.frameworks.openmetadata.properties.ReferenceableProperties; import java.util.Objects; @@ -117,14 +119,10 @@ public void setDescription(String description) public String toString() { return "GovernanceStatusIdentifierProperties{" + - "levelIdentifier=" + levelIdentifier + - ", displayName='" + displayName + '\'' + - ", description='" + description + '\'' + - ", typeName='" + getTypeName() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", extendedProperties=" + getExtendedProperties() + - '}'; + "levelIdentifier=" + levelIdentifier + + ", displayName='" + displayName + '\'' + + ", description='" + description + '\'' + + "} " + super.toString(); } diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/GovernanceStatusIdentifierSetProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/GovernanceStatusIdentifierSetProperties.java similarity index 86% rename from open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/GovernanceStatusIdentifierSetProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/GovernanceStatusIdentifierSetProperties.java index 3742dc41811..96ab6a4d7d5 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/GovernanceStatusIdentifierSetProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/GovernanceStatusIdentifierSetProperties.java @@ -1,6 +1,8 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.governance; + +import org.odpi.openmetadata.frameworks.openmetadata.properties.ReferenceableProperties; import java.util.Objects; @@ -117,14 +119,10 @@ public void setDescription(String description) public String toString() { return "GovernanceStatusIdentifierSetProperties{" + - "domainIdentifier=" + domainIdentifier + - ", displayName='" + displayName + '\'' + - ", description='" + description + '\'' + - ", typeName='" + getTypeName() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", extendedProperties=" + getExtendedProperties() + - '}'; + "domainIdentifier=" + domainIdentifier + + ", displayName='" + displayName + '\'' + + ", description='" + description + '\'' + + "} " + super.toString(); } diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/GovernanceZoneProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/GovernanceZoneProperties.java similarity index 97% rename from open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/GovernanceZoneProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/GovernanceZoneProperties.java index b209bf0e3e9..e215eabf277 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/GovernanceZoneProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/GovernanceZoneProperties.java @@ -1,6 +1,8 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.governance; + +import org.odpi.openmetadata.frameworks.openmetadata.properties.ReferenceableProperties; import java.util.Objects; diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/LevelIdentifierProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/LevelIdentifierProperties.java new file mode 100644 index 00000000000..9b484258175 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/LevelIdentifierProperties.java @@ -0,0 +1,107 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.governance; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.FindProperties; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * LevelIdentifierProperties describes the properties for searching for a governance action classification by its level. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class LevelIdentifierProperties extends FindProperties +{ + private boolean returnSpecificLevel = false; + private int levelIdentifier = 0; + + + /** + * Default constructor + */ + public LevelIdentifierProperties() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public LevelIdentifierProperties(LevelIdentifierProperties template) + { + super(template); + + if (template != null) + { + this.returnSpecificLevel = template.getReturnSpecificLevel(); + this.levelIdentifier = template.getLevelIdentifier(); + } + } + + + /** + * Return whether the level identifier is in use + * + * @return boolean + */ + public boolean getReturnSpecificLevel() + { + return returnSpecificLevel; + } + + + /** + * Set up whether the level identifier is in use. + * + * @param flag boolean + */ + public void setReturnSpecificLevel(boolean flag) + { + returnSpecificLevel = flag; + } + + + /** + * Return the level to match on. + * + * @return int + */ + public int getLevelIdentifier() + { + return levelIdentifier; + } + + + /** + * Set up the level to match on. + * + * @param levelIdentifier int + */ + public void setLevelIdentifier(int levelIdentifier) + { + this.levelIdentifier = levelIdentifier; + } + + + /** + * JSON-style toString. + * + * @return list of properties and their values. + */ + @Override + public String toString() + { + return "LevelIdentifierProperties{" + + "returnSpecificLevel=" + returnSpecificLevel + + ", levelIdentifier=" + levelIdentifier + + '}'; + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/LicenseProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/LicenseProperties.java new file mode 100644 index 00000000000..77087308469 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/LicenseProperties.java @@ -0,0 +1,546 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.governance; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; + +import java.util.Date; +import java.util.Map; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * LicenseProperties describe the details of a license that shows that an element is licensed with a particular license type. + */ +@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public class LicenseProperties extends RelationshipProperties +{ + private String licenseId = null; + private Date startDate = null; + private Date endDate = null; + private String conditions = null; + private String licensedBy = null; + private String licensedByTypeName = null; + private String licensedByPropertyName = null; + private String custodian = null; + private String custodianTypeName = null; + private String custodianPropertyName = null; + private String licensee = null; + private String licenseeTypeName = null; + private String licenseePropertyName = null; + private Map entitlements = null; + private Map restrictions = null; + private Map obligations = null; + private String notes = null; + + + /** + * Default Constructor + */ + public LicenseProperties() + { + } + + + /** + * Copy/clone Constructor - the resulting object. + * + * @param template object being copied + */ + public LicenseProperties(LicenseProperties template) + { + super(template); + + if (template != null) + { + this.licenseId = template.getLicenseId(); + this.startDate = template.getStartDate(); + this.endDate = template.getEndDate(); + this.conditions = template.getConditions(); + this.licensedBy = template.getLicensedBy(); + this.licensedByTypeName = template.getLicensedByTypeName(); + this.licensedByPropertyName = template.getLicensedByPropertyName(); + this.custodian = template.getCustodian(); + this.custodianTypeName = template.getCustodianTypeName(); + this.custodianPropertyName = template.getCustodianPropertyName(); + this.licensee = template.getLicensee(); + this.licenseeTypeName = template.getLicenseeTypeName(); + this.licenseePropertyName = template.getLicenseePropertyName(); + this.entitlements = template.getEntitlements(); + this.restrictions = template.getRestrictions(); + this.obligations = template.getObligations(); + this.notes = template.getNotes(); + } + } + + + /** + * Return the unique identifier of the license. This value comes from the license authority. + * + * @return string + */ + public String getLicenseId() + { + return licenseId; + } + + + /** + * Set up the unique identifier of the license. This value comes from the license authority. + * + * @param licenseId string + */ + public void setLicenseId(String licenseId) + { + this.licenseId = licenseId; + } + + + /** + * Return the date/time that this license is valid from. + * + * @return date/time + */ + public Date getStartDate() + { + return startDate; + } + + + /** + * Set up the date/time that this license is valid from. + * + * @param startDate date/time + */ + public void setStartDate(Date startDate) + { + this.startDate = startDate; + } + + + /** + * Return the date/time that this license is no longer valid. + * + * @return date/time + */ + public Date getEndDate() + { + return endDate; + } + + + /** + * Set up the date/time that this license is no longer valid. + * + * @param endDate date/time + */ + public void setEndDate(Date endDate) + { + this.endDate = endDate; + } + + + /** + * Return any conditions or endorsements to this license. + * + * @return string text + */ + public String getConditions() + { + return conditions; + } + + + /** + * Set up any conditions or endorsements to this license. + * + * @param conditions string text + */ + public void setConditions(String conditions) + { + this.conditions = conditions; + } + + + /** + * Return the name of the person in the license authority that granted this license. + * + * @return string name/id + */ + public String getLicensedBy() + { + return licensedBy; + } + + + /** + * Set up the name of the person in the license authority that granted this license. + * + * @param licensedBy string name/id + */ + public void setLicensedBy(String licensedBy) + { + this.licensedBy = licensedBy; + } + + + /** + * Return the name of the type of the element supplying the licensedBy property. + * + * @return string type name + */ + public String getLicensedByTypeName() + { + return licensedByTypeName; + } + + + /** + * Set up the name of the type of the element supplying the licensedBy property. + * + * @param licensedByTypeName string type name + */ + public void setLicensedByTypeName(String licensedByTypeName) + { + this.licensedByTypeName = licensedByTypeName; + } + + + /** + * Return the name of the property from the element supplying the licensedBy property. + * + * @return string property name + */ + public String getLicensedByPropertyName() + { + return licensedByPropertyName; + } + + + /** + * Set up the name of the property from the element supplying the licensedBy property. + * + * @param licensedByPropertyName string property name + */ + public void setLicensedByPropertyName(String licensedByPropertyName) + { + this.licensedByPropertyName = licensedByPropertyName; + } + + + /** + * Return the person/team responsible for ensuring that the license conditions are adhered to. + * + * @return string name/id + */ + public String getCustodian() + { + return custodian; + } + + + /** + * Set up the person/team responsible for ensuring that the license conditions are adhered to. + * + * @param custodian string name/id + */ + public void setCustodian(String custodian) + { + this.custodian = custodian; + } + + + /** + * Return the name of the type of the element supplying the custodian property. + * + * @return string type name + */ + public String getCustodianTypeName() + { + return custodianTypeName; + } + + + /** + * Set up the name of the type of the element supplying the custodian property. + * + * @param custodianTypeName string type name + */ + public void setCustodianTypeName(String custodianTypeName) + { + this.custodianTypeName = custodianTypeName; + } + + + /** + * Return the name of the property from the element supplying the custodian property. + * + * @return string property name + */ + public String getCustodianPropertyName() + { + return custodianPropertyName; + } + + + /** + * Set up the name of the property from the element supplying the custodian property. + * + * @param custodianPropertyName string property name + */ + public void setCustodianPropertyName(String custodianPropertyName) + { + this.custodianPropertyName = custodianPropertyName; + } + + + /** + * Return the person/team that received the license. + * + * @return string name/id + */ + public String getLicensee() + { + return licensee; + } + + + /** + * Set up the person/team that received the license. + * + * @param licensee string name/id + */ + public void setLicensee(String licensee) + { + this.licensee = licensee; + } + + + /** + * Return the name of the type of the element supplying the licensee property. + * + * @return string type name + */ + public String getLicenseeTypeName() + { + return licenseeTypeName; + } + + + /** + * Set up the name of the type of the element supplying the licensee property. + * + * @param licenseeTypeName string type name + */ + public void setLicenseeTypeName(String licenseeTypeName) + { + this.licenseeTypeName = licenseeTypeName; + } + + + /** + * Return the name of the property from the element supplying the licensee property. + * + * @return string property name + */ + public String getLicenseePropertyName() + { + return licenseePropertyName; + } + + + /** + * Set up the name of the property from the element supplying the licensee property. + * + * @param licenseePropertyName string property name + */ + public void setLicenseePropertyName(String licenseePropertyName) + { + this.licenseePropertyName = licenseePropertyName; + } + + + /** + * Return the entitlements granted by the license. + * + * @return name value pairs + */ + public Map getEntitlements() + { + return entitlements; + } + + + /** + * Set up the entitlements granted by the license. + * + * @param entitlements name value pairs + */ + public void setEntitlements(Map entitlements) + { + this.entitlements = entitlements; + } + + + /** + * Return the restrictions imposed by the license. + * + * @return name value pairs + */ + public Map getRestrictions() + { + return restrictions; + } + + + /** + * Set up the restrictions imposed by the license. + * + * @param restrictions name value pairs + */ + public void setRestrictions(Map restrictions) + { + this.restrictions = restrictions; + } + + + /** + * Return the obligations stipulated by the license. + * + * @return name value pairs + */ + public Map getObligations() + { + return obligations; + } + + + /** + * Set up the obligations stipulated by the license. + * + * @param obligations name value pairs + */ + public void setObligations(Map obligations) + { + this.obligations = obligations; + } + + + /** + * Return any notes associated with the license. + * + * @return string text + */ + public String getNotes() + { + return notes; + } + + + /** + * Set up any notes associated with the license. + * + * @param notes string text + */ + public void setNotes(String notes) + { + this.notes = notes; + } + + + /** + * JSON-style toString. + * + * @return list of properties and their values. + */ + @Override + public String toString() + { + return "LicenseProperties{" + + "licenseId='" + licenseId + '\'' + + ", startDate=" + startDate + + ", endDate=" + endDate + + ", conditions='" + conditions + '\'' + + ", licensedBy='" + licensedBy + '\'' + + ", licensedByTypeName='" + licensedByTypeName + '\'' + + ", licensedByPropertyName='" + licensedByPropertyName + '\'' + + ", custodian='" + custodian + '\'' + + ", custodianTypeName='" + custodianTypeName + '\'' + + ", custodianPropertyName='" + custodianPropertyName + '\'' + + ", licensee='" + licensee + '\'' + + ", licenseeTypeName='" + licenseeTypeName + '\'' + + ", licenseePropertyName='" + licenseePropertyName + '\'' + + ", entitlements=" + entitlements + + ", restrictions=" + restrictions + + ", obligations=" + obligations + + ", notes='" + notes + '\'' + + ", effectiveFrom=" + getEffectiveFrom() + + ", effectiveTo=" + getEffectiveTo() + + ", extendedProperties=" + getExtendedProperties() + + '}'; + } + + + /** + * Equals method that returns true if containing properties are the same. + * + * @param objectToCompare object to compare + * + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (! (objectToCompare instanceof LicenseProperties)) + { + return false; + } + if (! super.equals(objectToCompare)) + { + return false; + } + LicenseProperties that = (LicenseProperties) objectToCompare; + return Objects.equals(licenseId, that.licenseId) && + Objects.equals(startDate, that.startDate) && + Objects.equals(endDate, that.endDate) && + Objects.equals(conditions, that.conditions) && + Objects.equals(licensedBy, that.licensedBy) && + Objects.equals(licensedByTypeName, that.licensedByTypeName) && + Objects.equals(licensedByPropertyName, that.licensedByPropertyName) && + Objects.equals(custodian, that.custodian) && + Objects.equals(custodianTypeName, that.custodianTypeName) && + Objects.equals(custodianPropertyName, that.custodianPropertyName) && + Objects.equals(licensee, that.licensee) && + Objects.equals(licenseeTypeName, that.licenseeTypeName) && + Objects.equals(licenseePropertyName, that.licenseePropertyName) && + Objects.equals(entitlements, that.entitlements) && + Objects.equals(restrictions, that.restrictions) && + Objects.equals(obligations, that.obligations) && + Objects.equals(notes, that.notes); + } + + + /** + * Just use the GUID for the hash code as it should be unique. + * + * @return int code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), licenseId, startDate, endDate, conditions, licensedBy, licensedByTypeName, licensedByPropertyName, + custodian, custodianTypeName, custodianPropertyName, licensee, licenseeTypeName, licenseePropertyName, + obligations, restrictions, entitlements, notes); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/LicenseTypeProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/LicenseTypeProperties.java new file mode 100644 index 00000000000..4a96ce6feef --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/LicenseTypeProperties.java @@ -0,0 +1,136 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.governance; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * LicenseTypeProperties defines a license that the organization recognizes and has governance + * definitions to support it. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class LicenseTypeProperties extends GovernanceDefinitionProperties +{ + private String details = null; + + + /** + * Default Constructor + */ + public LicenseTypeProperties() + { + } + + + /** + * Copy/Clone Constructor + * + * @param template object to copy + */ + public LicenseTypeProperties(LicenseTypeProperties template) + { + super(template); + + if (template != null) + { + this.details = template.getDetails(); + } + } + + + /** + * Return the specific details of the license. + * + * @return string description + */ + public String getDetails() + { + return details; + } + + + /** + * Set up the specific details of the license. + * + * @param details string description + */ + public void setDetails(String details) + { + this.details = details; + } + + + /** + * JSON-style toString + * + * @return string containing the properties and their values + */ + @Override + public String toString() + { + return "LicenseTypeProperties{" + + "details='" + details + '\'' + + ", typeName='" + getTypeName() + '\'' + + ", documentIdentifier='" + getDocumentIdentifier() + '\'' + + ", additionalProperties=" + getAdditionalProperties() + + ", extendedProperties=" + getExtendedProperties() + + ", title='" + getTitle() + '\'' + + ", summary='" + getSummary() + '\'' + + ", description='" + getDescription() + '\'' + + ", scope='" + getScope() + '\'' + + ", domainIdentifier=" + getDomainIdentifier() + + ", priority='" + getPriority() + '\'' + + ", implications=" + getImplications() + + ", outcomes=" + getOutcomes() + + ", results=" + getResults() + + '}'; + } + + + /** + * Compare the values of the supplied object with those stored in the current object. + * + * @param objectToCompare supplied object + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + LicenseTypeProperties that = (LicenseTypeProperties) objectToCompare; + return Objects.equals(details, that.details); + } + + + + /** + * Return hash code based on properties. + * + * @return int + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), details); + } +} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/OwnerProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/OwnerProperties.java similarity index 84% rename from open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/OwnerProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/OwnerProperties.java index 5d729f88f51..81968bd9492 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/OwnerProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/OwnerProperties.java @@ -1,13 +1,24 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetmanager.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.governance; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ClassificationProperties; import java.util.Objects; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + /** * OwnerProperties describes the properties that identifies the owner of an attached element (or the resource it represents). */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) public class OwnerProperties extends ClassificationProperties { private String owner = null; diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/RetentionClassificationProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/RetentionClassificationProperties.java new file mode 100644 index 00000000000..50231ba73fc --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/RetentionClassificationProperties.java @@ -0,0 +1,211 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.openmetadata.properties.governance; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import java.util.Date; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * RetentionClassificationProperties defines the retention requirements for related data items. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class RetentionClassificationProperties extends GovernanceClassificationBase +{ + private int retentionBasis = 0; + private String associatedGUID = null; + private Date archiveAfter = null; + private Date deleteAfter = null; + + + /** + * Default constructor + */ + public RetentionClassificationProperties() + { + super(); + } + + + /** + * Copy/clone constructor. + * + * @param template object to copy + */ + public RetentionClassificationProperties(RetentionClassificationProperties template) + { + super(template); + + if (template != null) + { + retentionBasis = template.getRetentionBasis(); + associatedGUID = template.getAssociatedGUID(); + archiveAfter = template.getArchiveAfter(); + deleteAfter = template.getDeleteAfter(); + } + } + + + /** + * Return a description of the factor used to set the archiveAfter and deleteAfter dates. + * + * @return int + */ + public int getRetentionBasis() + { + return retentionBasis; + } + + + /** + * Set up a description of the factor used to set the archiveAfter and deleteAfter dates. + * + * @param retentionBasis int + */ + public void setRetentionBasis(int retentionBasis) + { + this.retentionBasis = retentionBasis; + } + + + /** + * Return the unique identifier of the element used in deciding the archiveAfter and deleteAfter dates. + * For example if the retention basis is determined by the project lifetime, this identifier is the + * identifier of the associated project. + * + * @return string guid + */ + public String getAssociatedGUID() + { + return associatedGUID; + } + + + /** + * Set up the unique identifier of the element used in deciding the archiveAfter and deleteAfter dates. + * For example if the retention basis is determined by the project lifetime, this identifier is the + * identifier of the associated project. + * + * @param associatedGUID string guid + */ + public void setAssociatedGUID(String associatedGUID) + { + this.associatedGUID = associatedGUID; + } + + + /** + * Return the date that this asset will be archived. + * + * @return date/timestamp + */ + public Date getArchiveAfter() + { + return archiveAfter; + } + + + /** + * Set up the date that this asset will be archived. + * + * @param archiveAfter date/timestamp + */ + public void setArchiveAfter(Date archiveAfter) + { + this.archiveAfter = archiveAfter; + } + + + /** + * Return the date that this asset will be permanently deleted. + * + * @return date/timestamp + */ + public Date getDeleteAfter() + { + return deleteAfter; + } + + + /** + * Set up the date that this asset will be permanently deleted. + * + * @param deleteAfter date/timestamp + */ + public void setDeleteAfter(Date deleteAfter) + { + this.deleteAfter = deleteAfter; + } + + + /** + * Standard toString method. + * + * @return print out of variables in a JSON-style + */ + @Override + public String toString() + { + return "RetentionClassificationProperties{" + + "retentionBasis=" + retentionBasis + + ", associatedGUID='" + associatedGUID + '\'' + + ", archiveAfter=" + archiveAfter + + ", deleteAfter=" + deleteAfter + + ", status=" + getStatus() + + ", confidence=" + getConfidence() + + ", steward='" + getSteward() + '\'' + + ", source='" + getSource() + '\'' + + ", notes='" + getNotes() + + '}'; + } + + + /** + * Compare the values of the supplied object with those stored in the current object. + * + * @param objectToCompare supplied object + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + RetentionClassificationProperties that = (RetentionClassificationProperties) objectToCompare; + return retentionBasis == that.retentionBasis && + Objects.equals(associatedGUID, that.associatedGUID) && + Objects.equals(archiveAfter, that.archiveAfter) && + Objects.equals(deleteAfter, that.deleteAfter); + } + + + /** + * Return code value representing the contents of this object. + * + * @return int + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), retentionBasis, associatedGUID, archiveAfter, deleteAfter); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/SemanticAssignmentProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/SemanticAssignmentProperties.java new file mode 100644 index 00000000000..02d2d990af9 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/SemanticAssignmentProperties.java @@ -0,0 +1,283 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.openmetadata.properties.governance; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.enums.GlossaryTermAssignmentStatus; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * SemanticAssignmentProperties links an element to a glossary term to indicate that the glossary term describes its meaning. + */ +@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public class SemanticAssignmentProperties extends RelationshipProperties +{ + private String expression = null; + private String description = null; + private GlossaryTermAssignmentStatus status = null; + private int confidence = 0; + private String createdBy = null; + private String steward = null; + private String source = null; + + + /** + * Default constructor + */ + public SemanticAssignmentProperties() + { + super(); + } + + + /** + * Copy/clone constructor. + * + * @param template template object to copy. + */ + public SemanticAssignmentProperties(SemanticAssignmentProperties template) + { + super(template); + + if (template != null) + { + expression = template.getExpression(); + description = template.getDescription(); + status = template.getStatus(); + steward = template.getSteward(); + source = template.getSource(); + } + } + + + /** + * Set up the expression that describes the relationship. + * + * @param expression String name + */ + public void setExpression(String expression) + { + this.expression = expression; + } + + + /** + * Returns the expression that describes the relationship. + * + * @return String name + */ + public String getExpression() + { + return expression; + } + + + /** + * Set up description of the relationship. + * + * @param description String + */ + public void setDescription(String description) + { + this.description = description; + } + + + /** + * Return the description for the relationship. + * + * @return String description + */ + public String getDescription() + { + return description; + } + + + /** + * Set up whether this relationship should be used. + * + * @param status status enum + */ + public void setStatus(GlossaryTermAssignmentStatus status) + { + this.status = status; + } + + + /** + * Returns whether this relationship should be used. + * + * @return status enum + */ + public GlossaryTermAssignmentStatus getStatus() + { + return status; + } + + + /** + * Return the level of confidence that the relationship is correct. 0 means unassigned. Typical assigned values are usually between 1-100 + * as a percentage scale. + * + * @return int + */ + public int getConfidence() + { + return confidence; + } + + + /** + * Set up the level of confidence that the relationship is correct. 0 means unassigned. Typical assigned values are usually between 1-100 + * as a percentage scale. + * + * @param confidence int + */ + public void setConfidence(int confidence) + { + this.confidence = confidence; + } + + + /** + * Return the name/description of the creator of the relationship. The relationship includes the userId of the creator, so this field is for + * a more business friendly name. + * + * @return string name + */ + public String getCreatedBy() + { + return createdBy; + } + + + /** + * Set up the name/description of the creator of the relationship. The relationship includes the userId of the creator, so this field is for + * a more business friendly name. + * + * @param createdBy string name + */ + public void setCreatedBy(String createdBy) + { + this.createdBy = createdBy; + } + + + /** + * Set up the id of the steward who assigned the relationship (or approved the discovered value). + * + * @param steward user id or name of steward + */ + public void setSteward(String steward) + { + this.steward = steward; + } + + + /** + * Returns the id of the steward who assigned the relationship (or approved the discovered value). + * + * @return user id or name of steward + */ + public String getSteward() + { + return steward; + } + + + /** + * Set up the id of the source of the knowledge of the relationship. + * + * @param source String id + */ + public void setSource(String source) + { + this.source = source; + } + + + /** + * Returns the id of the source of the knowledge of the relationship. + * + * @return String id + */ + public String getSource() + { + return source; + } + + + /** + * Standard toString method. + * + * @return print out of variables in a JSON-style + */ + @Override + public String toString() + { + return "GlossaryTermRelationship{" + + "expression='" + expression + '\'' + + ", description='" + description + '\'' + + ", status=" + status + + ", steward='" + steward + '\'' + + ", source='" + source + '\'' + + ", effectiveFrom=" + getEffectiveFrom() + + ", effectiveTo=" + getEffectiveTo() + + ", extendedProperties=" + getExtendedProperties() + + '}'; + } + + + /** + * Compare the values of the supplied object with those stored in the current object. + * + * @param objectToCompare supplied object + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (! (objectToCompare instanceof SemanticAssignmentProperties that)) + { + return false; + } + if (! super.equals(objectToCompare)) + { + return false; + } + return confidence == that.confidence && + Objects.equals(expression, that.expression) && + Objects.equals(description, that.description) && + status == that.status && + Objects.equals(createdBy, that.createdBy) && + Objects.equals(steward, that.steward) && + Objects.equals(source, that.source); + } + + + /** + * Return hash code based on properties. + * + * @return int + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), expression, description, status, confidence, createdBy, steward, source); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/StakeholderProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/StakeholderProperties.java new file mode 100644 index 00000000000..a8002e59314 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/StakeholderProperties.java @@ -0,0 +1,126 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.governance; + + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * StakeholderProperties provides a details of a stakeholder for an initiative. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class StakeholderProperties extends RelationshipProperties +{ + String stakeholderRole = null; + + /** + * Default constructor + */ + public StakeholderProperties() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public StakeholderProperties(StakeholderProperties template) + { + super(template); + + if (template != null) + { + this.stakeholderRole = template.getStakeholderRole(); + } + } + + + /** + * Return the role of the stakeholder to the initiative. + * + * @return role type + */ + public String getStakeholderRole() + { + return stakeholderRole; + } + + + /** + * Set up the role of the stakeholder to the initiative. + * + * @param stakeholderRole role type + */ + public void setStakeholderRole(String stakeholderRole) + { + this.stakeholderRole = stakeholderRole; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "StakeholderProperties{" + + "effectiveFrom=" + getEffectiveFrom() + + ", effectiveTo=" + getEffectiveTo() + + ", extendedProperties=" + getExtendedProperties() + + ", stakeholderRole='" + stakeholderRole + '\'' + + '}'; + } + + + /** + * Compare the values of the supplied object with those stored in the current object. + * + * @param objectToCompare supplied object + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (! super.equals(objectToCompare)) + { + return false; + } + StakeholderProperties that = (StakeholderProperties) objectToCompare; + return Objects.equals(stakeholderRole, that.stakeholderRole); + } + + + /** + * Return hash code based on properties. + * + * @return int + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), stakeholderRole); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/SubjectAreaClassificationProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/SubjectAreaClassificationProperties.java new file mode 100644 index 00000000000..7b10377b51e --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/SubjectAreaClassificationProperties.java @@ -0,0 +1,127 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.governance; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ClassificationProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * A subject area defines a group of definitions for governing assets related to a specific topic. The subject area definition defines + * how the assets related to the topic should be managed. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class SubjectAreaClassificationProperties extends ClassificationProperties +{ + private String subjectAreaName = null; + + + /** + * Default constructor + */ + public SubjectAreaClassificationProperties() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public SubjectAreaClassificationProperties(SubjectAreaClassificationProperties template) + { + super(template); + + if (template != null) + { + this.subjectAreaName = template.getSubjectAreaName(); + } + } + + + /** + * Return the name of the subject area - this is added to the SubjectArea classification. + * + * @return string name + */ + public String getSubjectAreaName() + { + return subjectAreaName; + } + + + /** + * Set up the name of the subject area - this is added to the SubjectArea classification. + * + * @param subjectAreaName string name + */ + public void setSubjectAreaName(String subjectAreaName) + { + this.subjectAreaName = subjectAreaName; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "SubjectAreaClassificationProperties{" + + "effectiveFrom=" + getEffectiveFrom() + + ", effectiveTo=" + getEffectiveTo() + + ", extendedProperties=" + getExtendedProperties() + + ", subjectAreaName='" + subjectAreaName + '\'' + + '}'; + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (! (objectToCompare instanceof SubjectAreaClassificationProperties)) + { + return false; + } + if (! super.equals(objectToCompare)) + { + return false; + } + SubjectAreaClassificationProperties that = (SubjectAreaClassificationProperties) objectToCompare; + return Objects.equals(subjectAreaName, that.subjectAreaName); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), getSubjectAreaName()); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/SubjectAreaProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/SubjectAreaProperties.java new file mode 100644 index 00000000000..1251d21b4fc --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/SubjectAreaProperties.java @@ -0,0 +1,251 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.governance; + +import org.odpi.openmetadata.frameworks.openmetadata.properties.ReferenceableProperties; + +import java.util.Objects; + +/** + * A subject area defines a group of definitions for governing assets related to a specific topic. The subject area definition defines + * how the assets related to the topic should be managed. + */ +public class SubjectAreaProperties extends ReferenceableProperties +{ + private String subjectAreaName = null; + private String displayName = null; + private String description = null; + private String usage = null; + private String scope = null; + private int domainIdentifier = 0; + + + /** + * Default constructor + */ + public SubjectAreaProperties() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public SubjectAreaProperties(SubjectAreaProperties template) + { + super(template); + + if (template != null) + { + this.subjectAreaName = template.getSubjectAreaName(); + this.displayName = template.getDisplayName(); + this.description = template.getDescription(); + this.usage = template.getUsage(); + this.scope = template.getScope(); + this.domainIdentifier = template.getDomainIdentifier(); + } + } + + + /** + * Return the name of the subject area - this is added to the SubjectArea classification. + * + * @return string name + */ + public String getSubjectAreaName() + { + return subjectAreaName; + } + + + /** + * Set up the name of the subject area - this is added to the SubjectArea classification. + * + * @param subjectAreaName string name + */ + public void setSubjectAreaName(String subjectAreaName) + { + this.subjectAreaName = subjectAreaName; + } + + + /** + * Return the short name for the governance zone. + * + * @return string name + */ + public String getDisplayName() + { + return displayName; + } + + + /** + * Set up the short name for the governance zone. + * + * @param displayName string name + */ + public void setDisplayName(String displayName) + { + this.displayName = displayName; + } + + + /** + * Return the description for the governance zone + * + * @return text + */ + public String getDescription() + { + return description; + } + + + /** + * Set up the description of the governance zone + * + * @param description text + */ + public void setDescription(String description) + { + this.description = description; + } + + + /** + * Return details of the usage of this subject area. + * + * @return text + */ + public String getUsage() + { + return usage; + } + + + /** + * Set up the details of the usage of this subject area. + * + * @param usage text + */ + public void setUsage(String usage) + { + this.usage = usage; + } + + + /** + * Return the definition of the scope of this subject area + * + * @return scope definition + */ + public String getScope() + { + return scope; + } + + + /** + * Set up the scope definition + * + * @param scope string definition + */ + public void setScope(String scope) + { + this.scope = scope; + } + + + /** + * Return the identifier of the governance domain that this subject area is managed by. + * + * @return int identifier + */ + public int getDomainIdentifier() + { + return domainIdentifier; + } + + + /** + * Set up the identifier of the governance domain that this subject area is managed by. + * + * @param domainIdentifier int identifier + */ + public void setDomainIdentifier(int domainIdentifier) + { + this.domainIdentifier = domainIdentifier; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "SubjectAreaProperties{" + + "qualifiedName='" + getQualifiedName() + '\'' + + ", additionalProperties=" + getAdditionalProperties() + + ", effectiveFrom=" + getEffectiveFrom() + + ", effectiveTo=" + getEffectiveTo() + + ", typeName='" + getTypeName() + '\'' + + ", extendedProperties=" + getExtendedProperties() + + ", subjectAreaName='" + subjectAreaName + '\'' + + ", displayName='" + displayName + '\'' + + ", description='" + description + '\'' + + ", usage='" + usage + '\'' + + ", scope='" + scope + '\'' + + ", domainIdentifier=" + domainIdentifier + + '}'; + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + SubjectAreaProperties that = (SubjectAreaProperties) objectToCompare; + return domainIdentifier == that.domainIdentifier && + Objects.equals(subjectAreaName, that.subjectAreaName) && + Objects.equals(displayName, that.displayName) && + Objects.equals(description, that.description) && + Objects.equals(usage, that.usage) && + Objects.equals(scope, that.scope); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), getSubjectAreaName(), getDisplayName(), getDescription(), getUsage(), getScope(), getDomainIdentifier()); + } +} diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/SupportingDefinitionProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/SupportingDefinitionProperties.java similarity index 88% rename from open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/SupportingDefinitionProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/SupportingDefinitionProperties.java index 1ef219458ca..11ae11ec614 100644 --- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/SupportingDefinitionProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/SupportingDefinitionProperties.java @@ -1,11 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.governanceprogram.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.governance; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; import java.util.Objects; @@ -78,11 +79,8 @@ public void setRationale(String rationale) public String toString() { return "SupportingDefinitionProperties{" + - "effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", extendedProperties=" + getExtendedProperties() + - ", rationale='" + rationale + '\'' + - '}'; + "rationale='" + rationale + '\'' + + "} " + super.toString(); } diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/package-info.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/package-info.java new file mode 100644 index 00000000000..daebf93cd1a --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/governance/package-info.java @@ -0,0 +1,7 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +/** + * Beans for managing governance information. + */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.governance; \ No newline at end of file diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/lineage/ControlFlowProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/lineage/ControlFlowProperties.java new file mode 100644 index 00000000000..33a976a966c --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/lineage/ControlFlowProperties.java @@ -0,0 +1,172 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.lineage; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * ControlFlowProperties describe the properties for a control flow relationship. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ControlFlowProperties extends RelationshipProperties +{ + private String qualifiedName = null; + private String description = null; + private String guard = null; + + + /** + * Default constructor + */ + public ControlFlowProperties() + { + super(); + } + + + /** + * Copy/clone constructor. Retrieves values from the supplied template + * + * @param template element to copy + */ + public ControlFlowProperties(ControlFlowProperties template) + { + if (template != null) + { + qualifiedName = template.getQualifiedName(); + description = template.getDescription(); + guard = template.getGuard(); + } + } + + + /** + * Set up the fully qualified name. + * + * @param qualifiedName String name + */ + public void setQualifiedName(String qualifiedName) + { + this.qualifiedName = qualifiedName; + } + + + /** + * Returns the stored qualified name property for the relationship. + * If no qualified name is available then the empty string is returned. + * + * @return qualifiedName + */ + public String getQualifiedName() + { + return qualifiedName; + } + + + /** + * Return the description of the relationship. + * + * @return string text + */ + public String getDescription() + { + return description; + } + + + /** + * Set up the description of the relationship. + * + * @param description string text + */ + public void setDescription(String description) + { + this.description = description; + } + + + /** + * Return the guard of the relationship. + * + * @return string guard + */ + public String getGuard() + { + return guard; + } + + + /** + * Set up the guard of the relationship. + * + * @param guard string name + */ + public void setGuard(String guard) + { + this.guard = guard; + } + + + /** + * Standard toString method. + * + * @return print out of variables in a JSON-style + */ + @Override + public String toString() + { + return "ControlFlowProperties{" + + "qualifiedName='" + qualifiedName + '\'' + + ", description='" + description + '\'' + + ", guard='" + guard + '\'' + + ", effectiveFrom=" + getEffectiveFrom() + + ", effectiveTo=" + getEffectiveTo() + + '}'; + } + + + /** + * Compare the values of the supplied object with those stored in the current object. + * + * @param objectToCompare supplied object + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + ControlFlowProperties that = (ControlFlowProperties) objectToCompare; + return Objects.equals(getQualifiedName(), that.getQualifiedName()) && + Objects.equals(getDescription(), that.getDescription()) && + Objects.equals(getGuard(), that.getGuard()); + } + + + /** + * Return hash code based on properties. + * + * @return int + */ + @Override + public int hashCode() + { + return Objects.hash(qualifiedName, description, guard); + } +} \ No newline at end of file diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/lineage/DataFlowProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/lineage/DataFlowProperties.java new file mode 100644 index 00000000000..548afac500b --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/lineage/DataFlowProperties.java @@ -0,0 +1,198 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.lineage; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * DataFlowProperties describe the properties for a data flow relationship. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class DataFlowProperties extends RelationshipProperties +{ + private String qualifiedName = null; + private String description = null; + private String formula = null; + private String formulaType = null; + + + /** + * Default constructor + */ + public DataFlowProperties() + { + super(); + } + + + /** + * Copy/clone constructor. Retrieves values from the supplied template + * + * @param template element to copy + */ + public DataFlowProperties(DataFlowProperties template) + { + if (template != null) + { + qualifiedName = template.getQualifiedName(); + description = template.getDescription(); + formula = template.getFormula(); + formulaType = template.getFormulaType(); + } + } + + + /** + * Set up the fully qualified name. + * + * @param qualifiedName String name + */ + public void setQualifiedName(String qualifiedName) + { + this.qualifiedName = qualifiedName; + } + + + /** + * Returns the stored qualified name property for the relationship. + * If no qualified name is available then the empty string is returned. + * + * @return qualifiedName + */ + public String getQualifiedName() + { + return qualifiedName; + } + + + /** + * Return the description of the relationship. + * + * @return string text + */ + public String getDescription() + { + return description; + } + + + /** + * Set up the description of the relationship. + * + * @param description string text + */ + public void setDescription(String description) + { + this.description = description; + } + + + /** + * Return the formula of the relationship. + * + * @return string formula + */ + public String getFormula() + { + return formula; + } + + + /** + * Set up the formula of the relationship. + * + * @param formula string name + */ + public void setFormula(String formula) + { + this.formula = formula; + } + + + /** + * Return the specification language for the formula. + * + * @return string description + */ + public String getFormulaType() + { + return formulaType; + } + + + /** + * Set up the specification language for the formula. + * + * @param formulaType string description + */ + public void setFormulaType(String formulaType) + { + this.formulaType = formulaType; + } + + + /** + * Standard toString method. + * + * @return print out of variables in a JSON-style + */ + @Override + public String toString() + { + return "DataFlowProperties{" + + "qualifiedName='" + qualifiedName + '\'' + + ", description='" + description + '\'' + + ", formula='" + formula + '\'' + + ", formulaType='" + formulaType + '\'' + + ", effectiveFrom=" + getEffectiveFrom() + + ", effectiveTo=" + getEffectiveTo() + + '}'; + } + + + /** + * Compare the values of the supplied object with those stored in the current object. + * + * @param objectToCompare supplied object + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + DataFlowProperties that = (DataFlowProperties) objectToCompare; + return Objects.equals(getQualifiedName(), that.getQualifiedName()) && + Objects.equals(getDescription(), that.getDescription()) && + Objects.equals(getFormula(), that.getFormula()) && + Objects.equals(getFormulaType(), that.getFormulaType()); + } + + + /** + * Return hash code based on properties. + * + * @return int + */ + @Override + public int hashCode() + { + return Objects.hash(qualifiedName, description, formula, formulaType); + } +} \ No newline at end of file diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/lineage/LineageMappingProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/lineage/LineageMappingProperties.java new file mode 100644 index 00000000000..c1d9d230b74 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/lineage/LineageMappingProperties.java @@ -0,0 +1,146 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.lineage; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * LineageMappingProperties describe the properties for a lineage mapping relationship. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class LineageMappingProperties extends RelationshipProperties +{ + private String qualifiedName = null; + private String description = null; + + + /** + * Default constructor + */ + public LineageMappingProperties() + { + super(); + } + + + /** + * Copy/clone constructor. Retrieves values from the supplied template + * + * @param template element to copy + */ + public LineageMappingProperties(LineageMappingProperties template) + { + if (template != null) + { + qualifiedName = template.getQualifiedName(); + description = template.getDescription(); + } + } + + + /** + * Set up the fully qualified name. + * + * @param qualifiedName String name + */ + public void setQualifiedName(String qualifiedName) + { + this.qualifiedName = qualifiedName; + } + + + /** + * Returns the stored qualified name property for the relationship. + * If no qualified name is available then the empty string is returned. + * + * @return qualifiedName + */ + public String getQualifiedName() + { + return qualifiedName; + } + + + /** + * Return the description of the relationship. + * + * @return string text + */ + public String getDescription() + { + return description; + } + + + /** + * Set up the description of the relationship. + * + * @param description string text + */ + public void setDescription(String description) + { + this.description = description; + } + + + /** + * Standard toString method. + * + * @return print out of variables in a JSON-style + */ + @Override + public String toString() + { + return "LineageMappingProperties{" + + "effectiveFrom=" + getEffectiveFrom() + + ", effectiveTo=" + getEffectiveTo() + + ", qualifiedName='" + qualifiedName + '\'' + + ", description='" + description + '\'' + + '}'; + } + + + /** + * Compare the values of the supplied object with those stored in the current object. + * + * @param objectToCompare supplied object + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + LineageMappingProperties that = (LineageMappingProperties) objectToCompare; + return Objects.equals(getQualifiedName(), that.getQualifiedName()) && + Objects.equals(getDescription(), that.getDescription()); + } + + + /** + * Return hash code based on properties. + * + * @return int + */ + @Override + public int hashCode() + { + return Objects.hash(qualifiedName, description); + } +} \ No newline at end of file diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/lineage/ProcessCallProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/lineage/ProcessCallProperties.java new file mode 100644 index 00000000000..40b1a1ad16c --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/lineage/ProcessCallProperties.java @@ -0,0 +1,198 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.lineage; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * ProcessCallProperties describe the properties for a process call relationship. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ProcessCallProperties extends RelationshipProperties +{ + private String qualifiedName = null; + private String description = null; + private String formula = null; + private String formulaType = null; + + + /** + * Default constructor + */ + public ProcessCallProperties() + { + super(); + } + + + /** + * Copy/clone constructor. Retrieves values from the supplied template + * + * @param template element to copy + */ + public ProcessCallProperties(ProcessCallProperties template) + { + if (template != null) + { + qualifiedName = template.getQualifiedName(); + description = template.getDescription(); + formula = template.getFormula(); + formulaType = template.getFormulaType(); + } + } + + + /** + * Set up the fully qualified name. + * + * @param qualifiedName String name + */ + public void setQualifiedName(String qualifiedName) + { + this.qualifiedName = qualifiedName; + } + + + /** + * Returns the stored qualified name property for the relationship. + * If no qualified name is available then the empty string is returned. + * + * @return qualifiedName + */ + public String getQualifiedName() + { + return qualifiedName; + } + + + /** + * Return the description of the relationship. + * + * @return string text + */ + public String getDescription() + { + return description; + } + + + /** + * Set up the description of the relationship. + * + * @param description string text + */ + public void setDescription(String description) + { + this.description = description; + } + + + /** + * Return the formula of the relationship. + * + * @return string formula + */ + public String getFormula() + { + return formula; + } + + + /** + * Set up the formula of the relationship. + * + * @param formula string name + */ + public void setFormula(String formula) + { + this.formula = formula; + } + + + /** + * Return the specification language for the formula. + * + * @return string description + */ + public String getFormulaType() + { + return formulaType; + } + + + /** + * Set up the specification language for the formula. + * + * @param formulaType string description + */ + public void setFormulaType(String formulaType) + { + this.formulaType = formulaType; + } + + + /** + * Standard toString method. + * + * @return print out of variables in a JSON-style + */ + @Override + public String toString() + { + return "ProcessCallProperties{" + + "qualifiedName='" + qualifiedName + '\'' + + ", description='" + description + '\'' + + ", formula='" + formula + '\'' + + ", formulaType='" + formulaType + '\'' + + ", effectiveFrom=" + getEffectiveFrom() + + ", effectiveTo=" + getEffectiveTo() + + '}'; + } + + + /** + * Compare the values of the supplied object with those stored in the current object. + * + * @param objectToCompare supplied object + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + ProcessCallProperties that = (ProcessCallProperties) objectToCompare; + return Objects.equals(getQualifiedName(), that.getQualifiedName()) && + Objects.equals(getDescription(), that.getDescription()) && + Objects.equals(getFormula(), that.getFormula()) && + Objects.equals(getFormulaType(), that.getFormulaType()); + } + + + /** + * Return hash code based on properties. + * + * @return int + */ + @Override + public int hashCode() + { + return Objects.hash(qualifiedName, description, formula, formulaType); + } +} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/AdjacentLocationProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/locations/AdjacentLocationProperties.java similarity index 78% rename from open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/AdjacentLocationProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/locations/AdjacentLocationProperties.java index f01ebec8ecc..430d4501654 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/AdjacentLocationProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/locations/AdjacentLocationProperties.java @@ -1,10 +1,11 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.locations; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; @@ -45,10 +46,6 @@ public AdjacentLocationProperties(AdjacentLocationProperties template) @Override public String toString() { - return "AdjacentLocationProperties{" + - "effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", extendedProperties=" + getExtendedProperties() + - '}'; + return "AdjacentLocationProperties{} " + super.toString(); } } diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/AssetLocationProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/locations/AssetLocationProperties.java similarity index 78% rename from open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/AssetLocationProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/locations/AssetLocationProperties.java index 261bfe6c4b5..a4ef3d3a7c7 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/AssetLocationProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/locations/AssetLocationProperties.java @@ -1,10 +1,11 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.locations; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; @@ -45,10 +46,6 @@ public AssetLocationProperties(AssetLocationProperties template) @Override public String toString() { - return "AssetLocationProperties{" + - "effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", extendedProperties=" + getExtendedProperties() + - '}'; + return "AssetLocationProperties{} " + super.toString(); } } diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/locations/CyberLocationProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/locations/CyberLocationProperties.java new file mode 100644 index 00000000000..84ea666b2fe --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/locations/CyberLocationProperties.java @@ -0,0 +1,113 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.openmetadata.properties.locations; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ClassificationProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * CyberLocationProperties indicates that a location is a cyber location rather than a physical location. + */ +@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public class CyberLocationProperties extends ClassificationProperties +{ + private String address = null; + + + /** + * Default constructor + */ + public CyberLocationProperties() + { + super(); + } + + + /** + * Copy/clone constructor. + * + * @param template template object to copy. + */ + public CyberLocationProperties(CyberLocationProperties template) + { + super(template); + + if (template != null) + { + address = template.getAddress(); + } + } + + + /** + * Set up address of the location. + * + * @param address String + */ + public void setAddress(String address) + { + this.address = address; + } + + + /** + * Return the address for the location. + * + * @return String address + */ + public String getAddress() + { + return address; + } + + + /** + * Standard toString method. + * + * @return print out of variables in a JSON-style + */ + @Override + public String toString() + { + return "CyberLocationProperties{" + + "address='" + address + '\'' + + "} " + super.toString(); + } + + /** + * Compare the values of the supplied object with those stored in the current object. + * + * @param objectToCompare supplied object + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) return true; + if (objectToCompare == null || getClass() != objectToCompare.getClass()) return false; + if (!super.equals(objectToCompare)) return false; + CyberLocationProperties that = (CyberLocationProperties) objectToCompare; + return Objects.equals(address, that.address); + } + + /** + * Return hash code based on properties. + * + * @return int + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), address); + } +} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/DigitalLocationProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/locations/DigitalLocationProperties.java similarity index 88% rename from open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/DigitalLocationProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/locations/DigitalLocationProperties.java index 9c5d5ec8010..d4841303d72 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/DigitalLocationProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/locations/DigitalLocationProperties.java @@ -1,10 +1,11 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.locations; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ClassificationProperties; import java.util.Objects; @@ -78,14 +79,10 @@ public void setNetworkAddress(String networkAddress) public String toString() { return "DigitalLocationProperties{" + - "effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", extendedProperties=" + getExtendedProperties() + - ", networkAddress='" + networkAddress + '\'' + - '}'; + "networkAddress='" + networkAddress + '\'' + + "} " + super.toString(); } - /** * Return comparison result based on the content of the properties. * diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/FixedLocationProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/locations/FixedLocationProperties.java similarity index 96% rename from open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/FixedLocationProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/locations/FixedLocationProperties.java index 56ba3b5e5d1..f257667dd07 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/FixedLocationProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/locations/FixedLocationProperties.java @@ -1,10 +1,11 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.locations; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ClassificationProperties; import java.util.Objects; diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/locations/LocationProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/locations/LocationProperties.java new file mode 100644 index 00000000000..7b672d2066a --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/locations/LocationProperties.java @@ -0,0 +1,183 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.openmetadata.properties.locations; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ReferenceableProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * LocationProperties is a class for representing a generic location. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class LocationProperties extends ReferenceableProperties +{ + private String identifier = null; + private String displayName = null; + private String description = null; + + + /** + * Default constructor + */ + public LocationProperties() + { + super(); + } + + + /** + * Copy/clone constructor. + * + * @param template object to copy + */ + public LocationProperties(LocationProperties template) + { + super(template); + + if (template != null) + { + identifier = template.getIdentifier(); + displayName = template.getDisplayName(); + description = template.getDescription(); + } + } + + + /** + * Return the code value or symbol used to identify the location - typically unique. + * + * @return string identifier + */ + public String getIdentifier() + { + return identifier; + } + + + /** + * Set up the code value or symbol used to identify the location - typically unique. + * + * @param identifier string identifier + */ + public void setIdentifier(String identifier) + { + this.identifier = identifier; + } + + + /** + * Return a human memorable name for the location. + * + * @return string name + */ + public String getDisplayName() + { + return displayName; + } + + + /** + * Set up a human memorable name for the location. + * + * @param displayName string name + */ + public void setDisplayName(String displayName) + { + this.displayName = displayName; + } + + + /** + * Return the description of the location. + * + * @return string text + */ + public String getDescription() + { + return description; + } + + + /** + * Set up the description of the location. + * + * @param description string text + */ + public void setDescription(String description) + { + this.description = description; + } + + + /** + * Standard toString method. + * + * @return print out of variables in a JSON-style + */ + @Override + public String toString() + { + return "LocationProperties{" + + "identifier='" + identifier + '\'' + + ", displayName='" + displayName + '\'' + + ", description='" + description + '\'' + + ", qualifiedName='" + getQualifiedName() + '\'' + + ", additionalProperties=" + getAdditionalProperties() + + ", effectiveFrom=" + getEffectiveFrom() + + ", effectiveTo=" + getEffectiveTo() + + ", vendorProperties=" + getVendorProperties() + + ", typeName='" + getTypeName() + '\'' + + ", extendedProperties=" + getExtendedProperties() + + '}'; + } + + + /** + * Compare the values of the supplied object with those stored in the current object. + * + * @param objectToCompare supplied object + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + LocationProperties that = (LocationProperties) objectToCompare; + return Objects.equals(identifier, that.identifier) && + Objects.equals(displayName, that.displayName) && + Objects.equals(description, that.description); + } + + + /** + * Return hash code based on properties. + * + * @return int + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), identifier, displayName, description); + } +} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/NestedLocationProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/locations/NestedLocationProperties.java similarity index 78% rename from open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/NestedLocationProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/locations/NestedLocationProperties.java index 28475e2cd6b..7b3e76f4383 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/NestedLocationProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/locations/NestedLocationProperties.java @@ -1,10 +1,11 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.locations; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; @@ -45,10 +46,6 @@ public NestedLocationProperties(NestedLocationProperties template) @Override public String toString() { - return "NestedLocationProperties{" + - "effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", extendedProperties=" + getExtendedProperties() + - '}'; + return "NestedLocationProperties{} " + super.toString(); } } diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/locations/ProfileLocationProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/locations/ProfileLocationProperties.java new file mode 100644 index 00000000000..ecdf06ad428 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/locations/ProfileLocationProperties.java @@ -0,0 +1,123 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.locations; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * ProfileLocationProperties describes the properties for the ProfileLocation relationship between a profile + * and a location. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ProfileLocationProperties extends RelationshipProperties +{ + private String associationType = null; + + + /** + * Default constructor + */ + public ProfileLocationProperties() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public ProfileLocationProperties(ProfileLocationProperties template) + { + super(template); + + if (template != null) + { + associationType = template.getAssociationType(); + } + } + + + /** + * Return the type of the association. + * + * @return string + */ + public String getAssociationType() + { + return associationType; + } + + + /** + * Set up the type of the association. + * + * @param associationType string + */ + public void setAssociationType(String associationType) + { + this.associationType = associationType; + } + + + /** + * JSON-style toString. + * + * @return list of properties and their values. + */ + @Override + public String toString() + { + return "ProfileLocationProperties{" + + "associationType='" + associationType + '\'' + + "} " + super.toString(); + } + + /** + * Equals method that returns true if containing properties are the same. + * + * @param objectToCompare object to compare + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (! super.equals(objectToCompare)) + { + return false; + } + ProfileLocationProperties that = (ProfileLocationProperties) objectToCompare; + return Objects.equals(associationType, that.associationType); + } + + + /** + * Hash code for this object + * + * @return int + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), associationType); + } +} diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/SecureLocationProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/locations/SecureLocationProperties.java similarity index 88% rename from open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/SecureLocationProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/locations/SecureLocationProperties.java index 7b6a1d6e296..c198c19086c 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/properties/SecureLocationProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/locations/SecureLocationProperties.java @@ -1,10 +1,11 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.communityprofile.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.locations; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ClassificationProperties; import java.util.Objects; @@ -102,15 +103,11 @@ public void setLevel(String level) public String toString() { return "SecureLocationProperties{" + - "effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", extendedProperties=" + getExtendedProperties() + - ", description='" + description + '\'' + - ", level='" + level + '\'' + - '}'; + "description='" + description + '\'' + + ", level='" + level + '\'' + + "} " + super.toString(); } - /** * Return comparison result based on the content of the properties. * diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/locations/package-info.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/locations/package-info.java new file mode 100644 index 00000000000..05e29ad0ccf --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/locations/package-info.java @@ -0,0 +1,7 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +/** + * Beans to describe locations and their relationships to other things. + */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.locations; \ No newline at end of file diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/ComplexSchemaTypeProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/ComplexSchemaTypeProperties.java new file mode 100644 index 00000000000..cc6eaedb7f9 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/ComplexSchemaTypeProperties.java @@ -0,0 +1,62 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.schema; + + +import com.fasterxml.jackson.annotation.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.apis.APIParameterListProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.tabular.TabularSchemaTypeProperties; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * ComplexSchemaTypeProperties describes a schema with multiple attributes. Notice it does not contain the attributes. + * This is because a complex schema type may have literally thousands of attributes + * and so the attribute contents are retrieved separated through calls that support paging. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "class") +@JsonSubTypes({ + @JsonSubTypes.Type(value = RootSchemaTypeProperties.class, name = "RootSchemaTypeProperties"), + @JsonSubTypes.Type(value = StructSchemaTypeProperties.class, name = "StructSchemaTypeProperties"), + @JsonSubTypes.Type(value = APIParameterListProperties.class, name = "APIParameterListProperties"), + }) +public class ComplexSchemaTypeProperties extends SchemaTypeProperties +{ + /** + * Default constructor used by subclasses + */ + public ComplexSchemaTypeProperties() + { + super(); + } + + + /** + * Copy/clone Constructor. + * + * @param template template object to copy. + */ + public ComplexSchemaTypeProperties(ComplexSchemaTypeProperties template) + { + super(template); + } + + + /** + * Standard toString method. + * + * @return print out of variables in a JSON-style + */ + @Override + public String toString() + { + return "ComplexSchemaTypeProperties{} " + super.toString(); + } +} \ No newline at end of file diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/DataFieldQueryProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/DataFieldQueryProperties.java new file mode 100644 index 00000000000..447b231a725 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/DataFieldQueryProperties.java @@ -0,0 +1,201 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.openmetadata.properties.schema; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.FindProperties; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * DataFieldQueryProperties is used to provide the properties that can be used to extract an element by the data values classification. + */ +@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public class DataFieldQueryProperties extends FindProperties +{ + private String defaultValue = null; + private List sampleValues = null; + private List dataPattern = null; + private List namePattern = null; + + + /** + * Default constructor + */ + public DataFieldQueryProperties() + { + super(); + } + + + /** + * Copy/clone constructor for an editing glossary classification. + * + * @param template template object to copy. + */ + public DataFieldQueryProperties(DataFieldQueryProperties template) + { + super(template); + + if (template != null) + { + defaultValue = template.getDefaultValue(); + sampleValues = template.getSampleValues(); + dataPattern = template.getDataPattern(); + namePattern = template.getNamePattern(); + } + } + + + /** + * Return the default value typically assigned to these types of data fields. + * + * @return string description + */ + public String getDefaultValue() + { + return defaultValue; + } + + + /** + * Set up the description (typically and overview of the revision) of the glossary. + * + * @param defaultValue string description + */ + public void setDefaultValue(String defaultValue) + { + this.defaultValue = defaultValue; + } + + + /** + * Return a list of sample values for the data field. + * + * @return list of strings + */ + public List getSampleValues() + { + return sampleValues; + } + + + /** + * Set up a list of sample values for the data field. + * + * @param sampleValues list of strings + */ + public void setSampleValues(List sampleValues) + { + this.sampleValues = sampleValues; + } + + + /** + * Return a regular expression that characterizes the data values stored in this data field. + * + * @return string + */ + public List getDataPattern() + { + return dataPattern; + } + + + /** + * Set up a regular expression that characterizes the data values stored in this data field. + * + * @param dataPattern string + */ + public void setDataPattern(List dataPattern) + { + this.dataPattern = dataPattern; + } + + + /** + * Return a regular expression that characterizes the name used for this type of data field. + * + * @return string + */ + public List getNamePattern() + { + return namePattern; + } + + + /** + * Set up a regular expression that characterizes the name used for this type of data field. + * + * @param namePattern string + */ + public void setNamePattern(List namePattern) + { + this.namePattern = namePattern; + } + + + /** + * Standard toString method. + * + * @return print out of variables in a JSON-style + */ + @Override + public String toString() + { + return "DataFieldQueryProperties{" + + "defaultValue='" + defaultValue + '\'' + + ", sampleValues=" + sampleValues + + ", dataPattern=" + dataPattern + + ", namePattern=" + namePattern + + "} " + super.toString(); + } + + /** + * Compare the values of the supplied object with those stored in the current object. + * + * @param objectToCompare supplied object + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (! (objectToCompare instanceof DataFieldQueryProperties that)) + { + return false; + } + if (! super.equals(objectToCompare)) + { + return false; + } + return Objects.equals(defaultValue, that.defaultValue) && + Objects.equals(sampleValues, that.sampleValues) && + Objects.equals(dataPattern, that.dataPattern) && + Objects.equals(namePattern, that.namePattern); + } + + + /** + * Return hash code based on properties. + * + * @return int + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), defaultValue, sampleValues, dataPattern, namePattern); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/DataFieldValuesProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/DataFieldValuesProperties.java new file mode 100644 index 00000000000..8b6736d8216 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/DataFieldValuesProperties.java @@ -0,0 +1,203 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.openmetadata.properties.schema; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ClassificationProperties; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * DataFieldValuesProperties is used to provide the characterizations of the data values stored in a data field + * described by the attached element. + */ +@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public class DataFieldValuesProperties extends ClassificationProperties +{ + private String defaultValue = null; + private List sampleValues = null; + private List dataPattern = null; + private List namePattern = null; + + + /** + * Default constructor + */ + public DataFieldValuesProperties() + { + super(); + } + + + /** + * Copy/clone constructor for an editing glossary classification. + * + * @param template template object to copy. + */ + public DataFieldValuesProperties(DataFieldValuesProperties template) + { + super(template); + + if (template != null) + { + defaultValue = template.getDefaultValue(); + sampleValues = template.getSampleValues(); + dataPattern = template.getDataPattern(); + namePattern = template.getNamePattern(); + } + } + + + /** + * Return the default value typically assigned to these types of data fields. + * + * @return string description + */ + public String getDefaultValue() + { + return defaultValue; + } + + + /** + * Set up the description (typically and overview of the revision) of the glossary. + * + * @param defaultValue string description + */ + public void setDefaultValue(String defaultValue) + { + this.defaultValue = defaultValue; + } + + + /** + * Return a list of sample values for the data field. + * + * @return list of strings + */ + public List getSampleValues() + { + return sampleValues; + } + + + /** + * Set up a list of sample values for the data field. + * + * @param sampleValues list of strings + */ + public void setSampleValues(List sampleValues) + { + this.sampleValues = sampleValues; + } + + + /** + * Return a regular expression that characterizes the data values stored in this data field. + * + * @return string + */ + public List getDataPattern() + { + return dataPattern; + } + + + /** + * Set up a regular expression that characterizes the data values stored in this data field. + * + * @param dataPattern string + */ + public void setDataPattern(List dataPattern) + { + this.dataPattern = dataPattern; + } + + + /** + * Return a regular expression that characterizes the name used for this type of data field. + * + * @return string + */ + public List getNamePattern() + { + return namePattern; + } + + + /** + * Set up a regular expression that characterizes the name used for this type of data field. + * + * @param namePattern string + */ + public void setNamePattern(List namePattern) + { + this.namePattern = namePattern; + } + + + /** + * Standard toString method. + * + * @return print out of variables in a JSON-style + */ + @Override + public String toString() + { + return "DataFieldValuesProperties{" + + "defaultValue='" + defaultValue + '\'' + + ", sampleValues=" + sampleValues + + ", dataPattern=" + dataPattern + + ", namePattern=" + namePattern + + "} " + super.toString(); + } + + + /** + * Compare the values of the supplied object with those stored in the current object. + * + * @param objectToCompare supplied object + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (! (objectToCompare instanceof DataFieldValuesProperties that)) + { + return false; + } + if (! super.equals(objectToCompare)) + { + return false; + } + return Objects.equals(defaultValue, that.defaultValue) && + Objects.equals(sampleValues, that.sampleValues) && + Objects.equals(dataPattern, that.dataPattern) && + Objects.equals(namePattern, that.namePattern); + } + + + /** + * Return hash code based on properties. + * + * @return int + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), defaultValue, sampleValues, dataPattern, namePattern); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/DerivedSchemaTypeQueryTargetProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/DerivedSchemaTypeQueryTargetProperties.java new file mode 100644 index 00000000000..3bd637a6ca0 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/DerivedSchemaTypeQueryTargetProperties.java @@ -0,0 +1,192 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.schema; + + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * DerivedSchemaTypeQueryTargetProperties defines a query on a schema element that returns all or part of the value for a + * derived schema type. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class DerivedSchemaTypeQueryTargetProperties +{ + private String queryId = null; + private String query = null; + private String queryType = null; + private String queryTargetGUID = null; + + + /** + * Default constructor + */ + public DerivedSchemaTypeQueryTargetProperties() + { + super(); + } + + + /** + * Copy/clone constructor. + * + * @param template template schema query to copy. + */ + public DerivedSchemaTypeQueryTargetProperties(DerivedSchemaTypeQueryTargetProperties template) + { + super(); + + if (template != null) + { + queryId = template.getQueryId(); + query = template.getQuery(); + queryType = template.getQueryType(); + queryTargetGUID = template.getQueryTargetGUID(); + } + } + + + /** + * Return the query id - this is used to identify where the results of this query should be plugged into + * the other queries or the formula for the parent derived schema element. + * + * @return String query identifier + */ + public String getQueryId() { return queryId; } + + + /** + * Set up the query id - this is used to identify where the results of this query should be plugged into + * the other queries or the formula for the parent derived schema element. + * + * @param queryId String query identifier + */ + public void setQueryId(String queryId) + { + this.queryId = queryId; + } + + + /** + * Return the query string for this element. The query string may have placeholders for values returned + * by queries that have a lower queryId than this element. + * + * @return String query + */ + public String getQuery() { return query; } + + + /** + * Set up the query string for this element. The query string may have placeholders for values returned + * by queries that have a lower queryId than this element. + * + * @param query String query + */ + public void setQuery(String query) + { + this.query = query; + } + + + /** + * Return the name of the query language used in the query. + * + * @return queryType String + */ + public String getQueryType() { return queryType; } + + + /** + * Set up the name of the query language used in the query. + * + * @param queryType String name + */ + public void setQueryType(String queryType) + { + this.queryType = queryType; + } + + + /** + * Return the unique identifier that describes the data source that will be queried to get part of the derived value. + * + * @return string guid + */ + public String getQueryTargetGUID() + { + return queryTargetGUID; + } + + + /** + * Set up the unique identifier that describes the data source that will be queried to get part of the derived value. + * + * @param queryTargetGUID string guid + */ + public void setQueryTargetGUID(String queryTargetGUID) + { + this.queryTargetGUID = queryTargetGUID; + } + + + /** + * Standard toString method. + * + * @return print out of variables in a JSON-style + */ + @Override + public String toString() + { + return "DerivedSchemaTypeQueryTargetProperties{" + + "queryId=" + queryId + + ", query='" + query + '\'' + + ", queryType='" + queryType + '\'' + + ", queryTargetGUID=" + queryTargetGUID + + '}'; + } + + + /** + * Compare the values of the supplied object with those stored in the current object. + * + * @param objectToCompare supplied object + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (!(objectToCompare instanceof DerivedSchemaTypeQueryTargetProperties that)) + { + return false; + } + return Objects.equals(getQueryId(), that.getQueryId()) && + Objects.equals(getQuery(), that.getQuery()) && + Objects.equals(getQueryType(), that.getQueryType()) && + Objects.equals(getQueryTargetGUID(), that.getQueryTargetGUID()); + } + + + /** + * Create a hash code for this element type. + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(getQueryId(), getQuery(), getQueryType(), getQueryTargetGUID()); + } +} \ No newline at end of file diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/EnumSchemaTypeProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/EnumSchemaTypeProperties.java new file mode 100644 index 00000000000..826c3cac698 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/EnumSchemaTypeProperties.java @@ -0,0 +1,122 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.schema; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * EnumSchemaTypeProperties carries the specialized parameters for creating or updating enum schema types. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) + +public class EnumSchemaTypeProperties extends SimpleSchemaTypeProperties +{ + private String validValueSetGUID = null; + + /** + * Default constructor + */ + public EnumSchemaTypeProperties() + { + super(); + } + + + /** + * Copy/clone Constructor + * + * @param template template object to copy. + */ + public EnumSchemaTypeProperties(EnumSchemaTypeProperties template) + { + super(template); + + if (template != null) + { + validValueSetGUID = template.getValidValueSetGUID(); + } + } + + + /** + * Return the unique identifier of the valid value set that describes the enum values for this schema element. + * + * @return string guid + */ + public String getValidValueSetGUID() + { + return validValueSetGUID; + } + + + /** + * Set up the unique identifier of the value set that describes the enum values for this schema element. + * + * @param validValueSetGUID string guid + */ + public void setValidValueSetGUID(String validValueSetGUID) + { + this.validValueSetGUID = validValueSetGUID; + } + + + /** + * Standard toString method. + * + * @return print out of variables in a JSON-style + */ + @Override + public String toString() + { + return "EnumSchemaTypeProperties{" + + "validValueSetGUID='" + validValueSetGUID + '\'' + + "} " + super.toString(); + } + + + /** + * Compare the values of the supplied object with those stored in the current object. + * + * @param objectToCompare supplied object + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + EnumSchemaTypeProperties that = (EnumSchemaTypeProperties) objectToCompare; + return Objects.equals(validValueSetGUID, that.validValueSetGUID); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), validValueSetGUID); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/ExternalSchemaTypeProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/ExternalSchemaTypeProperties.java new file mode 100644 index 00000000000..2d42ba51de9 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/ExternalSchemaTypeProperties.java @@ -0,0 +1,51 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.schema; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * ExternalSchemaTypeProperties carries a reusable schema type. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) + +public class ExternalSchemaTypeProperties extends SchemaTypeProperties +{ + /** + * Default constructor + */ + public ExternalSchemaTypeProperties() + { + super(); + } + + + /** + * Copy/clone Constructor + * + * @param template template object to copy. + */ + public ExternalSchemaTypeProperties(ExternalSchemaTypeProperties template) + { + super(template); + } + + + /** + * Standard toString method. + * + * @return print out of variables in a JSON-style + */ + @Override + public String toString() + { + return "ExternalSchemaTypeProperties{} " + super.toString(); + } +} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/ForeignKeyProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/ForeignKeyProperties.java similarity index 90% rename from open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/ForeignKeyProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/ForeignKeyProperties.java index 1ec1bfdc48b..ca7335736ff 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/ForeignKeyProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/ForeignKeyProperties.java @@ -1,11 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetmanager.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.schema; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; import java.util.Objects; @@ -178,15 +179,12 @@ public String getSource() public String toString() { return "ForeignKeyProperties{" + - "name='" + name + '\'' + - ", description='" + description + '\'' + - ", confidence=" + confidence + - ", steward='" + steward + '\'' + - ", source='" + source + '\'' + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", extendedProperties=" + getExtendedProperties() + - '}'; + "name='" + name + '\'' + + ", description='" + description + '\'' + + ", confidence=" + confidence + + ", steward='" + steward + '\'' + + ", source='" + source + '\'' + + "} " + super.toString(); } diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/LiteralSchemaTypeProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/LiteralSchemaTypeProperties.java similarity index 83% rename from open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/LiteralSchemaTypeProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/LiteralSchemaTypeProperties.java index 803e39250b9..1e776e4f927 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/LiteralSchemaTypeProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/LiteralSchemaTypeProperties.java @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.schema; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -17,7 +17,6 @@ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) - public class LiteralSchemaTypeProperties extends SchemaTypeProperties { private String dataType = null; @@ -100,18 +99,7 @@ public String toString() return "LiteralSchemaTypeProperties{" + "dataType='" + dataType + '\'' + ", fixedValue='" + fixedValue + '\'' + - ", versionNumber='" + getVersionNumber() + '\'' + - ", author='" + getAuthor() + '\'' + - ", usage='" + getUsage() + '\'' + - ", encodingStandard='" + getEncodingStandard() + '\'' + - ", namespace='" + getNamespace() + '\'' + - ", displayName='" + getDisplayName() + '\'' + - ", description='" + getDescription() + '\'' + - ", typeName='" + getTypeName() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", extendedProperties=" + getExtendedProperties() + - '}'; + "} " + super.toString(); } diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/MapSchemaTypeProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/MapSchemaTypeProperties.java new file mode 100644 index 00000000000..e6f7874aa8b --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/MapSchemaTypeProperties.java @@ -0,0 +1,52 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.schema; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * MapSchemaType describes a schema element of type map. It links to the type of schema element for the domain + * (eg property name) for the map and the schema element for the range (eg property value) for the map. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) + +public class MapSchemaTypeProperties extends SchemaTypeProperties +{ + /** + * Default constructor + */ + public MapSchemaTypeProperties() + { + super(); + } + + + /** + * Copy/clone Constructor. + * + * @param template template object to copy. + */ + public MapSchemaTypeProperties(MapSchemaTypeProperties template) + { + super(template); + } + + + /** + * Standard toString method. + * + * @return print out of variables in a JSON-style + */ + @Override + public String toString() + { + return "MapSchemaTypeProperties{} " + super.toString(); + } +} \ No newline at end of file diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/PrimaryKeyProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/PrimaryKeyProperties.java similarity index 84% rename from open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/PrimaryKeyProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/PrimaryKeyProperties.java index baed46a4e70..996178e9f9c 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/PrimaryKeyProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/PrimaryKeyProperties.java @@ -1,12 +1,13 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetmanager.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.schema; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import org.odpi.openmetadata.frameworks.openmetadata.enums.KeyPattern; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ClassificationProperties; import java.util.Objects; @@ -21,7 +22,7 @@ @JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) -public class PrimaryKeyProperties +public class PrimaryKeyProperties extends ClassificationProperties { private String name = null; private KeyPattern keyPattern = null; @@ -43,6 +44,8 @@ public PrimaryKeyProperties() */ public PrimaryKeyProperties(PrimaryKeyProperties template) { + super (template); + if (template != null) { name = template.getName(); @@ -106,7 +109,7 @@ public String toString() return "PrimaryKeyProperties{" + "name='" + name + '\'' + ", keyPattern=" + keyPattern + - '}'; + "} " + super.toString(); } @@ -119,20 +122,13 @@ public String toString() @Override public boolean equals(Object objectToCompare) { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } + if (this == objectToCompare) return true; + if (objectToCompare == null || getClass() != objectToCompare.getClass()) return false; + if (!super.equals(objectToCompare)) return false; PrimaryKeyProperties that = (PrimaryKeyProperties) objectToCompare; - return Objects.equals(name, that.name) && - keyPattern == that.keyPattern; + return Objects.equals(name, that.name) && keyPattern == that.keyPattern; } - /** * Return hash code based on properties. * @@ -141,6 +137,6 @@ public boolean equals(Object objectToCompare) @Override public int hashCode() { - return Objects.hash(name, keyPattern); + return Objects.hash(super.hashCode(), name, keyPattern); } } diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/PrimitiveSchemaTypeProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/PrimitiveSchemaTypeProperties.java new file mode 100644 index 00000000000..183c0fc2200 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/PrimitiveSchemaTypeProperties.java @@ -0,0 +1,49 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.openmetadata.properties.schema; + +import com.fasterxml.jackson.annotation.*; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * PrimitiveSchemaTypeProperties is a class for representing a primitive value. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class PrimitiveSchemaTypeProperties extends SimpleSchemaTypeProperties +{ + /** + * Default constructor + */ + public PrimitiveSchemaTypeProperties() + { + super(); + } + + + /** + * Copy/clone constructor. + * + * @param template object to copy + */ + public PrimitiveSchemaTypeProperties(PrimitiveSchemaTypeProperties template) + { + super(template); + } + + + /** + * Standard toString method. + * + * @return print out of variables in a JSON-style + */ + @Override + public String toString() + { + return "PrimitiveSchemaTypeProperties{} " + super.toString(); + } +} diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/QueryTargetProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/QueryTargetProperties.java similarity index 98% rename from open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/QueryTargetProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/QueryTargetProperties.java index bc1575f5426..291db4d2a17 100644 --- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/properties/QueryTargetProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/QueryTargetProperties.java @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetmanager.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.schema; import com.fasterxml.jackson.annotation.JsonAutoDetect; diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/RootSchemaTypeProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/RootSchemaTypeProperties.java new file mode 100644 index 00000000000..7fe6bb6d3a9 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/RootSchemaTypeProperties.java @@ -0,0 +1,81 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.schema; + + +import com.fasterxml.jackson.annotation.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.apis.APIOperationProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.apis.APIParameterListProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.apis.APISchemaTypeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.databases.DatabaseSchemaTypeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.events.EventTypeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.tabular.TabularSchemaTypeProperties; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * ComplexSchemaTypeProperties describes a schema with multiple attributes. Notice it does not contain the attributes. + * This is because a complex schema type may have literally thousands of attributes + * and so the attribute contents are retrieved separated through calls that support paging. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "class") +@JsonSubTypes({ + @JsonSubTypes.Type(value = APISchemaTypeProperties.class, name = "APISchemaTypeProperties"), + @JsonSubTypes.Type(value = TabularSchemaTypeProperties.class, name = "TabularSchemaTypeProperties"), + @JsonSubTypes.Type(value = DatabaseSchemaTypeProperties.class, name = "DatabaseSchemaTypeProperties"), + @JsonSubTypes.Type(value = EventTypeProperties.class, name = "EventTypeProperties"), + }) +public class RootSchemaTypeProperties extends ComplexSchemaTypeProperties +{ + /** + * Default constructor used by subclasses + */ + public RootSchemaTypeProperties() + { + super(); + } + + + /** + * Copy/clone Constructor. + * + * @param template template object to copy. + */ + public RootSchemaTypeProperties(RootSchemaTypeProperties template) + { + super(template); + } + + + /** + * Standard toString method. + * + * @return print out of variables in a JSON-style + */ + @Override + public String toString() + { + return "ComplexSchemaTypeProperties{" + + "versionNumber='" + getVersionNumber() + '\'' + + ", author='" + getAuthor() + '\'' + + ", usage='" + getUsage() + '\'' + + ", encodingStandard='" + getEncodingStandard() + '\'' + + ", namespace='" + getNamespace() + '\'' + + ", isDeprecated=" + getIsDeprecated() + + ", displayName='" + getDisplayName() + '\'' + + ", description='" + getDescription() + '\'' + + ", qualifiedName='" + getQualifiedName() + '\'' + + ", additionalProperties=" + getAdditionalProperties() + + ", vendorProperties=" + getVendorProperties() + + ", typeName='" + getTypeName() + '\'' + + ", extendedProperties=" + getExtendedProperties() + + '}'; + } +} \ No newline at end of file diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/SchemaAttributeProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/SchemaAttributeProperties.java new file mode 100644 index 00000000000..2e28359e0f7 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/SchemaAttributeProperties.java @@ -0,0 +1,634 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.openmetadata.properties.schema; + +import com.fasterxml.jackson.annotation.*; +import org.odpi.openmetadata.frameworks.openmetadata.enums.DataItemSortOrder; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.apis.APIParameterProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.databases.DatabaseTableProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.events.EventSchemaAttributeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.tabular.TabularColumnProperties; + +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * SchemaAttributeProperties represents a data field that is part of a complex schema type. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, + property = "class") +@JsonSubTypes( + { + @JsonSubTypes.Type(value = TabularColumnProperties.class, name = "TabularColumnProperties"), + @JsonSubTypes.Type(value = DatabaseTableProperties.class, name = "DatabaseTableProperties"), + @JsonSubTypes.Type(value = EventSchemaAttributeProperties.class, name = "EventSchemaAttributeProperties"), + @JsonSubTypes.Type(value = APIParameterProperties.class, name = "APIParameterProperties"), + }) +public class SchemaAttributeProperties extends SchemaElementProperties +{ + private int elementPosition = 0; + private int minCardinality = 0; + private int maxCardinality = 0; + private boolean allowsDuplicateValues = false; + private boolean orderedValues = false; + private String defaultValueOverride = null; + private DataItemSortOrder sortOrder = null; + private int minimumLength = 0; + private int length = 0; + private int precision = 0; + private int significantDigits = 0; + private boolean isNullable = true; + private String nativeJavaClass = null; + private List aliases = null; + + /* + * Details of the associated schema type when type is Primitive, Literal, External or Enum. Other types are + * created independently and linked to the schema attribute. + */ + + private String dataType = null; + private String defaultValue = null; + private String fixedValue = null; + private String externalTypeGUID = null; + private String validValuesSetGUID = null; + + private SchemaTypeProperties schemaType = null; + + /** + * Default constructor + */ + public SchemaAttributeProperties() + { + super(); + } + + + /** + * Copy/clone constructor. + * + * @param template template schema attribute to copy. + */ + public SchemaAttributeProperties(SchemaAttributeProperties template) + { + super(template); + + if (template != null) + { + elementPosition = template.getElementPosition(); + minCardinality = template.getMinCardinality(); + maxCardinality = template.getMaxCardinality(); + allowsDuplicateValues = template.getAllowsDuplicateValues(); + orderedValues = template.getOrderedValues(); + sortOrder = template.getSortOrder(); + minimumLength = template.getMinimumLength(); + length = template.getLength(); + precision = template.getPrecision(); + significantDigits = template.getSignificantDigits(); + isNullable = template.getIsNullable(); + defaultValueOverride = template.getDefaultValueOverride(); + nativeJavaClass = template.getNativeJavaClass(); + aliases = template.getAliases(); + + dataType = template.getDataType(); + defaultValue = template.getDefaultValue(); + fixedValue = template.getFixedValue(); + externalTypeGUID = template.getExternalTypeGUID(); + validValuesSetGUID = template.getValidValuesSetGUID(); + schemaType = template.getSchemaType(); + } + } + + + /** + * Return the position of this schema attribute in its parent schema. + * + * @return int position in schema - 0 means first + */ + public int getElementPosition() { return elementPosition; } + + + /** + * Set up the position of this schema attribute in its parent schema. + * + * @param elementPosition int position in schema - 0 means first + */ + public void setElementPosition(int elementPosition) + { + this.elementPosition = elementPosition; + } + + + /** + * Return this minimum number of instances allowed for this attribute. + * + * @return int + */ + public int getMinCardinality() + { + return minCardinality; + } + + + /** + * Set up the minimum number of instances allowed for this attribute. + * + * @param minCardinality int + */ + public void setMinCardinality(int minCardinality) + { + this.minCardinality = minCardinality; + } + + + /** + * Return the maximum number of instances allowed for this attribute. + * + * @return int (-1 means infinite) + */ + public int getMaxCardinality() + { + return maxCardinality; + } + + + /** + * Set up the maximum number of instances allowed for this attribute. + * + * @param maxCardinality int (-1 means infinite) + */ + public void setMaxCardinality(int maxCardinality) + { + this.maxCardinality = maxCardinality; + } + + + /** + * Return whether the same value can be used by more than one instance of this attribute. + * + * @return boolean flag + */ + public boolean getAllowsDuplicateValues() + { + return allowsDuplicateValues; + } + + + /** + * Set up whether the same value can be used by more than one instance of this attribute. + * + * @param allowsDuplicateValues boolean flag + */ + public void setAllowsDuplicateValues(boolean allowsDuplicateValues) + { + this.allowsDuplicateValues = allowsDuplicateValues; + } + + + /** + * Return whether the attribute instances are arranged in an order. + * + * @return boolean flag + */ + public boolean getOrderedValues() + { + return orderedValues; + } + + + /** + * Set up whether the attribute instances are arranged in an order. + * + * @param orderedValues boolean flag + */ + public void setOrderedValues(boolean orderedValues) + { + this.orderedValues = orderedValues; + } + + + /** + * Return the order that the attribute instances are arranged in - if any. + * + * @return DataItemSortOrder enum + */ + public DataItemSortOrder getSortOrder() + { + return sortOrder; + } + + + /** + * Set up the order that the attribute instances are arranged in - if any. + * + * @param sortOrder DataItemSortOrder enum + */ + public void setSortOrder(DataItemSortOrder sortOrder) + { + this.sortOrder = sortOrder; + } + + + /** + * Return the minimum length of the data. + * + * @return int + */ + public int getMinimumLength() + { + return minimumLength; + } + + + /** + * Set up the minimum length of the data. + * + * @param minimumLength int + */ + public void setMinimumLength(int minimumLength) + { + this.minimumLength = minimumLength; + } + + + /** + * Return the length of the data field. + * + * @return int + */ + public int getLength() + { + return length; + } + + + /** + * Set up the length of the data field. + * + * @param length int + */ + public void setLength(int length) + { + this.length = length; + } + + + /** + * Return the number of significant digits to the right of decimal point. + * + * @return int + */ + public int getPrecision() + { + return precision; + } + + + /** + * Set up the number of significant digits to the right of decimal point. + * + * @param precision int + */ + public void setPrecision(int precision) + { + this.precision = precision; + } + + + /** + * Return the number of significant digits before the decimal point (zero means it is an integer). + * + * @return int + */ + public int getSignificantDigits() + { + return significantDigits; + } + + + /** + * Set up the number of significant digits before the decimal point (zero means it is an integer). + * + * @param significantDigits int + */ + public void setSignificantDigits(int significantDigits) + { + this.significantDigits = significantDigits; + } + + + /** + * Return whether the field is nullable or not. + * + * @return boolean + */ + public boolean getIsNullable() + { + return isNullable; + } + + + /** + * Set up whether the field is nullable or not. + * + * @param nullable boolean + */ + public void setIsNullable(boolean nullable) + { + isNullable = nullable; + } + + + /** + * Return any default value for this attribute that would override the default defined in the + * schema element for this attribute's type (note only used is type is primitive). + * + * @return String default value override + */ + public String getDefaultValueOverride() { return defaultValueOverride; } + + + /** + * Set up any default value for this attribute that would override the default defined in the + * schema element for this attribute's type (note only used is type is primitive). + * + * @param defaultValueOverride String default value override + */ + public void setDefaultValueOverride(String defaultValueOverride) + { + this.defaultValueOverride = defaultValueOverride; + } + + + /** + * Return the name of the Java class to use to represent this type. + * + * @return fully qualified Java class name + */ + public String getNativeJavaClass() + { + return nativeJavaClass; + } + + + /** + * Set up the name of the Java class to use to represent this type. + * + * @param nativeJavaClass fully qualified Java class name + */ + public void setNativeJavaClass(String nativeJavaClass) + { + this.nativeJavaClass = nativeJavaClass; + } + + + /** + * Return a list of alternative names for the attribute. + * + * @return list of names + */ + public List getAliases() + { + return aliases; + } + + + /** + * Set up a list of alternative names for the attribute. + * + * @param aliases list of names + */ + public void setAliases(List aliases) + { + this.aliases = aliases; + } + + + + + /** + * Return the data type for this element. Null means unknown data type. + * + * @return string data type name + */ + public String getDataType() { return dataType; } + + + /** + * Set up the data type for this element. Null means unknown data type. + * + * @param dataType data type name + */ + public void setDataType(String dataType) + { + this.dataType = dataType; + } + + + /** + * Return the default value for the element. Null means no default value set up. + * + * @return string containing default value + */ + public String getDefaultValue() { return defaultValue; } + + + /** + * Set up the default value for the element. Null means no default value set up. + * + * @param defaultValue String containing default value + */ + public void setDefaultValue(String defaultValue) + { + this.defaultValue = defaultValue; + } + + + /** + * Return a fixed literal value - an alternative to default value. + * + * @return string value + */ + public String getFixedValue() + { + return fixedValue; + } + + + /** + * If the column contains a fixed literal value, set this value here - an alternative to default value. + * + * @param fixedValue string + */ + public void setFixedValue(String fixedValue) + { + this.fixedValue = fixedValue; + } + + + /** + * Return the unique identifier of this column's type. + * + * @return unique identifier (guid) of the external schema type + */ + public String getExternalTypeGUID() + { + return externalTypeGUID; + } + + + /** + * If the type of this column is represented by an external (standard type) put its value here. No need to set + * dataType, FixedType or defaultType + * + * @param externalTypeGUID unique identifier (guid) of the external schema type + */ + public void setExternalTypeGUID(String externalTypeGUID) + { + this.externalTypeGUID = externalTypeGUID; + } + + + /** + * Return the set of valid values for this column. + * + * @return unique identifier (guid) of the valid values set + */ + public String getValidValuesSetGUID() + { + return validValuesSetGUID; + } + + + /** + * If the type is controlled by a fixed set of values, set up the unique identifier of the valid values set + * that lists the valid values. + * + * @param validValuesSetGUID unique identifier (guid) of the valid values set + */ + public void setValidValuesSetGUID(String validValuesSetGUID) + { + this.validValuesSetGUID = validValuesSetGUID; + } + + + /** + * Description fo the schema Type. + * + * @return schema type properties + */ + public SchemaTypeProperties getSchemaType() + { + return schemaType; + } + + + /** + * Set up the description of the schemaType. + * + * @param schemaType schema type + */ + public void setSchemaType(SchemaTypeProperties schemaType) + { + this.schemaType = schemaType; + } + + + /** + * Standard toString method. + * + * @return print out of variables in a JSON-style + */ + @Override + public String toString() + { + return "SchemaAttributeProperties{" + + "elementPosition=" + elementPosition + + ", minCardinality=" + minCardinality + + ", maxCardinality=" + maxCardinality + + ", allowsDuplicateValues=" + allowsDuplicateValues + + ", orderedValues=" + orderedValues + + ", defaultValueOverride='" + defaultValueOverride + '\'' + + ", sortOrder=" + sortOrder + + ", minimumLength=" + minimumLength + + ", length=" + length + + ", precision=" + precision + + ", significantDigits=" + significantDigits + + ", isNullable=" + isNullable + + ", nativeJavaClass='" + nativeJavaClass + '\'' + + ", aliases=" + aliases + + ", dataType='" + dataType + '\'' + + ", defaultValue='" + defaultValue + '\'' + + ", fixedValue='" + fixedValue + '\'' + + ", externalTypeGUID='" + externalTypeGUID + '\'' + + ", validValuesSetGUID='" + validValuesSetGUID + '\'' + + ", schemaType=" + schemaType + + "} " + super.toString(); + } + + + /** + * Compare the values of the supplied object with those stored in the current object. + * + * @param objectToCompare supplied object + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + SchemaAttributeProperties that = (SchemaAttributeProperties) objectToCompare; + return elementPosition == that.elementPosition && + minCardinality == that.minCardinality && + maxCardinality == that.maxCardinality && + allowsDuplicateValues == that.allowsDuplicateValues && + orderedValues == that.orderedValues && + minimumLength == that.minimumLength && + length == that.length && + precision == that.precision && + significantDigits == that.significantDigits && + isNullable == that.isNullable && + Objects.equals(defaultValueOverride, that.defaultValueOverride) && + sortOrder == that.sortOrder && + Objects.equals(nativeJavaClass, that.nativeJavaClass) && + Objects.equals(aliases, that.aliases) && + Objects.equals(dataType, that.dataType) && + Objects.equals(defaultValue, that.defaultValue) && + Objects.equals(fixedValue, that.fixedValue) && + Objects.equals(externalTypeGUID, that.externalTypeGUID) && + Objects.equals(validValuesSetGUID, that.validValuesSetGUID)&& + Objects.equals(schemaType, that.schemaType); + } + + + /** + * Return a number that represents the contents of this object. + * + * @return int + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), elementPosition, minCardinality, maxCardinality, allowsDuplicateValues, orderedValues, + defaultValueOverride, sortOrder, minimumLength, length, precision, significantDigits, isNullable, nativeJavaClass, + aliases, dataType, defaultValue, fixedValue, externalTypeGUID, validValuesSetGUID, schemaType); + } +} diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/SchemaAttributeRelationshipProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/SchemaAttributeRelationshipProperties.java similarity index 94% rename from open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/SchemaAttributeRelationshipProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/SchemaAttributeRelationshipProperties.java index 61da3577c28..a133737a224 100644 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-api/src/main/java/org/odpi/openmetadata/accessservices/assetowner/properties/SchemaAttributeRelationshipProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/SchemaAttributeRelationshipProperties.java @@ -1,10 +1,11 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.assetowner.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.schema; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; import java.util.HashMap; import java.util.Map; @@ -21,7 +22,7 @@ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) -public class SchemaAttributeRelationshipProperties +public class SchemaAttributeRelationshipProperties extends RelationshipProperties { private String linkGUID = null; private String linkType = null; @@ -130,18 +131,7 @@ public void setLinkedAttributeName(String linkedAttributeName) */ public Map getLinkProperties() { - if (linkProperties == null) - { - return null; - } - else if (linkProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(linkProperties); - } + return linkProperties; } diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/SchemaElementProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/SchemaElementProperties.java new file mode 100644 index 00000000000..ee65ff57853 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/SchemaElementProperties.java @@ -0,0 +1,180 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.schema; + +import com.fasterxml.jackson.annotation.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ReferenceableProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * SchemaElementProperties carries the common parameters for creating or updating schema elements such as schema types and attributes. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "class") +@JsonSubTypes({ + @JsonSubTypes.Type(value = SchemaTypeProperties.class, name = "SchemaTypeProperties"), + @JsonSubTypes.Type(value = SchemaAttributeProperties.class, name = "SchemaAttributeProperties") + }) +public abstract class SchemaElementProperties extends ReferenceableProperties +{ + private String displayName = null; + private String description = null; + private boolean isDeprecated = false; + + + /** + * Default constructor + */ + public SchemaElementProperties() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public SchemaElementProperties(SchemaElementProperties template) + { + super(template); + + if (template != null) + { + displayName = template.getDisplayName(); + description = template.getDescription(); + isDeprecated = template.getIsDeprecated(); + } + } + + + /** + * Return the display name of the file + * + * @return string name + */ + public String getDisplayName() + { + return displayName; + } + + + /** + * Set up the display name of the file. + * + * @param displayName string name + */ + public void setDisplayName(String displayName) + { + this.displayName = displayName; + } + + + /** + * Return the description of the file. + * + * @return string description + */ + public String getDescription() + { + return description; + } + + + /** + * Set up the description of the file. + * + * @param description string description + */ + public void setDescription(String description) + { + this.description = description; + } + + + /** + * Is the schema element deprecated? + * + * @return boolean flag + */ + public boolean getIsDeprecated() + { + return isDeprecated; + } + + + /** + * Set whether the schema element deprecated or not. Default is false. + * + * @param deprecated boolean flag + */ + public void setIsDeprecated(boolean deprecated) + { + isDeprecated = deprecated; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "SchemaElementProperties{" + + "displayName='" + displayName + '\'' + + ", description='" + description + '\'' + + ", isDeprecated=" + isDeprecated + + ", typeName='" + getTypeName() + '\'' + + ", qualifiedName='" + getQualifiedName() + '\'' + + ", additionalProperties=" + getAdditionalProperties() + + ", extendedProperties=" + getExtendedProperties() + + '}'; + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + SchemaElementProperties that = (SchemaElementProperties) objectToCompare; + return Objects.equals(getDisplayName(), that.getDisplayName()) && + Objects.equals(getDescription(), that.getDescription()); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(getDisplayName(), getDescription()); + } +} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/SchemaTypeChoiceProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/SchemaTypeChoiceProperties.java similarity index 93% rename from open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/SchemaTypeChoiceProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/SchemaTypeChoiceProperties.java index a97167139ab..19d4b9ca991 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/SchemaTypeChoiceProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/SchemaTypeChoiceProperties.java @@ -1,11 +1,9 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.schema; import com.fasterxml.jackson.annotation.*; - -import java.util.List; -import java.util.Objects; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.events.EventTypeListProperties; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/SchemaTypeProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/SchemaTypeProperties.java new file mode 100644 index 00000000000..4b20c0130ba --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/SchemaTypeProperties.java @@ -0,0 +1,318 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.schema; + +import com.fasterxml.jackson.annotation.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.apis.APIParameterListProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.tabular.TabularSchemaTypeProperties; + +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * SchemaTypeProperties carries the common parameters for creating or updating schema types. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "class") +@JsonSubTypes({ + @JsonSubTypes.Type(value = ComplexSchemaTypeProperties.class, name = "ComplexSchemaTypeProperties"), + @JsonSubTypes.Type(value = ExternalSchemaTypeProperties.class, name = "ExternalSchemaTypeProperties"), + @JsonSubTypes.Type(value = LiteralSchemaTypeProperties.class, name = "LiteralSchemaTypeProperties"), + @JsonSubTypes.Type(value = MapSchemaTypeProperties.class, name = "MapSchemaTypeProperties"), + @JsonSubTypes.Type(value = SchemaTypeChoiceProperties.class, name = "SchemaTypeChoiceProperties"), + @JsonSubTypes.Type(value = SimpleSchemaTypeProperties.class, name = "SimpleSchemaTypeProperties"), +}) +public class SchemaTypeProperties extends SchemaElementProperties +{ + private String versionNumber = null; + private String author = null; + private String usage = null; + private String encodingStandard = null; + private String namespace = null; + + /* + * Values for when the schemaType is derived from other values rather than stored + */ + private String formula = null; + private String formulaType = null; + private List queries = null; + + /** + * Default constructor + */ + public SchemaTypeProperties() + { + super(); + } + + + /** + * Copy/clone Constructor. + * + * @param template template object to copy. + */ + public SchemaTypeProperties(SchemaTypeProperties template) + { + super(template); + + if (template != null) + { + versionNumber = template.getVersionNumber(); + author = template.getAuthor(); + usage = template.getUsage(); + encodingStandard = template.getEncodingStandard(); + namespace = template.getNamespace(); + formula = template.getFormula(); + formulaType = template.getFormulaType(); + queries = template.getQueries(); + } + } + + + /** + * Return the version number of the schema element - null means no version number. + * + * @return String version number + */ + public String getVersionNumber() { return versionNumber; } + + + /** + * Set up the version number of the schema element - null means no version number. + * + * @param versionNumber String version number + */ + public void setVersionNumber(String versionNumber) + { + this.versionNumber = versionNumber; + } + + + /** + * Return the name of the author of the schema element. Null means the author is unknown. + * + * @return String author name + */ + public String getAuthor() { return author; } + + + /** + * Set up the name of the author of the schema element. Null means the author is unknown. + * + * @param author String author name + */ + public void setAuthor(String author) + { + this.author = author; + } + + + /** + * Return the usage guidance for this schema element. Null means no guidance available. + * + * @return String usage guidance + */ + public String getUsage() { return usage; } + + + /** + * Set up the usage guidance for this schema element. Null means no guidance available. + * + * @param usage String usage guidance + */ + public void setUsage(String usage) + { + this.usage = usage; + } + + + /** + * Return the format (encoding standard) used for this schema. It may be XML, JSON, SQL DDL or something else. + * Null means the encoding standard is unknown or there are many choices. + * + * @return String encoding standard + */ + public String getEncodingStandard() { return encodingStandard; } + + + /** + * Set up the format (encoding standard) used for this schema. It may be XML, JSON, SQL DDL or something else. + * Null means the encoding standard is unknown or there are many choices. + * + * @param encodingStandard String encoding standard + */ + public void setEncodingStandard(String encodingStandard) + { + this.encodingStandard = encodingStandard; + } + + + /** + * Return the name of the namespace that this type belongs to. + * + * @return string name + */ + public String getNamespace() + { + return namespace; + } + + + /** + * Set up the name of the namespace that this type belongs to. + * + * @param namespace string name + */ + public void setNamespace(String namespace) + { + this.namespace = namespace; + } + + + /** + * Return the formula used to combine the values of the queries. Each query is numbers 0, 1, ... and the + * formula has placeholders in it to show how the query results are combined. + * + * @return String formula + */ + public String getFormula() { return formula; } + + + /** + * Set up the formula used to combine the values of the queries. Each query is numbers 0, 1, ... and the + * formula has placeholders in it to show how the query results are combined. + * + * @param formula String formula + */ + public void setFormula(String formula) + { + this.formula = formula; + } + + + /** + * Return the specification language for the formula. + * + * @return string description + */ + public String getFormulaType() + { + return formulaType; + } + + + /** + * Set up the specification language for the formula. + * + * @param formulaType string description + */ + public void setFormulaType(String formulaType) + { + this.formulaType = formulaType; + } + + + /** + * Return the list of queries that are used to create the derived schema element. + * + * @return list of queries + */ + public List getQueries() + { + return queries; + } + + + /** + * Set up the list of queries that are used to create the derived schema element. + * + * @param queries list of queries + */ + public void setQueries(List queries) + { + this.queries = queries; + } + + + + /** + * Standard toString method. + * + * @return print out of variables in a JSON-style + */ + @Override + public String toString() + { + return "SchemaTypeProperties{" + + "versionNumber='" + versionNumber + '\'' + + ", author='" + author + '\'' + + ", usage='" + usage + '\'' + + ", encodingStandard='" + encodingStandard + '\'' + + ", namespace='" + namespace + '\'' + + ", formula='" + formula + '\'' + + ", formulaType='" + formulaType + '\'' + + ", queries=" + queries + + ", displayName='" + getDisplayName() + '\'' + + ", description='" + getDescription() + '\'' + + ", deprecated=" + getIsDeprecated() + + ", typeName='" + getTypeName() + '\'' + + ", qualifiedName='" + getQualifiedName() + '\'' + + ", additionalProperties=" + getAdditionalProperties() + + ", extendedProperties=" + getExtendedProperties() + + '}'; + } + + + /** + * Compare the values of the supplied object with those stored in the current object. + * + * @param objectToCompare supplied object + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + SchemaTypeProperties that = (SchemaTypeProperties) objectToCompare; + return Objects.equals(versionNumber, that.versionNumber) && + Objects.equals(author, that.author) && + Objects.equals(usage, that.usage) && + Objects.equals(encodingStandard, that.encodingStandard) && + Objects.equals(namespace, that.namespace) && + Objects.equals(formula, that.formula) && + Objects.equals(formulaType, that.formulaType) && + Objects.equals(queries, that.queries); + } + + + /** + * Return hash code based on properties. + * + * @return int + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), versionNumber, author, usage, encodingStandard, namespace, formula, formulaType, queries); + } +} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/SimpleSchemaTypeProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/SimpleSchemaTypeProperties.java similarity index 75% rename from open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/SimpleSchemaTypeProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/SimpleSchemaTypeProperties.java index 3c26308e3cb..0c976c9e8f4 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/SimpleSchemaTypeProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/SimpleSchemaTypeProperties.java @@ -1,10 +1,9 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.schema; import com.fasterxml.jackson.annotation.*; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.SimpleSchemaType; import java.util.Objects; @@ -24,7 +23,6 @@ { @JsonSubTypes.Type(value = PrimitiveSchemaTypeProperties.class, name = "PrimitiveSchemaTypeProperties"), @JsonSubTypes.Type(value = EnumSchemaTypeProperties.class, name = "EnumSchemaTypeProperties"), - @JsonSubTypes.Type(value = ExternalSchemaTypeProperties.class, name = "ExternalSchemaTypeProperties"), }) public class SimpleSchemaTypeProperties extends SchemaTypeProperties { @@ -107,24 +105,10 @@ public String toString() return "SimpleSchemaTypeProperties{" + "dataType='" + dataType + '\'' + ", defaultValue='" + defaultValue + '\'' + - ", versionNumber='" + getVersionNumber() + '\'' + - ", author='" + getAuthor() + '\'' + - ", usage='" + getUsage() + '\'' + - ", encodingStandard='" + getEncodingStandard() + '\'' + - ", namespace='" + getNamespace() + '\'' + - ", deprecated=" + getIsDeprecated() + - ", displayName='" + getDisplayName() + '\'' + - ", description='" + getDescription() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; + "} " + super.toString(); } - /** * Compare the values of the supplied object with those stored in the current object. * @@ -138,7 +122,7 @@ public boolean equals(Object objectToCompare) { return true; } - if (!(objectToCompare instanceof SimpleSchemaType)) + if (!(objectToCompare instanceof SimpleSchemaTypeProperties that)) { return false; } @@ -146,7 +130,6 @@ public boolean equals(Object objectToCompare) { return false; } - SimpleSchemaType that = (SimpleSchemaType) objectToCompare; return Objects.equals(getDataType(), that.getDataType()) && Objects.equals(getDefaultValue(), that.getDefaultValue()); } diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/StructSchemaTypeProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/StructSchemaTypeProperties.java similarity index 96% rename from open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/StructSchemaTypeProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/StructSchemaTypeProperties.java index b73807f26fb..7caa387c893 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/StructSchemaTypeProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/StructSchemaTypeProperties.java @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.schema; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/apis/APIOperationProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/apis/APIOperationProperties.java new file mode 100644 index 00000000000..4b857395a68 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/apis/APIOperationProperties.java @@ -0,0 +1,151 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.openmetadata.properties.schema.apis; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.SchemaTypeProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * APIOperationProperties is a class for an operation within an API specification. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class APIOperationProperties extends SchemaTypeProperties +{ + private String path = null; + private String command = null; + + + /** + * Default constructor + */ + public APIOperationProperties() + { + super(); + } + + + /** + * Copy/clone constructor. + * + * @param template object to copy + */ + public APIOperationProperties(APIOperationProperties template) + { + super(template); + + if (template != null) + { + path = template.getPath(); + command = template.getCommand(); + } + } + + + /** + * Return the path name to add to the network address in the API's endpoint. + * + * @return string path name + */ + public String getPath() + { + return path; + } + + + /** + * Set up the path name to add to the network address in the API's endpoint. + * + * @param path string path name + */ + public void setPath(String path) + { + this.path = path; + } + + + /** + * Return the command (eg GET, POST or method name) that is called. + * + * @return string command name + */ + public String getCommand() + { + return command; + } + + + /** + * Set up the command (eg GET, POST or method name) that is called. + * + * @param command command string + */ + public void setCommand(String command) + { + this.command = command; + } + + + /** + * Standard toString method. + * + * @return print out of variables in a JSON-style + */ + @Override + public String toString() + { + return "APIOperationProperties{" + + "path='" + path + '\'' + + ", command='" + command + '\'' + + "} " + super.toString(); + } + + + /** + * Compare the values of the supplied object with those stored in the current object. + * + * @param objectToCompare supplied object + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + APIOperationProperties that = (APIOperationProperties) objectToCompare; + return Objects.equals(path, that.path) && + Objects.equals(command, that.command); + } + + + + /** + * Create a hash code for this element type. + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), path, command); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/apis/APIParameterListProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/apis/APIParameterListProperties.java new file mode 100644 index 00000000000..3e432a2f2bc --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/apis/APIParameterListProperties.java @@ -0,0 +1,124 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.openmetadata.properties.schema.apis; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.ComplexSchemaTypeProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * APIParameterListProperties is a class for representing the list of parameters for an API + * operation's header, request or response payload. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class APIParameterListProperties extends ComplexSchemaTypeProperties +{ + private boolean required = true; + + /** + * Default constructor + */ + public APIParameterListProperties() + { + super(); + } + + + /** + * Copy/clone constructor. + * + * @param template object to copy + */ + public APIParameterListProperties(APIParameterListProperties template) + { + super(template); + + if (template != null) + { + required = template.getRequired(); + } + } + + /** + * Return if this is a mandatory parameter. + * + * @return boolean flag + */ + public boolean getRequired() + { + return required; + } + + + /** + * Set up if this is a mandatory parameter. + * + * @param required boolean flag + */ + public void setRequired(boolean required) + { + this.required = required; + } + + + /** + * Standard toString method. + * + * @return print out of variables in a JSON-style + */ + @Override + public String toString() + { + return "APIParameterListProperties{" + + "required=" + required + + "} " + super.toString(); + } + + + /** + * Compare the values of the supplied object with those stored in the current object. + * + * @param objectToCompare supplied object + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + APIParameterListProperties that = (APIParameterListProperties) objectToCompare; + return Objects.equals(required, that.required); + } + + + + /** + * Create a hash code for this element type. + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), required); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/apis/APIParameterProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/apis/APIParameterProperties.java new file mode 100644 index 00000000000..3ad0f3b84fa --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/apis/APIParameterProperties.java @@ -0,0 +1,150 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.openmetadata.properties.schema.apis; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.SchemaAttributeProperties; + +import java.util.Map; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * APIParameterProperties is a class for representing a parameter in an API specification. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class APIParameterProperties extends SchemaAttributeProperties +{ + private String parameterType = null; + + + /** + * Default constructor + */ + public APIParameterProperties() + { + super(); + } + + + /** + * Copy/clone constructor. + * + * @param template object to copy + */ + public APIParameterProperties(APIParameterProperties template) + { + super(template); + + if (template != null) + { + parameterType = template.getParameterType(); + } + } + + + /** + * Copy/clone constructor. + * + * @param template object to copy + */ + public APIParameterProperties(SchemaAttributeProperties template) + { + super(template); + + if (template != null) + { + if (getExtendedProperties() != null) + { + Map extendedProperties = getExtendedProperties(); + + parameterType = extendedProperties.get("parameterType").toString(); + + extendedProperties.remove("parameterType"); + + super.setExtendedProperties(extendedProperties); + } + } + } + + + /** + * Return the type of parameter - for example for REST APIs, is it a PathVariable or a RequestParameter? + * + * @return string name + */ + public String getParameterType() + { + return parameterType; + } + + + /** + * Set up the type of parameter - for example for REST APIs, is it a PathVariable or a RequestParameter? + * + * @param parameterType string name + */ + public void setParameterType(String parameterType) + { + this.parameterType = parameterType; + } + + + /** + * Standard toString method. + * + * @return print out of variables in a JSON-style + */ + @Override + public String toString() + { + return "APIParameterProperties{" + + "parameterType='" + parameterType + '\'' + + "} " + super.toString(); + } + + + /** + * Compare the values of the supplied object with those stored in the current object. + * + * @param objectToCompare supplied object + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + APIParameterProperties that = (APIParameterProperties) objectToCompare; + return Objects.equals(parameterType, that.parameterType); + } + + + /** + * Create a hash code for this element type. + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), parameterType); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/apis/APISchemaTypeProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/apis/APISchemaTypeProperties.java new file mode 100644 index 00000000000..14c2fab0533 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/apis/APISchemaTypeProperties.java @@ -0,0 +1,53 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.schema.apis; + + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.RootSchemaTypeProperties; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * APISchemaTypeProperties provides the root schema type for an API specification that includes the operations, + * and their parameters, headers and responses. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class APISchemaTypeProperties extends RootSchemaTypeProperties +{ + /** + * Default constructor used by subclasses + */ + public APISchemaTypeProperties() + { + super(); + } + + + /** + * Copy/clone Constructor. + * + * @param template template object to copy. + */ + public APISchemaTypeProperties(APISchemaTypeProperties template) + { + super(template); + } + + + /** + * Standard toString method. + * + * @return print out of variables in a JSON-style + */ + @Override + public String toString() + { + return "APISchemaTypeProperties{} " + super.toString(); + } +} \ No newline at end of file diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/apis/package-info.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/apis/package-info.java new file mode 100644 index 00000000000..dfe93c3bf5d --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/apis/package-info.java @@ -0,0 +1,7 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +/** + * Beans for representing the structure of parameter lists, headers and results in an API. + */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.schema.apis; \ No newline at end of file diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/databases/DatabaseColumnProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/databases/DatabaseColumnProperties.java new file mode 100644 index 00000000000..ce1f18658a1 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/databases/DatabaseColumnProperties.java @@ -0,0 +1,149 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.openmetadata.properties.schema.databases; + +import com.fasterxml.jackson.annotation.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.tabular.TabularColumnProperties; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * DatabaseColumnProperties describes the properties of a database column. + * The database column may have a fixed value (inherited from tabular column or be derived by a formula. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class DatabaseColumnProperties extends TabularColumnProperties +{ + private String formula = null; + private List queries = null; + + + /** + * Default constructor + */ + public DatabaseColumnProperties() + { + super(); + } + + + /** + * Copy/clone constructor. + * + * @param template object to copy + */ + public DatabaseColumnProperties(DatabaseColumnProperties template) + { + super(template); + + if (template != null) + { + formula = template.getFormula(); + queries = template.getQueries(); + } + } + + + /** + * Return the formula used to combine the values of the queries. Each query is has a identifier and the + * formula has placeholders for these identifiers in it to show how the query results are combined. + * + * @return String formula + */ + public String getFormula() { return formula; } + + + /** + * Set up the formula used to combine the values of the queries. Each query is has a identifier and the + * formula has placeholders for these identifiers in it to show how the query results are combined. + * + * @param formula String formula + */ + public void setFormula(String formula) + { + this.formula = formula; + } + + + /** + * Return the list of individual query targets for a derived column. + * + * @return list of queries and their target element + */ + public List getQueries() + { + return queries; + } + + + /** + * Set up the list of individual query targets for a derived column. + * + * @param queries list of queries and their target element + */ + public void setQueries(List queries) + { + this.queries = queries; + } + + + /** + * Standard toString method. + * + * @return print out of variables in a JSON-style + */ + @Override + public String toString() + { + return "DatabaseColumnProperties{" + + "formula='" + formula + '\'' + + ", queries=" + queries + + "} " + super.toString(); + } + + + /** + * Compare the values of the supplied object with those stored in the current object. + * + * @param objectToCompare supplied object + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + DatabaseColumnProperties that = (DatabaseColumnProperties) objectToCompare; + return Objects.equals(formula, that.formula) && + Objects.equals(queries, that.queries); + } + + + /** + * Return hash code based on properties. + * + * @return int + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), formula, queries); + } +} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/DatabaseForeignKeyProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/databases/DatabaseForeignKeyProperties.java similarity index 90% rename from open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/DatabaseForeignKeyProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/databases/DatabaseForeignKeyProperties.java index 7c3ade6260a..e0b5f641b9c 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/DatabaseForeignKeyProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/databases/DatabaseForeignKeyProperties.java @@ -1,11 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.schema.databases; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; import java.util.Objects; @@ -178,15 +179,12 @@ public String getSource() public String toString() { return "DatabaseForeignKeyProperties{" + - "name='" + name + '\'' + - ", description='" + description + '\'' + - ", confidence=" + confidence + - ", steward='" + steward + '\'' + - ", source='" + source + '\'' + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", extendedProperties=" + getExtendedProperties() + - '}'; + "name='" + name + '\'' + + ", description='" + description + '\'' + + ", confidence=" + confidence + + ", steward='" + steward + '\'' + + ", source='" + source + '\'' + + "} " + super.toString(); } diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/DatabasePrimaryKeyProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/databases/DatabasePrimaryKeyProperties.java similarity index 95% rename from open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/DatabasePrimaryKeyProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/databases/DatabasePrimaryKeyProperties.java index a5186325444..16975502f83 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/DatabasePrimaryKeyProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/databases/DatabasePrimaryKeyProperties.java @@ -1,12 +1,13 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.schema.databases; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import org.odpi.openmetadata.frameworks.openmetadata.enums.KeyPattern; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ClassificationProperties; import java.util.Objects; @@ -128,7 +129,7 @@ public boolean equals(Object objectToCompare) { return true; } - if (! (objectToCompare instanceof DatabasePrimaryKeyProperties)) + if (! (objectToCompare instanceof DatabasePrimaryKeyProperties that)) { return false; } @@ -136,7 +137,6 @@ public boolean equals(Object objectToCompare) { return false; } - DatabasePrimaryKeyProperties that = (DatabasePrimaryKeyProperties) objectToCompare; return Objects.equals(name, that.name) && keyPattern == that.keyPattern; } diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/DatabaseQueryProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/databases/DatabaseQueryProperties.java similarity index 97% rename from open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/DatabaseQueryProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/databases/DatabaseQueryProperties.java index 4ddbb52b237..8e6be281030 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/DatabaseQueryProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/databases/DatabaseQueryProperties.java @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.schema.databases; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/databases/DatabaseSchemaTypeProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/databases/DatabaseSchemaTypeProperties.java new file mode 100644 index 00000000000..b77f1d06a5b --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/databases/DatabaseSchemaTypeProperties.java @@ -0,0 +1,53 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.openmetadata.properties.schema.databases; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ReferenceableProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.RootSchemaTypeProperties; + + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * DatabaseSchemaTypeProperties is a java bean used to create the database schema type associated with the database. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class DatabaseSchemaTypeProperties extends RootSchemaTypeProperties +{ + /** + * Default constructor + */ + public DatabaseSchemaTypeProperties() + { + } + + + /** + * Copy/clone constructor. Note, this is a deep copy + * + * @param template object to copy + */ + public DatabaseSchemaTypeProperties(DatabaseSchemaTypeProperties template) + { + super(template); + } + + + /** + * Standard toString method. + * + * @return print out of variables in a JSON-style + */ + @Override + public String toString() + { + return "DatabaseSchemaTypeProperties{} " + super.toString(); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/databases/DatabaseTableProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/databases/DatabaseTableProperties.java new file mode 100644 index 00000000000..53ed356e0b0 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/databases/DatabaseTableProperties.java @@ -0,0 +1,59 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.openmetadata.properties.schema.databases; + +import com.fasterxml.jackson.annotation.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.SchemaAttributeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.SchemaElementProperties; + +import java.util.ArrayList; +import java.util.List; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * DatabaseTableProperties is a class for representing a relational database table. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, + property = "class") +@JsonSubTypes( + { + @JsonSubTypes.Type(value = DatabaseViewProperties.class, name = "DatabaseViewProperties"), + }) +public class DatabaseTableProperties extends SchemaAttributeProperties +{ + /** + * Default constructor + */ + public DatabaseTableProperties() + { + super(); + } + + + /** + * Copy/clone constructor. + * + * @param template object to copy + */ + public DatabaseTableProperties(DatabaseTableProperties template) + { + super(template); + } + + /** + * Standard toString method. + * + * @return print out of variables in a JSON-style + */ + @Override + public String toString() + { + return "DatabaseTableProperties{} " + super.toString(); + } +} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/DatabaseViewProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/databases/DatabaseViewProperties.java similarity index 82% rename from open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/DatabaseViewProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/databases/DatabaseViewProperties.java index a063f161452..393fb41687d 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/DatabaseViewProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/databases/DatabaseViewProperties.java @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.schema.databases; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -103,18 +103,9 @@ public void setQueries(List queries) public String toString() { return "DatabaseViewProperties{" + - "formula='" + formula + '\'' + - ", queries=" + queries + - ", deprecated=" + getIsDeprecated() + - ", displayName='" + getDisplayName() + '\'' + - ", description='" + getDescription() + '\'' + - ", aliases='" + getAliases() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; + "formula='" + formula + '\'' + + ", queries=" + queries + + "} " + super.toString(); } diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/databases/package-info.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/databases/package-info.java new file mode 100644 index 00000000000..5b375dfa7f9 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/databases/package-info.java @@ -0,0 +1,7 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +/** + * Beans for representing the structure of data in a database. + */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.schema.databases; \ No newline at end of file diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/DataContainerProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/display/DataContainerProperties.java similarity index 95% rename from open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/DataContainerProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/display/DataContainerProperties.java index 422f3ad67c6..fa2d7a726db 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/DataContainerProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/display/DataContainerProperties.java @@ -1,9 +1,10 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.schema.display; import com.fasterxml.jackson.annotation.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.SchemaAttributeProperties; import java.util.Objects; @@ -16,7 +17,7 @@ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) -public class DataContainerProperties extends SchemaElementProperties +public class DataContainerProperties extends SchemaAttributeProperties { private int elementPosition = 0; private int minCardinality = 0; diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/display/DataFieldProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/display/DataFieldProperties.java new file mode 100644 index 00000000000..95c82700db2 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/display/DataFieldProperties.java @@ -0,0 +1,61 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.openmetadata.properties.schema.display; + +import com.fasterxml.jackson.annotation.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.SchemaAttributeProperties; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * DataFieldProperties is a class for representing a data field within a Form, Report or Que + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class DataFieldProperties extends SchemaAttributeProperties +{ + /** + * Default constructor used by subclasses + */ + public DataFieldProperties() + { + super(); + } + + + /** + * Copy/clone Constructor. + * + * @param template template object to copy. + */ + public DataFieldProperties(DataFieldProperties template) + { + super(template); + } + + + /** + * Copy/clone Constructor. + * + * @param template template object to copy. + */ + public DataFieldProperties(SchemaAttributeProperties template) + { + super(template); + } + + + /** + * Standard toString method. + * + * @return print out of variables in a JSON-style + */ + @Override + public String toString() + { + return "DataFieldProperties{} " + super.toString(); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/display/package-info.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/display/package-info.java new file mode 100644 index 00000000000..8a987aad222 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/display/package-info.java @@ -0,0 +1,7 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +/** + * Beans describing the structure of displayed data. + */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.schema.display; \ No newline at end of file diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/events/EventSchemaAttributeProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/events/EventSchemaAttributeProperties.java new file mode 100644 index 00000000000..1b3a28b59dd --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/events/EventSchemaAttributeProperties.java @@ -0,0 +1,51 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.openmetadata.properties.schema.events; + +import com.fasterxml.jackson.annotation.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.SchemaAttributeProperties; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * EventSchemaAttributeProperties is a class for representing a field within an event structure. + * They are schema attributes and can have either a simple or complex type attached. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class EventSchemaAttributeProperties extends SchemaAttributeProperties +{ + /** + * Default constructor used by subclasses + */ + public EventSchemaAttributeProperties() + { + super(); + } + + + /** + * Copy/clone Constructor. + * + * @param template template object to copy. + */ + public EventSchemaAttributeProperties(EventSchemaAttributeProperties template) + { + super(template); + } + + + /** + * Standard toString method. + * + * @return print out of variables in a JSON-style + */ + @Override + public String toString() + { + return "EventSchemaAttributeProperties{} " + super.toString(); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/events/EventTypeListProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/events/EventTypeListProperties.java new file mode 100644 index 00000000000..9defcbd6970 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/events/EventTypeListProperties.java @@ -0,0 +1,52 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.openmetadata.properties.schema.events; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.SchemaTypeChoiceProperties; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * EventTypeProperties is a class for representing the top-level element for an event. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class EventTypeListProperties extends SchemaTypeChoiceProperties +{ + /** + * Default constructor + */ + public EventTypeListProperties() + { + super(); + } + + + /** + * Copy/clone constructor. + * + * @param template object to copy + */ + public EventTypeListProperties(EventTypeListProperties template) + { + super(template); + } + + + /** + * Standard toString method. + * + * @return print out of variables in a JSON-style + */ + @Override + public String toString() + { + return "EventTypeListProperties{} " + super.toString(); + } +} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/EventTypeProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/events/EventTypeProperties.java similarity index 86% rename from open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/EventTypeProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/events/EventTypeProperties.java index 0ebf8d7c20d..d1176100eda 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/EventTypeProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/events/EventTypeProperties.java @@ -1,11 +1,13 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.schema.events; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.ComplexSchemaTypeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.RootSchemaTypeProperties; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; @@ -16,7 +18,7 @@ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) -public class EventTypeProperties extends ComplexSchemaTypeProperties +public class EventTypeProperties extends RootSchemaTypeProperties { /** * Default constructor diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/events/package-info.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/events/package-info.java new file mode 100644 index 00000000000..4acb6e81db1 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/events/package-info.java @@ -0,0 +1,7 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +/** + * Beans to describe the structure of data in an event. + */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.schema.events; \ No newline at end of file diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/package-info.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/package-info.java new file mode 100644 index 00000000000..59aafa5877e --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/package-info.java @@ -0,0 +1,7 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +/** + * Beans for describing the structure of data. + */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.schema; \ No newline at end of file diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/tabular/TabularColumnProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/tabular/TabularColumnProperties.java new file mode 100644 index 00000000000..68dfd50c4bb --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/tabular/TabularColumnProperties.java @@ -0,0 +1,59 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.openmetadata.properties.schema.tabular; + +import com.fasterxml.jackson.annotation.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.SchemaAttributeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.databases.DatabaseColumnProperties; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * TabularColumnProperties is a class for representing a column within a table type structure. + * Tabular columns are schema attributes with a simple type attached + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "class") +@JsonSubTypes( + { + @JsonSubTypes.Type(value = DatabaseColumnProperties.class, name = "DatabaseColumnProperties"), + }) +public class TabularColumnProperties extends SchemaAttributeProperties +{ + /** + * Default constructor used by subclasses + */ + public TabularColumnProperties() + { + super(); + } + + + /** + * Copy/clone Constructor. + * + * @param template template object to copy. + */ + public TabularColumnProperties(TabularColumnProperties template) + { + super(template); + } + + + /** + * Standard toString method. + * + * @return print out of variables in a JSON-style + */ + @Override + public String toString() + { + return "TabularColumnProperties{} " + super.toString(); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/tabular/TabularSchemaTypeProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/tabular/TabularSchemaTypeProperties.java new file mode 100644 index 00000000000..07ab02668dd --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/tabular/TabularSchemaTypeProperties.java @@ -0,0 +1,53 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.openmetadata.properties.schema.tabular; + +import com.fasterxml.jackson.annotation.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.ComplexSchemaTypeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.RootSchemaTypeProperties; + + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * TabularSchemaTypeProperties is a class for representing a tabular schema such as the + * structure of a CSV file. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class TabularSchemaTypeProperties extends RootSchemaTypeProperties +{ + /** + * Default constructor used by subclasses + */ + public TabularSchemaTypeProperties() + { + super(); + } + + + /** + * Copy/clone Constructor. + * + * @param template template object to copy. + */ + public TabularSchemaTypeProperties(TabularSchemaTypeProperties template) + { + super(template); + } + + + /** + * Standard toString method. + * + * @return print out of variables in a JSON-style + */ + @Override + public String toString() + { + return "TabularSchemaTypeProperties{} " + super.toString(); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/tabular/package-info.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/tabular/package-info.java new file mode 100644 index 00000000000..d422f637668 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/schema/tabular/package-info.java @@ -0,0 +1,7 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +/** + * Beans for representing the structure of simple tabular data. + */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.schema.tabular; \ No newline at end of file diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/security/SecurityGroupProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/security/SecurityGroupProperties.java new file mode 100644 index 00000000000..2c94808cf3a --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/security/SecurityGroupProperties.java @@ -0,0 +1,123 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.security; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.GovernanceDefinitionProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * SecurityGroupProperties defines a security group technical control. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class SecurityGroupProperties extends GovernanceDefinitionProperties +{ + private String distinguishedName = null; + + + /** + * Default Constructor + */ + public SecurityGroupProperties() + { + } + + + /** + * Copy/Clone Constructor + * + * @param template object to copy + */ + public SecurityGroupProperties(SecurityGroupProperties template) + { + super(template); + + if (template != null) + { + this.distinguishedName = template.getDistinguishedName(); + } + } + + + /** + * Return the specific distinguishedName of the license. + * + * @return string description + */ + public String getDistinguishedName() + { + return distinguishedName; + } + + + /** + * Set up the specific distinguishedName of the license. + * + * @param distinguishedName string description + */ + public void setDistinguishedName(String distinguishedName) + { + this.distinguishedName = distinguishedName; + } + + + /** + * JSON-style toString + * + * @return string containing the properties and their values + */ + @Override + public String toString() + { + return "SecurityGroupProperties{" + + "distinguishedName='" + distinguishedName + '\'' + + "} " + super.toString(); + } + + + /** + * Compare the values of the supplied object with those stored in the current object. + * + * @param objectToCompare supplied object + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + SecurityGroupProperties that = (SecurityGroupProperties) objectToCompare; + return Objects.equals(distinguishedName, that.distinguishedName); + } + + + + /** + * Return hash code based on properties. + * + * @return int + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), distinguishedName); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/security/SecurityTagsProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/security/SecurityTagsProperties.java new file mode 100644 index 00000000000..ef370582807 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/security/SecurityTagsProperties.java @@ -0,0 +1,175 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.openmetadata.properties.security; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ClassificationProperties; + +import java.util.*; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * SecurityTagsProperties holds the list of labels and properties used by a security enforcement engine to control access + * and visibility to the contents of the real-world object described by the Referenceable. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class SecurityTagsProperties extends ClassificationProperties +{ + private List securityLabels = null; + private Map securityProperties = null; + private Map> accessGroups = null; + + /** + * Default constructor + */ + public SecurityTagsProperties() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public SecurityTagsProperties(SecurityTagsProperties template) + { + super(template); + + if (template != null) + { + this.securityLabels = template.getSecurityLabels(); + this.securityProperties = template.getSecurityProperties(); + this.accessGroups = template.getAccessGroups(); + } + } + + + /** + * Return the list of security labels attached to the element. + * + * @return list of label strings + */ + public List getSecurityLabels() + { + return securityLabels; + } + + + /** + * Set up the list of security labels for the element. + * + * @param securityLabels list of label strings + */ + public void setSecurityLabels(List securityLabels) + { + this.securityLabels = securityLabels; + } + + + /** + * Return the security properties associated with the element. These are name-value pairs. + * + * @return map of properties + */ + public Map getSecurityProperties() + { + return securityProperties; + } + + + /** + * Set up the security properties associated with the element. These are name-value pairs. + * + * @param securityProperties map of properties + */ + public void setSecurityProperties(Map securityProperties) + { + this.securityProperties = securityProperties; + } + + + /** + * Return the permissions for each access group. + * + * @return access groups + */ + public Map> getAccessGroups() + { + return accessGroups; + } + + /** + * Set up the permissions for each access group. + * + * @param accessGroups access groups + */ + public void setAccessGroups(Map> accessGroups) + { + this.accessGroups = accessGroups; + } + + + /** + * Standard toString method. + * + * @return print out of variables in a JSON-style + */ + @Override + public String toString() + { + return "SecurityTagsProperties{" + + "securityLabels=" + securityLabels + + ", securityProperties=" + securityProperties + + ", accessGroups=" + accessGroups + + "} " + super.toString(); + } + + + /** + * Compare the values of the supplied object with those stored in the current object. + * + * @param objectToCompare supplied object + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + SecurityTagsProperties that = (SecurityTagsProperties) objectToCompare; + return Objects.equals(securityLabels, that.securityLabels) && + Objects.equals(securityProperties, that.securityProperties) && + Objects.equals(accessGroups, that.accessGroups); + } + + + /** + * Create a hash code for this element type. + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), securityLabels, securityProperties, accessGroups); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/security/package-info.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/security/package-info.java new file mode 100644 index 00000000000..51df4749176 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/security/package-info.java @@ -0,0 +1,8 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + + +/** + * Beans for describing the required security. + */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.security; \ No newline at end of file diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/softwarecapabilities/APIManagerProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/softwarecapabilities/APIManagerProperties.java new file mode 100644 index 00000000000..7253e987470 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/softwarecapabilities/APIManagerProperties.java @@ -0,0 +1,51 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities; + + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * APIManagerProperties describes the API managing capability of a server + */ +@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public class APIManagerProperties extends SoftwareCapabilityProperties +{ + /** + * Default constructor + */ + public APIManagerProperties() + { + super(); + } + + + /** + * Copy/clone constructor. + * + * @param template object to copy + */ + public APIManagerProperties(APIManagerProperties template) + { + super(template); + } + + + /** + * Standard toString method. + * + * @return print out of variables in a JSON-style + */ + @Override + public String toString() + { + return "APIManagerProperties{} " + super.toString(); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/softwarecapabilities/ApplicationProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/softwarecapabilities/ApplicationProperties.java new file mode 100644 index 00000000000..a2e4432b1cb --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/softwarecapabilities/ApplicationProperties.java @@ -0,0 +1,52 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities; + + +/** + * ApplicationProperties describes an collection of processes (application) that implements support for the business. + */ +public class ApplicationProperties extends SoftwareCapabilityProperties +{ + /** + * Default constructor + */ + public ApplicationProperties() + { + super(); + } + + + /** + * Copy/clone constructor. + * + * @param template object to copy + */ + public ApplicationProperties(ApplicationProperties template) + { + super(template); + } + + + /** + * Copy/clone constructor from OCF bean. + * + * @param template object to copy + */ + public ApplicationProperties(SoftwareCapabilityProperties template) + { + super(template); + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "ApplicationProperties{} " + super.toString(); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/softwarecapabilities/AssetManagerProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/softwarecapabilities/AssetManagerProperties.java new file mode 100644 index 00000000000..2b8d7148375 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/softwarecapabilities/AssetManagerProperties.java @@ -0,0 +1,51 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * AssetManagerProperties describes the properties of an external asset manager. + */ +@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public class AssetManagerProperties extends SoftwareCapabilityProperties +{ + /** + * Default constructor + */ + public AssetManagerProperties() + { + super(); + } + + + /** + * Copy/clone constructor. + * + * @param template object to copy + */ + public AssetManagerProperties(AssetManagerProperties template) + { + super(template); + } + + + /** + * Standard toString method. + * + * @return print out of variables in a JSON-style + */ + @Override + public String toString() + { + return "AssetManagerProperties{} " + super.toString(); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/softwarecapabilities/CapabilityDeploymentProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/softwarecapabilities/CapabilityDeploymentProperties.java new file mode 100644 index 00000000000..cb54828c443 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/softwarecapabilities/CapabilityDeploymentProperties.java @@ -0,0 +1,286 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import java.util.Date; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +import org.odpi.openmetadata.frameworks.openmetadata.enums.OperationalStatus; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * CapabilityDeploymentProperties describes the properties for the SupportedSoftwareCapability relationship between a ITInfrastructure asset + * and a Software Capability. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class CapabilityDeploymentProperties extends RelationshipProperties +{ + private static final String deploymentTimeProperty = "deploymentTime"; + private static final String deployerProperty = "deployer"; + private static final String deployerTypeNameProperty = "deployerTypeName"; + private static final String deployerPropertyNameProperty = "deployerPropertyName"; + private static final String deploymentStatusProperty = "serverCapabilityStatus"; + + + private Date deploymentTime = null; + private String deployer = null; + private String deployerTypeName = null; + private String deployerPropertyName = null; + private OperationalStatus softwareCapabilityStatus = null; + + + /** + * Default constructor + */ + public CapabilityDeploymentProperties() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public CapabilityDeploymentProperties(CapabilityDeploymentProperties template) + { + super(template); + + if (template != null) + { + deploymentTime = template.getDeploymentTime(); + deployer = template.getDeployer(); + deployerTypeName = template.getDeployerTypeName(); + deployerPropertyName = template.getDeployerPropertyName(); + softwareCapabilityStatus = template.getSoftwareCapabilityStatus(); + } + } + + + /** + * Turn the properties into a property map. + * + * @return property map. + */ + public Map cloneToMap() + { + Map propertyMap = new HashMap<>(); + + if (deploymentTime != null) + { + propertyMap.put(deploymentTimeProperty, deploymentTime); + } + + if (deployer != null) + { + propertyMap.put(deployerProperty, deployer); + } + + if (deployerTypeName != null) + { + propertyMap.put(deployerTypeNameProperty, deployerTypeName); + } + + if (deployerPropertyName != null) + { + propertyMap.put(deployerPropertyNameProperty, deployerPropertyName); + } + + if (softwareCapabilityStatus != null) + { + propertyMap.put(deploymentStatusProperty, softwareCapabilityStatus.getOpenTypeOrdinal()); + } + + if (! propertyMap.isEmpty()) + { + propertyMap = null; + } + + return propertyMap; + } + + + + /** + * Return the time that the capability was deployed into the server. + * + * @return date/time + */ + public Date getDeploymentTime() + { + return deploymentTime; + } + + + /** + * Set up the time that the capability was deployed into the server. + * + * @param deploymentTime date/time + */ + public void setDeploymentTime(Date deploymentTime) + { + this.deploymentTime = deploymentTime; + } + + + /** + * Return the userId of the deployer. + * + * @return name + */ + public String getDeployer() + { + return deployer; + } + + + /** + * Set up the userId of the deployer. + * + * @param deployer name + */ + public void setDeployer(String deployer) + { + this.deployer = deployer; + } + + + /** + * Return the type name of the element used to represent the deployer. + * + * @return string name + */ + public String getDeployerTypeName() + { + return deployerTypeName; + } + + + /** + * Set up the type name of the element used to represent the deployer. + * + * @param deployerTypeName string name + */ + public void setDeployerTypeName(String deployerTypeName) + { + this.deployerTypeName = deployerTypeName; + } + + + /** + * Return the property name from the element used to represent the deployer. + * + * @return string name + */ + public String getDeployerPropertyName() + { + return deployerPropertyName; + } + + + /** + * Set up the property name from the element used to represent the deployer. + * + * @param deployerPropertyName string name + */ + public void setDeployerPropertyName(String deployerPropertyName) + { + this.deployerPropertyName = deployerPropertyName; + } + + + /** + * Return whether the capability is ready to use. + * + * @return operational status enum + */ + public OperationalStatus getSoftwareCapabilityStatus() + { + return softwareCapabilityStatus; + } + + + /** + * Set up whether the capability is ready to use. + * + * @param softwareCapabilityStatus operational status enum + */ + public void setSoftwareCapabilityStatus(OperationalStatus softwareCapabilityStatus) + { + this.softwareCapabilityStatus = softwareCapabilityStatus; + } + + + /** + * JSON-style toString. + * + * @return list of properties and their values. + */ + @Override + public String toString() + { + return "CapabilityDeploymentProperties{" + + "deploymentTime=" + deploymentTime + + ", deployer='" + deployer + '\'' + + ", deployerTypeName='" + deployerTypeName + '\'' + + ", deployerPropertyName='" + deployerPropertyName + '\'' + + ", softwareCapabilityStatus=" + softwareCapabilityStatus + + ", effectiveFrom=" + getEffectiveFrom() + + ", effectiveTo=" + getEffectiveTo() + + '}'; + } + + + /** + * Equals method that returns true if containing properties are the same. + * + * @param objectToCompare object to compare + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (! super.equals(objectToCompare)) + { + return false; + } + CapabilityDeploymentProperties that = (CapabilityDeploymentProperties) objectToCompare; + return Objects.equals(deploymentTime, that.deploymentTime) && + Objects.equals(deployer, that.deployer) && + Objects.equals(deployerTypeName, that.deployerTypeName) && + Objects.equals(deployerPropertyName, that.deployerPropertyName) && + softwareCapabilityStatus == that.softwareCapabilityStatus; + } + + + /** + * Hash code for this object + * + * @return int + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), deploymentTime, deployer, deployerTypeName, deployerPropertyName, softwareCapabilityStatus); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/softwarecapabilities/DataProcessingEngineProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/softwarecapabilities/DataProcessingEngineProperties.java new file mode 100644 index 00000000000..51bd1c58296 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/softwarecapabilities/DataProcessingEngineProperties.java @@ -0,0 +1,53 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities; + + +/** + * DataProcessingEngineProperties describes an engine. Set up the typeName to create common subtypes such as + * ReportingEngine, WorkflowEngine, AnalyticsEngine, DataMovementEngine or DataVirtualizationEngine. + */ +public class DataProcessingEngineProperties extends SoftwareCapabilityProperties +{ + /** + * Default constructor + */ + public DataProcessingEngineProperties() + { + super(); + } + + + /** + * Copy/clone constructor. + * + * @param template object to copy + */ + public DataProcessingEngineProperties(DataProcessingEngineProperties template) + { + super(template); + } + + + /** + * Copy/clone constructor from OCF bean. + * + * @param template object to copy + */ + public DataProcessingEngineProperties(SoftwareCapabilityProperties template) + { + super(template); + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "DataProcessingEngineProperties{} " + super.toString(); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/softwarecapabilities/DatabaseManagerProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/softwarecapabilities/DatabaseManagerProperties.java new file mode 100644 index 00000000000..0118e64156e --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/softwarecapabilities/DatabaseManagerProperties.java @@ -0,0 +1,51 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities; + + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * DatabaseManagerProperties describes the DBMS capability of a database server + */ +@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public class DatabaseManagerProperties extends SoftwareCapabilityProperties +{ + /** + * Default constructor + */ + public DatabaseManagerProperties() + { + super(); + } + + + /** + * Copy/clone constructor. + * + * @param template object to copy + */ + public DatabaseManagerProperties(DatabaseManagerProperties template) + { + super(template); + } + + + /** + * Standard toString method. + * + * @return print out of variables in a JSON-style + */ + @Override + public String toString() + { + return "DatabaseManagerProperties{} " + super.toString(); + } +} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/EventBrokerProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/softwarecapabilities/EventBrokerProperties.java similarity index 86% rename from open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/EventBrokerProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/softwarecapabilities/EventBrokerProperties.java index 34af8b8afbd..dc2941456d5 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/EventBrokerProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/softwarecapabilities/EventBrokerProperties.java @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities; import com.fasterxml.jackson.annotation.JsonAutoDetect; @@ -16,7 +16,7 @@ @JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) -public class EventBrokerProperties extends SoftwareCapabilitiesProperties +public class EventBrokerProperties extends SoftwareCapabilityProperties { /** * Default constructor @@ -47,8 +47,8 @@ public EventBrokerProperties(EventBrokerProperties template) public String toString() { return "EventBrokerProperties{" + - "displayName='" + getDisplayName() + '\'' + - ", description='" + getDescription() + '\'' + + "displayName='" + getResourceName() + '\'' + + ", description='" + getResourceDescription() + '\'' + ", typeDescription='" + getDeployedImplementationType() + '\'' + ", version='" + getVersion() + '\'' + ", patchLevel='" + getPatchLevel() + '\'' + diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/FileManagerProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/softwarecapabilities/FileManagerProperties.java similarity index 80% rename from open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/FileManagerProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/softwarecapabilities/FileManagerProperties.java index 72a75a35e94..7717e2ed601 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/FileManagerProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/softwarecapabilities/FileManagerProperties.java @@ -1,12 +1,12 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities; /** * FileSystemProperties describes an application that manages a collection of files. */ -public class FileManagerProperties extends SoftwareCapabilitiesProperties +public class FileManagerProperties extends SoftwareCapabilityProperties { /** * Default constructor @@ -33,7 +33,7 @@ public FileManagerProperties(FileManagerProperties template) * * @param template object to copy */ - public FileManagerProperties(SoftwareCapabilitiesProperties template) + public FileManagerProperties(SoftwareCapabilityProperties template) { super(template); } @@ -48,8 +48,8 @@ public FileManagerProperties(SoftwareCapabilitiesProperties template) public String toString() { return "FileManagerProperties{" + - "displayName='" + getDisplayName() + '\'' + - ", description='" + getDescription() + '\'' + + "displayName='" + getResourceName() + '\'' + + ", description='" + getResourceDescription() + '\'' + ", typeDescription='" + getDeployedImplementationType() + '\'' + ", version='" + getVersion() + '\'' + ", patchLevel='" + getPatchLevel() + '\'' + diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/softwarecapabilities/FileSystemProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/softwarecapabilities/FileSystemProperties.java new file mode 100644 index 00000000000..5bed6de968b --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/softwarecapabilities/FileSystemProperties.java @@ -0,0 +1,148 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities; + + +import com.fasterxml.jackson.annotation.*; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * FileSystemProperties describes the root node of a file system. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) + +public class FileSystemProperties extends SoftwareCapabilityProperties +{ + private String format = null; + private String encryption = null; + + + /** + * Default constructor + */ + public FileSystemProperties() + { + super(); + } + + + /** + * Copy/clone constructor. + * + * @param template object to copy + */ + public FileSystemProperties(FileSystemProperties template) + { + super(template); + + if (template != null) + { + format = template.getFormat(); + encryption = template.getEncryption(); + } + } + + + /** + * Return the format of the file system. + * + * @return string name + */ + public String getFormat() + { + return format; + } + + + /** + * Set up the format of the file system. + * + * @param format string name + */ + public void setFormat(String format) + { + this.format = format; + } + + + /** + * Return the type of encryption used on the file system (or null is unencrypted). + * + * @return encryption type + */ + public String getEncryption() + { + return encryption; + } + + + /** + * Set up the type of encryption used on the file system (or null is unencrypted). + * + * @param encryption encryption type + */ + public void setEncryption(String encryption) + { + this.encryption = encryption; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "FileSystemProperties{" + + "format='" + format + '\'' + + ", encryption='" + encryption + '\'' + + "} " + super.toString(); + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (! super.equals(objectToCompare)) + { + return false; + } + FileSystemProperties that = (FileSystemProperties) objectToCompare; + return Objects.equals(format, that.format) && Objects.equals(encryption, that.encryption); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), getFormat(), getEncryption()); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/softwarecapabilities/MetadataSourceProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/softwarecapabilities/MetadataSourceProperties.java index d519bdf019d..8321e1c7eb0 100644 --- a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/softwarecapabilities/MetadataSourceProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/softwarecapabilities/MetadataSourceProperties.java @@ -2,9 +2,7 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities; -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.*; import org.odpi.openmetadata.frameworks.openmetadata.properties.ReferenceableProperties; import java.util.Objects; @@ -13,8 +11,8 @@ import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; /** - * MetadataSourceProperties describe the properties for a capability that is supplying profile - * information to the Community Profile OMAS. This entity is stored as a SoftwareCapability and + * MetadataSourceProperties describe the properties for a capability that is supplying external metadata source + * information to the open metadata ecosystem. This entity is stored as a SoftwareCapability and * its GUID and qualifiedName is passed as the externalSourceGUID and externalSourceName on the profile * management requests. */ @@ -24,9 +22,9 @@ public class MetadataSourceProperties extends ReferenceableProperties { private String displayName = null; - private String description = null; - private String typeDescription = null; - private String version = null; + private String description = null; + private String deployedImplementationType = null; + private String version = null; private String patchLevel = null; private String source = null; @@ -52,9 +50,9 @@ public MetadataSourceProperties(MetadataSourceProperties template) if (template != null) { displayName = template.getDisplayName(); - description = template.getDescription(); - typeDescription = template.getTypeDescription(); - version = template.getVersion(); + description = template.getDescription(); + deployedImplementationType = template.getDeployedImplementationType(); + version = template.getVersion(); patchLevel = template.getPatchLevel(); source = template.getSource(); } @@ -110,20 +108,20 @@ public void setDescription(String description) * * @return string description */ - public String getTypeDescription() + public String getDeployedImplementationType() { - return typeDescription; + return deployedImplementationType; } /** * Set up the description of the type of capability this is. * - * @param typeDescription string + * @param deployedImplementationType string */ - public void setTypeDescription(String typeDescription) + public void setDeployedImplementationType(String deployedImplementationType) { - this.typeDescription = typeDescription; + this.deployedImplementationType = deployedImplementationType; } @@ -202,20 +200,13 @@ public void setSource(String source) public String toString() { return "MetadataSourceProperties{" + - "displayName='" + displayName + '\'' + - ", description='" + description + '\'' + - ", typeDescription='" + typeDescription + '\'' + - ", version='" + version + '\'' + - ", patchLevel='" + patchLevel + '\'' + - ", source='" + source + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; + "displayName='" + displayName + '\'' + + ", description='" + description + '\'' + + ", deployedImplementationType='" + deployedImplementationType + '\'' + + ", version='" + version + '\'' + + ", patchLevel='" + patchLevel + '\'' + + ", source='" + source + '\'' + + "} " + super.toString(); } @@ -243,7 +234,7 @@ public boolean equals(Object objectToCompare) MetadataSourceProperties that = (MetadataSourceProperties) objectToCompare; return Objects.equals(getDisplayName(), that.getDisplayName()) && Objects.equals(getDescription(), that.getDescription()) && - Objects.equals(getTypeDescription(), that.getTypeDescription()) && + Objects.equals(getDeployedImplementationType(), that.getDeployedImplementationType()) && Objects.equals(getVersion(), that.getVersion()) && Objects.equals(getPatchLevel(), that.getPatchLevel()) && Objects.equals(getSource(), that.getSource()); @@ -258,7 +249,7 @@ public boolean equals(Object objectToCompare) @Override public int hashCode() { - return Objects.hash(super.hashCode(), getDisplayName(), getDescription(), getTypeDescription(), getVersion(), + return Objects.hash(super.hashCode(), getDisplayName(), getDescription(), getDeployedImplementationType(), getVersion(), getPatchLevel(), getSource()); } } diff --git a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/properties/SecurityManagerProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/softwarecapabilities/SecurityManagerProperties.java similarity index 92% rename from open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/properties/SecurityManagerProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/softwarecapabilities/SecurityManagerProperties.java index 6c740af8cf9..840ce50ce14 100644 --- a/open-metadata-implementation/access-services/security-manager/security-manager-api/src/main/java/org/odpi/openmetadata/accessservices/securitymanager/properties/SecurityManagerProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/softwarecapabilities/SecurityManagerProperties.java @@ -1,8 +1,9 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.securitymanager.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities; import com.fasterxml.jackson.annotation.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ReferenceableProperties; import java.util.Objects; @@ -198,16 +199,11 @@ public String toString() return "SecurityManagerProperties{" + "displayName='" + displayName + '\'' + ", description='" + description + '\'' + - ", typeDescription='" + deployedImplementationType + '\'' + + ", deployedImplementationType='" + deployedImplementationType + '\'' + ", version='" + version + '\'' + ", patchLevel='" + patchLevel + '\'' + ", source='" + source + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; + "} " + super.toString(); } diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/softwarecapabilities/SoftwareCapabilityProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/softwarecapabilities/SoftwareCapabilityProperties.java new file mode 100644 index 00000000000..7144091dda7 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/softwarecapabilities/SoftwareCapabilityProperties.java @@ -0,0 +1,259 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities; + +import com.fasterxml.jackson.annotation.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.SupplementaryProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * SoftwareCapabilityProperties describe the properties needed to describe a specific software server's capability. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "class") +@JsonSubTypes({ + @JsonSubTypes.Type(value = FileSystemProperties.class, name = "FileSystemProperties") +}) +public class SoftwareCapabilityProperties extends SupplementaryProperties +{ + private String resourceName = null; + private String resourceDescription = null; + private String deployedImplementationType = null; + private String version = null; + private String patchLevel = null; + private String source = null; + + + /** + * Default constructor. + */ + public SoftwareCapabilityProperties() + { + super(); + } + + + /** + * Copy/clone constructor. + * + * @param template object to copy + */ + public SoftwareCapabilityProperties(SoftwareCapabilityProperties template) + { + super(template); + + if (template != null) + { + resourceName = template.getResourceName(); + resourceDescription = template.getResourceDescription(); + deployedImplementationType = template.getDeployedImplementationType(); + version = template.getVersion(); + patchLevel = template.getPatchLevel(); + source = template.getSource(); + } + } + + + /** + * Return the display name for messages and UI. + * + * @return string name + */ + public String getResourceName() + { + return resourceName; + } + + + /** + * Set up the display name for messages and UI. + * + * @param resourceName string name + */ + public void setResourceName(String resourceName) + { + this.resourceName = resourceName; + } + + + /** + * Return the description of the software capability. + * + * @return string description + */ + public String getResourceDescription() + { + return resourceDescription; + } + + + /** + * Set up the description of the software capability. + * + * @param resourceDescription string + */ + public void setResourceDescription(String resourceDescription) + { + this.resourceDescription = resourceDescription; + } + + + /** + * Return the description of the type of software capability this is. + * + * @return string description + */ + public String getDeployedImplementationType() + { + return deployedImplementationType; + } + + + /** + * Set up the description of the type of software capability this is. + * + * @param deployedImplementationType string + */ + public void setDeployedImplementationType(String deployedImplementationType) + { + this.deployedImplementationType = deployedImplementationType; + } + + + /** + * Return the version of the software capability. + * + * @return version string + */ + public String getVersion() + { + return version; + } + + + /** + * Set up the version string of the software capability. + * + * @param version string + */ + public void setVersion(String version) + { + this.version = version; + } + + + /** + * Return the patch level of the software capability. + * + * @return patch level string + */ + public String getPatchLevel() + { + return patchLevel; + } + + + /** + * Set up the patch level of the software capability. + * + * @param patchLevel string + */ + public void setPatchLevel(String patchLevel) + { + this.patchLevel = patchLevel; + } + + + /** + * Return the source of the software capability implementation. + * + * @return string url + */ + public String getSource() + { + return source; + } + + + /** + * Set up the source of the software capability implementation. + * + * @param source string url + */ + public void setSource(String source) + { + this.source = source; + } + + + /** + * Standard toString method. + * + * @return print out of variables in a JSON-style + */ + @Override + public String toString() + { + return "SoftwareCapabilityProperties{" + + "displayName='" + resourceName + '\'' + + ", description='" + resourceDescription + '\'' + + ", deployedImplementationType='" + deployedImplementationType + '\'' + + ", version='" + version + '\'' + + ", patchLevel='" + patchLevel + '\'' + + ", source='" + source + '\'' + + "} " + super.toString(); + } + + + /** + * Compare the values of the supplied object with those stored in the current object. + * + * @param objectToCompare supplied object + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + SoftwareCapabilityProperties that = (SoftwareCapabilityProperties) objectToCompare; + return Objects.equals(getResourceName(), that.getResourceName()) && + Objects.equals(getResourceDescription(), that.getResourceDescription()) && + Objects.equals(getDeployedImplementationType(), that.getDeployedImplementationType()) && + Objects.equals(getVersion(), that.getVersion()) && + Objects.equals(getPatchLevel(), that.getPatchLevel()) && + Objects.equals(getSource(), that.getSource()); + } + + + /** + * Create a hash code for this element type. + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), getResourceName(), getResourceDescription(), getDeployedImplementationType(), getVersion(), + getPatchLevel(), getSource()); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/softwarecapabilities/SoftwareServerCapabilityProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/softwarecapabilities/SoftwareServerCapabilityProperties.java new file mode 100644 index 00000000000..3a092c92ff5 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/softwarecapabilities/SoftwareServerCapabilityProperties.java @@ -0,0 +1,51 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities; + + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * SoftwareCapabilityProperties describes a function implemented in software that is supported by an instance of IT Infrastructure. + */ +@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public class SoftwareServerCapabilityProperties extends SoftwareCapabilityProperties +{ + /** + * Default constructor. + */ + public SoftwareServerCapabilityProperties() + { + super(); + } + + + /** + * Copy/clone constructor. + * + * @param template object to copy + */ + public SoftwareServerCapabilityProperties(SoftwareServerCapabilityProperties template) + { + super(template); + } + + + /** + * Standard toString method. + * + * @return print out of variables in a JSON-style + */ + @Override + public String toString() + { + return "SoftwareServerCapabilityProperties{} " + super.toString(); + } +} diff --git a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/SolutionComponentProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/solutions/SolutionComponentProperties.java similarity index 83% rename from open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/SolutionComponentProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/solutions/SolutionComponentProperties.java index cb79d2c74a2..9ca477070ef 100644 --- a/open-metadata-implementation/access-services/digital-service/digital-service-api/src/main/java/org/odpi/openmetadata/accessservices/digitalservice/properties/SolutionComponentProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/solutions/SolutionComponentProperties.java @@ -1,10 +1,11 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalservice.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.solutions; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ReferenceableProperties; import java.util.Objects; @@ -125,16 +126,10 @@ public void setVersion(String version) public String toString() { return "SolutionComponentProperties{" + - "displayName='" + displayName + '\'' + - ", description='" + description + '\'' + - ", version='" + version + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; + "displayName='" + displayName + '\'' + + ", description='" + description + '\'' + + ", version='" + version + '\'' + + "} " + super.toString(); } @@ -151,7 +146,7 @@ public boolean equals(Object objectToCompare) { return true; } - if (! (objectToCompare instanceof SolutionComponentProperties)) + if (! (objectToCompare instanceof SolutionComponentProperties that)) { return false; } @@ -159,7 +154,6 @@ public boolean equals(Object objectToCompare) { return false; } - SolutionComponentProperties that = (SolutionComponentProperties) objectToCompare; return Objects.equals(displayName, that.displayName) && Objects.equals(description, that.description) && Objects.equals(version, that.version); diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/solutions/package-info.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/solutions/package-info.java new file mode 100644 index 00000000000..6c28db99e39 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/solutions/package-info.java @@ -0,0 +1,7 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +/** + * Beans for solution blueprints, and solution components. + */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.solutions; \ No newline at end of file diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/properties/TemplateClassificationProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/templates/TemplateClassificationProperties.java similarity index 98% rename from open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/properties/TemplateClassificationProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/templates/TemplateClassificationProperties.java index 8ca59adbb01..47d0eddf4f7 100644 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/properties/TemplateClassificationProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/templates/TemplateClassificationProperties.java @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalarchitecture.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.templates; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/templates/package-info.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/templates/package-info.java new file mode 100644 index 00000000000..2f7200da130 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/templates/package-info.java @@ -0,0 +1,7 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +/** + * Beans for managing and representing templates + */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.templates; \ No newline at end of file diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/validvalues/ReferenceValueAssignmentProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/validvalues/ReferenceValueAssignmentProperties.java new file mode 100644 index 00000000000..a6e12b0b896 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/validvalues/ReferenceValueAssignmentProperties.java @@ -0,0 +1,258 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues; + + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * ReferenceValueAssignmentProperties is a java bean used to create a link between a valid value and a referenceable item + * to enable the valid value to be used as a semiformal tag/classifier. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ReferenceValueAssignmentProperties extends RelationshipProperties +{ + private String attributeName = null; + private int confidence = 0; + private String steward = null; + private String stewardTypeName = null; + private String stewardPropertyName = null; + private String notes = null; + + + /** + * Default constructor + */ + public ReferenceValueAssignmentProperties() + { + } + + + /** + * Copy/clone constructor. Note, this is a deep copy + * + * @param template object to copy + */ + public ReferenceValueAssignmentProperties(ReferenceValueAssignmentProperties template) + { + super (template); + + if (template != null) + { + attributeName = template.getAttributeName(); + confidence = template.getConfidence(); + steward = template.getSteward(); + stewardTypeName = template.getStewardTypeName(); + stewardPropertyName = template.getStewardPropertyName(); + notes = template.getNotes(); + } + } + + + /** + * Return the name of the attribute that this reference data value represents. + * + * @return string + */ + public String getAttributeName() + { + return attributeName; + } + + + /** + * Set up the name of the attribute that this reference data value represents. + * + * @param attributeName string + */ + public void setAttributeName(String attributeName) + { + this.attributeName = attributeName; + } + + + /** + * Return the confidence level (0-100) that the mapping is correct. + * + * @return int + */ + public int getConfidence() + { + return confidence; + } + + + /** + * Set up the confidence level (0-100) that the mapping is correct. + * + * @param confidence int + */ + public void setConfidence(int confidence) + { + this.confidence = confidence; + } + + + /** + * Returns the id of the steward responsible for the mapping. + * + * @return String id + */ + public String getSteward() + { + return steward; + } + + + /** + * Set up the id of the steward responsible for the mapping. + * + * @param steward String id + */ + public void setSteward(String steward) + { + this.steward = steward; + } + + + /** + * Return the type of element that describes the steward. + * + * @return type name + */ + public String getStewardTypeName() + { + return stewardTypeName; + } + + + /** + * Set up the type of element that describes the steward. + * + * @param stewardTypeName type name + */ + public void setStewardTypeName(String stewardTypeName) + { + this.stewardTypeName = stewardTypeName; + } + + + /** + * Return the name of the property that holds the steward's identifier. + * + * @return property name + */ + public String getStewardPropertyName() + { + return stewardPropertyName; + } + + + /** + * Set up the name of the property that holds the steward's identifier. + * + * @param stewardPropertyName property name + */ + public void setStewardPropertyName(String stewardPropertyName) + { + this.stewardPropertyName = stewardPropertyName; + } + + + /** + * Return the additional values associated with the symbolic name. + * + * @return string text + */ + public String getNotes() + { + return notes; + } + + + /** + * Set up the additional values associated with the symbolic name. + * + * @param notes string text + */ + public void setNotes(String notes) + { + this.notes = notes; + } + + + /** + * Standard toString method. + * + * @return print out of variables in a JSON-style + */ + @Override + public String toString() + { + return "ReferenceValueAssignmentProperties{" + + "confidence=" + confidence + + ", attributeName='" + attributeName + '\'' + + ", steward='" + steward + '\'' + + ", stewardTypeName='" + stewardTypeName + '\'' + + ", stewardPropertyName='" + stewardPropertyName + '\'' + + ", notes='" + notes + '\'' + + ", effectiveFrom=" + getEffectiveFrom() + + ", effectiveTo=" + getEffectiveTo() + + ", extendedProperties=" + getExtendedProperties() + + '}'; + } + + + /** + * Compare the values of the supplied object with those stored in the current object. + * + * @param objectToCompare supplied object + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (! super.equals(objectToCompare)) + { + return false; + } + ReferenceValueAssignmentProperties that = (ReferenceValueAssignmentProperties) objectToCompare; + return confidence == that.confidence && + Objects.equals(attributeName, that.attributeName) && + Objects.equals(steward, that.steward) && + Objects.equals(stewardTypeName, that.stewardTypeName) && + Objects.equals(stewardPropertyName, that.stewardPropertyName) && + Objects.equals(notes, that.notes); + } + + + /** + * Return hash code based on properties. + * + * @return int + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), confidence, steward, stewardTypeName, stewardPropertyName, notes); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/validvalues/ValidValueAssignmentProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/validvalues/ValidValueAssignmentProperties.java new file mode 100644 index 00000000000..f14808825d3 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/validvalues/ValidValueAssignmentProperties.java @@ -0,0 +1,122 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * ValidValueAssignmentProperties describes the properties between a referenceable and its valid values. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ValidValueAssignmentProperties extends RelationshipProperties +{ + private boolean strictRequirement = true; + + + /** + * Default constructor + */ + public ValidValueAssignmentProperties() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public ValidValueAssignmentProperties(ValidValueAssignmentProperties template) + { + super(template); + + if (template != null) + { + strictRequirement = template.getStrictRequirement(); + } + } + + + /** + * Return the strict requirement flag. + * + * @return boolean + */ + public boolean getStrictRequirement() + { + return strictRequirement; + } + + + /** + * Set up the strict requirement flag. + * + * @param strictRequirement string type name + */ + public void setStrictRequirement(boolean strictRequirement) + { + this.strictRequirement = strictRequirement; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + + @Override + public String toString() + { + return "ValidValueAssignmentProperties{" + + "effectiveFrom=" + getEffectiveFrom() + + ", effectiveTo=" + getEffectiveTo() + + ", extendedProperties=" + getExtendedProperties() + + ", strictRequirement=" + strictRequirement + + '}'; + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + ValidValueAssignmentProperties that = (ValidValueAssignmentProperties) objectToCompare; + return strictRequirement == that.strictRequirement; + } + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(strictRequirement); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/validvalues/ValidValueMembershipProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/validvalues/ValidValueMembershipProperties.java new file mode 100644 index 00000000000..07748f101b5 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/validvalues/ValidValueMembershipProperties.java @@ -0,0 +1,127 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues; + + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * ValidValueMembershipProperties provides a flag to indicate if this value is the default value for the set. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ValidValueMembershipProperties extends RelationshipProperties +{ + boolean isDefaultValue = false; + + /** + * Default constructor + */ + public ValidValueMembershipProperties() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public ValidValueMembershipProperties(ValidValueMembershipProperties template) + { + super(template); + + if (template != null) + { + this.isDefaultValue = template.getDefaultValue(); + } + } + + + /** + * Return whether it is a default value. + * + * @return flag + */ + public boolean getDefaultValue() + { + return isDefaultValue; + } + + + /** + * Set up whether it is a default value. + * + * @param defaultValue flag + */ + public void setDefaultValue(boolean defaultValue) + { + this.isDefaultValue = defaultValue; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "ValidValueMembershipProperties{" + + "effectiveFrom=" + getEffectiveFrom() + + ", effectiveTo=" + getEffectiveTo() + + ", extendedProperties=" + getExtendedProperties() + + ", isDefaultValue=" + isDefaultValue + + ", defaultValue=" + getDefaultValue() + + '}'; + } + + + /** + * Compare the values of the supplied object with those stored in the current object. + * + * @param objectToCompare supplied object + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (! super.equals(objectToCompare)) + { + return false; + } + ValidValueMembershipProperties that = (ValidValueMembershipProperties) objectToCompare; + return isDefaultValue == that.isDefaultValue; + } + + + /** + * Return hash code based on properties. + * + * @return int + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), isDefaultValue); + } +} diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/validvalues/ValidValueProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/validvalues/ValidValueProperties.java new file mode 100644 index 00000000000..94b21398e75 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/validvalues/ValidValueProperties.java @@ -0,0 +1,336 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ReferenceableProperties; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * ValidValueProperties provides the common super class for ValidValueSet and ValidValueDefinition. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class ValidValueProperties extends ReferenceableProperties +{ + private String displayName = null; + private String description = null; + private String usage = null; + private String scope = null; + private String category = null; + private String preferredValue = null; + private String dataType = null; + private boolean isDeprecated = false; + private boolean isCaseSensitive = false; + + + /** + * Constructor + */ + public ValidValueProperties() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public ValidValueProperties(ValidValueProperties template) + { + super(template); + + if (template != null) + { + displayName = template.getDisplayName(); + description = template.getDescription(); + usage = template.getUsage(); + scope = template.getScope(); + category = template.getCategory(); + preferredValue = template.getPreferredValue(); + dataType = template.getDataType(); + isDeprecated = template.getIsDeprecated(); + isCaseSensitive = template.getIsCaseSensitive(); + } + } + + + /** + * Returns the stored display name property for the valid value. + * If no display name is available then null is returned. + * + * @return String name + */ + public String getDisplayName() + { + return displayName; + } + + + /** + * Set up the stored display name property for the valid value. + * + * @param displayName String name + */ + public void setDisplayName(String displayName) + { + this.displayName = displayName; + } + + + /** + * Returns the stored description property for the valid value. + * If no description is provided then null is returned. + * + * @return description String text + */ + public String getDescription() + { + return description; + } + + + /** + * Set up the stored description property associated with the valid value. + * + * @param description String text + */ + public void setDescription(String description) + { + this.description = description; + } + + + /** + * Return the description of how this valid value should be used. + * + * @return String text + */ + public String getUsage() + { + return usage; + } + + + /** + * Set up the description of how this valid value should be used. + * + * @param usage String text + */ + public void setUsage(String usage) + { + this.usage = usage; + } + + + /** + * Return the scope of values that this valid value covers (normally used with sets) + * + * @return String text + */ + public String getScope() + { + return scope; + } + + + /** + * Set up the scope of values that this valid value covers (normally used with sets) + * + * @param scope String text + */ + public void setScope(String scope) + { + this.scope = scope; + } + + + /** + * Return the category of reference data. + * + * @return string name + */ + public String getCategory() + { + return category; + } + + + /** + * Set up the category of reference data. + * + * @param category string name + */ + public void setCategory(String category) + { + this.category = category; + } + + + /** + * Return the preferred values to use in implementations (normally used with definitions) + * + * @return String value + */ + public String getPreferredValue() + { + return preferredValue; + } + + + /** + * Set up the preferred values to use in implementations (normally used with definitions) + * + * @param preferredValue String value + */ + public void setPreferredValue(String preferredValue) + { + this.preferredValue = preferredValue; + } + + + /** + * Returns the data type of the preferred value. + * + * @return string + */ + public String getDataType() + { + return dataType; + } + + + /** + * Set up the data type of the preferred value. + * + * @param dataType string + */ + public void setDataType(String dataType) + { + this.dataType = dataType; + } + + + /** + * Is the valid value deprecated? + * + * @return boolean flag + */ + public boolean getIsDeprecated() + { + return isDeprecated; + } + + + /** + * Set whether the valid value is deprecated or not. Default is false. + * + * @param deprecated boolean flag + */ + public void setIsDeprecated(boolean deprecated) + { + isDeprecated = deprecated; + } + + + /** + * Return whether this valid value is case-sensitive, or will match irrespective of case. + * + * @return boolean flag + */ + public boolean getIsCaseSensitive() + { + return isCaseSensitive; + } + + + /** + * Set up whether this valid value is case-sensitive, or will match irrespective of case. + * + * @param caseSensitive boolean flag + */ + public void setIsCaseSensitive(boolean caseSensitive) + { + isCaseSensitive = caseSensitive; + } + + + /** + * Generate a string containing the properties. + * + * @return string value + */ + @Override + public String toString() + { + return "ValidValueProperties{" + + "displayName='" + displayName + '\'' + + ", description='" + description + '\'' + + ", usage='" + usage + '\'' + + ", scope='" + scope + '\'' + + ", category='" + category + '\'' + + ", preferredValue='" + preferredValue + '\'' + + ", dataType='" + dataType + '\'' + + ", isDeprecated=" + isDeprecated + + ", isCaseSensitive=" + isCaseSensitive + + ", typeName='" + getTypeName() + '\'' + + ", qualifiedName='" + getQualifiedName() + '\'' + + ", additionalProperties=" + getAdditionalProperties() + + ", extendedProperties=" + getExtendedProperties() + + '}'; + } + + + /** + * Compare the values of the supplied object with those stored in the current object. + * + * @param objectToCompare supplied object + * @return boolean result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + ValidValueProperties that = (ValidValueProperties) objectToCompare; + return Objects.equals(displayName, that.displayName) && + Objects.equals(description, that.description) && + Objects.equals(usage, that.usage) && + Objects.equals(scope, that.scope) && + Objects.equals(category, that.category) && + Objects.equals(isDeprecated, that.isDeprecated) && + Objects.equals(isCaseSensitive, that.isCaseSensitive) && + Objects.equals(preferredValue, that.preferredValue) && + Objects.equals(dataType, that.dataType); + } + + + /** + * Return hash code based on properties. + * + * @return int + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), displayName, description, usage, scope, category, preferredValue, dataType, isDeprecated, isCaseSensitive); + } +} diff --git a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/ValidValueSetProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/validvalues/ValidValueSetProperties.java similarity index 89% rename from open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/ValidValueSetProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/validvalues/ValidValueSetProperties.java index 6dd54d18b6e..415608d105e 100644 --- a/open-metadata-implementation/access-services/data-manager/data-manager-api/src/main/java/org/odpi/openmetadata/accessservices/datamanager/properties/ValidValueSetProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/validvalues/ValidValueSetProperties.java @@ -1,10 +1,11 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.datamanager.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ReferenceableProperties; import java.util.Objects; @@ -270,20 +271,16 @@ public void setIsDeprecated(boolean deprecated) public String toString() { return "ValidValueSetProperties{" + - "displayName='" + displayName + '\'' + - ", description='" + description + '\'' + - ", category='" + category + '\'' + - ", usage='" + usage + '\'' + - ", scope='" + scope + '\'' + - ", preferredValue='" + preferredValue + '\'' + - ", dataType='" + dataType + '\'' + - ", isDeprecated=" + isDeprecated + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; + "displayName='" + displayName + '\'' + + ", description='" + description + '\'' + + ", category='" + category + '\'' + + ", usage='" + usage + '\'' + + ", scope='" + scope + '\'' + + ", preferredValue='" + preferredValue + '\'' + + ", dataType='" + dataType + '\'' + + ", isDeprecated=" + isDeprecated + + ", isCaseSensitive=" + isCaseSensitive + + "} " + super.toString(); } diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/properties/ValidValuesImplProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/validvalues/ValidValuesImplProperties.java similarity index 96% rename from open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/properties/ValidValuesImplProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/validvalues/ValidValuesImplProperties.java index b448b1ac208..ffce63122da 100644 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/properties/ValidValuesImplProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/validvalues/ValidValuesImplProperties.java @@ -1,12 +1,13 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalarchitecture.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; import java.util.*; diff --git a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/properties/ValidValuesMappingProperties.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/validvalues/ValidValuesMappingProperties.java similarity index 97% rename from open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/properties/ValidValuesMappingProperties.java rename to open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/validvalues/ValidValuesMappingProperties.java index e1d5c795d3b..f567fa8052b 100644 --- a/open-metadata-implementation/access-services/digital-architecture/digital-architecture-api/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/properties/ValidValuesMappingProperties.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/validvalues/ValidValuesMappingProperties.java @@ -1,12 +1,13 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.accessservices.digitalarchitecture.properties; +package org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; import java.util.Objects; diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/validvalues/package-info.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/validvalues/package-info.java new file mode 100644 index 00000000000..8393511fc31 --- /dev/null +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/properties/validvalues/package-info.java @@ -0,0 +1,7 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +/** + * Beans for valid values + */ +package org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues; \ No newline at end of file diff --git a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/types/OpenMetadataProperty.java b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/types/OpenMetadataProperty.java index 64efb1645f6..482a21ec706 100644 --- a/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/types/OpenMetadataProperty.java +++ b/open-metadata-implementation/frameworks/open-metadata-framework/src/main/java/org/odpi/openmetadata/frameworks/openmetadata/types/OpenMetadataProperty.java @@ -93,9 +93,9 @@ public enum OpenMetadataProperty ANCHOR_DOMAIN_NAME("anchorDomainName", "string", "Unique name of the domain of the anchor. This is an Open Metadata Type Name that either directly inherits from OpenMetadataRoot or Referenceable.", "Asset", "00ba532f-792f-4b78-8940-b5a9fd72f854"), /** - * Unique identifier for the entity. + * Unique name for the element. */ - QUALIFIED_NAME("qualifiedName", "string", "Unique identifier for the entity.", "SoftwareServer:MyAsset:MyAssetName", "e31e5b9b-0f96-42a9-8e67-0e3fc66ad305"), + QUALIFIED_NAME("qualifiedName", "string", "Unique name for the element.", "SoftwareServer:MyAsset:MyAssetName", "e31e5b9b-0f96-42a9-8e67-0e3fc66ad305"), /** * Additional properties for the element. @@ -103,9 +103,15 @@ public enum OpenMetadataProperty ADDITIONAL_PROPERTIES("additionalProperties", "map", "Additional properties for the element.", null, "534b5665-73d4-4bdc-b83b-1a8fed19dba3"), /** - * Unique identifier for the entity. + * Name that the element is known as - not necessarily unique. */ - NAME("name", "string", "Name that the element is known as - not necessarily unique.", "MyAssetName", "c075e0e7-8ecc-4f81-9ac4-ca3662c3ebe4"), + NAME("name", "string", "Short name that the element is known as - not necessarily unique.", "MyAssetName", "c075e0e7-8ecc-4f81-9ac4-ca3662c3ebe4"), + + /** + * Full name that the element is known as in the owning deployed technology. + */ + RESOURCE_NAME("resourceName", "string", "Full name that the element is known as in the owning deployed technology. This name is typically unique within the scope of the owing technology", "MyAssetName", "c075e0e7-8ecc-4f81-9ac4-ca3662c3ebe4"), + /** * Display name of the element used for summary tables and titles @@ -357,6 +363,16 @@ public enum OpenMetadataProperty */ DATA_TYPE("dataType", "string", "The name of a primitive data type.", null, "50e73f9f-10a0-4b41-9cb6-bf55630f3734"), + /** + * The default value of a primitive data type. + */ + DEFAULT_VALUE("defaultValue", "string", "The default value of a primitive data type.", null, "e2ac5648-054c-492f-9818-bb1c55554bd6"), + + /** + * The value of a literal data type. + */ + FIXED_VALUE("fixedValue", "string", "The value of a literal data type.", null, "bd0b89c3-d865-4b62-bd86-a06b3fad08fb"), + /** * Position of the element in a collection of relationships. */ diff --git a/open-metadata-implementation/frameworks/survey-action-framework/src/main/java/org/odpi/openmetadata/frameworks/surveyaction/AnnotationStore.java b/open-metadata-implementation/frameworks/survey-action-framework/src/main/java/org/odpi/openmetadata/frameworks/surveyaction/AnnotationStore.java index 2f6b314fdb8..14dc705b7f5 100644 --- a/open-metadata-implementation/frameworks/survey-action-framework/src/main/java/org/odpi/openmetadata/frameworks/surveyaction/AnnotationStore.java +++ b/open-metadata-implementation/frameworks/survey-action-framework/src/main/java/org/odpi/openmetadata/frameworks/surveyaction/AnnotationStore.java @@ -7,7 +7,7 @@ import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStatus; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ElementStatus; import org.odpi.openmetadata.frameworks.governanceaction.client.OpenMetadataClient; import org.odpi.openmetadata.frameworks.governanceaction.converters.OpenMetadataConverterBase; import org.odpi.openmetadata.frameworks.governanceaction.properties.OpenMetadataElement; diff --git a/open-metadata-implementation/frameworks/survey-action-framework/src/main/java/org/odpi/openmetadata/frameworks/surveyaction/converters/SurveyReportConverter.java b/open-metadata-implementation/frameworks/survey-action-framework/src/main/java/org/odpi/openmetadata/frameworks/surveyaction/converters/SurveyReportConverter.java new file mode 100644 index 00000000000..2522741b2e0 --- /dev/null +++ b/open-metadata-implementation/frameworks/survey-action-framework/src/main/java/org/odpi/openmetadata/frameworks/surveyaction/converters/SurveyReportConverter.java @@ -0,0 +1,98 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ +package org.odpi.openmetadata.frameworks.surveyaction.converters; + +import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; +import org.odpi.openmetadata.frameworks.governanceaction.converters.OpenMetadataConverterBase; +import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; +import org.odpi.openmetadata.frameworks.governanceaction.properties.OpenMetadataElement; +import org.odpi.openmetadata.frameworks.governanceaction.properties.RelatedMetadataElement; +import org.odpi.openmetadata.frameworks.governanceaction.search.ElementProperties; +import org.odpi.openmetadata.frameworks.governanceaction.search.PropertyHelper; +import org.odpi.openmetadata.frameworks.surveyaction.properties.SurveyReport; + +import java.util.List; + + +/** + * SurveyReportConverter converts GAF elements into a survey report bean. + */ +public class SurveyReportConverter extends OpenMetadataConverterBase +{ + /** + * Constructor + * + * @param propertyHelper helper object to parse entity + * @param serviceName name of this component + * @param serverName local server name + */ + public SurveyReportConverter(PropertyHelper propertyHelper, + String serviceName, + String serverName) + { + super(propertyHelper, serviceName, serverName); + } + + + /** + * Using the supplied instances, return a new instance of the SurveyReport bean. + * + * @param beanClass class of bean that has been requested + * @param primaryElement entity that is the root of the collection of entities that make up the + * content of the bean + * @param relationships relationships linking the entities + * @param methodName calling method + * @return bean populated with properties from the instances supplied in the constructor + * @throws PropertyServerException there is a problem instantiating the bean + */ + public SurveyReport getSurveyReport(Class beanClass, + OpenMetadataElement primaryElement, + List relationships, + String methodName) throws PropertyServerException + { + if (propertyHelper.isTypeOf(primaryElement, OpenMetadataType.SURVEY_REPORT.typeName)) + { + SurveyReport surveyReport = new SurveyReport(); + surveyReport.setElementHeader(this.getMetadataElementHeader(beanClass, primaryElement, methodName)); + + + ElementProperties elementProperties = null; + if (primaryElement.getElementProperties() != null) + { + elementProperties = new ElementProperties(primaryElement.getElementProperties()); + } + + surveyReport.setQualifiedName(super.removeQualifiedName(elementProperties)); + surveyReport.setDisplayName(super.removeDisplayName(elementProperties)); + surveyReport.setDescription(super.removeDescription(elementProperties)); + surveyReport.setPurpose(super.removePurpose(elementProperties)); + surveyReport.setUser(super.removeUser(elementProperties)); + surveyReport.setAnalysisParameters(super.removeAnalysisParameters(elementProperties)); + surveyReport.setAssetGUID(super.removeAssetGUID(elementProperties)); + surveyReport.setAnalysisStep(super.removeAnalysisStep(elementProperties)); + surveyReport.setStartDate(super.removeStartDate(elementProperties)); + surveyReport.setCompletionDate(super.removeCompletionDate(elementProperties)); + surveyReport.setCompletionMessage(super.removeCompletionMessage(elementProperties)); + surveyReport.setAdditionalProperties(super.removeAdditionalProperties(elementProperties)); + + surveyReport.setExtendedProperties(this.getRemainingExtendedProperties(elementProperties)); + + if (relationships != null) + { + for (RelatedMetadataElement relationship : relationships) + { + if (relationship != null) + { + if (propertyHelper.isTypeOf(relationship, OpenMetadataType.ENGINE_ACTION_SURVEY_REPORT_RELATIONSHIP.typeName)) + { + surveyReport.setEngineActionGUID(relationship.getElement().getElementGUID()); + break; + } + } + } + } + } + + return null; + } +} diff --git a/open-metadata-implementation/frameworks/survey-action-framework/src/main/java/org/odpi/openmetadata/frameworks/surveyaction/properties/PropertyBase.java b/open-metadata-implementation/frameworks/survey-action-framework/src/main/java/org/odpi/openmetadata/frameworks/surveyaction/properties/PropertyBase.java index fd5d419d8e8..e28f1c069bf 100644 --- a/open-metadata-implementation/frameworks/survey-action-framework/src/main/java/org/odpi/openmetadata/frameworks/surveyaction/properties/PropertyBase.java +++ b/open-metadata-implementation/frameworks/survey-action-framework/src/main/java/org/odpi/openmetadata/frameworks/surveyaction/properties/PropertyBase.java @@ -3,9 +3,8 @@ package org.odpi.openmetadata.frameworks.surveyaction.properties; import com.fasterxml.jackson.annotation.*; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; -import java.util.HashMap; import java.util.Map; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; diff --git a/open-metadata-implementation/frameworks/survey-action-framework/src/test/java/org/odpi/openmetadata/frameworks/surveyaction/properties/AnnotationTest.java b/open-metadata-implementation/frameworks/survey-action-framework/src/test/java/org/odpi/openmetadata/frameworks/surveyaction/properties/AnnotationTest.java index 1992077ed7a..330ba9ce3df 100644 --- a/open-metadata-implementation/frameworks/survey-action-framework/src/test/java/org/odpi/openmetadata/frameworks/surveyaction/properties/AnnotationTest.java +++ b/open-metadata-implementation/frameworks/survey-action-framework/src/test/java/org/odpi/openmetadata/frameworks/surveyaction/properties/AnnotationTest.java @@ -3,8 +3,8 @@ package org.odpi.openmetadata.frameworks.surveyaction.properties; import com.fasterxml.jackson.databind.ObjectMapper; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementClassification; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementType; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementClassification; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementType; import org.testng.annotations.Test; import java.util.*; diff --git a/open-metadata-implementation/governance-server-services/lineage-warehouse-services/lineage-warehouse-services-server/build.gradle b/open-metadata-implementation/governance-server-services/lineage-warehouse-services/lineage-warehouse-services-server/build.gradle index 5747bf65cdc..3b332cd311f 100644 --- a/open-metadata-implementation/governance-server-services/lineage-warehouse-services/lineage-warehouse-services-server/build.gradle +++ b/open-metadata-implementation/governance-server-services/lineage-warehouse-services/lineage-warehouse-services-server/build.gradle @@ -8,6 +8,7 @@ dependencies { implementation project(':open-metadata-implementation:common-services:ffdc-services') implementation 'org.quartz-scheduler:quartz' implementation project(':open-metadata-implementation:admin-services:admin-services-api') + implementation project(':open-metadata-implementation:frameworks:open-metadata-framework') implementation project(':open-metadata-implementation:frameworks:open-connector-framework') implementation 'com.fasterxml.jackson.core:jackson-databind' implementation project(':open-metadata-implementation:repository-services:repository-services-apis') diff --git a/open-metadata-implementation/governance-server-services/lineage-warehouse-services/lineage-warehouse-services-server/src/main/java/org/odpi/openmetadata/governanceservers/lineagewarehouse/admin/LineageWarehouseOperationalServices.java b/open-metadata-implementation/governance-server-services/lineage-warehouse-services/lineage-warehouse-services-server/src/main/java/org/odpi/openmetadata/governanceservers/lineagewarehouse/admin/LineageWarehouseOperationalServices.java index 2db9a4b2cd9..eccae174930 100644 --- a/open-metadata-implementation/governance-server-services/lineage-warehouse-services/lineage-warehouse-services-server/src/main/java/org/odpi/openmetadata/governanceservers/lineagewarehouse/admin/LineageWarehouseOperationalServices.java +++ b/open-metadata-implementation/governance-server-services/lineage-warehouse-services/lineage-warehouse-services-server/src/main/java/org/odpi/openmetadata/governanceservers/lineagewarehouse/admin/LineageWarehouseOperationalServices.java @@ -283,7 +283,7 @@ private Connector getConnector(Connection connection, LineageWarehouseErrorCode /** * Call the initialize() and start() method for all applicable connectors used by the Open Lineage Services. * - * @throws OMAGConfigurationErrorException + * @throws OMAGConfigurationErrorException config error */ private void initializeAndStartConnectors() throws OMAGConfigurationErrorException, InvalidParameterException { initializeGraphConnectorDB( diff --git a/open-metadata-implementation/integration-services/api-integrator/api-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/api/connector/APIIntegratorContext.java b/open-metadata-implementation/integration-services/api-integrator/api-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/api/connector/APIIntegratorContext.java index 821d3443907..8f227ceb4a8 100644 --- a/open-metadata-implementation/integration-services/api-integrator/api-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/api/connector/APIIntegratorContext.java +++ b/open-metadata-implementation/integration-services/api-integrator/api-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/api/connector/APIIntegratorContext.java @@ -8,14 +8,25 @@ import org.odpi.openmetadata.accessservices.datamanager.client.ConnectionManagerClient; import org.odpi.openmetadata.accessservices.datamanager.client.DataManagerEventClient; import org.odpi.openmetadata.accessservices.datamanager.client.ValidValueManagement; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.*; import org.odpi.openmetadata.accessservices.datamanager.properties.*; import org.odpi.openmetadata.frameworks.governanceaction.client.GovernanceConfiguration; import org.odpi.openmetadata.frameworks.openmetadata.enums.PermittedSynchronization; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.apis.APIProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.EndpointProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.apis.APIOperationProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.apis.APIParameterListProperties; +import org.odpi.openmetadata.frameworks.openmetadata.enums.APIParameterListType; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.apis.APIParameterProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues.ReferenceValueAssignmentProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues.ValidValueAssignmentProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues.ValidValueMembershipProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues.ValidValueProperties; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.*; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; import org.odpi.openmetadata.frameworks.governanceaction.client.OpenMetadataClient; import org.odpi.openmetadata.frameworks.integration.client.OpenIntegrationClient; import org.odpi.openmetadata.frameworks.integration.context.IntegrationContext; @@ -874,7 +885,7 @@ public APIOperationElement getAPIOperationByGUID(String guid) throws InvalidPara * @throws PropertyServerException there is a problem reported in the open metadata server(s) */ public String createAPIParameterList(String apiOperationGUID, - APIParameterListType parameterListType, + APIParameterListType parameterListType, APIParameterListProperties properties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException diff --git a/open-metadata-implementation/integration-services/api-integrator/api-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/api/contextmanager/APIIntegratorContextManager.java b/open-metadata-implementation/integration-services/api-integrator/api-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/api/contextmanager/APIIntegratorContextManager.java index a661a5697a6..3bf41954b7c 100644 --- a/open-metadata-implementation/integration-services/api-integrator/api-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/api/contextmanager/APIIntegratorContextManager.java +++ b/open-metadata-implementation/integration-services/api-integrator/api-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/api/contextmanager/APIIntegratorContextManager.java @@ -5,7 +5,7 @@ import org.odpi.openmetadata.accessservices.datamanager.client.*; import org.odpi.openmetadata.accessservices.datamanager.client.rest.DataManagerRESTClient; -import org.odpi.openmetadata.accessservices.datamanager.properties.APIManagerProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities.APIManagerProperties; import org.odpi.openmetadata.frameworks.openmetadata.enums.PermittedSynchronization; import org.odpi.openmetadata.frameworks.openmetadata.refdata.DeployedImplementationType; import org.odpi.openmetadata.frameworks.integration.context.*; diff --git a/open-metadata-implementation/integration-services/catalog-integrator/catalog-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/catalog/connector/CatalogIntegratorContext.java b/open-metadata-implementation/integration-services/catalog-integrator/catalog-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/catalog/connector/CatalogIntegratorContext.java index cb0f62eeef6..447049136a4 100644 --- a/open-metadata-implementation/integration-services/catalog-integrator/catalog-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/catalog/connector/CatalogIntegratorContext.java +++ b/open-metadata-implementation/integration-services/catalog-integrator/catalog-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/catalog/connector/CatalogIntegratorContext.java @@ -16,9 +16,9 @@ import org.odpi.openmetadata.accessservices.assetmanager.client.exchange.LineageExchangeClient; import org.odpi.openmetadata.accessservices.assetmanager.client.exchange.StewardshipExchangeClient; import org.odpi.openmetadata.accessservices.assetmanager.client.exchange.ValidValuesExchangeClient; +import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.CorrelatedMetadataElement; import org.odpi.openmetadata.frameworks.governanceaction.client.GovernanceConfiguration; import org.odpi.openmetadata.frameworks.governanceaction.properties.MetadataCorrelationHeader; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.MetadataElement; import org.odpi.openmetadata.frameworks.governanceaction.properties.ExternalIdentifierProperties; import org.odpi.openmetadata.frameworks.openmetadata.enums.PermittedSynchronization; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; @@ -447,7 +447,7 @@ public boolean isListenerRegistered() * @return metadata correlation header or null if the element does not have a matching correlation header * @throws InvalidParameterException the element passed is null */ - public MetadataCorrelationHeader getMetadataCorrelationHeader(MetadataElement retrievedElement) throws InvalidParameterException + public MetadataCorrelationHeader getMetadataCorrelationHeader(CorrelatedMetadataElement retrievedElement) throws InvalidParameterException { final String methodName = "getMetadataCorrelationHeader"; final String parameterName = "retrievedElement"; diff --git a/open-metadata-implementation/integration-services/catalog-integrator/catalog-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/catalog/connector/ConnectionExchangeService.java b/open-metadata-implementation/integration-services/catalog-integrator/catalog-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/catalog/connector/ConnectionExchangeService.java index f35456ef547..05d3789ebbc 100644 --- a/open-metadata-implementation/integration-services/catalog-integrator/catalog-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/catalog/connector/ConnectionExchangeService.java +++ b/open-metadata-implementation/integration-services/catalog-integrator/catalog-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/catalog/connector/ConnectionExchangeService.java @@ -15,6 +15,11 @@ import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; import org.odpi.openmetadata.frameworks.governanceaction.properties.ExternalIdentifierProperties; import org.odpi.openmetadata.frameworks.openmetadata.enums.PermittedSynchronization; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.AssetConnectionProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.ConnectionProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.ConnectorTypeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.EmbeddedConnectionProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.EndpointProperties; import org.odpi.openmetadata.integrationservices.catalog.ffdc.CatalogIntegratorErrorCode; import java.util.Date; diff --git a/open-metadata-implementation/integration-services/catalog-integrator/catalog-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/catalog/connector/DataAssetExchangeService.java b/open-metadata-implementation/integration-services/catalog-integrator/catalog-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/catalog/connector/DataAssetExchangeService.java index f90c46ccea6..6fee5688ef7 100644 --- a/open-metadata-implementation/integration-services/catalog-integrator/catalog-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/catalog/connector/DataAssetExchangeService.java +++ b/open-metadata-implementation/integration-services/catalog-integrator/catalog-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/catalog/connector/DataAssetExchangeService.java @@ -6,7 +6,6 @@ import org.odpi.openmetadata.accessservices.assetmanager.client.exchange.DataAssetExchangeClient; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.DataAssetElement; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.RelationshipElement; import org.odpi.openmetadata.accessservices.assetmanager.properties.*; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; @@ -14,6 +13,9 @@ import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; import org.odpi.openmetadata.frameworks.governanceaction.properties.ExternalIdentifierProperties; import org.odpi.openmetadata.frameworks.openmetadata.enums.PermittedSynchronization; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.RelationshipElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.DataAssetProperties; import org.odpi.openmetadata.integrationservices.catalog.ffdc.CatalogIntegratorErrorCode; import java.util.Date; diff --git a/open-metadata-implementation/integration-services/catalog-integrator/catalog-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/catalog/connector/ExternalReferenceExchangeService.java b/open-metadata-implementation/integration-services/catalog-integrator/catalog-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/catalog/connector/ExternalReferenceExchangeService.java index 5f9a901a9b8..71d6dcf1ec5 100644 --- a/open-metadata-implementation/integration-services/catalog-integrator/catalog-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/catalog/connector/ExternalReferenceExchangeService.java +++ b/open-metadata-implementation/integration-services/catalog-integrator/catalog-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/catalog/connector/ExternalReferenceExchangeService.java @@ -7,13 +7,13 @@ import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.ExternalReferenceElement; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.ExternalReferenceLinkElement; import org.odpi.openmetadata.frameworks.governanceaction.properties.ExternalIdentifierProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ExternalReferenceLinkProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ExternalReferenceProperties; import org.odpi.openmetadata.frameworks.openmetadata.enums.PermittedSynchronization; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.properties.externalreferences.ExternalReferenceLinkProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.externalreferences.ExternalReferenceProperties; import org.odpi.openmetadata.integrationservices.catalog.ffdc.CatalogIntegratorErrorCode; import java.util.Date; diff --git a/open-metadata-implementation/integration-services/catalog-integrator/catalog-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/catalog/connector/GlossaryExchangeService.java b/open-metadata-implementation/integration-services/catalog-integrator/catalog-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/catalog/connector/GlossaryExchangeService.java index ade5400c8f8..61c6a61e987 100644 --- a/open-metadata-implementation/integration-services/catalog-integrator/catalog-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/catalog/connector/GlossaryExchangeService.java +++ b/open-metadata-implementation/integration-services/catalog-integrator/catalog-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/catalog/connector/GlossaryExchangeService.java @@ -4,19 +4,19 @@ package org.odpi.openmetadata.integrationservices.catalog.connector; import org.odpi.openmetadata.accessservices.assetmanager.client.exchange.GlossaryExchangeClient; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.ExternalGlossaryLinkElement; +import org.odpi.openmetadata.frameworks.openmetadata.enums.GlossaryTermStatus; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ExternalGlossaryLinkElement; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.GlossaryCategoryElement; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.GlossaryElement; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.GlossaryTermElement; import org.odpi.openmetadata.accessservices.assetmanager.properties.*; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ActivityDescriptionProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.glossaries.*; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; import org.odpi.openmetadata.frameworks.governanceaction.properties.ExternalIdentifierProperties; import org.odpi.openmetadata.frameworks.openmetadata.enums.GlossaryTermRelationshipStatus; -import org.odpi.openmetadata.accessservices.assetmanager.properties.GlossaryTermStatus; import org.odpi.openmetadata.frameworks.openmetadata.enums.PermittedSynchronization; import org.odpi.openmetadata.integrationservices.catalog.ffdc.CatalogIntegratorErrorCode; diff --git a/open-metadata-implementation/integration-services/catalog-integrator/catalog-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/catalog/connector/LineageExchangeService.java b/open-metadata-implementation/integration-services/catalog-integrator/catalog-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/catalog/connector/LineageExchangeService.java index ab9ce162169..9b6d9613859 100644 --- a/open-metadata-implementation/integration-services/catalog-integrator/catalog-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/catalog/connector/LineageExchangeService.java +++ b/open-metadata-implementation/integration-services/catalog-integrator/catalog-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/catalog/connector/LineageExchangeService.java @@ -4,14 +4,18 @@ package org.odpi.openmetadata.integrationservices.catalog.connector; import org.odpi.openmetadata.accessservices.assetmanager.client.exchange.LineageExchangeClient; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.*; +import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.PortElement; +import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.ProcessElement; import org.odpi.openmetadata.accessservices.assetmanager.properties.*; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; import org.odpi.openmetadata.frameworks.governanceaction.properties.ExternalIdentifierProperties; -import org.odpi.openmetadata.frameworks.openmetadata.enums.PermittedSynchronization; +import org.odpi.openmetadata.frameworks.openmetadata.enums.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.processes.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.lineage.*; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; import org.odpi.openmetadata.integrationservices.catalog.ffdc.CatalogIntegratorErrorCode; import java.util.Date; diff --git a/open-metadata-implementation/integration-services/catalog-integrator/catalog-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/catalog/connector/SchemaExchangeService.java b/open-metadata-implementation/integration-services/catalog-integrator/catalog-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/catalog/connector/SchemaExchangeService.java index 47d1d287ec0..300822a68eb 100644 --- a/open-metadata-implementation/integration-services/catalog-integrator/catalog-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/catalog/connector/SchemaExchangeService.java +++ b/open-metadata-implementation/integration-services/catalog-integrator/catalog-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/catalog/connector/SchemaExchangeService.java @@ -11,10 +11,14 @@ import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; import org.odpi.openmetadata.frameworks.governanceaction.properties.ExternalIdentifierProperties; import org.odpi.openmetadata.frameworks.openmetadata.enums.KeyPattern; import org.odpi.openmetadata.frameworks.openmetadata.enums.PermittedSynchronization; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.ForeignKeyProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.SchemaAttributeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.SchemaTypeProperties; import org.odpi.openmetadata.integrationservices.catalog.ffdc.CatalogIntegratorErrorCode; import java.util.Date; diff --git a/open-metadata-implementation/integration-services/catalog-integrator/catalog-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/catalog/connector/StewardshipExchangeService.java b/open-metadata-implementation/integration-services/catalog-integrator/catalog-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/catalog/connector/StewardshipExchangeService.java index 4c6121618eb..c85315c8879 100644 --- a/open-metadata-implementation/integration-services/catalog-integrator/catalog-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/catalog/connector/StewardshipExchangeService.java +++ b/open-metadata-implementation/integration-services/catalog-integrator/catalog-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/catalog/connector/StewardshipExchangeService.java @@ -7,23 +7,18 @@ import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.AssetElement; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.GlossaryTermElement; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.GovernanceDefinitionElement; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.RelatedElement; -import org.odpi.openmetadata.accessservices.assetmanager.properties.AssetOriginProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.DataFieldQueryProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.DataFieldValuesProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.FindAssetOriginProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.GovernanceClassificationProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.OwnerProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.RetentionClassificationProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.SecurityTagsProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.SemanticAssignmentProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.SubjectAreaMemberProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.RelatedElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.AssetOriginProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.*; import org.odpi.openmetadata.frameworks.openmetadata.enums.PermittedSynchronization; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.DataFieldQueryProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.DataFieldValuesProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.security.SecurityTagsProperties; import org.odpi.openmetadata.integrationservices.catalog.ffdc.CatalogIntegratorErrorCode; import java.util.Date; @@ -956,12 +951,12 @@ public List getAssetsByOrigin(FindAssetOriginProperties properties * @throws UserNotAuthorizedException the user is not authorized to issue this request * @throws PropertyServerException there is a problem reported in the open metadata server(s) */ - public void addElementToSubjectArea(String elementGUID, - String externalIdentifier, - SubjectAreaMemberProperties properties, - Date effectiveTime) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException + public void addElementToSubjectArea(String elementGUID, + String externalIdentifier, + SubjectAreaClassificationProperties properties, + Date effectiveTime) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException { final String methodName = "addElementToSubjectArea"; diff --git a/open-metadata-implementation/integration-services/catalog-integrator/catalog-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/catalog/connector/ValidValuesExchangeService.java b/open-metadata-implementation/integration-services/catalog-integrator/catalog-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/catalog/connector/ValidValuesExchangeService.java index 92531d5bab2..8fe89fcce64 100644 --- a/open-metadata-implementation/integration-services/catalog-integrator/catalog-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/catalog/connector/ValidValuesExchangeService.java +++ b/open-metadata-implementation/integration-services/catalog-integrator/catalog-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/catalog/connector/ValidValuesExchangeService.java @@ -4,19 +4,16 @@ package org.odpi.openmetadata.integrationservices.catalog.connector; import org.odpi.openmetadata.accessservices.assetmanager.client.exchange.ValidValuesExchangeClient; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.ReferenceValueAssignmentDefinitionElement; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.ReferenceValueAssignmentItemElement; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.ValidValueElement; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.ValidValueMember; +import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.*; import org.odpi.openmetadata.frameworks.governanceaction.properties.ExternalIdentifierProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ReferenceValueAssignmentProperties; import org.odpi.openmetadata.frameworks.openmetadata.enums.PermittedSynchronization; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ValidValueMembershipProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ValidValueProperties; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues.ReferenceValueAssignmentProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues.ValidValueMembershipProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues.ValidValueProperties; import org.odpi.openmetadata.integrationservices.catalog.ffdc.CatalogIntegratorErrorCode; import java.util.Date; @@ -141,7 +138,7 @@ public void setForDuplicateProcessing(boolean forDuplicateProcessing) * @throws PropertyServerException the repository is not available or not working properly. */ public String createValidValueSet(ExternalIdentifierProperties externalIdentifierProperties, - ValidValueProperties validValueProperties, + ValidValueProperties validValueProperties, Date effectiveTime) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException diff --git a/open-metadata-implementation/integration-services/database-integrator/database-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/database/connector/DatabaseIntegratorContext.java b/open-metadata-implementation/integration-services/database-integrator/database-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/database/connector/DatabaseIntegratorContext.java index ee8db80bca9..267e2a5779f 100644 --- a/open-metadata-implementation/integration-services/database-integrator/database-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/database/connector/DatabaseIntegratorContext.java +++ b/open-metadata-implementation/integration-services/database-integrator/database-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/database/connector/DatabaseIntegratorContext.java @@ -8,7 +8,6 @@ import org.odpi.openmetadata.accessservices.datamanager.client.DatabaseManagerClient; import org.odpi.openmetadata.accessservices.datamanager.client.DataManagerEventClient; import org.odpi.openmetadata.accessservices.datamanager.client.ValidValueManagement; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.*; import org.odpi.openmetadata.accessservices.datamanager.properties.*; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.*; @@ -17,6 +16,11 @@ import org.odpi.openmetadata.frameworks.integration.client.OpenIntegrationClient; import org.odpi.openmetadata.frameworks.integration.context.IntegrationContext; import org.odpi.openmetadata.frameworks.openmetadata.enums.PermittedSynchronization; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.databases.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.databases.*; import java.util.List; import java.util.Map; diff --git a/open-metadata-implementation/integration-services/display-integrator/display-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/display/connector/DisplayIntegratorContext.java b/open-metadata-implementation/integration-services/display-integrator/display-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/display/connector/DisplayIntegratorContext.java index e5eaccadabf..04a220b4a32 100644 --- a/open-metadata-implementation/integration-services/display-integrator/display-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/display/connector/DisplayIntegratorContext.java +++ b/open-metadata-implementation/integration-services/display-integrator/display-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/display/connector/DisplayIntegratorContext.java @@ -6,16 +6,21 @@ import org.odpi.openmetadata.accessservices.datamanager.api.DataManagerEventListener; import org.odpi.openmetadata.accessservices.datamanager.client.DisplayApplicationClient; import org.odpi.openmetadata.accessservices.datamanager.client.DataManagerEventClient; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.*; -import org.odpi.openmetadata.accessservices.datamanager.properties.*; +import org.odpi.openmetadata.accessservices.datamanager.properties.TemplateProperties; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.*; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; import org.odpi.openmetadata.frameworks.governanceaction.client.GovernanceConfiguration; import org.odpi.openmetadata.frameworks.governanceaction.client.OpenMetadataClient; import org.odpi.openmetadata.frameworks.integration.client.OpenIntegrationClient; import org.odpi.openmetadata.frameworks.integration.context.IntegrationContext; import org.odpi.openmetadata.frameworks.openmetadata.enums.PermittedSynchronization; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.FormElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.display.FormProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.display.QueryProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.display.ReportProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.display.DataContainerProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.display.DataFieldProperties; import java.util.List; diff --git a/open-metadata-implementation/integration-services/display-integrator/display-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/display/contextmanager/DisplayIntegratorContextManager.java b/open-metadata-implementation/integration-services/display-integrator/display-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/display/contextmanager/DisplayIntegratorContextManager.java index 429c661af1e..4ce8ef02f46 100644 --- a/open-metadata-implementation/integration-services/display-integrator/display-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/display/contextmanager/DisplayIntegratorContextManager.java +++ b/open-metadata-implementation/integration-services/display-integrator/display-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/display/contextmanager/DisplayIntegratorContextManager.java @@ -5,7 +5,7 @@ import org.odpi.openmetadata.accessservices.datamanager.client.*; import org.odpi.openmetadata.accessservices.datamanager.client.rest.DataManagerRESTClient; -import org.odpi.openmetadata.accessservices.datamanager.properties.ApplicationProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities.ApplicationProperties; import org.odpi.openmetadata.frameworks.integration.context.IntegrationContext; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; diff --git a/open-metadata-implementation/integration-services/files-integrator/files-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/files/connector/FilesIntegratorContext.java b/open-metadata-implementation/integration-services/files-integrator/files-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/files/connector/FilesIntegratorContext.java index 37360f352ca..1b32b751a81 100644 --- a/open-metadata-implementation/integration-services/files-integrator/files-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/files/connector/FilesIntegratorContext.java +++ b/open-metadata-implementation/integration-services/files-integrator/files-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/files/connector/FilesIntegratorContext.java @@ -8,42 +8,20 @@ import org.odpi.openmetadata.accessservices.datamanager.client.DataManagerEventClient; import org.odpi.openmetadata.accessservices.datamanager.client.FilesAndFoldersClient; import org.odpi.openmetadata.accessservices.datamanager.client.ValidValueManagement; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.ConnectionElement; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.ConnectorTypeElement; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.DataFileElement; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.EndpointElement; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.FileFolderElement; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.RelatedElement; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.SchemaAttributeElement; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.SchemaTypeElement; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.ValidValueElement; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.ValidValueSetElement; -import org.odpi.openmetadata.accessservices.datamanager.properties.ArchiveProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.ConnectionProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.DataFileProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.EndpointProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.EnumSchemaTypeProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.FileFolderProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.LiteralSchemaTypeProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.MapSchemaTypeProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.PrimitiveSchemaTypeProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.ReferenceValueAssignmentProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.RelationshipProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.SchemaAttributeProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.SchemaTypeChoiceProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.SchemaTypeProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.StructSchemaTypeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.filesandfolders.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues.*; import org.odpi.openmetadata.accessservices.datamanager.properties.TemplateProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.ValidValueAssignmentProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.ValidValueMembershipProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.ValidValueProperties; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectionCheckedException; import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; import org.odpi.openmetadata.frameworks.governanceaction.client.GovernanceConfiguration; import org.odpi.openmetadata.frameworks.governanceaction.client.OpenMetadataClient; import org.odpi.openmetadata.frameworks.integration.client.OpenIntegrationClient; diff --git a/open-metadata-implementation/integration-services/infrastructure-integrator/infrastructure-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/infrastructure/connector/InfrastructureIntegratorContext.java b/open-metadata-implementation/integration-services/infrastructure-integrator/infrastructure-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/infrastructure/connector/InfrastructureIntegratorContext.java index 094f3f4b0ef..7e9daee03a3 100644 --- a/open-metadata-implementation/integration-services/infrastructure-integrator/infrastructure-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/infrastructure/connector/InfrastructureIntegratorContext.java +++ b/open-metadata-implementation/integration-services/infrastructure-integrator/infrastructure-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/infrastructure/connector/InfrastructureIntegratorContext.java @@ -15,25 +15,13 @@ import org.odpi.openmetadata.accessservices.itinfrastructure.client.PlatformManagerClient; import org.odpi.openmetadata.accessservices.itinfrastructure.client.ProcessManagerClient; import org.odpi.openmetadata.accessservices.itinfrastructure.client.ServerManagerClient; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.ConnectionElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.ConnectorTypeElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.ControlFlowElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.DataAssetElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.DataFlowElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.DeploymentElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.EndpointElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.HostElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.ITProfileElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.LineageMappingElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.ProcessCallElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.ProcessElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.RelatedAssetElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.ServerAssetUseElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.SoftwareCapabilityElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.SoftwareServerElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.SoftwareServerPlatformElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.UserIdentityElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.*; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ProcessStatus; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; +import org.odpi.openmetadata.accessservices.itinfrastructure.properties.TemplateProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.infrastructure.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.processes.ProcessProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.*; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectionCheckedException; import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException; @@ -47,6 +35,15 @@ import org.odpi.openmetadata.frameworks.openmetadata.enums.ServerAssetUseType; import org.odpi.openmetadata.frameworks.integration.client.OpenIntegrationClient; import org.odpi.openmetadata.frameworks.integration.context.IntegrationContext; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.ITProfileProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.DataAssetProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.EndpointProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.lineage.ControlFlowProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.lineage.DataFlowProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.lineage.LineageMappingProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.lineage.ProcessCallProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities.CapabilityDeploymentProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities.SoftwareCapabilityProperties; import java.util.Date; import java.util.List; @@ -2253,7 +2250,7 @@ public void clearBusinessSignificant(String elementGUID, */ public String setupDataFlow(String dataSupplierGUID, String dataConsumerGUID, - DataFlowProperties properties, + DataFlowProperties properties, Date effectiveTime) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException @@ -2401,7 +2398,7 @@ public List getDataFlowSuppliers(String dataConsumerGUID, */ public String setupControlFlow(String currentStepGUID, String nextStepGUID, - ControlFlowProperties properties, + ControlFlowProperties properties, Date effectiveTime) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException diff --git a/open-metadata-implementation/integration-services/lineage-integrator/lineage-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/lineage/connector/LineageIntegratorContext.java b/open-metadata-implementation/integration-services/lineage-integrator/lineage-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/lineage/connector/LineageIntegratorContext.java index cc526d129a7..d6c0437cdca 100644 --- a/open-metadata-implementation/integration-services/lineage-integrator/lineage-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/lineage/connector/LineageIntegratorContext.java +++ b/open-metadata-implementation/integration-services/lineage-integrator/lineage-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/lineage/connector/LineageIntegratorContext.java @@ -9,23 +9,33 @@ import org.odpi.openmetadata.accessservices.assetmanager.client.exchange.DataAssetExchangeClient; import org.odpi.openmetadata.accessservices.assetmanager.client.exchange.GovernanceExchangeClient; import org.odpi.openmetadata.accessservices.assetmanager.client.exchange.LineageExchangeClient; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.*; +import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.DataAssetElement; +import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.PortElement; +import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.ProcessElement; +import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.SchemaAttributeElement; +import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.SchemaTypeElement; import org.odpi.openmetadata.accessservices.assetmanager.properties.*; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ProcessStatus; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectionCheckedException; import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ProcessStatus; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; import org.odpi.openmetadata.frameworks.governanceaction.client.GovernanceConfiguration; import org.odpi.openmetadata.frameworks.governanceaction.client.OpenMetadataClient; import org.odpi.openmetadata.frameworks.openmetadata.enums.KeyPattern; import org.odpi.openmetadata.frameworks.governanceaction.properties.*; import org.odpi.openmetadata.frameworks.integration.client.OpenIntegrationClient; import org.odpi.openmetadata.frameworks.integration.context.IntegrationContext; -import org.odpi.openmetadata.frameworks.openmetadata.enums.PermittedSynchronization; +import org.odpi.openmetadata.frameworks.openmetadata.enums.*; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.DataAssetProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.processes.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.lineage.*; import org.odpi.openmetadata.integrationservices.lineage.properties.OpenLineageRunEvent; import java.util.Date; @@ -1604,7 +1614,7 @@ public SchemaAttributeElement getSchemaAttributeByGUID(String schemaAttributeGUI * @throws PropertyServerException there is a problem reported in the open metadata server(s) */ public String createProcess(boolean assetManagerIsHome, - ProcessStatus processStatus, + ProcessStatus processStatus, ProcessProperties processProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException diff --git a/open-metadata-implementation/integration-services/organization-integrator/organization-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/organization/connector/OrganizationIntegratorContext.java b/open-metadata-implementation/integration-services/organization-integrator/organization-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/organization/connector/OrganizationIntegratorContext.java index 691c251b2f6..59fe047b3ab 100644 --- a/open-metadata-implementation/integration-services/organization-integrator/organization-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/organization/connector/OrganizationIntegratorContext.java +++ b/open-metadata-implementation/integration-services/organization-integrator/organization-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/organization/connector/OrganizationIntegratorContext.java @@ -8,31 +8,20 @@ import org.odpi.openmetadata.accessservices.communityprofile.client.OrganizationManagement; import org.odpi.openmetadata.accessservices.communityprofile.client.SecurityGroupManagement; import org.odpi.openmetadata.accessservices.communityprofile.client.UserIdentityManagement; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.ActorProfileElement; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.PersonRoleAppointee; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.PersonRoleElement; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.SecurityGroupElement; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.UserIdentityElement; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ActorProfileProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.AppointmentProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ContactMethodProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ContributionRecord; -import org.odpi.openmetadata.accessservices.communityprofile.properties.PersonRoleProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ProfileIdentityProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.SecurityGroupProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.UserIdentityProperties; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectionCheckedException; import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; import org.odpi.openmetadata.frameworks.governanceaction.client.GovernanceConfiguration; import org.odpi.openmetadata.frameworks.governanceaction.client.OpenMetadataClient; import org.odpi.openmetadata.frameworks.integration.client.OpenIntegrationClient; import org.odpi.openmetadata.frameworks.integration.context.IntegrationContext; import org.odpi.openmetadata.frameworks.openmetadata.enums.PermittedSynchronization; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.security.SecurityGroupProperties; import java.util.Date; import java.util.List; @@ -536,10 +525,10 @@ public void linkPersonRoleToProfile(String personRoleGUID, * @throws PropertyServerException problem accessing property server * @throws UserNotAuthorizedException security access problem */ - public List getAppointees(String personRoleGUID, - Date effectiveTime, - int startFrom, - int pageSize) throws InvalidParameterException, + public List getAppointees(String personRoleGUID, + Date effectiveTime, + int startFrom, + int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { diff --git a/open-metadata-implementation/integration-services/security-integrator/security-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/security/connector/SecurityIntegratorContext.java b/open-metadata-implementation/integration-services/security-integrator/security-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/security/connector/SecurityIntegratorContext.java index fa70a5852b8..fa14c644bcf 100644 --- a/open-metadata-implementation/integration-services/security-integrator/security-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/security/connector/SecurityIntegratorContext.java +++ b/open-metadata-implementation/integration-services/security-integrator/security-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/security/connector/SecurityIntegratorContext.java @@ -6,25 +6,20 @@ import org.odpi.openmetadata.accessservices.securitymanager.api.SecurityManagerEventListener; import org.odpi.openmetadata.accessservices.securitymanager.client.SecurityManagerClient; import org.odpi.openmetadata.accessservices.securitymanager.client.SecurityManagerEventClient; -import org.odpi.openmetadata.accessservices.securitymanager.metadataelements.ActorProfileElement; -import org.odpi.openmetadata.accessservices.securitymanager.metadataelements.PersonRoleAppointee; -import org.odpi.openmetadata.accessservices.securitymanager.metadataelements.PersonRoleElement; -import org.odpi.openmetadata.accessservices.securitymanager.metadataelements.SecurityGroupElement; -import org.odpi.openmetadata.accessservices.securitymanager.metadataelements.UserIdentityElement; -import org.odpi.openmetadata.accessservices.securitymanager.properties.SecurityGroupProperties; -import org.odpi.openmetadata.accessservices.securitymanager.properties.UserIdentityProperties; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectionCheckedException; import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; import org.odpi.openmetadata.frameworks.governanceaction.client.GovernanceConfiguration; import org.odpi.openmetadata.frameworks.governanceaction.client.OpenMetadataClient; import org.odpi.openmetadata.frameworks.integration.client.OpenIntegrationClient; import org.odpi.openmetadata.frameworks.integration.context.IntegrationContext; import org.odpi.openmetadata.frameworks.openmetadata.enums.PermittedSynchronization; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.UserIdentityProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.security.SecurityGroupProperties; import java.util.Date; import java.util.List; @@ -504,12 +499,12 @@ public List findActorProfile(String searchString, * @throws PropertyServerException problem accessing property server * @throws UserNotAuthorizedException security access problem */ - public List getAppointees(String personRoleGUID, - Date effectiveTime, - int startFrom, - int pageSize) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException + public List getAppointees(String personRoleGUID, + Date effectiveTime, + int startFrom, + int pageSize) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException { return securityManagerClient.getAppointees(userId, personRoleGUID, effectiveTime, startFrom, pageSize); } diff --git a/open-metadata-implementation/integration-services/security-integrator/security-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/security/contextmanager/SecurityIntegratorContextManager.java b/open-metadata-implementation/integration-services/security-integrator/security-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/security/contextmanager/SecurityIntegratorContextManager.java index 0ee9c690ce9..3223da59351 100644 --- a/open-metadata-implementation/integration-services/security-integrator/security-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/security/contextmanager/SecurityIntegratorContextManager.java +++ b/open-metadata-implementation/integration-services/security-integrator/security-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/security/contextmanager/SecurityIntegratorContextManager.java @@ -5,7 +5,7 @@ import org.odpi.openmetadata.accessservices.securitymanager.client.*; import org.odpi.openmetadata.accessservices.securitymanager.client.rest.SecurityManagerRESTClient; -import org.odpi.openmetadata.accessservices.securitymanager.properties.SecurityManagerProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities.SecurityManagerProperties; import org.odpi.openmetadata.frameworks.integration.context.IntegrationContext; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; diff --git a/open-metadata-implementation/integration-services/topic-integrator/topic-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/topic/connector/TopicIntegratorContext.java b/open-metadata-implementation/integration-services/topic-integrator/topic-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/topic/connector/TopicIntegratorContext.java index 48af632e0f3..3dd8eae2b7e 100644 --- a/open-metadata-implementation/integration-services/topic-integrator/topic-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/topic/connector/TopicIntegratorContext.java +++ b/open-metadata-implementation/integration-services/topic-integrator/topic-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/topic/connector/TopicIntegratorContext.java @@ -8,46 +8,28 @@ import org.odpi.openmetadata.accessservices.datamanager.client.DataManagerEventClient; import org.odpi.openmetadata.accessservices.datamanager.client.EventBrokerClient; import org.odpi.openmetadata.accessservices.datamanager.client.ValidValueManagement; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.ConnectionElement; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.ConnectorTypeElement; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.EndpointElement; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.EventTypeElement; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.RelatedElement; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.SchemaAttributeElement; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.SchemaTypeElement; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.TopicElement; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.ValidValueElement; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.ValidValueSetElement; -import org.odpi.openmetadata.accessservices.datamanager.properties.ConnectionProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.EndpointProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.EnumSchemaTypeProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.EventTypeProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.LiteralSchemaTypeProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.MapSchemaTypeProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.PrimitiveSchemaTypeProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.ReferenceValueAssignmentProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.RelationshipProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.SchemaAttributeProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.SchemaTypeChoiceProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.SchemaTypeProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.StructSchemaTypeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.events.*; import org.odpi.openmetadata.accessservices.datamanager.properties.TemplateProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.TopicProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.ValidValueAssignmentProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.ValidValueMembershipProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.ValidValueProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.topics.*; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectionCheckedException; import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; import org.odpi.openmetadata.frameworks.governanceaction.client.GovernanceConfiguration; import org.odpi.openmetadata.frameworks.governanceaction.client.OpenMetadataClient; import org.odpi.openmetadata.frameworks.integration.client.OpenIntegrationClient; import org.odpi.openmetadata.frameworks.integration.context.IntegrationContext; import org.odpi.openmetadata.frameworks.openmetadata.enums.PermittedSynchronization; +import org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues.ValidValueMembershipProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues.ValidValueProperties; import java.util.List; import java.util.Map; diff --git a/open-metadata-implementation/platform-chassis/platform-chassis-spring/build.gradle b/open-metadata-implementation/platform-chassis/platform-chassis-spring/build.gradle index bd05341510d..891b1d19e5f 100644 --- a/open-metadata-implementation/platform-chassis/platform-chassis-spring/build.gradle +++ b/open-metadata-implementation/platform-chassis/platform-chassis-spring/build.gradle @@ -26,6 +26,7 @@ dependencies { implementation 'org.springframework:spring-beans' implementation 'org.springframework:spring-core' implementation 'org.springframework:spring-context' + compileOnly project(':open-metadata-implementation:frameworks:open-metadata-framework') implementation project(':open-metadata-implementation:frameworks:open-connector-framework') implementation project(':open-metadata-implementation:server-operations:server-operations-api') implementation project(':open-metadata-implementation:server-operations:server-operations-server') diff --git a/open-metadata-implementation/platform-services/platform-services-client/src/main/java/org/odpi/openmetadata/platformservices/client/PlatformServicesClient.java b/open-metadata-implementation/platform-services/platform-services-client/src/main/java/org/odpi/openmetadata/platformservices/client/PlatformServicesClient.java index d1a1d19d05e..1eac900a612 100644 --- a/open-metadata-implementation/platform-services/platform-services-client/src/main/java/org/odpi/openmetadata/platformservices/client/PlatformServicesClient.java +++ b/open-metadata-implementation/platform-services/platform-services-client/src/main/java/org/odpi/openmetadata/platformservices/client/PlatformServicesClient.java @@ -8,7 +8,6 @@ import org.odpi.openmetadata.adminservices.rest.OMAGServerConfigResponse; import org.odpi.openmetadata.adminservices.rest.PlatformSecurityRequestBody; import org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler; -import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; @@ -240,7 +239,7 @@ public Connection getPlatformSecurityConnection(String userId) throws UserNotAut final String methodName = "getPlatformSecurityConnection"; final String urlTemplate = platformRootURL + retrieveURLTemplatePrefix + "/security/connection"; - ConnectionResponse restResult = restClient.callConnectionGetRESTCall(methodName, urlTemplate, userId); + OCFConnectionResponse restResult = restClient.callOCFConnectionGetRESTCall(methodName, urlTemplate, userId); return restResult.getConnection(); } @@ -272,7 +271,7 @@ public ConnectorType getConnectorType(String userId, final String urlTemplate = platformRootURL + retrieveURLTemplatePrefix + "/connector-types/{1}"; - ConnectorTypeResponse restResult = restClient.callConnectorTypeGetRESTCall(methodName, urlTemplate, userId, connectorProviderClassName); + OCFConnectorTypeResponse restResult = restClient.callOCFConnectorTypeGetRESTCall(methodName, urlTemplate, userId, connectorProviderClassName); return restResult.getConnectorType(); } diff --git a/open-metadata-implementation/platform-services/platform-services-client/src/main/java/org/odpi/openmetadata/platformservices/client/PlatformServicesRESTClient.java b/open-metadata-implementation/platform-services/platform-services-client/src/main/java/org/odpi/openmetadata/platformservices/client/PlatformServicesRESTClient.java index 7af8fbc11a2..895acf8d5bd 100644 --- a/open-metadata-implementation/platform-services/platform-services-client/src/main/java/org/odpi/openmetadata/platformservices/client/PlatformServicesRESTClient.java +++ b/open-metadata-implementation/platform-services/platform-services-client/src/main/java/org/odpi/openmetadata/platformservices/client/PlatformServicesRESTClient.java @@ -4,12 +4,8 @@ import org.odpi.openmetadata.adminservices.rest.OMAGServerConfigResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.ConnectionResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.ConnectorTypeListResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.ConnectorTypeResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.FFDCRESTClient; -import org.odpi.openmetadata.commonservices.ffdc.rest.RegisteredOMAGServicesResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; +import org.odpi.openmetadata.commonservices.ffdc.rest.OCFConnectorTypeResponse; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; @@ -181,7 +177,7 @@ ServerStatusResponse callServerStatusGetRESTCall(String methodName, /** - * Issue a GET REST call that returns a ConnectorTypeResponse object. + * Issue a GET REST call that returns a OCFConnectorTypeResponse object. * * @param methodName name of the method being called. * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. @@ -192,13 +188,13 @@ ServerStatusResponse callServerStatusGetRESTCall(String methodName, * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException the repository is not available or not working properly. */ - ConnectorTypeResponse callConnectorTypeGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException + public OCFConnectorTypeResponse callOCFConnectorTypeGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException { - ConnectorTypeResponse restResult = this.callGetRESTCall(methodName, ConnectorTypeResponse.class, urlTemplate, params); + OCFConnectorTypeResponse restResult = this.callGetRESTCall(methodName, OCFConnectorTypeResponse.class, urlTemplate, params); exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); @@ -208,7 +204,7 @@ ConnectorTypeResponse callConnectorTypeGetRESTCall(String methodName, /** - * Issue a GET REST call that returns a ConnectorTypeListResponse object. + * Issue a GET REST call that returns a OCFConnectorTypesResponse object. * * @param methodName name of the method being called. * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. @@ -219,13 +215,13 @@ ConnectorTypeResponse callConnectorTypeGetRESTCall(String methodName, * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException the repository is not available or not working properly. */ - ConnectorTypeListResponse callConnectorTypeListGetRESTCall(String methodName, + OCFConnectorTypesResponse callConnectorTypeListGetRESTCall(String methodName, String urlTemplate, Object... params) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - ConnectorTypeListResponse restResult = this.callGetRESTCall(methodName, ConnectorTypeListResponse.class, urlTemplate, params); + OCFConnectorTypesResponse restResult = this.callGetRESTCall(methodName, OCFConnectorTypesResponse.class, urlTemplate, params); exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); @@ -428,24 +424,24 @@ OMAGServerConfigResponse callOMAGServerConfigGetRESTCall(String methodName, /** - * Issue a GET REST call that returns a ConnectionResponse object. + * Issue a GET REST call that returns a OCFConnectionResponse object. * * @param methodName name of the method being called. * @param urlTemplate template of the URL for the REST API call with place-holders for the parameters. * @param params a list of parameters that are slotted into the url template. * - * @return ConnectionResponse + * @return OCFConnectionResponse * @throws InvalidParameterException one of the parameters is invalid. * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException something went wrong with the REST call stack. */ - ConnectionResponse callConnectionGetRESTCall(String methodName, - String urlTemplate, - Object... params) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException + OCFConnectionResponse callOCFConnectionGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException { - ConnectionResponse restResult = this.callGetRESTCall(methodName, ConnectionResponse.class, urlTemplate, params); + OCFConnectionResponse restResult = this.callGetRESTCall(methodName, OCFConnectionResponse.class, urlTemplate, params); exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); diff --git a/open-metadata-implementation/platform-services/platform-services-server/build.gradle b/open-metadata-implementation/platform-services/platform-services-server/build.gradle index 8e4e45cdffa..1e8a2c51f5a 100644 --- a/open-metadata-implementation/platform-services/platform-services-server/build.gradle +++ b/open-metadata-implementation/platform-services/platform-services-server/build.gradle @@ -10,6 +10,7 @@ dependencies { implementation project(':open-metadata-implementation:server-operations:server-operations-server') implementation project(':open-metadata-implementation:server-operations:server-operations-api') implementation project(':open-metadata-implementation:common-services:multi-tenant') + implementation project(':open-metadata-implementation:frameworks:open-metadata-framework') implementation project(':open-metadata-implementation:frameworks:open-connector-framework') implementation project(':open-metadata-implementation:frameworks:audit-log-framework') implementation project(':open-metadata-implementation:adapters:open-connectors:connector-configuration-factory') diff --git a/open-metadata-implementation/platform-services/platform-services-server/src/main/java/org/odpi/openmetadata/platformservices/server/OMAGServerPlatformActiveServices.java b/open-metadata-implementation/platform-services/platform-services-server/src/main/java/org/odpi/openmetadata/platformservices/server/OMAGServerPlatformActiveServices.java index 557dae85c24..8a249101956 100644 --- a/open-metadata-implementation/platform-services/platform-services-server/src/main/java/org/odpi/openmetadata/platformservices/server/OMAGServerPlatformActiveServices.java +++ b/open-metadata-implementation/platform-services/platform-services-server/src/main/java/org/odpi/openmetadata/platformservices/server/OMAGServerPlatformActiveServices.java @@ -272,14 +272,14 @@ public RegisteredOMAGServicesResponse getAllRegisteredServices(String userId) * @param connectorProviderClassName name of the connector provider class * @return ConnectorType bean or exceptions that occur when trying to create the connector */ - public ConnectorTypeResponse getConnectorType(String userId, - String connectorProviderClassName) + public OCFConnectorTypeResponse getConnectorType(String userId, + String connectorProviderClassName) { final String methodName = "getConnectorType"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - ConnectorTypeResponse response = new ConnectorTypeResponse(); + OCFConnectorTypeResponse response = new OCFConnectorTypeResponse(); try { diff --git a/open-metadata-implementation/platform-services/platform-services-spring/build.gradle b/open-metadata-implementation/platform-services/platform-services-spring/build.gradle index 88c4251dd09..ecde7d1b11b 100644 --- a/open-metadata-implementation/platform-services/platform-services-spring/build.gradle +++ b/open-metadata-implementation/platform-services/platform-services-spring/build.gradle @@ -12,6 +12,7 @@ dependencies { implementation project(':open-metadata-implementation:common-services:ffdc-services') implementation project(':open-metadata-implementation:admin-services:admin-services-api') implementation project(':open-metadata-implementation:repository-services:repository-services-apis') + implementation project(':open-metadata-implementation:frameworks:open-metadata-framework') implementation project(':open-metadata-implementation:frameworks:open-connector-framework') implementation 'org.springframework:spring-web' implementation 'io.swagger.core.v3:swagger-annotations' diff --git a/open-metadata-implementation/platform-services/platform-services-spring/src/main/java/org/odpi/openmetadata/platformservices/server/spring/OMAGServerPlatformActiveResource.java b/open-metadata-implementation/platform-services/platform-services-spring/src/main/java/org/odpi/openmetadata/platformservices/server/spring/OMAGServerPlatformActiveResource.java index 4567759bdf3..4804ba3b6a9 100644 --- a/open-metadata-implementation/platform-services/platform-services-spring/src/main/java/org/odpi/openmetadata/platformservices/server/spring/OMAGServerPlatformActiveResource.java +++ b/open-metadata-implementation/platform-services/platform-services-spring/src/main/java/org/odpi/openmetadata/platformservices/server/spring/OMAGServerPlatformActiveResource.java @@ -11,7 +11,7 @@ import io.swagger.v3.oas.annotations.responses.ApiResponse; import io.swagger.v3.oas.annotations.tags.Tag; import org.odpi.openmetadata.commonservices.ffdc.rest.BooleanResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.ConnectorTypeResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.OCFConnectorTypeResponse; import org.odpi.openmetadata.commonservices.ffdc.rest.RegisteredOMAGServicesResponse; import org.odpi.openmetadata.platformservices.rest.ServerListResponse; import org.odpi.openmetadata.serveroperations.rest.ServerServicesListResponse; @@ -263,13 +263,13 @@ public RegisteredOMAGServicesResponse getAllRegisteredServices(@Parameter(descri @ApiResponse(responseCode = "200",description="Connector type", content = @Content( mediaType ="application/json", - schema = @Schema(implementation=ConnectorTypeResponse.class) + schema = @Schema(implementation= OCFConnectorTypeResponse.class) ) ) }) - public ConnectorTypeResponse getConnectorType(@Parameter(description="calling user") @PathVariable String userId, - @Parameter(description="name of the connector provider class") @PathVariable String connectorProviderClassName) + public OCFConnectorTypeResponse getConnectorType(@Parameter(description="calling user") @PathVariable String userId, + @Parameter(description="name of the connector provider class") @PathVariable String connectorProviderClassName) { return platformAPI.getConnectorType(userId, connectorProviderClassName); } diff --git a/open-metadata-implementation/repository-services/repository-services-apis/build.gradle b/open-metadata-implementation/repository-services/repository-services-apis/build.gradle index f53159f2ea6..c7e7c0498ff 100644 --- a/open-metadata-implementation/repository-services/repository-services-apis/build.gradle +++ b/open-metadata-implementation/repository-services/repository-services-apis/build.gradle @@ -9,6 +9,7 @@ dependencies { implementation 'com.fasterxml.jackson.core:jackson-databind' compileOnly 'com.fasterxml.jackson.core:jackson-annotations' implementation project(':open-metadata-implementation:frameworks:audit-log-framework') + implementation project(':open-metadata-implementation:frameworks:open-metadata-framework') implementation project(':open-metadata-implementation:frameworks:open-connector-framework') implementation 'org.apache.commons:commons-collections4' testImplementation project(':open-metadata-test:open-metadata-ut') diff --git a/open-metadata-implementation/repository-services/repository-services-archive-utilities/src/main/java/org/odpi/openmetadata/repositoryservices/archiveutilities/OMRSArchiveWriter.java b/open-metadata-implementation/repository-services/repository-services-archive-utilities/src/main/java/org/odpi/openmetadata/repositoryservices/archiveutilities/OMRSArchiveWriter.java index d137c48f410..76638a62adc 100644 --- a/open-metadata-implementation/repository-services/repository-services-archive-utilities/src/main/java/org/odpi/openmetadata/repositoryservices/archiveutilities/OMRSArchiveWriter.java +++ b/open-metadata-implementation/repository-services/repository-services-archive-utilities/src/main/java/org/odpi/openmetadata/repositoryservices/archiveutilities/OMRSArchiveWriter.java @@ -7,6 +7,8 @@ import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ConnectorProvider; import org.odpi.openmetadata.frameworks.connectors.properties.beans.*; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ElementOriginCategory; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementOrigin; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.odpi.openmetadata.frameworks.connectors.Connector; diff --git a/open-metadata-implementation/repository-services/repository-services-client/build.gradle b/open-metadata-implementation/repository-services/repository-services-client/build.gradle index b11544f5603..1ea76e8a7b5 100644 --- a/open-metadata-implementation/repository-services/repository-services-client/build.gradle +++ b/open-metadata-implementation/repository-services/repository-services-client/build.gradle @@ -6,6 +6,7 @@ dependencies { implementation project(':open-metadata-implementation:frameworks:audit-log-framework') + implementation project(':open-metadata-implementation:frameworks:open-metadata-framework') implementation project(':open-metadata-implementation:frameworks:open-connector-framework') implementation project(':open-metadata-implementation:adapters:open-connectors:rest-client-connectors:rest-client-factory') implementation project(':open-metadata-implementation:adapters:open-connectors:rest-client-connectors:rest-client-connectors-api') diff --git a/open-metadata-implementation/repository-services/repository-services-implementation/build.gradle b/open-metadata-implementation/repository-services/repository-services-implementation/build.gradle index 702450575b5..144f56c7bf7 100644 --- a/open-metadata-implementation/repository-services/repository-services-implementation/build.gradle +++ b/open-metadata-implementation/repository-services/repository-services-implementation/build.gradle @@ -8,6 +8,7 @@ dependencies { implementation 'com.fasterxml.jackson.core:jackson-databind' implementation 'org.slf4j:slf4j-api' implementation project(':open-metadata-implementation:frameworks:audit-log-framework') + implementation project(':open-metadata-implementation:frameworks:open-metadata-framework') implementation project(':open-metadata-implementation:frameworks:open-connector-framework') implementation project(':open-metadata-implementation:repository-services:repository-services-apis') implementation project(':open-metadata-resources:open-metadata-archives:open-metadata-types') diff --git a/open-metadata-implementation/server-operations/server-operations-server/build.gradle b/open-metadata-implementation/server-operations/server-operations-server/build.gradle index 3e92e97ccc9..4bc4f526451 100644 --- a/open-metadata-implementation/server-operations/server-operations-server/build.gradle +++ b/open-metadata-implementation/server-operations/server-operations-server/build.gradle @@ -8,6 +8,7 @@ dependencies { implementation 'org.slf4j:slf4j-api' implementation project(':open-metadata-implementation:server-operations:server-operations-api') implementation project(':open-metadata-implementation:common-services:multi-tenant') + implementation project(':open-metadata-implementation:frameworks:open-metadata-framework') implementation project(':open-metadata-implementation:frameworks:open-connector-framework') implementation project(':open-metadata-implementation:frameworks:audit-log-framework') implementation project(':open-metadata-implementation:adapters:open-connectors:connector-configuration-factory') diff --git a/open-metadata-implementation/server-operations/server-operations-spring/build.gradle b/open-metadata-implementation/server-operations/server-operations-spring/build.gradle index 4064235c9b9..5a9ed8c106c 100644 --- a/open-metadata-implementation/server-operations/server-operations-spring/build.gradle +++ b/open-metadata-implementation/server-operations/server-operations-spring/build.gradle @@ -10,6 +10,7 @@ dependencies { implementation project(':open-metadata-implementation:repository-services:repository-services-apis') implementation project(':open-metadata-implementation:common-services:ffdc-services') implementation project(':open-metadata-implementation:admin-services:admin-services-api') + implementation project(':open-metadata-implementation:frameworks:open-metadata-framework') implementation project(':open-metadata-implementation:frameworks:open-connector-framework') implementation 'org.springframework:spring-web' implementation 'io.swagger.core.v3:swagger-annotations' diff --git a/open-metadata-implementation/view-services/asset-catalog/asset-catalog-server/src/main/java/org/odpi/openmetadata/viewservices/assetcatalog/beans/ElementOrigin.java b/open-metadata-implementation/view-services/asset-catalog/asset-catalog-server/src/main/java/org/odpi/openmetadata/viewservices/assetcatalog/beans/ElementOrigin.java index 0dddd76babb..bfe0b55f942 100644 --- a/open-metadata-implementation/view-services/asset-catalog/asset-catalog-server/src/main/java/org/odpi/openmetadata/viewservices/assetcatalog/beans/ElementOrigin.java +++ b/open-metadata-implementation/view-services/asset-catalog/asset-catalog-server/src/main/java/org/odpi/openmetadata/viewservices/assetcatalog/beans/ElementOrigin.java @@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementOriginCategory; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ElementOriginCategory; import java.util.Objects; diff --git a/open-metadata-implementation/view-services/asset-catalog/asset-catalog-server/src/main/java/org/odpi/openmetadata/viewservices/assetcatalog/converters/AssetCatalogConverterBase.java b/open-metadata-implementation/view-services/asset-catalog/asset-catalog-server/src/main/java/org/odpi/openmetadata/viewservices/assetcatalog/converters/AssetCatalogConverterBase.java index 88b71b93497..05338702331 100644 --- a/open-metadata-implementation/view-services/asset-catalog/asset-catalog-server/src/main/java/org/odpi/openmetadata/viewservices/assetcatalog/converters/AssetCatalogConverterBase.java +++ b/open-metadata-implementation/view-services/asset-catalog/asset-catalog-server/src/main/java/org/odpi/openmetadata/viewservices/assetcatalog/converters/AssetCatalogConverterBase.java @@ -2,8 +2,8 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.viewservices.assetcatalog.converters; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementControlHeader; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementType; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementControlHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementType; import org.odpi.openmetadata.frameworks.governanceaction.converters.OpenMetadataConverterBase; import org.odpi.openmetadata.frameworks.governanceaction.properties.AttachedClassification; import org.odpi.openmetadata.frameworks.governanceaction.properties.OpenMetadataElement; diff --git a/open-metadata-implementation/view-services/asset-catalog/asset-catalog-server/src/main/java/org/odpi/openmetadata/viewservices/assetcatalog/server/AssetCatalogRESTServices.java b/open-metadata-implementation/view-services/asset-catalog/asset-catalog-server/src/main/java/org/odpi/openmetadata/viewservices/assetcatalog/server/AssetCatalogRESTServices.java index e04a48dd525..ea151cfb9e8 100644 --- a/open-metadata-implementation/view-services/asset-catalog/asset-catalog-server/src/main/java/org/odpi/openmetadata/viewservices/assetcatalog/server/AssetCatalogRESTServices.java +++ b/open-metadata-implementation/view-services/asset-catalog/asset-catalog-server/src/main/java/org/odpi/openmetadata/viewservices/assetcatalog/server/AssetCatalogRESTServices.java @@ -5,16 +5,16 @@ import org.odpi.openmetadata.accessservices.assetconsumer.client.AssetConsumer; import org.odpi.openmetadata.accessservices.assetconsumer.client.OpenMetadataStoreClient; -import org.odpi.openmetadata.accessservices.assetconsumer.rest.AssetGraphResponse; -import org.odpi.openmetadata.accessservices.assetconsumer.rest.AssetSearchMatchesListResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.AssetGraphResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.AssetSearchMatchesListResponse; import org.odpi.openmetadata.adminservices.configuration.registration.ViewServiceDescription; import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; import org.odpi.openmetadata.commonservices.ffdc.rest.FilterRequestBody; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStatus; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementType; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ElementStatus; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementType; import org.odpi.openmetadata.frameworks.governanceaction.properties.AttachedClassification; import org.odpi.openmetadata.frameworks.governanceaction.properties.OpenMetadataElement; import org.odpi.openmetadata.frameworks.governanceaction.properties.OpenMetadataRelationship; @@ -851,7 +851,7 @@ private List getRelationships(List openM * @param openMetadataElementOrigin retrieved origin * @return reformatted origin */ - private ElementOrigin getElementOrigin(org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementOrigin openMetadataElementOrigin) + private ElementOrigin getElementOrigin(org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementOrigin openMetadataElementOrigin) { if (openMetadataElementOrigin != null) { diff --git a/open-metadata-implementation/view-services/asset-catalog/asset-catalog-server/src/main/java/org/odpi/openmetadata/viewservices/assetcatalog/server/AssetCatalogUIRESTServices.java b/open-metadata-implementation/view-services/asset-catalog/asset-catalog-server/src/main/java/org/odpi/openmetadata/viewservices/assetcatalog/server/AssetCatalogUIRESTServices.java index b72f40ab0c4..e13fc390feb 100644 --- a/open-metadata-implementation/view-services/asset-catalog/asset-catalog-server/src/main/java/org/odpi/openmetadata/viewservices/assetcatalog/server/AssetCatalogUIRESTServices.java +++ b/open-metadata-implementation/view-services/asset-catalog/asset-catalog-server/src/main/java/org/odpi/openmetadata/viewservices/assetcatalog/server/AssetCatalogUIRESTServices.java @@ -9,8 +9,8 @@ import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStatus; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementType; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ElementStatus; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementType; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.frameworks.governanceaction.properties.AttachedClassification; @@ -671,7 +671,7 @@ private List getRelationships(List openM * @param openMetadataElementOrigin retrieved origin * @return reformatted origin */ - private ElementOrigin getElementOrigin(org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementOrigin openMetadataElementOrigin) + private ElementOrigin getElementOrigin(org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementOrigin openMetadataElementOrigin) { if (openMetadataElementOrigin != null) { diff --git a/open-metadata-implementation/view-services/asset-catalog/asset-catalog-spring/src/main/java/org/odpi/openmetadata/viewservices/assetcatalog/server/spring/AssetCatalogResource.java b/open-metadata-implementation/view-services/asset-catalog/asset-catalog-spring/src/main/java/org/odpi/openmetadata/viewservices/assetcatalog/server/spring/AssetCatalogResource.java index 5e795448d12..d55982775a2 100644 --- a/open-metadata-implementation/view-services/asset-catalog/asset-catalog-spring/src/main/java/org/odpi/openmetadata/viewservices/assetcatalog/server/spring/AssetCatalogResource.java +++ b/open-metadata-implementation/view-services/asset-catalog/asset-catalog-spring/src/main/java/org/odpi/openmetadata/viewservices/assetcatalog/server/spring/AssetCatalogResource.java @@ -5,8 +5,8 @@ import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.accessservices.assetconsumer.rest.AssetGraphResponse; -import org.odpi.openmetadata.accessservices.assetconsumer.rest.AssetSearchMatchesListResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.AssetGraphResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.AssetSearchMatchesListResponse; import org.odpi.openmetadata.commonservices.ffdc.rest.FilterRequestBody; import org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.rest.AssetsResponse; import org.odpi.openmetadata.viewservices.assetcatalog.rest.AssetCatalogSupportedTypes; diff --git a/open-metadata-implementation/view-services/automated-curation/automated-curation-server/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/converters/ReferenceableConverter.java b/open-metadata-implementation/view-services/automated-curation/automated-curation-server/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/converters/ReferenceableConverter.java index 7abdb3dc642..b8ff286d4f8 100644 --- a/open-metadata-implementation/view-services/automated-curation/automated-curation-server/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/converters/ReferenceableConverter.java +++ b/open-metadata-implementation/view-services/automated-curation/automated-curation-server/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/converters/ReferenceableConverter.java @@ -2,8 +2,8 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.viewservices.automatedcuration.converters; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.ReferenceableElement; -import org.odpi.openmetadata.accessservices.assetowner.properties.ReferenceableProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ReferenceableElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ReferenceableProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.governanceaction.properties.OpenMetadataElement; import org.odpi.openmetadata.frameworks.governanceaction.search.ElementProperties; diff --git a/open-metadata-implementation/view-services/automated-curation/automated-curation-server/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/properties/RefDataElementBase.java b/open-metadata-implementation/view-services/automated-curation/automated-curation-server/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/properties/RefDataElementBase.java index 8a1d4f74385..30adc51aeb6 100644 --- a/open-metadata-implementation/view-services/automated-curation/automated-curation-server/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/properties/RefDataElementBase.java +++ b/open-metadata-implementation/view-services/automated-curation/automated-curation-server/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/properties/RefDataElementBase.java @@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementStub; import java.util.List; import java.util.Map; diff --git a/open-metadata-implementation/view-services/automated-curation/automated-curation-server/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/properties/TechnologyTypeReport.java b/open-metadata-implementation/view-services/automated-curation/automated-curation-server/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/properties/TechnologyTypeReport.java index cc08b8d04b4..3927686800e 100644 --- a/open-metadata-implementation/view-services/automated-curation/automated-curation-server/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/properties/TechnologyTypeReport.java +++ b/open-metadata-implementation/view-services/automated-curation/automated-curation-server/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/properties/TechnologyTypeReport.java @@ -6,10 +6,9 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.ExternalReferenceElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ExternalReferenceElement; import java.util.List; -import java.util.Map; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; diff --git a/open-metadata-implementation/view-services/automated-curation/automated-curation-server/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/rest/TechnologyTypeElementListResponse.java b/open-metadata-implementation/view-services/automated-curation/automated-curation-server/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/rest/TechnologyTypeElementListResponse.java index 1020735fa17..0e01ca03bdf 100644 --- a/open-metadata-implementation/view-services/automated-curation/automated-curation-server/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/rest/TechnologyTypeElementListResponse.java +++ b/open-metadata-implementation/view-services/automated-curation/automated-curation-server/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/rest/TechnologyTypeElementListResponse.java @@ -5,12 +5,10 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.ReferenceableElement; -import org.odpi.openmetadata.accessservices.assetowner.rest.AssetOwnerOMASAPIResponse; -import org.odpi.openmetadata.viewservices.automatedcuration.properties.TechnologyTypeSummary; +import org.odpi.openmetadata.commonservices.ffdc.rest.FFDCResponseBase; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ReferenceableElement; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; @@ -24,7 +22,7 @@ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) -public class TechnologyTypeElementListResponse extends AssetOwnerOMASAPIResponse +public class TechnologyTypeElementListResponse extends FFDCResponseBase { private List elements = null; @@ -81,16 +79,6 @@ public String toString() { return "TechnologyTypeElementListResponse{" + "elements=" + elements + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; + "} " + super.toString(); } } diff --git a/open-metadata-implementation/view-services/automated-curation/automated-curation-server/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/rest/TechnologyTypeHierarchyResponse.java b/open-metadata-implementation/view-services/automated-curation/automated-curation-server/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/rest/TechnologyTypeHierarchyResponse.java index 588d66bb8cf..d1256c7985b 100644 --- a/open-metadata-implementation/view-services/automated-curation/automated-curation-server/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/rest/TechnologyTypeHierarchyResponse.java +++ b/open-metadata-implementation/view-services/automated-curation/automated-curation-server/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/rest/TechnologyTypeHierarchyResponse.java @@ -5,11 +5,8 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetowner.rest.AssetOwnerOMASAPIResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.FFDCResponseBase; import org.odpi.openmetadata.viewservices.automatedcuration.properties.TechnologyTypeHierarchy; -import org.odpi.openmetadata.viewservices.automatedcuration.properties.TechnologyTypeReport; - -import java.util.Arrays; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; @@ -22,7 +19,7 @@ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) -public class TechnologyTypeHierarchyResponse extends AssetOwnerOMASAPIResponse +public class TechnologyTypeHierarchyResponse extends FFDCResponseBase { private TechnologyTypeHierarchy element = null; @@ -68,17 +65,7 @@ public void setElement(TechnologyTypeHierarchy element) public String toString() { return "TechnologyTypeHierarchyResponse{" + - "element='" + getElement() + '\'' + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; + "element=" + element + + "} " + super.toString(); } } diff --git a/open-metadata-implementation/view-services/automated-curation/automated-curation-server/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/rest/TechnologyTypeReportResponse.java b/open-metadata-implementation/view-services/automated-curation/automated-curation-server/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/rest/TechnologyTypeReportResponse.java index 837d52fafba..a6e5364eda0 100644 --- a/open-metadata-implementation/view-services/automated-curation/automated-curation-server/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/rest/TechnologyTypeReportResponse.java +++ b/open-metadata-implementation/view-services/automated-curation/automated-curation-server/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/rest/TechnologyTypeReportResponse.java @@ -5,13 +5,9 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.CertificationTypeElement; -import org.odpi.openmetadata.accessservices.assetowner.rest.AssetOwnerOMASAPIResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.FFDCResponseBase; import org.odpi.openmetadata.viewservices.automatedcuration.properties.TechnologyTypeReport; -import java.util.Arrays; -import java.util.Objects; - import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; @@ -23,7 +19,7 @@ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) -public class TechnologyTypeReportResponse extends AssetOwnerOMASAPIResponse +public class TechnologyTypeReportResponse extends FFDCResponseBase { private TechnologyTypeReport element = null; @@ -69,17 +65,7 @@ public void setElement(TechnologyTypeReport element) public String toString() { return "TechnologyTypeReportResponse{" + - "element='" + getElement() + '\'' + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; + "element=" + element + + "} " + super.toString(); } } diff --git a/open-metadata-implementation/view-services/automated-curation/automated-curation-server/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/rest/TechnologyTypeSummaryListResponse.java b/open-metadata-implementation/view-services/automated-curation/automated-curation-server/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/rest/TechnologyTypeSummaryListResponse.java index e4e82d1bacd..14ab60ede2f 100644 --- a/open-metadata-implementation/view-services/automated-curation/automated-curation-server/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/rest/TechnologyTypeSummaryListResponse.java +++ b/open-metadata-implementation/view-services/automated-curation/automated-curation-server/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/rest/TechnologyTypeSummaryListResponse.java @@ -5,11 +5,10 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetowner.rest.AssetOwnerOMASAPIResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.FFDCResponseBase; import org.odpi.openmetadata.viewservices.automatedcuration.properties.TechnologyTypeSummary; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; @@ -23,7 +22,7 @@ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) -public class TechnologyTypeSummaryListResponse extends AssetOwnerOMASAPIResponse +public class TechnologyTypeSummaryListResponse extends FFDCResponseBase { private List elements = null; @@ -80,16 +79,6 @@ public String toString() { return "TechnologyTypeSummaryListResponse{" + "elements=" + elements + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; + "} " + super.toString(); } } diff --git a/open-metadata-implementation/view-services/automated-curation/automated-curation-server/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/server/AutomatedCurationRESTServices.java b/open-metadata-implementation/view-services/automated-curation/automated-curation-server/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/server/AutomatedCurationRESTServices.java index 10b6c31adcf..0672e471812 100644 --- a/open-metadata-implementation/view-services/automated-curation/automated-curation-server/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/server/AutomatedCurationRESTServices.java +++ b/open-metadata-implementation/view-services/automated-curation/automated-curation-server/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/server/AutomatedCurationRESTServices.java @@ -4,10 +4,10 @@ package org.odpi.openmetadata.viewservices.automatedcuration.server; import org.odpi.openmetadata.accessservices.assetowner.client.*; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.ExternalReferenceElement; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.ReferenceableElement; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.RelatedElement; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.ValidValueElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ExternalReferenceElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ReferenceableElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.RelatedElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ValidValueElement; import org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler; import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; @@ -15,7 +15,7 @@ import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementClassification; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementClassification; import org.odpi.openmetadata.frameworks.governanceaction.properties.AttachedClassification; import org.odpi.openmetadata.frameworks.governanceaction.properties.OpenMetadataElement; import org.odpi.openmetadata.frameworks.governanceaction.search.PropertyHelper; @@ -26,6 +26,7 @@ import org.odpi.openmetadata.frameworkservices.gaf.rest.*; import org.odpi.openmetadata.frameworkservices.gaf.rest.CatalogTargetResponse; import org.odpi.openmetadata.frameworkservices.gaf.rest.CatalogTargetsResponse; +import org.odpi.openmetadata.frameworkservices.gaf.rest.TemplateRequestBody; import org.odpi.openmetadata.tokencontroller.TokenController; import org.odpi.openmetadata.viewservices.automatedcuration.converters.ReferenceableConverter; import org.odpi.openmetadata.viewservices.automatedcuration.properties.CatalogTemplate; diff --git a/open-metadata-implementation/view-services/automated-curation/automated-curation-spring/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/server/spring/AutomatedCurationResource.java b/open-metadata-implementation/view-services/automated-curation/automated-curation-spring/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/server/spring/AutomatedCurationResource.java index f8e7296773a..88a6f2b7924 100644 --- a/open-metadata-implementation/view-services/automated-curation/automated-curation-spring/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/server/spring/AutomatedCurationResource.java +++ b/open-metadata-implementation/view-services/automated-curation/automated-curation-spring/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/server/spring/AutomatedCurationResource.java @@ -10,6 +10,7 @@ import org.odpi.openmetadata.frameworkservices.gaf.rest.*; import org.odpi.openmetadata.frameworkservices.gaf.rest.CatalogTargetResponse; import org.odpi.openmetadata.frameworkservices.gaf.rest.CatalogTargetsResponse; +import org.odpi.openmetadata.frameworkservices.gaf.rest.TemplateRequestBody; import org.odpi.openmetadata.viewservices.automatedcuration.rest.TechnologyTypeElementListResponse; import org.odpi.openmetadata.viewservices.automatedcuration.rest.TechnologyTypeReportResponse; import org.odpi.openmetadata.viewservices.automatedcuration.server.AutomatedCurationRESTServices; diff --git a/open-metadata-implementation/view-services/classification-manager/classification-manager-server/src/main/java/org/odpi/openmetadata/viewservices/classificationmanager/rest/ClassificationRequestBody.java b/open-metadata-implementation/view-services/classification-manager/classification-manager-server/src/main/java/org/odpi/openmetadata/viewservices/classificationmanager/rest/ClassificationRequestBody.java index 18f627dc9df..b455746da63 100644 --- a/open-metadata-implementation/view-services/classification-manager/classification-manager-server/src/main/java/org/odpi/openmetadata/viewservices/classificationmanager/rest/ClassificationRequestBody.java +++ b/open-metadata-implementation/view-services/classification-manager/classification-manager-server/src/main/java/org/odpi/openmetadata/viewservices/classificationmanager/rest/ClassificationRequestBody.java @@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ClassificationProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ClassificationProperties; import java.util.Date; import java.util.Objects; @@ -23,8 +23,8 @@ @JsonIgnoreProperties(ignoreUnknown=true) public class ClassificationRequestBody { - private ClassificationProperties properties = null; - private Date effectiveTime = null; + private ClassificationProperties properties = null; + private Date effectiveTime = null; diff --git a/open-metadata-implementation/view-services/classification-manager/classification-manager-server/src/main/java/org/odpi/openmetadata/viewservices/classificationmanager/rest/ReferenceableRequestBody.java b/open-metadata-implementation/view-services/classification-manager/classification-manager-server/src/main/java/org/odpi/openmetadata/viewservices/classificationmanager/rest/ReferenceableRequestBody.java index bf47f2b4e1b..111604ee985 100644 --- a/open-metadata-implementation/view-services/classification-manager/classification-manager-server/src/main/java/org/odpi/openmetadata/viewservices/classificationmanager/rest/ReferenceableRequestBody.java +++ b/open-metadata-implementation/view-services/classification-manager/classification-manager-server/src/main/java/org/odpi/openmetadata/viewservices/classificationmanager/rest/ReferenceableRequestBody.java @@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ReferenceableProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ReferenceableProperties; import java.util.Objects; diff --git a/open-metadata-implementation/view-services/classification-manager/classification-manager-server/src/main/java/org/odpi/openmetadata/viewservices/classificationmanager/rest/RelationshipRequestBody.java b/open-metadata-implementation/view-services/classification-manager/classification-manager-server/src/main/java/org/odpi/openmetadata/viewservices/classificationmanager/rest/RelationshipRequestBody.java index 6f573407a6c..e5c5d8ab60d 100644 --- a/open-metadata-implementation/view-services/classification-manager/classification-manager-server/src/main/java/org/odpi/openmetadata/viewservices/classificationmanager/rest/RelationshipRequestBody.java +++ b/open-metadata-implementation/view-services/classification-manager/classification-manager-server/src/main/java/org/odpi/openmetadata/viewservices/classificationmanager/rest/RelationshipRequestBody.java @@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.RelationshipProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; import java.util.Objects; diff --git a/open-metadata-implementation/view-services/classification-manager/classification-manager-server/src/main/java/org/odpi/openmetadata/viewservices/classificationmanager/server/ClassificationManagerRESTServices.java b/open-metadata-implementation/view-services/classification-manager/classification-manager-server/src/main/java/org/odpi/openmetadata/viewservices/classificationmanager/server/ClassificationManagerRESTServices.java index fc4bfb7f785..3dd1dc922d8 100644 --- a/open-metadata-implementation/view-services/classification-manager/classification-manager-server/src/main/java/org/odpi/openmetadata/viewservices/classificationmanager/server/ClassificationManagerRESTServices.java +++ b/open-metadata-implementation/view-services/classification-manager/classification-manager-server/src/main/java/org/odpi/openmetadata/viewservices/classificationmanager/server/ClassificationManagerRESTServices.java @@ -3,20 +3,18 @@ /* Copyright Contributors to the ODPi Egeria category. */ package org.odpi.openmetadata.viewservices.classificationmanager.server; -import org.odpi.openmetadata.accessservices.assetmanager.client.management.CollaborationManagementClient; import org.odpi.openmetadata.accessservices.assetmanager.client.management.StewardshipManagementClient; -import org.odpi.openmetadata.accessservices.assetmanager.properties.*; import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; import org.odpi.openmetadata.commonservices.ffdc.rest.EffectiveTimeRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.security.SecurityTagsProperties; import org.odpi.openmetadata.tokencontroller.TokenController; import org.odpi.openmetadata.viewservices.classificationmanager.rest.ClassificationRequestBody; import org.odpi.openmetadata.viewservices.classificationmanager.rest.EffectiveTimeQueryRequestBody; -import org.odpi.openmetadata.viewservices.classificationmanager.rest.ReferenceableUpdateRequestBody; import org.odpi.openmetadata.viewservices.classificationmanager.rest.RelationshipRequestBody; import org.slf4j.LoggerFactory; @@ -879,7 +877,7 @@ public VoidResponse addElementToSubjectArea(String serverName if (requestBody != null) { - if (requestBody.getProperties() instanceof SubjectAreaMemberProperties properties) + if (requestBody.getProperties() instanceof SubjectAreaClassificationProperties properties) { StewardshipManagementClient handler = instanceHandler.getStewardshipManagementClient(userId, serverName, methodName); @@ -892,7 +890,7 @@ public VoidResponse addElementToSubjectArea(String serverName } else { - restExceptionHandler.handleInvalidPropertiesObject(SubjectAreaMemberProperties.class.getName(), methodName); + restExceptionHandler.handleInvalidPropertiesObject(SubjectAreaClassificationProperties.class.getName(), methodName); } } else diff --git a/open-metadata-implementation/view-services/collection-manager/collection-manager-server/src/main/java/org/odpi/openmetadata/viewservices/collectionmanager/rest/CollectionListResponse.java b/open-metadata-implementation/view-services/collection-manager/collection-manager-server/src/main/java/org/odpi/openmetadata/viewservices/collectionmanager/rest/CollectionListResponse.java deleted file mode 100644 index ed2ee807353..00000000000 --- a/open-metadata-implementation/view-services/collection-manager/collection-manager-server/src/main/java/org/odpi/openmetadata/viewservices/collectionmanager/rest/CollectionListResponse.java +++ /dev/null @@ -1,149 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.collectionmanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.digitalservice.metadataelements.CollectionElement; -import org.odpi.openmetadata.commonservices.ffdc.rest.FFDCResponseBase; - -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * CollectionListResponse is the response structure used on the OMAS REST API calls that return - * a list of collection elements. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class CollectionListResponse extends FFDCResponseBase -{ - private List elements = null; - - - /** - * Default constructor - */ - public CollectionListResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public CollectionListResponse(CollectionListResponse template) - { - super(template); - - if (template != null) - { - this.elements = template.getElements(); - } - } - - - /** - * Return the collection result. - * - * @return unique identifier - */ - public List getElements() - { - if (elements == null) - { - return null; - } - else if (elements.isEmpty()) - { - return null; - } - else - { - return elements; - } - } - - - /** - * Set up the collection result. - * - * @param elements - unique identifier - */ - public void setElements(List elements) - { - this.elements = elements; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "CollectionListResponse{" + - "elements=" + elements + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof CollectionListResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - CollectionListResponse that = (CollectionListResponse) objectToCompare; - return Objects.equals(getElements(), that.getElements()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elements); - } -} diff --git a/open-metadata-implementation/view-services/collection-manager/collection-manager-server/src/main/java/org/odpi/openmetadata/viewservices/collectionmanager/rest/CollectionMemberListResponse.java b/open-metadata-implementation/view-services/collection-manager/collection-manager-server/src/main/java/org/odpi/openmetadata/viewservices/collectionmanager/rest/CollectionMemberListResponse.java deleted file mode 100644 index 1f5c91aed05..00000000000 --- a/open-metadata-implementation/view-services/collection-manager/collection-manager-server/src/main/java/org/odpi/openmetadata/viewservices/collectionmanager/rest/CollectionMemberListResponse.java +++ /dev/null @@ -1,149 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.collectionmanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.digitalservice.metadataelements.CollectionMember; -import org.odpi.openmetadata.commonservices.ffdc.rest.FFDCResponseBase; - -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * CollectionMemberListResponse is the response structure used on the OMAS REST API calls that return - * a list of collection membership elements. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class CollectionMemberListResponse extends FFDCResponseBase -{ - private List elements = null; - - - /** - * Default constructor - */ - public CollectionMemberListResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public CollectionMemberListResponse(CollectionMemberListResponse template) - { - super(template); - - if (template != null) - { - this.elements = template.getElements(); - } - } - - - /** - * Return the collection membership result. - * - * @return unique identifier - */ - public List getElements() - { - if (elements == null) - { - return null; - } - else if (elements.isEmpty()) - { - return null; - } - else - { - return elements; - } - } - - - /** - * Set up the collection membership result. - * - * @param elements - unique identifier - */ - public void setElements(List elements) - { - this.elements = elements; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "CollectionMemberListResponse{" + - "elements=" + elements + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof CollectionMemberListResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - CollectionMemberListResponse that = (CollectionMemberListResponse) objectToCompare; - return Objects.equals(getElements(), that.getElements()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elements); - } -} diff --git a/open-metadata-implementation/view-services/collection-manager/collection-manager-server/src/main/java/org/odpi/openmetadata/viewservices/collectionmanager/rest/CollectionMemberResponse.java b/open-metadata-implementation/view-services/collection-manager/collection-manager-server/src/main/java/org/odpi/openmetadata/viewservices/collectionmanager/rest/CollectionMemberResponse.java deleted file mode 100644 index 3cd0f0a4c42..00000000000 --- a/open-metadata-implementation/view-services/collection-manager/collection-manager-server/src/main/java/org/odpi/openmetadata/viewservices/collectionmanager/rest/CollectionMemberResponse.java +++ /dev/null @@ -1,137 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.collectionmanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.digitalservice.metadataelements.CollectionMember; -import org.odpi.openmetadata.commonservices.ffdc.rest.FFDCResponseBase; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * CollectionMemberResponse is the response structure used on the OMAS REST API calls that return a - * CollectionMember object as a response. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class CollectionMemberResponse extends FFDCResponseBase -{ - private CollectionMember element = null; - - - /** - * Default constructor - */ - public CollectionMemberResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public CollectionMemberResponse(CollectionMemberResponse template) - { - super(template); - - if (template != null) - { - this.element = template.getElement(); - } - } - - - /** - * Return the element result. - * - * @return details of person role - */ - public CollectionMember getElement() - { - return element; - } - - - /** - * Set up the element result. - * - * @param element details of person role - */ - public void setElement(CollectionMember element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "CollectionMemberResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof CollectionMemberResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - CollectionMemberResponse that = (CollectionMemberResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/view-services/collection-manager/collection-manager-server/src/main/java/org/odpi/openmetadata/viewservices/collectionmanager/rest/CollectionResponse.java b/open-metadata-implementation/view-services/collection-manager/collection-manager-server/src/main/java/org/odpi/openmetadata/viewservices/collectionmanager/rest/CollectionResponse.java deleted file mode 100644 index a26f0812646..00000000000 --- a/open-metadata-implementation/view-services/collection-manager/collection-manager-server/src/main/java/org/odpi/openmetadata/viewservices/collectionmanager/rest/CollectionResponse.java +++ /dev/null @@ -1,137 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.collectionmanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.digitalservice.metadataelements.CollectionElement; -import org.odpi.openmetadata.commonservices.ffdc.rest.FFDCResponseBase; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * CollectionResponse is the response structure used on the OMAS REST API calls that return a - * CollectionElement object as a response. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class CollectionResponse extends FFDCResponseBase -{ - private CollectionElement element = null; - - - /** - * Default constructor - */ - public CollectionResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public CollectionResponse(CollectionResponse template) - { - super(template); - - if (template != null) - { - this.element = template.getElement(); - } - } - - - /** - * Return the element result. - * - * @return details of person role - */ - public CollectionElement getElement() - { - return element; - } - - - /** - * Set up the element result. - * - * @param element details of person role - */ - public void setElement(CollectionElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "CollectionResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof CollectionResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - CollectionResponse that = (CollectionResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/view-services/collection-manager/collection-manager-server/src/main/java/org/odpi/openmetadata/viewservices/collectionmanager/rest/NewElementRequestBody.java b/open-metadata-implementation/view-services/collection-manager/collection-manager-server/src/main/java/org/odpi/openmetadata/viewservices/collectionmanager/rest/NewElementRequestBody.java deleted file mode 100644 index cd443aca797..00000000000 --- a/open-metadata-implementation/view-services/collection-manager/collection-manager-server/src/main/java/org/odpi/openmetadata/viewservices/collectionmanager/rest/NewElementRequestBody.java +++ /dev/null @@ -1,259 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.viewservices.collectionmanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStatus; -import org.odpi.openmetadata.frameworks.governanceaction.search.ElementProperties; - -import java.util.Date; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * NewElementRequestBody provides a structure for the common properties when creating an element. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class NewElementRequestBody -{ - private String anchorGUID = null; - private boolean isOwnAnchor = false; - private String parentGUID = null; - private String parentRelationshipTypeName = null; - private ElementProperties parentRelationshipProperties = null; - private boolean parentAtEnd1 = true; - - - /** - * Default constructor - */ - public NewElementRequestBody() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public NewElementRequestBody(NewElementRequestBody template) - { - if (template != null) - { - anchorGUID = template.getAnchorGUID(); - isOwnAnchor = template.getIsOwnAnchor(); - parentGUID = template.getParentGUID(); - parentRelationshipTypeName = template.getParentRelationshipTypeName(); - parentRelationshipProperties = template.getParentRelationshipProperties(); - parentAtEnd1 = template.getParentAtEnd1(); - } - } - - - /** - * Return the unique identifier of the element that should be the anchor for the new element. It is set to null if no anchor, - * or the Anchors classification is included in the initial classifications. - * - * @return string guid - */ - public String getAnchorGUID() - { - return anchorGUID; - } - - - /** - * Set up the unique identifier of the element that should be the anchor for the new element. Set to null if no anchor, - * or the new collection should be its own anchor. - * - * @param anchorGUID string guid - */ - public void setAnchorGUID(String anchorGUID) - { - this.anchorGUID = anchorGUID; - } - - - /** - * Return whether this element should be classified as its own anchor or not. The default is false. - * - * @return boolean - */ - public boolean getIsOwnAnchor() - { - return isOwnAnchor; - } - - - /** - * Set up whether this element should be classified as its own anchor or not. The default is false. - * - * @param ownAnchor boolean - */ - public void setIsOwnAnchor(boolean ownAnchor) - { - isOwnAnchor = ownAnchor; - } - - - /** - * Return the optional unique identifier for an element that should be connected to the newly created element. - * If this property is specified, parentRelationshipTypeName must also be specified. - * - * @return string guid - */ - public String getParentGUID() - { - return parentGUID; - } - - - /** - * Set up the optional unique identifier for an element that should be connected to the newly created element. - * If this property is specified, parentRelationshipTypeName must also be specified. - * - * @param parentGUID string guid - */ - public void setParentGUID(String parentGUID) - { - this.parentGUID = parentGUID; - } - - - /** - * Return the name of the relationship, if any, that should be established between the new element and the parent element. - * - * @return string type name - */ - public String getParentRelationshipTypeName() - { - return parentRelationshipTypeName; - } - - - /** - * Set up the name of the optional relationship from the newly created element to a parent element. - * - * @param parentRelationshipTypeName string type name - */ - public void setParentRelationshipTypeName(String parentRelationshipTypeName) - { - this.parentRelationshipTypeName = parentRelationshipTypeName; - } - - - /** - * Return any properties that should be included in the parent relationship. - * - * @return element properties - */ - public ElementProperties getParentRelationshipProperties() - { - return parentRelationshipProperties; - } - - - /** - * Set up any properties that should be included in the parent relationship. - * - * @param parentRelationshipProperties element properties - */ - public void setParentRelationshipProperties(ElementProperties parentRelationshipProperties) - { - this.parentRelationshipProperties = parentRelationshipProperties; - } - - - /** - * Return which end any parent entity sits on the relationship. - * - * @return boolean - */ - public boolean getParentAtEnd1() - { - return parentAtEnd1; - } - - - /** - * Set up which end any parent entity sits on the relationship. - * - * @param parentAtEnd1 boolean - */ - public void setParentAtEnd1(boolean parentAtEnd1) - { - this.parentAtEnd1 = parentAtEnd1; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "NewElementRequestBody{" + - ", anchorGUID='" + anchorGUID + '\'' + - ", isOwnAnchor='" + isOwnAnchor + '\'' + - ", parentGUID='" + parentGUID + '\'' + - ", parentRelationshipTypeName='" + parentRelationshipTypeName + '\'' + - ", parentRelationshipProperties=" + parentRelationshipProperties + - ", parentAtEnd1=" + parentAtEnd1 + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (! (objectToCompare instanceof NewElementRequestBody that)) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - return parentAtEnd1 == that.parentAtEnd1 && - isOwnAnchor == that.isOwnAnchor && - Objects.equals(anchorGUID, that.anchorGUID) && - Objects.equals(parentGUID, that.parentGUID) && - Objects.equals(parentRelationshipTypeName, that.parentRelationshipTypeName) && - Objects.equals(parentRelationshipProperties, that.parentRelationshipProperties); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), anchorGUID, isOwnAnchor, parentGUID, - parentRelationshipTypeName, parentRelationshipProperties, parentAtEnd1); - } -} diff --git a/open-metadata-implementation/view-services/collection-manager/collection-manager-server/src/main/java/org/odpi/openmetadata/viewservices/collectionmanager/rest/NewMetadataElementRequestBody.java b/open-metadata-implementation/view-services/collection-manager/collection-manager-server/src/main/java/org/odpi/openmetadata/viewservices/collectionmanager/rest/NewMetadataElementRequestBody.java deleted file mode 100644 index 11a3fd31162..00000000000 --- a/open-metadata-implementation/view-services/collection-manager/collection-manager-server/src/main/java/org/odpi/openmetadata/viewservices/collectionmanager/rest/NewMetadataElementRequestBody.java +++ /dev/null @@ -1,167 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.viewservices.collectionmanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStatus; -import org.odpi.openmetadata.frameworks.governanceaction.search.ElementProperties; - -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * NewMetadataElementRequestBody provides a structure for passing the properties for a new metadata element. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class NewMetadataElementRequestBody extends NewElementRequestBody -{ - private String typeName = null; - private ElementStatus initialStatus = null; - private Map initialClassifications = null; - - - - /** - * Default constructor - */ - public NewMetadataElementRequestBody() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public NewMetadataElementRequestBody(NewMetadataElementRequestBody template) - { - super(template); - - if (template != null) - { - typeName = template.getTypeName(); - initialStatus = template.getInitialStatus(); - initialClassifications = template.getInitialClassifications(); - } - } - - - /** - * Return the open metadata type name for the new metadata element. - * - * @return string name - */ - public String getTypeName() - { - return typeName; - } - - - /** - * Set up the open metadata type name for the new metadata element. - * - * @param typeName string name - */ - public void setTypeName(String typeName) - { - this.typeName = typeName; - } - - - /** - * Return the initial status of the metadata element (typically ACTIVE). - * - * @return element status enum value - */ - public ElementStatus getInitialStatus() - { - return initialStatus; - } - - - /** - * Return the map of classification name to properties describing the initial classification for the new metadata element. - * - * @return map of classification name to classification properties (or null for none) - */ - public Map getInitialClassifications() - { - return initialClassifications; - } - - - /** - * Set up the map of classification name to properties describing the initial classification for the new metadata element. - * - * @param initialClassifications map of classification name to classification properties (or null for none) - */ - public void setInitialClassifications(Map initialClassifications) - { - this.initialClassifications = initialClassifications; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "NewMetadataElementRequestBody{" + - "typeName='" + typeName + '\'' + - ", initialStatus=" + initialStatus + - ", initialClassifications=" + initialClassifications + - "} " + super.toString(); - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (! (objectToCompare instanceof NewMetadataElementRequestBody that)) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - return Objects.equals(typeName, that.typeName) && - initialStatus == that.initialStatus && - Objects.equals(initialClassifications, that.initialClassifications); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), typeName, initialStatus, initialClassifications); - } -} diff --git a/open-metadata-implementation/view-services/collection-manager/collection-manager-server/src/main/java/org/odpi/openmetadata/viewservices/collectionmanager/rest/TemplateRequestBody.java b/open-metadata-implementation/view-services/collection-manager/collection-manager-server/src/main/java/org/odpi/openmetadata/viewservices/collectionmanager/rest/TemplateRequestBody.java index c335bfe0317..d678714b3f1 100644 --- a/open-metadata-implementation/view-services/collection-manager/collection-manager-server/src/main/java/org/odpi/openmetadata/viewservices/collectionmanager/rest/TemplateRequestBody.java +++ b/open-metadata-implementation/view-services/collection-manager/collection-manager-server/src/main/java/org/odpi/openmetadata/viewservices/collectionmanager/rest/TemplateRequestBody.java @@ -6,10 +6,9 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStatus; +import org.odpi.openmetadata.commonservices.ffdc.rest.NewElementRequestBody; import org.odpi.openmetadata.frameworks.governanceaction.search.ElementProperties; -import java.util.Date; import java.util.Map; import java.util.Objects; diff --git a/open-metadata-implementation/view-services/collection-manager/collection-manager-server/src/main/java/org/odpi/openmetadata/viewservices/collectionmanager/server/CollectionManagerRESTServices.java b/open-metadata-implementation/view-services/collection-manager/collection-manager-server/src/main/java/org/odpi/openmetadata/viewservices/collectionmanager/server/CollectionManagerRESTServices.java index 48d9938aee6..b86cdf2990a 100644 --- a/open-metadata-implementation/view-services/collection-manager/collection-manager-server/src/main/java/org/odpi/openmetadata/viewservices/collectionmanager/server/CollectionManagerRESTServices.java +++ b/open-metadata-implementation/view-services/collection-manager/collection-manager-server/src/main/java/org/odpi/openmetadata/viewservices/collectionmanager/server/CollectionManagerRESTServices.java @@ -4,15 +4,20 @@ package org.odpi.openmetadata.viewservices.collectionmanager.server; import org.odpi.openmetadata.accessservices.digitalservice.client.CollectionsClient; -import org.odpi.openmetadata.accessservices.digitalservice.properties.*; import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; import org.odpi.openmetadata.commonservices.ffdc.rest.*; +import org.odpi.openmetadata.commonservices.ffdc.rest.CollectionResponse; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; +import org.odpi.openmetadata.frameworks.openmetadata.properties.collections.CollectionMembershipProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.collections.CollectionProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.digitalbusiness.DigitalProductProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.resources.ResourceListProperties; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.tokencontroller.TokenController; import org.odpi.openmetadata.viewservices.collectionmanager.rest.*; +import org.odpi.openmetadata.viewservices.collectionmanager.rest.TemplateRequestBody; import org.slf4j.LoggerFactory; @@ -56,18 +61,18 @@ public CollectionManagerRESTServices() * PropertyServerException there is a problem retrieving information from the property server(s). * UserNotAuthorizedException the requesting user is not authorized to issue this request. */ - public CollectionListResponse getAttachedCollections(String serverName, - String parentGUID, - int startFrom, - int pageSize, - FilterRequestBody requestBody) + public CollectionsResponse getAttachedCollections(String serverName, + String parentGUID, + int startFrom, + int pageSize, + FilterRequestBody requestBody) { final String methodName = "getAttachedCollections"; RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); - CollectionListResponse response = new CollectionListResponse(); - AuditLog auditLog = null; + CollectionsResponse response = new CollectionsResponse(); + AuditLog auditLog = null; try { @@ -111,17 +116,17 @@ public CollectionListResponse getAttachedCollections(String serverNam * PropertyServerException there is a problem retrieving information from the property server(s). * UserNotAuthorizedException the requesting user is not authorized to issue this request. */ - public CollectionListResponse getClassifiedCollections(String serverName, - int startFrom, - int pageSize, - FilterRequestBody requestBody) + public CollectionsResponse getClassifiedCollections(String serverName, + int startFrom, + int pageSize, + FilterRequestBody requestBody) { final String methodName = "getClassifiedCollections"; RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); - CollectionListResponse response = new CollectionListResponse(); - AuditLog auditLog = null; + CollectionsResponse response = new CollectionsResponse(); + AuditLog auditLog = null; try { @@ -168,20 +173,20 @@ public CollectionListResponse getClassifiedCollections(String serverN * PropertyServerException there is a problem retrieving information from the property server(s). * UserNotAuthorizedException the requesting user is not authorized to issue this request. */ - public CollectionListResponse findCollections(String serverName, - boolean startsWith, - boolean endsWith, - boolean ignoreCase, - int startFrom, - int pageSize, - FilterRequestBody requestBody) + public CollectionsResponse findCollections(String serverName, + boolean startsWith, + boolean endsWith, + boolean ignoreCase, + int startFrom, + int pageSize, + FilterRequestBody requestBody) { final String methodName = "findCollections"; RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); - CollectionListResponse response = new CollectionListResponse(); - AuditLog auditLog = null; + CollectionsResponse response = new CollectionsResponse(); + AuditLog auditLog = null; try { @@ -234,16 +239,16 @@ public CollectionListResponse findCollections(String serverName, * PropertyServerException there is a problem retrieving information from the property server(s). * UserNotAuthorizedException the requesting user is not authorized to issue this request. */ - public CollectionListResponse getCollectionsByName(String serverName, - int startFrom, - int pageSize, - FilterRequestBody requestBody) + public CollectionsResponse getCollectionsByName(String serverName, + int startFrom, + int pageSize, + FilterRequestBody requestBody) { final String methodName = "getCollectionsByName"; RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); - CollectionListResponse response = new CollectionListResponse(); + CollectionsResponse response = new CollectionsResponse(); AuditLog auditLog = null; try @@ -285,17 +290,17 @@ public CollectionListResponse getCollectionsByName(String serverName, * PropertyServerException there is a problem retrieving information from the property server(s). * UserNotAuthorizedException the requesting user is not authorized to issue this request. */ - public CollectionListResponse getCollectionsByType(String serverName, - int startFrom, - int pageSize, - FilterRequestBody requestBody) + public CollectionsResponse getCollectionsByType(String serverName, + int startFrom, + int pageSize, + FilterRequestBody requestBody) { final String methodName = "getCollectionsByType"; RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); - CollectionListResponse response = new CollectionListResponse(); - AuditLog auditLog = null; + CollectionsResponse response = new CollectionsResponse(); + AuditLog auditLog = null; try { @@ -1016,17 +1021,17 @@ public VoidResponse deleteCollection(String serverName, * PropertyServerException there is a problem retrieving information from the property server(s). * UserNotAuthorizedException the requesting user is not authorized to issue this request. */ - public CollectionMemberListResponse getCollectionMembers(String serverName, - String collectionGUID, - int startFrom, - int pageSize) + public CollectionMembersResponse getCollectionMembers(String serverName, + String collectionGUID, + int startFrom, + int pageSize) { final String methodName = "getCollectionMembers"; RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); - CollectionMemberListResponse response = new CollectionMemberListResponse(); - AuditLog auditLog = null; + CollectionMembersResponse response = new CollectionMembersResponse(); + AuditLog auditLog = null; try { diff --git a/open-metadata-implementation/view-services/collection-manager/collection-manager-spring/build.gradle b/open-metadata-implementation/view-services/collection-manager/collection-manager-spring/build.gradle index 9403cc7f20e..108e7f97b78 100644 --- a/open-metadata-implementation/view-services/collection-manager/collection-manager-spring/build.gradle +++ b/open-metadata-implementation/view-services/collection-manager/collection-manager-spring/build.gradle @@ -8,6 +8,7 @@ dependencies { implementation project(':open-metadata-implementation:user-security:token-controller') implementation project(':open-metadata-implementation:view-services:collection-manager:collection-manager-server') implementation project(':open-metadata-implementation:access-services:digital-service:digital-service-api') + implementation project(':open-metadata-implementation:frameworks:open-metadata-framework') implementation project(':open-metadata-implementation:common-services:ffdc-services') implementation 'org.springframework:spring-web' implementation 'io.swagger.core.v3:swagger-annotations' diff --git a/open-metadata-implementation/view-services/collection-manager/collection-manager-spring/src/main/java/org/odpi/openmetadata/viewservices/collectionmanager/server/spring/CollectionManagerResource.java b/open-metadata-implementation/view-services/collection-manager/collection-manager-spring/src/main/java/org/odpi/openmetadata/viewservices/collectionmanager/server/spring/CollectionManagerResource.java index 1bc9e2f3cd8..2080ac535f3 100644 --- a/open-metadata-implementation/view-services/collection-manager/collection-manager-spring/src/main/java/org/odpi/openmetadata/viewservices/collectionmanager/server/spring/CollectionManagerResource.java +++ b/open-metadata-implementation/view-services/collection-manager/collection-manager-spring/src/main/java/org/odpi/openmetadata/viewservices/collectionmanager/server/spring/CollectionManagerResource.java @@ -5,12 +5,12 @@ import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.accessservices.digitalservice.properties.CollectionMembershipProperties; -import org.odpi.openmetadata.accessservices.digitalservice.properties.CollectionProperties; -import org.odpi.openmetadata.accessservices.digitalservice.properties.DigitalProductProperties; -import org.odpi.openmetadata.accessservices.digitalservice.properties.ResourceListProperties; import org.odpi.openmetadata.commonservices.ffdc.rest.*; -import org.odpi.openmetadata.viewservices.collectionmanager.rest.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.collections.CollectionMembershipProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.collections.CollectionProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.digitalbusiness.DigitalProductProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.resources.ResourceListProperties; +import org.odpi.openmetadata.viewservices.collectionmanager.rest.TemplateRequestBody; import org.odpi.openmetadata.viewservices.collectionmanager.server.CollectionManagerRESTServices; import org.springframework.web.bind.annotation.*; @@ -64,13 +64,13 @@ public CollectionManagerResource() externalDocs=@ExternalDocumentation(description="Further Information", url="https://egeria-project.org/concepts/collection")) - public CollectionListResponse getAttachedCollections(@PathVariable String serverName, - @PathVariable String parentGUID, - @RequestParam(required = false, defaultValue = "0") + public CollectionsResponse getAttachedCollections(@PathVariable String serverName, + @PathVariable String parentGUID, + @RequestParam(required = false, defaultValue = "0") int startFrom, - @RequestParam(required = false, defaultValue = "0") + @RequestParam(required = false, defaultValue = "0") int pageSize, - @RequestBody(required = false) + @RequestBody(required = false) FilterRequestBody requestBody) { return restAPI.getAttachedCollections(serverName, parentGUID, startFrom, pageSize, requestBody); @@ -96,13 +96,13 @@ public CollectionListResponse getAttachedCollections(@PathVariable String externalDocs=@ExternalDocumentation(description="Further Information", url="https://egeria-project.org/concepts/collection")) - public CollectionListResponse getClassifiedCollections(@PathVariable String serverName, - @RequestParam(required = false, defaultValue = "0") + public CollectionsResponse getClassifiedCollections(@PathVariable String serverName, + @RequestParam(required = false, defaultValue = "0") int startFrom, - @RequestParam(required = false, defaultValue = "0") + @RequestParam(required = false, defaultValue = "0") int pageSize, - @RequestBody(required = false) - FilterRequestBody requestBody) + @RequestBody(required = false) + FilterRequestBody requestBody) { return restAPI.getClassifiedCollections(serverName, startFrom, pageSize, requestBody); } @@ -130,18 +130,18 @@ public CollectionListResponse getClassifiedCollections(@PathVariable String externalDocs=@ExternalDocumentation(description="Further Information", url="https://egeria-project.org/concepts/collection")) - public CollectionListResponse findCollections(@PathVariable String serverName, - @RequestParam (required = false, defaultValue = "false") + public CollectionsResponse findCollections(@PathVariable String serverName, + @RequestParam (required = false, defaultValue = "false") boolean startsWith, - @RequestParam (required = false, defaultValue = "false") + @RequestParam (required = false, defaultValue = "false") boolean endsWith, - @RequestParam (required = false, defaultValue = "false") + @RequestParam (required = false, defaultValue = "false") boolean ignoreCase, - @RequestParam (required = false, defaultValue = "0") + @RequestParam (required = false, defaultValue = "0") int startFrom, - @RequestParam (required = false, defaultValue = "0") + @RequestParam (required = false, defaultValue = "0") int pageSize, - @RequestBody (required = false) + @RequestBody (required = false) FilterRequestBody requestBody) { return restAPI.findCollections(serverName, startsWith, endsWith, ignoreCase, startFrom, pageSize, requestBody); @@ -167,12 +167,12 @@ public CollectionListResponse findCollections(@PathVariable String se externalDocs=@ExternalDocumentation(description="Further Information", url="https://egeria-project.org/concepts/collection")) - public CollectionListResponse getCollectionsByName(@PathVariable String serverName, - @RequestParam(required = false, defaultValue = "0") + public CollectionsResponse getCollectionsByName(@PathVariable String serverName, + @RequestParam(required = false, defaultValue = "0") int startFrom, - @RequestParam(required = false, defaultValue = "0") + @RequestParam(required = false, defaultValue = "0") int pageSize, - @RequestBody FilterRequestBody requestBody) + @RequestBody FilterRequestBody requestBody) { return restAPI.getCollectionsByName(serverName, startFrom, pageSize, requestBody); } @@ -197,12 +197,12 @@ public CollectionListResponse getCollectionsByName(@PathVariable String externalDocs=@ExternalDocumentation(description="Further Information", url="https://egeria-project.org/concepts/collection")) - public CollectionListResponse getCollectionsByType(@PathVariable String serverName, - @RequestParam(required = false, defaultValue = "0") + public CollectionsResponse getCollectionsByType(@PathVariable String serverName, + @RequestParam(required = false, defaultValue = "0") int startFrom, - @RequestParam(required = false, defaultValue = "0") + @RequestParam(required = false, defaultValue = "0") int pageSize, - @RequestBody(required = false) FilterRequestBody requestBody) + @RequestBody(required = false) FilterRequestBody requestBody) { return restAPI.getCollectionsByType(serverName, startFrom, pageSize, requestBody); } @@ -406,7 +406,7 @@ public GUIDResponse createDigitalProduct(@PathVariable String public VoidResponse updateCollection(@PathVariable String serverName, @PathVariable String collectionGUID, @RequestParam boolean replaceAllProperties, - @RequestBody CollectionProperties requestBody) + @RequestBody CollectionProperties requestBody) { return restAPI.updateCollection(serverName, collectionGUID, replaceAllProperties, requestBody); } @@ -545,7 +545,7 @@ public VoidResponse deleteCollection(@PathVariable String serverName, externalDocs=@ExternalDocumentation(description="Further Information", url="https://egeria-project.org/concepts/collection")) - public CollectionMemberListResponse getCollectionMembers(@PathVariable String serverName, + public CollectionMembersResponse getCollectionMembers(@PathVariable String serverName, @PathVariable String collectionGUID, @RequestParam(required = false, defaultValue = "0") int startFrom, diff --git a/open-metadata-implementation/view-services/feedback-manager/feedback-manager-server/src/main/java/org/odpi/openmetadata/viewservices/feedbackmanager/converters/CommentConverter.java b/open-metadata-implementation/view-services/feedback-manager/feedback-manager-server/src/main/java/org/odpi/openmetadata/viewservices/feedbackmanager/converters/CommentConverter.java index 8b150cb9e2a..9528445cf71 100644 --- a/open-metadata-implementation/view-services/feedback-manager/feedback-manager-server/src/main/java/org/odpi/openmetadata/viewservices/feedbackmanager/converters/CommentConverter.java +++ b/open-metadata-implementation/view-services/feedback-manager/feedback-manager-server/src/main/java/org/odpi/openmetadata/viewservices/feedbackmanager/converters/CommentConverter.java @@ -9,7 +9,7 @@ import org.odpi.openmetadata.frameworks.openmetadata.enums.CommentType; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; import org.odpi.openmetadata.viewservices.feedbackmanager.metadataelements.CommentElement; -import org.odpi.openmetadata.viewservices.feedbackmanager.properties.CommentProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.feedback.CommentProperties; import java.lang.reflect.InvocationTargetException; diff --git a/open-metadata-implementation/view-services/feedback-manager/feedback-manager-server/src/main/java/org/odpi/openmetadata/viewservices/feedbackmanager/converters/InformalTagConverter.java b/open-metadata-implementation/view-services/feedback-manager/feedback-manager-server/src/main/java/org/odpi/openmetadata/viewservices/feedbackmanager/converters/InformalTagConverter.java index 99f1ace6bb1..16775cb56af 100644 --- a/open-metadata-implementation/view-services/feedback-manager/feedback-manager-server/src/main/java/org/odpi/openmetadata/viewservices/feedbackmanager/converters/InformalTagConverter.java +++ b/open-metadata-implementation/view-services/feedback-manager/feedback-manager-server/src/main/java/org/odpi/openmetadata/viewservices/feedbackmanager/converters/InformalTagConverter.java @@ -7,7 +7,7 @@ import org.odpi.openmetadata.frameworks.governanceaction.search.ElementProperties; import org.odpi.openmetadata.frameworks.governanceaction.search.PropertyHelper; import org.odpi.openmetadata.viewservices.feedbackmanager.metadataelements.InformalTagElement; -import org.odpi.openmetadata.viewservices.feedbackmanager.properties.InformalTagProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.feedback.InformalTagProperties; import java.lang.reflect.InvocationTargetException; diff --git a/open-metadata-implementation/view-services/feedback-manager/feedback-manager-server/src/main/java/org/odpi/openmetadata/viewservices/feedbackmanager/converters/LikeConverter.java b/open-metadata-implementation/view-services/feedback-manager/feedback-manager-server/src/main/java/org/odpi/openmetadata/viewservices/feedbackmanager/converters/LikeConverter.java index b02b77004a7..088e4886c4c 100644 --- a/open-metadata-implementation/view-services/feedback-manager/feedback-manager-server/src/main/java/org/odpi/openmetadata/viewservices/feedbackmanager/converters/LikeConverter.java +++ b/open-metadata-implementation/view-services/feedback-manager/feedback-manager-server/src/main/java/org/odpi/openmetadata/viewservices/feedbackmanager/converters/LikeConverter.java @@ -6,7 +6,7 @@ import org.odpi.openmetadata.frameworks.governanceaction.properties.OpenMetadataElement; import org.odpi.openmetadata.frameworks.governanceaction.search.PropertyHelper; import org.odpi.openmetadata.viewservices.feedbackmanager.metadataelements.LikeElement; -import org.odpi.openmetadata.viewservices.feedbackmanager.properties.LikeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.feedback.LikeProperties; import java.lang.reflect.InvocationTargetException; diff --git a/open-metadata-implementation/view-services/feedback-manager/feedback-manager-server/src/main/java/org/odpi/openmetadata/viewservices/feedbackmanager/converters/NoteConverter.java b/open-metadata-implementation/view-services/feedback-manager/feedback-manager-server/src/main/java/org/odpi/openmetadata/viewservices/feedbackmanager/converters/NoteConverter.java index 7da3dbbe694..990b3eeffe1 100644 --- a/open-metadata-implementation/view-services/feedback-manager/feedback-manager-server/src/main/java/org/odpi/openmetadata/viewservices/feedbackmanager/converters/NoteConverter.java +++ b/open-metadata-implementation/view-services/feedback-manager/feedback-manager-server/src/main/java/org/odpi/openmetadata/viewservices/feedbackmanager/converters/NoteConverter.java @@ -7,7 +7,7 @@ import org.odpi.openmetadata.frameworks.governanceaction.search.ElementProperties; import org.odpi.openmetadata.frameworks.governanceaction.search.PropertyHelper; import org.odpi.openmetadata.viewservices.feedbackmanager.metadataelements.NoteElement; -import org.odpi.openmetadata.viewservices.feedbackmanager.properties.NoteProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.feedback.NoteProperties; import java.lang.reflect.InvocationTargetException; diff --git a/open-metadata-implementation/view-services/feedback-manager/feedback-manager-server/src/main/java/org/odpi/openmetadata/viewservices/feedbackmanager/converters/NoteLogConverter.java b/open-metadata-implementation/view-services/feedback-manager/feedback-manager-server/src/main/java/org/odpi/openmetadata/viewservices/feedbackmanager/converters/NoteLogConverter.java index ad63a4cdf57..62aae34d504 100644 --- a/open-metadata-implementation/view-services/feedback-manager/feedback-manager-server/src/main/java/org/odpi/openmetadata/viewservices/feedbackmanager/converters/NoteLogConverter.java +++ b/open-metadata-implementation/view-services/feedback-manager/feedback-manager-server/src/main/java/org/odpi/openmetadata/viewservices/feedbackmanager/converters/NoteLogConverter.java @@ -7,7 +7,7 @@ import org.odpi.openmetadata.frameworks.governanceaction.search.ElementProperties; import org.odpi.openmetadata.frameworks.governanceaction.search.PropertyHelper; import org.odpi.openmetadata.viewservices.feedbackmanager.metadataelements.NoteLogElement; -import org.odpi.openmetadata.viewservices.feedbackmanager.properties.NoteLogProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.feedback.NoteLogProperties; import java.lang.reflect.InvocationTargetException; diff --git a/open-metadata-implementation/view-services/feedback-manager/feedback-manager-server/src/main/java/org/odpi/openmetadata/viewservices/feedbackmanager/converters/RatingConverter.java b/open-metadata-implementation/view-services/feedback-manager/feedback-manager-server/src/main/java/org/odpi/openmetadata/viewservices/feedbackmanager/converters/RatingConverter.java index 4c4c2680cb0..fb001a2ad82 100644 --- a/open-metadata-implementation/view-services/feedback-manager/feedback-manager-server/src/main/java/org/odpi/openmetadata/viewservices/feedbackmanager/converters/RatingConverter.java +++ b/open-metadata-implementation/view-services/feedback-manager/feedback-manager-server/src/main/java/org/odpi/openmetadata/viewservices/feedbackmanager/converters/RatingConverter.java @@ -9,7 +9,7 @@ import org.odpi.openmetadata.frameworks.openmetadata.enums.StarRating; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; import org.odpi.openmetadata.viewservices.feedbackmanager.metadataelements.RatingElement; -import org.odpi.openmetadata.viewservices.feedbackmanager.properties.RatingProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.feedback.RatingProperties; import java.lang.reflect.InvocationTargetException; diff --git a/open-metadata-implementation/view-services/feedback-manager/feedback-manager-server/src/main/java/org/odpi/openmetadata/viewservices/feedbackmanager/handler/CollaborationManagerHandler.java b/open-metadata-implementation/view-services/feedback-manager/feedback-manager-server/src/main/java/org/odpi/openmetadata/viewservices/feedbackmanager/handler/CollaborationManagerHandler.java index e8873988af9..edbaa88bac8 100644 --- a/open-metadata-implementation/view-services/feedback-manager/feedback-manager-server/src/main/java/org/odpi/openmetadata/viewservices/feedbackmanager/handler/CollaborationManagerHandler.java +++ b/open-metadata-implementation/view-services/feedback-manager/feedback-manager-server/src/main/java/org/odpi/openmetadata/viewservices/feedbackmanager/handler/CollaborationManagerHandler.java @@ -9,7 +9,7 @@ import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStatus; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ElementStatus; import org.odpi.openmetadata.frameworks.governanceaction.properties.OpenMetadataElement; import org.odpi.openmetadata.frameworks.governanceaction.properties.OpenMetadataRelationship; import org.odpi.openmetadata.frameworks.governanceaction.properties.RelatedMetadataElement; @@ -19,11 +19,11 @@ import org.odpi.openmetadata.frameworks.governanceaction.search.SequencingOrder; import org.odpi.openmetadata.frameworks.openmetadata.enums.CommentType; import org.odpi.openmetadata.frameworks.openmetadata.enums.StarRating; +import org.odpi.openmetadata.frameworks.openmetadata.properties.feedback.*; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.viewservices.feedbackmanager.converters.*; import org.odpi.openmetadata.viewservices.feedbackmanager.metadataelements.*; -import org.odpi.openmetadata.viewservices.feedbackmanager.properties.*; import java.util.*; @@ -511,9 +511,9 @@ private List getLikesFromRelatedMetadataElement(List
          - * InformalTags have the userId of the person who added the tag, the name of the tag and its description. - *

          - * The content of the tag is a personal judgement (which is why the user's id is in the tag) - * and there is no formal review of the tags. However, they can be used as a basis for crowd-sourcing - * Glossary terms. - *

          - * Private InformalTags are only returned to the user that created them. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class InformalTagProperties -{ - private boolean isPrivateTag = false; - private String name = null; - private String description = null; - private String user = null; - - - /** - * Default constructor - */ - public InformalTagProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template element to copy - */ - public InformalTagProperties(InformalTagProperties template) - { - if (template != null) - { - isPrivateTag = template.getIsPrivateTag(); - user = template.getUser(); - name = template.getName(); - description = template.getDescription(); - } - } - - - /** - * Return boolean flag to say whether the tag is private or not. A private tag is only seen by the - * person who set it up. Public tags are visible to everyone. - * - * @return boolean is private flag - */ - public boolean getIsPrivateTag() { - return isPrivateTag; - } - - - /** - * Set up boolean flag to say whether the tag is private or not. A private tag is only seen by the - * person who set it up. Public tags are visible to everyone. - * - * @param privateTag indicator of a private tag - */ - public void setIsPrivateTag(boolean privateTag) - { - isPrivateTag = privateTag; - } - - - /** - * Return the user id of the person who created the tag. Null means the user id is not known. - * - * @return String tagging user - */ - public String getUser() { - return user; - } - - - /** - * Set up the user id of the person who created the tag. Null means the user id is not known. - * - * @param user String identifier of the creator of the tag. - */ - public void setUser(String user) - { - this.user = user; - } - - - /** - * Return the name of the tag. It is not valid to have a tag with no name. However, there is a point where - * the tag object is created and the tag name not yet set, so null is a possible response. - * - * @return String tag name - */ - public String getName() { - return name; - } - - - /** - * Set up the name of the tag. It is not valid to have a tag with no name. However, there is a point where - * the tag object is created and the tag name not yet set, so null is a possible response. - * - * @param name String tag name - */ - public void setName(String name) - { - this.name = name; - } - - - /** - * Return the tag description null means no description is available. - * - * @return String tag description - */ - public String getDescription() - { - return description; - } - - - /** - * Set up the tag description null means no description is available. - * - * @param tagDescription tag description - */ - public void setDescription(String tagDescription) { - this.description = tagDescription; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "InformalTagProperties{" + - ", isPrivateTag=" + isPrivateTag + - ", name='" + name + '\'' + - ", description='" + description + '\'' + - ", user='" + user + '\'' + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof InformalTagProperties)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - InformalTagProperties that = (InformalTagProperties) objectToCompare; - return getIsPrivateTag() == that.getIsPrivateTag() && - Objects.equals(getName(), that.getName()) && - Objects.equals(getDescription(), that.getDescription()) && - Objects.equals(getUser(), that.getUser()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(isPrivateTag, name, description, user); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/view-services/feedback-manager/feedback-manager-server/src/main/java/org/odpi/openmetadata/viewservices/feedbackmanager/properties/LikeProperties.java b/open-metadata-implementation/view-services/feedback-manager/feedback-manager-server/src/main/java/org/odpi/openmetadata/viewservices/feedbackmanager/properties/LikeProperties.java deleted file mode 100644 index 7ebfbeeb420..00000000000 --- a/open-metadata-implementation/view-services/feedback-manager/feedback-manager-server/src/main/java/org/odpi/openmetadata/viewservices/feedbackmanager/properties/LikeProperties.java +++ /dev/null @@ -1,115 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.feedbackmanager.properties; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * The LikeProperties object records a single user's "like" of an element. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class LikeProperties -{ - private String user = null; - - - /** - * Default constructor - */ - public LikeProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template element to copy - */ - public LikeProperties(LikeProperties template) - { - if (template != null) - { - user = template.getUser(); - } - } - - - /** - * Return the user id of the person who created the like. Null means the user id is not known. - * - * @return String liking user - */ - public String getUser() { - return user; - } - - - /** - * Set up the user id of the person who created the like. Null means the user id is not known. - * - * @param user String liking user - */ - public void setUser(String user) - { - this.user = user; - } - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "LikeProperties{" + - "user='" + user + '\'' + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - LikeProperties like = (LikeProperties) objectToCompare; - return Objects.equals(getUser(), like.getUser()); - } - - - /** - * Hash of properties - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(user); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/view-services/feedback-manager/feedback-manager-server/src/main/java/org/odpi/openmetadata/viewservices/feedbackmanager/properties/NoteLogProperties.java b/open-metadata-implementation/view-services/feedback-manager/feedback-manager-server/src/main/java/org/odpi/openmetadata/viewservices/feedbackmanager/properties/NoteLogProperties.java deleted file mode 100644 index 0b0adc30ffd..00000000000 --- a/open-metadata-implementation/view-services/feedback-manager/feedback-manager-server/src/main/java/org/odpi/openmetadata/viewservices/feedbackmanager/properties/NoteLogProperties.java +++ /dev/null @@ -1,151 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.feedbackmanager.properties; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * NoteLogHeader manages a list of notes for an element - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class NoteLogProperties extends ReferenceableProperties -{ - - protected String displayName = null; - protected String description = null; - - - /** - * Default constructor - */ - public NoteLogProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template note log to copy - */ - public NoteLogProperties(NoteLogProperties template) - { - super(template); - - if (template != null) - { - displayName = template.getDisplayName(); - description = template.getDescription(); - } - } - - - /** - * Return the stored display name property for the note log. - * If no display name is available then null is returned. - * - * @return String Name - */ - public String getDisplayName() - { - return displayName; - } - - - /** - * Set up the stored display name property for the note log. - * - * @param displayName - String name - */ - public void setDisplayName(String displayName) - { - this.displayName = displayName; - } - - - /** - * Return the stored description property for the note log. - * If no description is provided then null is returned. - * - * @return description - */ - public String getDescription() - { - return description; - } - - - /** - * Set up the stored description property for the note log. - * - * @param description String text - */ - public void setDescription(String description) - { - this.description = description; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "NoteLogProperties{" + - "displayName='" + displayName + '\'' + - ", description='" + description + '\'' + - "} " + super.toString(); - } - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - NoteLogProperties noteLog = (NoteLogProperties) objectToCompare; - return Objects.equals(getDisplayName(), noteLog.getDisplayName()) && - Objects.equals(getDescription(), noteLog.getDescription()); - } - - - /** - * Hash of properties - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), getDisplayName(), getDescription()); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/view-services/feedback-manager/feedback-manager-server/src/main/java/org/odpi/openmetadata/viewservices/feedbackmanager/properties/NoteProperties.java b/open-metadata-implementation/view-services/feedback-manager/feedback-manager-server/src/main/java/org/odpi/openmetadata/viewservices/feedbackmanager/properties/NoteProperties.java deleted file mode 100644 index 5a186b93edc..00000000000 --- a/open-metadata-implementation/view-services/feedback-manager/feedback-manager-server/src/main/java/org/odpi/openmetadata/viewservices/feedbackmanager/properties/NoteProperties.java +++ /dev/null @@ -1,144 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.feedbackmanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * Note defines the properties of a single note in a note log. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class NoteProperties extends ReferenceableProperties -{ - private String title = null; - private String text = null; - - - - /** - * Default constructor - */ - public NoteProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template note to copy - */ - public NoteProperties(NoteProperties template) - { - super(template); - - if (template != null) - { - title = template.getTitle(); - text = template.getText(); - } - } - - - /** - * Return the title. - * - * @return string - */ - public String getTitle() - { - return title; - } - - - /** - * Set up the title. - * - * @param title string - */ - public void setTitle(String title) - { - this.title = title; - } - - - /** - * Return the text of the note. - * - * @return String text - */ - public String getText() { return text; } - - - /** - * Set up the text of the note. - * - * @param text String text - */ - public void setText(String text) - { - this.text = text; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "NoteProperties{" + - "title='" + title + '\'' + - ", text='" + text + '\'' + - "} " + super.toString(); - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (! (objectToCompare instanceof NoteProperties that)) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - return Objects.equals(title, that.title) && Objects.equals(text, that.text); - } - - - /** - * Hash of properties - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), title, text); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/view-services/feedback-manager/feedback-manager-server/src/main/java/org/odpi/openmetadata/viewservices/feedbackmanager/properties/RatingProperties.java b/open-metadata-implementation/view-services/feedback-manager/feedback-manager-server/src/main/java/org/odpi/openmetadata/viewservices/feedbackmanager/properties/RatingProperties.java deleted file mode 100644 index b81b03dea91..00000000000 --- a/open-metadata-implementation/view-services/feedback-manager/feedback-manager-server/src/main/java/org/odpi/openmetadata/viewservices/feedbackmanager/properties/RatingProperties.java +++ /dev/null @@ -1,148 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.feedbackmanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.openmetadata.enums.StarRating; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * RatingProperties stores information about a rating connected to an asset. Ratings provide informal feedback on the quality of assets - * and can be added at any time. - *

          - * Ratings have the userId of the person who added it, a star rating and an optional review comment. - *

          - * The content of the rating is a personal judgement (which is why the user's id is in the object) - * and there is no formal review of the ratings. However, they can be used as a basis for crowd-sourcing - * feedback to asset owners. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class RatingProperties -{ - private StarRating starRating = null; - private String review = null; - - /** - * Default constructor - */ - public RatingProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template element to copy - */ - public RatingProperties(RatingProperties template) - { - if (template != null) - { - starRating = template.getStarRating(); - review = template.getReview(); - } - } - - - /** - * Return the stars for the rating. - * - * @return StarRating enum - */ - public StarRating getStarRating() { - return starRating; - } - - - /** - * Set up the stars for the rating. - * - * @param starRating StarRating enum - */ - public void setStarRating(StarRating starRating) - { - this.starRating = starRating; - } - - - /** - * Return the review comments - null means no review is available. - * - * @return String review comments - */ - public String getReview() - { - return review; - } - - - /** - * Set up the review comments - null means no review is available. - * - * @param review String review comments - */ - public void setReview(String review) - { - this.review = review; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "RatingProperties{" + - "starRating=" + starRating + - ", review='" + review + '\'' + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - RatingProperties rating = (RatingProperties) objectToCompare; - return getStarRating() == rating.getStarRating() && - Objects.equals(getReview(), rating.getReview()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(starRating, review); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/view-services/feedback-manager/feedback-manager-server/src/main/java/org/odpi/openmetadata/viewservices/feedbackmanager/properties/ReferenceableProperties.java b/open-metadata-implementation/view-services/feedback-manager/feedback-manager-server/src/main/java/org/odpi/openmetadata/viewservices/feedbackmanager/properties/ReferenceableProperties.java deleted file mode 100644 index 0989b41301a..00000000000 --- a/open-metadata-implementation/view-services/feedback-manager/feedback-manager-server/src/main/java/org/odpi/openmetadata/viewservices/feedbackmanager/properties/ReferenceableProperties.java +++ /dev/null @@ -1,322 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.feedbackmanager.properties; - -import com.fasterxml.jackson.annotation.*; - -import java.util.Date; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * Many open metadata entities are referenceable. It means that they have a qualified name and additional - * properties. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes( - { - @JsonSubTypes.Type(value = CommentProperties.class, name = "CommentProperties"), - @JsonSubTypes.Type(value = NoteLogProperties.class, name = "NoteLogProperties"), - @JsonSubTypes.Type(value = NoteProperties.class, name = "NoteProperties"), - }) -public class ReferenceableProperties -{ - private String qualifiedName = null; - private Map additionalProperties = null; - - private Date effectiveFrom = null; - private Date effectiveTo = null; - - private Map vendorProperties = null; - - private String typeName = null; - private Map extendedProperties = null; - - /** - * Default constructor - */ - public ReferenceableProperties() - { - super(); - } - - - /** - * Copy/clone constructor. Retrieve values from the supplied template - * - * @param template element to copy - */ - public ReferenceableProperties(ReferenceableProperties template) - { - if (template != null) - { - qualifiedName = template.getQualifiedName(); - additionalProperties = template.getAdditionalProperties(); - - effectiveFrom = template.getEffectiveFrom(); - effectiveTo = template.getEffectiveTo(); - - vendorProperties = template.getVendorProperties(); - - typeName = template.getTypeName(); - extendedProperties = template.getExtendedProperties(); - } - } - - - /** - * Set up the fully qualified name. - * - * @param qualifiedName String name - */ - public void setQualifiedName(String qualifiedName) - { - this.qualifiedName = qualifiedName; - } - - - /** - * Returns the stored qualified name property for the metadata entity. - * If no qualified name is available then the empty string is returned. - * - * @return qualifiedName - */ - public String getQualifiedName() - { - return qualifiedName; - } - - - /** - * Set up additional properties. - * - * @param additionalProperties Additional properties object - */ - public void setAdditionalProperties(Map additionalProperties) - { - this.additionalProperties = additionalProperties; - } - - - /** - * Return a copy of the additional properties. Null means no additional properties are available. - * - * @return AdditionalProperties - */ - public Map getAdditionalProperties() - { - if (additionalProperties == null) - { - return null; - } - else if (additionalProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(additionalProperties); - } - } - - - /** - * Return the date/time that this element is effective from (null means effective from the epoch). - * - * @return date object - */ - public Date getEffectiveFrom() - { - return effectiveFrom; - } - - - /** - * Set up the date/time that this element is effective from (null means effective from the epoch). - * - * @param effectiveFrom date object - */ - public void setEffectiveFrom(Date effectiveFrom) - { - this.effectiveFrom = effectiveFrom; - } - - - /** - * Return the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @return date object - */ - public Date getEffectiveTo() - { - return effectiveTo; - } - - - /** - * Set the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @param effectiveTo date object - */ - public void setEffectiveTo(Date effectiveTo) - { - this.effectiveTo = effectiveTo; - } - - - /** - * Return specific properties for the specific technology vendor. - * - * @return name value pairs - */ - public Map getVendorProperties() - { - if (vendorProperties == null) - { - return null; - } - else if (vendorProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(vendorProperties); - } - } - - - /** - * Set up specific properties for the specific technology vendor. - * - * @param vendorProperties name value pairs - */ - public void setVendorProperties(Map vendorProperties) - { - this.vendorProperties = vendorProperties; - } - - - /** - * Return the name of the open metadata type for this metadata element. - * - * @return string name - */ - public String getTypeName() - { - return typeName; - } - - - /** - * Set up the name of the open metadata type for this element. - * - * @param typeName string name - */ - public void setTypeName(String typeName) - { - this.typeName = typeName; - } - - - /** - * Return the properties that have been defined for a subtype of this object that are not supported explicitly - * by this bean. - * - * @return property map - */ - public Map getExtendedProperties() - { - if (extendedProperties == null) - { - return null; - } - else if (extendedProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(extendedProperties); - } - } - - - /** - * Set up the properties that have been defined for a subtype of this object that are not supported explicitly - * by this bean. - * - * @param extendedProperties property map - */ - public void setExtendedProperties(Map extendedProperties) - { - this.extendedProperties = extendedProperties; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "ReferenceableProperties{" + - "qualifiedName='" + qualifiedName + '\'' + - ", additionalProperties=" + additionalProperties + - ", vendorProperties=" + vendorProperties + - ", typeName='" + typeName + '\'' + - ", extendedProperties=" + extendedProperties + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - ReferenceableProperties that = (ReferenceableProperties) objectToCompare; - return Objects.equals(qualifiedName, that.qualifiedName) && - Objects.equals(additionalProperties, that.additionalProperties) && - Objects.equals(effectiveFrom, that.effectiveFrom) && - Objects.equals(effectiveTo, that.effectiveTo) && - Objects.equals(vendorProperties, that.vendorProperties) && - Objects.equals(typeName, that.typeName) && - Objects.equals(extendedProperties, that.extendedProperties); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(qualifiedName, additionalProperties, effectiveFrom, effectiveTo, vendorProperties, typeName, extendedProperties); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/view-services/feedback-manager/feedback-manager-server/src/main/java/org/odpi/openmetadata/viewservices/feedbackmanager/properties/RelationshipProperties.java b/open-metadata-implementation/view-services/feedback-manager/feedback-manager-server/src/main/java/org/odpi/openmetadata/viewservices/feedbackmanager/properties/RelationshipProperties.java deleted file mode 100644 index 945370e4aad..00000000000 --- a/open-metadata-implementation/view-services/feedback-manager/feedback-manager-server/src/main/java/org/odpi/openmetadata/viewservices/feedbackmanager/properties/RelationshipProperties.java +++ /dev/null @@ -1,190 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.feedbackmanager.properties; - -import com.fasterxml.jackson.annotation.*; - -import java.util.Date; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * RelationshipProperties provides the base class for relationships items. This provides extended properties with the ability to - * set effectivity dates. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "class") -@JsonSubTypes( - { - @JsonSubTypes.Type(value = FeedbackProperties.class, name = "FeedbackProperties"), - }) -public class RelationshipProperties -{ - private Date effectiveFrom = null; - private Date effectiveTo = null; - - private Map extendedProperties = null; - - - /** - * Default constructor - */ - public RelationshipProperties() - { - super(); - } - - - /** - * Copy/clone constructor. Retrieve values from the supplied template - * - * @param template element to copy - */ - public RelationshipProperties(RelationshipProperties template) - { - if (template != null) - { - effectiveFrom = template.getEffectiveFrom(); - effectiveTo = template.getEffectiveTo(); - extendedProperties = template.getExtendedProperties(); - } - } - - - /** - * Return the date/time that this element is effective from (null means effective from the epoch). - * - * @return date object - */ - public Date getEffectiveFrom() - { - return effectiveFrom; - } - - - /** - * Set up the date/time that this element is effective from (null means effective from the epoch). - * - * @param effectiveFrom date object - */ - public void setEffectiveFrom(Date effectiveFrom) - { - this.effectiveFrom = effectiveFrom; - } - - - /** - * Return the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @return date object - */ - public Date getEffectiveTo() - { - return effectiveTo; - } - - - /** - * Set the date/time that element is effective to (null means that it is effective indefinitely into the future). - * - * @param effectiveTo date object - */ - public void setEffectiveTo(Date effectiveTo) - { - this.effectiveTo = effectiveTo; - } - - - /** - * Return the properties that have been defined for a subtype of this object that are not supported explicitly - * by this bean. - * - * @return property map - */ - public Map getExtendedProperties() - { - if (extendedProperties == null) - { - return null; - } - else if (extendedProperties.isEmpty()) - { - return null; - } - else - { - return new HashMap<>(extendedProperties); - } - } - - - /** - * Set up the properties that have been defined for a subtype of this object that are not supported explicitly - * by this bean. - * - * @param extendedProperties property map - */ - public void setExtendedProperties(Map extendedProperties) - { - this.extendedProperties = extendedProperties; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "RelationshipProperties{" + - "effectiveFrom=" + effectiveFrom + - ", effectiveTo=" + effectiveTo + - ", extendedProperties=" + extendedProperties + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - RelationshipProperties that = (RelationshipProperties) objectToCompare; - return Objects.equals(effectiveFrom, that.effectiveFrom) && - Objects.equals(effectiveTo, that.effectiveTo); - } - - - /** - * Return hash code based on properties. - * - * @return int - */ - @Override - public int hashCode() - { - return Objects.hash(effectiveFrom, effectiveTo); - } -} \ No newline at end of file diff --git a/open-metadata-implementation/view-services/feedback-manager/feedback-manager-server/src/main/java/org/odpi/openmetadata/viewservices/feedbackmanager/properties/TagProperties.java b/open-metadata-implementation/view-services/feedback-manager/feedback-manager-server/src/main/java/org/odpi/openmetadata/viewservices/feedbackmanager/properties/TagProperties.java deleted file mode 100644 index a5805c9da36..00000000000 --- a/open-metadata-implementation/view-services/feedback-manager/feedback-manager-server/src/main/java/org/odpi/openmetadata/viewservices/feedbackmanager/properties/TagProperties.java +++ /dev/null @@ -1,187 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.feedbackmanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * TagProperties stores information about a tag connected to an asset. - * InformalTags provide informal classifications to assets - * and can be added at any time. - *

          - * InformalTags have the userId of the person who added the tag, the name of the tag and its description. - *

          - * The content of the tag is a personal judgement (which is why the user's id is in the tag) - * and there is no formal review of the tags. However, they can be used as a basis for crowd-sourcing - * Glossary terms. - *

          - * Private InformalTags are only returned to the user that created them. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class TagProperties -{ - private boolean isPrivateTag = false; - private String name = null; - private String description = null; - - - /** - * Default constructor - */ - public TagProperties() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template element to copy - */ - public TagProperties(TagProperties template) - { - if (template != null) - { - isPrivateTag = template.getIsPrivateTag(); - name = template.getName(); - description = template.getDescription(); - } - } - - - /** - * Return boolean flag to say whether the tag is private or not. A private tag is only seen by the - * person who set it up. Public tags are visible to everyone. - * - * @return boolean is private flag - */ - public boolean getIsPrivateTag() { - return isPrivateTag; - } - - - /** - * Set up boolean flag to say whether the tag is private or not. A private tag is only seen by the - * person who set it up. Public tags are visible to everyone. - * - * @param privateTag indicator of a private tag - */ - public void setIsPrivateTag(boolean privateTag) - { - isPrivateTag = privateTag; - } - - - /** - * Return the name of the tag. It is not valid to have a tag with no name. However, there is a point where - * the tag object is created and the tag name not yet set, so null is a possible response. - * - * @return String tag name - */ - public String getName() { - return name; - } - - - /** - * Set up the name of the tag. It is not valid to have a tag with no name. However, there is a point where - * the tag object is created and the tag name not yet set, so null is a possible response. - * - * @param name String tag name - */ - public void setName(String name) - { - this.name = name; - } - - - /** - * Return the tag description null means no description is available. - * - * @return String tag description - */ - public String getDescription() - { - return description; - } - - - /** - * Set up the tag description null means no description is available. - * - * @param tagDescription tag description - */ - public void setDescription(String tagDescription) { - this.description = tagDescription; - } - - - /** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ - @Override - public String toString() - { - return "TagProperties{" + - "isPrivateTag=" + isPrivateTag + - ", name='" + name + '\'' + - ", description='" + description + '\'' + - '}'; - } - - - /** - * Compare the values of the supplied object with those stored in the current object. - * - * @param objectToCompare supplied object - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (! (objectToCompare instanceof TagProperties that)) - { - return false; - } - - if (isPrivateTag != that.isPrivateTag) - { - return false; - } - if (name != null ? ! name.equals(that.name) : that.name != null) - { - return false; - } - return description != null ? description.equals(that.description) : that.description == null; - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - int result = (isPrivateTag ? 1 : 0); - result = 31 * result + (name != null ? name.hashCode() : 0); - result = 31 * result + (description != null ? description.hashCode() : 0); - return result; - } -} \ No newline at end of file diff --git a/open-metadata-implementation/view-services/feedback-manager/feedback-manager-server/src/main/java/org/odpi/openmetadata/viewservices/feedbackmanager/rest/ReferenceableUpdateRequestBody.java b/open-metadata-implementation/view-services/feedback-manager/feedback-manager-server/src/main/java/org/odpi/openmetadata/viewservices/feedbackmanager/rest/ReferenceableUpdateRequestBody.java index f4da92dc882..fe0162b9bc3 100644 --- a/open-metadata-implementation/view-services/feedback-manager/feedback-manager-server/src/main/java/org/odpi/openmetadata/viewservices/feedbackmanager/rest/ReferenceableUpdateRequestBody.java +++ b/open-metadata-implementation/view-services/feedback-manager/feedback-manager-server/src/main/java/org/odpi/openmetadata/viewservices/feedbackmanager/rest/ReferenceableUpdateRequestBody.java @@ -5,7 +5,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.viewservices.feedbackmanager.properties.ReferenceableProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ReferenceableProperties; import java.util.Date; import java.util.Objects; diff --git a/open-metadata-implementation/view-services/feedback-manager/feedback-manager-server/src/main/java/org/odpi/openmetadata/viewservices/feedbackmanager/rest/RelationshipRequestBody.java b/open-metadata-implementation/view-services/feedback-manager/feedback-manager-server/src/main/java/org/odpi/openmetadata/viewservices/feedbackmanager/rest/RelationshipRequestBody.java index 20c615c1fad..701ac65d3a0 100644 --- a/open-metadata-implementation/view-services/feedback-manager/feedback-manager-server/src/main/java/org/odpi/openmetadata/viewservices/feedbackmanager/rest/RelationshipRequestBody.java +++ b/open-metadata-implementation/view-services/feedback-manager/feedback-manager-server/src/main/java/org/odpi/openmetadata/viewservices/feedbackmanager/rest/RelationshipRequestBody.java @@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.viewservices.feedbackmanager.properties.RelationshipProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; import java.util.Objects; diff --git a/open-metadata-implementation/view-services/feedback-manager/feedback-manager-server/src/main/java/org/odpi/openmetadata/viewservices/feedbackmanager/server/FeedbackManagerRESTServices.java b/open-metadata-implementation/view-services/feedback-manager/feedback-manager-server/src/main/java/org/odpi/openmetadata/viewservices/feedbackmanager/server/FeedbackManagerRESTServices.java index 00f72639b30..05320833b75 100644 --- a/open-metadata-implementation/view-services/feedback-manager/feedback-manager-server/src/main/java/org/odpi/openmetadata/viewservices/feedbackmanager/server/FeedbackManagerRESTServices.java +++ b/open-metadata-implementation/view-services/feedback-manager/feedback-manager-server/src/main/java/org/odpi/openmetadata/viewservices/feedbackmanager/server/FeedbackManagerRESTServices.java @@ -6,13 +6,14 @@ import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; -import org.odpi.openmetadata.commonservices.ffdc.rest.*; +import org.odpi.openmetadata.commonservices.ffdc.rest.FilterRequestBody; +import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; +import org.odpi.openmetadata.frameworks.openmetadata.properties.feedback.*; import org.odpi.openmetadata.tokencontroller.TokenController; import org.odpi.openmetadata.viewservices.feedbackmanager.handler.CollaborationManagerHandler; -import org.odpi.openmetadata.viewservices.feedbackmanager.properties.*; import org.odpi.openmetadata.viewservices.feedbackmanager.rest.*; -import org.odpi.openmetadata.viewservices.feedbackmanager.rest.RelationshipRequestBody; import org.slf4j.LoggerFactory; import java.util.Date; @@ -990,7 +991,7 @@ public CommentElementsResponse findComments(String serverName, boolean ignoreCase, String viewServiceURLMarker, String accessServiceURLMarker, - FilterRequestBody requestBody) + FilterRequestBody requestBody) { final String methodName = "findComments"; diff --git a/open-metadata-implementation/view-services/feedback-manager/feedback-manager-spring/build.gradle b/open-metadata-implementation/view-services/feedback-manager/feedback-manager-spring/build.gradle index 0fd96962fb7..cd465abcf61 100644 --- a/open-metadata-implementation/view-services/feedback-manager/feedback-manager-spring/build.gradle +++ b/open-metadata-implementation/view-services/feedback-manager/feedback-manager-spring/build.gradle @@ -8,6 +8,7 @@ dependencies { implementation project(':open-metadata-implementation:user-security:token-controller') implementation project(':open-metadata-implementation:view-services:feedback-manager:feedback-manager-server') implementation project(':open-metadata-implementation:common-services:ffdc-services') + implementation project(':open-metadata-implementation:frameworks:open-metadata-framework') implementation project(':open-metadata-implementation:frameworks:open-connector-framework') implementation project(':open-metadata-implementation:frameworks:governance-action-framework') implementation project(':open-metadata-implementation:framework-services:gaf-metadata-management:gaf-metadata-api') diff --git a/open-metadata-implementation/view-services/feedback-manager/feedback-manager-spring/src/main/java/org/odpi/openmetadata/viewservices/feedbackmanager/server/spring/FeedbackManagerResource.java b/open-metadata-implementation/view-services/feedback-manager/feedback-manager-spring/src/main/java/org/odpi/openmetadata/viewservices/feedbackmanager/server/spring/FeedbackManagerResource.java index aafeee33913..92a295ecb31 100644 --- a/open-metadata-implementation/view-services/feedback-manager/feedback-manager-spring/src/main/java/org/odpi/openmetadata/viewservices/feedbackmanager/server/spring/FeedbackManagerResource.java +++ b/open-metadata-implementation/view-services/feedback-manager/feedback-manager-spring/src/main/java/org/odpi/openmetadata/viewservices/feedbackmanager/server/spring/FeedbackManagerResource.java @@ -5,8 +5,10 @@ import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.commonservices.ffdc.rest.*; -import org.odpi.openmetadata.viewservices.feedbackmanager.properties.*; +import org.odpi.openmetadata.commonservices.ffdc.rest.FilterRequestBody; +import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; +import org.odpi.openmetadata.frameworks.openmetadata.properties.feedback.*; import org.odpi.openmetadata.viewservices.feedbackmanager.rest.*; import org.odpi.openmetadata.viewservices.feedbackmanager.server.FeedbackManagerRESTServices; import org.springframework.web.bind.annotation.*; @@ -71,7 +73,7 @@ public GUIDResponse addCommentReply(@PathVariable String String viewServiceURLMarker, @RequestParam (required = false, defaultValue = "asset-manager") String accessServiceURLMarker, - @RequestBody ReferenceableUpdateRequestBody requestBody) + @RequestBody ReferenceableUpdateRequestBody requestBody) { return restAPI.addCommentReply(serverName, elementGUID, commentGUID, isPublic, viewServiceURLMarker, accessServiceURLMarker, requestBody); } @@ -394,7 +396,7 @@ public InformalTagsResponse getTagsByName(@PathVariable String serverNa String viewServiceURLMarker, @RequestParam (required = false, defaultValue = "asset-manager") String accessServiceURLMarker, - @RequestBody FilterRequestBody requestBody) + @RequestBody FilterRequestBody requestBody) { return restAPI.getTagsByName(serverName, startFrom, pageSize, viewServiceURLMarker, accessServiceURLMarker, requestBody); } @@ -1382,7 +1384,7 @@ public GUIDResponse createNote(@PathVariable String serverName, String viewServiceURLMarker, @RequestParam (required = false, defaultValue = "asset-manager") String accessServiceURLMarker, - @RequestBody NoteProperties requestBody) + @RequestBody NoteProperties requestBody) { return restAPI.createNote(serverName, noteLogGUID, viewServiceURLMarker, accessServiceURLMarker, requestBody); } diff --git a/open-metadata-implementation/view-services/glossary-browser/glossary-browser-server/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/rest/FindByPropertiesRequestBody.java b/open-metadata-implementation/view-services/glossary-browser/glossary-browser-server/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/rest/FindByPropertiesRequestBody.java index d6af077f6e8..081a5b6d180 100644 --- a/open-metadata-implementation/view-services/glossary-browser/glossary-browser-server/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/rest/FindByPropertiesRequestBody.java +++ b/open-metadata-implementation/view-services/glossary-browser/glossary-browser-server/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/rest/FindByPropertiesRequestBody.java @@ -5,7 +5,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.FindProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.FindProperties; import java.util.Objects; diff --git a/open-metadata-implementation/view-services/glossary-browser/glossary-browser-server/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/rest/GlossaryNameRequestBody.java b/open-metadata-implementation/view-services/glossary-browser/glossary-browser-server/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/rest/GlossaryNameRequestBody.java index ab8362d5fa9..031069bb46c 100644 --- a/open-metadata-implementation/view-services/glossary-browser/glossary-browser-server/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/rest/GlossaryNameRequestBody.java +++ b/open-metadata-implementation/view-services/glossary-browser/glossary-browser-server/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/rest/GlossaryNameRequestBody.java @@ -5,8 +5,8 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.GlossaryTermStatus; import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; +import org.odpi.openmetadata.frameworks.openmetadata.enums.GlossaryTermStatus; import java.util.List; import java.util.Objects; diff --git a/open-metadata-implementation/view-services/glossary-browser/glossary-browser-server/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/rest/GlossarySearchStringRequestBody.java b/open-metadata-implementation/view-services/glossary-browser/glossary-browser-server/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/rest/GlossarySearchStringRequestBody.java index 1c0770fe1b2..e25778b60e2 100644 --- a/open-metadata-implementation/view-services/glossary-browser/glossary-browser-server/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/rest/GlossarySearchStringRequestBody.java +++ b/open-metadata-implementation/view-services/glossary-browser/glossary-browser-server/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/rest/GlossarySearchStringRequestBody.java @@ -5,8 +5,8 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.GlossaryTermStatus; import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; +import org.odpi.openmetadata.frameworks.openmetadata.enums.GlossaryTermStatus; import java.util.List; import java.util.Objects; diff --git a/open-metadata-implementation/view-services/glossary-browser/glossary-browser-server/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/rest/GlossaryTermStatusListResponse.java b/open-metadata-implementation/view-services/glossary-browser/glossary-browser-server/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/rest/GlossaryTermStatusListResponse.java index 536c268dcd2..80d8f9f50d4 100644 --- a/open-metadata-implementation/view-services/glossary-browser/glossary-browser-server/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/rest/GlossaryTermStatusListResponse.java +++ b/open-metadata-implementation/view-services/glossary-browser/glossary-browser-server/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/rest/GlossaryTermStatusListResponse.java @@ -6,8 +6,8 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.GlossaryTermStatus; import org.odpi.openmetadata.accessservices.assetmanager.rest.AssetManagerOMASAPIResponse; +import org.odpi.openmetadata.frameworks.openmetadata.enums.GlossaryTermStatus; import java.util.ArrayList; import java.util.Arrays; diff --git a/open-metadata-implementation/view-services/glossary-browser/glossary-browser-server/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/rest/ReferenceableRequestBody.java b/open-metadata-implementation/view-services/glossary-browser/glossary-browser-server/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/rest/ReferenceableRequestBody.java index f527fe954bd..beb9aea3f79 100644 --- a/open-metadata-implementation/view-services/glossary-browser/glossary-browser-server/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/rest/ReferenceableRequestBody.java +++ b/open-metadata-implementation/view-services/glossary-browser/glossary-browser-server/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/rest/ReferenceableRequestBody.java @@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ReferenceableProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ReferenceableProperties; import java.util.Objects; diff --git a/open-metadata-implementation/view-services/glossary-browser/glossary-browser-server/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/rest/RelationshipRequestBody.java b/open-metadata-implementation/view-services/glossary-browser/glossary-browser-server/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/rest/RelationshipRequestBody.java index 766fdf17fed..8505e2d3999 100644 --- a/open-metadata-implementation/view-services/glossary-browser/glossary-browser-server/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/rest/RelationshipRequestBody.java +++ b/open-metadata-implementation/view-services/glossary-browser/glossary-browser-server/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/rest/RelationshipRequestBody.java @@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.RelationshipProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; import java.util.Objects; diff --git a/open-metadata-implementation/view-services/glossary-browser/glossary-browser-server/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/server/GlossaryBrowserRESTServices.java b/open-metadata-implementation/view-services/glossary-browser/glossary-browser-server/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/server/GlossaryBrowserRESTServices.java index db5826125a7..0487e172b2f 100644 --- a/open-metadata-implementation/view-services/glossary-browser/glossary-browser-server/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/server/GlossaryBrowserRESTServices.java +++ b/open-metadata-implementation/view-services/glossary-browser/glossary-browser-server/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/server/GlossaryBrowserRESTServices.java @@ -7,19 +7,11 @@ import org.odpi.openmetadata.accessservices.assetmanager.client.management.CollaborationManagementClient; import org.odpi.openmetadata.accessservices.assetmanager.client.management.GlossaryManagementClient; import org.odpi.openmetadata.accessservices.assetmanager.client.management.StewardshipManagementClient; -import org.odpi.openmetadata.accessservices.assetmanager.properties.CommentProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.DataFieldQueryProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.FeedbackProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.FindNameProperties; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.odpi.openmetadata.frameworks.openmetadata.enums.GlossaryTermActivityType; import org.odpi.openmetadata.frameworks.openmetadata.enums.GlossaryTermRelationshipStatus; -import org.odpi.openmetadata.accessservices.assetmanager.properties.GlossaryTermStatus; -import org.odpi.openmetadata.accessservices.assetmanager.properties.LevelIdentifierProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.RatingProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.TagProperties; import org.odpi.openmetadata.accessservices.assetmanager.rest.CommentElementResponse; import org.odpi.openmetadata.accessservices.assetmanager.rest.CommentElementsResponse; -import org.odpi.openmetadata.accessservices.assetmanager.rest.ElementStubsResponse; import org.odpi.openmetadata.accessservices.assetmanager.rest.GlossaryCategoryElementResponse; import org.odpi.openmetadata.accessservices.assetmanager.rest.GlossaryCategoryElementsResponse; import org.odpi.openmetadata.accessservices.assetmanager.rest.GlossaryElementResponse; @@ -34,17 +26,15 @@ import org.odpi.openmetadata.accessservices.assetmanager.rest.NoteElementsResponse; import org.odpi.openmetadata.accessservices.assetmanager.rest.NoteLogElementResponse; import org.odpi.openmetadata.accessservices.assetmanager.rest.NoteLogElementsResponse; -import org.odpi.openmetadata.accessservices.assetmanager.rest.RelatedElementsResponse; import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDListResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.NullRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; +import org.odpi.openmetadata.frameworks.openmetadata.enums.GlossaryTermStatus; +import org.odpi.openmetadata.frameworks.openmetadata.properties.FindNameProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.feedback.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.LevelIdentifierProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.DataFieldQueryProperties; import org.odpi.openmetadata.frameworkservices.gaf.rest.OpenMetadataElementResponse; import org.odpi.openmetadata.tokencontroller.TokenController; import org.odpi.openmetadata.viewservices.glossarybrowser.rest.EffectiveTimeQueryRequestBody; @@ -3511,7 +3501,7 @@ public ElementStubsResponse getDataFieldClassifiedElements(String RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); ElementStubsResponse response = new ElementStubsResponse(); - AuditLog auditLog = null; + AuditLog auditLog = null; try { @@ -3526,23 +3516,23 @@ public ElementStubsResponse getDataFieldClassifiedElements(String { if (requestBody.getProperties() instanceof DataFieldQueryProperties properties) { - response.setElementList(handler.getDataFieldClassifiedElements(userId, - properties, - startFrom, - pageSize, - requestBody.getEffectiveTime(), - forLineage, - forDuplicateProcessing)); + response.setElements(handler.getDataFieldClassifiedElements(userId, + properties, + startFrom, + pageSize, + requestBody.getEffectiveTime(), + forLineage, + forDuplicateProcessing)); } else if (requestBody.getProperties() == null) { - response.setElementList(handler.getDataFieldClassifiedElements(userId, - null, - startFrom, - pageSize, - requestBody.getEffectiveTime(), - forLineage, - forDuplicateProcessing)); + response.setElements(handler.getDataFieldClassifiedElements(userId, + null, + startFrom, + pageSize, + requestBody.getEffectiveTime(), + forLineage, + forDuplicateProcessing)); } else { @@ -3551,7 +3541,7 @@ else if (requestBody.getProperties() == null) } else { - response.setElementList(handler.getDataFieldClassifiedElements(userId, + response.setElements(handler.getDataFieldClassifiedElements(userId, null, startFrom, pageSize, @@ -3612,7 +3602,7 @@ public ElementStubsResponse getConfidenceClassifiedElements(String { if (requestBody.getProperties() instanceof LevelIdentifierProperties properties) { - response.setElementList(handler.getConfidenceClassifiedElements(userId, + response.setElements(handler.getConfidenceClassifiedElements(userId, properties.getReturnSpecificLevel(), properties.getLevelIdentifier(), startFrom, @@ -3623,7 +3613,7 @@ public ElementStubsResponse getConfidenceClassifiedElements(String } else if (requestBody.getProperties() == null) { - response.setElementList(handler.getConfidenceClassifiedElements(userId, + response.setElements(handler.getConfidenceClassifiedElements(userId, false, 0, startFrom, @@ -3639,7 +3629,7 @@ else if (requestBody.getProperties() == null) } else { - response.setElementList(handler.getConfidenceClassifiedElements(userId, + response.setElements(handler.getConfidenceClassifiedElements(userId, false, 0, startFrom, @@ -3701,7 +3691,7 @@ public ElementStubsResponse getCriticalityClassifiedElements(String { if (requestBody.getProperties() instanceof LevelIdentifierProperties properties) { - response.setElementList(handler.getCriticalityClassifiedElements(userId, + response.setElements(handler.getCriticalityClassifiedElements(userId, properties.getReturnSpecificLevel(), properties.getLevelIdentifier(), startFrom, @@ -3712,7 +3702,7 @@ public ElementStubsResponse getCriticalityClassifiedElements(String } else if (requestBody.getProperties() == null) { - response.setElementList(handler.getCriticalityClassifiedElements(userId, + response.setElements(handler.getCriticalityClassifiedElements(userId, false, 0, startFrom, @@ -3728,7 +3718,7 @@ else if (requestBody.getProperties() == null) } else { - response.setElementList(handler.getCriticalityClassifiedElements(userId, + response.setElements(handler.getCriticalityClassifiedElements(userId, false, 0, startFrom, @@ -3790,7 +3780,7 @@ public ElementStubsResponse getConfidentialityClassifiedElements(String { if (requestBody.getProperties() instanceof LevelIdentifierProperties properties) { - response.setElementList(handler.getConfidentialityClassifiedElements(userId, + response.setElements(handler.getConfidentialityClassifiedElements(userId, properties.getReturnSpecificLevel(), properties.getLevelIdentifier(), startFrom, @@ -3801,7 +3791,7 @@ public ElementStubsResponse getConfidentialityClassifiedElements(String } else if (requestBody.getProperties() == null) { - response.setElementList(handler.getConfidentialityClassifiedElements(userId, + response.setElements(handler.getConfidentialityClassifiedElements(userId, false, 0, startFrom, @@ -3817,7 +3807,7 @@ else if (requestBody.getProperties() == null) } else { - response.setElementList(handler.getConfidentialityClassifiedElements(userId, + response.setElements(handler.getConfidentialityClassifiedElements(userId, false, 0, startFrom, @@ -3879,7 +3869,7 @@ public ElementStubsResponse getRetentionClassifiedElements(String { if (requestBody.getProperties() instanceof LevelIdentifierProperties properties) { - response.setElementList(handler.getRetentionClassifiedElements(userId, + response.setElements(handler.getRetentionClassifiedElements(userId, properties.getReturnSpecificLevel(), properties.getLevelIdentifier(), startFrom, @@ -3890,7 +3880,7 @@ public ElementStubsResponse getRetentionClassifiedElements(String } else if (requestBody.getProperties() == null) { - response.setElementList(handler.getRetentionClassifiedElements(userId, + response.setElements(handler.getRetentionClassifiedElements(userId, false, 0, startFrom, @@ -3906,7 +3896,7 @@ else if (requestBody.getProperties() == null) } else { - response.setElementList(handler.getRetentionClassifiedElements(userId, + response.setElements(handler.getRetentionClassifiedElements(userId, false, 0, startFrom, @@ -3966,7 +3956,7 @@ public ElementStubsResponse getSecurityTaggedElements(String if (requestBody != null) { - response.setElementList(handler.getSecurityTaggedElements(userId, + response.setElements(handler.getSecurityTaggedElements(userId, startFrom, pageSize, requestBody.getEffectiveTime(), @@ -3975,7 +3965,7 @@ public ElementStubsResponse getSecurityTaggedElements(String } else { - response.setElementList(handler.getSecurityTaggedElements(userId, + response.setElements(handler.getSecurityTaggedElements(userId, startFrom, pageSize, null, @@ -4035,7 +4025,7 @@ public ElementStubsResponse getOwnersElements(String server { if (requestBody.getProperties() instanceof FindNameProperties properties) { - response.setElementList(handler.getOwnersElements(userId, + response.setElements(handler.getOwnersElements(userId, properties.getName(), startFrom, pageSize, @@ -4045,7 +4035,7 @@ public ElementStubsResponse getOwnersElements(String server } else if (requestBody.getProperties() == null) { - response.setElementList(handler.getOwnersElements(userId, + response.setElements(handler.getOwnersElements(userId, null, startFrom, pageSize, @@ -4060,7 +4050,7 @@ else if (requestBody.getProperties() == null) } else { - response.setElementList(handler.getOwnersElements(userId, + response.setElements(handler.getOwnersElements(userId, null, startFrom, pageSize, @@ -4121,7 +4111,7 @@ public ElementStubsResponse getMembersOfSubjectArea(String { if (requestBody.getProperties() instanceof FindNameProperties properties) { - response.setElementList(handler.getMembersOfSubjectArea(userId, + response.setElements(handler.getMembersOfSubjectArea(userId, properties.getName(), startFrom, pageSize, @@ -4131,7 +4121,7 @@ public ElementStubsResponse getMembersOfSubjectArea(String } else if (requestBody.getProperties() == null) { - response.setElementList(handler.getMembersOfSubjectArea(userId, + response.setElements(handler.getMembersOfSubjectArea(userId, null, startFrom, pageSize, @@ -4146,7 +4136,7 @@ else if (requestBody.getProperties() == null) } else { - response.setElementList(handler.getMembersOfSubjectArea(userId, + response.setElements(handler.getMembersOfSubjectArea(userId, null, startFrom, pageSize, @@ -4278,7 +4268,7 @@ public RelatedElementsResponse getSemanticAssignees(String if (requestBody == null) { - response.setElementList(handler.getSemanticAssignees(userId, + response.setElements(handler.getSemanticAssignees(userId, glossaryTermGUID, startFrom, pageSize, @@ -4288,7 +4278,7 @@ public RelatedElementsResponse getSemanticAssignees(String } else { - response.setElementList(handler.getSemanticAssignees(userId, + response.setElements(handler.getSemanticAssignees(userId, glossaryTermGUID, startFrom, pageSize, @@ -4349,7 +4339,7 @@ public RelatedElementsResponse getGovernedElements(String if (requestBody == null) { - response.setElementList(handler.getGovernedElements(userId, + response.setElements(handler.getGovernedElements(userId, governanceDefinitionGUID, startFrom, pageSize, @@ -4359,7 +4349,7 @@ public RelatedElementsResponse getGovernedElements(String } else { - response.setElementList(handler.getGovernedElements(userId, + response.setElements(handler.getGovernedElements(userId, governanceDefinitionGUID, startFrom, pageSize, @@ -4492,7 +4482,7 @@ public RelatedElementsResponse getSourceElements(String s if (requestBody == null) { - response.setElementList(handler.getSourceElements(userId, + response.setElements(handler.getSourceElements(userId, elementGUID, startFrom, pageSize, @@ -4502,7 +4492,7 @@ public RelatedElementsResponse getSourceElements(String s } else { - response.setElementList(handler.getSourceElements(userId, + response.setElements(handler.getSourceElements(userId, elementGUID, startFrom, pageSize, @@ -4564,7 +4554,7 @@ public RelatedElementsResponse getElementsSourceFrom(String if (requestBody == null) { - response.setElementList(handler.getElementsSourceFrom(userId, + response.setElements(handler.getElementsSourceFrom(userId, elementGUID, startFrom, pageSize, @@ -4574,7 +4564,7 @@ public RelatedElementsResponse getElementsSourceFrom(String } else { - response.setElementList(handler.getElementsSourceFrom(userId, + response.setElements(handler.getElementsSourceFrom(userId, elementGUID, startFrom, pageSize, diff --git a/open-metadata-implementation/view-services/glossary-browser/glossary-browser-spring/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/server/spring/GlossaryBrowserResource.java b/open-metadata-implementation/view-services/glossary-browser/glossary-browser-spring/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/server/spring/GlossaryBrowserResource.java index b0bea0a65c0..ff66ed6a553 100644 --- a/open-metadata-implementation/view-services/glossary-browser/glossary-browser-spring/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/server/spring/GlossaryBrowserResource.java +++ b/open-metadata-implementation/view-services/glossary-browser/glossary-browser-spring/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/server/spring/GlossaryBrowserResource.java @@ -6,7 +6,9 @@ import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import org.odpi.openmetadata.accessservices.assetmanager.rest.*; +import org.odpi.openmetadata.commonservices.ffdc.rest.ElementStubsResponse; import org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody; +import org.odpi.openmetadata.commonservices.ffdc.rest.RelatedElementsResponse; import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; import org.odpi.openmetadata.viewservices.glossarybrowser.rest.EffectiveTimeQueryRequestBody; import org.odpi.openmetadata.viewservices.glossarybrowser.rest.FindByPropertiesRequestBody; diff --git a/open-metadata-implementation/view-services/glossary-browser/glossary-browser-spring/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/server/spring/GlossaryViewController.java b/open-metadata-implementation/view-services/glossary-browser/glossary-browser-spring/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/server/spring/GlossaryViewController.java index 4f315858c9e..1b489730952 100644 --- a/open-metadata-implementation/view-services/glossary-browser/glossary-browser-spring/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/server/spring/GlossaryViewController.java +++ b/open-metadata-implementation/view-services/glossary-browser/glossary-browser-spring/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/server/spring/GlossaryViewController.java @@ -7,7 +7,6 @@ import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.GlossaryCategoryElement; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.GlossaryElement; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.GlossaryTermElement; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.RelatedElement; import org.odpi.openmetadata.accessservices.assetmanager.rest.GlossaryCategoryElementResponse; import org.odpi.openmetadata.accessservices.assetmanager.rest.GlossaryCategoryElementsResponse; import org.odpi.openmetadata.accessservices.assetmanager.rest.GlossaryElementResponse; @@ -15,14 +14,15 @@ import org.odpi.openmetadata.accessservices.assetmanager.rest.GlossaryTermElementResponse; import org.odpi.openmetadata.accessservices.assetmanager.rest.GlossaryTermElementsResponse; import org.odpi.openmetadata.accessservices.assetmanager.rest.GlossaryTermRelationshipRequestBody; -import org.odpi.openmetadata.accessservices.assetmanager.rest.RelatedElementsResponse; import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; +import org.odpi.openmetadata.commonservices.ffdc.rest.RelatedElementsResponse; import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementClassification; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementClassification; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.RelatedElement; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.frameworks.governanceaction.properties.AttachedClassification; @@ -403,11 +403,11 @@ public List getAssignedElements(@PathVariable String s exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); - if ((restResult != null) && (restResult.getElementList() != null)) + if ((restResult != null) && (restResult.getElements() != null)) { List results = new ArrayList<>(); - for (RelatedElement relatedElement : restResult.getElementList()) + for (RelatedElement relatedElement : restResult.getElements()) { OpenMetadataElementResponse openMetadataElement = restAPI.getMetadataElementByGUID(serverName, relatedElement.getRelatedElement().getGUID(), diff --git a/open-metadata-implementation/view-services/glossary-manager/glossary-manager-server/src/main/java/org/odpi/openmetadata/viewservices/glossarymanager/rest/ArchiveRequestBody.java b/open-metadata-implementation/view-services/glossary-manager/glossary-manager-server/src/main/java/org/odpi/openmetadata/viewservices/glossarymanager/rest/ArchiveRequestBody.java index 4dde073bbcb..6a194ed7961 100644 --- a/open-metadata-implementation/view-services/glossary-manager/glossary-manager-server/src/main/java/org/odpi/openmetadata/viewservices/glossarymanager/rest/ArchiveRequestBody.java +++ b/open-metadata-implementation/view-services/glossary-manager/glossary-manager-server/src/main/java/org/odpi/openmetadata/viewservices/glossarymanager/rest/ArchiveRequestBody.java @@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ArchiveProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ArchiveProperties; import java.util.Objects; diff --git a/open-metadata-implementation/view-services/glossary-manager/glossary-manager-server/src/main/java/org/odpi/openmetadata/viewservices/glossarymanager/rest/ClassificationRequestBody.java b/open-metadata-implementation/view-services/glossary-manager/glossary-manager-server/src/main/java/org/odpi/openmetadata/viewservices/glossarymanager/rest/ClassificationRequestBody.java index 2552736844c..776fe3055b0 100644 --- a/open-metadata-implementation/view-services/glossary-manager/glossary-manager-server/src/main/java/org/odpi/openmetadata/viewservices/glossarymanager/rest/ClassificationRequestBody.java +++ b/open-metadata-implementation/view-services/glossary-manager/glossary-manager-server/src/main/java/org/odpi/openmetadata/viewservices/glossarymanager/rest/ClassificationRequestBody.java @@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ClassificationProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ClassificationProperties; import java.util.Date; import java.util.Objects; @@ -23,8 +23,8 @@ @JsonIgnoreProperties(ignoreUnknown=true) public class ClassificationRequestBody { - private ClassificationProperties properties = null; - private Date effectiveTime = null; + private ClassificationProperties properties = null; + private Date effectiveTime = null; diff --git a/open-metadata-implementation/view-services/glossary-manager/glossary-manager-server/src/main/java/org/odpi/openmetadata/viewservices/glossarymanager/rest/ControlledGlossaryTermRequestBody.java b/open-metadata-implementation/view-services/glossary-manager/glossary-manager-server/src/main/java/org/odpi/openmetadata/viewservices/glossarymanager/rest/ControlledGlossaryTermRequestBody.java index 21c73c3c92c..638a323728b 100644 --- a/open-metadata-implementation/view-services/glossary-manager/glossary-manager-server/src/main/java/org/odpi/openmetadata/viewservices/glossarymanager/rest/ControlledGlossaryTermRequestBody.java +++ b/open-metadata-implementation/view-services/glossary-manager/glossary-manager-server/src/main/java/org/odpi/openmetadata/viewservices/glossarymanager/rest/ControlledGlossaryTermRequestBody.java @@ -6,8 +6,8 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.GlossaryTermProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.GlossaryTermStatus; +import org.odpi.openmetadata.frameworks.openmetadata.enums.GlossaryTermStatus; +import org.odpi.openmetadata.frameworks.openmetadata.properties.glossaries.GlossaryTermProperties; import java.util.Date; import java.util.Objects; @@ -24,10 +24,10 @@ @JsonIgnoreProperties(ignoreUnknown=true) public class ControlledGlossaryTermRequestBody { - private GlossaryTermProperties elementProperties = null; - private GlossaryTermStatus initialStatus = null; - private Date effectiveTime = null; - private String updateDescription = null; + private GlossaryTermProperties elementProperties = null; + private GlossaryTermStatus initialStatus = null; + private Date effectiveTime = null; + private String updateDescription = null; /** * Default constructor diff --git a/open-metadata-implementation/view-services/glossary-manager/glossary-manager-server/src/main/java/org/odpi/openmetadata/viewservices/glossarymanager/rest/GlossaryTemplateRequestBody.java b/open-metadata-implementation/view-services/glossary-manager/glossary-manager-server/src/main/java/org/odpi/openmetadata/viewservices/glossarymanager/rest/GlossaryTemplateRequestBody.java index 85fb1e7fd59..e6b6d4ac512 100644 --- a/open-metadata-implementation/view-services/glossary-manager/glossary-manager-server/src/main/java/org/odpi/openmetadata/viewservices/glossarymanager/rest/GlossaryTemplateRequestBody.java +++ b/open-metadata-implementation/view-services/glossary-manager/glossary-manager-server/src/main/java/org/odpi/openmetadata/viewservices/glossarymanager/rest/GlossaryTemplateRequestBody.java @@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.GlossaryTermStatus; +import org.odpi.openmetadata.frameworks.openmetadata.enums.GlossaryTermStatus; import java.util.Objects; diff --git a/open-metadata-implementation/view-services/glossary-manager/glossary-manager-server/src/main/java/org/odpi/openmetadata/viewservices/glossarymanager/rest/GlossaryTermStatusListResponse.java b/open-metadata-implementation/view-services/glossary-manager/glossary-manager-server/src/main/java/org/odpi/openmetadata/viewservices/glossarymanager/rest/GlossaryTermStatusListResponse.java index 7d78573cc18..693ba6c1c5e 100644 --- a/open-metadata-implementation/view-services/glossary-manager/glossary-manager-server/src/main/java/org/odpi/openmetadata/viewservices/glossarymanager/rest/GlossaryTermStatusListResponse.java +++ b/open-metadata-implementation/view-services/glossary-manager/glossary-manager-server/src/main/java/org/odpi/openmetadata/viewservices/glossarymanager/rest/GlossaryTermStatusListResponse.java @@ -6,8 +6,8 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.GlossaryTermStatus; import org.odpi.openmetadata.accessservices.assetmanager.rest.AssetManagerOMASAPIResponse; +import org.odpi.openmetadata.frameworks.openmetadata.enums.GlossaryTermStatus; import java.util.ArrayList; import java.util.Arrays; diff --git a/open-metadata-implementation/view-services/glossary-manager/glossary-manager-server/src/main/java/org/odpi/openmetadata/viewservices/glossarymanager/rest/GlossaryTermStatusRequestBody.java b/open-metadata-implementation/view-services/glossary-manager/glossary-manager-server/src/main/java/org/odpi/openmetadata/viewservices/glossarymanager/rest/GlossaryTermStatusRequestBody.java index dec9e14a969..639420147bd 100644 --- a/open-metadata-implementation/view-services/glossary-manager/glossary-manager-server/src/main/java/org/odpi/openmetadata/viewservices/glossarymanager/rest/GlossaryTermStatusRequestBody.java +++ b/open-metadata-implementation/view-services/glossary-manager/glossary-manager-server/src/main/java/org/odpi/openmetadata/viewservices/glossarymanager/rest/GlossaryTermStatusRequestBody.java @@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.GlossaryTermStatus; +import org.odpi.openmetadata.frameworks.openmetadata.enums.GlossaryTermStatus; import java.util.Objects; diff --git a/open-metadata-implementation/view-services/glossary-manager/glossary-manager-server/src/main/java/org/odpi/openmetadata/viewservices/glossarymanager/rest/ReferenceableRequestBody.java b/open-metadata-implementation/view-services/glossary-manager/glossary-manager-server/src/main/java/org/odpi/openmetadata/viewservices/glossarymanager/rest/ReferenceableRequestBody.java index 210375008d2..5eb99824c33 100644 --- a/open-metadata-implementation/view-services/glossary-manager/glossary-manager-server/src/main/java/org/odpi/openmetadata/viewservices/glossarymanager/rest/ReferenceableRequestBody.java +++ b/open-metadata-implementation/view-services/glossary-manager/glossary-manager-server/src/main/java/org/odpi/openmetadata/viewservices/glossarymanager/rest/ReferenceableRequestBody.java @@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ReferenceableProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.ReferenceableProperties; import java.util.Objects; @@ -24,8 +24,8 @@ @JsonIgnoreProperties(ignoreUnknown=true) public class ReferenceableRequestBody { - private ReferenceableProperties elementProperties = null; - private String parentGUID = null; + private ReferenceableProperties elementProperties = null; + private String parentGUID = null; /** diff --git a/open-metadata-implementation/view-services/glossary-manager/glossary-manager-server/src/main/java/org/odpi/openmetadata/viewservices/glossarymanager/rest/RelationshipRequestBody.java b/open-metadata-implementation/view-services/glossary-manager/glossary-manager-server/src/main/java/org/odpi/openmetadata/viewservices/glossarymanager/rest/RelationshipRequestBody.java index 0d8c2fd24cd..44b1a92675e 100644 --- a/open-metadata-implementation/view-services/glossary-manager/glossary-manager-server/src/main/java/org/odpi/openmetadata/viewservices/glossarymanager/rest/RelationshipRequestBody.java +++ b/open-metadata-implementation/view-services/glossary-manager/glossary-manager-server/src/main/java/org/odpi/openmetadata/viewservices/glossarymanager/rest/RelationshipRequestBody.java @@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.assetmanager.properties.RelationshipProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.RelationshipProperties; import java.util.Objects; diff --git a/open-metadata-implementation/view-services/glossary-manager/glossary-manager-server/src/main/java/org/odpi/openmetadata/viewservices/glossarymanager/server/GlossaryManagerRESTServices.java b/open-metadata-implementation/view-services/glossary-manager/glossary-manager-server/src/main/java/org/odpi/openmetadata/viewservices/glossarymanager/server/GlossaryManagerRESTServices.java index 64022052965..0185a60385c 100644 --- a/open-metadata-implementation/view-services/glossary-manager/glossary-manager-server/src/main/java/org/odpi/openmetadata/viewservices/glossarymanager/server/GlossaryManagerRESTServices.java +++ b/open-metadata-implementation/view-services/glossary-manager/glossary-manager-server/src/main/java/org/odpi/openmetadata/viewservices/glossarymanager/server/GlossaryManagerRESTServices.java @@ -3,21 +3,21 @@ /* Copyright Contributors to the ODPi Egeria category. */ package org.odpi.openmetadata.viewservices.glossarymanager.server; -import org.odpi.openmetadata.accessservices.assetmanager.client.management.CollaborationManagementClient; import org.odpi.openmetadata.accessservices.assetmanager.client.management.GlossaryManagementClient; -import org.odpi.openmetadata.accessservices.assetmanager.client.management.StewardshipManagementClient; import org.odpi.openmetadata.accessservices.assetmanager.properties.*; import org.odpi.openmetadata.accessservices.assetmanager.rest.GlossaryTermElementResponse; import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; -import org.odpi.openmetadata.commonservices.ffdc.rest.EffectiveTimeRequestBody; import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; import org.odpi.openmetadata.commonservices.ffdc.rest.NameListResponse; import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.openmetadata.enums.GlossaryTermActivityType; import org.odpi.openmetadata.frameworks.openmetadata.enums.GlossaryTermRelationshipStatus; +import org.odpi.openmetadata.frameworks.openmetadata.enums.GlossaryTermStatus; +import org.odpi.openmetadata.frameworks.openmetadata.properties.glossaries.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.DataFieldValuesProperties; import org.odpi.openmetadata.tokencontroller.TokenController; import org.odpi.openmetadata.viewservices.glossarymanager.rest.ArchiveRequestBody; import org.odpi.openmetadata.viewservices.glossarymanager.rest.ClassificationRequestBody; diff --git a/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/api/MyPersonalNetworkInterface.java b/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/api/MyPersonalNetworkInterface.java index 9013058805f..c01903fb0d4 100644 --- a/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/api/MyPersonalNetworkInterface.java +++ b/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/api/MyPersonalNetworkInterface.java @@ -2,8 +2,8 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.viewservices.myprofile.api; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.CommunityMembershipElement; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.TeamMembershipElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.TeamMembershipElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.CommunityMembershipElement; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; diff --git a/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/api/MyPersonalProfileInterface.java b/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/api/MyPersonalProfileInterface.java index e839b92b092..46e0bdb7c17 100644 --- a/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/api/MyPersonalProfileInterface.java +++ b/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/api/MyPersonalProfileInterface.java @@ -2,12 +2,12 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.viewservices.myprofile.api; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.ContactMethodElement; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; import org.odpi.openmetadata.frameworks.openmetadata.enums.ContactMethodType; -import org.odpi.openmetadata.viewservices.myprofile.metadataelements.PersonalProfileUniverse; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ContactMethodElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.PersonalProfileUniverse; import java.util.List; import java.util.Map; diff --git a/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/api/MyRolesAndActionsInterface.java b/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/api/MyRolesAndActionsInterface.java index 0ac3a03de06..bc55ee7a2ef 100644 --- a/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/api/MyRolesAndActionsInterface.java +++ b/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/api/MyRolesAndActionsInterface.java @@ -2,7 +2,7 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.viewservices.myprofile.api; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.ToDoElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ToDoElement; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; diff --git a/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/api/PersonalProfileManagementInterface.java b/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/api/PersonalProfileManagementInterface.java index a534ef87a5e..ba4ee0dbe91 100644 --- a/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/api/PersonalProfileManagementInterface.java +++ b/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/api/PersonalProfileManagementInterface.java @@ -2,12 +2,12 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.viewservices.myprofile.api; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ContactMethodProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; import org.odpi.openmetadata.frameworks.openmetadata.enums.ContactMethodType; -import org.odpi.openmetadata.viewservices.myprofile.metadataelements.PersonalProfileUniverse; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.ContactMethodProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.PersonalProfileUniverse; import java.util.List; import java.util.Map; diff --git a/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/metadataelements/PersonalProfileElement.java b/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/metadataelements/PersonalProfileElement.java deleted file mode 100644 index f38edd27340..00000000000 --- a/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/metadataelements/PersonalProfileElement.java +++ /dev/null @@ -1,148 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.myprofile.metadataelements; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.MetadataElement; -import org.odpi.openmetadata.viewservices.myprofile.properties.PersonalProfileProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; - - -/** - * The PersonalProfileElement describes an individual who has (or will be) appointed to one of the - * governance roles defined in the governance program. Information about the personal profile is stored - * as a Person entity. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class PersonalProfileElement implements MetadataElement -{ - private ElementHeader elementHeader = null; - private PersonalProfileProperties profileProperties = null; - - - - /** - * Default Constructor - */ - public PersonalProfileElement() - { - } - - - /** - * Copy/clone Constructor - the resulting object. - * - * @param template object being copied - */ - public PersonalProfileElement(PersonalProfileElement template) - { - if (template != null) - { - elementHeader = template.getElementHeader(); - profileProperties = template.getProfileProperties(); - } - } - - - /** - * Return the element header associated with the properties. - * - * @return element header object - */ - public ElementHeader getElementHeader() - { - return elementHeader; - } - - - /** - * Set up the element header associated with the properties. - * - * @param elementHeader element header object - */ - public void setElementHeader(ElementHeader elementHeader) - { - this.elementHeader = elementHeader; - } - - - /** - * Return the properties of the profile. - * - * @return properties - */ - public PersonalProfileProperties getProfileProperties() - { - return profileProperties; - } - - - /** - * Set up the profile properties. - * - * @param profileProperties properties - */ - public void setProfileProperties(PersonalProfileProperties profileProperties) - { - this.profileProperties = profileProperties; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "PersonalProfileElement{" + - "elementHeader=" + elementHeader + - ", profileProperties=" + profileProperties + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - PersonalProfileElement that = (PersonalProfileElement) objectToCompare; - return Objects.equals(elementHeader, that.elementHeader) && - Objects.equals(profileProperties, that.profileProperties); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(elementHeader, profileProperties); - } -} diff --git a/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/properties/PersonalMessage.java b/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/properties/PersonalMessage.java deleted file mode 100644 index 978064955ef..00000000000 --- a/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/properties/PersonalMessage.java +++ /dev/null @@ -1,62 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.myprofile.properties; - - -import com.fasterxml.jackson.annotation.*; -import org.odpi.openmetadata.accessservices.communityprofile.properties.CommentProperties; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * Personal message is a comment added to a personal profile. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class PersonalMessage extends CommentProperties -{ - /** - * Default constructor - */ - public PersonalMessage() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public PersonalMessage(PersonalMessage template) - { - super(template); - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "PersonalMessage{" + - "commentType=" + getCommentType() + - ", commentText='" + getCommentText() + '\'' + - ", user='" + getUser() + '\'' + - ", isPublic=" + getIsPublic() + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } -} diff --git a/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/properties/PersonalNote.java b/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/properties/PersonalNote.java deleted file mode 100644 index 3305209b537..00000000000 --- a/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/properties/PersonalNote.java +++ /dev/null @@ -1,61 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.myprofile.properties; - - -import com.fasterxml.jackson.annotation.*; -import org.odpi.openmetadata.accessservices.communityprofile.properties.NoteLogEntryProperties; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * PersonalNote is used to add a personal note to a personal profile. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class PersonalNote extends NoteLogEntryProperties -{ - /** - * Default constructor - */ - public PersonalNote() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public PersonalNote(PersonalNote template) - { - super(template); - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "PersonalNote{" + - "contributors=" + getContributors() + - ", title='" + getTitle() + '\'' + - ", text='" + getText() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } -} diff --git a/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/properties/PersonalNoteLog.java b/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/properties/PersonalNoteLog.java deleted file mode 100644 index d58f9fc86d9..00000000000 --- a/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/properties/PersonalNoteLog.java +++ /dev/null @@ -1,63 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.myprofile.properties; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.communityprofile.properties.NoteLogHeaderProperties; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * PersonalNoteLog is used to maintain the list of personal notes for a personal profile. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class PersonalNoteLog extends NoteLogHeaderProperties -{ - /** - * Default constructor - */ - public PersonalNoteLog() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public PersonalNoteLog(PersonalNoteLog template) - { - super(template); - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "PersonalNoteLog{" + - "name='" + getName() + '\'' + - ", description='" + getDescription() + '\'' + - ", isPublic=" + getIsPublic() + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } -} diff --git a/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/properties/PersonalProfileProperties.java b/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/properties/PersonalProfileProperties.java deleted file mode 100644 index b50b43a1086..00000000000 --- a/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/properties/PersonalProfileProperties.java +++ /dev/null @@ -1,394 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.myprofile.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ActorProfileProperties; - -import java.util.*; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * The PersonalProfileProperties describes an individual. Information about the - * personal profile is stored as an Person entity in the metadata repository. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class PersonalProfileProperties extends ActorProfileProperties -{ - private String title = null; - private String initials = null; - private String givenNames = null; - private String surname = null; - private String fullName = null; - private String pronouns = null; - private String jobTitle = null; - private String employeeNumber = null; - private String employeeType = null; - private String preferredLanguage = null; - - private boolean isPublic = false; - - - - /** - * Default Constructor - */ - public PersonalProfileProperties() - { - super(); - } - - - /** - * Copy/clone Constructor - the resulting object. - * - * @param template object being copied - */ - public PersonalProfileProperties(PersonalProfileProperties template) - { - super (template); - - if (template != null) - { - this.fullName = template.getFullName(); - this.jobTitle = template.getJobTitle(); - this.title = template.getTitle(); - this.initials = template.getInitials(); - this.givenNames = template.getGivenNames(); - this.surname = template.getSurname(); - this.employeeNumber = template.getEmployeeNumber(); - this.employeeType = template.getEmployeeType(); - this.preferredLanguage = template.getPreferredLanguage(); - this.isPublic = template.getIsPublic(); - } - } - - - /** - * Return the full legal name for this person. - * - * @return string name - */ - public String getFullName() - { - return fullName; - } - - - /** - * Set up the full legal name for this person. - * - * @param fullName string name - */ - public void setFullName(String fullName) - { - this.fullName = fullName; - } - - - /** - * Return the person's preferred pronouns. - * - * @return string - */ - public String getPronouns() - { - return pronouns; - } - - - /** - * Set up the person's preferred pronouns. - * - * @param pronouns string - */ - public void setPronouns(String pronouns) - { - this.pronouns = pronouns; - } - - - /** - * Return the primary job title for this person. - * - * @return string title - */ - public String getJobTitle() - { - return jobTitle; - } - - - /** - * Set up the primary job title for this person. - * - * @param jobTitle string title - */ - public void setJobTitle(String jobTitle) - { - this.jobTitle = jobTitle; - } - - - /** - * Return the courtesy title for the person. - * - * @return string - */ - public String getTitle() - { - return title; - } - - - /** - * Set up the courtesy title for the person. - * - * @param title string - */ - public void setTitle(String title) - { - this.title = title; - } - - - /** - * Return first letter of each of the person's given names. - * - * @return string - */ - public String getInitials() - { - return initials; - } - - - /** - * Set up first letter of each of the person's given names. - * - * @param initials string - */ - public void setInitials(String initials) - { - this.initials = initials; - } - - - /** - * Return the name strings that are the part of a person's name that is not their surname. - * - * @return space separated list of names - */ - public String getGivenNames() - { - return givenNames; - } - - - /** - * Set up the name strings that are the part of a person's name that is not their surname. - * - * @param givenNames space separated list of names - */ - public void setGivenNames(String givenNames) - { - this.givenNames = givenNames; - } - - - /** - * Return the family name of the person. - * - * @return string - */ - public String getSurname() - { - return surname; - } - - - /** - * Set up the family name of the person. - * - * @param surname string - */ - public void setSurname(String surname) - { - this.surname = surname; - } - - - /** - * Return the unique identifier of the person used by their employer. - * - * @return string - */ - public String getEmployeeNumber() - { - return employeeNumber; - } - - - /** - * Set up the unique identifier of the person used by their employer. - * - * @param employeeNumber string - */ - public void setEmployeeNumber(String employeeNumber) - { - this.employeeNumber = employeeNumber; - } - - - /** - * Return code used by employer typically to describe the type of employment contract. - * - * @return string - */ - public String getEmployeeType() - { - return employeeType; - } - - - /** - * Set up code used by employer typically to describe the type of employment contract. - * - * @param employeeType string - */ - public void setEmployeeType(String employeeType) - { - this.employeeType = employeeType; - } - - - /** - * Return spoken or written language preferred by the person. - * - * @return string - */ - public String getPreferredLanguage() - { - return preferredLanguage; - } - - - /** - * Set up spoken or written language preferred by the person. - * - * @param preferredLanguage string - */ - public void setPreferredLanguage(String preferredLanguage) - { - this.preferredLanguage = preferredLanguage; - } - - - /** - * Return if the contents of this profile is to be shared with colleagues. - * - * @return flag - */ - public boolean getIsPublic() - { - return isPublic; - } - - - /** - * Set up if the contents of this profile is to be shared with colleagues. - * - * @param isPublic flag - */ - public void setIsPublic(boolean isPublic) - { - this.isPublic = isPublic; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "PersonalProfileProperties{" + - "fullName='" + fullName + '\'' + - ", jobTitle='" + jobTitle + '\'' + - ", title='" + title + '\'' + - ", initials='" + initials + '\'' + - ", givenNames='" + givenNames + '\'' + - ", surname='" + surname + '\'' + - ", employeeNumber='" + employeeNumber + '\'' + - ", employeeType='" + employeeType + '\'' + - ", preferredLanguage='" + preferredLanguage + '\'' + - ", isPublic=" + isPublic + - ", knownName='" + getKnownName() + '\'' + - ", description='" + getDescription() + '\'' + - ", qualifiedName='" + getQualifiedName() + '\'' + - ", additionalProperties=" + getAdditionalProperties() + - ", effectiveFrom=" + getEffectiveFrom() + - ", effectiveTo=" + getEffectiveTo() + - ", vendorProperties=" + getVendorProperties() + - ", typeName='" + getTypeName() + '\'' + - ", extendedProperties=" + getExtendedProperties() + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - PersonalProfileProperties that = (PersonalProfileProperties) objectToCompare; - return isPublic == that.isPublic && - Objects.equals(fullName, that.fullName) && - Objects.equals(jobTitle, that.jobTitle) && - Objects.equals(title, that.title) && - Objects.equals(initials, that.initials) && - Objects.equals(givenNames, that.givenNames) && - Objects.equals(surname, that.surname) && - Objects.equals(employeeNumber, that.employeeNumber) && - Objects.equals(employeeType, that.employeeType) && - Objects.equals(preferredLanguage, that.preferredLanguage); - } - - - /** - * Just use the GUID for the hash code as it should be unique. - * - * @return int code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), fullName, jobTitle, title, initials, givenNames, surname, employeeNumber, employeeType, - preferredLanguage, isPublic); - } -} diff --git a/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/rest/EffectiveTimeQueryRequestBody.java b/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/rest/EffectiveTimeQueryRequestBody.java deleted file mode 100644 index 3896d399f42..00000000000 --- a/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/rest/EffectiveTimeQueryRequestBody.java +++ /dev/null @@ -1,122 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.myprofile.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.Date; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * EffectiveTimeQueryRequestBody carries the date/time for a query. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class EffectiveTimeQueryRequestBody -{ - private Date effectiveTime = null; - - - /** - * Default constructor - */ - public EffectiveTimeQueryRequestBody() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public EffectiveTimeQueryRequestBody(EffectiveTimeQueryRequestBody template) - { - if (template != null) - { - effectiveTime = template.getEffectiveTime(); - } - } - - - /** - * Return the date/time to use for the query. - * - * @return date object - */ - public Date getEffectiveTime() - { - return effectiveTime; - } - - - /** - * Set up the date/time to use for the query. - * - * @param effectiveTime date object - */ - public void setEffectiveTime(Date effectiveTime) - { - this.effectiveTime = effectiveTime; - } - - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "EffectiveTimeQueryRequestBody{" + - "effectiveTime=" + effectiveTime + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - EffectiveTimeQueryRequestBody that = (EffectiveTimeQueryRequestBody) objectToCompare; - return Objects.equals(effectiveTime, that.effectiveTime); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), effectiveTime); - } -} diff --git a/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/rest/PersonalProfileListResponse.java b/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/rest/PersonalProfileListResponse.java deleted file mode 100644 index 838b84c7289..00000000000 --- a/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/rest/PersonalProfileListResponse.java +++ /dev/null @@ -1,148 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.myprofile.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.communityprofile.rest.CommunityProfileOMASAPIResponse; -import org.odpi.openmetadata.viewservices.myprofile.metadataelements.PersonalProfileUniverse; - -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * PersonalProfileListResponse is the response structure used on the OMAS REST API calls that return - * a list of personal profile objects. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class PersonalProfileListResponse extends CommunityProfileOMASAPIResponse -{ - private List personalProfiles = null; - - - /** - * Default constructor - */ - public PersonalProfileListResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public PersonalProfileListResponse(PersonalProfileListResponse template) - { - super(template); - - if (template != null) - { - this.personalProfiles = template.getPersonalProfiles(); - } - } - - - /** - * Return the personalProfile result. - * - * @return unique identifier - */ - public List getPersonalProfiles() - { - if (personalProfiles == null) - { - return null; - } - else if (personalProfiles.isEmpty()) - { - return null; - } - else - { - return personalProfiles; - } - } - - - /** - * Set up the personalProfile result. - * - * @param personalProfiles - unique identifier - */ - public void setPersonalProfiles(List personalProfiles) - { - this.personalProfiles = personalProfiles; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "PersonalProfileListResponse{" + - "personalProfiles=" + personalProfiles + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof PersonalProfileListResponse that)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - return Objects.equals(getPersonalProfiles(), that.getPersonalProfiles()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), personalProfiles); - } -} diff --git a/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/rest/PersonalProfileResponse.java b/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/rest/PersonalProfileResponse.java deleted file mode 100644 index eda2eea98ba..00000000000 --- a/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/rest/PersonalProfileResponse.java +++ /dev/null @@ -1,137 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.myprofile.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.communityprofile.rest.CommunityProfileOMASAPIResponse; -import org.odpi.openmetadata.viewservices.myprofile.metadataelements.PersonalProfileUniverse; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * PersonalProfileResponse is the response structure used on the OMAS REST API calls that return a - * PersonalProfileUniverse object as a response. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class PersonalProfileResponse extends CommunityProfileOMASAPIResponse -{ - private PersonalProfileUniverse personalProfile = null; - - - /** - * Default constructor - */ - public PersonalProfileResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public PersonalProfileResponse(PersonalProfileResponse template) - { - super(template); - - if (template != null) - { - this.personalProfile = template.getPersonalProfile(); - } - } - - - /** - * Return the personalProfile result. - * - * @return details of individual - */ - public PersonalProfileUniverse getPersonalProfile() - { - return personalProfile; - } - - - /** - * Set up the personalProfile result. - * - * @param personalProfile details of individual - */ - public void setPersonalProfile(PersonalProfileUniverse personalProfile) - { - this.personalProfile = personalProfile; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "PersonalProfileResponse{" + - "personalProfile=" + personalProfile + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof PersonalProfileResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - PersonalProfileResponse that = (PersonalProfileResponse) objectToCompare; - return Objects.equals(personalProfile, that.personalProfile); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), personalProfile); - } -} diff --git a/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/rest/ReferenceableRequestBody.java b/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/rest/ReferenceableRequestBody.java deleted file mode 100644 index 9d62b9d3116..00000000000 --- a/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/rest/ReferenceableRequestBody.java +++ /dev/null @@ -1,146 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.myprofile.rest; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ReferenceableProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * ReferenceableRequestBody describes the request body used to create/update properties in referenceables. The properties - * of the specific element must inherit from ReferenceableProperties and be included in the subtype list of the ReferenceableProperties class - * to make it possible for the server to correctly unpack this bean. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ReferenceableRequestBody -{ - private ReferenceableProperties elementProperties = null; - private String parentGUID = null; - - - /** - * Default constructor - */ - public ReferenceableRequestBody() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public ReferenceableRequestBody(ReferenceableRequestBody template) - { - if (template != null) - { - elementProperties = template.getElementProperties(); - parentGUID = template.getParentGUID(); - } - } - - - /** - * Return the properties for the element. - * - * @return properties object - */ - public ReferenceableProperties getElementProperties() - { - return elementProperties; - } - - - /** - * Set up the properties for the element. - * - * @param elementProperties properties object - */ - public void setElementProperties(ReferenceableProperties elementProperties) - { - this.elementProperties = elementProperties; - } - - - /** - * Return an optional parent GUID to attach the new element to. - * - * @return guid - */ - public String getParentGUID() - { - return parentGUID; - } - - - /** - * Set up an optional parent GUID to attach the new element to. - * - * @param parentGUID guid - */ - public void setParentGUID(String parentGUID) - { - this.parentGUID = parentGUID; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ReferenceableRequestBody{" + - "elementProperties=" + elementProperties + - ", parentGUID='" + parentGUID + '\'' + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (! (objectToCompare instanceof ReferenceableRequestBody that)) - { - return false; - } - return Objects.equals(elementProperties, that.elementProperties) && - Objects.equals(parentGUID, that.parentGUID); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elementProperties, parentGUID); - } -} diff --git a/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/rest/RelationshipRequestBody.java b/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/rest/RelationshipRequestBody.java deleted file mode 100644 index e24897863e6..00000000000 --- a/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/rest/RelationshipRequestBody.java +++ /dev/null @@ -1,126 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.myprofile.rest; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.communityprofile.properties.RelationshipProperties; - -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * RelationshipRequestBody describes the request body used when linking elements together. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class RelationshipRequestBody extends EffectiveTimeQueryRequestBody -{ - private RelationshipProperties properties = null; - - - /** - * Default constructor - */ - public RelationshipRequestBody() - { - super(); - } - - - /** - * Copy/clone constructor. - * - * @param template object to copy - */ - public RelationshipRequestBody(RelationshipRequestBody template) - { - super(template); - - if (template != null) - { - properties = template.getProperties(); - } - } - - - /** - * Return the properties for the relationship. - * - * @return properties object - */ - public RelationshipProperties getProperties() - { - return properties; - } - - - /** - * Set up the properties for the relationship. - * - * @param properties properties object - */ - public void setProperties(RelationshipProperties properties) - { - this.properties = properties; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "RelationshipRequestBody{" + - "effectiveTime=" + getEffectiveTime() + - ", properties=" + properties + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (objectToCompare == null || getClass() != objectToCompare.getClass()) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - RelationshipRequestBody that = (RelationshipRequestBody) objectToCompare; - return Objects.equals(getProperties(), that.getProperties()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), properties); - } -} diff --git a/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/rest/ToDoListResponse.java b/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/rest/ToDoListResponse.java deleted file mode 100644 index 2d0e23b770f..00000000000 --- a/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/rest/ToDoListResponse.java +++ /dev/null @@ -1,149 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.myprofile.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.ToDoElement; -import org.odpi.openmetadata.accessservices.communityprofile.rest.CommunityProfileOMASAPIResponse; -import org.odpi.openmetadata.viewservices.myprofile.metadataelements.PersonalProfileUniverse; - -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * ToDoListResponse is the response structure used on the OMAS REST API calls that return - * a list of to do objects. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ToDoListResponse extends CommunityProfileOMASAPIResponse -{ - private List toDoElements = null; - - - /** - * Default constructor - */ - public ToDoListResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ToDoListResponse(ToDoListResponse template) - { - super(template); - - if (template != null) - { - this.toDoElements = template.getToDoElements(); - } - } - - - /** - * Return the to do result. - * - * @return unique identifier - */ - public List getToDoElements() - { - if (toDoElements == null) - { - return null; - } - else if (toDoElements.isEmpty()) - { - return null; - } - else - { - return toDoElements; - } - } - - - /** - * Set up the to do result. - * - * @param toDoElements - unique identifier - */ - public void setToDoElements(List toDoElements) - { - this.toDoElements = toDoElements; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ToDoListResponse{" + - "toDoElements=" + toDoElements + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof ToDoListResponse that)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - return Objects.equals(getToDoElements(), that.getToDoElements()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), toDoElements); - } -} diff --git a/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/rest/ToDoResponse.java b/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/rest/ToDoResponse.java deleted file mode 100644 index afbd2eeecd8..00000000000 --- a/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/rest/ToDoResponse.java +++ /dev/null @@ -1,137 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.myprofile.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.ToDoElement; -import org.odpi.openmetadata.accessservices.communityprofile.rest.CommunityProfileOMASAPIResponse; -import org.odpi.openmetadata.viewservices.myprofile.metadataelements.PersonalProfileUniverse; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * ToDoResponse is the response structure used on the OMAS REST API calls that returns a - * "to do" object as a response. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ToDoResponse extends CommunityProfileOMASAPIResponse -{ - private ToDoElement toDoElement = null; - - - /** - * Default constructor - */ - public ToDoResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ToDoResponse(ToDoResponse template) - { - super(template); - - if (template != null) - { - this.toDoElement = template.getToDoElement(); - } - } - - - /** - * Return the to do result. - * - * @return details of individual - */ - public ToDoElement getToDoElement() - { - return toDoElement; - } - - - /** - * Set up the to do result. - * - * @param toDoElement details of individual - */ - public void setToDoElement(ToDoElement toDoElement) - { - this.toDoElement = toDoElement; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ToDoResponse{" + - "personalProfile=" + toDoElement + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof ToDoResponse that)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - return Objects.equals(toDoElement, that.toDoElement); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), toDoElement); - } -} diff --git a/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/rest/package-info.java b/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/rest/package-info.java deleted file mode 100644 index de6c7b2cf34..00000000000 --- a/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/rest/package-info.java +++ /dev/null @@ -1,10 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -/** - *

          This package defines the beans used to build the REST request and response payloads.

          - *

          REST APIs can pass parameters in their URLs (called path variables) as well has having a RequestBody bean - * for additional, more complex, or optional parameters. Responses are returned in response beans.

          - *

          The response beans encode the return type of the method as well as any exceptions and associated messages.

          - */ -package org.odpi.openmetadata.viewservices.myprofile.rest; diff --git a/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/server/MyProfileRESTServices.java b/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/server/MyProfileRESTServices.java index 2d465baa8e9..8726fcebca1 100644 --- a/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/server/MyProfileRESTServices.java +++ b/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/server/MyProfileRESTServices.java @@ -5,22 +5,20 @@ import org.odpi.openmetadata.accessservices.communityprofile.client.OrganizationManagement; import org.odpi.openmetadata.accessservices.communityprofile.client.ToDoActionManagement; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.ActorProfileElement; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.PersonRoleElement; -import org.odpi.openmetadata.accessservices.communityprofile.properties.*; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ActorProfileElement; import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NullRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.PersonRoleElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actions.ToDoActionTargetProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actions.ToDoProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.ActorProfileProperties; import org.odpi.openmetadata.tokencontroller.TokenController; -import org.odpi.openmetadata.viewservices.myprofile.metadataelements.PersonalProfileUniverse; -import org.odpi.openmetadata.viewservices.myprofile.properties.PersonalProfileProperties; -import org.odpi.openmetadata.viewservices.myprofile.rest.*; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.PersonalProfileUniverse; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.PersonalProfileProperties; import org.slf4j.LoggerFactory; import java.util.ArrayList; @@ -81,10 +79,10 @@ public PersonalProfileResponse getMyProfile(String serverName) if (actorProfileElement != null) { - PersonalProfileUniverse personalProfileUniverse = new PersonalProfileUniverse(); - PersonalProfileProperties profileProperties = new PersonalProfileProperties(); - ActorProfileProperties actorProfileProperties = actorProfileElement.getProfileProperties(); - Map extendedProperties = actorProfileProperties.getExtendedProperties(); + PersonalProfileUniverse personalProfileUniverse = new PersonalProfileUniverse(); + PersonalProfileProperties profileProperties = new PersonalProfileProperties(); + ActorProfileProperties actorProfileProperties = actorProfileElement.getProfileProperties(); + Map extendedProperties = actorProfileProperties.getExtendedProperties(); profileProperties.setQualifiedName(actorProfileProperties.getQualifiedName()); profileProperties.setKnownName(actorProfileProperties.getKnownName()); @@ -264,7 +262,7 @@ public VoidResponse updateToDo(String serverName, public VoidResponse updateActionTargetProperties(String serverName, String actionTargetGUID, boolean isMergeUpdate, - ActionTargetProperties actionTargetProperties) + ToDoActionTargetProperties actionTargetProperties) { final String methodName = "updateActionTargetProperties"; @@ -419,7 +417,7 @@ public ToDoResponse getToDo(String serverName, auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); ToDoActionManagement handler = instanceHandler.getToDoActionManagementClient(userId, serverName, methodName); - response.setToDoElement(handler.getToDo(userId, toDoGUID)); + response.setElement(handler.getToDo(userId, toDoGUID)); } catch (Exception error) { @@ -446,18 +444,18 @@ public ToDoResponse getToDo(String serverName, * PropertyServerException the server is not available * UserNotAuthorizedException the calling user is not authorized to issue the call */ - public ToDoListResponse getActionsForActionTarget(String serverName, - String elementGUID, - int startFrom, - int pageSize, - ToDoStatusRequestBody requestBody) + public ToDosResponse getActionsForActionTarget(String serverName, + String elementGUID, + int startFrom, + int pageSize, + ToDoStatusRequestBody requestBody) { final String methodName = "getActionsForActionTarget"; RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); - ToDoListResponse response = new ToDoListResponse(); - AuditLog auditLog = null; + ToDosResponse response = new ToDosResponse(); + AuditLog auditLog = null; try { @@ -470,19 +468,19 @@ public ToDoListResponse getActionsForActionTarget(String serverNa if (requestBody != null) { - response.setToDoElements(handler.getActionsForActionTarget(userId, - elementGUID, - requestBody.getToDoStatus(), - startFrom, - pageSize)); + response.setElements(handler.getActionsForActionTarget(userId, + elementGUID, + requestBody.getToDoStatus(), + startFrom, + pageSize)); } else { - response.setToDoElements(handler.getActionsForActionTarget(userId, - elementGUID, - null, - startFrom, - pageSize)); + response.setElements(handler.getActionsForActionTarget(userId, + elementGUID, + null, + startFrom, + pageSize)); } } catch (Exception error) @@ -510,18 +508,18 @@ public ToDoListResponse getActionsForActionTarget(String serverNa * PropertyServerException the server is not available * UserNotAuthorizedException the calling user is not authorized to issue the call */ - public ToDoListResponse getActionsForSponsor(String serverName, - String elementGUID, - int startFrom, - int pageSize, - ToDoStatusRequestBody requestBody) + public ToDosResponse getActionsForSponsor(String serverName, + String elementGUID, + int startFrom, + int pageSize, + ToDoStatusRequestBody requestBody) { final String methodName = "getActionsForSponsor"; RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); - ToDoListResponse response = new ToDoListResponse(); - AuditLog auditLog = null; + ToDosResponse response = new ToDosResponse(); + AuditLog auditLog = null; try { @@ -534,19 +532,19 @@ public ToDoListResponse getActionsForSponsor(String serverName, if (requestBody != null) { - response.setToDoElements(handler.getActionsForSponsor(userId, - elementGUID, - requestBody.getToDoStatus(), - startFrom, - pageSize)); + response.setElements(handler.getActionsForSponsor(userId, + elementGUID, + requestBody.getToDoStatus(), + startFrom, + pageSize)); } else { - response.setToDoElements(handler.getActionsForSponsor(userId, - elementGUID, - null, - startFrom, - pageSize)); + response.setElements(handler.getActionsForSponsor(userId, + elementGUID, + null, + startFrom, + pageSize)); } } catch (Exception error) @@ -574,18 +572,18 @@ public ToDoListResponse getActionsForSponsor(String serverName, * PropertyServerException the server is not available * UserNotAuthorizedException the calling user is not authorized to issue the call */ - public ToDoListResponse getAssignedActions(String serverName, - String actorGUID, - int startFrom, - int pageSize, - ToDoStatusRequestBody requestBody) + public ToDosResponse getAssignedActions(String serverName, + String actorGUID, + int startFrom, + int pageSize, + ToDoStatusRequestBody requestBody) { final String methodName = "getAssignedActions"; RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); - ToDoListResponse response = new ToDoListResponse(); - AuditLog auditLog = null; + ToDosResponse response = new ToDosResponse(); + AuditLog auditLog = null; try { @@ -598,19 +596,19 @@ public ToDoListResponse getAssignedActions(String serverName, if (requestBody != null) { - response.setToDoElements(handler.getAssignedActions(userId, - actorGUID, - requestBody.getToDoStatus(), - startFrom, - pageSize)); + response.setElements(handler.getAssignedActions(userId, + actorGUID, + requestBody.getToDoStatus(), + startFrom, + pageSize)); } else { - response.setToDoElements(handler.getAssignedActions(userId, - actorGUID, - null, - startFrom, - pageSize)); + response.setElements(handler.getAssignedActions(userId, + actorGUID, + null, + startFrom, + pageSize)); } } catch (Exception error) @@ -640,20 +638,20 @@ public ToDoListResponse getAssignedActions(String serverName, * PropertyServerException the server is not available * UserNotAuthorizedException the calling user is not authorized to issue the call */ - public ToDoListResponse findToDos(String serverName, - int startFrom, - int pageSize, - boolean startsWith, - boolean endsWith, - boolean ignoreCase, - ToDoStatusSearchString requestBody) + public ToDosResponse findToDos(String serverName, + int startFrom, + int pageSize, + boolean startsWith, + boolean endsWith, + boolean ignoreCase, + ToDoStatusSearchString requestBody) { final String methodName = "findToDos"; RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); - ToDoListResponse response = new ToDoListResponse(); - AuditLog auditLog = null; + ToDosResponse response = new ToDosResponse(); + AuditLog auditLog = null; try { @@ -666,11 +664,11 @@ public ToDoListResponse findToDos(String serverName, if (requestBody != null) { - response.setToDoElements(handler.findToDos(userId, - instanceHandler.getSearchString(requestBody.getSearchString(), startsWith, endsWith, ignoreCase), - requestBody.getToDoStatus(), - startFrom, - pageSize)); + response.setElements(handler.findToDos(userId, + instanceHandler.getSearchString(requestBody.getSearchString(), startsWith, endsWith, ignoreCase), + requestBody.getToDoStatus(), + startFrom, + pageSize)); } else { @@ -702,18 +700,18 @@ public ToDoListResponse findToDos(String serverName, * PropertyServerException the server is not available * UserNotAuthorizedException the calling user is not authorized to issue the call */ - public ToDoListResponse getToDosByType(String serverName, - String toDoType, - int startFrom, - int pageSize, - ToDoStatusRequestBody requestBody) + public ToDosResponse getToDosByType(String serverName, + String toDoType, + int startFrom, + int pageSize, + ToDoStatusRequestBody requestBody) { final String methodName = "getToDosByType"; RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); - ToDoListResponse response = new ToDoListResponse(); - AuditLog auditLog = null; + ToDosResponse response = new ToDosResponse(); + AuditLog auditLog = null; try { @@ -726,19 +724,19 @@ public ToDoListResponse getToDosByType(String serverName, if (requestBody != null) { - response.setToDoElements(handler.getToDosByType(userId, - toDoType, - requestBody.getToDoStatus(), - startFrom, - pageSize)); + response.setElements(handler.getToDosByType(userId, + toDoType, + requestBody.getToDoStatus(), + startFrom, + pageSize)); } else { - response.setToDoElements(handler.getToDosByType(userId, - toDoType, - null, - startFrom, - pageSize)); + response.setElements(handler.getToDosByType(userId, + toDoType, + null, + startFrom, + pageSize)); } } catch (Exception error) diff --git a/open-metadata-implementation/view-services/my-profile/my-profile-spring/build.gradle b/open-metadata-implementation/view-services/my-profile/my-profile-spring/build.gradle index dd18a1e1d59..5058dc1cb5c 100644 --- a/open-metadata-implementation/view-services/my-profile/my-profile-spring/build.gradle +++ b/open-metadata-implementation/view-services/my-profile/my-profile-spring/build.gradle @@ -9,6 +9,7 @@ dependencies { implementation project(':open-metadata-implementation:view-services:my-profile:my-profile-server') implementation project(':open-metadata-implementation:access-services:community-profile:community-profile-api') implementation project(':open-metadata-implementation:common-services:ffdc-services') + implementation project(':open-metadata-implementation:frameworks:open-metadata-framework') implementation 'org.springframework:spring-web' implementation 'io.swagger.core.v3:swagger-annotations' compileOnly 'com.fasterxml.jackson.core:jackson-annotations' diff --git a/open-metadata-implementation/view-services/my-profile/my-profile-spring/src/main/java/org/odpi/openmetadata/viewservices/myprofile/server/spring/MyProfileResource.java b/open-metadata-implementation/view-services/my-profile/my-profile-spring/src/main/java/org/odpi/openmetadata/viewservices/myprofile/server/spring/MyProfileResource.java index 9794cbc7d93..c21749b1902 100644 --- a/open-metadata-implementation/view-services/my-profile/my-profile-spring/src/main/java/org/odpi/openmetadata/viewservices/myprofile/server/spring/MyProfileResource.java +++ b/open-metadata-implementation/view-services/my-profile/my-profile-spring/src/main/java/org/odpi/openmetadata/viewservices/myprofile/server/spring/MyProfileResource.java @@ -5,12 +5,8 @@ import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ActionTargetProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ToDoProperties; -import org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.NullRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; -import org.odpi.openmetadata.viewservices.myprofile.rest.*; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actions.*; import org.odpi.openmetadata.viewservices.myprofile.server.MyProfileRESTServices; import org.springframework.web.bind.annotation.*; @@ -137,7 +133,7 @@ public VoidResponse updateToDo(@PathVariable String serverName, public VoidResponse updateActionTargetProperties(@PathVariable String serverName, @PathVariable String actionTargetGUID, @RequestParam boolean isMergeUpdate, - @RequestBody ActionTargetProperties actionTargetProperties) + @RequestBody ToDoActionTargetProperties actionTargetProperties) { return restAPI.updateActionTargetProperties(serverName, actionTargetGUID, isMergeUpdate, actionTargetProperties); } @@ -247,11 +243,11 @@ public ToDoResponse getToDo(@PathVariable String serverName, externalDocs=@ExternalDocumentation(description="To Dos", url="https://egeria-project.org/concepts/to-do")) - public ToDoListResponse getActionsForActionTarget(@PathVariable String serverName, - @PathVariable String elementGUID, - @RequestParam int startFrom, - @RequestParam int pageSize, - @RequestBody (required = false) + public ToDosResponse getActionsForActionTarget(@PathVariable String serverName, + @PathVariable String elementGUID, + @RequestParam int startFrom, + @RequestParam int pageSize, + @RequestBody (required = false) ToDoStatusRequestBody requestBody) { return restAPI.getActionsForActionTarget(serverName, elementGUID, startFrom, pageSize, requestBody); @@ -279,11 +275,11 @@ public ToDoListResponse getActionsForActionTarget(@PathVariable String externalDocs=@ExternalDocumentation(description="To Dos", url="https://egeria-project.org/concepts/to-do")) - public ToDoListResponse getActionsForSponsor(@PathVariable String serverName, - @PathVariable String elementGUID, - @RequestParam int startFrom, - @RequestParam int pageSize, - @RequestBody (required = false) + public ToDosResponse getActionsForSponsor(@PathVariable String serverName, + @PathVariable String elementGUID, + @RequestParam int startFrom, + @RequestParam int pageSize, + @RequestBody (required = false) ToDoStatusRequestBody requestBody) { return restAPI.getActionsForSponsor(serverName, elementGUID, startFrom, pageSize, requestBody); @@ -311,11 +307,11 @@ public ToDoListResponse getActionsForSponsor(@PathVariable String externalDocs=@ExternalDocumentation(description="To Dos", url="https://egeria-project.org/concepts/to-do")) - public ToDoListResponse getAssignedActions(@PathVariable String serverName, - @PathVariable String actorGUID, - @RequestParam int startFrom, - @RequestParam int pageSize, - @RequestBody (required = false) + public ToDosResponse getAssignedActions(@PathVariable String serverName, + @PathVariable String actorGUID, + @RequestParam int startFrom, + @RequestParam int pageSize, + @RequestBody (required = false) ToDoStatusRequestBody requestBody) { return restAPI.getAssignedActions(serverName, actorGUID, startFrom, pageSize, requestBody); @@ -345,16 +341,16 @@ public ToDoListResponse getAssignedActions(@PathVariable String s externalDocs=@ExternalDocumentation(description="To Dos", url="https://egeria-project.org/concepts/to-do")) - public ToDoListResponse findToDos(@PathVariable String serverName, - @RequestParam int startFrom, - @RequestParam int pageSize, - @RequestParam (required = false, defaultValue = "false") + public ToDosResponse findToDos(@PathVariable String serverName, + @RequestParam int startFrom, + @RequestParam int pageSize, + @RequestParam (required = false, defaultValue = "false") boolean startsWith, - @RequestParam (required = false, defaultValue = "false") + @RequestParam (required = false, defaultValue = "false") boolean endsWith, - @RequestParam (required = false, defaultValue = "false") + @RequestParam (required = false, defaultValue = "false") boolean ignoreCase, - @RequestBody ToDoStatusSearchString requestBody) + @RequestBody ToDoStatusSearchString requestBody) { return restAPI.findToDos(serverName, startFrom, pageSize, startsWith, endsWith, ignoreCase, requestBody); } @@ -381,11 +377,11 @@ public ToDoListResponse findToDos(@PathVariable String externalDocs=@ExternalDocumentation(description="To Dos", url="https://egeria-project.org/concepts/to-do")) - public ToDoListResponse getToDosByType(@PathVariable String serverName, - @PathVariable String toDoType, - @RequestParam int startFrom, - @RequestParam int pageSize, - @RequestBody (required = false) + public ToDosResponse getToDosByType(@PathVariable String serverName, + @PathVariable String toDoType, + @RequestParam int startFrom, + @RequestParam int pageSize, + @RequestBody (required = false) ToDoStatusRequestBody requestBody) { return restAPI.getToDosByType(serverName, toDoType, startFrom, pageSize, requestBody); diff --git a/open-metadata-implementation/view-services/project-manager/project-manager-server/src/main/java/org/odpi/openmetadata/viewservices/projectmanager/rest/NewElementRequestBody.java b/open-metadata-implementation/view-services/project-manager/project-manager-server/src/main/java/org/odpi/openmetadata/viewservices/projectmanager/rest/NewElementRequestBody.java deleted file mode 100644 index 850d345bc4b..00000000000 --- a/open-metadata-implementation/view-services/project-manager/project-manager-server/src/main/java/org/odpi/openmetadata/viewservices/projectmanager/rest/NewElementRequestBody.java +++ /dev/null @@ -1,259 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.viewservices.projectmanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStatus; -import org.odpi.openmetadata.frameworks.governanceaction.search.ElementProperties; - -import java.util.Date; -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * NewElementRequestBody provides a structure for the common properties when creating an element. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class NewElementRequestBody -{ - private String anchorGUID = null; - private boolean isOwnAnchor = false; - private String parentGUID = null; - private String parentRelationshipTypeName = null; - private ElementProperties parentRelationshipProperties = null; - private boolean parentAtEnd1 = true; - - - /** - * Default constructor - */ - public NewElementRequestBody() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public NewElementRequestBody(NewElementRequestBody template) - { - if (template != null) - { - anchorGUID = template.getAnchorGUID(); - isOwnAnchor = template.getIsOwnAnchor(); - parentGUID = template.getParentGUID(); - parentRelationshipTypeName = template.getParentRelationshipTypeName(); - parentRelationshipProperties = template.getParentRelationshipProperties(); - parentAtEnd1 = template.getParentAtEnd1(); - } - } - - - /** - * Return the unique identifier of the element that should be the anchor for the new element. It is set to null if no anchor, - * or the Anchors classification is included in the initial classifications. - * - * @return string guid - */ - public String getAnchorGUID() - { - return anchorGUID; - } - - - /** - * Set up the unique identifier of the element that should be the anchor for the new element. Set to null if no anchor, - * or the new project should be its own anchor. - * - * @param anchorGUID string guid - */ - public void setAnchorGUID(String anchorGUID) - { - this.anchorGUID = anchorGUID; - } - - - /** - * Return whether this element should be classified as its own anchor or not. The default is false. - * - * @return boolean - */ - public boolean getIsOwnAnchor() - { - return isOwnAnchor; - } - - - /** - * Set up whether this element should be classified as its own anchor or not. The default is false. - * - * @param ownAnchor boolean - */ - public void setIsOwnAnchor(boolean ownAnchor) - { - isOwnAnchor = ownAnchor; - } - - - /** - * Return the optional unique identifier for an element that should be connected to the newly created element. - * If this property is specified, parentRelationshipTypeName must also be specified. - * - * @return string guid - */ - public String getParentGUID() - { - return parentGUID; - } - - - /** - * Set up the optional unique identifier for an element that should be connected to the newly created element. - * If this property is specified, parentRelationshipTypeName must also be specified. - * - * @param parentGUID string guid - */ - public void setParentGUID(String parentGUID) - { - this.parentGUID = parentGUID; - } - - - /** - * Return the name of the relationship, if any, that should be established between the new element and the parent element. - * - * @return string type name - */ - public String getParentRelationshipTypeName() - { - return parentRelationshipTypeName; - } - - - /** - * Set up the name of the optional relationship from the newly created element to a parent element. - * - * @param parentRelationshipTypeName string type name - */ - public void setParentRelationshipTypeName(String parentRelationshipTypeName) - { - this.parentRelationshipTypeName = parentRelationshipTypeName; - } - - - /** - * Return any properties that should be included in the parent relationship. - * - * @return element properties - */ - public ElementProperties getParentRelationshipProperties() - { - return parentRelationshipProperties; - } - - - /** - * Set up any properties that should be included in the parent relationship. - * - * @param parentRelationshipProperties element properties - */ - public void setParentRelationshipProperties(ElementProperties parentRelationshipProperties) - { - this.parentRelationshipProperties = parentRelationshipProperties; - } - - - /** - * Return which end any parent entity sits on the relationship. - * - * @return boolean - */ - public boolean getParentAtEnd1() - { - return parentAtEnd1; - } - - - /** - * Set up which end any parent entity sits on the relationship. - * - * @param parentAtEnd1 boolean - */ - public void setParentAtEnd1(boolean parentAtEnd1) - { - this.parentAtEnd1 = parentAtEnd1; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "NewElementRequestBody{" + - ", anchorGUID='" + anchorGUID + '\'' + - ", isOwnAnchor='" + isOwnAnchor + '\'' + - ", parentGUID='" + parentGUID + '\'' + - ", parentRelationshipTypeName='" + parentRelationshipTypeName + '\'' + - ", parentRelationshipProperties=" + parentRelationshipProperties + - ", parentAtEnd1=" + parentAtEnd1 + - '}'; - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (! (objectToCompare instanceof NewElementRequestBody that)) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - return parentAtEnd1 == that.parentAtEnd1 && - isOwnAnchor == that.isOwnAnchor && - Objects.equals(anchorGUID, that.anchorGUID) && - Objects.equals(parentGUID, that.parentGUID) && - Objects.equals(parentRelationshipTypeName, that.parentRelationshipTypeName) && - Objects.equals(parentRelationshipProperties, that.parentRelationshipProperties); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), anchorGUID, isOwnAnchor, parentGUID, - parentRelationshipTypeName, parentRelationshipProperties, parentAtEnd1); - } -} diff --git a/open-metadata-implementation/view-services/project-manager/project-manager-server/src/main/java/org/odpi/openmetadata/viewservices/projectmanager/rest/NewMetadataElementRequestBody.java b/open-metadata-implementation/view-services/project-manager/project-manager-server/src/main/java/org/odpi/openmetadata/viewservices/projectmanager/rest/NewMetadataElementRequestBody.java deleted file mode 100644 index ea884c02e29..00000000000 --- a/open-metadata-implementation/view-services/project-manager/project-manager-server/src/main/java/org/odpi/openmetadata/viewservices/projectmanager/rest/NewMetadataElementRequestBody.java +++ /dev/null @@ -1,167 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -package org.odpi.openmetadata.viewservices.projectmanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStatus; -import org.odpi.openmetadata.frameworks.governanceaction.search.ElementProperties; - -import java.util.Map; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * NewMetadataElementRequestBody provides a structure for passing the properties for a new metadata element. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class NewMetadataElementRequestBody extends NewElementRequestBody -{ - private String typeName = null; - private ElementStatus initialStatus = null; - private Map initialClassifications = null; - - - - /** - * Default constructor - */ - public NewMetadataElementRequestBody() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public NewMetadataElementRequestBody(NewMetadataElementRequestBody template) - { - super(template); - - if (template != null) - { - typeName = template.getTypeName(); - initialStatus = template.getInitialStatus(); - initialClassifications = template.getInitialClassifications(); - } - } - - - /** - * Return the open metadata type name for the new metadata element. - * - * @return string name - */ - public String getTypeName() - { - return typeName; - } - - - /** - * Set up the open metadata type name for the new metadata element. - * - * @param typeName string name - */ - public void setTypeName(String typeName) - { - this.typeName = typeName; - } - - - /** - * Return the initial status of the metadata element (typically ACTIVE). - * - * @return element status enum value - */ - public ElementStatus getInitialStatus() - { - return initialStatus; - } - - - /** - * Return the map of classification name to properties describing the initial classification for the new metadata element. - * - * @return map of classification name to classification properties (or null for none) - */ - public Map getInitialClassifications() - { - return initialClassifications; - } - - - /** - * Set up the map of classification name to properties describing the initial classification for the new metadata element. - * - * @param initialClassifications map of classification name to classification properties (or null for none) - */ - public void setInitialClassifications(Map initialClassifications) - { - this.initialClassifications = initialClassifications; - } - - - /** - * JSON-style toString. - * - * @return list of properties and their values. - */ - @Override - public String toString() - { - return "NewMetadataElementRequestBody{" + - "typeName='" + typeName + '\'' + - ", initialStatus=" + initialStatus + - ", initialClassifications=" + initialClassifications + - "} " + super.toString(); - } - - - /** - * Equals method that returns true if containing properties are the same. - * - * @param objectToCompare object to compare - * @return boolean result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (! (objectToCompare instanceof NewMetadataElementRequestBody that)) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - return Objects.equals(typeName, that.typeName) && - initialStatus == that.initialStatus && - Objects.equals(initialClassifications, that.initialClassifications); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), typeName, initialStatus, initialClassifications); - } -} diff --git a/open-metadata-implementation/view-services/project-manager/project-manager-server/src/main/java/org/odpi/openmetadata/viewservices/projectmanager/rest/ProjectListResponse.java b/open-metadata-implementation/view-services/project-manager/project-manager-server/src/main/java/org/odpi/openmetadata/viewservices/projectmanager/rest/ProjectListResponse.java deleted file mode 100644 index c725193c2e0..00000000000 --- a/open-metadata-implementation/view-services/project-manager/project-manager-server/src/main/java/org/odpi/openmetadata/viewservices/projectmanager/rest/ProjectListResponse.java +++ /dev/null @@ -1,149 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.projectmanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.projectmanagement.metadataelements.ProjectElement; -import org.odpi.openmetadata.commonservices.ffdc.rest.FFDCResponseBase; - -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * ProjectListResponse is the response structure used on the OMAS REST API calls that return - * a list of project elements. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ProjectListResponse extends FFDCResponseBase -{ - private List elements = null; - - - /** - * Default constructor - */ - public ProjectListResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ProjectListResponse(ProjectListResponse template) - { - super(template); - - if (template != null) - { - this.elements = template.getElements(); - } - } - - - /** - * Return the project result. - * - * @return unique identifier - */ - public List getElements() - { - if (elements == null) - { - return null; - } - else if (elements.isEmpty()) - { - return null; - } - else - { - return elements; - } - } - - - /** - * Set up the project result. - * - * @param elements - unique identifier - */ - public void setElements(List elements) - { - this.elements = elements; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ProjectListResponse{" + - "elements=" + elements + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof ProjectListResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ProjectListResponse that = (ProjectListResponse) objectToCompare; - return Objects.equals(getElements(), that.getElements()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elements); - } -} diff --git a/open-metadata-implementation/view-services/project-manager/project-manager-server/src/main/java/org/odpi/openmetadata/viewservices/projectmanager/rest/ProjectMemberListResponse.java b/open-metadata-implementation/view-services/project-manager/project-manager-server/src/main/java/org/odpi/openmetadata/viewservices/projectmanager/rest/ProjectMemberListResponse.java deleted file mode 100644 index d60ef11a257..00000000000 --- a/open-metadata-implementation/view-services/project-manager/project-manager-server/src/main/java/org/odpi/openmetadata/viewservices/projectmanager/rest/ProjectMemberListResponse.java +++ /dev/null @@ -1,149 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.projectmanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.projectmanagement.metadataelements.ProjectTeamMember; -import org.odpi.openmetadata.commonservices.ffdc.rest.FFDCResponseBase; - -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * ProjectMemberListResponse is the response structure used on the OMAS REST API calls that return - * a list of project membership elements. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ProjectMemberListResponse extends FFDCResponseBase -{ - private List elements = null; - - - /** - * Default constructor - */ - public ProjectMemberListResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ProjectMemberListResponse(ProjectMemberListResponse template) - { - super(template); - - if (template != null) - { - this.elements = template.getElements(); - } - } - - - /** - * Return the project membership result. - * - * @return unique identifier - */ - public List getElements() - { - if (elements == null) - { - return null; - } - else if (elements.isEmpty()) - { - return null; - } - else - { - return elements; - } - } - - - /** - * Set up the project membership result. - * - * @param elements - unique identifier - */ - public void setElements(List elements) - { - this.elements = elements; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ProjectMemberListResponse{" + - "elements=" + elements + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof ProjectMemberListResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ProjectMemberListResponse that = (ProjectMemberListResponse) objectToCompare; - return Objects.equals(getElements(), that.getElements()); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), elements); - } -} diff --git a/open-metadata-implementation/view-services/project-manager/project-manager-server/src/main/java/org/odpi/openmetadata/viewservices/projectmanager/rest/ProjectMemberResponse.java b/open-metadata-implementation/view-services/project-manager/project-manager-server/src/main/java/org/odpi/openmetadata/viewservices/projectmanager/rest/ProjectMemberResponse.java deleted file mode 100644 index a756eddbe0d..00000000000 --- a/open-metadata-implementation/view-services/project-manager/project-manager-server/src/main/java/org/odpi/openmetadata/viewservices/projectmanager/rest/ProjectMemberResponse.java +++ /dev/null @@ -1,137 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.projectmanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.projectmanagement.metadataelements.ProjectTeamMember; -import org.odpi.openmetadata.commonservices.ffdc.rest.FFDCResponseBase; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * ProjectMemberResponse is the response structure used on the OMAS REST API calls that return a - * ProjectTeamMember object as a response. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ProjectMemberResponse extends FFDCResponseBase -{ - private ProjectTeamMember element = null; - - - /** - * Default constructor - */ - public ProjectMemberResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ProjectMemberResponse(ProjectMemberResponse template) - { - super(template); - - if (template != null) - { - this.element = template.getElement(); - } - } - - - /** - * Return the element result. - * - * @return details of person role - */ - public ProjectTeamMember getElement() - { - return element; - } - - - /** - * Set up the element result. - * - * @param element details of person role - */ - public void setElement(ProjectTeamMember element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ProjectMemberResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof ProjectMemberResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ProjectMemberResponse that = (ProjectMemberResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/view-services/project-manager/project-manager-server/src/main/java/org/odpi/openmetadata/viewservices/projectmanager/rest/ProjectResponse.java b/open-metadata-implementation/view-services/project-manager/project-manager-server/src/main/java/org/odpi/openmetadata/viewservices/projectmanager/rest/ProjectResponse.java deleted file mode 100644 index 65d10d2769a..00000000000 --- a/open-metadata-implementation/view-services/project-manager/project-manager-server/src/main/java/org/odpi/openmetadata/viewservices/projectmanager/rest/ProjectResponse.java +++ /dev/null @@ -1,137 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.viewservices.projectmanager.rest; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.projectmanagement.metadataelements.ProjectElement; -import org.odpi.openmetadata.commonservices.ffdc.rest.FFDCResponseBase; - -import java.util.Arrays; -import java.util.Objects; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - - -/** - * ProjectResponse is the response structure used on the OMAS REST API calls that return a - * ProjectElement object as a response. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ProjectResponse extends FFDCResponseBase -{ - private ProjectElement element = null; - - - /** - * Default constructor - */ - public ProjectResponse() - { - super(); - } - - - /** - * Copy/clone constructor - * - * @param template object to copy - */ - public ProjectResponse(ProjectResponse template) - { - super(template); - - if (template != null) - { - this.element = template.getElement(); - } - } - - - /** - * Return the element result. - * - * @return details of person role - */ - public ProjectElement getElement() - { - return element; - } - - - /** - * Set up the element result. - * - * @param element details of person role - */ - public void setElement(ProjectElement element) - { - this.element = element; - } - - - /** - * JSON-style toString - * - * @return return string containing the property names and values - */ - @Override - public String toString() - { - return "ProjectResponse{" + - "element=" + element + - ", exceptionClassName='" + getExceptionClassName() + '\'' + - ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + - ", actionDescription='" + getActionDescription() + '\'' + - ", relatedHTTPCode=" + getRelatedHTTPCode() + - ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + - ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + - ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + - ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + - ", exceptionUserAction='" + getExceptionUserAction() + '\'' + - ", exceptionProperties=" + getExceptionProperties() + - '}'; - } - - - /** - * Return comparison result based on the content of the properties. - * - * @param objectToCompare test object - * @return result of comparison - */ - @Override - public boolean equals(Object objectToCompare) - { - if (this == objectToCompare) - { - return true; - } - if (!(objectToCompare instanceof ProjectResponse)) - { - return false; - } - if (!super.equals(objectToCompare)) - { - return false; - } - ProjectResponse that = (ProjectResponse) objectToCompare; - return Objects.equals(element, that.element); - } - - - /** - * Return hash code for this object - * - * @return int hash code - */ - @Override - public int hashCode() - { - return Objects.hash(super.hashCode(), element); - } -} diff --git a/open-metadata-implementation/view-services/project-manager/project-manager-server/src/main/java/org/odpi/openmetadata/viewservices/projectmanager/rest/package-info.java b/open-metadata-implementation/view-services/project-manager/project-manager-server/src/main/java/org/odpi/openmetadata/viewservices/projectmanager/rest/package-info.java deleted file mode 100644 index ddef90917d2..00000000000 --- a/open-metadata-implementation/view-services/project-manager/project-manager-server/src/main/java/org/odpi/openmetadata/viewservices/projectmanager/rest/package-info.java +++ /dev/null @@ -1,10 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ - -/** - *

          This package defines the beans used to build the REST request and response payloads.

          - *

          REST APIs can pass parameters in their URLs (called path variables) as well has having a RequestBody bean - * for additional, more complex, or optional parameters. Responses are returned in response beans.

          - *

          The response beans encode the return type of the method as well as any exceptions and associated messages.

          - */ -package org.odpi.openmetadata.viewservices.projectmanager.rest; diff --git a/open-metadata-implementation/view-services/project-manager/project-manager-server/src/main/java/org/odpi/openmetadata/viewservices/projectmanager/server/ProjectManagerRESTServices.java b/open-metadata-implementation/view-services/project-manager/project-manager-server/src/main/java/org/odpi/openmetadata/viewservices/projectmanager/server/ProjectManagerRESTServices.java index 2e361fb1e42..cb1b7e4ca4d 100644 --- a/open-metadata-implementation/view-services/project-manager/project-manager-server/src/main/java/org/odpi/openmetadata/viewservices/projectmanager/server/ProjectManagerRESTServices.java +++ b/open-metadata-implementation/view-services/project-manager/project-manager-server/src/main/java/org/odpi/openmetadata/viewservices/projectmanager/server/ProjectManagerRESTServices.java @@ -4,9 +4,6 @@ package org.odpi.openmetadata.viewservices.projectmanager.server; import org.odpi.openmetadata.accessservices.projectmanagement.client.ProjectManagement; -import org.odpi.openmetadata.accessservices.projectmanagement.rest.ExternalSourceRequestBody; -import org.odpi.openmetadata.accessservices.projectmanagement.rest.RelatedElementListResponse; -import org.odpi.openmetadata.accessservices.projectmanagement.rest.RelationshipRequestBody; import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; @@ -17,7 +14,7 @@ import org.odpi.openmetadata.frameworks.openmetadata.properties.resources.ResourceListProperties; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.tokencontroller.TokenController; -import org.odpi.openmetadata.viewservices.projectmanager.rest.*; +import org.odpi.openmetadata.commonservices.ffdc.rest.ProjectMembersResponse; import org.slf4j.LoggerFactory; @@ -61,18 +58,18 @@ public ProjectManagerRESTServices() * PropertyServerException there is a problem retrieving information from the property server(s). * UserNotAuthorizedException the requesting user is not authorized to issue this request. */ - public ProjectListResponse getLinkedProjects(String serverName, - String parentGUID, - int startFrom, - int pageSize, - FilterRequestBody requestBody) + public ProjectsResponse getLinkedProjects(String serverName, + String parentGUID, + int startFrom, + int pageSize, + FilterRequestBody requestBody) { final String methodName = "getLinkedProjects"; RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); - ProjectListResponse response = new ProjectListResponse(); - AuditLog auditLog = null; + ProjectsResponse response = new ProjectsResponse(); + AuditLog auditLog = null; try { @@ -117,17 +114,17 @@ public ProjectListResponse getLinkedProjects(String serverName, * PropertyServerException there is a problem retrieving information from the property server(s). * UserNotAuthorizedException the requesting user is not authorized to issue this request. */ - public ProjectMemberListResponse getProjectTeam(String serverName, - String projectGUID, - int startFrom, - int pageSize, - FilterRequestBody requestBody) + public ProjectMembersResponse getProjectTeam(String serverName, + String projectGUID, + int startFrom, + int pageSize, + FilterRequestBody requestBody) { final String methodName = "getProjectTeam"; RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); - ProjectMemberListResponse response = new ProjectMemberListResponse(); + ProjectMembersResponse response = new ProjectMembersResponse(); AuditLog auditLog = null; try @@ -172,7 +169,7 @@ public ProjectMemberListResponse getProjectTeam(String serverName, * PropertyServerException there is a problem retrieving information from the property server(s). * UserNotAuthorizedException the requesting user is not authorized to issue this request. */ - public ProjectListResponse getClassifiedProjects(String serverName, + public ProjectsResponse getClassifiedProjects(String serverName, int startFrom, int pageSize, FilterRequestBody requestBody) @@ -181,7 +178,7 @@ public ProjectListResponse getClassifiedProjects(String serverName, RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); - ProjectListResponse response = new ProjectListResponse(); + ProjectsResponse response = new ProjectsResponse(); AuditLog auditLog = null; try @@ -229,7 +226,7 @@ public ProjectListResponse getClassifiedProjects(String serverName, * PropertyServerException there is a problem retrieving information from the property server(s). * UserNotAuthorizedException the requesting user is not authorized to issue this request. */ - public ProjectListResponse findProjects(String serverName, + public ProjectsResponse findProjects(String serverName, boolean startsWith, boolean endsWith, boolean ignoreCase, @@ -241,7 +238,7 @@ public ProjectListResponse findProjects(String serverName, RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); - ProjectListResponse response = new ProjectListResponse(); + ProjectsResponse response = new ProjectsResponse(); AuditLog auditLog = null; try @@ -292,7 +289,7 @@ public ProjectListResponse findProjects(String serverName, * PropertyServerException there is a problem retrieving information from the property server(s). * UserNotAuthorizedException the requesting user is not authorized to issue this request. */ - public ProjectListResponse getProjectsByName(String serverName, + public ProjectsResponse getProjectsByName(String serverName, int startFrom, int pageSize, FilterRequestBody requestBody) @@ -301,7 +298,7 @@ public ProjectListResponse getProjectsByName(String serverName, RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); - ProjectListResponse response = new ProjectListResponse(); + ProjectsResponse response = new ProjectsResponse(); AuditLog auditLog = null; try @@ -1028,17 +1025,17 @@ public VoidResponse clearResource(String serverName, * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - public RelatedElementListResponse getResourceList(String serverName, - String elementGUID, - int startFrom, - int pageSize) + public RelatedElementsResponse getResourceList(String serverName, + String elementGUID, + int startFrom, + int pageSize) { final String methodName = "getResourceList"; RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); - RelatedElementListResponse response = new RelatedElementListResponse(); - AuditLog auditLog = null; + RelatedElementsResponse response = new RelatedElementsResponse(); + AuditLog auditLog = null; try { @@ -1075,17 +1072,17 @@ public RelatedElementListResponse getResourceList(String serverName, * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - public RelatedElementListResponse getSupportedByResource(String serverName, - String resourceGUID, - int startFrom, - int pageSize) + public RelatedElementsResponse getSupportedByResource(String serverName, + String resourceGUID, + int startFrom, + int pageSize) { final String methodName = "getSupportedByResource"; RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); - RelatedElementListResponse response = new RelatedElementListResponse(); - AuditLog auditLog = null; + RelatedElementsResponse response = new RelatedElementsResponse(); + AuditLog auditLog = null; try { diff --git a/open-metadata-implementation/view-services/project-manager/project-manager-spring/src/main/java/org/odpi/openmetadata/viewservices/projectmanager/server/spring/ProjectManagerResource.java b/open-metadata-implementation/view-services/project-manager/project-manager-spring/src/main/java/org/odpi/openmetadata/viewservices/projectmanager/server/spring/ProjectManagerResource.java index 720ea67b7f0..d5d11cd27ee 100644 --- a/open-metadata-implementation/view-services/project-manager/project-manager-spring/src/main/java/org/odpi/openmetadata/viewservices/projectmanager/server/spring/ProjectManagerResource.java +++ b/open-metadata-implementation/view-services/project-manager/project-manager-spring/src/main/java/org/odpi/openmetadata/viewservices/projectmanager/server/spring/ProjectManagerResource.java @@ -5,13 +5,10 @@ import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.accessservices.projectmanagement.rest.ExternalSourceRequestBody; -import org.odpi.openmetadata.accessservices.projectmanagement.rest.RelatedElementListResponse; -import org.odpi.openmetadata.accessservices.projectmanagement.rest.RelationshipRequestBody; import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.odpi.openmetadata.frameworks.openmetadata.properties.projects.ProjectProperties; import org.odpi.openmetadata.frameworks.openmetadata.properties.projects.ProjectTeamProperties; -import org.odpi.openmetadata.viewservices.projectmanager.rest.*; +import org.odpi.openmetadata.commonservices.ffdc.rest.ProjectMembersResponse; import org.odpi.openmetadata.viewservices.projectmanager.server.ProjectManagerRESTServices; import org.springframework.web.bind.annotation.*; @@ -65,13 +62,13 @@ public ProjectManagerResource() externalDocs=@ExternalDocumentation(description="Further Information", url="https://egeria-project.org/concepts/project")) - public ProjectListResponse getLinkedProjects(@PathVariable String serverName, - @PathVariable String parentGUID, - @RequestParam(required = false, defaultValue = "0") - int startFrom, - @RequestParam(required = false, defaultValue = "0") - int pageSize, - @RequestBody(required = false) + public ProjectsResponse getLinkedProjects(@PathVariable String serverName, + @PathVariable String parentGUID, + @RequestParam(required = false, defaultValue = "0") + int startFrom, + @RequestParam(required = false, defaultValue = "0") + int pageSize, + @RequestBody(required = false) FilterRequestBody requestBody) { return restAPI.getLinkedProjects(serverName, parentGUID, startFrom, pageSize, requestBody); @@ -97,7 +94,7 @@ public ProjectListResponse getLinkedProjects(@PathVariable String ser externalDocs=@ExternalDocumentation(description="Further Information", url="https://egeria-project.org/concepts/project")) - public ProjectListResponse getClassifiedProjects(@PathVariable String serverName, + public ProjectsResponse getClassifiedProjects(@PathVariable String serverName, @RequestParam(required = false, defaultValue = "0") int startFrom, @RequestParam(required = false, defaultValue = "0") @@ -131,13 +128,13 @@ public ProjectListResponse getClassifiedProjects(@PathVariable String externalDocs=@ExternalDocumentation(description="Further Information", url="https://egeria-project.org/concepts/project")) - public ProjectMemberListResponse getProjectTeam(@PathVariable String serverName, - @PathVariable String projectGUID, - @RequestParam(required = false, defaultValue = "0") + public ProjectMembersResponse getProjectTeam(@PathVariable String serverName, + @PathVariable String projectGUID, + @RequestParam(required = false, defaultValue = "0") int startFrom, - @RequestParam(required = false, defaultValue = "0") + @RequestParam(required = false, defaultValue = "0") int pageSize, - @RequestBody(required = false) FilterRequestBody requestBody) + @RequestBody(required = false) FilterRequestBody requestBody) { return restAPI.getProjectTeam(serverName, projectGUID, startFrom, pageSize, requestBody); } @@ -165,7 +162,7 @@ public ProjectMemberListResponse getProjectTeam(@PathVariable String externalDocs=@ExternalDocumentation(description="Further Information", url="https://egeria-project.org/concepts/project")) - public ProjectListResponse findProjects(@PathVariable String serverName, + public ProjectsResponse findProjects(@PathVariable String serverName, @RequestParam (required = false, defaultValue = "false") boolean startsWith, @RequestParam (required = false, defaultValue = "false") @@ -202,7 +199,7 @@ public ProjectListResponse findProjects(@PathVariable String serverNa externalDocs=@ExternalDocumentation(description="Further Information", url="https://egeria-project.org/concepts/project")) - public ProjectListResponse getProjectsByName(@PathVariable String serverName, + public ProjectsResponse getProjectsByName(@PathVariable String serverName, @RequestParam(required = false, defaultValue = "0") int startFrom, @RequestParam(required = false, defaultValue = "0") @@ -565,10 +562,10 @@ public VoidResponse clearResource(@PathVariable String server externalDocs=@ExternalDocumentation(description="Further Information", url="https://egeria-project.org/concepts/resource")) - public RelatedElementListResponse getResourceList(@PathVariable String serverName, - @PathVariable String elementGUID, - @RequestParam int startFrom, - @RequestParam int pageSize) + public RelatedElementsResponse getResourceList(@PathVariable String serverName, + @PathVariable String elementGUID, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getResourceList(serverName, elementGUID, startFrom, pageSize); } @@ -594,10 +591,10 @@ public RelatedElementListResponse getResourceList(@PathVariable String serverNam externalDocs=@ExternalDocumentation(description="Further Information", url="https://egeria-project.org/concepts/resource")) - public RelatedElementListResponse getSupportedByResource(@PathVariable String serverName, - @PathVariable String resourceGUID, - @RequestParam int startFrom, - @RequestParam int pageSize) + public RelatedElementsResponse getSupportedByResource(@PathVariable String serverName, + @PathVariable String resourceGUID, + @RequestParam int startFrom, + @RequestParam int pageSize) { return restAPI.getSupportedByResource(serverName, resourceGUID, startFrom, pageSize); } diff --git a/open-metadata-implementation/view-services/runtime-manager/runtime-manager-server/src/main/java/org/odpi/openmetadata/viewservices/runtimemanager/server/RuntimeManagerRESTServices.java b/open-metadata-implementation/view-services/runtime-manager/runtime-manager-server/src/main/java/org/odpi/openmetadata/viewservices/runtimemanager/server/RuntimeManagerRESTServices.java index 8223b49821f..8023dfd3533 100644 --- a/open-metadata-implementation/view-services/runtime-manager/runtime-manager-server/src/main/java/org/odpi/openmetadata/viewservices/runtimemanager/server/RuntimeManagerRESTServices.java +++ b/open-metadata-implementation/view-services/runtime-manager/runtime-manager-server/src/main/java/org/odpi/openmetadata/viewservices/runtimemanager/server/RuntimeManagerRESTServices.java @@ -6,24 +6,19 @@ import org.odpi.openmetadata.accessservices.itinfrastructure.client.ConnectedAssetClient; import org.odpi.openmetadata.accessservices.itinfrastructure.client.PlatformManagerClient; import org.odpi.openmetadata.accessservices.itinfrastructure.client.ServerManagerClient; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.SoftwareServerElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.SoftwareServerPlatformElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.SoftwareServerListResponse; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.SoftwareServerPlatformListResponse; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.SoftwareServerPlatformResponse; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.SoftwareServerResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.SoftwareServerElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.SoftwareServerPlatformElement; import org.odpi.openmetadata.adapters.connectors.egeriainfrastructure.platform.OMAGServerPlatformConnector; import org.odpi.openmetadata.adapters.connectors.egeriainfrastructure.servers.MetadataAccessServerConnector; import org.odpi.openmetadata.adapters.connectors.egeriainfrastructure.servers.OMAGServerConnectorBase; import org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger; import org.odpi.openmetadata.commonservices.ffdc.RESTCallToken; import org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler; -import org.odpi.openmetadata.commonservices.ffdc.rest.FilterRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.Connector; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementClassification; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementClassification; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.repositoryservices.connectors.stores.archivestore.properties.OpenMetadataArchive; import org.odpi.openmetadata.serveroperations.rest.SuccessMessageResponse; @@ -72,17 +67,17 @@ public RuntimeManagerRESTServices() * PropertyServerException there is a problem retrieving information from the property server(s). * UserNotAuthorizedException the requesting user is not authorized to issue this request. */ - public SoftwareServerPlatformListResponse getPlatformsByName(String serverName, - int startFrom, - int pageSize, - FilterRequestBody requestBody) + public SoftwareServerPlatformsResponse getPlatformsByName(String serverName, + int startFrom, + int pageSize, + FilterRequestBody requestBody) { final String methodName = "getPlatformsByName"; RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); - SoftwareServerPlatformListResponse response = new SoftwareServerPlatformListResponse(); - AuditLog auditLog = null; + SoftwareServerPlatformsResponse response = new SoftwareServerPlatformsResponse(); + AuditLog auditLog = null; try { @@ -96,7 +91,7 @@ public SoftwareServerPlatformListResponse getPlatformsByName(String s if (requestBody != null) { - response.setElementList(handler.getSoftwareServerPlatformsByName(userId, requestBody.getFilter(), requestBody.getEffectiveTime(), startFrom, pageSize)); + response.setElements(handler.getSoftwareServerPlatformsByName(userId, requestBody.getFilter(), requestBody.getEffectiveTime(), startFrom, pageSize)); } else { @@ -127,18 +122,18 @@ public SoftwareServerPlatformListResponse getPlatformsByName(String s * PropertyServerException there is a problem retrieving information from the property server(s). * UserNotAuthorizedException the requesting user is not authorized to issue this request. */ - public SoftwareServerPlatformListResponse getPlatformsByDeployedImplType(String serverName, - int startFrom, - int pageSize, - boolean getTemplates, - FilterRequestBody requestBody) + public SoftwareServerPlatformsResponse getPlatformsByDeployedImplType(String serverName, + int startFrom, + int pageSize, + boolean getTemplates, + FilterRequestBody requestBody) { final String methodName = "getPlatformsByDeployedImplType"; RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); - SoftwareServerPlatformListResponse response = new SoftwareServerPlatformListResponse(); - AuditLog auditLog = null; + SoftwareServerPlatformsResponse response = new SoftwareServerPlatformsResponse(); + AuditLog auditLog = null; try { @@ -182,7 +177,7 @@ public SoftwareServerPlatformListResponse getPlatformsByDeployedImplType(String if (! filteredPlatforms.isEmpty()) { - response.setElementList(filteredPlatforms); + response.setElements(filteredPlatforms); } } } @@ -329,17 +324,17 @@ public PlatformReportResponse getPlatformReport(String serverName, * PropertyServerException there is a problem retrieving information from the property server(s). * UserNotAuthorizedException the requesting user is not authorized to issue this request. */ - public SoftwareServerListResponse getServersByName(String serverName, - int startFrom, - int pageSize, - FilterRequestBody requestBody) + public SoftwareServersResponse getServersByName(String serverName, + int startFrom, + int pageSize, + FilterRequestBody requestBody) { final String methodName = "getServersByName"; RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); - SoftwareServerListResponse response = new SoftwareServerListResponse(); - AuditLog auditLog = null; + SoftwareServersResponse response = new SoftwareServersResponse(); + AuditLog auditLog = null; try { @@ -353,7 +348,7 @@ public SoftwareServerListResponse getServersByName(String serverName, if (requestBody != null) { - response.setElementList(handler.getSoftwareServersByName(userId, requestBody.getFilter(), requestBody.getEffectiveTime(), startFrom, pageSize)); + response.setElements(handler.getSoftwareServersByName(userId, requestBody.getFilter(), requestBody.getEffectiveTime(), startFrom, pageSize)); } else { @@ -384,18 +379,18 @@ public SoftwareServerListResponse getServersByName(String serverName, * PropertyServerException there is a problem retrieving information from the property server(s). * UserNotAuthorizedException the requesting user is not authorized to issue this request. */ - public SoftwareServerListResponse getServersByDeployedImplType(String serverName, - int startFrom, - int pageSize, - boolean getTemplates, - FilterRequestBody requestBody) + public SoftwareServersResponse getServersByDeployedImplType(String serverName, + int startFrom, + int pageSize, + boolean getTemplates, + FilterRequestBody requestBody) { final String methodName = "getServersByDeployedImplType"; RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); - SoftwareServerListResponse response = new SoftwareServerListResponse(); - AuditLog auditLog = null; + SoftwareServersResponse response = new SoftwareServersResponse(); + AuditLog auditLog = null; try { @@ -439,7 +434,7 @@ public SoftwareServerListResponse getServersByDeployedImplType(String if (! filteredServers.isEmpty()) { - response.setElementList(filteredServers); + response.setElements(filteredServers); } } } diff --git a/open-metadata-implementation/view-services/runtime-manager/runtime-manager-spring/src/main/java/org/odpi/openmetadata/viewservices/runtimemanager/server/spring/RuntimeManagerResource.java b/open-metadata-implementation/view-services/runtime-manager/runtime-manager-spring/src/main/java/org/odpi/openmetadata/viewservices/runtimemanager/server/spring/RuntimeManagerResource.java index 12dcd32d580..50e9a2b9f6d 100644 --- a/open-metadata-implementation/view-services/runtime-manager/runtime-manager-spring/src/main/java/org/odpi/openmetadata/viewservices/runtimemanager/server/spring/RuntimeManagerResource.java +++ b/open-metadata-implementation/view-services/runtime-manager/runtime-manager-spring/src/main/java/org/odpi/openmetadata/viewservices/runtimemanager/server/spring/RuntimeManagerResource.java @@ -5,12 +5,7 @@ import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.SoftwareServerListResponse; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.SoftwareServerPlatformListResponse; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.SoftwareServerPlatformResponse; -import org.odpi.openmetadata.accessservices.itinfrastructure.rest.SoftwareServerResponse; -import org.odpi.openmetadata.commonservices.ffdc.rest.FilterRequestBody; -import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; +import org.odpi.openmetadata.commonservices.ffdc.rest.*; import org.odpi.openmetadata.repositoryservices.connectors.stores.archivestore.properties.OpenMetadataArchive; import org.odpi.openmetadata.serveroperations.rest.SuccessMessageResponse; import org.odpi.openmetadata.viewservices.runtimemanager.rest.EffectiveTimeQueryRequestBody; @@ -61,10 +56,10 @@ public RuntimeManagerResource() externalDocs = @ExternalDocumentation(description = "Software Server Platforms", url = "https://egeria-project.org/types/0/0037-Software-Server-Platforms/")) - public SoftwareServerPlatformListResponse getPlatformsByName(@PathVariable String serverName, - @RequestParam int startFrom, - @RequestParam int pageSize, - @RequestBody (required = false) + public SoftwareServerPlatformsResponse getPlatformsByName(@PathVariable String serverName, + @RequestParam int startFrom, + @RequestParam int pageSize, + @RequestBody (required = false) FilterRequestBody requestBody) { return restAPI.getPlatformsByName(serverName, startFrom, pageSize, requestBody); @@ -91,11 +86,11 @@ public SoftwareServerPlatformListResponse getPlatformsByName(@PathVariable Strin externalDocs = @ExternalDocumentation(description = "Software Server Platforms", url = "https://egeria-project.org/types/0/0037-Software-Server-Platforms/")) - public SoftwareServerPlatformListResponse getPlatformsByDeployedImplType(@PathVariable String serverName, - @RequestParam int startFrom, - @RequestParam int pageSize, - @RequestParam (required = false, defaultValue = "false") boolean getTemplates, - @RequestBody (required = false) + public SoftwareServerPlatformsResponse getPlatformsByDeployedImplType(@PathVariable String serverName, + @RequestParam int startFrom, + @RequestParam int pageSize, + @RequestParam (required = false, defaultValue = "false") boolean getTemplates, + @RequestBody (required = false) FilterRequestBody requestBody) { return restAPI.getPlatformsByDeployedImplType(serverName, startFrom, pageSize, getTemplates, requestBody); @@ -172,10 +167,10 @@ public PlatformReportResponse getPlatformReport(@PathVariable String serverName, externalDocs = @ExternalDocumentation(description = "Software Servers", url = "https://egeria-project.org/types/0/0040-Software-Servers/")) - public SoftwareServerListResponse getServersByName(@PathVariable String serverName, - @RequestParam int startFrom, - @RequestParam int pageSize, - @RequestBody(required = false) + public SoftwareServersResponse getServersByName(@PathVariable String serverName, + @RequestParam int startFrom, + @RequestParam int pageSize, + @RequestBody(required = false) FilterRequestBody requestBody) { return restAPI.getServersByName(serverName, startFrom, pageSize, requestBody); @@ -202,11 +197,11 @@ public SoftwareServerListResponse getServersByName(@PathVariable String serverNa externalDocs = @ExternalDocumentation(description = "Software Servers", url = "https://egeria-project.org/types/0/0040-Software-Servers/")) - public SoftwareServerListResponse getServersByDeployedImplType(@PathVariable String serverName, - @RequestParam int startFrom, - @RequestParam int pageSize, - @RequestParam (required = false, defaultValue = "false") boolean getTemplates, - @RequestBody FilterRequestBody requestBody) + public SoftwareServersResponse getServersByDeployedImplType(@PathVariable String serverName, + @RequestParam int startFrom, + @RequestParam int pageSize, + @RequestParam (required = false, defaultValue = "false") boolean getTemplates, + @RequestBody FilterRequestBody requestBody) { return restAPI.getServersByDeployedImplType(serverName, startFrom, pageSize, getTemplates, requestBody); } diff --git a/open-metadata-implementation/view-services/template-manager/template-manager-server/src/main/java/org/odpi/openmetadata/viewservices/templatemanager/rest/TemplateClassificationRequestBody.java b/open-metadata-implementation/view-services/template-manager/template-manager-server/src/main/java/org/odpi/openmetadata/viewservices/templatemanager/rest/TemplateClassificationRequestBody.java index d133b5178ea..1e987cc0acc 100644 --- a/open-metadata-implementation/view-services/template-manager/template-manager-server/src/main/java/org/odpi/openmetadata/viewservices/templatemanager/rest/TemplateClassificationRequestBody.java +++ b/open-metadata-implementation/view-services/template-manager/template-manager-server/src/main/java/org/odpi/openmetadata/viewservices/templatemanager/rest/TemplateClassificationRequestBody.java @@ -5,7 +5,7 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.accessservices.digitalarchitecture.properties.TemplateClassificationProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.templates.TemplateClassificationProperties; import java.util.List; import java.util.Map; diff --git a/open-metadata-resources/open-metadata-archives/open-metadata-types/src/main/java/org/odpi/openmetadata/opentypes/OpenMetadataTypesArchive.java b/open-metadata-resources/open-metadata-archives/open-metadata-types/src/main/java/org/odpi/openmetadata/opentypes/OpenMetadataTypesArchive.java index 9b42dedc9bc..b5c32d5c336 100644 --- a/open-metadata-resources/open-metadata-archives/open-metadata-types/src/main/java/org/odpi/openmetadata/opentypes/OpenMetadataTypesArchive.java +++ b/open-metadata-resources/open-metadata-archives/open-metadata-types/src/main/java/org/odpi/openmetadata/opentypes/OpenMetadataTypesArchive.java @@ -156,6 +156,7 @@ public void getOriginalTypes() */ previousTypes.getOriginalTypes(); + update0010Base(); update0201Connections(); update0210DataStores(); update0235InformationView(); @@ -163,6 +164,44 @@ public void getOriginalTypes() } + + + /* + * ------------------------------------------------------------------------------------------------------- + */ + + private void update0010Base() + { + this.archiveBuilder.addTypeDefPatch(updateAsset()); + } + + + private TypeDefPatch updateAsset() + { + /* + * Create the Patch + */ + TypeDefPatch typeDefPatch = archiveBuilder.getPatchForType(OpenMetadataType.ASSET.typeName); + + typeDefPatch.setUpdatedBy(originatorName); + typeDefPatch.setUpdateTime(creationDate); + + /* + * Build the attributes + */ + List properties = new ArrayList<>(); + TypeDefAttribute property; + + property = archiveHelper.getStringTypeDefAttribute(OpenMetadataProperty.RESOURCE_NAME.name, + OpenMetadataProperty.RESOURCE_NAME.description, + OpenMetadataProperty.RESOURCE_NAME.descriptionGUID); + properties.add(property); + + typeDefPatch.setPropertyDefinitions(properties); + + return typeDefPatch; + } + /* * ------------------------------------------------------------------------------------------------------- */ @@ -178,9 +217,7 @@ private TypeDefPatch updateConnectorType() /* * Create the Patch */ - final String typeName = OpenMetadataType.CONNECTOR_TYPE_TYPE_NAME; - - TypeDefPatch typeDefPatch = archiveBuilder.getPatchForType(typeName); + TypeDefPatch typeDefPatch = archiveBuilder.getPatchForType(OpenMetadataType.CONNECTOR_TYPE_TYPE_NAME); typeDefPatch.setUpdatedBy(originatorName); typeDefPatch.setUpdateTime(creationDate); diff --git a/open-metadata-resources/open-metadata-reports/database-report/build.gradle b/open-metadata-resources/open-metadata-reports/database-report/build.gradle index 1f98305fd52..7a001f75f7c 100644 --- a/open-metadata-resources/open-metadata-reports/database-report/build.gradle +++ b/open-metadata-resources/open-metadata-reports/database-report/build.gradle @@ -10,8 +10,9 @@ plugins { dependencies { implementation project(':open-metadata-resources:open-metadata-reports:report-utilities') - implementation project(':open-metadata-implementation:frameworks:open-connector-framework') - implementation project(':open-metadata-implementation:access-services:data-manager:data-manager-api') + implementation project(':open-metadata-implementation:frameworks:open-metadata-framework') + compileOnly project(':open-metadata-implementation:frameworks:open-connector-framework') + compileOnly project(':open-metadata-implementation:access-services:data-manager:data-manager-api') implementation project(':open-metadata-implementation:access-services:data-manager:data-manager-client') implementation project(':open-metadata-implementation:platform-services:platform-services-client') implementation project(':open-metadata-implementation:adapters:authentication-plugins:http-helper') diff --git a/open-metadata-resources/open-metadata-reports/database-report/src/main/java/org/odpi/openmetadata/reports/databasereport/DatabaseReport.java b/open-metadata-resources/open-metadata-reports/database-report/src/main/java/org/odpi/openmetadata/reports/databasereport/DatabaseReport.java index e2f3e006f97..2a50f99501b 100644 --- a/open-metadata-resources/open-metadata-reports/database-report/src/main/java/org/odpi/openmetadata/reports/databasereport/DatabaseReport.java +++ b/open-metadata-resources/open-metadata-reports/database-report/src/main/java/org/odpi/openmetadata/reports/databasereport/DatabaseReport.java @@ -5,15 +5,11 @@ import org.odpi.openmetadata.accessservices.datamanager.client.DatabaseManagerClient; import org.odpi.openmetadata.accessservices.datamanager.client.MetadataSourceClient; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.DatabaseColumnElement; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.DatabaseElement; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.DatabaseSchemaElement; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.DatabaseTableElement; -import org.odpi.openmetadata.accessservices.datamanager.properties.DatabaseColumnProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.DatabaseManagerProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.DatabaseProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.DatabaseSchemaProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.DatabaseTableProperties; + +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities.DatabaseManagerProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.databases.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.databases.*; import org.odpi.openmetadata.reports.EgeriaReport; import org.odpi.openmetadata.http.HttpHelper; import org.odpi.openmetadata.platformservices.client.PlatformServicesClient; @@ -140,7 +136,7 @@ private void locateDatabase() do { startFrom = startFrom + pageSize; -// dw - I changed the search string below to .* rather than * + List databases = databaseManagerClient.findDatabases(clientUserId, ".*", startFrom, pageSize); if (databases != null) @@ -227,7 +223,7 @@ private void displayDatabaseSummary(DatabaseElement databaseElement, System.out.print("| " + databaseElement.getElementHeader().getGUID()); System.out.print(" | " + databaseElement.getDatabaseProperties().getQualifiedName()); System.out.print(" | " + databaseElement.getDatabaseProperties().getName()); - System.out.print(" | " + databaseElement.getDatabaseProperties().getDescription()); + System.out.print(" | " + databaseElement.getDatabaseProperties().getResourceDescription()); System.out.println(" |"); } } @@ -254,7 +250,7 @@ private void displayDatabase(String databaseGUID) databaseElement.getElementHeader().getGUID(), databaseElement.getDatabaseProperties().getQualifiedName(), databaseElement.getDatabaseProperties().getName(), - databaseElement.getDatabaseProperties().getDescription()); + databaseElement.getDatabaseProperties().getResourceDescription()); /* * The database may have its tables organized in schemas or directly listed under the database. @@ -294,7 +290,7 @@ private void displayDatabaseSchemas(EgeriaReport report, databaseSchemaElement.getElementHeader().getGUID(), databaseSchemaElement.getDatabaseSchemaProperties().getQualifiedName(), databaseSchemaElement.getDatabaseSchemaProperties().getName(), - databaseSchemaElement.getDatabaseSchemaProperties().getDescription()); + databaseSchemaElement.getDatabaseSchemaProperties().getResourceDescription()); displayTables(report, indentLevel + 1, databaseSchemaElement.getElementHeader().getGUID()); } @@ -491,7 +487,7 @@ private void createSampleDatabase(String databaseManagerGUID, databaseSchemaProperties.setQualifiedName(databaseName + "." + schemaName); databaseSchemaProperties.setName(schemaName); - databaseSchemaProperties.setDescription("Database schema definition called " + schemaName + " with " + numberOfTables + " tables."); + databaseSchemaProperties.setResourceDescription("Database schema definition called " + schemaName + " with " + numberOfTables + " tables."); String databaseSchemaGUID = databaseManagerClient.createDatabaseSchema(clientUserId, databaseManagerGUID, diff --git a/open-metadata-resources/open-metadata-reports/report-utilities/build.gradle b/open-metadata-resources/open-metadata-reports/report-utilities/build.gradle index 61a743d9e98..8423c61b465 100644 --- a/open-metadata-resources/open-metadata-reports/report-utilities/build.gradle +++ b/open-metadata-resources/open-metadata-reports/report-utilities/build.gradle @@ -4,6 +4,7 @@ */ dependencies { + implementation project(':open-metadata-implementation:frameworks:open-metadata-framework') implementation project(':open-metadata-implementation:frameworks:open-connector-framework') implementation project(':open-metadata-implementation:common-services:ffdc-services') compileOnly "com.fasterxml.jackson.core:jackson-annotations" diff --git a/open-metadata-resources/open-metadata-reports/survey-report/build.gradle b/open-metadata-resources/open-metadata-reports/survey-report/build.gradle index 671c2c06752..670d316e8ba 100644 --- a/open-metadata-resources/open-metadata-reports/survey-report/build.gradle +++ b/open-metadata-resources/open-metadata-reports/survey-report/build.gradle @@ -19,7 +19,7 @@ dependencies { compileOnly project(':open-metadata-implementation:framework-services:gaf-metadata-management:gaf-metadata-client') compileOnly project(':open-metadata-implementation:framework-services:ocf-metadata-management:ocf-metadata-api') compileOnly project(':open-metadata-implementation:framework-services:ocf-metadata-management:ocf-metadata-client') - implementation project(':open-metadata-implementation:access-services:asset-owner:asset-owner-api') + compileOnly project(':open-metadata-implementation:access-services:asset-owner:asset-owner-api') implementation project(':open-metadata-implementation:access-services:asset-owner:asset-owner-client') implementation project(':open-metadata-implementation:adapters:authentication-plugins:http-helper') runtimeOnly project(':open-metadata-implementation:user-security:token-manager') diff --git a/open-metadata-resources/open-metadata-reports/survey-report/src/main/java/org/odpi/openmetadata/reports/surveyreport/SurveyReport.java b/open-metadata-resources/open-metadata-reports/survey-report/src/main/java/org/odpi/openmetadata/reports/surveyreport/SurveyReport.java index 95c703bb2d4..9d6c37fbf5c 100644 --- a/open-metadata-resources/open-metadata-reports/survey-report/src/main/java/org/odpi/openmetadata/reports/surveyreport/SurveyReport.java +++ b/open-metadata-resources/open-metadata-reports/survey-report/src/main/java/org/odpi/openmetadata/reports/surveyreport/SurveyReport.java @@ -5,7 +5,7 @@ import org.odpi.openmetadata.accessservices.assetowner.client.AssetOwner; import org.odpi.openmetadata.accessservices.assetowner.client.OpenMetadataStoreClient; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.AssetElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.AssetElement; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; @@ -526,14 +526,14 @@ private void run() outputReport.printReportLine(detailIndentLevel, "Unique identifier", assetGUID); outputReport.printReportLine(detailIndentLevel, "Type", asset.getElementHeader().getType().getTypeName()); - if ((asset.getAssetProperties().getExtendedProperties() != null) && (asset.getAssetProperties().getExtendedProperties().get(OpenMetadataProperty.DEPLOYED_IMPLEMENTATION_TYPE.name) != null)) + if ((asset.getProperties().getExtendedProperties() != null) && (asset.getProperties().getExtendedProperties().get(OpenMetadataProperty.DEPLOYED_IMPLEMENTATION_TYPE.name) != null)) { outputReport.printReportLine(detailIndentLevel, "Deployed Implementation Type", - asset.getAssetProperties().getExtendedProperties().get(OpenMetadataProperty.DEPLOYED_IMPLEMENTATION_TYPE.name).toString()); + asset.getProperties().getExtendedProperties().get(OpenMetadataProperty.DEPLOYED_IMPLEMENTATION_TYPE.name).toString()); } - outputReport.printReportLine(detailIndentLevel, "Qualified Name", asset.getAssetProperties().getQualifiedName()); - outputReport.printReportLine(detailIndentLevel, "Display Name", asset.getAssetProperties().getName()); - outputReport.printReportLine(detailIndentLevel, "Description", asset.getAssetProperties().getDescription()); + outputReport.printReportLine(detailIndentLevel, "Qualified Name", asset.getProperties().getQualifiedName()); + outputReport.printReportLine(detailIndentLevel, "Display Name", asset.getProperties().getName()); + outputReport.printReportLine(detailIndentLevel, "Description", asset.getProperties().getResourceDescription()); outputReport.printReportSubheading(detailIndentLevel, "Survey report summaries"); diff --git a/open-metadata-resources/open-metadata-reports/valid-values-report/build.gradle b/open-metadata-resources/open-metadata-reports/valid-values-report/build.gradle index c4f6a729aa9..79f16891815 100644 --- a/open-metadata-resources/open-metadata-reports/valid-values-report/build.gradle +++ b/open-metadata-resources/open-metadata-reports/valid-values-report/build.gradle @@ -17,7 +17,7 @@ dependencies { compileOnly project(':open-metadata-implementation:common-services:ffdc-services') compileOnly project(':open-metadata-implementation:framework-services:gaf-metadata-management:gaf-metadata-api') compileOnly project(':open-metadata-implementation:framework-services:gaf-metadata-management:gaf-metadata-client') - implementation project(':open-metadata-implementation:access-services:digital-architecture:digital-architecture-api') + compileOnly project(':open-metadata-implementation:access-services:digital-architecture:digital-architecture-api') implementation project(':open-metadata-implementation:access-services:digital-architecture:digital-architecture-client') implementation project(':open-metadata-implementation:adapters:authentication-plugins:http-helper') runtimeOnly project(':open-metadata-implementation:user-security:token-manager') diff --git a/open-metadata-resources/open-metadata-reports/valid-values-report/src/main/java/org/odpi/openmetadata/reports/validvalues/ValidValuesReport.java b/open-metadata-resources/open-metadata-reports/valid-values-report/src/main/java/org/odpi/openmetadata/reports/validvalues/ValidValuesReport.java index a7e2432f910..5fe7cf6d1bd 100644 --- a/open-metadata-resources/open-metadata-reports/valid-values-report/src/main/java/org/odpi/openmetadata/reports/validvalues/ValidValuesReport.java +++ b/open-metadata-resources/open-metadata-reports/valid-values-report/src/main/java/org/odpi/openmetadata/reports/validvalues/ValidValuesReport.java @@ -5,10 +5,10 @@ import org.odpi.openmetadata.accessservices.digitalarchitecture.client.OpenMetadataStoreClient; import org.odpi.openmetadata.accessservices.digitalarchitecture.client.ReferenceDataManager; -import org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements.ValidValueElement; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ValidValueElement; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.frameworks.openmetadata.mapper.OpenMetadataValidValues; diff --git a/open-metadata-resources/open-metadata-samples/access-services-samples/asset-management-samples/asset-deploy-sample/build.gradle b/open-metadata-resources/open-metadata-samples/access-services-samples/asset-management-samples/asset-deploy-sample/build.gradle index fbbe481af9f..af1c1f8c50b 100644 --- a/open-metadata-resources/open-metadata-samples/access-services-samples/asset-management-samples/asset-deploy-sample/build.gradle +++ b/open-metadata-resources/open-metadata-samples/access-services-samples/asset-management-samples/asset-deploy-sample/build.gradle @@ -9,9 +9,10 @@ plugins { } dependencies { - implementation project(':open-metadata-implementation:frameworks:open-connector-framework') + implementation project(':open-metadata-implementation:frameworks:open-metadata-framework') + compileOnly project(':open-metadata-implementation:frameworks:open-connector-framework') implementation project(':open-metadata-implementation:access-services:it-infrastructure:it-infrastructure-client') - implementation project(':open-metadata-implementation:access-services:it-infrastructure:it-infrastructure-api') + compileOnly project(':open-metadata-implementation:access-services:it-infrastructure:it-infrastructure-api') implementation project(':open-metadata-implementation:platform-services:platform-services-client') implementation project(':open-metadata-implementation:admin-services:admin-services-api') implementation project(':open-metadata-implementation:adapters:authentication-plugins:http-helper') diff --git a/open-metadata-resources/open-metadata-samples/access-services-samples/asset-management-samples/asset-deploy-sample/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/samples/assetdeploy/AssetDeploy.java b/open-metadata-resources/open-metadata-samples/access-services-samples/asset-management-samples/asset-deploy-sample/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/samples/assetdeploy/AssetDeploy.java index 98dd0295712..46edb7e9485 100644 --- a/open-metadata-resources/open-metadata-samples/access-services-samples/asset-management-samples/asset-deploy-sample/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/samples/assetdeploy/AssetDeploy.java +++ b/open-metadata-resources/open-metadata-samples/access-services-samples/asset-management-samples/asset-deploy-sample/src/main/java/org/odpi/openmetadata/accessservices/itinfrastructure/samples/assetdeploy/AssetDeploy.java @@ -6,11 +6,12 @@ import org.odpi.openmetadata.accessservices.itinfrastructure.client.EndpointManagerClient; import org.odpi.openmetadata.accessservices.itinfrastructure.client.PlatformManagerClient; import org.odpi.openmetadata.accessservices.itinfrastructure.client.ServerManagerClient; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.EndpointElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.metadataelements.SoftwareServerPlatformElement; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.EndpointProperties; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.SoftwareServerPlatformProperties; -import org.odpi.openmetadata.accessservices.itinfrastructure.properties.SoftwareServerProperties; + +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.EndpointElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.SoftwareServerPlatformElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.EndpointProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.infrastructure.SoftwareServerPlatformProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.infrastructure.SoftwareServerProperties; import org.odpi.openmetadata.adminservices.configuration.registration.ServerTypeClassification; import org.odpi.openmetadata.http.HttpHelper; import org.odpi.openmetadata.platformservices.client.PlatformServicesClient; diff --git a/open-metadata-resources/open-metadata-samples/access-services-samples/asset-management-samples/asset-look-up-sample/build.gradle b/open-metadata-resources/open-metadata-samples/access-services-samples/asset-management-samples/asset-look-up-sample/build.gradle index 1150f0b4b05..c86cf80718c 100644 --- a/open-metadata-resources/open-metadata-samples/access-services-samples/asset-management-samples/asset-look-up-sample/build.gradle +++ b/open-metadata-resources/open-metadata-samples/access-services-samples/asset-management-samples/asset-look-up-sample/build.gradle @@ -10,7 +10,7 @@ plugins { dependencies { implementation project(':open-metadata-implementation:access-services:asset-consumer:asset-consumer-client') - implementation project(':open-metadata-implementation:access-services:asset-consumer:asset-consumer-api') + compileOnly project(':open-metadata-implementation:access-services:asset-consumer:asset-consumer-api') compileOnly project(':open-metadata-implementation:framework-services:ocf-metadata-management:ocf-metadata-api') compileOnly project(':open-metadata-implementation:framework-services:ocf-metadata-management:ocf-metadata-client') implementation project(':open-metadata-implementation:platform-services:platform-services-client') diff --git a/open-metadata-resources/open-metadata-samples/access-services-samples/asset-management-samples/asset-look-up-sample/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/samples/assetlookup/AssetLookUp.java b/open-metadata-resources/open-metadata-samples/access-services-samples/asset-management-samples/asset-look-up-sample/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/samples/assetlookup/AssetLookUp.java index dad7543f968..d0b0156ebbd 100644 --- a/open-metadata-resources/open-metadata-samples/access-services-samples/asset-management-samples/asset-look-up-sample/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/samples/assetlookup/AssetLookUp.java +++ b/open-metadata-resources/open-metadata-samples/access-services-samples/asset-management-samples/asset-look-up-sample/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/samples/assetlookup/AssetLookUp.java @@ -3,12 +3,12 @@ package org.odpi.openmetadata.accessservices.assetconsumer.samples.assetlookup; import org.odpi.openmetadata.accessservices.assetconsumer.client.AssetConsumer; -import org.odpi.openmetadata.accessservices.assetconsumer.elements.MeaningElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.MeaningElement; import org.odpi.openmetadata.frameworks.connectors.properties.*; import org.odpi.openmetadata.frameworks.connectors.properties.beans.Certification; import org.odpi.openmetadata.frameworks.connectors.properties.beans.Comment; import org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementClassification; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementClassification; import org.odpi.openmetadata.frameworks.connectors.properties.beans.ExternalIdentifier; import org.odpi.openmetadata.frameworks.connectors.properties.beans.ExternalReference; import org.odpi.openmetadata.frameworks.connectors.properties.beans.InformalTag; diff --git a/open-metadata-resources/open-metadata-samples/access-services-samples/asset-management-samples/asset-reader-avro-sample/build.gradle b/open-metadata-resources/open-metadata-samples/access-services-samples/asset-management-samples/asset-reader-avro-sample/build.gradle index 2a65cc4f701..01b9dc565cd 100644 --- a/open-metadata-resources/open-metadata-samples/access-services-samples/asset-management-samples/asset-reader-avro-sample/build.gradle +++ b/open-metadata-resources/open-metadata-samples/access-services-samples/asset-management-samples/asset-reader-avro-sample/build.gradle @@ -9,6 +9,7 @@ plugins { } dependencies { + compileOnly project(':open-metadata-implementation:frameworks:open-metadata-framework') compileOnly project(':open-metadata-implementation:frameworks:open-connector-framework') implementation project(':open-metadata-implementation:adapters:open-connectors:data-store-connectors:file-connectors:basic-file-connector') implementation project(':open-metadata-implementation:access-services:asset-consumer:asset-consumer-client') diff --git a/open-metadata-resources/open-metadata-samples/access-services-samples/asset-management-samples/asset-reader-csv-sample/build.gradle b/open-metadata-resources/open-metadata-samples/access-services-samples/asset-management-samples/asset-reader-csv-sample/build.gradle index 4672bfc0904..de4e6dea262 100644 --- a/open-metadata-resources/open-metadata-samples/access-services-samples/asset-management-samples/asset-reader-csv-sample/build.gradle +++ b/open-metadata-resources/open-metadata-samples/access-services-samples/asset-management-samples/asset-reader-csv-sample/build.gradle @@ -9,6 +9,7 @@ plugins { } dependencies { + implementation project(':open-metadata-implementation:frameworks:open-metadata-framework') implementation project(':open-metadata-implementation:frameworks:open-connector-framework') implementation project(':open-metadata-implementation:adapters:open-connectors:data-store-connectors:file-connectors:csv-file-connector') implementation project(':open-metadata-implementation:access-services:asset-consumer:asset-consumer-client') diff --git a/open-metadata-resources/open-metadata-samples/access-services-samples/asset-management-samples/asset-set-up-sample/build.gradle b/open-metadata-resources/open-metadata-samples/access-services-samples/asset-management-samples/asset-set-up-sample/build.gradle index 8c3caa9e670..ca0df3b0dde 100644 --- a/open-metadata-resources/open-metadata-samples/access-services-samples/asset-management-samples/asset-set-up-sample/build.gradle +++ b/open-metadata-resources/open-metadata-samples/access-services-samples/asset-management-samples/asset-set-up-sample/build.gradle @@ -9,17 +9,18 @@ plugins { } dependencies { + implementation project(':open-metadata-implementation:frameworks:open-metadata-framework') implementation project(':open-metadata-implementation:frameworks:open-connector-framework') compileOnly project(':open-metadata-implementation:access-services:asset-consumer:asset-consumer-api') implementation project(':open-metadata-implementation:access-services:asset-consumer:asset-consumer-client') implementation project(':open-metadata-implementation:access-services:asset-manager:asset-manager-client') implementation project(':open-metadata-implementation:access-services:asset-owner:asset-owner-client') compileOnly project(':open-metadata-implementation:access-services:asset-owner:asset-owner-api') - implementation project(':open-metadata-implementation:access-services:community-profile:community-profile-api') + compileOnly project(':open-metadata-implementation:access-services:community-profile:community-profile-api') implementation project(':open-metadata-implementation:access-services:community-profile:community-profile-client') implementation project(':open-metadata-implementation:access-services:data-manager:data-manager-client') implementation project(':open-metadata-implementation:access-services:digital-architecture:digital-architecture-client') - implementation project(':open-metadata-implementation:access-services:governance-program:governance-program-api') + compileOnly project(':open-metadata-implementation:access-services:governance-program:governance-program-api') implementation project(':open-metadata-implementation:access-services:governance-program:governance-program-client') implementation project(':open-metadata-implementation:access-services:it-infrastructure:it-infrastructure-client') compileOnly project(':open-metadata-implementation:framework-services:ocf-metadata-management:ocf-metadata-api') diff --git a/open-metadata-resources/open-metadata-samples/access-services-samples/asset-management-samples/asset-set-up-sample/src/main/java/org/odpi/openmetadata/accessservices/samples/assetsetup/AssetSetUp.java b/open-metadata-resources/open-metadata-samples/access-services-samples/asset-management-samples/asset-set-up-sample/src/main/java/org/odpi/openmetadata/accessservices/samples/assetsetup/AssetSetUp.java index ac0567dc0ac..2b31358aa10 100644 --- a/open-metadata-resources/open-metadata-samples/access-services-samples/asset-management-samples/asset-set-up-sample/src/main/java/org/odpi/openmetadata/accessservices/samples/assetsetup/AssetSetUp.java +++ b/open-metadata-resources/open-metadata-samples/access-services-samples/asset-management-samples/asset-set-up-sample/src/main/java/org/odpi/openmetadata/accessservices/samples/assetsetup/AssetSetUp.java @@ -10,16 +10,16 @@ import org.odpi.openmetadata.accessservices.datamanager.client.ExternalReferenceManagerClient; import org.odpi.openmetadata.accessservices.digitalarchitecture.client.ConnectionManager; import org.odpi.openmetadata.accessservices.digitalarchitecture.client.LocationManager; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ActorProfileProperties; import org.odpi.openmetadata.accessservices.digitalarchitecture.client.ReferenceDataManager; import org.odpi.openmetadata.accessservices.governanceprogram.client.GovernanceZoneManager; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceZoneProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.GovernanceZoneProperties; import org.odpi.openmetadata.accessservices.itinfrastructure.client.CapabilityManagerClient; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; import org.odpi.openmetadata.frameworks.connectors.properties.AssetUniverse; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.ActorProfileProperties; import org.odpi.openmetadata.http.HttpHelper; import org.odpi.openmetadata.platformservices.client.PlatformServicesClient; diff --git a/open-metadata-resources/open-metadata-samples/access-services-samples/glossary-workflow-samples/build.gradle b/open-metadata-resources/open-metadata-samples/access-services-samples/glossary-workflow-samples/build.gradle index 141b78b83df..01046e8f4eb 100644 --- a/open-metadata-resources/open-metadata-samples/access-services-samples/glossary-workflow-samples/build.gradle +++ b/open-metadata-resources/open-metadata-samples/access-services-samples/glossary-workflow-samples/build.gradle @@ -11,7 +11,8 @@ plugins { dependencies { implementation project(':open-metadata-implementation:access-services:asset-manager:asset-manager-client') compileOnly project(':open-metadata-implementation:access-services:asset-manager:asset-manager-api') - implementation project(':open-metadata-implementation:frameworks:open-connector-framework') + implementation project(':open-metadata-implementation:frameworks:open-metadata-framework') + compileOnly project(':open-metadata-implementation:frameworks:open-connector-framework') runtimeOnly 'ch.qos.logback:logback-classic' implementation project(':open-metadata-implementation:adapters:authentication-plugins:http-helper') compileOnly 'com.fasterxml.jackson.core:jackson-annotations' diff --git a/open-metadata-resources/open-metadata-samples/access-services-samples/glossary-workflow-samples/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/samples/glossaryworkflow/TemporaryEditingGlossary.java b/open-metadata-resources/open-metadata-samples/access-services-samples/glossary-workflow-samples/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/samples/glossaryworkflow/TemporaryEditingGlossary.java index dbf04167901..6d45c6d8269 100644 --- a/open-metadata-resources/open-metadata-samples/access-services-samples/glossary-workflow-samples/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/samples/glossaryworkflow/TemporaryEditingGlossary.java +++ b/open-metadata-resources/open-metadata-samples/access-services-samples/glossary-workflow-samples/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/samples/glossaryworkflow/TemporaryEditingGlossary.java @@ -5,11 +5,11 @@ import org.odpi.openmetadata.accessservices.assetmanager.client.management.GlossaryManagementClient; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.GlossaryElement; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.GlossaryTermElement; -import org.odpi.openmetadata.accessservices.assetmanager.properties.GlossaryProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.GlossaryTermProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.GlossaryTermStatus; import org.odpi.openmetadata.accessservices.assetmanager.properties.TemplateProperties; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementClassification; +import org.odpi.openmetadata.frameworks.openmetadata.enums.GlossaryTermStatus; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementClassification; +import org.odpi.openmetadata.frameworks.openmetadata.properties.glossaries.GlossaryProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.glossaries.GlossaryTermProperties; /** diff --git a/open-metadata-resources/open-metadata-samples/access-services-samples/governance-program-client-samples/governance-leadership-sample/build.gradle b/open-metadata-resources/open-metadata-samples/access-services-samples/governance-program-client-samples/governance-leadership-sample/build.gradle index e7735799b9c..6673a970eee 100644 --- a/open-metadata-resources/open-metadata-samples/access-services-samples/governance-program-client-samples/governance-leadership-sample/build.gradle +++ b/open-metadata-resources/open-metadata-samples/access-services-samples/governance-program-client-samples/governance-leadership-sample/build.gradle @@ -9,9 +9,9 @@ plugins { } dependencies { - implementation project(':open-metadata-implementation:access-services:governance-program:governance-program-api') + compileOnly project(':open-metadata-implementation:access-services:governance-program:governance-program-api') implementation project(':open-metadata-implementation:access-services:governance-program:governance-program-client') - implementation project(':open-metadata-implementation:access-services:community-profile:community-profile-api') + compileOnly project(':open-metadata-implementation:access-services:community-profile:community-profile-api') implementation project(':open-metadata-implementation:access-services:community-profile:community-profile-client') implementation project(':open-metadata-implementation:frameworks:open-metadata-framework') implementation project(':open-metadata-implementation:frameworks:open-connector-framework') diff --git a/open-metadata-resources/open-metadata-samples/access-services-samples/governance-program-client-samples/governance-leadership-sample/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/samples/leadership/GovernanceLeadershipSample.java b/open-metadata-resources/open-metadata-samples/access-services-samples/governance-program-client-samples/governance-leadership-sample/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/samples/leadership/GovernanceLeadershipSample.java index 7ed48b90c50..01d5b37a741 100644 --- a/open-metadata-resources/open-metadata-samples/access-services-samples/governance-program-client-samples/governance-leadership-sample/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/samples/leadership/GovernanceLeadershipSample.java +++ b/open-metadata-resources/open-metadata-samples/access-services-samples/governance-program-client-samples/governance-leadership-sample/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/samples/leadership/GovernanceLeadershipSample.java @@ -4,21 +4,21 @@ import org.odpi.openmetadata.accessservices.communityprofile.client.OrganizationManagement; import org.odpi.openmetadata.accessservices.communityprofile.client.UserIdentityManagement; -import org.odpi.openmetadata.accessservices.communityprofile.properties.UserIdentityProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ActorProfileProperties; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.ActorProfileElement; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.ProfileIdentityElement; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.UserIdentityElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ActorProfileElement; import org.odpi.openmetadata.accessservices.governanceprogram.client.GovernanceRoleManager; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceAppointee; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceRoleAppointee; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceRoleElement; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceRoleHistory; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.GovernanceAppointee; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.GovernanceRoleAppointee; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.GovernanceRoleElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.GovernanceRoleHistory; import org.odpi.openmetadata.frameworks.openmetadata.enums.GovernanceDomain; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceRoleProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.GovernanceRoleProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ProfileIdentityElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.UserIdentityElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.ActorProfileProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.UserIdentityProperties; import org.odpi.openmetadata.http.HttpHelper; @@ -132,7 +132,7 @@ else if (userIdentities.size() == 0) } else if (userIdentities.size() == 1) { - ProfileIdentityElement firstUser = userIdentities.get(0); + ProfileIdentityElement firstUser = userIdentities.get(0); UserIdentityElement userIdentity = firstUser.getUserIdentity(); if (userIdentity == null) { diff --git a/open-metadata-resources/open-metadata-samples/access-services-samples/governance-program-client-samples/governance-subject-area-sample/build.gradle b/open-metadata-resources/open-metadata-samples/access-services-samples/governance-program-client-samples/governance-subject-area-sample/build.gradle index 8a0d334d980..21c53b02ac8 100644 --- a/open-metadata-resources/open-metadata-samples/access-services-samples/governance-program-client-samples/governance-subject-area-sample/build.gradle +++ b/open-metadata-resources/open-metadata-samples/access-services-samples/governance-program-client-samples/governance-subject-area-sample/build.gradle @@ -9,8 +9,9 @@ plugins { } dependencies { - implementation project(':open-metadata-implementation:access-services:governance-program:governance-program-api') + compileOnly project(':open-metadata-implementation:access-services:governance-program:governance-program-api') implementation project(':open-metadata-implementation:access-services:governance-program:governance-program-client') + implementation project(':open-metadata-implementation:frameworks:open-metadata-framework') implementation project(':open-metadata-implementation:frameworks:open-connector-framework') runtimeOnly 'ch.qos.logback:logback-classic' implementation project(':open-metadata-implementation:adapters:authentication-plugins:http-helper') diff --git a/open-metadata-resources/open-metadata-samples/access-services-samples/governance-program-client-samples/governance-subject-area-sample/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/samples/subjectareas/CreateSubjectAreasSample.java b/open-metadata-resources/open-metadata-samples/access-services-samples/governance-program-client-samples/governance-subject-area-sample/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/samples/subjectareas/CreateSubjectAreasSample.java index 33093bca1f3..537b68b43c0 100644 --- a/open-metadata-resources/open-metadata-samples/access-services-samples/governance-program-client-samples/governance-subject-area-sample/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/samples/subjectareas/CreateSubjectAreasSample.java +++ b/open-metadata-resources/open-metadata-samples/access-services-samples/governance-program-client-samples/governance-subject-area-sample/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/samples/subjectareas/CreateSubjectAreasSample.java @@ -6,21 +6,15 @@ import org.odpi.openmetadata.accessservices.governanceprogram.client.GovernanceMetricsManager; import org.odpi.openmetadata.accessservices.governanceprogram.client.GovernanceProgramReviewManager; import org.odpi.openmetadata.accessservices.governanceprogram.client.SubjectAreaManager; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceDefinitionGraph; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceMetricElement; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.RelatedElement; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.SubjectAreaDefinition; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.SubjectAreaElement; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceDefinitionProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceDefinitionStatus; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceMetricProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.SubjectAreaClassificationProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.SubjectAreaProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementClassification; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.enums.GovernanceDefinitionStatus; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.GovernanceDefinitionProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.GovernanceMetricProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.SubjectAreaClassificationProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.SubjectAreaProperties; import org.odpi.openmetadata.http.HttpHelper; import java.util.ArrayList; diff --git a/open-metadata-resources/open-metadata-samples/access-services-samples/governance-program-client-samples/governance-zone-create-sample/build.gradle b/open-metadata-resources/open-metadata-samples/access-services-samples/governance-program-client-samples/governance-zone-create-sample/build.gradle index a50f0a1836e..1f78b0c9772 100644 --- a/open-metadata-resources/open-metadata-samples/access-services-samples/governance-program-client-samples/governance-zone-create-sample/build.gradle +++ b/open-metadata-resources/open-metadata-samples/access-services-samples/governance-program-client-samples/governance-zone-create-sample/build.gradle @@ -9,9 +9,10 @@ plugins { } dependencies { + implementation project(':open-metadata-implementation:frameworks:open-metadata-framework') implementation project(':open-metadata-implementation:frameworks:open-connector-framework') implementation project(':open-metadata-implementation:access-services:governance-program:governance-program-client') - implementation project(':open-metadata-implementation:access-services:governance-program:governance-program-api') + compileOnly project(':open-metadata-implementation:access-services:governance-program:governance-program-api') runtimeOnly 'ch.qos.logback:logback-classic' implementation project(':open-metadata-implementation:adapters:authentication-plugins:http-helper') compileOnly 'com.fasterxml.jackson.core:jackson-annotations' diff --git a/open-metadata-resources/open-metadata-samples/access-services-samples/governance-program-client-samples/governance-zone-create-sample/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/samples/zonecreate/CreateGovernanceZoneSample.java b/open-metadata-resources/open-metadata-samples/access-services-samples/governance-program-client-samples/governance-zone-create-sample/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/samples/zonecreate/CreateGovernanceZoneSample.java index 8b01c5d0517..0713d396224 100644 --- a/open-metadata-resources/open-metadata-samples/access-services-samples/governance-program-client-samples/governance-zone-create-sample/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/samples/zonecreate/CreateGovernanceZoneSample.java +++ b/open-metadata-resources/open-metadata-samples/access-services-samples/governance-program-client-samples/governance-zone-create-sample/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/samples/zonecreate/CreateGovernanceZoneSample.java @@ -3,11 +3,12 @@ package org.odpi.openmetadata.accessservices.governanceprogram.samples.zonecreate; import org.odpi.openmetadata.accessservices.governanceprogram.client.GovernanceZoneManager; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceZoneElement; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceZoneProperties; + import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.GovernanceZoneElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.GovernanceZoneProperties; import org.odpi.openmetadata.http.HttpHelper; import java.util.List; diff --git a/open-metadata-resources/open-metadata-samples/admin-services-samples/config-metadata-server-sample/build.gradle b/open-metadata-resources/open-metadata-samples/admin-services-samples/config-metadata-server-sample/build.gradle index 9b76a6b92f3..37e8d67e0a4 100644 --- a/open-metadata-resources/open-metadata-samples/admin-services-samples/config-metadata-server-sample/build.gradle +++ b/open-metadata-resources/open-metadata-samples/admin-services-samples/config-metadata-server-sample/build.gradle @@ -12,6 +12,7 @@ dependencies { implementation project(':open-metadata-implementation:admin-services:admin-services-api') compileOnly project(':open-metadata-implementation:common-services:ffdc-services') implementation project(':open-metadata-implementation:admin-services:admin-services-client') + compileOnly project(':open-metadata-implementation:frameworks:open-metadata-framework') implementation project(':open-metadata-implementation:frameworks:open-connector-framework') runtimeOnly 'ch.qos.logback:logback-classic' compileOnly 'com.fasterxml.jackson.core:jackson-annotations' diff --git a/open-metadata-resources/open-metadata-samples/open-metadata-security-samples/build.gradle b/open-metadata-resources/open-metadata-samples/open-metadata-security-samples/build.gradle index 545da07627f..c31aa42c8a0 100644 --- a/open-metadata-resources/open-metadata-samples/open-metadata-security-samples/build.gradle +++ b/open-metadata-resources/open-metadata-samples/open-metadata-security-samples/build.gradle @@ -8,11 +8,12 @@ dependencies { implementation 'io.jsonwebtoken:jjwt-api' implementation 'org.slf4j:slf4j-api' implementation project(':open-metadata-implementation:common-services:metadata-security:metadata-security-connectors') - implementation project(':open-metadata-implementation:repository-services:repository-services-apis') - implementation project(':open-metadata-implementation:frameworks:open-connector-framework') - implementation project(':open-metadata-implementation:frameworks:audit-log-framework') - implementation project(':open-metadata-implementation:common-services:metadata-security:metadata-security-apis') - implementation project(':open-metadata-implementation:user-security:token-manager') + compileOnly project(':open-metadata-implementation:repository-services:repository-services-apis') + compileOnly project(':open-metadata-implementation:frameworks:open-connector-framework') + compileOnly project(':open-metadata-implementation:frameworks:open-metadata-framework') + compileOnly project(':open-metadata-implementation:frameworks:audit-log-framework') + compileOnly project(':open-metadata-implementation:common-services:metadata-security:metadata-security-apis') + compileOnly project(':open-metadata-implementation:user-security:token-manager') compileOnly 'com.fasterxml.jackson.core:jackson-annotations' runtimeOnly 'io.jsonwebtoken:jjwt-impl' runtimeOnly 'io.jsonwebtoken:jjwt-jackson' diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/asset-consumer-fvt/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/fvt/AssetOwnerFactory.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/asset-consumer-fvt/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/fvt/AssetOwnerFactory.java index 4c1e5893a34..43c947c8d9b 100644 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/asset-consumer-fvt/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/fvt/AssetOwnerFactory.java +++ b/open-metadata-test/open-metadata-fvt/access-services-fvt/asset-consumer-fvt/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/fvt/AssetOwnerFactory.java @@ -5,8 +5,8 @@ import org.odpi.openmetadata.accessservices.assetowner.client.AssetOwner; import org.odpi.openmetadata.accessservices.assetowner.client.rest.AssetOwnerRESTClient; -import org.odpi.openmetadata.accessservices.assetowner.properties.AssetProperties; -import org.odpi.openmetadata.accessservices.assetowner.properties.SchemaTypeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.AssetProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.SchemaTypeProperties; import org.odpi.openmetadata.accessservices.assetowner.properties.TemplateProperties; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.fvt.utilities.exceptions.FVTUnexpectedCondition; @@ -110,7 +110,7 @@ public String getAsset(String userId) throws FVTUnexpectedCondition properties.setTypeName("Asset"); properties.setQualifiedName(testCaseName + ":" + assetName); properties.setDisplayName(assetDisplayName); - properties.setDescription(assetDescription); + properties.setResourceDescription(assetDescription); properties.setAdditionalProperties(additionalProperties); String assetGUID = client.addAssetToCatalog(userId, properties); diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/asset-consumer-fvt/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/fvt/InformalTagLifecycleTest.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/asset-consumer-fvt/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/fvt/InformalTagLifecycleTest.java index a9c7e88e0d8..781cc290393 100644 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/asset-consumer-fvt/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/fvt/InformalTagLifecycleTest.java +++ b/open-metadata-test/open-metadata-fvt/access-services-fvt/asset-consumer-fvt/src/main/java/org/odpi/openmetadata/accessservices/assetconsumer/fvt/InformalTagLifecycleTest.java @@ -5,11 +5,11 @@ import org.odpi.openmetadata.accessservices.assetconsumer.client.AssetConsumer; import org.odpi.openmetadata.accessservices.assetconsumer.client.rest.AssetConsumerRESTClient; -import org.odpi.openmetadata.accessservices.assetconsumer.elements.InformalTagElement; -import org.odpi.openmetadata.accessservices.assetconsumer.properties.InformalTagProperties; import org.odpi.openmetadata.adminservices.configuration.registration.AccessServiceDescription; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.InformalTagElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.feedback.InformalTagProperties; import org.odpi.openmetadata.fvt.utilities.FVTResults; import org.odpi.openmetadata.fvt.utilities.auditlog.FVTAuditLogDestination; import org.odpi.openmetadata.fvt.utilities.exceptions.FVTUnexpectedCondition; @@ -200,7 +200,7 @@ private String getTagTest(AssetConsumer client, } activityName = testCaseName + "::getByGUIDAfterCreate" + tagTypeName; - InformalTagElement retrievedElement = client.getTag(userId, tagGUID); + InformalTagElement retrievedElement = client.getTag(userId, tagGUID); this.validateTag(retrievedElement, userId, tagName, tagDescription, isPrivate, activityName, tagTypeName); @@ -318,7 +318,7 @@ private void validateTag(InformalTagElement retrievedElement, String activityName, String tagTypeName) throws FVTUnexpectedCondition { - InformalTagProperties retrievedTag = retrievedElement.getInformalTagProperties(); + InformalTagProperties retrievedTag = retrievedElement.getProperties(); if (retrievedTag == null) { diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/asset-manager-fvt/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/fvt/common/AssetManagerTestBase.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/asset-manager-fvt/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/fvt/common/AssetManagerTestBase.java index 67c12b271aa..0470752ca23 100644 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/asset-manager-fvt/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/fvt/common/AssetManagerTestBase.java +++ b/open-metadata-test/open-metadata-fvt/access-services-fvt/asset-manager-fvt/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/fvt/common/AssetManagerTestBase.java @@ -11,13 +11,13 @@ import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.GlossaryTermElement; import org.odpi.openmetadata.frameworks.governanceaction.properties.ExternalIdentifierProperties; import org.odpi.openmetadata.frameworks.governanceaction.properties.MetadataCorrelationHeader; -import org.odpi.openmetadata.accessservices.assetmanager.properties.AssetManagerProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.GlossaryProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.GlossaryTermProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.glossaries.GlossaryTermProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities.AssetManagerProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.glossaries.GlossaryProperties; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStatus; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ElementStatus; import org.odpi.openmetadata.frameworks.openmetadata.enums.KeyPattern; import org.odpi.openmetadata.fvt.utilities.exceptions.FVTUnexpectedCondition; @@ -168,8 +168,8 @@ protected String getAssetManager(String assetManagerName, AssetManagerProperties properties = new AssetManagerProperties(); properties.setQualifiedName(assetManagerName); - properties.setDisplayName(assetManagerName + assetManagerDisplayName); - properties.setDescription(assetManagerName + assetManagerDescription); + properties.setResourceName(assetManagerName + assetManagerDisplayName); + properties.setResourceDescription(assetManagerName + assetManagerDescription); properties.setDeployedImplementationType(assetManagerName + assetManagerTypeDescription); properties.setVersion(assetManagerName + assetManagerVersion); diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/asset-manager-fvt/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/fvt/connections/CreateConnectionTest.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/asset-manager-fvt/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/fvt/connections/CreateConnectionTest.java index 9529062fde7..2dee780d580 100644 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/asset-manager-fvt/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/fvt/connections/CreateConnectionTest.java +++ b/open-metadata-test/open-metadata-fvt/access-services-fvt/asset-manager-fvt/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/fvt/connections/CreateConnectionTest.java @@ -9,14 +9,14 @@ import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.ConnectorTypeElement; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.ConnectionElement; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.EndpointElement; -import org.odpi.openmetadata.accessservices.assetmanager.properties.AssetManagerProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ConnectorTypeProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.ConnectionProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.EndpointProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.ConnectionProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.ConnectorTypeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.EndpointProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities.AssetManagerProperties; import org.odpi.openmetadata.adminservices.configuration.registration.AccessServiceDescription; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementStub; import org.odpi.openmetadata.frameworks.governanceaction.properties.ExternalIdentifierProperties; import org.odpi.openmetadata.fvt.utilities.FVTResults; import org.odpi.openmetadata.fvt.utilities.auditlog.FVTAuditLogDestination; @@ -169,7 +169,7 @@ private static void runIt(String serverPlatformRootURL, */ activityName = "updateNonExistentConnectorType"; - String connectorTypeTwoGUID = "Blah Blah"; + String connectorTypeTwoGUID = "Blah Blah"; ConnectorTypeProperties connectorTypeProperties = new ConnectorTypeProperties(); connectorTypeProperties.setQualifiedName(connectorTypeTwoName); connectorTypeProperties.setDisplayName(connectorTypeDisplayName); // Note wrong value @@ -288,8 +288,8 @@ private String getAssetManager(String serverName, AssetManagerProperties properties = new AssetManagerProperties(); properties.setQualifiedName(assetManagerName); - properties.setDisplayName(assetManagerDisplayName); - properties.setDescription(assetManagerDescription); + properties.setResourceName(assetManagerDisplayName); + properties.setResourceDescription(assetManagerDescription); properties.setDeployedImplementationType(assetManagerTypeDescription); properties.setVersion(assetManagerVersion); @@ -625,11 +625,11 @@ private void checkEndpointOK(ConnectionExchangeClient client, { throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad qualifiedName from Retrieve) =>>" + retrievedEndpoint); } - if (! endpointTechnicalName.equals(retrievedEndpoint.getTechnicalName())) + if (! endpointTechnicalName.equals(retrievedEndpoint.getName())) { throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad technicalName from Retrieve) =>>" + retrievedEndpoint); } - if (! endpointTechnicalDescription.equals(retrievedEndpoint.getTechnicalDescription())) + if (! endpointTechnicalDescription.equals(retrievedEndpoint.getResourceDescription())) { throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad technicalDescription from Retrieve) =>>" + retrievedEndpoint); } @@ -637,7 +637,7 @@ private void checkEndpointOK(ConnectionExchangeClient client, { throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad displayName from Retrieve) =>>" + retrievedEndpoint); } - if (! endpointDescription.equals(retrievedEndpoint.getDescription())) + if (! endpointDescription.equals(retrievedEndpoint.getDisplayDescription())) { throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad description from Retrieve) =>>" + retrievedEndpoint); } @@ -670,7 +670,7 @@ else if (endpointList.size() != 1) { throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad displayName from RetrieveByName) =>>" + retrievedEndpoint); } - if (! endpointDescription.equals(retrievedEndpoint.getDescription())) + if (! endpointDescription.equals(retrievedEndpoint.getDisplayDescription())) { throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad description from RetrieveByName) =>>" + retrievedEndpoint); } @@ -761,10 +761,10 @@ private String createEndpoint(ConnectionExchangeClient client, EndpointProperties properties = new EndpointProperties(); properties.setQualifiedName(endpointName); - properties.setTechnicalName(endpointTechnicalName); - properties.setTechnicalDescription(endpointTechnicalDescription); + properties.setName(endpointTechnicalName); + properties.setResourceDescription(endpointTechnicalDescription); properties.setDisplayName(endpointDisplayName); - properties.setDescription(endpointDescription); + properties.setDisplayDescription(endpointDescription); properties.setEffectiveFrom(effectiveFrom); properties.setEffectiveTo(effectiveTo); diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/asset-manager-fvt/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/fvt/dataassets/CreateDatabaseTest.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/asset-manager-fvt/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/fvt/dataassets/CreateDatabaseTest.java index b1bd633ba91..6fcc908e584 100644 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/asset-manager-fvt/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/fvt/dataassets/CreateDatabaseTest.java +++ b/open-metadata-test/open-metadata-fvt/access-services-fvt/asset-manager-fvt/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/fvt/dataassets/CreateDatabaseTest.java @@ -7,17 +7,17 @@ import org.odpi.openmetadata.accessservices.assetmanager.client.exchange.ExternalAssetManagerClient; import org.odpi.openmetadata.accessservices.assetmanager.client.rest.AssetManagerRESTClient; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.DataAssetElement; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.MetadataElement; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.RelationshipElement; +import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.CorrelatedMetadataElement; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.SchemaAttributeElement; -import org.odpi.openmetadata.accessservices.assetmanager.properties.AssetManagerProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.DataAssetProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.SchemaAttributeProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.SchemaTypeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.RelationshipElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.DataAssetProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.SchemaAttributeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.SchemaTypeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities.AssetManagerProperties; import org.odpi.openmetadata.adminservices.configuration.registration.AccessServiceDescription; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementClassification; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementClassification; import org.odpi.openmetadata.fvt.utilities.FVTResults; import org.odpi.openmetadata.fvt.utilities.auditlog.FVTAuditLogDestination; import org.odpi.openmetadata.fvt.utilities.exceptions.FVTUnexpectedCondition; @@ -422,8 +422,8 @@ private String getAssetManager(String serverName, AssetManagerProperties properties = new AssetManagerProperties(); properties.setQualifiedName(assetManagerName); - properties.setDisplayName(assetManagerDisplayName); - properties.setDescription(assetManagerDescription); + properties.setResourceName(assetManagerDisplayName); + properties.setResourceDescription(assetManagerDescription); properties.setDeployedImplementationType(assetManagerTypeDescription); properties.setVersion(assetManagerVersion); @@ -540,7 +540,7 @@ private void checkDatabaseOK(DataAssetExchangeClient client, { throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad displayName from Retrieve)"); } - if (! databaseDescription.equals(retrievedDatabase.getDescription())) + if (! databaseDescription.equals(retrievedDatabase.getDisplayDescription())) { throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad description from Retrieve)"); } @@ -584,7 +584,7 @@ else if (databaseList.size() != 1) { throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad displayName from RetrieveByName)"); } - if (! databaseDescription.equals(retrievedDatabase.getDescription())) + if (! databaseDescription.equals(retrievedDatabase.getDisplayDescription())) { throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad description from RetrieveByName)"); } @@ -639,7 +639,7 @@ private String getDatabase(DataAssetExchangeClient client, properties.setQualifiedName(databaseName); properties.setDisplayName(databaseDisplayName); - properties.setDescription(databaseDescription); + properties.setDisplayDescription(databaseDescription); properties.setTypeName("Database"); @@ -783,7 +783,7 @@ private void checkDatabaseSchemaOK(DataAssetExchangeClient client, { throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad displayName from Retrieve)"); } - if (! databaseSchemaDescription.equals(retrievedSchema.getDescription())) + if (! databaseSchemaDescription.equals(retrievedSchema.getDisplayDescription())) { throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad description from Retrieve)"); } @@ -818,7 +818,7 @@ else if (databaseSchemaList.size() != 1) { throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad displayName from RetrieveByName)"); } - if (! databaseSchemaDescription.equals(retrievedSchema.getDescription())) + if (! databaseSchemaDescription.equals(retrievedSchema.getDisplayDescription())) { throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad description from RetrieveByName)"); } @@ -879,7 +879,7 @@ private String getDatabaseSchema(DataAssetExchangeClient client, properties.setQualifiedName(databaseSchemaName); properties.setDisplayName(databaseSchemaDisplayName); - properties.setDescription(databaseSchemaDescription); + properties.setDisplayDescription(databaseSchemaDescription); properties.setTypeName("DeployedDatabaseSchema"); String databaseSchemaGUID = client.createDataAsset(userId, assetManagerGUID, assetManagerName, true, null, properties); @@ -1375,7 +1375,7 @@ private String createDatabaseColumn(DataAssetExchangeClient client, private void validateAnchorGUID(String activityName, - MetadataElement metadataElement) + CorrelatedMetadataElement metadataElement) { if (metadataElement.getElementHeader() != null) { diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/asset-manager-fvt/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/fvt/dataassets/CreateSchemasTest.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/asset-manager-fvt/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/fvt/dataassets/CreateSchemasTest.java index d84cf883ddb..00e79413165 100644 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/asset-manager-fvt/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/fvt/dataassets/CreateSchemasTest.java +++ b/open-metadata-test/open-metadata-fvt/access-services-fvt/asset-manager-fvt/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/fvt/dataassets/CreateSchemasTest.java @@ -6,16 +6,16 @@ import org.odpi.openmetadata.accessservices.assetmanager.client.exchange.DataAssetExchangeClient; import org.odpi.openmetadata.accessservices.assetmanager.client.exchange.ExternalAssetManagerClient; import org.odpi.openmetadata.accessservices.assetmanager.client.rest.AssetManagerRESTClient; +import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.CorrelatedMetadataElement; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.DataAssetElement; -import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.MetadataElement; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.SchemaTypeElement; -import org.odpi.openmetadata.accessservices.assetmanager.properties.AssetManagerProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.DataAssetProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.SchemaTypeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.DataAssetProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.SchemaTypeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities.AssetManagerProperties; import org.odpi.openmetadata.adminservices.configuration.registration.AccessServiceDescription; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementClassification; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementClassification; import org.odpi.openmetadata.fvt.utilities.FVTResults; import org.odpi.openmetadata.fvt.utilities.auditlog.FVTAuditLogDestination; import org.odpi.openmetadata.fvt.utilities.exceptions.FVTUnexpectedCondition; @@ -43,8 +43,10 @@ public class CreateSchemasTest private final static String assetManagerTypeDescription = "SchemaManager type"; private final static String assetManagerVersion = "SchemaManager version"; - private final static String assetName = "TestAsset"; - private final static String assetDisplayName = "Asset displayName"; + private final static String assetName = "TestAsset"; + private final static String assetShortName = "Asset name"; + private final static String assetResourceName = "Asset resourceName"; + private final static String assetDescription = "Asset description"; private final static String optionSchemaName = "TestSchemaTypeOption"; @@ -332,8 +334,8 @@ private String getAssetManager(String serverName, AssetManagerProperties properties = new AssetManagerProperties(); properties.setQualifiedName(assetManagerName); - properties.setDisplayName(assetManagerDisplayName); - properties.setDescription(assetManagerDescription); + properties.setResourceName(assetManagerDisplayName); + properties.setResourceDescription(assetManagerDescription); properties.setDeployedImplementationType(assetManagerTypeDescription); properties.setVersion(assetManagerVersion); @@ -449,11 +451,15 @@ private void checkAssetOK(DataAssetExchangeClient client, { throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad qualifiedName from Retrieve)"); } - if (! assetDisplayName.equals(retrievedAsset.getDisplayName())) + if (! assetShortName.equals(retrievedAsset.getName())) { - throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad displayName from Retrieve)"); + throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad name from Retrieve)"); + } + if (! assetResourceName.equals(retrievedAsset.getResourceName())) + { + throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad resource from Retrieve)"); } - if (! assetDescription.equals(retrievedAsset.getDescription())) + if (! assetDescription.equals(retrievedAsset.getResourceDescription())) { throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad description from Retrieve)"); } @@ -482,11 +488,15 @@ else if (assetList.size() != 1) { throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad qualifiedName from RetrieveByName)"); } - if (! assetDisplayName.equals(retrievedAsset.getDisplayName())) + if (! assetShortName.equals(retrievedAsset.getName())) { - throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad displayName from RetrieveByName)"); + throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad name from RetrieveByName)"); + } + if (! assetResourceName.equals(retrievedAsset.getResourceName())) + { + throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad resourceName from RetrieveByName)"); } - if (! assetDescription.equals(retrievedAsset.getDescription())) + if (! assetDescription.equals(retrievedAsset.getResourceDescription())) { throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad description from RetrieveByName)"); } @@ -529,8 +539,9 @@ private String getAsset(DataAssetExchangeClient client, DataAssetProperties properties = new DataAssetProperties(); properties.setQualifiedName(assetName); - properties.setDisplayName(assetDisplayName); - properties.setDescription(assetDescription); + properties.setName(assetShortName); + properties.setResourceName(assetResourceName); + properties.setResourceDescription(assetDescription); properties.setTypeName("AvroFile"); @@ -1235,7 +1246,7 @@ private String createPrimitive(DataAssetExchangeClient client, private void validateAnchorGUID(String activityName, - MetadataElement metadataElement) + CorrelatedMetadataElement metadataElement) { if (metadataElement.getElementHeader() != null) { diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/asset-manager-fvt/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/fvt/errorhandling/InvalidParameterTest.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/asset-manager-fvt/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/fvt/errorhandling/InvalidParameterTest.java index f37a718b433..ddea6e23090 100644 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/asset-manager-fvt/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/fvt/errorhandling/InvalidParameterTest.java +++ b/open-metadata-test/open-metadata-fvt/access-services-fvt/asset-manager-fvt/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/fvt/errorhandling/InvalidParameterTest.java @@ -7,8 +7,8 @@ import org.odpi.openmetadata.accessservices.assetmanager.client.exchange.ExternalAssetManagerClient; import org.odpi.openmetadata.accessservices.assetmanager.client.exchange.GlossaryExchangeClient; import org.odpi.openmetadata.accessservices.assetmanager.client.rest.AssetManagerRESTClient; -import org.odpi.openmetadata.accessservices.assetmanager.properties.AssetManagerProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.GlossaryProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities.AssetManagerProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.glossaries.GlossaryProperties; import org.odpi.openmetadata.adminservices.configuration.registration.AccessServiceDescription; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/asset-manager-fvt/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/fvt/glossaries/CreateExchangeGlossaryTest.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/asset-manager-fvt/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/fvt/glossaries/CreateExchangeGlossaryTest.java index f22c65cffa2..5268eebaec6 100644 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/asset-manager-fvt/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/fvt/glossaries/CreateExchangeGlossaryTest.java +++ b/open-metadata-test/open-metadata-fvt/access-services-fvt/asset-manager-fvt/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/fvt/glossaries/CreateExchangeGlossaryTest.java @@ -8,14 +8,17 @@ import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.GlossaryCategoryElement; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.GlossaryElement; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.GlossaryTermElement; -import org.odpi.openmetadata.accessservices.assetmanager.properties.*; import org.odpi.openmetadata.adminservices.configuration.registration.AccessServiceDescription; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStatus; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ElementStatus; import org.odpi.openmetadata.frameworks.governanceaction.properties.ExternalIdentifierProperties; import org.odpi.openmetadata.frameworks.openmetadata.enums.GlossaryTermRelationshipStatus; +import org.odpi.openmetadata.frameworks.openmetadata.enums.GlossaryTermStatus; import org.odpi.openmetadata.frameworks.openmetadata.enums.KeyPattern; +import org.odpi.openmetadata.frameworks.openmetadata.properties.glossaries.GlossaryCategoryProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.glossaries.GlossaryTermCategorization; +import org.odpi.openmetadata.frameworks.openmetadata.properties.glossaries.GlossaryTermProperties; import org.odpi.openmetadata.fvt.utilities.FVTResults; import org.odpi.openmetadata.fvt.utilities.auditlog.FVTAuditLogDestination; import org.odpi.openmetadata.fvt.utilities.exceptions.FVTUnexpectedCondition; @@ -221,7 +224,7 @@ else if (glossaryElement.getGlossaryProperties() == null) try { - GlossaryTermProperties properties = new GlossaryTermProperties(); + GlossaryTermProperties properties = new GlossaryTermProperties(); extendedProperties = new HashMap<>(); extendedProperties.put("badPropertyName", controlledGlossaryTermStatus); diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/asset-manager-fvt/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/fvt/glossaries/CreateManagementGlossaryTest.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/asset-manager-fvt/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/fvt/glossaries/CreateManagementGlossaryTest.java index adc0d8c1c5a..39cadb87cdb 100644 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/asset-manager-fvt/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/fvt/glossaries/CreateManagementGlossaryTest.java +++ b/open-metadata-test/open-metadata-fvt/access-services-fvt/asset-manager-fvt/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/fvt/glossaries/CreateManagementGlossaryTest.java @@ -8,15 +8,15 @@ import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.GlossaryCategoryElement; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.GlossaryElement; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.GlossaryTermElement; -import org.odpi.openmetadata.accessservices.assetmanager.properties.GlossaryCategoryProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.GlossaryTermCategorization; -import org.odpi.openmetadata.accessservices.assetmanager.properties.GlossaryTermProperties; -import org.odpi.openmetadata.accessservices.assetmanager.properties.GlossaryTermStatus; +import org.odpi.openmetadata.frameworks.openmetadata.enums.GlossaryTermStatus; +import org.odpi.openmetadata.frameworks.openmetadata.properties.glossaries.GlossaryCategoryProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.glossaries.GlossaryTermCategorization; import org.odpi.openmetadata.adminservices.configuration.registration.AccessServiceDescription; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStatus; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ElementStatus; import org.odpi.openmetadata.frameworks.openmetadata.enums.GlossaryTermRelationshipStatus; +import org.odpi.openmetadata.frameworks.openmetadata.properties.glossaries.GlossaryTermProperties; import org.odpi.openmetadata.fvt.utilities.FVTResults; import org.odpi.openmetadata.fvt.utilities.auditlog.FVTAuditLogDestination; import org.odpi.openmetadata.fvt.utilities.exceptions.FVTUnexpectedCondition; @@ -183,7 +183,7 @@ else if (glossaryElement.getGlossaryProperties() == null) try { - GlossaryTermProperties properties = new GlossaryTermProperties(); + GlossaryTermProperties properties = new GlossaryTermProperties(); extendedProperties = new HashMap<>(); extendedProperties.put("badPropertyName", controlledGlossaryTermStatus); diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/asset-owner-fvt/src/main/java/org/odpi/openmetadata/accessservices/assetowner/fvt/assets/CreateAssetTest.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/asset-owner-fvt/src/main/java/org/odpi/openmetadata/accessservices/assetowner/fvt/assets/CreateAssetTest.java index 2ad06ec917b..4be68cf3b29 100644 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/asset-owner-fvt/src/main/java/org/odpi/openmetadata/accessservices/assetowner/fvt/assets/CreateAssetTest.java +++ b/open-metadata-test/open-metadata-fvt/access-services-fvt/asset-owner-fvt/src/main/java/org/odpi/openmetadata/accessservices/assetowner/fvt/assets/CreateAssetTest.java @@ -5,9 +5,9 @@ import org.odpi.openmetadata.accessservices.assetowner.client.AssetOwner; import org.odpi.openmetadata.accessservices.assetowner.client.rest.AssetOwnerRESTClient; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.AssetElement; -import org.odpi.openmetadata.accessservices.assetowner.properties.AssetProperties; -import org.odpi.openmetadata.accessservices.assetowner.properties.SchemaTypeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.AssetElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.AssetProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.SchemaTypeProperties; import org.odpi.openmetadata.accessservices.assetowner.properties.TemplateProperties; import org.odpi.openmetadata.adminservices.configuration.registration.AccessServiceDescription; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; @@ -176,7 +176,7 @@ private String getAsset(AssetOwner client, properties.setTypeName("Asset"); properties.setQualifiedName(assetQualifiedName); properties.setName(assetResourceName); - properties.setDescription(assetResourceDescription); + properties.setResourceDescription(assetResourceDescription); properties.setAdditionalProperties(additionalProperties); String assetGUID = client.addAssetToCatalog(userId, properties); @@ -231,7 +231,7 @@ private String getAsset(AssetOwner client, properties.setTypeName("Asset"); properties.setQualifiedName(assetQualifiedName); properties.setName(assetResourceName + " - 2"); - properties.setDescription(assetResourceDescription + " - 2"); + properties.setResourceDescription(assetResourceDescription + " - 2"); properties.setDisplayName(assetDisplayName + " - 2"); properties.setDisplaySummary(assetDisplaySummary + " - 2"); properties.setDisplayDescription(assetDisplayDescription + " - 2"); @@ -292,7 +292,7 @@ private String getFullAsset(AssetOwner client, properties.setQualifiedName(assetFullQualifiedName); properties.setName(assetResourceName); properties.setVersionIdentifier(assetVersionIdentifier); - properties.setDescription(assetResourceDescription); + properties.setResourceDescription(assetResourceDescription); properties.setDisplayName(assetDisplayName); properties.setDisplaySummary(assetDisplaySummary); properties.setDisplayDescription(assetDisplayDescription); @@ -352,7 +352,7 @@ private void validateAsset(AssetOwner client, } AssetElement retrievedElement = client.getAssetSummary(userId, assetGUID); - AssetProperties retrievedAsset = retrievedElement.getAssetProperties(); + AssetProperties retrievedAsset = retrievedElement.getProperties(); if (retrievedAsset == null) { @@ -378,7 +378,7 @@ else if (! versionIdentifier.equals(retrievedAsset.getVersionIdentifier())) { throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad versionIdentifier from Retrieve)"); } - if (! description.equals(retrievedAsset.getDescription())) + if (! description.equals(retrievedAsset.getResourceDescription())) { throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad description from Retrieve)"); } @@ -419,7 +419,7 @@ else if (assetList.size() != 1) } retrievedElement = assetList.get(0); - retrievedAsset = retrievedElement.getAssetProperties(); + retrievedAsset = retrievedElement.getProperties(); if (! qualifiedName.equals(retrievedAsset.getQualifiedName())) { @@ -440,7 +440,7 @@ else if (! versionIdentifier.equals(retrievedAsset.getVersionIdentifier())) { throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad versionIdentifier from RetrieveByName)"); } - if (! description.equals(retrievedAsset.getDescription())) + if (! description.equals(retrievedAsset.getResourceDescription())) { throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad description from RetrieveByName)"); } @@ -497,7 +497,7 @@ private void validateAsset(AssetOwner client, } AssetElement retrievedElement = client.getAssetSummary(userId, assetGUID); - AssetProperties retrievedAsset = retrievedElement.getAssetProperties(); + AssetProperties retrievedAsset = retrievedElement.getProperties(); if (retrievedAsset == null) { @@ -523,7 +523,7 @@ else if (! versionIdentifier.equals(retrievedAsset.getVersionIdentifier())) { throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad versionIdentifier from Retrieve)"); } - if (! description.equals(retrievedAsset.getDescription())) + if (! description.equals(retrievedAsset.getResourceDescription())) { throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad description from Retrieve)"); } @@ -584,7 +584,7 @@ else if (assetList.size() != 1) } retrievedElement = assetList.get(0); - retrievedAsset = retrievedElement.getAssetProperties(); + retrievedAsset = retrievedElement.getProperties(); if (! qualifiedName.equals(retrievedAsset.getQualifiedName())) { @@ -605,7 +605,7 @@ else if (! versionIdentifier.equals(retrievedAsset.getVersionIdentifier())) { throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad versionIdentifier from RetrieveByName)"); } - if (! description.equals(retrievedAsset.getDescription())) + if (! description.equals(retrievedAsset.getResourceDescription())) { throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad description from RetrieveByName)"); } diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/asset-owner-fvt/src/main/java/org/odpi/openmetadata/accessservices/assetowner/fvt/connections/CreateConnectionTest.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/asset-owner-fvt/src/main/java/org/odpi/openmetadata/accessservices/assetowner/fvt/connections/CreateConnectionTest.java index 95495b9d4bd..c7b9f9751d8 100644 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/asset-owner-fvt/src/main/java/org/odpi/openmetadata/accessservices/assetowner/fvt/connections/CreateConnectionTest.java +++ b/open-metadata-test/open-metadata-fvt/access-services-fvt/asset-owner-fvt/src/main/java/org/odpi/openmetadata/accessservices/assetowner/fvt/connections/CreateConnectionTest.java @@ -5,16 +5,13 @@ import org.odpi.openmetadata.accessservices.assetowner.client.AssetOwner; import org.odpi.openmetadata.accessservices.assetowner.client.rest.AssetOwnerRESTClient; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.ConnectionElement; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.ConnectorTypeElement; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.EndpointElement; -import org.odpi.openmetadata.accessservices.assetowner.properties.ConnectionProperties; -import org.odpi.openmetadata.accessservices.assetowner.properties.ConnectorTypeProperties; -import org.odpi.openmetadata.accessservices.assetowner.properties.EndpointProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.ConnectionProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.ConnectorTypeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.EndpointProperties; import org.odpi.openmetadata.adminservices.configuration.registration.AccessServiceDescription; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; import org.odpi.openmetadata.fvt.utilities.FVTResults; import org.odpi.openmetadata.fvt.utilities.auditlog.FVTAuditLogDestination; import org.odpi.openmetadata.fvt.utilities.exceptions.FVTUnexpectedCondition; @@ -447,7 +444,7 @@ private void checkEndpointOK(AssetOwner client, { throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad displayName from Retrieve) =>>" + retrievedEndpoint); } - if (! endpointDescription.equals(retrievedEndpoint.getDescription())) + if (! endpointDescription.equals(retrievedEndpoint.getResourceDescription())) { throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad description from Retrieve) =>>" + retrievedEndpoint); } @@ -480,7 +477,7 @@ else if (endpointList.size() != 1) { throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad displayName from RetrieveByName) =>>" + retrievedEndpoint); } - if (! endpointDescription.equals(retrievedEndpoint.getDescription())) + if (! endpointDescription.equals(retrievedEndpoint.getResourceDescription())) { throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad description from RetrieveByName) =>>" + retrievedEndpoint); } @@ -559,7 +556,7 @@ private String createEndpoint(AssetOwner client, properties.setQualifiedName(endpointName); properties.setName(endpointDisplayName); - properties.setDescription(endpointDescription); + properties.setResourceDescription(endpointDescription); String endpointGUID = client.createEndpoint(userId, properties); diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/asset-owner-fvt/src/main/java/org/odpi/openmetadata/accessservices/assetowner/fvt/dataassets/CreateDatabaseTest.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/asset-owner-fvt/src/main/java/org/odpi/openmetadata/accessservices/assetowner/fvt/dataassets/CreateDatabaseTest.java index ca6bc7ca8da..26a3f6a9575 100644 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/asset-owner-fvt/src/main/java/org/odpi/openmetadata/accessservices/assetowner/fvt/dataassets/CreateDatabaseTest.java +++ b/open-metadata-test/open-metadata-fvt/access-services-fvt/asset-owner-fvt/src/main/java/org/odpi/openmetadata/accessservices/assetowner/fvt/dataassets/CreateDatabaseTest.java @@ -5,19 +5,18 @@ import org.odpi.openmetadata.accessservices.assetowner.client.AssetOwner; import org.odpi.openmetadata.accessservices.assetowner.client.rest.AssetOwnerRESTClient; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.AssetElement; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.MetadataElement; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.RelationshipElement; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.SchemaAttributeElement; -import org.odpi.openmetadata.accessservices.assetowner.properties.AssetProperties; -import org.odpi.openmetadata.accessservices.assetowner.properties.SchemaAttributeProperties; -import org.odpi.openmetadata.accessservices.assetowner.properties.SchemaTypeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.AssetElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.MetadataElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.RelationshipElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.SchemaAttributeElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.AssetProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.SchemaAttributeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.SchemaTypeProperties; import org.odpi.openmetadata.adminservices.configuration.registration.AccessServiceDescription; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementClassification; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementClassification; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; -import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType; import org.odpi.openmetadata.fvt.utilities.FVTResults; import org.odpi.openmetadata.fvt.utilities.auditlog.FVTAuditLogDestination; import org.odpi.openmetadata.fvt.utilities.exceptions.FVTUnexpectedCondition; @@ -250,7 +249,7 @@ private static void runIt(String serverPlatformRootURL, SchemaTypeProperties attributeType = new SchemaTypeProperties(); attributeType.setTypeName("PrimitiveSchemaType"); - databaseColumnTwoProperties.setAttributeType(attributeType); + databaseColumnTwoProperties.setSchemaType(attributeType); try @@ -294,7 +293,7 @@ private static void runIt(String serverPlatformRootURL, extendedProperties.put("dataType", databaseColumnTwoType); schemaType.setExtendedProperties(extendedProperties); - databaseColumnTwoProperties.setAttributeType(schemaType); + databaseColumnTwoProperties.setSchemaType(schemaType); client.updateSchemaAttribute(userId, databaseColumnTwoGUID, true, databaseColumnTwoProperties); afterElement = client.getSchemaAttributeByGUID(userId, databaseColumnTwoGUID); @@ -307,7 +306,7 @@ private static void runIt(String serverPlatformRootURL, throw new FVTUnexpectedCondition(testCaseName, activityName + "(version changed from " + beforeElement.getElementHeader().getVersions() + " to " + afterElement.getElementHeader().getVersions() + ")"); } - Object dataType = afterElement.getSchemaAttributeProperties().getAttributeType().getExtendedProperties().get("dataType"); + Object dataType = afterElement.getSchemaAttributeProperties().getSchemaType().getExtendedProperties().get("dataType"); if (! databaseColumnTwoType.equals(dataType)) { throw new FVTUnexpectedCondition(testCaseName, activityName + "(data type should be " + databaseColumnTwoType + " rather than " + dataType + "). Returned element: " + afterElement); @@ -458,7 +457,7 @@ private void checkDatabaseOK(AssetOwner client, throw new FVTUnexpectedCondition(testCaseName, activityName + "(no DatabaseElement from Retrieve)"); } - AssetProperties retrievedDatabase = retrievedElement.getAssetProperties(); + AssetProperties retrievedDatabase = retrievedElement.getProperties(); if (retrievedDatabase == null) { @@ -473,7 +472,7 @@ private void checkDatabaseOK(AssetOwner client, { throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad displayName from Retrieve)"); } - if (! databaseDescription.equals(retrievedDatabase.getDescription())) + if (! databaseDescription.equals(retrievedDatabase.getResourceDescription())) { throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad description from Retrieve)"); } @@ -507,7 +506,7 @@ else if (databaseList.size() != 1) } retrievedElement = databaseList.get(0); - retrievedDatabase = retrievedElement.getAssetProperties(); + retrievedDatabase = retrievedElement.getProperties(); if (! databaseName.equals(retrievedDatabase.getQualifiedName())) { @@ -517,7 +516,7 @@ else if (databaseList.size() != 1) { throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad displayName from RetrieveByName)"); } - if (! databaseDescription.equals(retrievedDatabase.getDescription())) + if (! databaseDescription.equals(retrievedDatabase.getResourceDescription())) { throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad description from RetrieveByName)"); } @@ -569,7 +568,7 @@ private String getDatabase(AssetOwner client, properties.setQualifiedName(databaseName); properties.setDisplayName(databaseDisplayName); - properties.setDescription(databaseDescription); + properties.setResourceDescription(databaseDescription); properties.setTypeName("Database"); @@ -695,7 +694,7 @@ private void checkDatabaseSchemaOK(AssetOwner client, validateAnchorGUID(activityName, retrievedElement); - AssetProperties retrievedSchema = retrievedElement.getAssetProperties(); + AssetProperties retrievedSchema = retrievedElement.getProperties(); if (retrievedSchema == null) { @@ -710,7 +709,7 @@ private void checkDatabaseSchemaOK(AssetOwner client, { throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad displayName from Retrieve)"); } - if (! databaseSchemaDescription.equals(retrievedSchema.getDescription())) + if (! databaseSchemaDescription.equals(retrievedSchema.getResourceDescription())) { throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad description from Retrieve)"); } @@ -734,7 +733,7 @@ else if (databaseSchemaList.size() != 1) } retrievedElement = databaseSchemaList.get(0); - retrievedSchema = retrievedElement.getAssetProperties(); + retrievedSchema = retrievedElement.getProperties(); if (! databaseSchemaName.equals(retrievedSchema.getQualifiedName())) { @@ -744,7 +743,7 @@ else if (databaseSchemaList.size() != 1) { throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad displayName from RetrieveByName)"); } - if (! databaseSchemaDescription.equals(retrievedSchema.getDescription())) + if (! databaseSchemaDescription.equals(retrievedSchema.getResourceDescription())) { throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad description from RetrieveByName)"); } @@ -801,7 +800,7 @@ private String getDatabaseSchema(AssetOwner client, properties.setQualifiedName(databaseSchemaName); properties.setDisplayName(databaseSchemaDisplayName); - properties.setDescription(databaseSchemaDescription); + properties.setResourceDescription(databaseSchemaDescription); properties.setTypeName("DeployedDatabaseSchema"); String databaseSchemaGUID = client.addAssetToCatalog(userId, properties); @@ -996,7 +995,7 @@ private String createDatabaseTable(AssetOwner client, SchemaTypeProperties attributeType = new SchemaTypeProperties(); attributeType.setTypeName("RelationalTableType"); - properties.setAttributeType(attributeType); + properties.setSchemaType(attributeType); String databaseTableGUID = client.addSchemaAttribute(userId, databaseSchemaGUID, databaseSchemaTypeGUID, properties); @@ -1050,7 +1049,7 @@ private String createDatabaseTableForSchemaType(AssetOwner client, SchemaTypeProperties attributeType = new SchemaTypeProperties(); attributeType.setTypeName("RelationalTableType"); - properties.setAttributeType(attributeType); + properties.setSchemaType(attributeType); String databaseTableGUID = client.addSchemaAttribute(userId, databaseSchemaGUID, databaseSchemaTypeGUID, properties); @@ -1273,7 +1272,7 @@ private String createDatabaseColumn(AssetOwner client, schemaTypeProperties.setQualifiedName("SchemaType:" + databaseColumnName); schemaTypeProperties.setExtendedProperties(extendedProperties); - properties.setAttributeType(schemaTypeProperties); + properties.setSchemaType(schemaTypeProperties); String databaseColumnGUID = client.addSchemaAttribute(userId, databaseSchemaGUID, databaseTableGUID, properties); diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/asset-owner-fvt/src/main/java/org/odpi/openmetadata/accessservices/assetowner/fvt/dataassets/CreateSchemasTest.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/asset-owner-fvt/src/main/java/org/odpi/openmetadata/accessservices/assetowner/fvt/dataassets/CreateSchemasTest.java index 54aec0aebcd..d00701090bc 100644 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/asset-owner-fvt/src/main/java/org/odpi/openmetadata/accessservices/assetowner/fvt/dataassets/CreateSchemasTest.java +++ b/open-metadata-test/open-metadata-fvt/access-services-fvt/asset-owner-fvt/src/main/java/org/odpi/openmetadata/accessservices/assetowner/fvt/dataassets/CreateSchemasTest.java @@ -5,15 +5,15 @@ import org.odpi.openmetadata.accessservices.assetowner.client.AssetOwner; import org.odpi.openmetadata.accessservices.assetowner.client.rest.AssetOwnerRESTClient; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.AssetElement; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.MetadataElement; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.SchemaTypeElement; -import org.odpi.openmetadata.accessservices.assetowner.properties.AssetProperties; -import org.odpi.openmetadata.accessservices.assetowner.properties.SchemaTypeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.AssetElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.MetadataElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.SchemaTypeElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.AssetProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.SchemaTypeProperties; import org.odpi.openmetadata.adminservices.configuration.registration.AccessServiceDescription; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementClassification; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementClassification; import org.odpi.openmetadata.fvt.utilities.FVTResults; import org.odpi.openmetadata.fvt.utilities.auditlog.FVTAuditLogDestination; import org.odpi.openmetadata.fvt.utilities.exceptions.FVTUnexpectedCondition; @@ -365,7 +365,7 @@ private void checkAssetOK(AssetOwner client, System.out.println("Asset Element: " + retrievedElement); validateAnchorGUID(activityName, retrievedElement); - AssetProperties retrievedAsset = retrievedElement.getAssetProperties(); + AssetProperties retrievedAsset = retrievedElement.getProperties(); if (retrievedAsset == null) { @@ -380,7 +380,7 @@ private void checkAssetOK(AssetOwner client, { throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad displayName from Retrieve)"); } - if (! assetDescription.equals(retrievedAsset.getDescription())) + if (! assetDescription.equals(retrievedAsset.getResourceDescription())) { throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad description from Retrieve)"); } @@ -403,7 +403,7 @@ else if (assetList.size() != 1) } retrievedElement = assetList.get(0); - retrievedAsset = retrievedElement.getAssetProperties(); + retrievedAsset = retrievedElement.getProperties(); if (! assetName.equals(retrievedAsset.getQualifiedName())) { @@ -413,7 +413,7 @@ else if (assetList.size() != 1) { throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad displayName from RetrieveByName)"); } - if (! assetDescription.equals(retrievedAsset.getDescription())) + if (! assetDescription.equals(retrievedAsset.getResourceDescription())) { throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad description from RetrieveByName)"); } @@ -455,7 +455,7 @@ private String getAsset(AssetOwner client, properties.setQualifiedName(assetName); properties.setDisplayName(assetDisplayName); - properties.setDescription(assetDescription); + properties.setResourceDescription(assetDescription); properties.setTypeName("AvroFile"); diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/asset-owner-fvt/src/main/java/org/odpi/openmetadata/accessservices/assetowner/fvt/duplicateprocessing/DuplicateAssetTest.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/asset-owner-fvt/src/main/java/org/odpi/openmetadata/accessservices/assetowner/fvt/duplicateprocessing/DuplicateAssetTest.java index 515936e37c5..08d5d387ee5 100644 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/asset-owner-fvt/src/main/java/org/odpi/openmetadata/accessservices/assetowner/fvt/duplicateprocessing/DuplicateAssetTest.java +++ b/open-metadata-test/open-metadata-fvt/access-services-fvt/asset-owner-fvt/src/main/java/org/odpi/openmetadata/accessservices/assetowner/fvt/duplicateprocessing/DuplicateAssetTest.java @@ -5,9 +5,9 @@ import org.odpi.openmetadata.accessservices.assetowner.client.AssetOwner; import org.odpi.openmetadata.accessservices.assetowner.client.rest.AssetOwnerRESTClient; -import org.odpi.openmetadata.accessservices.assetowner.metadataelements.AssetElement; -import org.odpi.openmetadata.accessservices.assetowner.properties.AssetProperties; -import org.odpi.openmetadata.accessservices.assetowner.properties.SchemaTypeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.AssetElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.AssetProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.SchemaTypeProperties; import org.odpi.openmetadata.adminservices.configuration.registration.AccessServiceDescription; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.fvt.utilities.FVTResults; @@ -20,7 +20,7 @@ /** - * CreateAssetTest calls the AssetOwnerClient to create an asset with with attachments + * CreateAssetTest calls the AssetOwnerClient to create an asset with attachments * and then retrieve the results. */ public class DuplicateAssetTest @@ -158,7 +158,7 @@ private String getAsset(AssetOwner client, properties.setTypeName("Asset"); properties.setQualifiedName(assetName); properties.setDisplayName(assetDisplayName); - properties.setDescription(assetDescription); + properties.setResourceDescription(assetDescription); properties.setAdditionalProperties(additionalProperties); String assetGUID = client.addAssetToCatalog(userId, properties); @@ -169,7 +169,7 @@ private String getAsset(AssetOwner client, } AssetElement retrievedElement = client.getAssetSummary(userId, assetGUID); - AssetProperties retrievedAsset = retrievedElement.getAssetProperties(); + AssetProperties retrievedAsset = retrievedElement.getProperties(); if (retrievedAsset == null) { @@ -184,7 +184,7 @@ private String getAsset(AssetOwner client, { throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad displayName from Retrieve)"); } - if (! assetDescription.equals(retrievedAsset.getDescription())) + if (! assetDescription.equals(retrievedAsset.getResourceDescription())) { throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad description from Retrieve)"); } @@ -215,7 +215,7 @@ else if (assetList.size() != 1) } retrievedElement = assetList.get(0); - retrievedAsset = retrievedElement.getAssetProperties(); + retrievedAsset = retrievedElement.getProperties(); if (! assetName.equals(retrievedAsset.getQualifiedName())) { @@ -225,7 +225,7 @@ else if (assetList.size() != 1) { throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad displayName from RetrieveByName)"); } - if (! assetDescription.equals(retrievedAsset.getDescription())) + if (! assetDescription.equals(retrievedAsset.getResourceDescription())) { throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad description from RetrieveByName)"); } diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/community-profile-fvt/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/fvt/errorhandling/InvalidParameterTest.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/community-profile-fvt/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/fvt/errorhandling/InvalidParameterTest.java index bb3f3ed0ff8..065c2a390d5 100644 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/community-profile-fvt/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/fvt/errorhandling/InvalidParameterTest.java +++ b/open-metadata-test/open-metadata-fvt/access-services-fvt/community-profile-fvt/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/fvt/errorhandling/InvalidParameterTest.java @@ -7,11 +7,11 @@ import org.odpi.openmetadata.accessservices.communityprofile.client.OrganizationManagement; import org.odpi.openmetadata.accessservices.communityprofile.client.rest.CommunityProfileRESTClient; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ActorProfileProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.CommunityProperties; import org.odpi.openmetadata.adminservices.configuration.registration.AccessServiceDescription; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.ActorProfileProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.communities.CommunityProperties; import org.odpi.openmetadata.fvt.utilities.FVTResults; import org.odpi.openmetadata.fvt.utilities.auditlog.FVTAuditLogDestination; import org.odpi.openmetadata.fvt.utilities.exceptions.FVTUnexpectedCondition; @@ -461,7 +461,7 @@ private void testSetUpProfileNoName(OrganizationManagement client, try { - client.createActorProfile(userId, null, null, new ActorProfileProperties(), null); + client.createActorProfile(userId, null, null, new ActorProfileProperties(), null); throw new FVTUnexpectedCondition(testCaseName, activityName); } diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/community-profile-fvt/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/fvt/locations/CreateLocationsTest.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/community-profile-fvt/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/fvt/locations/CreateLocationsTest.java index a8d421af6a2..e2e625aa7f7 100644 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/community-profile-fvt/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/fvt/locations/CreateLocationsTest.java +++ b/open-metadata-test/open-metadata-fvt/access-services-fvt/community-profile-fvt/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/fvt/locations/CreateLocationsTest.java @@ -6,10 +6,10 @@ import org.odpi.openmetadata.accessservices.communityprofile.client.LocationManagement; import org.odpi.openmetadata.accessservices.communityprofile.client.rest.CommunityProfileRESTClient; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.LocationElement; -import org.odpi.openmetadata.accessservices.communityprofile.properties.FixedLocationProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.LocationProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.NestedLocationProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.LocationElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.locations.FixedLocationProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.locations.LocationProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.locations.NestedLocationProperties; import org.odpi.openmetadata.adminservices.configuration.registration.AccessServiceDescription; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/community-profile-fvt/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/fvt/metadatasources/CreateMetadataSourceTest.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/community-profile-fvt/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/fvt/metadatasources/CreateMetadataSourceTest.java index 7ad839c9ade..4d2fa1e30a5 100644 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/community-profile-fvt/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/fvt/metadatasources/CreateMetadataSourceTest.java +++ b/open-metadata-test/open-metadata-fvt/access-services-fvt/community-profile-fvt/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/fvt/metadatasources/CreateMetadataSourceTest.java @@ -6,12 +6,12 @@ import org.odpi.openmetadata.accessservices.communityprofile.client.MetadataSourceClient; import org.odpi.openmetadata.accessservices.communityprofile.client.rest.CommunityProfileRESTClient; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.MetadataSourceElement; -import org.odpi.openmetadata.accessservices.communityprofile.properties.MetadataSourceProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.MetadataSourceElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities.MetadataSourceProperties; import org.odpi.openmetadata.adminservices.configuration.registration.AccessServiceDescription; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementClassification; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementClassification; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader; import org.odpi.openmetadata.fvt.utilities.FVTResults; import org.odpi.openmetadata.fvt.utilities.auditlog.FVTAuditLogDestination; import org.odpi.openmetadata.fvt.utilities.exceptions.FVTUnexpectedCondition; diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/community-profile-fvt/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/fvt/profiles/CreateProfileTest.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/community-profile-fvt/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/fvt/profiles/CreateProfileTest.java index 96040aeac88..17ef9a418ec 100644 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/community-profile-fvt/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/fvt/profiles/CreateProfileTest.java +++ b/open-metadata-test/open-metadata-fvt/access-services-fvt/community-profile-fvt/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/fvt/profiles/CreateProfileTest.java @@ -6,12 +6,12 @@ import org.odpi.openmetadata.accessservices.communityprofile.client.OrganizationManagement; import org.odpi.openmetadata.accessservices.communityprofile.client.rest.CommunityProfileRESTClient; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ActorProfileProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.AppointmentProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.PersonRoleProperties; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.ActorProfileElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.ActorProfileProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.AppointmentProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ActorProfileElement; import org.odpi.openmetadata.adminservices.configuration.registration.AccessServiceDescription; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actors.PersonRoleProperties; import org.odpi.openmetadata.fvt.utilities.FVTResults; import org.odpi.openmetadata.fvt.utilities.auditlog.FVTAuditLogDestination; import org.odpi.openmetadata.fvt.utilities.exceptions.FVTUnexpectedCondition; diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/community-profile-fvt/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/fvt/todos/ToDosTest.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/community-profile-fvt/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/fvt/todos/ToDosTest.java index 90ce072dd0c..e3988ee55a8 100644 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/community-profile-fvt/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/fvt/todos/ToDosTest.java +++ b/open-metadata-test/open-metadata-fvt/access-services-fvt/community-profile-fvt/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/fvt/todos/ToDosTest.java @@ -6,16 +6,16 @@ import org.odpi.openmetadata.accessservices.communityprofile.client.OpenMetadataStoreClient; import org.odpi.openmetadata.accessservices.communityprofile.client.ToDoActionManagement; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.ActionTargetElement; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.ToDoElement; -import org.odpi.openmetadata.accessservices.communityprofile.properties.NewActionTargetProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ToDoProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ToDoActionTargetElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ToDoElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actions.NewToDoActionTargetProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.actions.ToDoProperties; import org.odpi.openmetadata.frameworks.openmetadata.enums.ToDoStatus; import org.odpi.openmetadata.adminservices.configuration.registration.AccessServiceDescription; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStatus; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ElementStatus; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementStub; import org.odpi.openmetadata.frameworks.governanceaction.client.OpenMetadataClient; import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataProperty; import org.odpi.openmetadata.frameworks.governanceaction.search.ElementProperties; @@ -404,9 +404,9 @@ private String getToDo(ToDoActionManagement client, properties.setDescription(toDoDescription); properties.setToDoType(toDoType); - List actionTargetPropertiesList = new ArrayList<>(); + List actionTargetPropertiesList = new ArrayList<>(); - NewActionTargetProperties newActionTargetProperties = new NewActionTargetProperties(); + NewToDoActionTargetProperties newActionTargetProperties = new NewToDoActionTargetProperties(); newActionTargetProperties.setActionTargetGUID(assetGUID); newActionTargetProperties.setActionTargetName(actionTargetName); @@ -869,15 +869,15 @@ private void checkToDoElementOK(ToDoElement retrievedElement, throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad number of action targets from Retrieve) =>> "); } - ActionTargetElement actionTarget = retrievedElement.getActionTargets().get(0); + ToDoActionTargetElement actionTarget = retrievedElement.getActionTargets().get(0); if (actionTarget == null) { throw new FVTUnexpectedCondition(testCaseName, activityName + "(Null action target from Retrieve)"); } - if (! assetGUID.equals(actionTarget.getTargetElement().getElementGUID())) + if (! assetGUID.equals(actionTarget.getTargetElement().getGUID())) { - throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad action target GUID from Retrieve) =>> " + actionTarget.getTargetElement().getElementGUID()); + throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad action target GUID from Retrieve) =>> " + actionTarget.getTargetElement().getGUID()); } if (! actionTargetName.equals(actionTarget.getRelationshipProperties().getActionTargetName())) diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/community-profile-fvt/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/fvt/validvalues/CreateValidValuesSetTest.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/community-profile-fvt/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/fvt/validvalues/CreateValidValuesSetTest.java index 2951bb43b59..337b6d6a1fb 100644 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/community-profile-fvt/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/fvt/validvalues/CreateValidValuesSetTest.java +++ b/open-metadata-test/open-metadata-fvt/access-services-fvt/community-profile-fvt/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/fvt/validvalues/CreateValidValuesSetTest.java @@ -6,12 +6,12 @@ import org.odpi.openmetadata.accessservices.communityprofile.client.ValidValueManagement; import org.odpi.openmetadata.accessservices.communityprofile.client.rest.CommunityProfileRESTClient; -import org.odpi.openmetadata.accessservices.communityprofile.metadataelements.ValidValueElement; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ValidValueMembershipProperties; -import org.odpi.openmetadata.accessservices.communityprofile.properties.ValidValueProperties; import org.odpi.openmetadata.adminservices.configuration.registration.AccessServiceDescription; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ValidValueElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues.ValidValueMembershipProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues.ValidValueProperties; import org.odpi.openmetadata.fvt.utilities.FVTResults; import org.odpi.openmetadata.fvt.utilities.auditlog.FVTAuditLogDestination; import org.odpi.openmetadata.fvt.utilities.exceptions.FVTUnexpectedCondition; @@ -182,8 +182,8 @@ private String createValidValueSet(ValidValueManagement client, throw new FVTUnexpectedCondition(testCaseName, activityName + "(no GUID for Create)"); } - ValidValueElement retrievedElement = client.getValidValueByGUID(userId, validValuesSetGUID); - ValidValueProperties retrievedSet = retrievedElement.getValidValueProperties(); + ValidValueElement retrievedElement = client.getValidValueByGUID(userId, validValuesSetGUID); + ValidValueProperties retrievedSet = retrievedElement.getValidValueProperties(); if (retrievedSet == null) { diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/data-manager-fvt/build.gradle b/open-metadata-test/open-metadata-fvt/access-services-fvt/data-manager-fvt/build.gradle index 4e181491a4a..40f63ed16b5 100644 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/data-manager-fvt/build.gradle +++ b/open-metadata-test/open-metadata-fvt/access-services-fvt/data-manager-fvt/build.gradle @@ -16,6 +16,7 @@ dependencies { implementation project(':open-metadata-implementation:access-services:data-manager:data-manager-api') implementation project(':open-metadata-implementation:access-services:data-manager:data-manager-client') implementation project(':open-metadata-implementation:frameworks:audit-log-framework') + implementation project(':open-metadata-implementation:frameworks:open-metadata-framework') implementation project(':open-metadata-implementation:frameworks:open-connector-framework') implementation project(':open-metadata-implementation:repository-services:repository-services-apis') implementation project(':open-metadata-implementation:admin-services:admin-services-api') diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/data-manager-fvt/src/main/java/org/odpi/openmetadata/accessservices/datamanager/fvt/connections/CreateConnectionTest.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/data-manager-fvt/src/main/java/org/odpi/openmetadata/accessservices/datamanager/fvt/connections/CreateConnectionTest.java index ea93c2d6f0d..44fa2f5b51d 100644 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/data-manager-fvt/src/main/java/org/odpi/openmetadata/accessservices/datamanager/fvt/connections/CreateConnectionTest.java +++ b/open-metadata-test/open-metadata-fvt/access-services-fvt/data-manager-fvt/src/main/java/org/odpi/openmetadata/accessservices/datamanager/fvt/connections/CreateConnectionTest.java @@ -6,17 +6,17 @@ import org.odpi.openmetadata.accessservices.datamanager.client.ConnectionManagerClient; import org.odpi.openmetadata.accessservices.datamanager.client.MetadataSourceClient; import org.odpi.openmetadata.accessservices.datamanager.client.rest.DataManagerRESTClient; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.ConnectionElement; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.ConnectorTypeElement; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.EndpointElement; -import org.odpi.openmetadata.accessservices.datamanager.properties.DatabaseManagerProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.ConnectionProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.ConnectorTypeProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.EndpointProperties; import org.odpi.openmetadata.adminservices.configuration.registration.AccessServiceDescription; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ConnectionElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ConnectorTypeElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.EndpointElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.ConnectionProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.ConnectorTypeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.EndpointProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities.DatabaseManagerProperties; import org.odpi.openmetadata.fvt.utilities.FVTResults; import org.odpi.openmetadata.fvt.utilities.auditlog.FVTAuditLogDestination; import org.odpi.openmetadata.fvt.utilities.exceptions.FVTUnexpectedCondition; @@ -196,8 +196,8 @@ private String getDatabaseManager(String serverName, DatabaseManagerProperties properties = new DatabaseManagerProperties(); properties.setQualifiedName(databaseManagerName); - properties.setDisplayName(databaseManagerDisplayName); - properties.setDescription(databaseManagerDescription); + properties.setResourceName(databaseManagerDisplayName); + properties.setResourceDescription(databaseManagerDescription); properties.setDeployedImplementationType(databaseManagerTypeDescription); properties.setVersion(databaseManagerVersion); @@ -520,11 +520,11 @@ private void checkEndpointOK(ConnectionManagerClient client, { throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad qualifiedName from Retrieve) =>>" + retrievedEndpoint); } - if (! endpointDisplayName.equals(retrievedEndpoint.getDisplayName())) + if (! endpointDisplayName.equals(retrievedEndpoint.getName())) { throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad displayName from Retrieve) =>>" + retrievedEndpoint); } - if (! endpointDescription.equals(retrievedEndpoint.getDescription())) + if (! endpointDescription.equals(retrievedEndpoint.getResourceDescription())) { throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad description from Retrieve) =>>" + retrievedEndpoint); } @@ -553,11 +553,11 @@ else if (endpointList.size() != 1) { throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad qualifiedName from RetrieveByName) =>>" + retrievedEndpoint); } - if (! endpointDisplayName.equals(retrievedEndpoint.getDisplayName())) + if (! endpointDisplayName.equals(retrievedEndpoint.getName())) { throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad displayName from RetrieveByName) =>>" + retrievedEndpoint); } - if (! endpointDescription.equals(retrievedEndpoint.getDescription())) + if (! endpointDescription.equals(retrievedEndpoint.getResourceDescription())) { throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad description from RetrieveByName) =>>" + retrievedEndpoint); } @@ -637,8 +637,8 @@ private String createEndpoint(ConnectionManagerClient client, EndpointProperties properties = new EndpointProperties(); properties.setQualifiedName(endpointName); - properties.setDisplayName(endpointDisplayName); - properties.setDescription(endpointDescription); + properties.setName(endpointDisplayName); + properties.setResourceDescription(endpointDescription); String endpointGUID = client.createEndpoint(userId, databaseManagerGUID, databaseManagerName, properties); @@ -688,7 +688,7 @@ private void checkConnectorTypeOK(ConnectionManagerClient client, throw new FVTUnexpectedCondition(testCaseName, activityName + "(no ConnectorTypeElement from Retrieve)"); } - ConnectorTypeProperties retrievedConnectorType = retrievedElement.getConnectorTypeProperties(); + ConnectorTypeProperties retrievedConnectorType = retrievedElement.getConnectorTypeProperties(); if (retrievedConnectorType == null) { diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/data-manager-fvt/src/main/java/org/odpi/openmetadata/accessservices/datamanager/fvt/databases/CreateDatabaseTest.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/data-manager-fvt/src/main/java/org/odpi/openmetadata/accessservices/datamanager/fvt/databases/CreateDatabaseTest.java index c1464f1dbd7..462c680bb10 100644 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/data-manager-fvt/src/main/java/org/odpi/openmetadata/accessservices/datamanager/fvt/databases/CreateDatabaseTest.java +++ b/open-metadata-test/open-metadata-fvt/access-services-fvt/data-manager-fvt/src/main/java/org/odpi/openmetadata/accessservices/datamanager/fvt/databases/CreateDatabaseTest.java @@ -6,11 +6,14 @@ import org.odpi.openmetadata.accessservices.datamanager.client.DatabaseManagerClient; import org.odpi.openmetadata.accessservices.datamanager.client.MetadataSourceClient; import org.odpi.openmetadata.accessservices.datamanager.client.rest.DataManagerRESTClient; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.*; -import org.odpi.openmetadata.accessservices.datamanager.properties.*; +import org.odpi.openmetadata.accessservices.datamanager.properties.TemplateProperties; import org.odpi.openmetadata.adminservices.configuration.registration.AccessServiceDescription; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.databases.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.databases.*; +import org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities.*; import org.odpi.openmetadata.fvt.utilities.FVTResults; import org.odpi.openmetadata.fvt.utilities.auditlog.FVTAuditLogDestination; import org.odpi.openmetadata.fvt.utilities.exceptions.FVTUnexpectedCondition; @@ -216,7 +219,7 @@ private static void runIt(String serverPlatformRootURL, */ activityName = "updateNonExistentColumn"; - String databaseColumnTwoGUID = "Blah Blah"; + String databaseColumnTwoGUID = "Blah Blah"; DatabaseColumnProperties databaseColumnTwoProperties = new DatabaseColumnProperties(); databaseColumnTwoProperties.setQualifiedName(databaseColumnTwoName); databaseColumnTwoProperties.setDisplayName(databaseColumnDisplayName); // Note wrong value @@ -273,6 +276,7 @@ private static void runIt(String serverPlatformRootURL, if (! databaseColumnTwoType.equals(afterElement.getDatabaseColumnProperties().getDataType())) { + System.out.println("AfterElement: " + afterElement); throw new FVTUnexpectedCondition(testCaseName, activityName + "(data type should be " + databaseColumnTwoType + " rather than " + afterElement.getDatabaseColumnProperties().getDataType() + ")"); } @@ -415,8 +419,8 @@ private String getDatabaseManager(String serverName, DatabaseManagerProperties properties = new DatabaseManagerProperties(); properties.setQualifiedName(databaseManagerName); - properties.setDisplayName(databaseManagerDisplayName); - properties.setDescription(databaseManagerDescription); + properties.setResourceName(databaseManagerDisplayName); + properties.setResourceDescription(databaseManagerDescription); properties.setDeployedImplementationType(databaseManagerTypeDescription); properties.setVersion(databaseManagerVersion); @@ -537,7 +541,7 @@ private void checkDatabaseOK(DatabaseManagerClient client, { throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad displayName from Retrieve)"); } - if (! description.equals(retrievedDatabase.getDescription())) + if (! description.equals(retrievedDatabase.getResourceDescription())) { throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad description from Retrieve)"); } @@ -578,7 +582,7 @@ else if (databaseList.size() != 1) { throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad displayName from RetrieveByName)"); } - if (! description.equals(retrievedDatabase.getDescription())) + if (! description.equals(retrievedDatabase.getResourceDescription())) { throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad description from RetrieveByName)"); } @@ -618,7 +622,6 @@ else if (databaseList.size() != 1) * @return GUID of database * @throws FVTUnexpectedCondition the test case failed */ - @SuppressWarnings(value = "deprecation") private String getDatabase(DatabaseManagerClient client, String databaseManagerGUID, String userId) throws FVTUnexpectedCondition @@ -631,7 +634,7 @@ private String getDatabase(DatabaseManagerClient client, properties.setQualifiedName(databaseName); properties.setName(databaseDisplayName); // check deprecated method still works - properties.setDescription(databaseDescription); + properties.setResourceDescription(databaseDescription); properties.setDeployedImplementationType(databaseType); properties.setDatabaseVersion(databaseVersion); @@ -831,7 +834,7 @@ private void checkDatabaseSchemaOK(DatabaseManagerClient client, { throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad displayName from Retrieve)"); } - if (! databaseSchemaDescription.equals(retrievedSchema.getDescription())) + if (! databaseSchemaDescription.equals(retrievedSchema.getResourceDescription())) { throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad description from Retrieve)"); } @@ -865,7 +868,7 @@ else if (databaseSchemaList.size() != 1) { throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad displayName from RetrieveByName)"); } - if (! databaseSchemaDescription.equals(retrievedSchema.getDescription())) + if (! databaseSchemaDescription.equals(retrievedSchema.getResourceDescription())) { throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad description from RetrieveByName)"); } @@ -921,7 +924,7 @@ private String getDatabaseSchema(DatabaseManagerClient client, properties.setQualifiedName(databaseSchemaName); properties.setName(databaseSchemaDisplayName); - properties.setDescription(databaseSchemaDescription); + properties.setResourceDescription(databaseSchemaDescription); String databaseSchemaGUID = client.createDatabaseSchema(userId, databaseManagerGUID, databaseManagerName, databaseGUID, properties); diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/data-manager-fvt/src/main/java/org/odpi/openmetadata/accessservices/datamanager/fvt/errorhandling/InvalidParameterTest.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/data-manager-fvt/src/main/java/org/odpi/openmetadata/accessservices/datamanager/fvt/errorhandling/InvalidParameterTest.java index 8d963267f83..2199001b849 100644 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/data-manager-fvt/src/main/java/org/odpi/openmetadata/accessservices/datamanager/fvt/errorhandling/InvalidParameterTest.java +++ b/open-metadata-test/open-metadata-fvt/access-services-fvt/data-manager-fvt/src/main/java/org/odpi/openmetadata/accessservices/datamanager/fvt/errorhandling/InvalidParameterTest.java @@ -8,13 +8,11 @@ import org.odpi.openmetadata.accessservices.datamanager.client.FilesAndFoldersClient; import org.odpi.openmetadata.accessservices.datamanager.client.MetadataSourceClient; import org.odpi.openmetadata.accessservices.datamanager.client.rest.DataManagerRESTClient; -import org.odpi.openmetadata.accessservices.datamanager.properties.DatabaseManagerProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.DatabaseProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.FileManagerProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.FileSystemProperties; import org.odpi.openmetadata.adminservices.configuration.registration.AccessServiceDescription; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.databases.DatabaseProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities.*; import org.odpi.openmetadata.fvt.utilities.FVTResults; import org.odpi.openmetadata.fvt.utilities.auditlog.FVTAuditLogDestination; import org.odpi.openmetadata.fvt.utilities.exceptions.FVTUnexpectedCondition; diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/data-manager-fvt/src/main/java/org/odpi/openmetadata/accessservices/datamanager/fvt/events/CreateEventsTest.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/data-manager-fvt/src/main/java/org/odpi/openmetadata/accessservices/datamanager/fvt/events/CreateEventsTest.java index 6789fcaefd9..70c0a770e0d 100644 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/data-manager-fvt/src/main/java/org/odpi/openmetadata/accessservices/datamanager/fvt/events/CreateEventsTest.java +++ b/open-metadata-test/open-metadata-fvt/access-services-fvt/data-manager-fvt/src/main/java/org/odpi/openmetadata/accessservices/datamanager/fvt/events/CreateEventsTest.java @@ -6,13 +6,13 @@ import org.odpi.openmetadata.accessservices.datamanager.client.EventBrokerClient; import org.odpi.openmetadata.accessservices.datamanager.client.MetadataSourceClient; import org.odpi.openmetadata.accessservices.datamanager.client.rest.DataManagerRESTClient; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.SchemaAttributeElement; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.TopicElement; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.EventTypeElement; -import org.odpi.openmetadata.accessservices.datamanager.properties.EventBrokerProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.SchemaAttributeProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.TopicProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.EventTypeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.EventTypeElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.SchemaAttributeElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.TopicElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.topics.TopicProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.SchemaAttributeProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.softwarecapabilities.EventBrokerProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.schema.events.EventTypeProperties; import org.odpi.openmetadata.adminservices.configuration.registration.AccessServiceDescription; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; @@ -259,8 +259,8 @@ private String getEventBroker(String serverName, EventBrokerProperties properties = new EventBrokerProperties(); properties.setQualifiedName(eventBrokerName); - properties.setDisplayName(eventBrokerDisplayName); - properties.setDescription(eventBrokerDescription); + properties.setResourceName(eventBrokerDisplayName); + properties.setResourceDescription(eventBrokerDescription); properties.setDeployedImplementationType(eventBrokerTypeDescription); properties.setVersion(eventBrokerVersion); @@ -375,7 +375,7 @@ private void checkTopicOK(EventBrokerClient client, { throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad displayName from Retrieve)"); } - if (! topicDescription.equals(retrievedTopic.getDescription())) + if (! topicDescription.equals(retrievedTopic.getResourceDescription())) { throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad description from Retrieve)"); } @@ -412,7 +412,7 @@ else if (topicList.size() != 1) { throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad displayName from RetrieveByName)"); } - if (! topicDescription.equals(retrievedTopic.getDescription())) + if (! topicDescription.equals(retrievedTopic.getResourceDescription())) { throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad description from RetrieveByName)"); } @@ -460,7 +460,7 @@ private String getTopic(EventBrokerClient client, properties.setQualifiedName(topicName); properties.setName(topicDisplayName); - properties.setDescription(topicDescription); + properties.setResourceDescription(topicDescription); properties.setTopicType(topicType); String topicGUID = client.createTopic(userId, eventBrokerGUID, eventBrokerName, true, properties); @@ -710,7 +710,7 @@ private String getEventType(EventBrokerClient client, /** - * Check a top-level scheam attribute is gone. + * Check a top-level schema attribute is gone. * * @param client interface to Data Manager OMAS * @param schemaAttributeGUID unique id of the top-level attribute to test @@ -801,7 +801,7 @@ private void checkSchemaAttributeOK(EventBrokerClient client, throw new FVTUnexpectedCondition(testCaseName, activityName + "(no SchemaAttributeElement from Retrieve)"); } - SchemaAttributeProperties retrievedTable = retrievedElement.getProperties(); + SchemaAttributeProperties retrievedTable = retrievedElement.getSchemaAttributeProperties(); if (retrievedTable == null) { @@ -839,7 +839,7 @@ else if (schemaAttributeList.size() != 1) } retrievedElement = schemaAttributeList.get(0); - retrievedTable = retrievedElement.getProperties(); + retrievedTable = retrievedElement.getSchemaAttributeProperties(); if (! schemaAttributeName.equals(retrievedTable.getQualifiedName())) { @@ -1023,7 +1023,7 @@ private void checkNestedSchemaAttributeOK(EventBrokerClient client, throw new FVTUnexpectedCondition(testCaseName, activityName + "(no SchemaAttributeElement from Retrieve)"); } - SchemaAttributeProperties retrievedAttribute = retrievedElement.getProperties(); + SchemaAttributeProperties retrievedAttribute = retrievedElement.getSchemaAttributeProperties(); if (retrievedAttribute == null) { @@ -1061,7 +1061,7 @@ else if (schemaAttributeList.size() != 1) } retrievedElement = schemaAttributeList.get(0); - retrievedAttribute = retrievedElement.getProperties(); + retrievedAttribute = retrievedElement.getSchemaAttributeProperties(); if (! nestedSchemaAttributeName.equals(retrievedAttribute.getQualifiedName())) { @@ -1094,7 +1094,7 @@ else if (schemaAttributeList.size() != 1) } retrievedElement = schemaAttributeList.get(0); - retrievedAttribute = retrievedElement.getProperties(); + retrievedAttribute = retrievedElement.getSchemaAttributeProperties(); if (! nestedSchemaAttributeName.equals(retrievedAttribute.getQualifiedName())) { diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/data-manager-fvt/src/main/java/org/odpi/openmetadata/accessservices/datamanager/fvt/validvalues/CreateValidValuesSetTest.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/data-manager-fvt/src/main/java/org/odpi/openmetadata/accessservices/datamanager/fvt/validvalues/CreateValidValuesSetTest.java index e32c7542fd9..bdf0204a565 100644 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/data-manager-fvt/src/main/java/org/odpi/openmetadata/accessservices/datamanager/fvt/validvalues/CreateValidValuesSetTest.java +++ b/open-metadata-test/open-metadata-fvt/access-services-fvt/data-manager-fvt/src/main/java/org/odpi/openmetadata/accessservices/datamanager/fvt/validvalues/CreateValidValuesSetTest.java @@ -6,12 +6,12 @@ import org.odpi.openmetadata.accessservices.datamanager.client.ValidValueManagement; import org.odpi.openmetadata.accessservices.datamanager.client.rest.DataManagerRESTClient; -import org.odpi.openmetadata.accessservices.datamanager.metadataelements.ValidValueElement; -import org.odpi.openmetadata.accessservices.datamanager.properties.ValidValueMembershipProperties; -import org.odpi.openmetadata.accessservices.datamanager.properties.ValidValueProperties; import org.odpi.openmetadata.adminservices.configuration.registration.AccessServiceDescription; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ValidValueElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues.ValidValueMembershipProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues.ValidValueProperties; import org.odpi.openmetadata.fvt.utilities.FVTResults; import org.odpi.openmetadata.fvt.utilities.auditlog.FVTAuditLogDestination; import org.odpi.openmetadata.fvt.utilities.exceptions.FVTUnexpectedCondition; @@ -182,8 +182,8 @@ private String createValidValueSet(ValidValueManagement client, throw new FVTUnexpectedCondition(testCaseName, activityName + "(no GUID for Create)"); } - ValidValueElement retrievedElement = client.getValidValueByGUID(userId, validValuesSetGUID); - ValidValueProperties retrievedSet = retrievedElement.getValidValueProperties(); + ValidValueElement retrievedElement = client.getValidValueByGUID(userId, validValuesSetGUID); + ValidValueProperties retrievedSet = retrievedElement.getValidValueProperties(); if (retrievedSet == null) { diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/digital-architecture-fvt/build.gradle b/open-metadata-test/open-metadata-fvt/access-services-fvt/digital-architecture-fvt/build.gradle index 17c021ba262..faf5a5001bb 100644 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/digital-architecture-fvt/build.gradle +++ b/open-metadata-test/open-metadata-fvt/access-services-fvt/digital-architecture-fvt/build.gradle @@ -16,6 +16,7 @@ dependencies { implementation project(':open-metadata-implementation:access-services:digital-architecture:digital-architecture-api') implementation project(':open-metadata-implementation:access-services:digital-architecture:digital-architecture-client') implementation project(':open-metadata-implementation:frameworks:audit-log-framework') + implementation project(':open-metadata-implementation:frameworks:open-metadata-framework') implementation project(':open-metadata-implementation:frameworks:open-connector-framework') implementation project(':open-metadata-implementation:repository-services:repository-services-apis') implementation project(':open-metadata-implementation:admin-services:admin-services-api') diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/digital-architecture-fvt/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/fvt/connections/CreateConnectionTest.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/digital-architecture-fvt/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/fvt/connections/CreateConnectionTest.java index 385a7144aef..0223cc693af 100644 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/digital-architecture-fvt/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/fvt/connections/CreateConnectionTest.java +++ b/open-metadata-test/open-metadata-fvt/access-services-fvt/digital-architecture-fvt/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/fvt/connections/CreateConnectionTest.java @@ -5,16 +5,11 @@ import org.odpi.openmetadata.accessservices.digitalarchitecture.client.ConnectionManager; import org.odpi.openmetadata.accessservices.digitalarchitecture.client.rest.DigitalArchitectureRESTClient; -import org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements.ConnectionElement; -import org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements.ConnectorTypeElement; -import org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements.EndpointElement; -import org.odpi.openmetadata.accessservices.digitalarchitecture.properties.ConnectionProperties; -import org.odpi.openmetadata.accessservices.digitalarchitecture.properties.ConnectorTypeProperties; -import org.odpi.openmetadata.accessservices.digitalarchitecture.properties.EndpointProperties; import org.odpi.openmetadata.adminservices.configuration.registration.AccessServiceDescription; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; +import org.odpi.openmetadata.frameworks.openmetadata.properties.connections.*; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*; import org.odpi.openmetadata.fvt.utilities.FVTResults; import org.odpi.openmetadata.fvt.utilities.auditlog.FVTAuditLogDestination; import org.odpi.openmetadata.fvt.utilities.exceptions.FVTUnexpectedCondition; @@ -141,7 +136,7 @@ private static void runIt(String serverPlatformRootURL, */ activityName = "updateNonExistentConnectorType"; - String connectorTypeTwoGUID = "Blah Blah"; + String connectorTypeTwoGUID = "Blah Blah"; ConnectorTypeProperties connectorTypeProperties = new ConnectorTypeProperties(); connectorTypeProperties.setQualifiedName(connectorTypeTwoName); connectorTypeProperties.setDisplayName(connectorTypeDisplayName); // Note wrong value @@ -521,7 +516,7 @@ private void checkEndpointOK(ConnectionManager client, { throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad qualifiedName from Retrieve) =>>" + retrievedEndpoint); } - if (! endpointTechnicalName.equals(retrievedEndpoint.getResourceName())) + if (! endpointTechnicalName.equals(retrievedEndpoint.getName())) { throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad technicalName from Retrieve) =>>" + retrievedEndpoint); } @@ -555,7 +550,7 @@ else if (endpointList.size() != 1) { throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad qualifiedName from RetrieveByName) =>>" + retrievedEndpoint); } - if (! endpointTechnicalName.equals(retrievedEndpoint.getResourceName())) + if (! endpointTechnicalName.equals(retrievedEndpoint.getName())) { throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad displayName from RetrieveByName) =>>" + retrievedEndpoint); } @@ -636,7 +631,7 @@ private String createEndpoint(ConnectionManager client, EndpointProperties properties = new EndpointProperties(); properties.setQualifiedName(endpointName); - properties.setResourceName(endpointTechnicalName); + properties.setName(endpointTechnicalName); properties.setResourceDescription(endpointTechnicalDescription); String endpointGUID = client.createEndpoint(userId, properties); diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/digital-architecture-fvt/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/fvt/locations/CreateLocationsTest.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/digital-architecture-fvt/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/fvt/locations/CreateLocationsTest.java index 56fefbf74fc..1f578cd80a0 100644 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/digital-architecture-fvt/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/fvt/locations/CreateLocationsTest.java +++ b/open-metadata-test/open-metadata-fvt/access-services-fvt/digital-architecture-fvt/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/fvt/locations/CreateLocationsTest.java @@ -6,11 +6,11 @@ import org.odpi.openmetadata.accessservices.digitalarchitecture.client.LocationManager; import org.odpi.openmetadata.accessservices.digitalarchitecture.client.rest.DigitalArchitectureRESTClient; -import org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements.LocationElement; -import org.odpi.openmetadata.accessservices.digitalarchitecture.properties.LocationProperties; import org.odpi.openmetadata.adminservices.configuration.registration.AccessServiceDescription; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.LocationElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.locations.LocationProperties; import org.odpi.openmetadata.fvt.utilities.FVTResults; import org.odpi.openmetadata.fvt.utilities.auditlog.FVTAuditLogDestination; import org.odpi.openmetadata.fvt.utilities.exceptions.FVTUnexpectedCondition; @@ -176,7 +176,7 @@ private String createSite(LocationManager client, client.setLocationAsFixedPhysical(userId, siteGUID, null, null, null, "GMT"); LocationElement retrievedElement = client.getLocationByGUID(userId, siteGUID); - LocationProperties retrievedSite = retrievedElement.getLocationProperties(); + LocationProperties retrievedSite = retrievedElement.getLocationProperties(); if (retrievedSite == null) { diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/digital-architecture-fvt/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/fvt/validvalues/CreateValidValuesSetTest.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/digital-architecture-fvt/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/fvt/validvalues/CreateValidValuesSetTest.java index cf39e281bf8..401ce7d8b7e 100644 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/digital-architecture-fvt/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/fvt/validvalues/CreateValidValuesSetTest.java +++ b/open-metadata-test/open-metadata-fvt/access-services-fvt/digital-architecture-fvt/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/fvt/validvalues/CreateValidValuesSetTest.java @@ -5,12 +5,12 @@ import org.odpi.openmetadata.accessservices.digitalarchitecture.client.ReferenceDataManager; -import org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements.ValidValueElement; import org.odpi.openmetadata.accessservices.digitalarchitecture.client.rest.DigitalArchitectureRESTClient; -import org.odpi.openmetadata.accessservices.digitalarchitecture.properties.ValidValueProperties; import org.odpi.openmetadata.adminservices.configuration.registration.AccessServiceDescription; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ValidValueElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.validvalues.ValidValueProperties; import org.odpi.openmetadata.fvt.utilities.FVTResults; import org.odpi.openmetadata.fvt.utilities.auditlog.FVTAuditLogDestination; import org.odpi.openmetadata.fvt.utilities.exceptions.FVTUnexpectedCondition; @@ -180,8 +180,8 @@ private String createValidValueSet(ReferenceDataManager client, throw new FVTUnexpectedCondition(testCaseName, activityName + "(no GUID for Create)"); } - ValidValueElement retrievedElement = client.getValidValueByGUID(userId, validValuesSetGUID); - ValidValueProperties retrievedSet = retrievedElement.getValidValueProperties(); + ValidValueElement retrievedElement = client.getValidValueByGUID(userId, validValuesSetGUID); + ValidValueProperties retrievedSet = retrievedElement.getValidValueProperties(); if (retrievedSet == null) { diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/governance-program-fvt/build.gradle b/open-metadata-test/open-metadata-fvt/access-services-fvt/governance-program-fvt/build.gradle index 873765930f2..f601682b102 100644 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/governance-program-fvt/build.gradle +++ b/open-metadata-test/open-metadata-fvt/access-services-fvt/governance-program-fvt/build.gradle @@ -16,6 +16,7 @@ dependencies { implementation project(':open-metadata-implementation:access-services:governance-program:governance-program-api') implementation project(':open-metadata-implementation:access-services:governance-program:governance-program-client') implementation project(':open-metadata-implementation:frameworks:audit-log-framework') + implementation project(':open-metadata-implementation:frameworks:open-metadata-framework') implementation project(':open-metadata-implementation:frameworks:open-connector-framework') implementation project(':open-metadata-implementation:repository-services:repository-services-apis') implementation project(':open-metadata-implementation:admin-services:admin-services-api') diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/governance-program-fvt/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/fvt/definitions/CreateDefinitionTest.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/governance-program-fvt/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/fvt/definitions/CreateDefinitionTest.java index db54d77c4d5..bcecb46e748 100644 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/governance-program-fvt/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/fvt/definitions/CreateDefinitionTest.java +++ b/open-metadata-test/open-metadata-fvt/access-services-fvt/governance-program-fvt/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/fvt/definitions/CreateDefinitionTest.java @@ -5,15 +5,15 @@ import org.odpi.openmetadata.accessservices.governanceprogram.client.GovernanceDomainManager; import org.odpi.openmetadata.accessservices.governanceprogram.client.rest.GovernanceProgramRESTClient; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceDomainElement; -import org.odpi.openmetadata.accessservices.governanceprogram.metadataelements.GovernanceDomainSetElement; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceDomainProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceDomainSetProperties; import org.odpi.openmetadata.adminservices.configuration.registration.AccessServiceDescription; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.GovernanceDomainElement; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.GovernanceDomainSetElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.GovernanceDomainProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.GovernanceDomainSetProperties; import org.odpi.openmetadata.fvt.utilities.FVTResults; import org.odpi.openmetadata.fvt.utilities.auditlog.FVTAuditLogDestination; import org.odpi.openmetadata.fvt.utilities.exceptions.FVTUnexpectedCondition; diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/governance-program-fvt/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/fvt/errorhandling/CreateCertificationTypeInvalidParameterTest.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/governance-program-fvt/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/fvt/errorhandling/CreateCertificationTypeInvalidParameterTest.java index 32352381fed..37c271fee99 100644 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/governance-program-fvt/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/fvt/errorhandling/CreateCertificationTypeInvalidParameterTest.java +++ b/open-metadata-test/open-metadata-fvt/access-services-fvt/governance-program-fvt/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/fvt/errorhandling/CreateCertificationTypeInvalidParameterTest.java @@ -3,9 +3,9 @@ package org.odpi.openmetadata.accessservices.governanceprogram.fvt.errorhandling; import org.odpi.openmetadata.accessservices.governanceprogram.client.CertificationManager; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.CertificationTypeProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceDefinitionStatus; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; +import org.odpi.openmetadata.frameworks.openmetadata.enums.GovernanceDefinitionStatus; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.CertificationTypeProperties; import org.odpi.openmetadata.fvt.utilities.exceptions.FVTUnexpectedCondition; /** diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/governance-program-fvt/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/fvt/errorhandling/CreateExternalReferenceInvalidParameterTest.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/governance-program-fvt/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/fvt/errorhandling/CreateExternalReferenceInvalidParameterTest.java index 2507f2b0e71..218360606c2 100644 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/governance-program-fvt/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/fvt/errorhandling/CreateExternalReferenceInvalidParameterTest.java +++ b/open-metadata-test/open-metadata-fvt/access-services-fvt/governance-program-fvt/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/fvt/errorhandling/CreateExternalReferenceInvalidParameterTest.java @@ -3,8 +3,8 @@ package org.odpi.openmetadata.accessservices.governanceprogram.fvt.errorhandling; import org.odpi.openmetadata.accessservices.governanceprogram.client.ExternalReferenceManager; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.ExternalReferenceProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; +import org.odpi.openmetadata.frameworks.openmetadata.properties.externalreferences.ExternalReferenceProperties; import org.odpi.openmetadata.fvt.utilities.exceptions.FVTUnexpectedCondition; /** diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/governance-program-fvt/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/fvt/errorhandling/CreateGovernanceDefinitionInvalidParameterTest.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/governance-program-fvt/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/fvt/errorhandling/CreateGovernanceDefinitionInvalidParameterTest.java index 546fcc0885e..62776493582 100644 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/governance-program-fvt/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/fvt/errorhandling/CreateGovernanceDefinitionInvalidParameterTest.java +++ b/open-metadata-test/open-metadata-fvt/access-services-fvt/governance-program-fvt/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/fvt/errorhandling/CreateGovernanceDefinitionInvalidParameterTest.java @@ -3,9 +3,9 @@ package org.odpi.openmetadata.accessservices.governanceprogram.fvt.errorhandling; import org.odpi.openmetadata.accessservices.governanceprogram.client.GovernanceDefinitionManager; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceDefinitionProperties; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceDefinitionStatus; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; +import org.odpi.openmetadata.frameworks.openmetadata.enums.GovernanceDefinitionStatus; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.GovernanceDefinitionProperties; import org.odpi.openmetadata.fvt.utilities.exceptions.FVTUnexpectedCondition; /** diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/governance-program-fvt/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/fvt/errorhandling/CreateGovernanceDomainInvalidParameterTest.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/governance-program-fvt/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/fvt/errorhandling/CreateGovernanceDomainInvalidParameterTest.java index 3532120d511..4d9751b2c85 100644 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/governance-program-fvt/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/fvt/errorhandling/CreateGovernanceDomainInvalidParameterTest.java +++ b/open-metadata-test/open-metadata-fvt/access-services-fvt/governance-program-fvt/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/fvt/errorhandling/CreateGovernanceDomainInvalidParameterTest.java @@ -3,8 +3,8 @@ package org.odpi.openmetadata.accessservices.governanceprogram.fvt.errorhandling; import org.odpi.openmetadata.accessservices.governanceprogram.client.GovernanceDomainManager; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceDomainProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.GovernanceDomainProperties; import org.odpi.openmetadata.fvt.utilities.exceptions.FVTUnexpectedCondition; /** diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/governance-program-fvt/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/fvt/errorhandling/CreateGovernanceMetricInvalidParameterTest.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/governance-program-fvt/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/fvt/errorhandling/CreateGovernanceMetricInvalidParameterTest.java index 9ea9c1a3b4a..24f5848eb46 100644 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/governance-program-fvt/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/fvt/errorhandling/CreateGovernanceMetricInvalidParameterTest.java +++ b/open-metadata-test/open-metadata-fvt/access-services-fvt/governance-program-fvt/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/fvt/errorhandling/CreateGovernanceMetricInvalidParameterTest.java @@ -3,8 +3,8 @@ package org.odpi.openmetadata.accessservices.governanceprogram.fvt.errorhandling; import org.odpi.openmetadata.accessservices.governanceprogram.client.GovernanceMetricsManager; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceMetricProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.GovernanceMetricProperties; import org.odpi.openmetadata.fvt.utilities.exceptions.FVTUnexpectedCondition; /** diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/governance-program-fvt/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/fvt/errorhandling/CreateLicenseTypeInvalidParameterTest.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/governance-program-fvt/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/fvt/errorhandling/CreateLicenseTypeInvalidParameterTest.java index 836b8486487..76c9b6ec33d 100644 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/governance-program-fvt/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/fvt/errorhandling/CreateLicenseTypeInvalidParameterTest.java +++ b/open-metadata-test/open-metadata-fvt/access-services-fvt/governance-program-fvt/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/fvt/errorhandling/CreateLicenseTypeInvalidParameterTest.java @@ -3,9 +3,9 @@ package org.odpi.openmetadata.accessservices.governanceprogram.fvt.errorhandling; import org.odpi.openmetadata.accessservices.governanceprogram.client.RightsManager; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceDefinitionStatus; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.LicenseTypeProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; +import org.odpi.openmetadata.frameworks.openmetadata.enums.GovernanceDefinitionStatus; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.LicenseTypeProperties; import org.odpi.openmetadata.fvt.utilities.exceptions.FVTUnexpectedCondition; /** diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/governance-program-fvt/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/fvt/errorhandling/CreateRoleInvalidParameterTest.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/governance-program-fvt/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/fvt/errorhandling/CreateRoleInvalidParameterTest.java index b53f3aa9ecc..59d6cc184c5 100644 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/governance-program-fvt/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/fvt/errorhandling/CreateRoleInvalidParameterTest.java +++ b/open-metadata-test/open-metadata-fvt/access-services-fvt/governance-program-fvt/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/fvt/errorhandling/CreateRoleInvalidParameterTest.java @@ -3,8 +3,8 @@ package org.odpi.openmetadata.accessservices.governanceprogram.fvt.errorhandling; import org.odpi.openmetadata.accessservices.governanceprogram.client.GovernanceRoleManager; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceRoleProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.GovernanceRoleProperties; import org.odpi.openmetadata.fvt.utilities.exceptions.FVTUnexpectedCondition; /** diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/governance-program-fvt/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/fvt/errorhandling/CreateSubjectAreaInvalidParameterTest.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/governance-program-fvt/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/fvt/errorhandling/CreateSubjectAreaInvalidParameterTest.java index b31e5b412ad..37eadcb2fb2 100644 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/governance-program-fvt/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/fvt/errorhandling/CreateSubjectAreaInvalidParameterTest.java +++ b/open-metadata-test/open-metadata-fvt/access-services-fvt/governance-program-fvt/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/fvt/errorhandling/CreateSubjectAreaInvalidParameterTest.java @@ -3,8 +3,8 @@ package org.odpi.openmetadata.accessservices.governanceprogram.fvt.errorhandling; import org.odpi.openmetadata.accessservices.governanceprogram.client.SubjectAreaManager; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.SubjectAreaProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.SubjectAreaProperties; import org.odpi.openmetadata.fvt.utilities.exceptions.FVTUnexpectedCondition; /** @@ -81,7 +81,7 @@ private void testCreateSubjectAreaNoProperties(SubjectAreaManager client, try { - client.createSubjectArea(userId, null); + client.createSubjectArea(userId, (SubjectAreaProperties) null); throw new FVTUnexpectedCondition(testCaseName, activityName); } catch (InvalidParameterException expectedException) diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/governance-program-fvt/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/fvt/errorhandling/CreateZoneInvalidParameterTest.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/governance-program-fvt/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/fvt/errorhandling/CreateZoneInvalidParameterTest.java index c994fcccbbe..087bb3562f7 100644 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/governance-program-fvt/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/fvt/errorhandling/CreateZoneInvalidParameterTest.java +++ b/open-metadata-test/open-metadata-fvt/access-services-fvt/governance-program-fvt/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/fvt/errorhandling/CreateZoneInvalidParameterTest.java @@ -3,8 +3,8 @@ package org.odpi.openmetadata.accessservices.governanceprogram.fvt.errorhandling; import org.odpi.openmetadata.accessservices.governanceprogram.client.GovernanceZoneManager; -import org.odpi.openmetadata.accessservices.governanceprogram.properties.GovernanceZoneProperties; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; +import org.odpi.openmetadata.frameworks.openmetadata.properties.governance.GovernanceZoneProperties; import org.odpi.openmetadata.fvt.utilities.exceptions.FVTUnexpectedCondition; /** diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/governance-server-fvt/build.gradle b/open-metadata-test/open-metadata-fvt/access-services-fvt/governance-server-fvt/build.gradle index 18c29068c19..3c78af7719f 100644 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/governance-server-fvt/build.gradle +++ b/open-metadata-test/open-metadata-fvt/access-services-fvt/governance-server-fvt/build.gradle @@ -16,6 +16,7 @@ dependencies { implementation project(':open-metadata-implementation:access-services:governance-server:governance-server-api') implementation project(':open-metadata-implementation:access-services:governance-server:governance-server-client') implementation project(':open-metadata-implementation:frameworks:audit-log-framework') + implementation project(':open-metadata-implementation:frameworks:open-metadata-framework') implementation project(':open-metadata-implementation:frameworks:open-connector-framework') implementation project(':open-metadata-implementation:frameworks:governance-action-framework') implementation project(':open-metadata-implementation:repository-services:repository-services-apis') diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/governance-server-fvt/src/main/java/org/odpi/openmetadata/accessservices/governanceserver/fvt/duplicates/CreateDuplicatesTest.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/governance-server-fvt/src/main/java/org/odpi/openmetadata/accessservices/governanceserver/fvt/duplicates/CreateDuplicatesTest.java index 959f052c490..02c80317637 100644 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/governance-server-fvt/src/main/java/org/odpi/openmetadata/accessservices/governanceserver/fvt/duplicates/CreateDuplicatesTest.java +++ b/open-metadata-test/open-metadata-fvt/access-services-fvt/governance-server-fvt/src/main/java/org/odpi/openmetadata/accessservices/governanceserver/fvt/duplicates/CreateDuplicatesTest.java @@ -10,11 +10,11 @@ import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStatus; import org.odpi.openmetadata.frameworks.governanceaction.properties.OpenMetadataElement; import org.odpi.openmetadata.frameworks.governanceaction.properties.RelatedMetadataElement; import org.odpi.openmetadata.frameworks.governanceaction.search.ElementProperties; import org.odpi.openmetadata.frameworks.governanceaction.search.PropertyHelper; +import org.odpi.openmetadata.frameworks.openmetadata.enums.ElementStatus; import org.odpi.openmetadata.frameworkservices.gaf.client.rest.GAFRESTClient; import org.odpi.openmetadata.fvt.utilities.FVTResults; import org.odpi.openmetadata.fvt.utilities.auditlog.FVTAuditLogDestination; diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/stewardship-action-fvt/build.gradle b/open-metadata-test/open-metadata-fvt/access-services-fvt/stewardship-action-fvt/build.gradle index ed89972c5b1..150284dc372 100644 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/stewardship-action-fvt/build.gradle +++ b/open-metadata-test/open-metadata-fvt/access-services-fvt/stewardship-action-fvt/build.gradle @@ -19,6 +19,7 @@ dependencies { implementation project(':open-metadata-implementation:access-services:asset-consumer:asset-consumer-api') implementation project(':open-metadata-implementation:access-services:asset-consumer:asset-consumer-client') implementation project(':open-metadata-implementation:frameworks:audit-log-framework') + implementation project(':open-metadata-implementation:frameworks:open-metadata-framework') implementation project(':open-metadata-implementation:frameworks:open-connector-framework') implementation project(':open-metadata-implementation:repository-services:repository-services-apis') implementation project(':open-metadata-implementation:admin-services:admin-services-api') diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/stewardship-action-fvt/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/fvt/duplicateprocessing/DuplicateAssetTest.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/stewardship-action-fvt/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/fvt/duplicateprocessing/DuplicateAssetTest.java index 277f1bf79a8..f0f16aa601b 100644 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/stewardship-action-fvt/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/fvt/duplicateprocessing/DuplicateAssetTest.java +++ b/open-metadata-test/open-metadata-fvt/access-services-fvt/stewardship-action-fvt/src/main/java/org/odpi/openmetadata/accessservices/stewardshipaction/fvt/duplicateprocessing/DuplicateAssetTest.java @@ -7,11 +7,11 @@ import org.odpi.openmetadata.accessservices.assetconsumer.client.rest.AssetConsumerRESTClient; import org.odpi.openmetadata.accessservices.assetowner.client.AssetOwner; import org.odpi.openmetadata.accessservices.assetowner.client.rest.AssetOwnerRESTClient; -import org.odpi.openmetadata.accessservices.assetowner.properties.AssetProperties; -import org.odpi.openmetadata.accessservices.assetconsumer.properties.MeaningProperties; +import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.AssetElement; +import org.odpi.openmetadata.frameworks.openmetadata.properties.assets.AssetProperties; +import org.odpi.openmetadata.frameworks.openmetadata.properties.glossaries.MeaningProperties; import org.odpi.openmetadata.accessservices.stewardshipaction.client.StewardshipAction; import org.odpi.openmetadata.accessservices.stewardshipaction.client.rest.StewardshipActionRESTClient; -import org.odpi.openmetadata.accessservices.stewardshipaction.metadataelements.AssetElement; import org.odpi.openmetadata.adminservices.configuration.registration.AccessServiceDescription; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.fvt.utilities.FVTResults; @@ -152,7 +152,7 @@ private AssetConsumer getAssetConsumerClient(String serverName, { AssetConsumerRESTClient restClient = new AssetConsumerRESTClient(serverName, serverPlatformRootURL); - MeaningProperties likeProperties = null; + MeaningProperties meaningProperties = null; return new AssetConsumer(serverName, serverPlatformRootURL, restClient, maxPageSize, auditLog); }